From: erickson Date: Wed, 11 Aug 2010 02:18:47 +0000 (+0000) Subject: added an UI for editing vandelay import item attribute definitions. it's a basic... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=015942383771a9f993253337d40276c3ccedcb95;p=evergreen%2Fbjwebb.git added an UI for editing vandelay import item attribute definitions. it's a basic autogrid version for now. TODO: fix some grid height styling issues git-svn-id: svn://svn.open-ils.org/ILS/trunk@17165 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index db066c78b..dfa255818 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -251,10 +251,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - - - - + + + + diff --git a/Open-ILS/web/js/ui/default/vandelay/vandelay.js b/Open-ILS/web/js/ui/default/vandelay/vandelay.js index 7346ef029..61d048502 100644 --- a/Open-ILS/web/js/ui/default/vandelay/vandelay.js +++ b/Open-ILS/web/js/ui/default/vandelay/vandelay.js @@ -56,7 +56,8 @@ var globalDivs = [ 'vl-marc-upload-status-div', 'vl-attr-editor-div', 'vl-marc-export-div', - 'vl-profile-editor-div' + 'vl-profile-editor-div', + 'vl-item-attr-editor-div' ]; var authtoken; @@ -273,6 +274,9 @@ function displayGlobalDiv(id) { case 'vl-profile-editor-div': openils.Util.addCSSClass(dojo.byId('vl-menu-profile-editor'), 'toolbar_selected'); break; + case 'vl-item-attr-editor-div': + openils.Util.addCSSClass(dojo.byId('vl-menu-import-item-attr-editor'), 'toolbar_selected'); + break; } } @@ -1322,7 +1326,7 @@ function vlShowProfileEditor() { function() { profileContextOrg = this.attr('value'); pGrid.resetStore(); - buildGrid(); + buildProfileGrid(); } ); }; @@ -1342,5 +1346,36 @@ function buildProfileGrid() { ); } +/* --- Import Item Attr Grid --------------- */ + +var itemAttrContextOrg; +function vlShowImportItemAttrEditor() { + displayGlobalDiv('vl-item-attr-editor-div'); + buildImportItemAttrGrid(); + + var connect = function() { + dojo.connect(itemAttrContextOrgSelector, 'onChange', + function() { + itemAttrContextOrg = this.attr('value'); + itemAttrGrid.resetStore(); + vlShowImportItemAttrEditor(); + } + ); + }; + new openils.User().buildPermOrgSelector( + 'ADMIN_IMPORT_ITEM_ATTR_DEF', + itemAttrContextOrgSelector, null, connect); +} + +function buildImportItemAttrGrid() { + + if(itemAttrContextOrg == null) + itemAttrContextOrg = openils.User.user.ws_ou(); + + itemAttrGrid.loadAll( + {order_by : {viiad : 'name'}}, + {owner : fieldmapper.aou.fullPath(itemAttrContextOrg, true)} + ); +} diff --git a/Open-ILS/web/opac/locale/en-US/vandelay.dtd b/Open-ILS/web/opac/locale/en-US/vandelay.dtd index de3b23313..31fdc67e1 100644 --- a/Open-ILS/web/opac/locale/en-US/vandelay.dtd +++ b/Open-ILS/web/opac/locale/en-US/vandelay.dtd @@ -27,6 +27,7 @@ + diff --git a/Open-ILS/web/templates/default/vandelay/inc/item_attrs.tt2 b/Open-ILS/web/templates/default/vandelay/inc/item_attrs.tt2 new file mode 100644 index 000000000..ad9878d2e --- /dev/null +++ b/Open-ILS/web/templates/default/vandelay/inc/item_attrs.tt2 @@ -0,0 +1,27 @@ + + +
+
+
Import Item Attrbute Definitions
+
+ + +
+
+
+ Context Org Unit + +
+ +
+
diff --git a/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2 b/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2 index d2aca9729..69c2190a5 100644 --- a/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2 +++ b/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2 @@ -9,4 +9,6 @@ onclick="vlShowAttrEditor();" showLabel="true">&vandelay.edit.attributes;
&vandelay.edit.profiles;
+
&vandelay.edit.import_item_attrs;
diff --git a/Open-ILS/web/templates/default/vandelay/vandelay.tt2 b/Open-ILS/web/templates/default/vandelay/vandelay.tt2 index 019245f8c..2e2a2e0ab 100644 --- a/Open-ILS/web/templates/default/vandelay/vandelay.tt2 +++ b/Open-ILS/web/templates/default/vandelay/vandelay.tt2 @@ -37,6 +37,9 @@ + [% END %]