mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Remove most references to x.js in core modules
This commit is contained in:
parent
0fde7eb7e7
commit
f3d753c6d0
6 changed files with 36 additions and 35 deletions
|
|
@ -305,7 +305,7 @@ class BoardAdminView extends Board {
|
||||||
* @brief board module message
|
* @brief board module message
|
||||||
**/
|
**/
|
||||||
function alertMessage($message) {
|
function alertMessage($message) {
|
||||||
$script = sprintf('<script> xAddEventListener(window,"load", function() { alert("%s"); } );</script>', lang($message));
|
$script = sprintf('<script> window.addEventListener("load", function() { alert(%s); }); </script>', json_encode(strval(lang($message))));
|
||||||
Context::addHtmlHeader( $script );
|
Context::addHtmlHeader($script);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ function editorSearchComponent(evt) {
|
||||||
if(obj.getAttribute("widget")) {
|
if(obj.getAttribute("widget")) {
|
||||||
// editor_sequence을 찾음
|
// editor_sequence을 찾음
|
||||||
while(tobj && tobj.nodeName != "BODY") {
|
while(tobj && tobj.nodeName != "BODY") {
|
||||||
tobj = xParent(tobj);
|
tobj = tobj.parentElement || tobj.parentNode;
|
||||||
}
|
}
|
||||||
if(!tobj || tobj.nodeName != "BODY" || !tobj.getAttribute("editor_sequence")) {
|
if(!tobj || tobj.nodeName != "BODY" || !tobj.getAttribute("editor_sequence")) {
|
||||||
editorPrevNode = null;
|
editorPrevNode = null;
|
||||||
|
|
@ -245,8 +245,7 @@ function editorSearchComponent(evt) {
|
||||||
// 선택되어진 object부터 상단으로 이동하면서 editor_component attribute가 있는지 검사
|
// 선택되어진 object부터 상단으로 이동하면서 editor_component attribute가 있는지 검사
|
||||||
if(!obj.getAttribute("editor_component")) {
|
if(!obj.getAttribute("editor_component")) {
|
||||||
while(obj && !obj.getAttribute("editor_component")) {
|
while(obj && !obj.getAttribute("editor_component")) {
|
||||||
if(obj.parentElement) obj = obj.parentElement;
|
obj = obj.parentElement || obj.parentNode;
|
||||||
else obj = xParent(obj);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -274,7 +273,7 @@ function editorSearchComponent(evt) {
|
||||||
// editor_sequence을 찾음
|
// editor_sequence을 찾음
|
||||||
tobj = obj;
|
tobj = obj;
|
||||||
while(tobj && tobj.nodeName != "BODY") {
|
while(tobj && tobj.nodeName != "BODY") {
|
||||||
tobj = xParent(tobj);
|
tobj = tobj.parentElement || tobj.parentNode;
|
||||||
}
|
}
|
||||||
if(!tobj || tobj.nodeName != "BODY" || !tobj.getAttribute("editor_sequence")) {
|
if(!tobj || tobj.nodeName != "BODY" || !tobj.getAttribute("editor_sequence")) {
|
||||||
editorPrevNode = null;
|
editorPrevNode = null;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,10 @@
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var confirm_delete_msg = "{$lang->confirm_delete}";
|
var confirm_delete_msg = "{$lang->confirm_delete}";
|
||||||
xAddEventListener(window,"load",function() { doStartPageModify('zonePageContent', '{$module_info->module_srl}'); jQuery('div.admin').css('background-color','transparent');});
|
window.addEventListener('load', function() {
|
||||||
|
doStartPageModify('zonePageContent', '{$module_info->module_srl}');
|
||||||
|
jQuery('div.admin').css('background-color','transparent');
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--#include("../../widget/tpl/widget_layer.html")-->
|
<!--#include("../../widget/tpl/widget_layer.html")-->
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,10 @@
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var confirm_delete_msg = "{$lang->confirm_delete}";
|
var confirm_delete_msg = "{$lang->confirm_delete}";
|
||||||
xAddEventListener(window,"load",function() { doStartPageModify('zonePageContent', '{$module_info->module_srl}'); jQuery('div.admin').css('background-color','transparent');});
|
window.addEventListener('load', function() {
|
||||||
|
doStartPageModify('zonePageContent', '{$module_info->module_srl}');
|
||||||
|
jQuery('div.admin').css('background-color','transparent');
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--#include("../../widget/tpl/widget_layer.html")-->
|
<!--#include("../../widget/tpl/widget_layer.html")-->
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="x_modal-body">
|
<div class="x_modal-body">
|
||||||
<div class="pageAddContent"></div>
|
<div class="pageAddContent"></div>
|
||||||
<div class="editor">{$editor|noescape}</div>
|
<div class="editor">{$editor|noescape}</div>
|
||||||
<script>xAddEventListener(window, 'load', doSyncPageContent);</script>
|
<script>window.addEventListener('load', doSyncPageContent);</script>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_modal-footer">
|
<div class="x_modal-footer">
|
||||||
<input type="submit" value="{$lang->cmd_save}" class="x_btn x_btn-inverse" />
|
<input type="submit" value="{$lang->cmd_save}" class="x_btn x_btn-inverse" />
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ function doSyncPageContent() {
|
||||||
if(obj && jQuery(obj).hasClass("widgetContent")) {
|
if(obj && jQuery(obj).hasClass("widgetContent")) {
|
||||||
if(!fo_obj.document_srl || fo_obj.document_srl.value == '0') {
|
if(!fo_obj.document_srl || fo_obj.document_srl.value == '0') {
|
||||||
try {
|
try {
|
||||||
var content = Base64.decode(xInnerHtml(obj));
|
var content = Base64.decode(obj.innerHTML);
|
||||||
get_by_id("content_fo").content.value = content;
|
get_by_id("content_fo").content.value = content;
|
||||||
xe.Editors["1"].exec("SET_IR", [content]);
|
xe.Editors["1"].exec("SET_IR", [content]);
|
||||||
}
|
}
|
||||||
|
|
@ -349,9 +349,8 @@ function doAddWidgetCode(widget_code) {
|
||||||
|
|
||||||
cssfile = request_uri+cssfile;
|
cssfile = request_uri+cssfile;
|
||||||
if(typeof(document.createStyleSheet)=='undefined') {
|
if(typeof(document.createStyleSheet)=='undefined') {
|
||||||
var css ='<link rel="stylesheet" href="'+cssfile+'" />';
|
var dummy = document.createElement('div');
|
||||||
var dummy = xCreateElement("DIV");
|
dummy.innerHTML = '<link rel="stylesheet" href="'+cssfile+'" />';
|
||||||
xInnerHtml(dummy , css);
|
|
||||||
document.body.appendChild(dummy);
|
document.body.appendChild(dummy);
|
||||||
} else {
|
} else {
|
||||||
document.createStyleSheet(cssfile,0);
|
document.createStyleSheet(cssfile,0);
|
||||||
|
|
@ -385,8 +384,8 @@ function doAddWidgetCode(widget_code) {
|
||||||
|
|
||||||
|
|
||||||
// html 추가
|
// html 추가
|
||||||
var dummy = xCreateElement('div');
|
var dummy = document.createElement('div');
|
||||||
xInnerHtml(dummy, widget_code);
|
dummy.innerHTML = widget_code;
|
||||||
var obj = dummy.childNodes[0];
|
var obj = dummy.childNodes[0];
|
||||||
|
|
||||||
if(selectedWidget && selectedWidget.getAttribute("widget")) {
|
if(selectedWidget && selectedWidget.getAttribute("widget")) {
|
||||||
|
|
@ -462,8 +461,8 @@ function doCheckWidget(e) {
|
||||||
exec_xml('widget','procWidgetCopyDocument', params, completeCopyWidgetContent, response_tags, params, p_obj);
|
exec_xml('widget','procWidgetCopyDocument', params, completeCopyWidgetContent, response_tags, params, p_obj);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
var dummy = xCreateElement("DIV");
|
var dummy = document.createElement('div');
|
||||||
xInnerHtml(dummy,xInnerHtml(p_obj));
|
dummy.innerHTML = p_obj.innerHTML;
|
||||||
|
|
||||||
dummy.widget_sequence = '';
|
dummy.widget_sequence = '';
|
||||||
dummy.className = "widgetOutput";
|
dummy.className = "widgetOutput";
|
||||||
|
|
@ -521,10 +520,8 @@ function doCheckWidget(e) {
|
||||||
// content widget 복사
|
// content widget 복사
|
||||||
function completeCopyWidgetContent(ret_obj, response_tags, params, p_obj) {
|
function completeCopyWidgetContent(ret_obj, response_tags, params, p_obj) {
|
||||||
var document_srl = ret_obj.document_srl;
|
var document_srl = ret_obj.document_srl;
|
||||||
var dummy = xCreateElement("DIV");
|
var dummy = document.createElement('div');
|
||||||
xInnerHtml(dummy,xInnerHtml(p_obj));
|
dummy.innerHTML = p_obj.innerHTML;
|
||||||
|
|
||||||
|
|
||||||
dummy.widget_sequence = '';
|
dummy.widget_sequence = '';
|
||||||
dummy.className = "widgetOutput";
|
dummy.className = "widgetOutput";
|
||||||
for(var i=0;i<p_obj.attributes.length;i++) {
|
for(var i=0;i<p_obj.attributes.length;i++) {
|
||||||
|
|
@ -770,7 +767,7 @@ function doApplyWidgetSize(fo_obj) {
|
||||||
if(height && height != "100%") selectedSizeWidget.style.height = height;
|
if(height && height != "100%") selectedSizeWidget.style.height = height;
|
||||||
else {
|
else {
|
||||||
selectedSizeWidget.style.height = '';
|
selectedSizeWidget.style.height = '';
|
||||||
var widgetBorder = xGetElementsByClassName('widgetBorder',selectedSizeWidget);
|
var widgetBorder = selectedSizeWidget.getElementsByClassName('widgetBorder');
|
||||||
for(var i=0;i<widgetBorder.length;i++) {
|
for(var i=0;i<widgetBorder.length;i++) {
|
||||||
var obj = widgetBorder[i];
|
var obj = widgetBorder[i];
|
||||||
obj.style.height = '';
|
obj.style.height = '';
|
||||||
|
|
@ -952,7 +949,7 @@ var widgetDisappear = 0;
|
||||||
|
|
||||||
function widgetCreateTmpObject(obj) {
|
function widgetCreateTmpObject(obj) {
|
||||||
var id = obj.getAttribute('id');
|
var id = obj.getAttribute('id');
|
||||||
tmpObj = xCreateElement('DIV');
|
tmpObj = document.createElement('div');
|
||||||
tmpObj.id = id + '_tmp';
|
tmpObj.id = id + '_tmp';
|
||||||
tmpObj.className = obj.className;
|
tmpObj.className = obj.className;
|
||||||
tmpObj.style.overflow = 'hidden';
|
tmpObj.style.overflow = 'hidden';
|
||||||
|
|
@ -999,8 +996,7 @@ function widgetDragStart(tobj, px, py) {
|
||||||
var $tobj = jQuery(tobj);
|
var $tobj = jQuery(tobj);
|
||||||
if($tobj.hasClass('widgetResize') || $tobj.hasClass('widgetResizeLeft') || $tobj.hasClass('widgetBoxResize') || $tobj.hasClass('widgetBoxResizeLeft')) return;
|
if($tobj.hasClass('widgetResize') || $tobj.hasClass('widgetResizeLeft') || $tobj.hasClass('widgetBoxResize') || $tobj.hasClass('widgetBoxResizeLeft')) return;
|
||||||
var obj = widgetGetTmpObject(tobj);
|
var obj = widgetGetTmpObject(tobj);
|
||||||
|
obj.innerHTML = tobj.innerHTML;
|
||||||
xInnerHtml(obj, xInnerHtml(tobj));
|
|
||||||
|
|
||||||
xLeft(obj, xPageX(tobj));
|
xLeft(obj, xPageX(tobj));
|
||||||
xTop(obj, xPageY(tobj));
|
xTop(obj, xPageY(tobj));
|
||||||
|
|
@ -1072,7 +1068,7 @@ function widgetDrag(tobj, dx, dy) {
|
||||||
// 박스 안에 있을 경우에는 박스내의 위젯하고 자리를 바꾸고 그 외의 경우에는 박스를 빠져 나간다
|
// 박스 안에 있을 경우에는 박스내의 위젯하고 자리를 바꾸고 그 외의 경우에는 박스를 빠져 나간다
|
||||||
if(tobj.parentNode != zonePageObj) {
|
if(tobj.parentNode != zonePageObj) {
|
||||||
// 박스내에 있는 위젯들을 구함
|
// 박스내에 있는 위젯들을 구함
|
||||||
var widgetList = xGetElementsByClassName("widgetOutput",tobj.parentNode);
|
var widgetList = tobj.parentNode.getElementsByClassName("widgetOutput");
|
||||||
|
|
||||||
for(var i=0;i<widgetList.length;i++) {
|
for(var i=0;i<widgetList.length;i++) {
|
||||||
var target_obj = widgetList[i];
|
var target_obj = widgetList[i];
|
||||||
|
|
@ -1084,12 +1080,12 @@ function widgetDrag(tobj, dx, dy) {
|
||||||
if( tobj != target_obj && tobj.xDPX >= l && tobj.xDPX <= ll && tobj.xDPY >= t && tobj.xDPY <= tt && tobj.parentNode == target_obj.parentNode) {
|
if( tobj != target_obj && tobj.xDPX >= l && tobj.xDPX <= ll && tobj.xDPY >= t && tobj.xDPY <= tt && tobj.parentNode == target_obj.parentNode) {
|
||||||
var next1 = target_obj.nextSibling;
|
var next1 = target_obj.nextSibling;
|
||||||
if(!next1) {
|
if(!next1) {
|
||||||
next1 = xCreateElement("DIV");
|
next1 = document.createElement('div');
|
||||||
target_obj.parentNode.appendChild(next1);
|
target_obj.parentNode.appendChild(next1);
|
||||||
}
|
}
|
||||||
var next2 = tobj.nextSibling;
|
var next2 = tobj.nextSibling;
|
||||||
if(!next2) {
|
if(!next2) {
|
||||||
next2 = xCreateElement("DIV");
|
next2 = document.createElement('div');
|
||||||
tobj.parentNode.appendChild(next2);
|
tobj.parentNode.appendChild(next2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1117,7 +1113,7 @@ function widgetDrag(tobj, dx, dy) {
|
||||||
// 이동하려는 위젯이 박스 위젯이 아니라면 박스 위젯들을 구해서 입력 유무를 검사한다
|
// 이동하려는 위젯이 박스 위젯이 아니라면 박스 위젯들을 구해서 입력 유무를 검사한다
|
||||||
if(tobj.getAttribute("widget")!="widgetBox") {
|
if(tobj.getAttribute("widget")!="widgetBox") {
|
||||||
|
|
||||||
var boxList = xGetElementsByClassName("nullWidget", zonePageObj);
|
var boxList = zonePageObj.getElementsByClassName("nullWidget");
|
||||||
for(var i=0;i<boxList.length;i++) {
|
for(var i=0;i<boxList.length;i++) {
|
||||||
var target_obj = boxList[i];
|
var target_obj = boxList[i];
|
||||||
var $target_obj = jQuery(target_obj);
|
var $target_obj = jQuery(target_obj);
|
||||||
|
|
@ -1157,7 +1153,7 @@ function widgetDrag(tobj, dx, dy) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 다른 위젯들을 구해서 자리를 바꿈
|
// 다른 위젯들을 구해서 자리를 바꿈
|
||||||
var widgetList = xGetElementsByClassName("widgetOutput",zonePageObj);
|
var widgetList = zonePageObj.getElementsByClassName("widgetOutput");
|
||||||
for(var i=0;i<widgetList.length;i++) {
|
for(var i=0;i<widgetList.length;i++) {
|
||||||
var target_obj = widgetList[i];
|
var target_obj = widgetList[i];
|
||||||
var widget = target_obj.getAttribute("widget");
|
var widget = target_obj.getAttribute("widget");
|
||||||
|
|
@ -1171,12 +1167,12 @@ function widgetDrag(tobj, dx, dy) {
|
||||||
var next1 = target_obj.nextSibling;
|
var next1 = target_obj.nextSibling;
|
||||||
if(!next1) next1 = target_obj.parentNode.lastChild;
|
if(!next1) next1 = target_obj.parentNode.lastChild;
|
||||||
if(!next1) {
|
if(!next1) {
|
||||||
next1 = xCreateElement("DIV");
|
next1 = document.createElement('div');
|
||||||
target_obj.parentNode.appendChild(next1);
|
target_obj.parentNode.appendChild(next1);
|
||||||
}
|
}
|
||||||
var next2 = tobj.nextSibling;
|
var next2 = tobj.nextSibling;
|
||||||
if(!next2) {
|
if(!next2) {
|
||||||
next2 = xCreateElement("DIV");
|
next2 = document.createElement('div');
|
||||||
tobj.parentNode.appendChild(next2);
|
tobj.parentNode.appendChild(next2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1200,8 +1196,8 @@ function widgetDragEnd(tobj, px, py) {
|
||||||
|
|
||||||
// 스르르 사라지게 함 (일단 사라지게 하는 기능을 제거.. 속도 문제)
|
// 스르르 사라지게 함 (일단 사라지게 하는 기능을 제거.. 속도 문제)
|
||||||
function widgetDisapearObject(obj, tobj) {
|
function widgetDisapearObject(obj, tobj) {
|
||||||
xInnerHtml(tobj,xInnerHtml(obj));
|
tobj.innerHTML = obj.innerHTML;
|
||||||
xInnerHtml(obj,'');
|
obj.innerHTML = '';
|
||||||
jQuery(obj).hide();
|
jQuery(obj).hide();
|
||||||
obj.parentNode.removeChild(obj);
|
obj.parentNode.removeChild(obj);
|
||||||
widgetTmpObject[tobj.id] = null;
|
widgetTmpObject[tobj.id] = null;
|
||||||
|
|
@ -1213,7 +1209,7 @@ function widgetMouseDown(e) {
|
||||||
var obj = e.target;
|
var obj = e.target;
|
||||||
|
|
||||||
while(obj && !obj.draggable) {
|
while(obj && !obj.draggable) {
|
||||||
obj = xParent(obj, true);
|
obj = obj.parentElement || obj.parentNode;
|
||||||
}
|
}
|
||||||
if(obj) {
|
if(obj) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue