diff --git a/module/productplan/css/browse.css b/module/productplan/css/browse.css index 99353191ed..a37d6173a9 100644 --- a/module/productplan/css/browse.css +++ b/module/productplan/css/browse.css @@ -1,4 +1,6 @@ -.table td.content { overflow:hidden; text-overflow:ellipsis; white-space:nowrap;} +.table td.content { position: relative;} +.table td.content .more{height:25px; position:absolute; right:-5px; top:5px;} +.table td.content div{height:25px;overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding-right:5px;} td.c-branch{ overflow:hidden; text-align:left!important; text-overflow:ellipsis; white-space:nowrap;} .table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js index 3cb238d9ef..83520e0203 100644 --- a/module/productplan/js/browse.js +++ b/module/productplan/js/browse.js @@ -7,4 +7,29 @@ $(document).on('click', '.task-toggle', function(e) e.stopPropagation(); e.preventDefault(); -}); +}); +$(function() +{ + $('#productplanList tbody tr').each(function() + { + var content = $(this).find('td.content div').html(); + if(content.indexOf('= 0) + { + $(this).find('td.content').append(""); + } + }); +}) +$(document).on('click', 'td.content .more', function(e) +{ + var $toggle = $(this); + if($toggle.hasClass('open')) + { + $toggle.removeClass('open'); + $toggle.closest('.content').find('div').css('height', '25px'); + } + else + { + $toggle.addClass('open'); + $toggle.closest('.content').find('div').css('height', 'auto'); + } +}); diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 393cc76de2..fbfdede0e9 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -111,7 +111,10 @@ bugs;?> hour;?> projectID)) echo html::a(helper::createLink('project', 'task', 'projectID=' . $plan->projectID), '');?> - desc)));?>' class='text-left content'>", "\n", str_replace(array("\n", "\r"), '', $plan->desc))));?> + + ", "\n", str_replace(array("\n", "\r"), '', $plan->desc)));?> +
+ id"), '', '', "class='btn' title='{$lang->project->create}'");