1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 00:20:07 +00:00

[common.js] modified for IE8

This commit is contained in:
llj
2015-07-02 17:14:31 +08:00
parent 2970680783
commit 205f5486bb

View File

@@ -303,9 +303,19 @@ define([
}, },
encodePath: function(path) { encodePath: function(path) {
// IE8 does not support 'map()'
/*
return path.split('/').map(function(e) { return path.split('/').map(function(e) {
return encodeURIComponent(e); return encodeURIComponent(e);
}).join('/'); }).join('/');
*/
var path_arr = path.split('/'),
path_arr_ = [];
for (var i = 0, len = path_arr.length; i < len; i++) {
path_arr_.push(encodeURIComponent(path_arr[i]));
}
return path_arr_.join('/');
}, },
closePopup: function(e, popup, popup_switch) { closePopup: function(e, popup, popup_switch) {