[open-ils-commits] r15839 - in trunk/Open-ILS/web: js/ui/default/vandelay opac/locale/en-US templates/default/vandelay templates/default/vandelay/inc (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Mar 12 15:51:09 EST 2010


Author: erickson
Date: 2010-03-12 15:51:03 -0500 (Fri, 12 Mar 2010)
New Revision: 15839

Added:
   trunk/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2
Modified:
   trunk/Open-ILS/web/js/ui/default/vandelay/vandelay.js
   trunk/Open-ILS/web/opac/locale/en-US/vandelay.dtd
   trunk/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2
   trunk/Open-ILS/web/templates/default/vandelay/vandelay.tt2
Log:
initial merge/overlay profile editor ui

Modified: trunk/Open-ILS/web/js/ui/default/vandelay/vandelay.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/vandelay/vandelay.js	2010-03-12 20:51:03 UTC (rev 15838)
+++ trunk/Open-ILS/web/js/ui/default/vandelay/vandelay.js	2010-03-12 20:51:03 UTC (rev 15839)
@@ -40,6 +40,8 @@
 dojo.require('openils.MarcXPathParser');
 dojo.require('openils.widget.GridColumnPicker');
 dojo.require('openils.PermaCrud');
+dojo.require('openils.widget.OrgUnitFilteringSelect');
+dojo.require('openils.widget.AutoGrid');
 
 
 var globalDivs = [
@@ -52,7 +54,8 @@
     'vl-queue-select-div',
     'vl-marc-upload-status-div',
     'vl-attr-editor-div',
-    'vl-marc-export-div'
+    'vl-marc-export-div',
+    'vl-profile-editor-div'
 ];
 
 var authtoken;
@@ -239,6 +242,7 @@
     openils.Util.removeCSSClass(dojo.byId('vl-menu-marc-upload'), 'toolbar_selected');
     openils.Util.removeCSSClass(dojo.byId('vl-menu-queue-select'), 'toolbar_selected');
     openils.Util.removeCSSClass(dojo.byId('vl-menu-attr-editor'), 'toolbar_selected');
+    openils.Util.removeCSSClass(dojo.byId('vl-menu-profile-editor'), 'toolbar_selected');
 
     switch(id) {
         case 'vl-marc-export-div':
@@ -253,6 +257,9 @@
         case 'vl-attr-editor-div':
             openils.Util.addCSSClass(dojo.byId('vl-menu-attr-editor'), 'toolbar_selected');
             break;
+        case 'vl-profile-editor-div':
+            openils.Util.addCSSClass(dojo.byId('vl-menu-profile-editor'), 'toolbar_selected');
+            break;
     }
 }
 
@@ -1219,3 +1226,38 @@
 // amazing xpath-util unit-tests
 if (!looksLikeDerivedXpath('//*[@tag="901"]/*[@code="c"]'))	alert('vandelay xpath-utility error');
 if ( looksLikeDerivedXpath('ba-boo-ba-boo!'))			alert('vandelay xpath-utility error');
+
+
+
+var profileContextOrg
+function vlShowProfileEditor() {
+    displayGlobalDiv('vl-profile-editor-div');
+    buildProfileGrid();
+
+    var connect = function() {
+        dojo.connect(profileContextOrgSelector, 'onChange',
+            function() {
+                profileContextOrg = this.attr('value');
+                pGrid.resetStore();
+                buildGrid();
+            }
+        );
+    };
+
+    new openils.User().buildPermOrgSelector(
+        '"ADMIN_MERGE_PROFILE', profileContextOrgSelector, null, connect);
+}
+
+function buildProfileGrid() {
+
+    if(profileContextOrg == null)
+        profileContextOrg = openils.User.user.ws_ou();
+
+    pGrid.loadAll( 
+        {order_by : {vmp : 'name'}}, 
+        {owner : fieldmapper.aou.fullPath(profileContextOrg, true)}
+    );
+}
+
+
+

Modified: trunk/Open-ILS/web/opac/locale/en-US/vandelay.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/vandelay.dtd	2010-03-12 20:51:03 UTC (rev 15838)
+++ trunk/Open-ILS/web/opac/locale/en-US/vandelay.dtd	2010-03-12 20:51:03 UTC (rev 15839)
@@ -24,6 +24,7 @@
 <!ENTITY vandelay.done "Done">
 <!ENTITY vandelay.edit.attributes "Edit Attributes">
 <!ENTITY vandelay.edit.attrs "Edit Attributes">
+<!ENTITY vandelay.edit.profiles "Edit Merge / Overlay Profiles">
 <!ENTITY vandelay.false "False">
 <!ENTITY vandelay.file.to.upload "File to Upload:">
 <!ENTITY vandelay.for.example "Example">

Added: trunk/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2	                        (rev 0)
+++ trunk/Open-ILS/web/templates/default/vandelay/inc/profiles.tt2	2010-03-12 20:51:03 UTC (rev 15839)
@@ -0,0 +1,25 @@
+<script src='[% ctx.media_prefix %]/js/ui/default/vandelay/vandelay.js'> </script>
+
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+    <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+        <div>Overlay / Merge Profiles</div>
+        <div>
+            <button dojoType='dijit.form.Button' onClick='crGrid.showCreateDialog()'>New Merge Profile</button>
+            <button dojoType='dijit.form.Button' onClick='crGrid.deleteSelected()'>Delete Selected</button>
+        </div>
+    </div>
+    <div>
+        <span>Context Org Unit</span>
+        <select dojoType="openils.widget.OrgUnitFilteringSelect" jsId='profileContextOrgSelector'
+            searchAttr='shortname' labelAttr='shortname'> </select>
+    </div>
+    <table  jsId="pGrid"
+            dojoType="openils.widget.AutoGrid"
+            fieldOrder="[]"
+            query="{id: '*'}"
+            defaultCellWidth='"auto"'
+            fmClass='vmp'
+            showPaginator='true'
+            editOnEnter='true'>
+    </table>
+</div>

Modified: trunk/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2	2010-03-12 20:51:03 UTC (rev 15838)
+++ trunk/Open-ILS/web/templates/default/vandelay/inc/toolbar.tt2	2010-03-12 20:51:03 UTC (rev 15839)
@@ -7,4 +7,6 @@
         onclick="vlShowQueueSelect();" showLabel="true">&vandelay.inspect.queue;</div>
     <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"  id='vl-menu-attr-editor'
         onclick="vlShowAttrEditor();" showLabel="true">&vandelay.edit.attributes;</div>
+    <div dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconCopy"  id='vl-menu-profile-editor'
+        onclick="vlShowProfileEditor();" showLabel="true">&vandelay.edit.profiles;</div>
 </div>

Modified: trunk/Open-ILS/web/templates/default/vandelay/vandelay.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/vandelay/vandelay.tt2	2010-03-12 20:51:03 UTC (rev 15838)
+++ trunk/Open-ILS/web/templates/default/vandelay/vandelay.tt2	2010-03-12 20:51:03 UTC (rev 15839)
@@ -34,5 +34,9 @@
         class='hidden attr-editor-detail-content-pane content' title='&vandelay.edit.attrs;'>
     [% INCLUDE 'default/vandelay/inc/attrs.tt2' %]
 </div>
+<div dojoType="dijit.layout.ContentPane" layoutAlign='client' id='vl-profile-editor-div' class='hidden content'>
+    [% INCLUDE 'default/vandelay/inc/profiles.tt2' %]
+</div>
 
+
 [% END %]



More information about the open-ils-commits mailing list