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

@ -123,9 +123,9 @@
</div>
<div class="list_footer">
<div class="pagination" cond="$document_list || $notice_list">
<a href="{getUrl('page','','document_srl','','division',$division,'last_division',$last_division)}" class="direction prev"><span></span><span></span> {$lang->first_page}</a>
<a href="{getUrl('page','','document_srl','','division',$division,'last_division',$last_division)}" class="direction prev"><span></span><span></span> {$lang->first_page}</a>
<block loop="$page_no=$page_navigation->getNextPage()">
<strong cond="$page==$page_no">{$page_no}</strong>
<strong cond="$page==$page_no">{$page_no}</strong>
<a cond="$page!=$page_no" href="{getUrl('page',$page_no,'document_srl','','division',$division,'last_division',$last_division)}">{$page_no}</a>
</block>
<a href="{getUrl('page',$page_navigation->last_page,'document_srl','','division',$division,'last_division',$last_division)}" class="direction next">{$lang->last_page} <span></span><span></span></a>
@ -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

@ -135,7 +135,7 @@
<div class="btnArea">
<a href="{getUrl('act','dispBoardWrite','document_srl','')}" class="btn"><i class="xi-pen"></i> {$lang->cmd_write}</a>
<a href="{getUrl('act','dispBoardTagList')}" class="btn" title="{$lang->tag}"><i class="xi-tag"></i> {$lang->tag}</a>
<a cond="$grant->manager" class="btn" href="{getUrl('act','dispBoardAdminBoardInfo')}" title="{$lang->cmd_setup}"><i class="xi-cog"></i> {$lang->cmd_setup}</a>
<a cond="$grant->manager" class="btn" href="{getUrl('act','dispBoardAdminBoardInfo')}" title="{$lang->cmd_setup}"><i class="xi-cog"></i> {$lang->cmd_setup}</a>
<a cond="$grant->manager" href="{getUrl('','mid',$mid,'act','dispDocumentManageDocument')}" class="btn" onclick="popopen(this.href,'manageDocument'); return false;">{$lang->cmd_manage_document}</a>
</div>
@ -149,14 +149,14 @@
<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>
<div class="pagination" cond="$document_list || $notice_list">
<a href="{getUrl('page','','document_srl','','division',$division ?? '','last_division',$last_division ?? '')}" class="direction prev"><i class="xi-angle-left"></i>&nbsp;{$lang->first_page}</a>
<a href="{getUrl('page','','document_srl','','division',$division ?? '','last_division',$last_division ?? '')}" class="direction prev"><i class="xi-angle-left"></i>&nbsp;{$lang->first_page}</a>
<block loop="$page_no=$page_navigation->getNextPage()">
<strong cond="$page==$page_no">{$page_no}</strong>
<strong cond="$page==$page_no">{$page_no}</strong>
<a cond="$page!=$page_no" href="{getUrl('page',$page_no,'document_srl','','division',$division ?? '','last_division',$last_division ?? '')}">{$page_no}</a>
</block>
<a href="{getUrl('page',$page_navigation->last_page,'document_srl','','division',$division ?? '','last_division',$last_division ?? '')}" class="direction next">{$lang->last_page}&nbsp;<i class="xi-angle-right"></i></a>

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,13 +132,13 @@ 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 = [];
for(var i=0;i<sel_obj.options.length;i++) list[list.length] = sel_obj.options[i].value;
if(list.length<1) return;
var params = {};
params.module_srl = module_srl;
params.list = list.join(',');

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;
@ -132,7 +132,7 @@ function doFillWidgetVars() {
if (node.name == 'widget_cache_unit') {
continue;
}
var length = node.length;
var type = node.type;
@ -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);
}