mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 15:19:57 +09:00
Issue 2041: Module search UI in widget configuration page modified for easier use
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.1@10922 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
804f42a8e1
commit
216d72919d
4 changed files with 53 additions and 43 deletions
|
|
@ -13,7 +13,7 @@ xe.ModuleListManager = xe.createApp("ModuleListManager", {
|
|||
this.$moduleSrlObj = $keyObj.parent().find('.moduleIdList');
|
||||
this.$selectedObj = $keyObj.parent().find('.modulelist_selected');
|
||||
|
||||
this.$moduleSrlObj
|
||||
this.$selectedObj
|
||||
.nextAll('button')
|
||||
.filter('.modulelist_add').bind('click', function(){ self.cast('MODULELIST_ADD'); return false; }).hide().end()
|
||||
.filter('.modulelist_del').bind('click', function(){ self.cast('MODULELIST_DEL'); return false; }).end()
|
||||
|
|
@ -27,18 +27,25 @@ xe.ModuleListManager = xe.createApp("ModuleListManager", {
|
|||
this.cast('MODULELIST_SYNC');
|
||||
},
|
||||
|
||||
API_MODULELIST_ADD: function(){
|
||||
var moduleTitle = this.$moduleNameObj.find('>option:selected').text();
|
||||
|
||||
this.$moduleSrlObj
|
||||
.find('>option:selected').clone(true)
|
||||
.text(function(){ return $(this).text() + ' ('+moduleTitle+')'; })
|
||||
.appendTo(this.$selectedObj);
|
||||
addModule: function(sModuleType, sModuleInstanceName, sModuleSrl){
|
||||
$('<OPTION>').val(sModuleSrl).text(sModuleInstanceName + ' ('+sModuleType+')').appendTo(this.$selectedObj);
|
||||
|
||||
this.removeDuplicated();
|
||||
this.refreshValue();
|
||||
},
|
||||
|
||||
API_ADD_MODULE_TO_MODULELIST_MANAGER : function(sender, aParams){
|
||||
this.addModule(aParams[0], aParams[1], aParams[2]);
|
||||
},
|
||||
|
||||
API_MODULELIST_ADD: function(){
|
||||
var sModuleType = this.$moduleNameObj.find('>option:selected').text();
|
||||
var sModuleInstanceName = this.$moduleSrlObj.find('>option:selected').text();
|
||||
var sModuleSrl = this.$moduleSrlObj.find('>option:selected').val();
|
||||
|
||||
this.addModule(sModuleType, sModuleInstanceName, sModuleSrl);
|
||||
},
|
||||
|
||||
API_MODULELIST_DEL: function(){
|
||||
this.$selectedObj.find('>option:selected').remove();
|
||||
this.refreshValue();
|
||||
|
|
@ -93,4 +100,4 @@ xe.ModuleListManager = xe.createApp("ModuleListManager", {
|
|||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
|
|
|||
|
|
@ -100,28 +100,27 @@
|
|||
</block>
|
||||
</block>
|
||||
<block cond="$var->type == 'module_srl_list'">
|
||||
<p class="desc">{$var->description}</p>
|
||||
<input type="hidden" name="{$id}" value="" />
|
||||
<div class="a">
|
||||
<input type="text" /> <a href="#suggestion_{$suggestion_id}" class="tgAnchor findsite">{$lang->find_site}</a>
|
||||
<div id="suggestion_{$suggestion_id}" class="tgContent suggestion">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="a">
|
||||
<select class="moduleList" style="width:290px"></select>
|
||||
</p>
|
||||
<select class="moduleIdList" size="8" multiple="multiple" style="width:290px;vertical-align:top"></select>
|
||||
<button type="button" class="text modulelist_add" style="vertical-align:top">{$lang->cmd_insert}</button>
|
||||
<select class="modulelist_selected" size="8" multiple="multiple" style="width:290px;"></select>
|
||||
<br/>
|
||||
<a href="#moduleSearchWindow" class="tgAnchor moduleSearch" style="vertical-align: top">{$lang->cmd_add}</a>.
|
||||
<button type="button" class="text modulelist_up" style="vertical-align:top">{$lang->cmd_move_up}</button>
|
||||
<button type="button" class="text modulelist_down" style="vertical-align:top">{$lang->cmd_move_down}</button>
|
||||
<button type="button" class="text modulelist_del" style="vertical-align:top">{$lang->cmd_delete}</button>
|
||||
<script type="text/javascript">
|
||||
xe.registerApp(new xe.ModuleListManager('{$id}'));
|
||||
</script>
|
||||
<!--
|
||||
<a href="#moduleSearchWindow" class="tgAnchor moduleSearch">{$lang->cmd_find}</a>.
|
||||
|
||||
<script>
|
||||
jQuery(function($){
|
||||
xe.ModuleSearch.onModuleSelect = function(sType, sName, sSrl){
|
||||
xe.broadcast("ADD_MODULE_TO_MODULELIST_MANAGER", [sType, sName, sSrl]);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- new module search -->
|
||||
<div id="moduleSearchWindow" class="tgContent">
|
||||
<div class="siteList sectionDiv">
|
||||
<h2>{$lang->select_site}</h2>
|
||||
|
|
@ -151,7 +150,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<!--// new module search -->
|
||||
</block>
|
||||
<block cond="$var->type == 'mid'">
|
||||
<input type="hidden" name="{$id}" value="" />
|
||||
|
|
@ -181,7 +180,6 @@
|
|||
<option loop="$menu_list => $key, $val" value="{$val->menu_srl}">{$val->title}</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="desc">{$var->description}</p>
|
||||
</li>
|
||||
</block>
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue