refactor: 移除 Longbow.common.js 中的 htmlTemplate 属性
This commit is contained in:
parent
9bc109e607
commit
2283bfc06f
|
@ -276,6 +276,8 @@ $(function () {
|
|||
url: 'api/Notifications'
|
||||
};
|
||||
|
||||
window.CheckboxHtmlTemplate = '<div class="form-group col-md-3 col-sm-4 col-6"><div class="form-check"><label class="form-check-label" title="{3}" data-toggle="tooltip"><input type="checkbox" class="form-check-input" value="{0}" {2}/><span>{1}</span></label></div></div>';
|
||||
|
||||
// load widget data
|
||||
$('.header .nav').reloadWidget().notifi({
|
||||
url: 'NotiHub',
|
||||
|
|
|
@ -18,7 +18,7 @@ $(function () {
|
|||
events: {
|
||||
'#btn_assignRole': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: Role.url, query: { type: "group" }, method: "post",
|
||||
id: row.Id, url: Role.url, query: { type: "group" }, method: "post", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
var htmlTemplate = this.htmlTemplate;
|
||||
var html = $.map(result, function (element, index) {
|
||||
|
@ -34,7 +34,7 @@ $(function () {
|
|||
},
|
||||
'#btn_assignUser': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: User.url, query: { type: "group" }, method: "post",
|
||||
id: row.Id, url: User.url, query: { type: "group" }, method: "post", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
var htmlTemplate = this.htmlTemplate;
|
||||
var html = $.map(result, function (element, index) {
|
||||
|
|
|
@ -42,7 +42,7 @@ $(function () {
|
|||
events: {
|
||||
'#btn_assignRole': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: Role.url, query: { type: "menu" }, method: "post",
|
||||
id: row.Id, url: Role.url, query: { type: "menu" }, method: "post", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
var htmlTemplate = this.htmlTemplate;
|
||||
var html = $.map(result, function (element, index) {
|
||||
|
|
|
@ -26,7 +26,7 @@ $(function () {
|
|||
events: {
|
||||
'#btn_assignUser': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: User.url, query: { type: "role" }, method: "post",
|
||||
id: row.Id, url: User.url, query: { type: "role" }, method: "post", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
var htmlTemplate = this.htmlTemplate;
|
||||
var html = $.map(result, function (element, index) {
|
||||
|
@ -42,7 +42,7 @@ $(function () {
|
|||
},
|
||||
'#btn_assignGroup': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: Group.url, query: { type: "role" }, method: "post",
|
||||
id: row.Id, url: Group.url, query: { type: "role" }, method: "post", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
var htmlTemplate = this.htmlTemplate;
|
||||
var html = $.map(result, function (element, index) {
|
||||
|
@ -58,7 +58,7 @@ $(function () {
|
|||
},
|
||||
'#btn_assignMenu': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: Menu.url, query: { type: "role" }, method: "post",
|
||||
id: row.Id, url: Menu.url, query: { type: "role" }, method: "post", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
$dialogMenuHeader.text($.format('{0}-菜单授权窗口', row.RoleName));
|
||||
$btnSubmitMenu.data('type', 'menu');
|
||||
|
@ -76,7 +76,7 @@ $(function () {
|
|||
},
|
||||
'#btn_assignApp': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: App.url, method: "get",
|
||||
id: row.Id, url: App.url, method: "get", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
var htmlTemplate = this.htmlTemplate;
|
||||
var html = $.map(result, function (element, index) {
|
||||
|
|
|
@ -23,7 +23,7 @@ $(function () {
|
|||
events: {
|
||||
'#btn_assignRole': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: Role.url, query: { type: "user" }, method: "post",
|
||||
id: row.Id, url: Role.url, query: { type: "user" }, method: "post", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
var htmlTemplate = this.htmlTemplate;
|
||||
var html = $.map(result, function (element, index) {
|
||||
|
@ -39,7 +39,7 @@ $(function () {
|
|||
},
|
||||
'#btn_assignGroup': function (row) {
|
||||
$.bc({
|
||||
id: row.Id, url: Group.url, query: { type: "user" }, method: "post",
|
||||
id: row.Id, url: Group.url, query: { type: "user" }, method: "post", htmlTemplate: CheckboxHtmlTemplate,
|
||||
callback: function (result) {
|
||||
var htmlTemplate = this.htmlTemplate;
|
||||
var html = $.map(result, function (element, index) {
|
||||
|
@ -96,7 +96,7 @@ $(function () {
|
|||
{ title: "说明", field: "Description", sortable: false }
|
||||
],
|
||||
editButtons: {
|
||||
events : {
|
||||
events: {
|
||||
'click .reset': function (e, value, row, index) {
|
||||
$table.bootstrapTable('uncheckAll');
|
||||
$table.bootstrapTable('check', index);
|
||||
|
|
|
@ -123,7 +123,6 @@
|
|||
id: "",
|
||||
url: "",
|
||||
data: {},
|
||||
htmlTemplate: '<div class="form-group col-md-3 col-sm-4 col-6"><div class="form-check"><label class="form-check-label" title="{3}" data-toggle="tooltip"><input type="checkbox" class="form-check-input" value="{0}" {2}/><span>{1}</span></label></div></div>',
|
||||
title: "",
|
||||
modal: false,
|
||||
loading: false,
|
||||
|
|
|
@ -123,7 +123,6 @@
|
|||
id: "",
|
||||
url: "",
|
||||
data: {},
|
||||
htmlTemplate: '<div class="form-group col-md-3 col-sm-4 col-6"><div class="form-check"><label class="form-check-label" title="{3}" data-toggle="tooltip"><input type="checkbox" class="form-check-input" value="{0}" {2}/><span>{1}</span></label></div></div>',
|
||||
title: "",
|
||||
modal: false,
|
||||
loading: false,
|
||||
|
|
Loading…
Reference in New Issue