This commit is contained in:
bnu 2015-03-05 17:22:29 +09:00
parent d4486ab321
commit 33eeeb64b3
4 changed files with 13 additions and 9 deletions

View file

@ -1062,12 +1062,13 @@ jQuery(function($) {
var loc = isSameUrl(this, window.location.href) ? current_url : this; var loc = isSameUrl(this, window.location.href) ? current_url : this;
var idx = loc.indexOf('?'); var idx = loc.indexOf('?');
var uri = loc.replace(/#$/, ''); var uri = loc.replace(/#$/, '');
var act, re, v, toReplace; var act, re, v, toReplace, query_string;
if (typeof(val)=='undefined') val = ''; if (typeof(val)=='undefined') val = '';
if (idx != -1) { if (idx != -1) {
var query_string = uri.substr(idx+1, loc.length), args = {}, q_list = []; var args = {}, q_list = [];
query_string = uri.substr(idx + 1, loc.length);
uri = loc.substr(0, idx); uri = loc.substr(0, idx);
query_string.replace(/([^=]+)=([^&]*)(&|$)/g, function(all,key,val) { args[key] = val; }); query_string.replace(/([^=]+)=([^&]*)(&|$)/g, function(all,key,val) { args[key] = val; });
@ -1080,9 +1081,12 @@ jQuery(function($) {
} }
query_string = q_list.join('&'); query_string = q_list.join('&');
uri = uri+(query_string?'?'+query_string:''); uri = uri + (query_string ? '?' + encodeURI(query_string) : '');
} else { } else {
if (String(val).trim()) uri = uri+'?'+key+'='+val; if (String(val).trim()) {
query_string = '?' + key + '=' + val;
uri = uri + encodeURI(query_string);
}
} }
re = /^https:\/\/([^:\/]+)(:\d+|)/i; re = /^https:\/\/([^:\/]+)(:\d+|)/i;
@ -1112,7 +1116,7 @@ jQuery(function($) {
// insert index.php if it isn't included // insert index.php if it isn't included
uri = uri.replace(/\/(index\.php)?\?/, '/index.php?'); uri = uri.replace(/\/(index\.php)?\?/, '/index.php?');
return encodeURI(uri); return uri;
}; };
/** /**

4
common/js/xe.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long