Replace xGetElementById() with document.getElementById() in various modules

This commit is contained in:
Kijin Sung 2023-08-31 22:20:07 +09:00
parent b65c2b5c29
commit f6d23ee13e
4 changed files with 21 additions and 22 deletions

View file

@ -136,14 +136,13 @@
</div>
<button type="button" class="bsToggle" title="{$lang->cmd_search}">{$lang->cmd_search}</button>
<form cond="$grant->view" action="{getUrl()}" method="get" onsubmit="return procFilter(this, search)" id="board_search" class="board_search" no-error-return-url="true">
<input type="hidden" name="vid" value="{$vid}" />
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="category" value="{$category}" />
<input type="text" name="search_keyword" value="{escape($search_keyword, false)}" title="{$lang->cmd_search}" class="iText" />
<select name="search_target">
<option loop="$search_option=>$key,$val" value="{$key}" selected="selected"|cond="$search_target==$key">{$val}</option>
</select>
<button type="submit" class="btn" onclick="xGetElementById('board_search').submit();return false;">{$lang->cmd_search}</button>
<button type="submit" class="btn">{$lang->cmd_search}</button>
<a cond="$last_division" href="{getUrl('page',1,'document_srl','','division',$last_division,'last_division','')}" class="btn">{$lang->cmd_search_next}</a>
</form>
<a href="{getUrl('act','dispBoardTagList')}" class="tagSearch" title="{$lang->tag}">{$lang->tag}</a>

View file

@ -149,7 +149,7 @@
<i class="xi-magnifier"></i>
<input type="text" name="search_keyword" value="{escape($search_keyword ?? '', false)}" title="{$lang->cmd_search}" class="iText" />
</div>
<button type="submit" class="btn" onclick="xGetElementById('board_search').submit();return false;">{$lang->cmd_search}</button>
<button type="submit" class="btn">{$lang->cmd_search}</button>
<a cond="isset($last_division) && $last_division" href="{getUrl('page',1,'document_srl','','division',$last_division,'last_division','')}" class="btn">{$lang->cmd_search_next}</a>
</form>

View file

@ -38,7 +38,7 @@ function doUpdateCategory(category_srl, mode, message)
{
if(typeof(message)!='undefined'&&!confirm(message)) return;
var fo_obj = xGetElementById('fo_category_info');
var fo_obj = document.getElementById('fo_category_info');
fo_obj.category_srl.value = category_srl;
fo_obj.mode.value = mode;
@ -77,8 +77,8 @@ function doCartSetup(url)
/* setup index */
function doInsertItem()
{
var target_obj = xGetElementById('targetItem');
var display_obj = xGetElementById('displayItem');
var target_obj = document.getElementById('targetItem');
var display_obj = document.getElementById('displayItem');
if(!target_obj || !display_obj) return;
var text = target_obj.options[target_obj.selectedIndex].text;
@ -92,7 +92,7 @@ function doInsertItem()
}
function doDeleteItem()
{
var sel_obj = xGetElementById('displayItem');
var sel_obj = document.getElementById('displayItem');
var idx = sel_obj.selectedIndex;
if(idx<0 || sel_obj.options.length<2) return;
sel_obj.remove(idx);
@ -100,7 +100,7 @@ function doDeleteItem()
}
function doMoveUpItem()
{
var sel_obj = xGetElementById('displayItem');
var sel_obj = document.getElementById('displayItem');
var idx = sel_obj.selectedIndex;
if(idx<1 || !idx) return;
@ -115,7 +115,7 @@ function doMoveUpItem()
}
function doMoveDownItem()
{
var sel_obj = xGetElementById('displayItem');
var sel_obj = document.getElementById('displayItem');
var idx = sel_obj.selectedIndex;
if(idx>=sel_obj.options.length-1) return;
@ -132,7 +132,7 @@ function doMoveDownItem()
function doSaveListConfig(module_srl)
{
if(!module_srl) return;
var sel_obj = xGetElementById('displayItem');
var sel_obj = document.getElementById('displayItem');
var idx = sel_obj.selectedIndex;
var list = [];

View file

@ -66,8 +66,8 @@ function getWidgetVars() {
if(!opener || !opener.selectedWidget || !opener.selectedWidget.getAttribute("widget")) return;
selected_node = opener.selectedWidget;
if(!xGetElementById('fo_widget').widgetstyle.value) {
xGetElementById('fo_widget').widgetstyle.value = selected_node.getAttribute('widgetstyle');
if(!document.getElementById('fo_widget').widgetstyle.value) {
document.getElementById('fo_widget').widgetstyle.value = selected_node.getAttribute('widgetstyle');
}
doFillWidgetVars();
@ -83,7 +83,7 @@ function doFillWidgetVars() {
var widget_sequence = parseInt(selected_node.getAttribute("widget_sequence"),10);
var fo_widget = jQuery("#fo_widget");
var fo_obj = xGetElementById("fo_widget");
var fo_obj = document.getElementById("fo_widget");
jQuery('#widget_skin').val(skin);
// 위젯 스타일 유지를 위한 hidden input 추가하고 값을 저장
@ -97,7 +97,7 @@ function doFillWidgetVars() {
var value = jQuery(selected_node).attr(name);
if(value == 'Array') continue;
if(jQuery("[name="+name+"]", fo_widget).size() > 0 || !value) continue;
if(jQuery("[name="+name+"]", fo_widget).length > 0 || !value) continue;
if(name.indexOf('sizcache') === 0) continue;
if(jQuery.inArray(name, attrFilters) > -1) continue;
@ -209,7 +209,7 @@ function doFillWidgetVars() {
// 컬러셋 설정
if(skin && xGetElementById("widget_colorset") && xGetElementById("widget_colorset").options.length < 1 && colorset) {
if(skin && document.getElementById("widget_colorset") && document.getElementById("widget_colorset").options.length < 1 && colorset) {
doDisplaySkinColorset(colorset);
}