From 44bc56562fd65e93b97c7e11fe5c4db4b14fb6a3 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 18 Dec 2017 14:36:24 +0800 Subject: [PATCH] * finish task #3395. --- module/project/js/common.js | 13 ++++++++----- www/js/my.full.js | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/module/project/js/common.js b/module/project/js/common.js index a9d259dd8b..67ff3bd237 100644 --- a/module/project/js/common.js +++ b/module/project/js/common.js @@ -163,12 +163,15 @@ function loadBranch(){} /* Auto compute the work days. */ $(function() { - if(typeof(replaceID) != 'undefined') setModal4List('iframe', replaceID, function($list) + if(typeof(replaceID) != 'undefined') { - $list.find('.progress-pie:visible').progressPie(); - var datatable = $list.data('zui.datatable'); - if(datatable) datatable.$datatable.find('.progress-pie:visible').progressPie(); - }); + setModal4List('iframe', replaceID, function($list) + { + $list.find('.progress-pie:visible').progressPie(); + var datatable = $list.data('zui.datatable'); + if(datatable) datatable.$datatable.find('.progress-pie:visible').progressPie(); + }); + } $(".date").bind('dateSelected', function() { computeWorkDays(this.id); diff --git a/www/js/my.full.js b/www/js/my.full.js index 8d59b63e5e..31ed1f085d 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -1485,6 +1485,18 @@ function fixedTfootAction(formID) if(typeof(ssoRedirect) != "undefined") pageFooterHeight = 0; function fixTfoot() { + var $table = $form.find('table:last'); + var $tfoot = $table.find('tfoot'); + if($table.hasClass('table-datatable')) + { + $table = $form.find('.datatable-rows'); + $tfoot = $form.find('.datatable-footer tfoot'); + } + + $tbody = $table.find('tbody'), + $inputGroup = $tfoot.find('.table-actions').children('.input-group'), + pageFooterHeight = $('#footer').height(), + tableWidth = $table.width(); hasFixed = $tfoot.hasClass('fixedTfootAction'); offsetHeight = $(window).height() + $(window).scrollTop() - pageFooterHeight/2; @@ -1516,6 +1528,15 @@ function fixedTfootAction(formID) { // Fix table foot when scrolling. fixTfoot(); + + var $table = $form.find('table:last'); + var $tfoot = $table.find('tfoot'); + if($table.hasClass('table-datatable')) + { + $table = $form.find('.datatable-rows'); + $tfoot = $form.find('.datatable-footer tfoot'); + } + $tfoot.addClass('scrolling scrolled'); clearTimeout(scrollCallTask); scrollCallTask = setTimeout(function(){$tfoot.removeClass('scrolling');}, 200)