merge with 1.4.5 branch(1.4.5.10)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@9269 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-22 05:29:04 +00:00
parent 92332c8ebb
commit a0d57a320f
98 changed files with 970 additions and 432 deletions

File diff suppressed because one or more lines are too long

View file

@ -296,13 +296,13 @@ String.prototype.setQuery = function(key, val) {
jQuery.each(args, function(key,val){
if (!jQuery.trim(val)) return;
q_list.push(key+'='+decodeURI(val));
q_list.push(decodeURIComponent(key)+'='+decodeURIComponent(val));
});
query_string = q_list.join('&');
uri = uri+(query_string?'?'+query_string:'');
} else {
if(val.toString().trim()) uri = uri+"?"+key+"="+val;
if(val.toString().trim()) uri = uri+"?"+decodeURIComponent(key)+"="+decodeURIComponent(val);
}
var re = /https:\/\/([^:\/]+)(:\d+|)/i;
@ -345,7 +345,7 @@ String.prototype.setQuery = function(key, val) {
uri = uri.replace(re,toReplace);
}
}
return encodeURI(uri);
}
@ -605,21 +605,16 @@ function doDocumentPreview(obj) {
var dummy_obj = jQuery("#previewDocument");
if(!dummy_obj.length) {
jQuery(
dummy_obj = jQuery(
'<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'">'+
'<input type="hidden" name="module" value="document" />'+
'<input type="hidden" name="act" value="dispDocumentPreview" />'+
'<input type="hidden" name="content" />'+
'</form>'
).appendTo(document.body);
dummy_obj = jQuery("#previewDocument")[0];
}
if(dummy_obj) {
dummy_obj.content.value = content;
dummy_obj.submit();
}
dummy_obj.find('input[name="content"]').val(content).end().submit();
}
/* 게시글 저장 */
@ -982,4 +977,4 @@ jQuery(function(){
objText.after("<a href='"+request_uri.setQuery('module','module').setQuery('act','dispModuleAdminLangcode').setQuery('target',targetName)+"' class='buttonSet buttonSetting' onclick='popopen(this.href);return false;'><span>find_langcode</span></a>");
}
);
});
});

View file

@ -43,7 +43,7 @@ describe('SetQuery', {
'should remove https port and add http port if http port is defined' : function() {
targetsp = "https://xpressengine.com:443/?q=r";
http_port = 8000;
value_of(targetsp.setQuery("act","dispLogin2")).should_be("http://xpressengine.com/:8000/?q=r&act=dispLogin2");
value_of(targetsp.setQuery("act","dispLogin2")).should_be("http://xpressengine.com:8000/?q=r&act=dispLogin2");
},
'should only remove https port and if http port is defined as 80' : function() {
targetsp = "https://xpressengine.com:443/?q=r";