插件管理页面优化

This commit is contained in:
Devil 2021-01-05 19:01:41 +08:00
parent 7f287188a2
commit e1fc7acd3b
2 changed files with 13 additions and 2 deletions

View File

@ -46,9 +46,9 @@
<a href="{{:MyUrl('admin/pluginsadmin/download', array('id'=>$v['plugins']))}}" class="am-btn am-btn-default am-btn-xs am-radius am-icon-download" title="打包"></a>
{{/if}}
<a href="{{:PluginsAdminUrl($v['plugins'], 'admin', 'index')}}" class="am-btn am-btn-default am-btn-xs am-radius am-icon-gear" title="设置"></a>
<a href="javascript:;" data-set-url="{{:PluginsAdminUrl($v['plugins'], 'admin', 'index')}}" class="am-btn am-btn-default am-btn-xs am-radius am-icon-gear plugins-set-event" title="设置"></a>
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-circle-o submit-ajax" data-url="{{:MyUrl('admin/pluginsadmin/uninstall')}}" data-id="{{$v.plugins}}" data-view="reload" data-msg="卸载可能丢失插件基础数据不可恢复、确认操作吗?" title="卸载"></button>
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-circle-o submit-ajax" data-url="{{:MyUrl('admin/pluginsadmin/uninstall')}}" data-id="{{$v.plugins}}" data-view="reload" data-msg="卸载可能丢失插件基础配置数据不可恢复、确认操作吗?" title="卸载"></button>
<a href="javascript:;" class="am-icon-btn am-icon-check submit-state {{if $v['is_enable'] eq 1}}am-success{{else /}}am-default{{/if}}" data-url="{{:MyUrl('admin/pluginsadmin/statusupdate')}}" data-id="{{$v.plugins}}" data-state="{{$v['is_enable']}}" data-is-update-status="1" title="状态"></a>

View File

@ -8,6 +8,17 @@ $(function()
$modal.modal('open');
});
// 插件设置事件
$('.plugins-set-event').on('click', function()
{
if($(this).parents('.am-gallery-item').hasClass('am-active'))
{
Prompt('请先点击勾勾启用');
} else {
window.location.href = $(this).data('set-url');
}
});
// 拖拽
$('.content ul.am-gallery-bordered').dragsort({ dragSelector: 'button.submit-move', placeHolderTemplate: '<li><div class="am-gallery-item drag-sort-dotted"></div></li>'});