[open-ils-commits] SPAM: r9708 - in branches/acq-experiment: .
Open-ILS/examples/apache Open-ILS/src/extras
Open-ILS/src/perlmods/OpenILS/WWW Open-ILS/web/conify/global/config
Open-ILS/web/js/dojo/fieldmapper Open-ILS/web/js/dojo/openils/widget
Open-ILS/xul/staff_client/chrome/content/main
Open-ILS/xul/staff_client/chrome/locale/en-US
Open-ILS/xul/staff_client/server/admin
Open-ILS/xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon May 26 15:52:44 EDT 2008
Author: erickson
Date: 2008-05-26 15:52:40 -0400 (Mon, 26 May 2008)
New Revision: 9708
Added:
branches/acq-experiment/DCO-1.1.txt
branches/acq-experiment/Open-ILS/web/conify/global/config/marc_code_maps.html
branches/acq-experiment/Open-ILS/web/conify/global/config/marc_code_maps.js
Removed:
branches/acq-experiment/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul
Modified:
branches/acq-experiment/
branches/acq-experiment/Open-ILS/examples/apache/eg_vhost.conf
branches/acq-experiment/Open-ILS/src/extras/org_tree_js.pl
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js
branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js
branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/dojoData.js
branches/acq-experiment/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js
branches/acq-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.js
branches/acq-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.xul
branches/acq-experiment/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
branches/acq-experiment/Open-ILS/xul/staff_client/server/admin/index.xhtml
branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.js
Log:
Merged revisions 9671-9672,9675,9677-9678,9684-9686,9695,9698-9699,9703-9707 via svnmerge from
svn://svn.open-ils.org/ILS/trunk
........
r9671 | miker | 2008-05-22 15:44:21 -0400 (Thu, 22 May 2008) | 1 line
teach JS about the shortname field on slim org lists
........
r9672 | miker | 2008-05-22 15:54:45 -0400 (Thu, 22 May 2008) | 1 line
adding locale param to org unit fetcher
........
r9675 | miker | 2008-05-22 17:18:10 -0400 (Thu, 22 May 2008) | 1 line
use the configured identifier field
........
r9677 | miker | 2008-05-22 17:32:52 -0400 (Thu, 22 May 2008) | 1 line
further fix for Identifier support
........
r9678 | miker | 2008-05-22 17:44:00 -0400 (Thu, 22 May 2008) | 1 line
identifier is class based
........
r9684 | miker | 2008-05-22 22:20:41 -0400 (Thu, 22 May 2008) | 1 line
Stop being Dan's problem
........
r9685 | dbs | 2008-05-22 22:27:40 -0400 (Thu, 22 May 2008) | 3 lines
Avoid uninitialized variable warning if no locale has been passed in
(Yes, it's okay to have the trailing . in the no-locale situation)
........
r9686 | miker | 2008-05-22 22:43:39 -0400 (Thu, 22 May 2008) | 1 line
start of code map admin interfaces
........
r9695 | phasefx | 2008-05-25 01:14:19 -0400 (Sun, 25 May 2008) | 1 line
I18N version of a patch from Bill Ott for a New Window button on the login window. Thanks!
........
r9698 | phasefx | 2008-05-25 02:47:49 -0400 (Sun, 25 May 2008) | 1 line
remove redundant (and broken) code so alternate pull list works again; thanks to Ryan Laverdiere and Dan Scott
........
r9699 | miker | 2008-05-25 08:58:23 -0400 (Sun, 25 May 2008) | 1 line
add a copy of the DCO for convenience
........
r9703 | dbs | 2008-05-26 12:05:02 -0400 (Mon, 26 May 2008) | 2 lines
Fix missing close-quote character (regression introduced in r9650)
........
r9704 | dbs | 2008-05-26 12:28:56 -0400 (Mon, 26 May 2008) | 2 lines
miker's bane: typo: visiblity -> visibility
........
r9705 | dbs | 2008-05-26 13:25:00 -0400 (Mon, 26 May 2008) | 2 lines
Typo: Fromat -> Format (and a reminder to self to figure out how to i18n-ize this)
........
r9706 | dbs | 2008-05-26 13:33:12 -0400 (Mon, 26 May 2008) | 3 lines
Django admin is dead; alas, multi-db branch was never merged to Django core
Long live Conify in its place!
........
r9707 | dbs | 2008-05-26 14:17:52 -0400 (Mon, 26 May 2008) | 1 line
Merge from svn
........
Property changes on: branches/acq-experiment
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-9669
+ /trunk:1-9707
Name: bzr:revision-info
+ timestamp: 2008-05-26 14:17:45.812000036 -0400
committer: Dan Scott <dscott at laurentian.ca>
properties:
branch-nick: mainline
Name: bzr:file-ids
+
Name: bzr:revision-id:v3-trunk0
+ 8490 dscott at laurentian.ca-20080526181745-56agjebce7qcrvs4
Copied: branches/acq-experiment/DCO-1.1.txt (from rev 9707, trunk/DCO-1.1.txt)
===================================================================
--- branches/acq-experiment/DCO-1.1.txt (rev 0)
+++ branches/acq-experiment/DCO-1.1.txt 2008-05-26 19:52:40 UTC (rev 9708)
@@ -0,0 +1,29 @@
+
+Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+(a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+(b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+(c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+(d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+Signed-off-by: [submitter's name and email address here]
+
Modified: branches/acq-experiment/Open-ILS/examples/apache/eg_vhost.conf
===================================================================
--- branches/acq-experiment/Open-ILS/examples/apache/eg_vhost.conf 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/examples/apache/eg_vhost.conf 2008-05-26 19:52:40 UTC (rev 9708)
@@ -261,23 +261,3 @@
allow from all
</Location>
-
-# ----------------------------------------------------------------------------------
-# Django admin interface (experimental)
-# - requires mod_python and django
-# - requires a symlink from WEBROOT/media to
-# /usr/lib/python2.4/site-packages/django/contrib/admin/media/ (or similar)
-# ----------------------------------------------------------------------------------
-#<Location /ils_setup/>
-# Order deny,allow
-# Deny from all
-# Allow from 10.0.0.0/8
-# SetHandler mod_python
-# PythonHandler django.core.handlers.modpython
-# SetEnv DJANGO_SETTINGS_MODULE ils_admin.settings
-# PythonDebug On
-# PythonPath "['/openils/var/admin/', '/usr/lib/python2.4/site-packages/'] +sys.path"
-# PythonAutoReload On
-#</Location>
-
-
Modified: branches/acq-experiment/Open-ILS/src/extras/org_tree_js.pl
===================================================================
--- branches/acq-experiment/Open-ILS/src/extras/org_tree_js.pl 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/src/extras/org_tree_js.pl 2008-05-26 19:52:40 UTC (rev 9708)
@@ -13,6 +13,8 @@
die "usage: perl org_tree_js.pl <bootstrap_config>" unless $ARGV[0];
OpenSRF::System->bootstrap_client(config_file => $ARGV[0]);
+my $locale = $ARGV[1] || '';
+
Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("IDL"));
# must be loaded after the IDL is parsed
@@ -20,15 +22,17 @@
warn "removing OrgTree from the cache...\n";
my $cache = OpenSRF::Utils::Cache->new;
-$cache->delete_cache('orgtree');
+$cache->delete_cache("orgtree.$locale");
# fetch the org_unit's and org_unit_type's
my $e = OpenILS::Utils::CStoreEditor->new;
+$e->session->session_locale($locale) if ($locale);
+
my $types = $e->retrieve_all_actor_org_unit_type;
my $tree = $e->request(
'open-ils.cstore.direct.actor.org_unit.search.atomic',
{id => {"!=" => undef}},
- {order_by => {aou => 'name'}}
+ {order_by => {aou => 'name'}, no_i18n => $locale ? 0 : 1 }
);
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2008-05-26 19:52:40 UTC (rev 9708)
@@ -315,7 +315,7 @@
<option value="biblio">Bibliographic Records</option>
<option value="authority">Authority Records</option>
</select>
- <br/> Record Fromat:
+ <br/> Record Format:
<select name="format">
<option value="USMARC">MARC21</option>
<option value="UNIMARC">UNIMARC</option>
Copied: branches/acq-experiment/Open-ILS/web/conify/global/config/marc_code_maps.html (from rev 9707, trunk/Open-ILS/web/conify/global/config/marc_code_maps.html)
===================================================================
--- branches/acq-experiment/Open-ILS/web/conify/global/config/marc_code_maps.html (rev 0)
+++ branches/acq-experiment/Open-ILS/web/conify/global/config/marc_code_maps.html 2008-05-26 19:52:40 UTC (rev 9708)
@@ -0,0 +1,250 @@
+<!--
+# Copyright (C) 2008 Georgia Public Library Service / Equinox Software, Inc
+# Mike Rylander <miker at esilibrary.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Confiy :: Global :: Permission :: Permission List</title>
+
+ <style type="text/css">
+ @import url("/js/dojo/dojox/grid/_grid/tundraGrid.css");
+ @import url("/js/dojo/dojo/resources/dojo.css");
+ @import url("/js/dojo/dijit/themes/tundra/tundra.css");
+ @import url("/js/dojo/dojox/widget/Toaster/Toaster.css");
+ </style>
+
+ <style>
+ html, body {
+ height: 100%;
+ width: 100%;
+ margin: 0px 0px 0px 0px;
+ padding: 0px 0px 0px 0px;
+ overflow: hidden;
+ }
+
+ #perm_grid {
+ border: 0px;
+ width: 100%;
+ height: 100%;
+ }
+
+ .grid_container {
+ width: 100%;
+ height: 100%;
+ overflow: scroll;
+ }
+ </style>
+
+ <!-- The OpenSRF API writ JS -->
+ <script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
+ <script language='javascript' src='/opac/common/js/Cookies.js' type='text/javascript'></script>
+ <script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
+ <script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
+
+ <!-- Dojo goodness -->
+ <script type="text/javascript" src="/js/dojo/dojo/dojo.js.uncompressed.js" djConfig="parseOnLoad: true"></script>
+ <script type="text/javascript" src="/js/dojo/dijit/dijit.js.uncompressed.js"></script>
+
+ <script type="text/javascript" src="marc_code_maps.js"></script>
+
+ <script type="text/javascript">
+ var grid_row_object_cache = {};
+ var layouts = {};
+
+ layouts.cam = [
+ { cells : [
+ [
+ { name : "Code", field : "code", width : "5em", editor : dojox.grid.editors.Dijit, rowSpan : "2" },
+ { name : "Value", field : "value", width : "auto", editor : dojox.grid.editors.Editor, style : "minHeight:1em;" },
+ { name : "Description", field : "description", width : "auto", editor : dojox.grid.editors.Editor, style : "minHeight:1em;" }
+ ],
+ [
+ { name : "Translation",
+ width : "10em",
+ height : "2em",
+ get : function (row) {
+ if (!grid_row_object_cache.cam) grid_row_object_cache.cam = [];
+ var r = this.grid.model.getRow(row);
+ if (r) {
+ grid_row_object_cache.cam[row] = new fieldmapper.cam().fromHash(this.grid.model.getRow(row));
+ setTimeout(
+ 'dojo.query(".cam_value_' + row + '").'+
+ 'instantiate('+
+ 'openils.widget.TranslatorPopup,{field:"value",'+
+ 'unique:"cam_'+row+'",'+
+ 'targetObject:"grid_row_object_cache.cam['+row+']"}'+
+ ');'+
+ 'cam_grid.rowHeightChanged('+row+');',
+ 0
+ );
+ var oldnode = dojo.byId('value_translation_cam_' + row);
+ if (oldnode) dijit.byNode(oldnode).destroyRecursive();
+ return '<span class="cam_value_'+row+'"></span>';
+ }
+ return '';
+ }
+ },
+ { name : "Translation",
+ width : "10em",
+ height : "2em",
+ get : function (row) {
+ if (!grid_row_object_cache.cam) grid_row_object_cache.cam = [];
+ var r = this.grid.model.getRow(row);
+ if (r) {
+ grid_row_object_cache.cam[row] = new fieldmapper.cam().fromHash(this.grid.model.getRow(row));
+ setTimeout(
+ 'dojo.query(".cam_description_' + row + '").'+
+ 'instantiate('+
+ 'openils.widget.TranslatorPopup,{field:"description",'+
+ 'unique:"cam_'+row+'",'+
+ 'targetObject:"grid_row_object_cache.cam['+row+']"}'+
+ ');'+
+ 'cam_grid.rowHeightChanged('+row+');',
+ 0
+ );
+ var oldnode = dojo.byId('description_translation_cam_' + row);
+ if (oldnode) dijit.byNode(oldnode).destroyRecursive();
+ return '<span class="cam_description_'+row+'"></span>';
+ }
+ return '';
+ }
+ }
+ ]
+ ]
+ }
+ ];
+
+ var codelist = ['cam','cblvl','cifm','citm','clm','clfm','cvrfm'];
+ var hashes = {};
+ var objects = {};
+ var models = {};
+ for (var i in codelist) {
+ var classname = codelist[i];
+
+ hashes[classname] = fieldmapper.standardRequest(
+ [ 'open-ils.fielder', 'open-ils.fielder.' + classname + '.atomic'],
+ [ { query : { code : { '!=' : null } } } ]
+ );
+
+ if (!hashes[classname]) continue;
+
+ objects[classname] = dojo.map(
+ hashes[classname].concat(),
+ new Function('x', 'return new fieldmapper.' + classname + '().fromHash( x );')
+ );
+
+ stores[classname] = new dojo.data.ItemFileWriteStore(
+ { data : fieldmapper[classname].toStoreData( objects[classname], 'value' ) }
+ );
+
+ if (classname != 'cam') {
+ layouts[classname] = [
+ { cells : [
+ [
+ { name : "Code", field : "code", width : "5em", editor : dojox.grid.editors.Dijit, rowSpan : "2" },
+ { name : "Value", field : "value", width : "auto", editor : dojox.grid.editors.Editor, style : "minHeight:1em;" }
+ ],
+ [
+ { name : "Translation",
+ width : "10em",
+ height : "2em",
+ get : function (row) {
+ if (!grid_row_object_cache[classname]) grid_row_object_cache[classname] = [];
+ var r = this.grid.model.getRow(row);
+ if (r) {
+ grid_row_object_cache[classname][row] = new fieldmapper[classname]().fromHash(this.grid.model.getRow(row));
+ setTimeout(
+ 'dojo.query(".'+classname+'_value_' + row + '").'+
+ 'instantiate('+
+ 'openils.widget.TranslatorPopup,{field:"value",'+
+ 'unique:"'+classname+'_'+row+'",'+
+ 'targetObject:"grid_row_object_cache.'+classname+'['+row+']"}'+
+ ');'+
+ classname+'_grid.rowHeightChanged('+row+');',
+ 0
+ );
+ var oldnode = dojo.byId('value_translation_'+classname+'_' + row);
+ if (oldnode) dijit.byNode(oldnode).destroyRecursive();
+ return '<span class="'+classname+'_value_'+row+'"></span>';
+ }
+ return '';
+ }
+ }
+ ]
+ ]
+ }
+ ];
+ }
+ }
+
+ </script>
+
+ </head>
+
+ <body class="tundra" id='pagebody'>
+
+ <div dojoType="dijit.layout.TabContainer" class="grid_container" orientation="vertical">
+
+ <div dojoType="dijit.layout.ContentPane" class="grid_container" orientation="vertical" label="Audience Map">
+
+ <div dojoType="dijit.layout.LayoutContainer" class="grid_container" orientation="vertical">
+
+ <div dojoType="dijit.form.Form" orientation="horizontal" style="margin-top: 5px;" layoutAlign="top" onSubmit="create_marc_code">
+ <div>New Audience Map:</div>
+ <input type="hidden" name="classname" value="cam"/>
+ <label for="code">New Code</label><input dojoType="dijit.form.TextBox" name="code" title="New Code"/>
+ <label for="value">New Value</label><input dojoType="dijit.form.TextBox" name="value" title="New Value"/>
+ <label for="description">Description</label><input dojoType="dijit.form.TextBox" name="description" title="Description"/>
+ <button type="submit" dojoType="dijit.form.Button" label="Add"></button>
+ </div>
+
+ <div dojoType="dijit.layout.ContentPane" style="width:100%; height:100%;" layoutAlign="client">
+ <div dojoType="dojox.grid.data.DojoData" jsId="cam_model"store="stores.cam" query="{ code : '*' }"></div>
+ <div dojoType="dojox.Grid" jsId="cam_grid" model="cam_model" structure="layouts.cam"></div>
+ <button jsId="delete_cam_button" dojoType="dijit.form.Button" label="Delete Selected" onclick="delete_grid_selection('cam',cam_grid)"></button>
+ </div>
+
+ </div>
+
+ </div>
+
+ <div dojoType="dijit.layout.ContentPane" class="grid_container" orientation="vertical">
+
+ <div dojoType="dijit.layout.LayoutContainer" class="grid_container" orientation="vertical">
+
+ <div dojoType="dijit.form.Form" orientation="horizontal" style="margin-top: 5px;" layoutAlign="top" onSubmit="create_marc_code">
+ <div>New Bib Level:</div>
+ <input type="hidden" name="classname" value="cblvl"/>
+ <label for="code">New Code</label><input dojoType="dijit.form.TextBox" name="code" title="New Code"/>
+ <label for="value">New Value</label><input dojoType="dijit.form.TextBox" name="value" title="New Value"/>
+ <button type="submit" dojoType="dijit.form.Button" label="Add"></button>
+ </div>
+
+ <div dojoType="dijit.layout.ContentPane" style="width:100%; height:100%;" layoutAlign="client">
+ <div dojoType="dojox.grid.data.DojoData" jsId="cblvl_model"store="stores.cblvl" query="{ code : '*' }"></div>
+ <div dojoType="dojox.Grid" jsId="cblvl_grid" model="cblvl_model" structure="layouts.cblvl"></div>
+ <button jsId="delete_cblvl_button" dojoType="dijit.form.Button" label="Delete Selected" onclick="delete_grid_selection('cblvl',cblvl_grid)"></button>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div dojoType="dijit.layout.ContentPane" orientation="horizontal" style="margin-bottom: 5px;" layoutAlign="bottom">
+ <button jsId="save_button" dojoType="dijit.form.Button" label="Save Changes" onClick="save_them_all()"></button>
+ </div>
+
+ </body>
+</html>
Copied: branches/acq-experiment/Open-ILS/web/conify/global/config/marc_code_maps.js (from rev 9707, trunk/Open-ILS/web/conify/global/config/marc_code_maps.js)
===================================================================
--- branches/acq-experiment/Open-ILS/web/conify/global/config/marc_code_maps.js (rev 0)
+++ branches/acq-experiment/Open-ILS/web/conify/global/config/marc_code_maps.js 2008-05-26 19:52:40 UTC (rev 9708)
@@ -0,0 +1,220 @@
+/*
+# ---------------------------------------------------------------------------
+# Copyright (C) 2008 Georgia Public Library Service / Equinox Software, Inc
+# Mike Rylander <miker at esilibrary.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# ---------------------------------------------------------------------------
+*/
+
+dojo.require('fieldmapper.dojoData');
+dojo.require('openils.widget.TranslatorPopup');
+dojo.require('dojo.cookie');
+dojo.require('dojo.parser');
+dojo.require('dojo.string');
+dojo.require('dojo.data.ItemFileWriteStore');
+dojo.require('dijit.form.TextBox');
+dojo.require('dijit.form.ValidationTextBox');
+dojo.require('dijit.form.Textarea');
+dojo.require('dijit.layout.TabContainer');
+dojo.require('dijit.layout.ContentPane');
+dojo.require('dijit.layout.LayoutContainer');
+dojo.require('dijit.layout.BorderContainer');
+dojo.require('dojox.widget.Toaster');
+dojo.require('dojox.fx');
+dojo.require('dojox.grid.Grid');
+dojo.require('dojox.grid._data.model');
+dojo.require("dojox.grid.editors");
+
+// some handy globals
+var cgi = new CGI();
+var ses = dojo.cookie('ses') || cgi.param('ses');
+var pCRUD = new OpenSRF.ClientSession('open-ils.permacrud');
+
+var stores = {};
+var current_item = {};
+var highlighter = {
+ green : dojox.fx.highlight( { color : '#B4FFB4', node : 'grid_container', duration : 500 } ),
+ red : dojox.fx.highlight( { color : '#FF2018', node : 'grid_container', duration : 500 } )
+};
+
+var dirtyStore = [];
+
+function status_update (markup) {
+ if (parent !== window && parent.status_update) parent.status_update( markup );
+}
+
+function save_code (classname) {
+
+ var item = current_item[classname];
+ var obj = new fieldmapper[classname]().fromStoreItem( item );
+
+ obj.ischanged( 1 );
+ obj.code( dojo.string.trim( obj.code() ) );
+ obj.value( dojo.string.trim( obj.value() ) );
+ if(classname == 'cam' || classname == 'clfm')
+ obj.description( dojo.string.trim( obj.description() ) );
+
+ pCRUD.request({
+ method : 'open-ils.permacrud.update.' + classname,
+ timeout : 10,
+ params : [ ses, modified_ppl ],
+ onerror : function (r) {
+ highlighter.red.play();
+ status_update( 'Problem saving data for ' + classname + ' ' + obj.code() );
+ },
+ oncomplete : function (r) {
+ var res = r.recv();
+ if ( res && res.content() ) {
+ stores[classname].setValue( current_item, 'ischanged', 0 );
+ highlighter.green.play();
+ status_update( 'Saved changes to ' + stores[classname].getValue( item, 'code' ) );
+ } else {
+ highlighter.red.play();
+ status_update( 'Problem saving data for ' + classname + ' ' + stores[classname].getValue( item, 'code' ) );
+ }
+ },
+ }).send();
+}
+
+function save_them_all (event) {
+
+ for (var classname in stores) {
+
+ var store = stores[classname];
+ store.fetch({
+ query : { ischanged : 1 },
+ onItem : function (item, req) { try { if (this.isItem( item )) window.dirtyStore.push( item ); } catch (e) { /* meh */ } },
+ scope : perm_store
+ });
+
+ var confirmation = true;
+
+ if (event && dirtyStore.length > 0) {
+ confirmation = confirm(
+ 'There are unsaved modified ' + classname + ' codes! '+
+ 'OK to save these changes, Cancel to abandon them.'
+ );
+ event = null;
+ }
+
+ if (confirmation) {
+ for (var i in dirtyStore) {
+ current_item[classname] = dirtyStore[i];
+ save_object(classname);
+ }
+
+ dirtyStore = [];
+ }
+ }
+}
+
+dojo.addOnUnload( save_them_all );
+
+function delete_grid_selection(classname, grid ) {
+
+ var selected_rows = grid.selection.getSelected();
+
+ var selected_items = [];
+ for (var i in selected_rows) {
+ selected_items.push(
+ grid.model.getRow( selected_rows[i] ).__dojo_data_item
+ );
+ }
+
+ grid.selection.clear();
+
+ for (var i in selected_items) {
+ var item = selected_items[i];
+
+ if ( confirm('Are you sure you want to delete ' + grid.model.store.getValue( item, 'value' ) + '?')) {
+
+ grid.model.store.setValue( item, 'isdeleted', 1 );
+
+ var obj = new fieldmapper[classname]().fromStoreItem( item );
+ obj.isdeleted( 1 );
+
+ pCRUD.request({
+ method : 'open-ils.permacrud.delete.' + classname,
+ timeout : 10,
+ params : [ ses, obj ],
+ onerror : function (r) {
+ highlighter.red.play();
+ status_update( 'Problem deleting ' + grid.model.store.getValue( item, 'value' ) );
+ },
+ oncomplete : function (r) {
+ var res = r.recv();
+ var old_name = grid.model.store.getValue( item, 'value' );
+ if ( res && res.content() ) {
+
+ grid.model.store.fetch({
+ query : { code : grid.model.store.getValue( item, 'code' ) },
+ onItem : function (item, req) { try { if (this.isItem( item )) this.deleteItem( item ); } catch (e) { /* meh */ } },
+ scope : grid.model.store
+ });
+
+ highlighter.green.play();
+ status_update( old_name + ' deleted' );
+ } else {
+ highlighter.red.play();
+ status_update( 'Problem deleting ' + old_name );
+ }
+ }
+ }).send();
+
+ }
+ }
+}
+
+function create_marc_code (data) {
+
+ var cl = data.classname;
+ if (!cl) return false;
+
+ data.code = dojo.string.trim( data.code );
+ data.value = dojo.string.trim( data.value );
+
+ if(!data.code || !data.value) return false;
+
+ if(cl == 'cam' || cl == 'clfm')
+ data.description = dojo.string.trim( data.description );
+
+ var new_fm_obj = new fieldmapper[cl]().fromHash( data )
+ new_fm_obj.isnew(1);
+
+ var err = false;
+ pCRUD.request({
+ method : 'open-ils.permacrud.create.' + cl,
+ timeout : 10,
+ params : [ ses, new_fm_obj ],
+ onerror : function (r) {
+ highlighter.red.play();
+ status_update( 'Problem calling method to create new ' + cl );
+ err = true;
+ },
+ oncomplete : function (r) {
+ var res = r.recv();
+ if ( res && res.content() ) {
+ var new_item_hash = res.content().toHash();
+ stores[cl].newItem( new_item_hash );
+ status_update( 'New ' + new_item_hash.code + ' ' + cl + ' created' );
+ highlighter.green.play();
+ } else {
+ highlighter.red.play();
+ status_update( 'Problem creating new Permission' );
+ err = true;
+ }
+ }
+ }).send();
+
+ return false;
+}
+
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/Fieldmapper.js 2008-05-26 19:52:40 UTC (rev 9708)
@@ -144,7 +144,6 @@
constructor : function () {
if (!this.a) this.a = [];
this.classname = this.declaredClass;
- this.Identifier = 'id';
this._fields = fmclasses[this.classname];
for( var pos = 0; pos < this._fields.length; pos++ ) {
var p = parseInt(pos) + 3;
@@ -154,6 +153,7 @@
}
});
fieldmapper[cl] = window[cl]; // alias into place
+ fieldmapper[cl].Identifier = 'id'; // alias into place
}
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/OrgUtils.js 2008-05-26 19:52:40 UTC (rev 9708)
@@ -24,6 +24,7 @@
dojo.require("fieldmapper.OrgTree", true);
dojo.require("fieldmapper.OrgLasso", true);
+ fieldmapper.aou.slim_ok = true;
fieldmapper.aou.globalOrgTree = {};
fieldmapper.aou.OrgCache = {};
fieldmapper.aou.OrgCacheSN = {};
@@ -45,12 +46,14 @@
}
fieldmapper.aou.LoadOrg = function (id, slim_ok) {
+ if (slim_ok == null) slim_ok = fieldmapper.aou.slim_ok;
var slim_o = fieldmapper.aou.OrgCache[id];
if (slim_o && (slim_ok || slim_o.loaded))
return fieldmapper.aou.OrgCache[id].org;
var o = fieldmapper.standardRequest(['open-ils.actor','open-ils.actor.org_unit.retrieve'],[null,id]);
+ o.children = fieldmapper.aou.OrgCache[o.id()].children;
fieldmapper.aou.OrgCache[o.id()] = { loaded : true, org : o };
return o;
}
@@ -65,7 +68,8 @@
ou_type : _l[i][1],
parent_ou : _l[i][2],
name : _l[i][3],
- opac_visible : _l[i][4]
+ opac_visible : _l[i][4],
+ shortname : _l[i][5]
})
};
@@ -125,21 +129,25 @@
return null;
}
- fieldmapper.aou.findOrgUnitSN = function (sn) {
+ fieldmapper.aou.findOrgUnitSN = function (sn, slim_ok) {
+ if (slim_ok == null) slim_ok = fieldmapper.aou.slim_ok;
var org = fieldmapper.aou.OrgCacheSN[sn];
if (!org) {
for (var i in fieldmapper.aou.OrgCache) {
var o = fieldmapper.aou.OrgCache[i];
- if (o.loaded && o.org.shortname() == sn) {
+ if (o.org.shortname() == sn) {
fieldmapper.aou.OrgCacheSN[o.org.shortname()] = o;
- return o.org;
+ org = o;
}
}
- org = fieldmapper.standardRequest(fieldmapper.OpenSRF.methods.FETCH_ORG_BY_SHORTNAME, sn);
+ if (!slim_ok && !fieldmapper.aou.OrgCache[org.id()].loaded) {
+ org = fieldmapper.standardRequest(fieldmapper.OpenSRF.methods.FETCH_ORG_BY_SHORTNAME, sn);
- fieldmapper.aou.OrgCache[org.id()] = { loaded : true, org : org };
- fieldmapper.aou.OrgCacheSN[org.shortname()] = { loaded : true, org : org };
+ org.children = fieldmapper.aou.OrgCache[org.id()].children;
+ fieldmapper.aou.OrgCache[org.id()] = { loaded : true, org : org };
+ fieldmapper.aou.OrgCacheSN[org.shortname()] = { loaded : true, org : org };
+ }
}
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/dojoData.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/dojoData.js 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/fieldmapper/dojoData.js 2008-05-26 19:52:40 UTC (rev 9708)
@@ -42,7 +42,7 @@
if (!list) list = {};
// a sane default
- if (!params.identifier) params.identifier = 'id';
+ if (!params.identifier) params.identifier = this.Identifier;
if (!label) label = params.label;
if (!label) label = params.identifier;
@@ -96,17 +96,17 @@
fieldmapper.aou.toStoreData = function (list, label) {
if (!label) label = 'shortname';
- return _toStoreData(list, label, { 'parent' : 'parent_ou', 'children' : 'children' });
+ return _toStoreData.call(this, list, label, { 'parent' : 'parent_ou', 'children' : 'children' });
}
fieldmapper.aout.toStoreData = function (list, label) {
if (!label) label = 'name';
- return _toStoreData(list, label, { 'parent' : 'parent', 'children' : 'children' });
+ return _toStoreData.call(this, list, label, { 'parent' : 'parent', 'children' : 'children' });
}
fieldmapper.pgt.toStoreData = function (list, label) {
if (!label) label = 'name';
- return _toStoreData(list, label, { 'parent' : 'parent', 'children' : 'children' });
+ return _toStoreData.call(this, list, label, { 'parent' : 'parent', 'children' : 'children' });
}
/*
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/widget/TranslatorPopup.js 2008-05-26 19:52:40 UTC (rev 9708)
@@ -39,7 +39,7 @@
[dijit._Widget, dijit._Templated],
{
- templateString : "<span dojoAttachPoint='node'><div id='${field}_translation_button_${unique}' dojoAttachPoint='translateLabelNode' dojoType='dijit.form.DropDownButton'><span>Translate</span><div id='${field}_translation_${unique}' dojoAttachPoint='tooltipDialog' dojoType='dijit.TooltipDialog'><div dojoType='dijit.layout.ContentPane'><table><tbody class='translation_tbody_template' style='display:none; visiblity:hidden;'><tr><th dojoAttachPoint='localeLabelNode'/><td class='locale'><div class='locale_combobox'></div></td><th dojoAttachPoint='translationLabelNode'/><td class='translation'><div class='translation_textbox'></div></td><td><button class='create_button' style='display:none; visiblity:hidden;'><span dojoAttachPoint='createButtonNode'/></button><button class='update_button' style='display:none; visiblity:hidden;'><span dojoAttachPoint='updateButtonNode'/></button><button class='delete_button' style='display:none; visiblity:hidden;'><span dojoAttachPoint='removeBu
ttonNode'/></button></td></tr></tbody><tbody class='translation_tbody'></tbody></table></div></div></div></span>",
+ templateString : "<span dojoAttachPoint='node'><div id='${field}_translation_button_${unique}' dojoAttachPoint='translateLabelNode' dojoType='dijit.form.DropDownButton'><span>Translate</span><div id='${field}_translation_${unique}' dojoAttachPoint='tooltipDialog' dojoType='dijit.TooltipDialog'><div dojoType='dijit.layout.ContentPane'><table><tbody class='translation_tbody_template' style='display:none; visibility:hidden;'><tr><th dojoAttachPoint='localeLabelNode'/><td class='locale'><div class='locale_combobox'></div></td><th dojoAttachPoint='translationLabelNode'/><td class='translation'><div class='translation_textbox'></div></td><td><button class='create_button' style='display:none; visibility:hidden;'><span dojoAttachPoint='createButtonNode'/></button><button class='update_button' style='display:none; visibility:hidden;'><span dojoAttachPoint='updateButtonNode'/></button><button class='delete_button' style='display:none; visibility:hidden;'><span dojoAttachPoint='remo
veButtonNode'/></button></td></tr></tbody><tbody class='translation_tbody'></tbody></table></div></div></div></span>",
widgetsInTemplate: true,
field : "",
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.js
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.js 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.js 2008-05-26 19:52:40 UTC (rev 9708)
@@ -246,6 +246,25 @@
},
false
);
+
+ var y = document.getElementById('new_window_btn');
+ y.setAttribute('label', offlineStrings.getString('main.new_window_btn.label'));
+ y.addEventListener(
+ 'command',
+ function() {
+ if (G.data.session) {
+ try {
+ G.window.open('chrome://open_ils_staff_client/content/main/menu_frame.xul?server=' +
+ G.data.server,'main','chrome,resizable' );
+
+ } catch(E) { alert(E); }
+ } else {
+ alert ( offlineStrings.getString('main.new_window_btn.login_first_warning') );
+ }
+ },
+ false
+ );
+
if ( found_ws_info_in_Achrome() ) {
//var hbox = x.parentNode; var b = document.createElement('button');
//b.setAttribute('label','Migrate legacy settings'); hbox.appendChild(b);
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.xul
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.xul 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.xul 2008-05-26 19:52:40 UTC (rev 9708)
@@ -85,6 +85,9 @@
<hbox>
<label id="version_label"/>
<button id="about_btn"/>
+
+ <label id="new_window_label"/>
+ <button id="new_window_btn"/>
</hbox>
<label value=" "/>
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties 2008-05-26 19:52:40 UTC (rev 9708)
@@ -139,6 +139,8 @@
main.on_debug.clear_cache=cache cleared
main.on_debug.debug=debug the debug :D
main.about_btn.label=About this client...
+main.new_window_btn.label=Open New Window
+main.new_window_btn.login_first_warning=Please login first!
main.settings.migrate=This version of the staff client stores local settings in a different location than your previous installation. Should we attempt to migrate these settings?
main.settings.migrate.failed=WARNING: Unable to migrate legacy settings. The settings and configuration files appear to exist in multiple locations. \nTo resolve this problem manually, please consider:\n\t%1$s\nwhich is in the directory where we want to store settings for the current operating system account, and:\n\t%2$s\nwhich is where we used to store such information.\n
main.settings.migrate.confirm=Move the settings and configuration files from\n%1$s\nto\n%2$s?
Deleted: branches/acq-experiment/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul 2008-05-26 19:52:40 UTC (rev 9708)
@@ -1,95 +0,0 @@
-<?xml version="1.0"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Patron Display -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- STYLESHEETS -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="/xul/server/skin/circ.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window PUBLIC "" ""[
- <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
-]>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
-<?xul-overlay href="/xul/server/patron/holds_overlay.xul"?>
-
-<window id="holds_win"
- onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
- <!-- BEHAVIOR -->
- <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
- <scripts id="openils_util_scripts"/>
-
- <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
- <script>
- <![CDATA[
- function my_init() {
- try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
- JSAN.errorLevel = "die"; // none, warn, or die
- JSAN.addRepository('/xul/server/');
- JSAN.use('util.error'); g.error = new util.error();
- g.error.sdump('D_TRACE','my_init() for holds.xul');
-
- JSAN.use('patron.holds'); g.holds = new patron.holds();
- g.holds.init(
- {
- 'tree_id' : 'holds_list',
- 'patron_id' : xul_param('patron_id'),
- 'docid' : xul_param('docid'),
- 'shelf' : xul_param('shelf'),
- 'pull' : xul_param('pull'),
- }
- );
- window.refresh = function(p) { g.holds.retrieve(p); }
-
- default_focus();
-
- } catch(E) {
- var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['patron/holds.xul', E]);
- try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
- alert(err_msg);
- }
- }
-
- function default_focus() { try { document.getElementById('holds_print').focus(); } catch(E) { } }
-
- ]]>
- </script>
-
- <commandset id="holds_cmds">
- <command id="sel_mark_items_damaged" disabled="true"/>
- <command id="sel_mark_items_missing" disabled="true"/>
- <command id="sel_copy_details" disabled="true"/>
- <command id="sel_patron" disabled="true"/>
- <command id="sel_clip" />
- <command id="cmd_holds_print" />
- <command id="cmd_show_catalog" />
- <command id="cmd_retrieve_patron" />
- <command id="cmd_show_notifications" />
- <command id="cmd_holds_edit_pickup_lib" />
- <command id="cmd_holds_edit_phone_notify" />
- <command id="cmd_holds_edit_email_notify" />
- <command id="cmd_holds_edit_selection_depth" disabled="true" hidden="true"/>
- <command id="cmd_broken" disabled="true" hidden="true"/>
- <command id="cmd_holds_retarget"/>
- <command id="cmd_holds_cancel" />
- <command id="save_columns" />
- </commandset>
-
- <popupset id="holds_popupset"/>
-
- <box id="holds_main" />
-
-</window>
-
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/server/admin/index.xhtml
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/server/admin/index.xhtml 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/server/admin/index.xhtml 2008-05-26 19:52:40 UTC (rev 9708)
@@ -70,7 +70,7 @@
</div>
</td><td>
<div style='padding: 8px;'>
- <a href='javascript:_l("hold_pull_list.xul");'>&staff.server.admin.index.hold_pull_list;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+ <a href='javascript:window.xulG.new_tab("/xul/server/patron/holds.xul",{"tab_name":"&staff.server.admin.index.hold_pull_list;"},{});'>&staff.server.admin.index.hold_pull_list;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
</div>
<div style='padding: 8px;'>
<a href='javascript:_l("hold_pull_list_classic.xhtml");'>&staff.server.admin.index.hold_pull_list_classic;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
Modified: branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.js
===================================================================
--- branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.js 2008-05-26 18:17:52 UTC (rev 9707)
+++ branches/acq-experiment/Open-ILS/xul/staff_client/server/cat/record_buckets.js 2008-05-26 19:52:40 UTC (rev 9708)
@@ -655,7 +655,7 @@
xml += '<table><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
xml += '<td><input value="' + $("catStrings").getString('staff.cat.record_buckets.merge_records.lead')
- + ' id="record_' + record_ids[i] + '" type="radio" name="lead"';
+ xml += '" id="record_' + record_ids[i] + '" type="radio" name="lead"';
xml += ' onclick="' + "try { var x = $('lead'); x.setAttribute('value',";
xml += record_ids[i] + '); x.disabled = false; } catch(E) { alert(E); }">';
xml += '</input>' + $("catStrings").getFormattedString('staff.cat.record_buckets.merge_records.lead_record_number',[record_ids[i]]) + '</td>';
More information about the open-ils-commits
mailing list