#486 게시글 다수 선택시 정상적으로 선택되지 않는 문제 해결

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4353 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-07-14 07:33:24 +00:00
parent e81b6af95a
commit de22070cee
3 changed files with 28 additions and 19 deletions

View file

@ -605,11 +605,19 @@ function clickCheckBoxAll(form, name) {
} }
/* 관리자가 문서를 관리하기 위해서 선택시 세션에 넣음 */ /* 관리자가 문서를 관리하기 위해서 선택시 세션에 넣음 */
var addedDocument = new Array();
function doAddDocumentCart(obj) { function doAddDocumentCart(obj) {
var srl = obj.value; var srl = obj.value;
addedDocument[addedDocument.length] = srl;
setTimeout(function() { callAddDocumentCart(addedDocument.length); }, 100);
}
function callAddDocumentCart(document_length) {
if(addedDocument.length<1 || document_length != addedDocument.length) return;
var params = new Array(); var params = new Array();
params["srl"] = srl; params["srls"] = addedDocument.join(",");
exec_xml("document","procDocumentAdminAddCart", params, null); exec_xml("document","procDocumentAdminAddCart", params, null);
addedDocument = new Array();
} }
/* ff의 rgb(a,b,c)를 #... 로 변경 */ /* ff의 rgb(a,b,c)를 #... 로 변경 */

View file

@ -50,7 +50,7 @@ function xml_response_filter(oXml, callback_func, response_tags, callback_func_a
// xml handler // xml handler
function xml_handler() { function xml_handler() {
this.obj_xmlHttp = null; this.objXmlHttp = null;
this.method_name = null; this.method_name = null;
this.xml_path = request_uri+"index.php"; this.xml_path = request_uri+"index.php";
@ -65,7 +65,7 @@ function xml_handler() {
this.toZMsgObject = xml_handlerToZMsgObject; this.toZMsgObject = xml_handlerToZMsgObject;
this.parseXMLDoc = xml_parseXmlDoc; this.parseXMLDoc = xml_parseXmlDoc;
this.obj_xmlHttp = this.getXmlHttp(); this.objXmlHttp = this.getXmlHttp();
} }
function zGetXmlHttp() { function zGetXmlHttp() {
@ -106,16 +106,16 @@ function xml_handlerRequest(callBackFunc, xmlObj, callBackFunc2, response_tags,
} }
} }
if(this.obj_xmlHttp.readyState!=0) { if(this.objXmlHttp.readyState!=0) {
this.obj_xmlHttp.abort(); this.objXmlHttp.abort();
this.obj_xmlHttp = this.getXmlHttp(); this.objXmlHttp = this.getXmlHttp();
} }
this.obj_xmlHttp.onreadystatechange = function () {callBackFunc(xmlObj, callBackFunc2, response_tags, callback_func_arg, fo_obj)}; this.objXmlHttp.onreadystatechange = function () {callBackFunc(xmlObj, callBackFunc2, response_tags, callback_func_arg, fo_obj)};
// 모든 xml데이터는 POST방식으로 전송. try-cacht문으로 오류 발생시 대처 // 모든 xml데이터는 POST방식으로 전송. try-cacht문으로 오류 발생시 대처
try { try {
this.obj_xmlHttp.open("POST", this.xml_path, true); this.objXmlHttp.open("POST", this.xml_path, true);
} catch(e) { } catch(e) {
alert(e); alert(e);
@ -132,7 +132,7 @@ function xml_handlerRequest(callBackFunc, xmlObj, callBackFunc2, response_tags,
waiting_obj.style.visibility = "visible"; waiting_obj.style.visibility = "visible";
} }
this.obj_xmlHttp.send(rd); this.objXmlHttp.send(rd);
} }
function xml_handlerSetPath(path) { function xml_handlerSetPath(path) {
@ -141,7 +141,7 @@ function xml_handlerSetPath(path) {
function xml_handlerReset() { function xml_handlerReset() {
this.obj_xmlHttp = this.getXmlHttp(); this.objXmlHttp = this.getXmlHttp();
this.params = new Array(); this.params = new Array();
} }
@ -150,8 +150,8 @@ function xml_handlerAddParam(key, val) {
} }
function xml_handlerGetResponseXML() { function xml_handlerGetResponseXML() {
if(this.obj_xmlHttp && this.obj_xmlHttp.readyState == 4 && isDef(this.obj_xmlHttp.responseXML)) { if(this.objXmlHttp && this.objXmlHttp.readyState == 4 && isDef(this.objXmlHttp.responseXML)) {
var xmlDoc = this.obj_xmlHttp.responseXML; var xmlDoc = this.objXmlHttp.responseXML;
this.reset(); this.reset();
return xmlDoc; return xmlDoc;
} }

View file

@ -40,13 +40,14 @@
* @brief 관리자가 선택시 세션에 담음 * @brief 관리자가 선택시 세션에 담음
**/ **/
function procDocumentAdminAddCart() { function procDocumentAdminAddCart() {
$document_srl = Context::get('srl'); $document_srls = explode(',',Context::get('srls'));
$cnt = count($document_srls);
$oDocumentModel = &getModel('document'); for($i=0;$i<$cnt;$i++) {
$oDocument = $oDocumentModel->getDocument($document_srl); $document_srl = (int)trim($document_srls[$i]);
if(!$oDocument->isExists()) return; if(!$document_srls) continue;
if($_SESSION['document_management'][$document_srl]) unset($_SESSION['document_management'][$document_srl]);
$oDocument->doCart(); else $_SESSION['document_management'][$document_srl] = true;
}
} }
/** /**