mirror of https://gitee.com/karson/fastadmin.git
parent
2fecaeae0b
commit
b9d55fca25
|
|
@ -79,7 +79,7 @@
|
|||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
{:build_toolbar('refresh')}
|
||||
<button type="button" id="faupload-addon" class="btn btn-danger faupload" data-url="addon/local" data-mimetype="zip" data-multiple="false"><i class="fa fa-upload"></i>
|
||||
<button type="button" id="faupload-addon" class="btn btn-danger faupload" data-url="addon/local" data-chunking="false" data-mimetype="zip" data-multiple="false"><i class="fa fa-upload"></i>
|
||||
{:__('Offline install')}
|
||||
</button>
|
||||
{if $Think.config.fastadmin.api_url}
|
||||
|
|
|
|||
|
|
@ -42,13 +42,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'], function (
|
|||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
escape: false,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true,},
|
||||
{field: 'id', title: 'ID'},
|
||||
{field: 'pid', title: __('Parent')},
|
||||
{field: 'name', title: __('Name'), align: 'left'},
|
||||
{field: 'name', title: __('Name'), align: 'left', formatter:function (value, row, index) {
|
||||
return value.toString().replace(/(&|&)nbsp;/g, '');
|
||||
}
|
||||
},
|
||||
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status},
|
||||
{
|
||||
field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: function (value, row, index) {
|
||||
|
|
@ -155,4 +157,4 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'], function (
|
|||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -59,8 +59,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
|
|||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
|
||||
//表格内容渲染前
|
||||
table.on('pre-body.bs.table', function (e, data) {
|
||||
var options = table.bootstrapTable("getOptions");
|
||||
options.escape = true;
|
||||
});
|
||||
//当内容渲染完成后
|
||||
table.on('post-body.bs.table', function (e, settings, json, xhr) {
|
||||
table.on('post-body.bs.table', function (e, data) {
|
||||
var options = table.bootstrapTable("getOptions");
|
||||
options.escape = false;
|
||||
//默认隐藏所有子节点
|
||||
//$("a.btn[data-id][data-pid][data-pid!=0]").closest("tr").hide();
|
||||
$(".btn-node-sub.disabled").closest("tr").hide();
|
||||
|
|
@ -114,6 +121,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
|
|||
api: {
|
||||
formatter: {
|
||||
title: function (value, row, index) {
|
||||
value = value.toString().replace(/(&|&)nbsp;/g, '');
|
||||
return !row.ismenu || row.status == 'hidden' ? "<span class='text-muted'>" + value + "</span>" : value;
|
||||
},
|
||||
name: function (value, row, index) {
|
||||
|
|
@ -173,4 +181,4 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
|
|||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
var table = $("#table");
|
||||
var tableOptions = {
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
escape: false,
|
||||
pk: 'id',
|
||||
sortName: 'weigh',
|
||||
pagination: false,
|
||||
|
|
@ -29,7 +28,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'type', title: __('Type'), operate: false, searchList: Config.searchList, formatter: Table.api.formatter.label},
|
||||
{field: 'name', title: __('Name'), align: 'left'},
|
||||
{field: 'name', title: __('Name'), align: 'left', formatter:function (value, row, index) {
|
||||
return value.toString().replace(/(&|&)nbsp;/g, '');
|
||||
}
|
||||
},
|
||||
{field: 'nickname', title: __('Nickname')},
|
||||
{field: 'flag', title: __('Flag'), formatter: Table.api.formatter.flag},
|
||||
{field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||
|
|
@ -88,4 +90,4 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -21,13 +21,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'weigh',
|
||||
escape: false,
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'pid', title: __('Pid'), visible: false},
|
||||
{field: 'title', title: __('Title'), align: 'left'},
|
||||
{field: 'title', title: __('Title'), align: 'left', formatter:function (value, row, index) {
|
||||
return value.toString().replace(/(&|&)nbsp;/g, '');
|
||||
}
|
||||
},
|
||||
{field: 'name', title: __('Name'), align: 'left'},
|
||||
{field: 'remark', title: __('Remark')},
|
||||
{field: 'ismenu', title: __('Ismenu'), formatter: Table.api.formatter.toggle},
|
||||
|
|
@ -64,4 +66,4 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7411,8 +7411,7 @@ define('upload',['jquery', 'bootstrap', 'dropzone', 'template'], function ($, un
|
|||
//上传URL
|
||||
url = url ? url : Config.upload.uploadurl;
|
||||
url = Fast.api.fixurl(url);
|
||||
var chunking = Config.upload.chunking || false,
|
||||
chunkSize = Config.upload.chunksize || 2097152;
|
||||
var chunking = false, chunkSize = Config.upload.chunksize || 2097152;
|
||||
|
||||
//最大可上传文件大小
|
||||
maxsize = typeof maxsize !== "undefined" ? maxsize : Config.upload.maxsize;
|
||||
|
|
|
|||
|
|
@ -141,8 +141,7 @@ define(['jquery', 'bootstrap', 'dropzone', 'template'], function ($, undefined,
|
|||
//上传URL
|
||||
url = url ? url : Config.upload.uploadurl;
|
||||
url = Fast.api.fixurl(url);
|
||||
var chunking = Config.upload.chunking || false,
|
||||
chunkSize = Config.upload.chunksize || 2097152;
|
||||
var chunking = false, chunkSize = Config.upload.chunksize || 2097152;
|
||||
|
||||
//最大可上传文件大小
|
||||
maxsize = typeof maxsize !== "undefined" ? maxsize : Config.upload.maxsize;
|
||||
|
|
|
|||
Loading…
Reference in New Issue