|
@@ -188,12 +188,14 @@ require(['jquery', 'bootstrap'], function ($, undefined) {
|
|
|
}
|
|
|
});
|
|
|
//加载相应模块
|
|
|
- require([Config.jsname], function (Controller) {
|
|
|
- Controller[Config.actionname] != undefined && Controller[Config.actionname]();
|
|
|
- }, function (e) {
|
|
|
- console.error(e);
|
|
|
- // 这里可捕获模块加载的错误
|
|
|
- });
|
|
|
+ if (Config.jsname) {
|
|
|
+ require([Config.jsname], function (Controller) {
|
|
|
+ Controller[Config.actionname] != undefined && Controller[Config.actionname]();
|
|
|
+ }, function (e) {
|
|
|
+ console.error(e);
|
|
|
+ // 这里可捕获模块加载的错误
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
});
|
|
@@ -7480,10 +7482,13 @@ return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)
|
|
|
});
|
|
|
|
|
|
that.$container.on("click", "." + that.options.searchClass, function () {
|
|
|
- $("form [name='" + $(this).data("field") + "']", searchContainer).val($(this).data("value"));
|
|
|
- $("form", searchContainer).trigger("submit");
|
|
|
+ var obj = $("form [name='" + $(this).data("field") + "']", searchContainer);
|
|
|
+ if (obj.size() > 0) {
|
|
|
+ obj.val($(this).data("value"));
|
|
|
+ $("form", searchContainer).trigger("submit");
|
|
|
+ }
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
var searchquery = getSearchQuery(this);
|
|
|
this.options.queryParams = function (params) {
|
|
|
return {
|
|
@@ -10940,6 +10945,17 @@ define('form',['jquery', 'bootstrap', 'backend', 'toastr', 'upload', 'validator'
|
|
|
formClass: 'n-default n-bootstrap',
|
|
|
msgClass: 'n-right',
|
|
|
stopOnError: true,
|
|
|
+ display: function (elem) {
|
|
|
+ return $(elem).closest('.form-group').find(".control-label").text().replace(/\:/, '');
|
|
|
+ },
|
|
|
+ target: function (input) {
|
|
|
+ var $formitem = $(input).closest('.form-group'),
|
|
|
+ $msgbox = $formitem.find('span.msg-box');
|
|
|
+ if (!$msgbox.length) {
|
|
|
+ $msgbox = $('<span class="msg-box"></span>').insertAfter(input);
|
|
|
+ }
|
|
|
+ return $msgbox;
|
|
|
+ },
|
|
|
valid: function (ret) {
|
|
|
//验证通过提交表单
|
|
|
Form.api.submit($(ret), onBeforeSubmit, function (data) {
|
|
@@ -11198,7 +11214,8 @@ $.fn.addtabs = function (options) {
|
|
|
|
|
|
document.title = title;
|
|
|
if (history.pushState && !$(this).data("pushstate")) {
|
|
|
- window.history.pushState(state, title, url);
|
|
|
+ var pushurl = url.indexOf("ref=addtabs") == -1 ? (url + (url.indexOf("?") > -1 ? "&" : "?") + "ref=addtabs") : url;
|
|
|
+ window.history.pushState(state, title, pushurl);
|
|
|
}
|
|
|
$(this).data("pushstate", null);
|
|
|
_add({
|