|
@@ -6663,7 +6663,7 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], f
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
addtabs: function (url, title, icon) {
|
|
addtabs: function (url, title, icon) {
|
|
|
- var dom = ".sidebar-menu li a[url='{url}']"
|
|
|
|
|
|
|
+ var dom = "a[url='{url}']"
|
|
|
var leftlink = top.window.$(dom.replace(/\{url\}/, url));
|
|
var leftlink = top.window.$(dom.replace(/\{url\}/, url));
|
|
|
if (leftlink.size() > 0) {
|
|
if (leftlink.size() > 0) {
|
|
|
leftlink.trigger("click");
|
|
leftlink.trigger("click");
|
|
@@ -6690,7 +6690,7 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], f
|
|
|
var id = Math.floor(new Date().valueOf() * Math.random());
|
|
var id = Math.floor(new Date().valueOf() * Math.random());
|
|
|
icon = typeof icon != 'undefined' ? icon : 'fa fa-circle-o';
|
|
icon = typeof icon != 'undefined' ? icon : 'fa fa-circle-o';
|
|
|
title = typeof title != 'undefined' ? title : '';
|
|
title = typeof title != 'undefined' ? title : '';
|
|
|
- top.window.$("<a />").append('<i class="' + icon + '"></i> <span>' + title + '</span>').prop("href", url).attr({url: url, addtabs: id}).appendTo(top.window.document.body).trigger("click");
|
|
|
|
|
|
|
+ top.window.$("<a />").append('<i class="' + icon + '"></i> <span>' + title + '</span>').prop("href", url).attr({url: url, addtabs: id}).addClass("hide").appendTo(top.window.document.body).trigger("click");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -6764,6 +6764,9 @@ define('backend',['jquery', 'bootstrap', 'toastr', 'layer', 'lang', 'moment'], f
|
|
|
init: function () {
|
|
init: function () {
|
|
|
//公共代码
|
|
//公共代码
|
|
|
//配置Toastr的参数
|
|
//配置Toastr的参数
|
|
|
|
|
+ if (Config.controllername == 'index') {
|
|
|
|
|
+ Backend.config.toastr.positionClass = "toast-top-right-index";
|
|
|
|
|
+ }
|
|
|
Toastr.options = Backend.config.toastr;
|
|
Toastr.options = Backend.config.toastr;
|
|
|
//点击包含.btn-dialog的元素时弹出dialog
|
|
//点击包含.btn-dialog的元素时弹出dialog
|
|
|
$(document).on('click', '.btn-dialog,.dialogit', function (e) {
|
|
$(document).on('click', '.btn-dialog,.dialogit', function (e) {
|
|
@@ -10939,9 +10942,9 @@ define('form',['jquery', 'bootstrap', 'backend', 'toastr', 'upload', 'validator'
|
|
|
stopOnError: true,
|
|
stopOnError: true,
|
|
|
valid: function (ret) {
|
|
valid: function (ret) {
|
|
|
//验证通过提交表单
|
|
//验证通过提交表单
|
|
|
- Form.api.submit(form, onBeforeSubmit, function (data) {
|
|
|
|
|
|
|
+ Form.api.submit($(ret), onBeforeSubmit, function (data) {
|
|
|
if (typeof onAfterSubmit == 'function') {
|
|
if (typeof onAfterSubmit == 'function') {
|
|
|
- if (!onAfterSubmit.call(form, data)) {
|
|
|
|
|
|
|
+ if (!onAfterSubmit.call($(ret), data)) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -11102,7 +11105,7 @@ define('form',['jquery', 'bootstrap', 'backend', 'toastr', 'upload', 'validator'
|
|
|
$(document).on('click', ".fachoose", function () {
|
|
$(document).on('click', ".fachoose", function () {
|
|
|
var multiple = $(this).data("multiple") ? $(this).data("multiple") : false;
|
|
var multiple = $(this).data("multiple") ? $(this).data("multiple") : false;
|
|
|
var mimetype = $(this).data("mimetype") ? $(this).data("mimetype") : '';
|
|
var mimetype = $(this).data("mimetype") ? $(this).data("mimetype") : '';
|
|
|
- Backend.api.open("general/attachment/select?callback=refreshchoose&element_id=" + $(this).attr("id") + "&multiple=" + multiple + "&mimetype="+mimetype, __('Choose'));
|
|
|
|
|
|
|
+ Backend.api.open("general/attachment/select?callback=refreshchoose&element_id=" + $(this).attr("id") + "&multiple=" + multiple + "&mimetype=" + mimetype, __('Choose'));
|
|
|
return false;
|
|
return false;
|
|
|
});
|
|
});
|
|
|
|
|
|