diff --git a/module/bug/css/browse.css b/module/bug/css/browse.css index df66e254be..6d8a3eaa25 100644 --- a/module/bug/css/browse.css +++ b/module/bug/css/browse.css @@ -4,4 +4,3 @@ .confirm0 {color:gray; font-size:9px} .confirm1 {color:green; font-size:9px} tfoot .f-left {color:#141414;} -form {position:relative} diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 5fd617edc9..b0ef9656cd 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -57,8 +57,8 @@ js::set('customed', $customed); } ?> +
 
'> -
 
diff --git a/module/common/view/dropmenu.html.php b/module/common/view/dropmenu.html.php new file mode 100644 index 0000000000..878668155f --- /dev/null +++ b/module/common/view/dropmenu.html.php @@ -0,0 +1,8 @@ +getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> +debug) +{ + css::import($defaultTheme . 'dropmenu.css'); + js::import($jsRoot . 'jquery/dropmenu/dropmenu.js'); +} +?> diff --git a/module/product/js/browse.js b/module/product/js/browse.js index 6e4d9fba04..5fe0cf9db2 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -22,68 +22,6 @@ function changeAction(actionLink, hiddenwin) $('form').attr('action', actionLink).submit(); } -/** - * Toggle sub menu. - * - * @param string $currentID - * @param string position = 'right' | 'top' - * @param bool entry - * @access public - * @return void - */ -function toggleSubMenu(currentID, position, menuIndex) -{ - if(typeof(position) == 'undefined') position = 'right'; - if(typeof(menuIndex) == 'undefined') menuIndex = 1; - if(menuIndex) - { - currentMenu = $('#' + currentID).parent().parent().parent().attr('id'); - $('#' + currentID + 'Menu').bind('mouseover', function() - { - $('#' + currentMenu).show(); - return $('#' + currentID + 'Menu').show() - }); - - $('#' + currentID).parent().bind('mouseleave', function() - { - return $('#' + currentID + 'Menu').hide() - }); - - $('#' + currentID + 'Menu').bind('mouseleave', function() - { - return $('#' + currentID + 'Menu').hide() - }); - } - - var offset = $('#' + currentID).offset(); - var topOffset = 0; - var leftOffset = 0; - if(position == 'top') - { - topOffset = offset.top - $('#' + currentID + 'Menu').height() + 'px'; - leftOffset = offset.left; - $('#' + currentID + 'Menu').css({top: topOffset, left: leftOffset}); - } - if(position == 'right') - { - if(menuIndex == 1) - { - topOffset = offset.top - $('#' + currentID + 'Menu').height() + $('#' + currentID).parent().height() + "px"; - leftOffset = offset.left + $('#' + currentID).parent().width(); - $('#' + currentID + 'Menu').css({top: topOffset, left: leftOffset}); - } - else if(menuIndex == 2) - { - currentMenu = $('#' + currentID).parent().parent().parent().attr('id'); - rootID = currentMenu.replace('Menu', ''); - topOffset = $('#' + rootID).offset().top - $('#' + currentID + 'Menu').height() + 20; - leftOffset = $('#' + rootID).offset().left + $('#' + rootID).parent().width() + $('#' + currentMenu).width(); - $('#' + currentID + 'Menu').css({top: topOffset, left:leftOffset}); - } - } - $('#' + currentID + 'Menu').toggle(); -} - $(function() { if(browseType == 'bysearch') ajaxGetSearchForm(); diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index d1101de867..40cce5c994 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -13,6 +13,7 @@ + @@ -39,8 +40,8 @@ var browseType = '';
'>
+
 
-
 
diff --git a/module/project/css/task.css b/module/project/css/task.css index 4c0f95bf6a..a95f3834c2 100644 --- a/module/project/css/task.css +++ b/module/project/css/task.css @@ -3,4 +3,4 @@ #sidebar{position:absolute;left:15px;top:185px;width:20px;height:20px;cursor:pointer;background:url(theme/default/images/main/zt-icons.png) -81px -161px;} #hideButton{cursor:pointer;} #hideButton span{padding:2px 10px; background:url(theme/default/images/main/zt-icons.png) -100px -161px;} -form { position:relative } +#featurebar .f-right .icon-green-task-import {padding:2px 8px; background:url(theme/default/images/main/zt-icons.png) 0px -82px;} diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index c84ce5dcf1..b2c4626ea1 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -21,8 +21,8 @@ var browseType = '';
'>
-
 
+
diff --git a/module/project/view/taskheader.html.php b/module/project/view/taskheader.html.php index 5f08a80696..f81b5c5cfe 100644 --- a/module/project/view/taskheader.html.php +++ b/module/project/view/taskheader.html.php @@ -1,3 +1,4 @@ +
'; + echo html::a("#", " ", '', "id='importAction' class='icon-green-task-import' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->import}'"); + echo html::a("#", $lang->import, '', "id='importAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->import}'"); + echo ''; + common::printIcon('task', 'batchCreate', "projectID=$projectID"); common::printIcon('task', 'create', "project=$projectID"); ?>
+ + + diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index c2bed3f69e..fe9ec354e7 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -17,15 +17,7 @@ task->placeholder);?> - + diff --git a/module/testcase/css/browse.css b/module/testcase/css/browse.css index 8c3191258e..5cbb1d4fb6 100644 --- a/module/testcase/css/browse.css +++ b/module/testcase/css/browse.css @@ -1,3 +1,2 @@ .w-220px{width:220px} #featurebar .f-right .icon-green-testcase-import {padding:2px 8px; background:url(theme/default/images/main/zt-icons.png) 0px -82px;} -form {position:relative} diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index e11b448bcb..6f380c7568 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -38,8 +38,8 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
'>
-
 
+
- task->create;?> -
- id", $lang->project->importTask); - common::printLink('project', 'importBug', "projectID=$project->id", $lang->project->importBug); - ?> -
-
task->create;?>
task->project;?> name;?>
diff --git a/www/js/jquery/dropmenu/dropmenu.js b/www/js/jquery/dropmenu/dropmenu.js new file mode 100644 index 0000000000..de2fd4c3dc --- /dev/null +++ b/www/js/jquery/dropmenu/dropmenu.js @@ -0,0 +1,59 @@ +function toggleSubMenu(currentID, position, menuIndex) +{ + if(typeof(position) == 'undefined') position = 'right'; + if(typeof(menuIndex) == 'undefined') menuIndex = 1; + if(menuIndex) + { + currentMenu = $('#' + currentID).parent().parent().parent().attr('id'); + $('#' + currentID + 'Menu').bind('mouseover', function() + { + $('#' + currentMenu).show(); + return $('#' + currentID + 'Menu').show() + }); + + $('#' + currentID).parent().bind('mouseleave', function() + { + return $('#' + currentID + 'Menu').hide() + }); + + $('#' + currentID + 'Menu').bind('mouseleave', function() + { + return $('#' + currentID + 'Menu').hide() + }); + } + + var offset = $('#' + currentID).offset(); + var topOffset = 0; + var leftOffset = 0; + if(position == 'top') + { + topOffset = offset.top - $('#' + currentID + 'Menu').height() + 'px'; + leftOffset = offset.left; + $('#' + currentID + 'Menu').css({top: topOffset, left: leftOffset}); + } + if(position == 'right') + { + if(menuIndex == 1) + { + topOffset = offset.top - $('#' + currentID + 'Menu').height() + $('#' + currentID).parent().height() + "px"; + leftOffset = offset.left + $('#' + currentID).parent().width(); + $('#' + currentID + 'Menu').css({top: topOffset, left: leftOffset}); + } + else if(menuIndex == 2) + { + currentMenu = $('#' + currentID).parent().parent().parent().attr('id'); + rootID = currentMenu.replace('Menu', ''); + topOffset = $('#' + rootID).offset().top - $('#' + currentID + 'Menu').height() + 20; + leftOffset = $('#' + rootID).offset().left + $('#' + rootID).parent().width() + $('#' + currentMenu).width(); + $('#' + currentID + 'Menu').css({top: topOffset, left:leftOffset}); + } + } + if(position == 'bottom') + { + topOffset = offset.top + $('#' + currentID).parent().outerHeight(); + leftOffset = offset.left; + $('#' + currentID + 'Menu').css({top: topOffset, left: leftOffset}); + } + $('#' + currentID + 'Menu').toggle(); +} + diff --git a/module/product/css/browse.css b/www/theme/default/dropmenu.css similarity index 99% rename from module/product/css/browse.css rename to www/theme/default/dropmenu.css index 3b438ddab5..13cea56999 100644 --- a/module/product/css/browse.css +++ b/www/theme/default/dropmenu.css @@ -122,4 +122,3 @@ .groupButton input[disabled='disabled'] {background:#eee; color:#ccc} .listMenu li a.disabled {color:#ccc} -form {position:relative} diff --git a/www/theme/default/style.css b/www/theme/default/style.css index 13e1fc8c39..61dae982ba 100644 --- a/www/theme/default/style.css +++ b/www/theme/default/style.css @@ -358,7 +358,7 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table border-left:none; cursor: pointer; width: 8px; - left:-16px; + left: 16px; border-radius:0px 10px 10px 0px } .treeSlider span {