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:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user