mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
NOISSUE, trivial code change
This commit is contained in:
parent
ffcf599e68
commit
4c1ba64d25
4 changed files with 59 additions and 53 deletions
|
|
@ -15,8 +15,11 @@ class JSCallbackDisplayHandler
|
|||
$variables['error'] = $oModule->getError();
|
||||
$variables['message'] = $oModule->getMessage();
|
||||
$json = str_replace(array("\r\n", "\n", "\t"), array('\n', '\n', '\t'), json_encode2($variables));
|
||||
$output = sprintf('<script>%s(%s);</script>', Context::getJSCallbackFunc(), $json);
|
||||
return $output;
|
||||
return sprintf('<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
%s(%s);
|
||||
//]]>
|
||||
</script>', Context::getJSCallbackFunc(), $json);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,19 +44,23 @@ class VirtualXMLDisplayHandler
|
|||
}
|
||||
}
|
||||
|
||||
$html = '<script>' . "\n";
|
||||
$html = array();
|
||||
$html[] = '<script type="text/javascript">';
|
||||
$html[] = '//<![CDATA[';
|
||||
|
||||
if($output->message)
|
||||
{
|
||||
$html .= 'alert("' . $output->message . '");' . "\n";
|
||||
$html[] = 'alert("' . $output->message . '");';
|
||||
}
|
||||
if($output->url)
|
||||
{
|
||||
$url = preg_replace('/#(.+)$/i', '', $output->url);
|
||||
$html .= 'self.location.href = "' . $request_url . 'common/tpl/redirect.html?redirect_url=' . urlencode($url) . '";' . "\n";
|
||||
$html[] = 'self.location.href = "' . $request_url . 'common/tpl/redirect.html?redirect_url=' . urlencode($url) . '";';
|
||||
}
|
||||
$html .= '</script>' . "\n";
|
||||
return $html;
|
||||
$html[] = '//]]>';
|
||||
$html[] = '</script>';
|
||||
|
||||
return join(PHP_EOL, $html);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,10 +366,9 @@ class ExtraItem
|
|||
break;
|
||||
// Phone Number
|
||||
case 'tel' :
|
||||
$buff[] =
|
||||
'<input type="text" name="' . $column_name . '[]" value="' . $value[0] . '" size="4" maxlength="4" class="tel" />' .
|
||||
'<input type="text" name="' . $column_name . '[]" value="' . $value[1] . '" size="4" maxlength="4" class="tel" />' .
|
||||
'<input type="text" name="' . $column_name . '[]" value="' . $value[2] . '" size="4" maxlength="4" class="tel" />';
|
||||
$buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[0] . '" size="4" maxlength="4" class="tel" />';
|
||||
$buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[1] . '" size="4" maxlength="4" class="tel" />';
|
||||
$buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[2] . '" size="4" maxlength="4" class="tel" />';
|
||||
break;
|
||||
// textarea
|
||||
case 'textarea' :
|
||||
|
|
@ -380,19 +379,16 @@ class ExtraItem
|
|||
$buff[] = '<ul>';
|
||||
foreach($default as $v)
|
||||
{
|
||||
$checked = '';
|
||||
if($value && in_array(trim($v), $value))
|
||||
{
|
||||
$checked = ' checked="checked"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
// Temporary ID for labeling
|
||||
$tmp_id = $column_name . '-' . $id_num++;
|
||||
|
||||
$buff[] ='<li><input type="checkbox" name="' . $column_name . '[]" id="' . $tmp_id . '" value="' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '" ' . $checked . ' /><label for="' . $tmp_id . '">' . $v . '</label></li>';
|
||||
$buff[] =' <li><input type="checkbox" name="' . $column_name . '[]" id="' . $tmp_id . '" value="' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '" ' . $checked . ' /><label for="' . $tmp_id . '">' . $v . '</label></li>';
|
||||
}
|
||||
$buff[] = '</ul>';
|
||||
break;
|
||||
|
|
@ -401,15 +397,12 @@ class ExtraItem
|
|||
$buff[] = '<select name="' . $column_name . '" class="select">';
|
||||
foreach($default as $v)
|
||||
{
|
||||
$selected = '';
|
||||
if($value && in_array(trim($v), $value))
|
||||
{
|
||||
$selected = ' selected="selected"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
$buff[] = '<option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
|
||||
$buff[] = ' <option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
|
||||
}
|
||||
$buff[] = '</select>';
|
||||
break;
|
||||
|
|
@ -418,14 +411,11 @@ class ExtraItem
|
|||
$buff[] = '<ul>';
|
||||
foreach($default as $v)
|
||||
{
|
||||
$checked = '';
|
||||
if($value && in_array(trim($v), $value))
|
||||
{
|
||||
$checked = ' checked="checked"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
// Temporary ID for labeling
|
||||
$tmp_id = $column_name . '-' . $id_num++;
|
||||
|
|
@ -439,29 +429,29 @@ class ExtraItem
|
|||
// datepicker javascript plugin load
|
||||
Context::loadJavascriptPlugin('ui.datepicker');
|
||||
|
||||
$buff[] =
|
||||
'<input type="hidden" name="' . $column_name . '" value="' . $value . '" />' .
|
||||
'<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" /> <input type="button" value="' . Context::getLang('cmd_delete') . '" id="dateRemover_' . $column_name . '" />' . "\n" .
|
||||
'<script>' . "\n" .
|
||||
'(function($){' . "\n" .
|
||||
' $(function(){' . "\n" .
|
||||
' var option = { dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true, gotoCurrent: false,yearRange:\'-100:+10\', onSelect:function(){' . "\n" .
|
||||
' $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}' . "\n" .
|
||||
' };' . "\n" .
|
||||
' $.extend(option,$.datepicker.regional[\'' . Context::getLangType() . '\']);' . "\n" .
|
||||
' $("#date_' . $column_name . '").datepicker(option);' . "\n" .
|
||||
' $("#dateRemover_' . $column_name . '").click(function(){' . "\n" .
|
||||
' $(this).siblings("input").val("");' . "\n" .
|
||||
' return false;' . "\n" .
|
||||
' })' . "\n" .
|
||||
' });' . "\n" .
|
||||
'})(jQuery);' . "\n" .
|
||||
'</script>';
|
||||
$buff[] = '<input type="hidden" name="' . $column_name . '" value="' . $value . '" />';
|
||||
$buff[] = '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" /> <input type="button" value="' . Context::getLang('cmd_delete') . '" id="dateRemover_' . $column_name . '" />';
|
||||
$buff[] = '<script type="text/javascript">';
|
||||
$buff[] = '//<![CDATA[';
|
||||
$buff[] = '(function($){';
|
||||
$buff[] = '$(function(){';
|
||||
$buff[] = ' var option = { dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\'-100:+10\', onSelect:function(){';
|
||||
$buff[] = ' $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}';
|
||||
$buff[] = ' };';
|
||||
$buff[] = ' $.extend(option,$.datepicker.regional[\'' . Context::getLangType() . '\']);';
|
||||
$buff[] = ' $("#date_' . $column_name . '").datepicker(option);';
|
||||
$buff[] = ' $("#dateRemover_' . $column_name . '").click(function(){';
|
||||
$buff[] = ' $(this).siblings("input").val("");';
|
||||
$buff[] = ' return false;';
|
||||
$buff[] = ' })';
|
||||
$buff[] = '});';
|
||||
$buff[] = '})(jQuery);';
|
||||
$buff[] = '//]]>';
|
||||
$buff[] = '</script>';
|
||||
break;
|
||||
// address
|
||||
case "kr_zip" :
|
||||
$krzipModel = &getModel('krzip');
|
||||
if($krzipModel && method_exists($krzipModel , 'getKrzipCodeSearchHtml' ))
|
||||
if(($oKrzipModel = &getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))
|
||||
{
|
||||
$buff[] = $krzipModel->getKrzipCodeSearchHtml($column_name, $value);
|
||||
}
|
||||
|
|
@ -469,7 +459,6 @@ class ExtraItem
|
|||
// General text
|
||||
default :
|
||||
$buff[] =' <input type="text" name="' . $column_name . '" value="' . ($value ? $value : $default) . '" class="text" />';
|
||||
break;
|
||||
}
|
||||
if($this->desc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1477,14 +1477,12 @@ function changeValueInUrl($key, $requestKey, $dbKey, $urlName = 'success_return_
|
|||
*/
|
||||
function htmlHeader()
|
||||
{
|
||||
echo <<<HTMLHEADER
|
||||
<!DOCTYPE html>
|
||||
echo '<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
HTMLHEADER;
|
||||
<body>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1510,7 +1508,11 @@ function alertScript($msg)
|
|||
return;
|
||||
}
|
||||
|
||||
echo '<script>alert("' . $msg . '");</script>';
|
||||
echo '<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
alert("' . $msg . '");
|
||||
//]]>
|
||||
</script>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1520,7 +1522,11 @@ function alertScript($msg)
|
|||
*/
|
||||
function closePopupScript()
|
||||
{
|
||||
echo '<script>window.close();</script>';
|
||||
echo '<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
window.close();
|
||||
//]]>
|
||||
</script>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1533,7 +1539,11 @@ function reload($isOpener = FALSE)
|
|||
{
|
||||
$reloadScript = $isOpener ? 'window.opener.location.reload()' : 'document.location.reload()';
|
||||
|
||||
echo '<script>' . $reloadScript . '</script>';
|
||||
echo '<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
' . $reloadScript . '
|
||||
//]]>
|
||||
</script>';
|
||||
}
|
||||
|
||||
/* End of file func.inc.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue