From a29c56dc92df370e2c2370f8e1592e7395cbff35 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 7 Mar 2013 16:07:16 -0500 Subject: [PATCH] Bug 9766 - Remove YUI menu on budget planning page in favor of different column-hiding system Content-Type: text/plain; charset="utf-8" The budget planning table previously used a YUI menu as part of a system for hiding and showing table columns. Instead of trying to convert that sytem to Bootstrap I have used code from the batch modification/deletion pages which uses a list of checkboxes to show and hide table columns. This has the advantage of giving the user visual feedback of what columns are hidden and of offering the user an interface which is familiar from other pages. This patch also moves CSS from a batch-operations-specific CSS file into the main CSS file. Batch modification templates have been modified accordingly. To test, view the budget planning page and choose different "plan by" options (by month, by library, by item type). Test the show/hide action on each individual column and using the "show all" and "hide all" checkboxes. Signed-off-by: David Cook Works as described. This interface is also much more visually appealing, user-friendly, and informative than it was when it used the YUI menu. --- .../intranet-tmpl/prog/en/css/pages/batchMod.css | 7 -- .../intranet-tmpl/prog/en/css/staff-global.css | 8 ++ koha-tmpl/intranet-tmpl/prog/en/js/acq.js | 80 +++++---------- .../intranet-tmpl/prog/en/modules/admin/aqplan.tt | 102 +++++++++----------- .../prog/en/modules/tools/batchMod-del.tt | 1 - .../prog/en/modules/tools/batchMod-edit.tt | 1 - 6 files changed, 80 insertions(+), 119 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/pages/batchMod.css diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/pages/batchMod.css b/koha-tmpl/intranet-tmpl/prog/en/css/pages/batchMod.css deleted file mode 100644 index c8d6bfb..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/css/pages/batchMod.css +++ /dev/null @@ -1,7 +0,0 @@ -#jobpanel,#jobstatus,#jobfailed { display : none; } -#jobstatus { margin:.4em; } -#jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; } -#selections { width : 100%; white-space : normal; } -#selections span { margin:3px;padding:3px;background-color:#EBF3FF;-moz-border-radius:5px;border-radius:5px;white-space:nowrap;line-height:240%;font-size:75%; } -#selections span.selected { background-color : #CCE0FC; } -#selections input { vertical-align:middle;margin:0 2px; } \ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 57c5fdb..8f99a11 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -2570,3 +2570,11 @@ button.closebtn{padding:0;cursor:pointer;background:transparent;border:0;-webkit fieldset.rows table.mceListBox { margin: 0; } + +#jobpanel,#jobstatus,#jobfailed { display : none; } +#jobstatus { margin:.4em; } +#jobprogress{ width:200px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; } +#selections { width : 100%; white-space : normal; } +#selections span { margin:3px;padding:3px;background-color:#EBF3FF;-moz-border-radius:5px;border-radius:5px;white-space:nowrap;line-height:240%;font-size:75%; } +#selections span.selected { background-color : #CCE0FC; } +#selections input { vertical-align:middle;margin:0 2px; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js index 35287ed..067cd08 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/acq.js @@ -862,61 +862,33 @@ function checkBudgetParent(budgetId, newBudgetParent) { } } - -function addColumn(p_sType, p_aArgs, p_oValue) -{ - var allRows = document.getElementById('plan').rows; - var colnum = p_oValue[0]; - var code = p_oValue[1]; - var colnum = new Number(colnum); - - for (var i=0; iKoha › Administration › Budgets › Funds › Planning for [% budget_period_description %] by [% authcat %] [% INCLUDE 'doc-head-close.inc' %] + @@ -82,7 +83,6 @@ YAHOO.util.Event.onAvailable("popmenu", function () {
- [% INCLUDE 'budgets-admin-toolbar.inc' %]
@@ -105,8 +105,13 @@ YAHOO.util.Event.onAvailable("popmenu", function () {

Cells contain estimated values only.

[% END %] [% END %] - - +

+ Show/hide columns: + [% FOREACH authvals_ro IN authvals_row %] + + [% END %] +

+
@@ -122,32 +127,17 @@ YAHOO.util.Event.onAvailable("popmenu", function () { [% authvals_ro.code %] [% END %] - + - - - [% FOREACH authvals_ro IN authvals_row %] - [% IF ( authvals_ro.display ) %] - - - [% END %] - - - [% FOREACH budget_line IN budget_lines %] [% UNLESS ( loop.odd ) %][% ELSE %][% END %] [% IF ( budget_line.budget_lock ) %] -
Fund nameFund remaining Fund remaining 
   - [% ELSE %] - [ show a column ] 
+ [% ELSE %] - + [% END %] [% budget_line.budget_name_indent %] [% budget_line.budget_amount_formatted %]  @@ -162,10 +152,10 @@ YAHOO.util.Event.onAvailable("popmenu", function () { [% ELSE %]