diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js index 807e065633..b2d4546ab7 100644 --- a/module/bug/js/browse.js +++ b/module/bug/js/browse.js @@ -19,4 +19,5 @@ $(document).ready(function() $option.toggleClass('hide', $option.text().toString().toLowerCase().indexOf(val) < 0 && $option.data('key').toString().toLowerCase().indexOf(val) < 0); }); }); + setTimeout(function(){fixedTfootAction('#bugForm')}, 100); }); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index a14c594998..61ffd33733 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -80,7 +80,7 @@ js::set('moduleID', $moduleID);
-
+ recTotal}&recPerPage={$pager->recPerPage}"; ?> diff --git a/module/build/js/view.js b/module/build/js/view.js index 8e867ed509..cfabbe6d27 100644 --- a/module/build/js/view.js +++ b/module/build/js/view.js @@ -8,10 +8,20 @@ function showLink(buildID, type, param) $('#' + type + 'List').hide(); var formID = type == 'story' ? '#unlinkedStoriesForm' : '#unlinkedBugsForm'; - fixTfootAction(formID); + setTimeout(function(){fixedTfootAction(formID)}, 100); }); } $(function() { if(link == 'true') showLink(buildID, type, param); + fixedTfootAction($('#' + type + 'List').closest('form')); + $('.nav.nav-tabs a[data-toggle="tab"]').on('shown.zui.tab', function(e) + { + var href = $(e.target).attr('href'); + var tabPane = $(href + '.tab-pane'); + if(tabPane.size() == 0) return; + var formID = tabPane.find('linkBox').find('form:last'); + if(formID.size() == 0) formID = tabPane.find('form:last'); + setTimeout(function(){fixedTfootAction(formID)}, 100); + }); }) diff --git a/module/company/js/browse.js b/module/company/js/browse.js index 57407a330f..af965df601 100644 --- a/module/company/js/browse.js +++ b/module/company/js/browse.js @@ -6,3 +6,7 @@ function manageContacts() { $('#userListForm').attr('action', createLink('user', 'manageContacts')); } +$(function() +{ + setTimeout(function(){fixedTfootAction('#userListForm')}, '100'); +}) diff --git a/module/mail/view/browse.html.php b/module/mail/view/browse.html.php index 6d8cd409d8..5ed16622c2 100644 --- a/module/mail/view/browse.html.php +++ b/module/mail/view/browse.html.php @@ -14,7 +14,7 @@
mail->browse?>
-' target='hiddenwin'> +' target='hiddenwin' id='mailForm'>
recTotal}&recPerPage={$pager->recPerPage}"; ?> @@ -50,21 +50,22 @@ - - - - + + + +
-" . html::selectButton() . ''; - if(common::hasPriv('mail', 'batchDelete')) echo html::submitButton($lang->delete); -} -$pager->show(); -?> -
+ " . html::selectButton() . ''; + if(common::hasPriv('mail', 'batchDelete')) echo html::submitButton($lang->delete); + } + $pager->show(); + ?> +
+ diff --git a/module/my/js/common.js b/module/my/js/common.js index a2fe1e40db..3f3633d641 100644 --- a/module/my/js/common.js +++ b/module/my/js/common.js @@ -4,4 +4,7 @@ $(function() var sign = config.requestType == 'GET' ? '&' : '?'; sp.attr('href', sp.attr('href') + sign + 'onlybody=yes').modalTrigger({width:600, type:'iframe'}); scp.attr('href', scp.attr('href') + sign + 'onlybody=yes').modalTrigger({width:500, type:'iframe'}); + + /* Fix table actions */ + if($('table.tablesorter').closest('form').size() > 0) fixedTfootAction($('table.tablesorter').closest('form')); }); diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index ab9c22a587..6690eafb13 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -23,7 +23,7 @@
- +
app->loadLang('testtask'); diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index 8d31f5bc55..c147d60db0 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -13,38 +13,38 @@ todo->confirmDelete)?> - -
- +
+ " . $lang->todo->export, '', "class='btn export'") ?> + " . $lang->todo->batchCreate, '', "class='btn'") ?> + " . $lang->todo->create, '', "class='btn'") ?>
+
+
@@ -95,7 +95,6 @@ diff --git a/module/product/js/browse.js b/module/product/js/browse.js index e65e846754..aec0bdbdf5 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -20,4 +20,5 @@ $(function() $('.popoverStage').mouseover(function(){$(this).popover('show')}); $('.popoverStage').mouseout(function(){$(this).popover('hide')}); + setTimeout(function(){fixedTfootAction('#productStoryForm')}, 100); }) diff --git a/module/product/js/index.js b/module/product/js/index.js index f35f9625b9..5aa3d1c90c 100644 --- a/module/product/js/index.js +++ b/module/product/js/index.js @@ -6,4 +6,5 @@ $(function() for(i = 0; i < data.list.length; i++) list += $(data.list[i]).attr('data-id') + ','; $.post(createLink('product', 'updateOrder'), {'products' : list, 'orderBy' : orderBy}); }); + fixedTfootAction('#productsForm'); }); diff --git a/module/product/view/index.html.php b/module/product/view/index.html.php index 73293ef585..0d261607ec 100644 --- a/module/product/view/index.html.php +++ b/module/product/view/index.html.php @@ -37,7 +37,7 @@ -'> +' id='productsForm'>
- show();?>
createLink('todo', 'import2Today'); - echo "
"; + echo "
"; echo "
" . html::input('date', date('Y-m-d'), "class='form-control form-date'") . '
'; echo ""; echo html::commonButton($lang->todo->import, "onclick=\"setFormAction('$actionLink')\""); echo ''; - echo '
'; + echo '
'; } ?>
+ show();?>
recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> diff --git a/module/productplan/js/view.js b/module/productplan/js/view.js index 6e31cb40eb..5db8a30083 100644 --- a/module/productplan/js/view.js +++ b/module/productplan/js/view.js @@ -8,12 +8,22 @@ function showLink(planID, type, orderBy, param) $('#' + type + 'List').hide(); var formID = type == 'story' ? '#unlinkedStoriesForm' : '#unlinkedBugsForm'; - fixTfootAction(formID); + setTimeout(function(){fixedTfootAction(formID)}, 100); }); } $(function() { if(link == 'true') showLink(planID, type, orderBy, param); + fixedTfootAction($('#' + type + 'List').closest('form')); + $('.nav.nav-tabs a[data-toggle="tab"]').on('shown.zui.tab', function(e) + { + var href = $(e.target).attr('href'); + var tabPane = $(href + '.tab-pane'); + if(tabPane.size() == 0) return; + var formID = tabPane.find('.linkBox').find('form:last'); + if(formID.size() == 0) formID = tabPane.find('form:last'); + setTimeout(function(){fixedTfootAction(formID)}, 100); + }); $('.dropdown-menu.with-search .menu-search').click(function(e) { diff --git a/module/project/js/bug.js b/module/project/js/bug.js index edc2cbb4fa..8b2fe444b7 100644 --- a/module/project/js/bug.js +++ b/module/project/js/bug.js @@ -14,4 +14,5 @@ $(document).ready(function() $option.toggleClass('hide', $option.text().toString().toLowerCase().indexOf(val) < 0 && $option.data('key').toString().toLowerCase().indexOf(val) < 0); }); }); + fixedTfootAction('#projectBugForm'); }); diff --git a/module/project/js/importbug.js b/module/project/js/importbug.js index 12ab9d4edc..b6a46de5f1 100644 --- a/module/project/js/importbug.js +++ b/module/project/js/importbug.js @@ -2,4 +2,5 @@ $(function() { $('#' + browseType + 'Tab').addClass('active'); ajaxGetSearchForm(); + setTimeout(function(){fixedTfootAction('#importBugForm')}, 500); }); diff --git a/module/project/js/importtask.js b/module/project/js/importtask.js index 7b76460b86..65cf6f7dbd 100644 --- a/module/project/js/importtask.js +++ b/module/project/js/importtask.js @@ -3,3 +3,7 @@ function reload(toProject, fromProject) link = createLink('project','importtask','toProject='+toProject + '&fromProject='+fromProject); location.href = link; } +$(function() +{ + setTimeout(function(){fixedTfootAction('#importTaskForm')}, 500); +}); diff --git a/module/project/js/index.js b/module/project/js/index.js index c76ab9a889..32b6716999 100644 --- a/module/project/js/index.js +++ b/module/project/js/index.js @@ -6,6 +6,7 @@ $(function() for(i = 0; i < data.list.length; i++) list += $(data.list[i]).attr('data-id') + ','; $.post(createLink('project', 'updateOrder'), {'projects' : list, 'orderBy' : orderBy}); }); + setTimeout(function(){fixedTfootAction('#projectsForm')}, 100); }); function byProduct(productID, projectID) diff --git a/module/project/js/story.js b/module/project/js/story.js index e69de29bb2..001f971f8a 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -0,0 +1 @@ +$(function(){fixedTfootAction('#projectStoryForm');}); diff --git a/module/project/js/task.js b/module/project/js/task.js index d4a0c465ba..0c733abec3 100644 --- a/module/project/js/task.js +++ b/module/project/js/task.js @@ -2,7 +2,7 @@ $(function() { setOuterBox(); if(browseType == 'bysearch') ajaxGetSearchForm(); - + setTimeout(function(){fixedTfootAction('#projectTaskForm')}, 100); $('.assign-search').click(function(e) { diff --git a/module/project/view/importbug.html.php b/module/project/view/importbug.html.php index cc6fd5c65f..9a414bfec2 100755 --- a/module/project/view/importbug.html.php +++ b/module/project/view/importbug.html.php @@ -25,7 +25,7 @@ var browseType = '';
- +
diff --git a/module/project/view/importtask.html.php b/module/project/view/importtask.html.php index ef27b402e5..6fe5005278 100644 --- a/module/project/view/importtask.html.php +++ b/module/project/view/importtask.html.php @@ -23,7 +23,7 @@ - +
diff --git a/module/project/view/index.html.php b/module/project/view/index.html.php index feb99ddeb8..703af36dc7 100644 --- a/module/project/view/index.html.php +++ b/module/project/view/index.html.php @@ -27,7 +27,7 @@ -'> +'>
recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> diff --git a/module/project/view/linkstory.html.php b/module/project/view/linkstory.html.php index 060c61c428..b00ff22651 100644 --- a/module/project/view/linkstory.html.php +++ b/module/project/view/linkstory.html.php @@ -20,8 +20,8 @@
server->http_referer, ' ' . $lang->goback, '', "class='btn'")?>
- -
+ +
@@ -71,5 +71,11 @@
idAB;?>
- + diff --git a/module/release/js/view.js b/module/release/js/view.js index e47a3ced82..73d581f355 100644 --- a/module/release/js/view.js +++ b/module/release/js/view.js @@ -10,10 +10,21 @@ function showLink(releaseID, type, param) $('#' + type + 'List').hide(); var formID = type == 'story' ? '#unlinkedStoriesForm' : (type == 'leftBug' ? '#unlinkedLeftBugsForm' : '#unlinkedBugsForm'); - fixTfootAction(formID); + setTimeout(function(){fixedTfootAction(formID)}, 100); }); } $(function() { if(link == 'true') showLink(releaseID, type, param); + fixedTfootAction($('#' + type + 'List').closest('form')); + $('.nav.nav-tabs a[data-toggle="tab"]').on('shown.zui.tab', function(e) + { + var href = $(e.target).attr('href'); + var tabPane = $(href + '.tab-pane'); + if(tabPane.size() == 0) return; + var formID = tabPane.find('.linkBox').find('form:last'); + if(formID.size() == 0) formID = tabPane.find('form:last'); + console.log(formID); + setTimeout(function(){fixedTfootAction(formID)}, 100); + }); }) diff --git a/module/story/js/zerocase.js b/module/story/js/zerocase.js index 916278dc60..77a506e466 100644 --- a/module/story/js/zerocase.js +++ b/module/story/js/zerocase.js @@ -1,4 +1,5 @@ $(document).ready(function() { $('#zerocaseTab').addClass('active'); + fixedTfootAction('#productStoryForm'); }); diff --git a/module/testcase/js/browse.js b/module/testcase/js/browse.js index 121360609a..428552fb55 100644 --- a/module/testcase/js/browse.js +++ b/module/testcase/js/browse.js @@ -26,6 +26,7 @@ $(document).ready(function() $('#' + browseType + 'Tab').addClass('active'); $('#module' + moduleID).addClass('active'); if(browseType == 'bysearch') ajaxGetSearchForm(); + setTimeout(function(){fixedTfootAction('#batchForm')}, 100); setModal4List('runCase', 'caseList'); }); diff --git a/www/js/my.full.js b/www/js/my.full.js index 2f34d1dbff..7621e37fd7 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -1339,7 +1339,6 @@ function computePasswordStrength(password) } strength += sumComplexity + (2 * (complexitySize - 1)); if(length < 6 && strength >= 10) strength = 9; - console.log(strength); strength = strength > 29 ? 29 : strength; strength = Math.floor(strength / 10); @@ -1359,34 +1358,44 @@ function checkOnlybodyPage() } /** - * Fix tfoot action like productplan,release. + * Fixed tfoot action like productplan,release. * * @param string $formID * @access public * @return void */ -function fixTfootAction(formID) +function fixedTfootAction(formID) { - var tfootOffset = $(formID + ' table tfoot').offset().top; + if($(formID).size() == 0) return false; + var $table = $(formID).find('table:last'); + var $tfoot = $table.find('tfoot'); + $tfoot.removeClass('fixedTfootAction'); + + var tfootOffset = $tfoot.offset().top + $tfoot.height(); var windowH = $(window).height(); - var tableWidth = $(formID + ' table').width() - 2; + var tableWidth = $table.width(); if(tfootOffset > windowH) { - $(formID + ' table tfoot').addClass('fixTfootAction'); - $(formID + ' table tfoot').width(tableWidth); - $(formID + ' table tfoot td').width(tableWidth); + $tfoot.addClass('fixedTfootAction'); + $tfoot.width(tableWidth); + $tfoot.find('td').width(tableWidth); + $tfoot.find('td .input-group').width('150'); } $(window).scroll(function() { - if(tfootOffset <= windowH + $(window).scrollTop() - 110) + if(tfootOffset < windowH + $(window).scrollTop()) { - $(formID + ' table tfoot').removeClass('fixTfootAction'); + $tfoot.removeClass('fixedTfootAction'); + $tfoot.removeAttr('style'); + $tfoot.find('td').removeAttr('style'); } - else if(!$(formID + ' table tfoot').hasClass('fixTfootAction')) + else if(!$tfoot.hasClass('fixedTfootAction')) { - $(formID + ' table tfoot').addClass('fixTfootAction'); - $(formID + ' table tfoot').width(tableWidth); - $(formID + ' table tfoot td').width(tableWidth); + tableWidth = $table.width(); + $tfoot.addClass('fixedTfootAction'); + $tfoot.width(tableWidth); + $tfoot.find('td').width(tableWidth); + $tfoot.find('td .input-group').width('150'); } }); } diff --git a/www/theme/default/style.css b/www/theme/default/style.css index af7b878ff0..220a031a3f 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -682,7 +682,7 @@ body {font-size: 13px; color:#141414;padding-bottom: 40px;} #searchbox {display: none} } -.fixTfootAction{position: fixed; bottom: 40px; background: #fff;} +.fixedTfootAction{position: fixed; bottom: 40px; background: #fff;} #passwordStrength{display:none;} .warning{color:red;} .nofixed td{white-space:normal;}