1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

encode path for using in URI

This commit is contained in:
Daniel Pan
2015-04-08 18:26:23 +08:00
parent dd5128cb57
commit 9d6dfdabeb
4 changed files with 17 additions and 6 deletions

View File

@@ -296,6 +296,12 @@ define([
return result;
},
encodePath: function(path) {
return path.split('/').map(function(e) {
return encodeURIComponent(e);
}).join('/');
},
closePopup: function(e, popup, popup_switch) {
var target = e.target || event.srcElement;
if (!popup.hasClass('hide') && !popup.is(target) && !popup.find('*').is(target) && !popup_switch.is(target) && !popup_switch.find('*').is(target) ) {