From: Joseph Lewis Date: Mon, 11 Jun 2012 21:03:14 +0000 (-0600) Subject: Fixed perm_list.js/html so the widgets won't overlap when the dojo version is X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=015db22c04b2e8c80a6759ccd0aec2d65483e947;p=evergreen%2Fjoelewis.git Fixed perm_list.js/html so the widgets won't overlap when the dojo version is upgraded. Also added buttons at the bottom of the screen to the top for deletion/save. This makes things a tad more useable. Signed-off-by: Joseph Lewis --- diff --git a/Open-ILS/web/conify/global/permission/perm_list.html b/Open-ILS/web/conify/global/permission/perm_list.html index 22c50e3061..fe6f5d8238 100644 --- a/Open-ILS/web/conify/global/permission/perm_list.html +++ b/Open-ILS/web/conify/global/permission/perm_list.html @@ -71,20 +71,23 @@
-
+
&conify.perm_list.new_permission.label;
+ + + + + +
- -
- - -
+ + diff --git a/Open-ILS/web/conify/global/permission/perm_list.js b/Open-ILS/web/conify/global/permission/perm_list.js index d7924c96bd..65e486a027 100644 --- a/Open-ILS/web/conify/global/permission/perm_list.js +++ b/Open-ILS/web/conify/global/permission/perm_list.js @@ -29,6 +29,8 @@ dojo.require('dijit.form.Textarea'); dojo.require('dijit.layout.ContentPane'); dojo.require('dijit.layout.LayoutContainer'); dojo.require('dijit.layout.BorderContainer'); +dojo.require('dijit.Toolbar'); +dojo.require('dijit.ToolbarSeparator'); dojo.require('dojox.widget.Toaster'); dojo.require('dojox.fx'); dojo.require("dojox.grid.cells.dijit"); @@ -48,6 +50,13 @@ var virgin_out_id = -1; var highlighter = {}; + +dojo.addOnLoad(function() +{ + highlighter.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'perm_grid', duration : 500 } ); + highlighter.red = dojox.fx.highlight( { color : '#FF2018', node : 'perm_grid', duration : 500 } ); +}); + function status_update (markup) { if (parent !== window && parent.status_update) parent.status_update( markup ); } @@ -133,7 +142,7 @@ var perm_grid_layout = [ get : function (row) { var r = perm_grid.getItem(row); if (r) { - perm_rows[row] = new ccs().fromHash(perm_grid.getItem(row)); + perm_rows[row] = new ccs().fromHash(r); setTimeout( 'dojo.query(".perm_grid_trans_desc_' + row + '").'+ 'instantiate(openils.widget.TranslatorPopup,{field:"description",'+ @@ -197,7 +206,7 @@ var new_code = new_perm_code.getValue(); var new_item_hash = list[0].toHash(); perm_store.newItem( new_item_hash ); status_update( dojo.string.substitute(ppl_strings.SUCCESS_CREATING_PERMISSION, [new_item_hash.code]) ); - perm_grid.model.sort(-1); + perm_grid.sort(-1); highlighter.green.play(); } }); @@ -207,17 +216,11 @@ function delete_them() { var selected_rows = perm_grid.selection.getSelected(); var selected_items = []; - - for (var i in selected_rows) { - selected_items.push( - perm_grid.model.getRow( selected_rows[i] ).__dojo_data_item - ); - } perm_grid.selection.clear(); - for (var i in selected_items) { - current_perm = selected_items[i]; + for (var i in selected_rows) { + current_perm = selected_rows[i]; if ( confirm( dojo.string.substitute(ppl_strings.CONFIRM_DELETE, [perm_store.getValue(current_perm, 'code')]) ) ) {