后台表单提交方式
This commit is contained in:
@@ -211,15 +211,13 @@ class Config extends Base {
|
||||
*/
|
||||
public function themes(ConfigM $config) {
|
||||
$list = $config->getThemesList($this->request);
|
||||
$pc = config('config.pc_themes');
|
||||
$mobile = config('config.mobile_themes');
|
||||
$config = Cache::get('system_config_data');
|
||||
|
||||
$this->data = array(
|
||||
'pc' => $pc,
|
||||
'mobile' => $mobile,
|
||||
'pc' => isset($config['pc_themes']) ? $config['pc_themes'] : '',
|
||||
'mobile' => isset($config['mobile_themes']) ? $config['mobile_themes'] : '',
|
||||
'list' => $list,
|
||||
);
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,5 +3,22 @@
|
||||
@import url(../../plugins/adminlte/css/adminlte.min.css);
|
||||
@import url(../../plugins/adminlte/css/skins/_all-skins.min.css);
|
||||
|
||||
|
||||
.user-list tbody td>img {
|
||||
position:relative;
|
||||
max-width:50px;
|
||||
float:left;
|
||||
margin-right:15px;
|
||||
border-radius:18%;
|
||||
background-clip:padding-box;
|
||||
}
|
||||
.user-list tbody td .user-link {
|
||||
display:block;
|
||||
font-size:1.25em;
|
||||
padding-top:3px;
|
||||
margin-left:60px;
|
||||
}
|
||||
.user-list tbody td .user-subhead {
|
||||
font-size:0.875em;
|
||||
font-style:italic;
|
||||
}
|
||||
.tabs-wrapper .nav-tabs{margin-bottom: 15px;}
|
||||
@@ -170,18 +170,23 @@ define(['jquery', 'sent', 'adminlte'], function($, sent, AdminLTE){
|
||||
*/
|
||||
mySkins: ['skin-blue', 'skin-black', 'skin-red', 'skin-yellow', 'skin-purple', 'skin-green', 'skin-blue-light', 'skin-black-light', 'skin-red-light', 'skin-yellow-light', 'skin-purple-light', 'skin-green-light'],
|
||||
|
||||
change_layout: function(cls){
|
||||
$("body").toggleClass(cls);
|
||||
AdminLTE.layout.fixSidebar();
|
||||
//Fix the problem with right sidebar and layout boxed
|
||||
if (cls == "layout-boxed")
|
||||
AdminLTE.controlSidebar._fix($(".control-sidebar-bg"));
|
||||
if ($('body').hasClass('fixed') && cls == 'fixed') {
|
||||
change_layout: function(){
|
||||
layout = sent.store.get({name: 'layout'}) || [{name: 'fixed', value: false}, {name: 'layout-boxed', value: false}, {name: 'sidebar-collapse', value: false}];
|
||||
if (typeof(layout) == 'string'){ return false; }
|
||||
for (i in layout) {
|
||||
var item = layout[i];
|
||||
if (item.value) {
|
||||
$("[data-layout='"+item.name+"']").attr('checked', 'checked');
|
||||
$("body").hasClass(item.name) || $("body").addClass(item.name);
|
||||
if ($('body').hasClass('fixed') && item.name == 'fixed') {
|
||||
AdminLTE.pushMenu.expandOnHover();
|
||||
AdminLTE.layout.activate();
|
||||
}
|
||||
AdminLTE.controlSidebar._fix($(".control-sidebar-bg"));
|
||||
AdminLTE.controlSidebar._fix($(".control-sidebar"));
|
||||
}else{
|
||||
$("body").removeClass(item.name);
|
||||
}
|
||||
}
|
||||
AdminLTE.layout.fixSidebar();
|
||||
},
|
||||
change_skin: function(cls){
|
||||
$.each(backend.mySkins, function (i) {
|
||||
@@ -193,9 +198,9 @@ define(['jquery', 'sent', 'adminlte'], function($, sent, AdminLTE){
|
||||
return false
|
||||
},
|
||||
init: function(){
|
||||
var tmp = sent.store.get({name:'skin'});
|
||||
if (tmp && $.inArray(tmp, backend.my_skins))
|
||||
backend.change_skin(tmp);
|
||||
var skin = sent.store.get({name:'skin'});
|
||||
if (skin && $.inArray(skin, backend.my_skins))
|
||||
backend.change_skin(skin);
|
||||
|
||||
//Add the change skin listener
|
||||
$("[data-skin]").on('click', function (e) {
|
||||
@@ -205,17 +210,15 @@ define(['jquery', 'sent', 'adminlte'], function($, sent, AdminLTE){
|
||||
backend.change_skin($(this).data('skin'));
|
||||
});
|
||||
|
||||
backend.change_layout();
|
||||
//Add the layout manager
|
||||
$("[data-layout]").on('click', function () {
|
||||
backend.change_layout($(this).data('layout'));
|
||||
});
|
||||
|
||||
$("[data-controlsidebar]").on('click', function () {
|
||||
backend.change_layout($(this).data('controlsidebar'));
|
||||
var slide = !AdminLTE.options.controlSidebarOptions.slide;
|
||||
AdminLTE.options.controlSidebarOptions.slide = slide;
|
||||
if (!slide)
|
||||
$('.control-sidebar').removeClass('control-sidebar-open');
|
||||
var layout = [];
|
||||
$("[data-layout]").each(function(i, item){
|
||||
layout.push({name:$(item).data('layout'), value: $(item).is(':checked')})
|
||||
})
|
||||
sent.store.set({name:'layout', content: layout});
|
||||
backend.change_layout();
|
||||
});
|
||||
|
||||
$("[data-sidebarskin='toggle']").on('click', function () {
|
||||
@@ -236,17 +239,6 @@ define(['jquery', 'sent', 'adminlte'], function($, sent, AdminLTE){
|
||||
$("[data-layout='sidebar-collapse']").click();
|
||||
});
|
||||
|
||||
// Reset options
|
||||
if ($('body').hasClass('fixed')) {
|
||||
$("[data-layout='fixed']").attr('checked', 'checked');
|
||||
}
|
||||
if ($('body').hasClass('layout-boxed')) {
|
||||
$("[data-layout='layout-boxed']").attr('checked', 'checked');
|
||||
}
|
||||
if ($('body').hasClass('sidebar-collapse')) {
|
||||
$("[data-layout='sidebar-collapse']").attr('checked', 'checked');
|
||||
}
|
||||
|
||||
if ($('.editable').size() > 0) {
|
||||
require(['bootstrap-editable'], function(){
|
||||
$.fn.editable.defaults.mode = 'popup';
|
||||
|
||||
@@ -38,13 +38,13 @@ define(['jquery', 'bootstrap', 'validator'], function ($, undefined, Validator)
|
||||
return $msgbox;
|
||||
},
|
||||
valid: function (ret) {
|
||||
var that = this, submitBtn = $(".layer-footer [type=submit]", form);
|
||||
var that = this, submitBtn = $("button.btn[type=submit]", form);
|
||||
that.holdSubmit(true);
|
||||
submitBtn.addClass("disabled");
|
||||
submitBtn.addClass("disabled").attr('disabled', 'disabled');
|
||||
//验证通过提交表单
|
||||
var submitResult = Form.api.submit($(ret), function (data, ret) {
|
||||
that.holdSubmit(false);
|
||||
submitBtn.removeClass("disabled");
|
||||
// submitBtn.removeClass("disabled");
|
||||
if (false === $(this).triggerHandler("success.form", [data, ret])) {
|
||||
return false;
|
||||
}
|
||||
@@ -56,6 +56,11 @@ define(['jquery', 'bootstrap', 'validator'], function ($, undefined, Validator)
|
||||
//提示及关闭当前窗口
|
||||
var msg = ret.hasOwnProperty("msg") && ret.msg !== "" ? ret.msg : __('Operation completed');
|
||||
sent.msg(msg, 'success');
|
||||
if (ret.url !== '') {
|
||||
setTimeout(function(){
|
||||
window.location.href = ret.url;
|
||||
}, 3000);
|
||||
}
|
||||
parent.$(".btn-refresh").trigger("click");
|
||||
return false;
|
||||
}, function (data, ret) {
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
define(['jquery', 'layer', 'form', 'message'], function($, layer, form) {
|
||||
define(['jquery', 'layer', 'message'], function($, layer) {
|
||||
var sent = {
|
||||
config: {
|
||||
keyName: 'sent_'
|
||||
},
|
||||
init: function(){
|
||||
if ($("form[role=form]").length > 0) {
|
||||
require(['form'], function(form){
|
||||
form.api.bindevent($("form[role=form]"));
|
||||
})
|
||||
}
|
||||
},
|
||||
msg: function(text, type){
|
||||
if (typeof type != 'undefined') {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">插件名</label>
|
||||
<div class="col-lg-8 col-sm-10">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<h3 class="box-title">{$meta_title}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导航标题</label>
|
||||
<div class="col-lg-6">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form action="{:url($type)}" method="post" class="form form-horizontal">
|
||||
<form action="{:url($type)}" method="post" class="form form-horizontal" role="form">
|
||||
<div id="tab1" class="tab-pane in tab1">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">目标分类</label>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导航标题</label>
|
||||
<div class="col-lg-6">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-2">
|
||||
<select value="" size="8" class="form-control">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">客户端名称</label>
|
||||
<div class="col-md-10">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<h3 class="box-title">{$meta_title}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">配置标识</label>
|
||||
<div class="col-sm-8">
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
</select>
|
||||
{/case}
|
||||
{case value="bool"}
|
||||
<input id="c-switch" name="config[{$item['name']}]" type="hidden" value="0">
|
||||
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0" >
|
||||
<i class="fa fa-toggle-on text-success {eq name="item['value']" value="$key"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
|
||||
<input id="switch_{$item['name']}" name="config[{$item['name']}]" type="hidden" value="0">
|
||||
<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="switch_{$item['name']}" data-yes="1" data-no="0" >
|
||||
<i class="fa fa-toggle-on text-success {eq name="item['value']" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
|
||||
</a>
|
||||
{/case}
|
||||
{case value="image"}
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{:url('/admin/group/addnode',array('type'=>$type))}" class="btn btn-danger">
|
||||
<a href="{:url('/admin/group/addnode',array('type'=>$type))}" class="btn btn-sm btn-danger">
|
||||
<i class="fa fa-plus"></i>
|
||||
添加节点
|
||||
</a>
|
||||
<a href="{:url('/admin/group/upnode',array('type'=>$type))}" class="btn btn-danger ajax-get">
|
||||
<a href="{:url('/admin/group/upnode',array('type'=>$type))}" class="btn btn-sm btn-danger ajax-get">
|
||||
<i class="fa fa-plus"></i>
|
||||
更新节点
|
||||
</a>
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{:url('Group/index')}" class="btn btn-danger">
|
||||
<i class="glyphicon glyphicon-menu-left"></i>
|
||||
返回
|
||||
<a href="{:url('/admin/group/index')}" class="btn btn-sm btn-danger">
|
||||
<i class="glyphicon glyphicon-menu-left"></i> 返回
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive clearfix">
|
||||
<form action="" class="form" method="post">
|
||||
<form class="form" method="post" role="form">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{:url('/admin/group/add',array('type'=>$type))}" class="btn btn-danger"><i class="fa fa-plus"></i> 添加用户组</a>
|
||||
<a href="{:url('/admin/group/add',array('type'=>$type))}" class="btn btn-sm btn-danger"><i class="fa fa-plus"></i> 添加用户组</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="pull-right"></div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标题</label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form id="form" action="{:url('/admin/menu/import')}" method="post" class="form form-horizontal">
|
||||
<form id="form" action="{:url('/admin/menu/import')}" method="post" class="form form-horizontal" role="form">
|
||||
<!-- 基础文档模型 -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">导入的内容</label>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form action="{:url('sort')}" method="post" class="form form-horizontal">
|
||||
<form action="{:url('sort')}" method="post" class="form form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-2">
|
||||
<select value="" size="8" class="form-control">
|
||||
|
||||
@@ -135,8 +135,8 @@
|
||||
{/volist}
|
||||
{/if}
|
||||
<li class="header">相关连接</li>
|
||||
<li><a href="http://doc.tensent.cn" target="_blank"><i class="fa fa-file-text text-red"></i> <span>开发文档</span></a></li>
|
||||
<li><a href="https://www.tensent.cn" target="_blank"><i class="fa fa-globe text-yellow"></i> <span>官方网站</span></a></li>
|
||||
<li><a href="https://www.kancloud.cn/tensent/sentcms4/content" target="_blank"><i class="fa fa-file-text text-red"></i> <span>开发文档</span></a></li>
|
||||
<li><a href="https://www.tensent.cn/" target="_blank"><i class="fa fa-globe text-yellow"></i> <span>官方网站</span></a></li>
|
||||
<li><a href="https://jq.qq.com/?_wv=1027&k=5v72Y0v" target="_blank"><i class="fa fa-qq text-aqua"></i> <span>开发交流群</span></a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<form method="post" class="form form-horizontal" role="form">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user