* fix setCheckedCookie not work dtable.

This commit is contained in:
sunhao
2023-08-31 13:47:14 +08:00
parent 8aec79c516
commit 5ecb4bc99e
2 changed files with 9 additions and 7 deletions
+9
View File
@@ -8,6 +8,15 @@ css::import($jsRoot . 'dtable/min.css');
.dtable-header .dtable-cell {font-weight: bold;}
</style>
<script>
/* set checked rows of main table in cookie */
var oldSetCheckedCookie = window.setCheckedCookie;
window.setCheckedCookie = function()
{
var dtable = $('#mainContent [data-zui-dtable]').data('zui.DTable');
if(!dtable) return oldSetCheckedCookie();
$.cookie('checkedItem', dtable.$.getChecks().join(','), {expires: config.cookieLife, path: config.webRoot});
};
function convertCols(cols)
{
cols.forEach(function(col)
-7
View File
@@ -174,13 +174,6 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN());
}
}
$(".export").modalTrigger({width:650, type:'iframe', shown: setCookie});
function setCookie()
{
$.cookie('checkedItem', checkItems.join(','), {expires: config.cookieLife, path: config.webRoot});
}
$('#dtable').dtable(options);
$('#batchEditBtn').click(function()