mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-23 10:55:34 +08:00
64 lines
2.0 KiB
HTML
64 lines
2.0 KiB
HTML
<!--
|
||
Copyright 2012-2026 ShopeX (https://www.shopex.cn)
|
||
|
||
Licensed under the Apache License, Version 2.0 (the "License");
|
||
you may not use this file except in compliance with the License.
|
||
You may obtain a copy of the License at
|
||
|
||
http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
Unless required by applicable law or agreed to in writing, software
|
||
distributed under the License is distributed on an "AS IS" BASIS,
|
||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
See the License for the specific language governing permissions and
|
||
limitations under the License.
|
||
-->
|
||
|
||
<{area inject=".mainHead"}>
|
||
↓ 拖动可以改变顺序
|
||
<{/area}>
|
||
|
||
<form action="index.php?app=desktop&ctl=default&act=set_main_menu" method="post" id="set_main_menu_form">
|
||
<div class="grildlist" id="main_menu_list">
|
||
<{foreach from=$menus.workground key=key item=item}>
|
||
<div class="row">
|
||
<div class="row-line">
|
||
<{img src="bundle/grippy.gif" class=" move-handler"}><input type="checkbox" name="workgrounds[]" value="<{$key}>" <{if $key|in_array:$fav_menus}>checked<{/if}>/>
|
||
<{$item.menu_title}>
|
||
</div>
|
||
</div>
|
||
<{/foreach}>
|
||
</div>
|
||
</div>
|
||
<{area inject=".mainFoot"}>
|
||
<div class="table-action">
|
||
<{button type="button" id="set_main_menu_btn" label=$___b2c="保存"|t:'desktop' app="desktop" class="btn-primary"}>
|
||
</div>
|
||
<{/area}>
|
||
<script>
|
||
|
||
(function(){
|
||
new Sortables($('main_menu_list'),{clone:true,opacity:.7,handle:'.move-handler',onStart:function(){
|
||
|
||
$('main_menu_list').addClass('move-active');
|
||
|
||
},onComplete:function(){
|
||
|
||
$('main_menu_list').removeClass('move-active');
|
||
|
||
}});
|
||
})();
|
||
|
||
$('set_main_menu_form').store('target',{onComplete:function(re){
|
||
if(confirm("<{t}>保存成功!\n是否刷新?<{/t}>"))
|
||
location.reload();
|
||
|
||
}});
|
||
|
||
|
||
$('set_main_menu_btn').addEvent('click',function(e) {
|
||
|
||
$('set_main_menu_form').fireEvent('submit',{stop:$empty});
|
||
|
||
});
|
||
</script> |