mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
UI refactoring integration search module
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11998 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1b6abfc6a3
commit
55410ee04e
9 changed files with 166 additions and 249 deletions
|
|
@ -85,7 +85,7 @@
|
|||
}
|
||||
}
|
||||
Context::set('skin_info', $skin_info);
|
||||
Context::set('skin_vars', $skin_vars); //maybe not used
|
||||
Context::set('skin_vars', $skin_vars);
|
||||
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
Context::set('module_info', unserialize($config->skin_vars));
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
<load target="js/integration_search_admin.js" usecdn="true" />
|
||||
|
||||
<h3 class="xeAdmin">{$lang->integration_search} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<div class="header4">
|
||||
<ul class="localNavigation">
|
||||
<li <!--@if($act=='dispIntegration_searchAdminContent')-->class="on"<!--@end-->><a href="{getUrl('act','dispIntegration_searchAdminContent')}">{$lang->cmd_setup}</a></li>
|
||||
<li <!--@if($act=='dispIntegration_searchAdminSkinInfo')-->class="on"<!--@end-->><a href="{getUrl('act','dispIntegration_searchAdminSkinInfo')}">{$lang->cmd_manage_skin}</a></li>
|
||||
<!--@if($module!='admin')-->
|
||||
<li><a href="{getUrl('act','IS')}">{$lang->cmd_back}</a></li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->integration_search}</h1>
|
||||
</div>
|
||||
|
||||
<ul class="x_nav x_nav-tabs">
|
||||
<li class="x_active"|cond="$act=='dispIntegration_searchAdminContent'"><a href="{getUrl('act','dispIntegration_searchAdminContent')}">{$lang->cmd_setup}</a></li>
|
||||
<li class="x_active"|cond="$act=='dispIntegration_searchAdminSkinInfo'"><a href="{getUrl('act','dispIntegration_searchAdminSkinInfo')}">{$lang->cmd_manage_skin}</a></li>
|
||||
<li cond="$module != 'admin'"><a href="{getUrl('act','IS')}">{$lang->cmd_back}</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,52 +1,49 @@
|
|||
<!--#include("header.html")-->
|
||||
<load target="../../widget/tpl/js/widget_admin.js" usecdn="true" />
|
||||
<include target="header.html" />
|
||||
<load target="../../module/tpl/js/module_list.js" usecdn="true" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="insertConfig" action="./" method="post">
|
||||
|
||||
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" name="act" value="procIntegration_searchAdminInsertConfig" />
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="target_module_srl" id="target_module_srl" value="{$config->target_module_srl}" />
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<tr>
|
||||
<th scope="row">{$lang->sample_code}</th>
|
||||
<td >
|
||||
<textarea readonly="readonly" rows="8" cols="42">{$sample_code}</textarea>
|
||||
<p>{$lang->about_sample_code}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin}</th>
|
||||
<td>
|
||||
<select name="skin">
|
||||
<!--@foreach($skin_list as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if($config->skin==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="sample_code" class="x_control-label">{$lang->sample_code}</label>
|
||||
<div class="x_controls">
|
||||
<textarea id="sample_code" readonly style="width:900px;height:100px;cursor:text">{$sample_code}</textarea>
|
||||
<span class="x_help-block">{$lang->about_sample_code}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="skin" class="x_control-label">{$lang->skin}</label>
|
||||
<div class="x_controls">
|
||||
<select name="skin" id="skin">
|
||||
<option loop="$skin_list => $key, $val" value="{$key}" selected="selected"|cond="$config->skin == $key">{$val->title}</option>
|
||||
</select>
|
||||
<p>{$lang->about_skin}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->target}</th>
|
||||
<td>
|
||||
<span class="x_help-block">{$lang->about_skin}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->target}</label>
|
||||
<div class="x_controls">
|
||||
<select name="target">
|
||||
<option value="include">{$lang->include_search_target}</option>
|
||||
<option value="exclude" <!--@if($config->target=='exclude')-->selected="selected"<!--@end-->>{$lang->exclude_search_target}</option>
|
||||
<option value="exclude" selected="selected"|cond="$config->target=='exclude'">{$lang->exclude_search_target}</option>
|
||||
</select>
|
||||
|
||||
<select name="_target_module_srl" id="_target_module_srl" size="8" style="display:block;margin:10px 0;"></select>
|
||||
|
||||
<a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module_srl')}" onclick="popopen(this.href, 'ModuleSelect');return false;" class="button blue"><span>{$lang->cmd_insert}</span></a>
|
||||
<a href="#" onclick="midRemove('target_module_srl');return false;" class="button red"><span>{$lang->cmd_delete}</span></a>
|
||||
|
||||
<input type="hidden" name="target_module_srl" id="target_module_srl" value="{$config->target_module_srl}" />
|
||||
<select class="modulelist_selected" size="8" multiple="multiple" style="display:block;width:220px;vertical-align:top;margin:5px 0"></select>
|
||||
<a href="#" id="__module_srl_list_target_module_srl" class="x_btn moduleTrigger" data-multiple="true" style="margin:0 -5px 0 0;border-radius:2px 0 0 0px">{$lang->cmd_add}</a>
|
||||
<button type="button" class="x_btn modulelist_del" style="border-radius:0 2px 2px 0">{$lang->cmd_delete}</button>
|
||||
<script>
|
||||
jQuery( function() { getModuleSrlList('target_module_srl'); } );
|
||||
xe.registerApp(new xe.ModuleListManager('target_module_srl'));
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||
<button class="x_btn x_btn-primary x_btn-large" type="submit">{$lang->cmd_registration}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,137 +1,135 @@
|
|||
<!--#include("./header.html")-->
|
||||
<include target="header.html" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="x_alert x_alert-{$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<form action="{Context::getRequestUri()}" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="integration_search" />
|
||||
<input type="hidden" name="act" value="procIntegration_searchAdminInsertSkin" />
|
||||
<section class="section">
|
||||
<h1>{$lang->skin_default_info}</h1>
|
||||
|
||||
<h3 class="h3">{$lang->skin_default_info}</h3>
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin}</th>
|
||||
<td >{$skin_info->title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin_author}</th>
|
||||
<td>
|
||||
<!--@foreach($skin_info->author as $author)-->
|
||||
{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->homepage}</th>
|
||||
<td><a href="{$skin_info->homepage}" onclick="window.open(this.href);return false;">{$skin_info->homepage}</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->date}</th>
|
||||
<td>{zdate($skin_info->date, 'Y-m-d')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin_license}</th>
|
||||
<td>
|
||||
{nl2br(trim($skin_info->license))}
|
||||
<!--@if($skin_info->license_link)-->
|
||||
<p><a href="{$skin_info->license_link}" onclick="window.close(); return false;">{$skin_info->license_link}</a></p>
|
||||
<!--@end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->description}</th>
|
||||
<td>{nl2br($skin_info->description)}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h3 class="h3">{$lang->extra_vars}</h3>
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<tr valign="top">
|
||||
<th scope="row">{$lang->colorset}</th>
|
||||
<td>
|
||||
<!--@foreach($skin_info->colorset as $key => $val)-->
|
||||
<!--@if($val->screenshot)-->
|
||||
{@ $_img_info = getImageSize($val->screenshot); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; }
|
||||
<!--@else-->
|
||||
{@ $_width = 200; $_height = 20; $_talign = "left"; }
|
||||
<!--@end-->
|
||||
<div style="float:left;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
|
||||
<input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" <!--@if($module_info->colorset==$val->name)-->checked="checked"<!--@end-->/>
|
||||
<label for="colorset_{$key}">{$val->title}</label>
|
||||
<!--@if($val->screenshot)-->
|
||||
<br />
|
||||
<img src="{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
|
||||
<!--@end-->
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">
|
||||
{$lang->skin}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
{$skin_info->title}
|
||||
</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">
|
||||
{$lang->skin_author}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
<block loop="$skin_info->author=>$author">
|
||||
{$author->name}
|
||||
<block cond="$author->homepage || $author->email_address">
|
||||
(<a href="{$author->homepage}" target="_blank" cond="$author->homepage">{$author->homepage}</a>
|
||||
<block cond="$author->homepage && $author->email_address">, </block>
|
||||
<a href="mailto:{$author->email_address}" cond="$author->email_address">{$author->email_address}</a>)
|
||||
</block><br />
|
||||
</block>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$skin_info->homepage">
|
||||
<label class="x_control-label">{$lang->homepage}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
<a href="{$skin_info->homepage}" target="_blank">{$skin_info->homepage}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->date}
|
||||
</label>
|
||||
<div class="x_controls">{zdate($skin_info->date, 'Y-m-d')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$skin_info->license || $skin_info->license_link">
|
||||
<label class="x_control-label">{$lang->skin_license}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
{nl2br(trim($skin_info->license))}
|
||||
<p cond="$skin_info->license_link"><a href="{$skin_info->license_link}" target="_blank">{$skin_info->license_link}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$skin_info->description">
|
||||
<label class="x_control-label">{$lang->description}
|
||||
</label>
|
||||
<div class="x_controls">{nl2br(trim($skin_info->description))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!--@foreach($skin_info->extra_vars as $key => $val)-->
|
||||
|
||||
<!--@if($val->group && ((!$group) || $group != $val->group))-->
|
||||
{@$group = $val->group}
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<caption>{$group}</caption>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th scope="row">{$val->title}</th>
|
||||
<td >
|
||||
<!--@if($val->type=="text")-->
|
||||
<!--@if(!$val->value)-->{@ $val->value = $val->default}<!--@endif-->
|
||||
<input type="text" name="{$val->name}" value="{$val->value}" />
|
||||
|
||||
<!--@elseif($val->type=="textarea")-->
|
||||
<textarea name="{$val->name}" rows="8" cols="42">{$val->value}</textarea>
|
||||
|
||||
<!--@elseif($val->type=="select")-->
|
||||
<select name="{$val->name}">
|
||||
<!--@foreach($val->options as $k=>$v)-->
|
||||
<option value="{$v->value}" <!--@if($v->value == $val->value)-->selected="selected"<!--@end-->>{$v->title}</option>
|
||||
<section class="section">
|
||||
<h1>{$lang->extra_vars}</h1>
|
||||
<div class="x_control-group" cond="$skin_info->colorset" class="colorset">
|
||||
<label class="x_control-label">{$lang->colorset}</label>
|
||||
<div class="x_controls">
|
||||
<block loop="$skin_info->colorset => $key, $val">
|
||||
<!--@if($val->screenshot)-->
|
||||
{@ $_img_info = getImageSize($val->screenshot); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; }
|
||||
<!--@else-->
|
||||
{@ $_width = 200; $_height = 20; $_talign = "left"; }
|
||||
<!--@end-->
|
||||
</select>
|
||||
<div style="display:inline-block;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
|
||||
<label for="colorset_{$key}"><input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" checked="checked"|cond="$skin_vars->colorset==$val->name" />
|
||||
{$val->title}</label>
|
||||
<block cond="$val->screenshot">
|
||||
<br />
|
||||
<img src="../../../{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
|
||||
</block>
|
||||
</div>
|
||||
</block>
|
||||
</div>
|
||||
</div>
|
||||
<block loop="$skin_info->extra_vars => $key, $val">
|
||||
<block cond="$val->group && ((!$group) || $group != $val->group)">
|
||||
{@$group = $val->group}
|
||||
</section>
|
||||
<section class="section">
|
||||
<h1>{$group}</h1>
|
||||
</block>
|
||||
|
||||
<!--@elseif($val->type=="checkbox")-->
|
||||
<!--@foreach($val->default as $k=>$v)-->
|
||||
<span>
|
||||
<input type="checkbox" name="{$val->name}[]" value="{$v}" id="ch_{$key}_{$k}" <!--@if(in_array($v, $val->value))-->checked="checked"<!--@end--> class="checkbox" />
|
||||
<label for="ch_{$key}_{$k}">{$v}</label>
|
||||
</span>
|
||||
<!--@end-->
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="{$val->name}">{$val->title}</label>
|
||||
<div class="x_controls">
|
||||
<!--// text -->
|
||||
<input cond="$val->type == 'text'" type="text" name="{$val->name}" id="{$val->name}" value="{htmlspecialchars($val->value)}" class="lang_code" />
|
||||
|
||||
<!--@elseif($val->type=="radio")-->
|
||||
<!--@foreach($val->default as $k=>$v)-->
|
||||
<span>
|
||||
<input type="radio" name="{$val->name}" value="{$v}" id="ch_{$key}_{$k}" <!--@if($v==$val->value)-->checked="checked"<!--@end-->/>
|
||||
<label for="ch_{$key}_{$k}">{$v}</label>
|
||||
</span>
|
||||
<!--@end-->
|
||||
<!--// textarea -->
|
||||
<textarea cond="$val->type == 'textarea'" rows="8" cols="42" name="{$val->name}" id="{$val->name}" class="lang_code">{htmlspecialchars($val->value)}</textarea>
|
||||
|
||||
<!--@elseif($val->type=="image")-->
|
||||
<!--@if($val->value)-->
|
||||
<div>
|
||||
<img src="{$val->value}" /><br />
|
||||
<input type="checkbox" name="del_{$val->name}" value="Y" id="del_{$val->name}" class="checkbox" />
|
||||
<label for="del_{$val->name}">{$lang->cmd_delete}</label>
|
||||
<!--// select -->
|
||||
<select cond="$val->type == 'select'" name="{$val->name}" id="{$val->name}">
|
||||
<option loop="$val->options => $k, $v" value="{$v->value}" selected="selected"|cond="$v->value == $val->value">{$v->title}</option>
|
||||
</select>
|
||||
|
||||
<!--// checkbox -->
|
||||
<label cond="$val->type == 'checkbox'" loop="$val->options => $k, $v" for="ch_{$key}_{$k}" class="x_inline"><input type="checkbox" name="{$val->name}[]" value="{$v->value}" id="ch_{$key}_{$k}" checked="checked"|cond="@in_array($v->value, $val->value)" class="checkbox" /> {$v->title}</label>
|
||||
|
||||
<!--// radio -->
|
||||
<label cond="$val->type == 'radio'" for="ch_{$key}_{$k}" loop="$val->options => $k, $v" class="x_inline"><input type="radio" name="{$val->name}" value="{$v->value}" id="ch_{$key}_{$k}" checked="checked"|cond="$v->value==$val->value" /> {$v->title}</label>
|
||||
|
||||
<!--// image -->
|
||||
<block cond="$val->type == 'image'">
|
||||
<div cond="$val->value">
|
||||
<img src="{$val->value}" /><br />
|
||||
<label for="del_{$val->name}"><input type="checkbox" name="del_{$val->name}" value="Y" id="del_{$val->name}" class="checkbox" /> {$lang->cmd_delete}</label>
|
||||
</div>
|
||||
<input type="file" name="{$val->name}" value="" />
|
||||
</block>
|
||||
<span class="x_help-block" cond="$val->description">{nl2br(trim($val->description))}</span>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
</block>
|
||||
</section>
|
||||
|
||||
<input type="file" name="{$val->name}" value="" />
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($val->description)-->
|
||||
<p>{nl2br(trim($val->description))}</p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($group)-->
|
||||
</table>
|
||||
<!--@end-->
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button class="x_btn x_btn-primary" type="submit">{$lang->cmd_registration}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ xe.MidManager = xe.createApp("MidManager", {
|
|||
|
||||
init: function(key){
|
||||
var self = this;
|
||||
var $keyObj = this.$keyObj = $('.extra_vars input[name='+key+']');
|
||||
var $keyObj = this.$keyObj = $('input[name='+key+']');
|
||||
|
||||
$keyObj.parent().find('button.delete,a.delete').bind('click', function(){
|
||||
$keyObj.val('').next().val('');
|
||||
|
|
@ -8,7 +8,7 @@ xe.ModuleListManager = xe.createApp("ModuleListManager", {
|
|||
|
||||
init: function(key){
|
||||
var self = this;
|
||||
var $keyObj = this.$keyObj = $('.extra_vars input[name='+key+']');
|
||||
var $keyObj = this.$keyObj = $('input[name='+key+']');
|
||||
this.$moduleNameObj = $keyObj.parent().find('.moduleList');
|
||||
this.$moduleSrlObj = $keyObj.parent().find('.moduleIdList');
|
||||
this.$selectedObj = $keyObj.parent().find('.modulelist_selected');
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<input cond="$val->type == 'text'" type="text" name="{$val->name}" id="{$val->name}" value="{htmlspecialchars($val->value)}" class="lang_code" />
|
||||
|
||||
<!--// textarea -->
|
||||
<textarea cond="$val->type == 'textarea'" rows="8" cols="42" name="{$val->name}" id="{$val->name}" value="{htmlspecialchars($val->value)}" class="lang_code"></textarea>
|
||||
<textarea cond="$val->type == 'textarea'" rows="8" cols="42" name="{$val->name}" id="{$val->name}" class="lang_code">{htmlspecialchars($val->value)}</textarea>
|
||||
|
||||
<!--// select -->
|
||||
<select cond="$val->type == 'select'" name="{$val->name}" id="{$val->name}">
|
||||
|
|
|
|||
|
|
@ -1,75 +0,0 @@
|
|||
(function($){
|
||||
|
||||
xe.MultiOrderManager = xe.createApp("MultiOrderManager", {
|
||||
$keyObj: null,
|
||||
$showObj: null,
|
||||
$selectedObj: null,
|
||||
|
||||
init: function(key){
|
||||
var self = this;
|
||||
var $keyObj = this.$keyObj = jQuery('.extra_vars input[name='+key+']');
|
||||
this.$showObj = $keyObj.parent().find('.multiorder_show');
|
||||
this.$selectedObj = $keyObj.parent().find('.multiorder_selected');
|
||||
|
||||
this.$keyObj.parent()
|
||||
.find('button')
|
||||
.filter('.multiorder_add').bind('click', function(){ self.cast('MULTIORDER_ADD'); return false; }).end()
|
||||
.filter('.multiorder_del').bind('click', function(){ self.cast('MULTIORDER_DEL'); return false; }).end()
|
||||
.filter('.multiorder_up').bind('click', function(){ self.cast('MULTIORDER_UP'); return false; }).end()
|
||||
.filter('.multiorder_down').bind('click', function(){ self.cast('MULTIORDER_DOWN'); return false; }).end()
|
||||
|
||||
this.cast('MULTIORDER_SYNC');
|
||||
},
|
||||
|
||||
API_MULTIORDER_ADD: function(){
|
||||
this.$showObj
|
||||
.find('>option:selected')
|
||||
.appendTo(this.$selectedObj);
|
||||
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_DEL: function(){
|
||||
this.$selectedObj
|
||||
.find('>option:selected[default!="true"]')
|
||||
.appendTo(this.$showObj);
|
||||
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_UP: function(){
|
||||
var $selected = this.$selectedObj.find('>option:selected');
|
||||
$selected.eq(0).prev('option').before($selected);
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_DOWN: function(){
|
||||
var $selected = this.$selectedObj.find('>option:selected');
|
||||
$selected.eq(-1).next('option').after($selected);
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_MULTIORDER_SYNC: function(){
|
||||
var values = this.$keyObj.val().split(',');
|
||||
this.$selectedObj.find('>option').appendTo(this.$showObj);
|
||||
|
||||
var targets = [];
|
||||
for(var i in values){
|
||||
var target = this.$showObj.find('>option[value='+values[i]+']').get(0);
|
||||
if (target != undefined) targets.push(target);
|
||||
}
|
||||
$(targets).appendTo(this.$selectedObj);
|
||||
},
|
||||
|
||||
refreshValue : function() {
|
||||
var values = [];
|
||||
|
||||
this.$selectedObj.find('>option').each(function(){
|
||||
values.push(this.value);
|
||||
});
|
||||
|
||||
this.$keyObj.val(values.join(','));
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<load target="js/multi_order.js" usecdn="true" />
|
||||
<load target="js/module_list.js" usecdn="true" />
|
||||
<load target="js/mid.js" usecdn="true" />
|
||||
<load target="../../module/tpl/js/multi_order.js" usecdn="true" />
|
||||
<load target="../../module/tpl/js/module_list.js" usecdn="true" />
|
||||
<load target="../../module/tpl/js/mid.js" usecdn="true" />
|
||||
<!--%load_js_plugin("ui.colorpicker")-->
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="skin">{$lang->skin}</label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue