[open-ils-commits] r9443 - in branches/acq-experiment: .
Open-ILS/src Open-ILS/src/apachemods Open-ILS/src/sql/Pg
Open-ILS/web/conify/global/permission Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Apr 23 21:18:15 EDT 2008
Author: erickson
Date: 2008-04-23 20:38:57 -0400 (Wed, 23 Apr 2008)
New Revision: 9443
Removed:
branches/acq-experiment/Open-ILS/src/apachemods/fieldmapper_lookup-gen.pl
branches/acq-experiment/Open-ILS/src/apachemods/fieldmapper_lookup.h
branches/acq-experiment/Open-ILS/src/apachemods/json_xml.c
branches/acq-experiment/Open-ILS/src/apachemods/json_xml.h
branches/acq-experiment/Open-ILS/src/apachemods/mod_xmlbuilder.h
Modified:
branches/acq-experiment/
branches/acq-experiment/Open-ILS/src/Makefile
branches/acq-experiment/Open-ILS/src/apachemods/Makefile
branches/acq-experiment/Open-ILS/src/sql/Pg/reporter-schema.sql
branches/acq-experiment/Open-ILS/web/conify/global/permission/perm_list.html
branches/acq-experiment/Open-ILS/web/conify/global/permission/perm_list.js
branches/acq-experiment/Open-ILS/web/js/dojo/openils/User.js
Log:
Merged revisions 9437,9440-9442 via svnmerge from
svn://svn.open-ils.org/ILS/trunk
........
r9437 | erickson | 2008-04-22 22:50:31 -0400 (Tue, 22 Apr 2008) | 1 line
fixed what appears to be some copy paste errors. no longer requiring kwargs to be non-null on User create
........
r9440 | miker | 2008-04-23 08:23:10 -0400 (Wed, 23 Apr 2008) | 1 line
adding helper views for overdue, running and pending reports
........
r9441 | erickson | 2008-04-23 11:13:45 -0400 (Wed, 23 Apr 2008) | 4 lines
Removing dead code and their makefile counterparts
........
r9442 | miker | 2008-04-23 13:17:15 -0400 (Wed, 23 Apr 2008) | 1 line
adding translation for description
........
Property changes on: branches/acq-experiment
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-9435
+ /trunk:1-9442
Modified: branches/acq-experiment/Open-ILS/src/Makefile
===================================================================
--- branches/acq-experiment/Open-ILS/src/Makefile 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/src/Makefile 2008-04-24 00:38:57 UTC (rev 9443)
@@ -36,14 +36,6 @@
@echo $@
make -C apachemods mod_xmlent.so
-oils_cgi:
- @echo $@
- make -C apachemods oils_cgi.so
-
-oils_cgi-install:
- @echo $@
- make -C apachemods oils_cgi-install
-
mod_xmlent-install:
@echo $@
make -C apachemods mod_xmlent-install
@@ -91,12 +83,6 @@
mkdir -p $(WEBDIR)/opac/extras/slimpac/
-libfieldmapper:
- make -C apachemods libfieldmapper.so
-
-libfieldmapper-install:
- make -C apachemods libfieldmapper-install
-
c_apps:
@echo $@
make -C c-apps
Modified: branches/acq-experiment/Open-ILS/src/apachemods/Makefile
===================================================================
--- branches/acq-experiment/Open-ILS/src/apachemods/Makefile 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/src/apachemods/Makefile 2008-04-24 00:38:57 UTC (rev 9443)
@@ -1,49 +1,14 @@
-
LDLIBS += -lxml2 -lopensrf -lxslt
-all: mod_xmlent.so libfieldmapper.so
+all: mod_xmlent.so
-install: libfieldmapper-install mod_xmlent-install
+install: mod_xmlent-install
-
-apachetools.o:
- cp ../../../OpenSRF/src/gateway/apachetools.o .
-
-json_xml.o: json_xml.c json_xml.h
-
-fieldmapper_lookup.o: fieldmapper_lookup.c fieldmapper_lookup.h
-
-
-fieldmapper_lookup.c:
- ./fieldmapper_lookup-gen.pl fieldmapper_lookup.c
-
-
mod_xmlent.o: mod_xmlent.c
mod_xmlent.so: mod_xmlent.o
@echo $@
$(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 mod_xmlent.o -lexpat -o $@
-
-# ------------------------------------------------------
-
-libfieldmapper.so: fieldmapper_lookup.o
- @echo $@
- mkdir -p $(TMPDIR)/openils/
- cp fieldmapper_lookup.h $(TMPDIR)/openils/
- $(CC) $(LDFLAGS) $(LDLIBS) -shared -W1 fieldmapper_lookup.o -o $@
- cp libfieldmapper.so $(TMPDIR)/libfieldmapper.so
-
-# ------------------------------------------------------
-
-
-libfieldmapper-install: libfieldmapper.so
- echo installing libfieldmapper.so
- mkdir -p $(INCDIR)/
- @echo "Copying fieldmapper_lookup.h to $(INCDIR)"
- cp fieldmapper_lookup.h $(INCDIR)/
- cp libfieldmapper.so $(LIBDIR)/libfieldmapper.so
-
-
mod_xmlent-install:
$(APXS2) -i -a -n xmlent mod_xmlent.so
@@ -51,6 +16,3 @@
clean:
echo $@
/bin/rm -f *.o *.so
- /bin/rm -f fieldmapper_lookup.c
-
-
Deleted: branches/acq-experiment/Open-ILS/src/apachemods/fieldmapper_lookup-gen.pl
===================================================================
--- branches/acq-experiment/Open-ILS/src/apachemods/fieldmapper_lookup-gen.pl 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/src/apachemods/fieldmapper_lookup-gen.pl 2008-04-24 00:38:57 UTC (rev 9443)
@@ -1,106 +0,0 @@
-#!/usr/bin/perl
-use strict;
-use lib qw(../perlmods/OpenILS/Utils/ ../../../OpenSRF/src/perlmods);
-
-use Fieldmapper (IDL => '../../examples/fm_IDL.xml');
-
-my $map = {};
-$map = $Fieldmapper::fieldmap unless ($@);
-
-die $@ if ($@);
-
-
-if(!$ARGV[0]) {
- print "usage: $0 <source_file>\n";
- exit;
-}
-
-warn "Generating fieldmapper-c code...\n";
-
-
-print $ARGV[0] . "\n";
-
-open(SOURCE, ">$ARGV[0]");
-
-print SOURCE <<C;
-#include "fieldmapper_lookup.h"
-
-
-char * fm_pton(char * class, int pos) {
- if (class == NULL) return NULL;
-C
-
-
-for my $object (keys %$map) {
- my $short_name= $map->{$object}->{hint};
- print SOURCE <<" C";
- else if (!strcmp(class, "$short_name")) {
- switch (pos) {
- C
- for my $field (keys %{$map->{$object}->{fields}}) {
- my $position = $map->{$object}->{fields}->{$field}->{position};
- print SOURCE <<" C";
- case $position:
- return strdup("$field");
- break;
- C
- }
- print SOURCE " }\n";
- print SOURCE " }\n";
-}
-print SOURCE <<C;
- return NULL;
-}
-
-int isFieldmapper(char* class) {
- if (class == NULL) return 0;
-C
-
-for my $object (keys %$map) {
- my $short_name= $map->{$object}->{hint};
- print SOURCE " else if (!strcmp(class, \"$short_name\")) return 1;\n";
-}
-print SOURCE <<C;
- return 0;
-}
-
-int fm_ntop(char* class, char* field) {
- if (class == NULL) return -1;
-C
-
-
-for my $object (keys %$map) {
- my $short_name= $map->{$object}->{hint};
- print SOURCE " else if (!strcmp(class, \"$short_name\")) {\n";
- for my $field (keys %{$map->{$object}->{fields}}) {
- my $position = $map->{$object}->{fields}->{$field}->{position};
- print SOURCE " if (!strcmp(field,\"$field\")) return $position;\n";
- }
- print SOURCE " }\n"
-}
-
-print SOURCE " return -1;\n}\n";
-
-
-
-print SOURCE <<C;
-static osrfList* __fm_classes = NULL;
-osrfList* fm_classes() {
- if(__fm_classes) return __fm_classes;
- __fm_classes = osrfNewList();
-C
-
-for my $object (keys %$map) {
- my $short_name= $map->{$object}->{hint};
- $object =~ s/Fieldmapper:://o;
- $object =~ s/::/./og;
- print SOURCE "\tosrfListPush(__fm_classes, \"$short_name\");\n";
- print SOURCE "\tosrfListPush(__fm_classes, \"$object\");\n";
-}
-
-print SOURCE <<C;
- return __fm_classes;
-}
-C
-
-
Deleted: branches/acq-experiment/Open-ILS/src/apachemods/fieldmapper_lookup.h
===================================================================
--- branches/acq-experiment/Open-ILS/src/apachemods/fieldmapper_lookup.h 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/src/apachemods/fieldmapper_lookup.h 2008-04-24 00:38:57 UTC (rev 9443)
@@ -1,16 +0,0 @@
-
-#include <string.h>
-#include <stdio.h>
-#include "opensrf/osrf_list.h"
-#include "opensrf/osrf_hash.h"
-
-int isFieldmapper(char*);
-char * fm_pton(char *, int);
-int fm_ntop(char *, char *);
-
-/**
- * Returns a list of class names with the
- * form [ hint, apiname, hint, apiname, ...]
- * This list is static and should *not* be freed by the caller
- */
-osrfList* fm_classes();
Deleted: branches/acq-experiment/Open-ILS/src/apachemods/json_xml.c
===================================================================
--- branches/acq-experiment/Open-ILS/src/apachemods/json_xml.c 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/src/apachemods/json_xml.c 2008-04-24 00:38:57 UTC (rev 9443)
@@ -1,185 +0,0 @@
-#include "json_xml.h"
-#include "fieldmapper_lookup.h"
-
-static void _rest_xml_output(growing_buffer*, const jsonObject*, char*, int, int);
-static char* _escape_xml (const char*);
-
-char* json_string_to_xml(char* content) {
- jsonObject * obj;
- growing_buffer * res_xml;
- int i;
-
- obj = json_parse_string( content );
-
- if (!obj)
- return NULL;
-
- res_xml = buffer_init(1024);
- buffer_add(res_xml, "<response>");
-
- if(obj->type == JSON_ARRAY ) {
- for( i = 0; i!= obj->size; i++ ) {
- _rest_xml_output(res_xml, jsonObjectGetIndex(obj,i), NULL, 0,0);
- }
- } else {
- _rest_xml_output(res_xml, obj, NULL, 0,0);
- }
-
- buffer_add(res_xml, "</response>");
-
- jsonObjectFree(obj);
- return buffer_release(res_xml);
-}
-
-char* _escape_xml (const char* text) {
- growing_buffer* b = buffer_init(256);
- int len = strlen(text);
- int i;
- for (i = 0; i < len; i++) {
- if (text[i] == '&')
- buffer_add(b,"&");
- else if (text[i] == '<')
- buffer_add(b,"<");
- else if (text[i] == '>')
- buffer_add(b,">");
- else
- buffer_add_char(b,text[i]);
- }
- return buffer_release(b);
-}
-
-static void _rest_xml_output(growing_buffer* buf, const jsonObject* obj,
- char * obj_class, int arr_index, int notag) {
- char * tag;
- int i;
-
- if(!obj) return;
-
- if (obj->classname)
- notag = 1;
-
- if(isFieldmapper(obj_class)) {
- tag = fm_pton(obj_class,arr_index);
- } else if(obj_class) {
- tag = strdup(obj_class);
- } else {
- tag = strdup("datum");
- }
-
-
- /* add class hints if we have a class name */
- if(obj->classname) {
- if(obj->type == JSON_NULL) {
- buffer_fadd(buf,"<%s><Object class_hint=\"%s\"/></%s>", tag, obj->classname, tag);
- free(tag);
- return;
- } else {
- buffer_fadd(buf,"<%s><Object class_hint=\"%s\">", tag, obj->classname);
- }
- }
-
-
- /* now add the data */
- if(obj->type == JSON_NULL) {
- if (!notag)
- buffer_fadd(buf, "<%s/>",tag);
- } else if(obj->type == JSON_BOOL && obj->value.b) {
- if (notag)
- buffer_add(buf, "true");
- else
- buffer_fadd(buf, "<%s>true</%s>",tag,tag);
-
- } else if(obj->type == JSON_BOOL && ! obj->value.b) {
- if (notag)
- buffer_add(buf, "false");
- else
- buffer_fadd(buf, "<%s>false</%s>",tag,tag);
-
- } else if (obj->type == JSON_STRING) {
- if (notag) {
- char * t = _escape_xml(jsonObjectGetString(obj));
- buffer_add(buf,t);
- free(t);
- } else {
- char * t = _escape_xml(jsonObjectGetString(obj));
- buffer_fadd(buf,"<%s>%s</%s>",tag,t,tag);
- free(t);
- }
-
- } else if(obj->type == JSON_NUMBER) {
- double x = jsonObjectGetNumber(obj);
- if (notag) {
- if (x == (int)x)
- buffer_fadd(buf,"%d",(int)x);
- else
- buffer_fadd(buf,"%f",x);
- } else {
- if (x == (int)x)
- buffer_fadd(buf,"<%s>%d</%s>",tag, (int)x,tag);
- else
- buffer_fadd(buf,"<%s>%f</%s>",tag, x,tag);
- }
-
- } else if (obj->type == JSON_ARRAY) {
- if (!notag) {
- if(!isFieldmapper(obj_class))
- buffer_add(buf,"<array>");
- else
- buffer_fadd(buf,"<%s>",tag);
- }
-
- for( i = 0; i!= obj->size; i++ ) {
- _rest_xml_output(buf, jsonObjectGetIndex(obj,i), obj->classname, i,0);
- }
-
- if (!notag) {
- if(!isFieldmapper(obj_class))
- buffer_add(buf,"</array>");
- else
- buffer_fadd(buf,"</%s>",tag);
- }
-
- } else if (obj->type == JSON_HASH) {
-
- if (!notag) {
- if(!obj_class)
- buffer_add(buf,"<hash>");
- else
- buffer_fadd(buf,"<%s>",tag);
- }
-
- jsonObjectIterator* itr = jsonNewObjectIterator(obj);
- jsonObjectNode* tmp;
- while( (tmp = jsonObjectIteratorNext(itr)) ) {
- if (notag) {
- buffer_fadd(buf,"<%s>",tmp->key);
- } else {
- buffer_add(buf,"<pair>");
- buffer_fadd(buf,"<key>%s</key><value>",tmp->key);
- }
-
- _rest_xml_output(buf, tmp->item, NULL,0,notag);
-
- if (notag) {
- buffer_fadd(buf,"</%s>",tmp->key);
- } else {
- buffer_add(buf,"</value></pair>");
- }
- }
- jsonObjectIteratorFree(itr);
-
- if (!notag) {
- if(!obj_class)
- buffer_add(buf,"</hash>");
- else
- buffer_fadd(buf,"</%s>",tag);
- }
-
- }
-
- if (obj->classname)
- buffer_fadd(buf,"</Object></%s>",tag);
-
- free(tag);
-}
-
Deleted: branches/acq-experiment/Open-ILS/src/apachemods/json_xml.h
===================================================================
--- branches/acq-experiment/Open-ILS/src/apachemods/json_xml.h 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/src/apachemods/json_xml.h 2008-04-24 00:38:57 UTC (rev 9443)
@@ -1,9 +0,0 @@
-
-#include <string.h>
-#include <stdio.h>
-
-/* the JSON parser, so we can read the response we're XMLizing */
-#include <opensrf/osrf_json.h>
-#include <opensrf/utils.h>
-
-char* json_string_to_xml(char*);
Deleted: branches/acq-experiment/Open-ILS/src/apachemods/mod_xmlbuilder.h
===================================================================
--- branches/acq-experiment/Open-ILS/src/apachemods/mod_xmlbuilder.h 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/src/apachemods/mod_xmlbuilder.h 2008-04-24 00:38:57 UTC (rev 9443)
@@ -1,111 +0,0 @@
-#include "apachetools.h"
-#include "opensrf/xml_utils.h"
-#include "opensrf/osrf_hash.h"
-#include "opensrf/osrf_list.h"
-#include <libxslt/xslt.h>
-#include <libxslt/transform.h>
-#include <libxslt/xsltutils.h>
-
-#define MODULE_NAME "xmlbuilder_module" /* our module name */
-
-/* ------------------------------------------------------------------------------ */
-/* Apache config items. These are defaults which are only used if they are not
- overriden by the Apache config or URL where appropriate */
-/* ------------------------------------------------------------------------------ */
-/* The default directory where the DTD files are stored */
-#define MODXMLB_DEFAULT_LOCALE_PARAM "locale"
-#define MODXMLB_DEFAULT_BASE_DIR "/openils/var/web/locale"
-#define MODXMLB_DEFAULT_LOCALE "en-US"
-#define MODXMLB_DEFAULT_DTD NULL /* if defined, use this DTD only */
-/* ------------------------------------------------------------------------------ */
-
-#define MODXMLB_CONFIG_LOCALE "XMLBuilderDefaultLocale"
-#define MODXMLB_CONFIG_BASE_DIR "XMLBuilderBaseDir"
-#define MODXMLB_CONFIG_POST_XSL "XMLBuilderPostXSL"
-#define MODXMLB_CONFIG_DEFAULT_DTD "XMLBuilderDefaultDTD"
-#define MODXMLB_CONFIG_LOCALE_PARAM "XMLBuilderLocaleParam"
-#define MODXMLB_CONFIG_CONTENT_TYPE "XMLBuilderContentType"
-
-
-
-/* This module */
-module AP_MODULE_DECLARE_DATA xmlbuilder_module;
-
-
-/* our config structure */
-typedef struct {
-
- char* baseDir; /* directory on disk where the DTD files live */
- char* defaultLocale; /* locale dir from config or default */
- char* defaultDtd; /* if defined, we load this DTD only */
- char* localeParam; /* the CGI param used to choose the locale dir dynamically */
- char* contentType; /* what content type to serve our files as (derfault is text/html) */
- xsltStylesheetPtr postXSL; /* if defined, run this XSL after parsing */
-
-} xmlBuilderConfig;
-
-typedef struct {
- xmlBuilderConfig* config;
- xmlDocPtr doc;
- osrfHash* entHash;
- osrfHash* dtdHash;
- osrfList* nodeList;
- int xmlError;
- char* xmlFile;
-} xmlBuilderContext;
-
-
-
-xmlDocPtr xmlBuilderProcessFile( char* XMLFile, xmlBuilderConfig* config );
-
-void xmlBuilderAddDtd( const char* sysId, xmlBuilderContext* context );
-void xmlBuilderAddAtts( xmlBuilderContext* ctx, xmlNodePtr ptr, const xmlChar** atts );
-
-/* SAX Callbacks */
-void xmlBuilderStartElement( void* blob, const xmlChar *name, const xmlChar **atts );
-void xmlBuilderEndElement( void* blob, const xmlChar* name );
-void xmlBuilderHandleCharacter(void* blob, const xmlChar *ch, int len);
-void xmlBuilderParseError( void* blob, const char* msg, ... );
-xmlEntityPtr xmlBuilderGetEntity( void* blob, const xmlChar* name );
-void xmlBuilderExtSubset( void* blob, const xmlChar* name, const xmlChar* extId, const xmlChar* sysId );
-void xmlBuilderProcInstruction( void* blob, const xmlChar* name, const xmlChar* data );
-void xmlBuilderComment( void* blob, const xmlChar* data );
-
-
-static xmlSAXHandler xmlBuilderSaxHandlerStruct = {
- NULL, /* internalSubset */
- NULL, /* isStandalone */
- NULL, /* hasInternalSubset */
- NULL, /* hasExternalSubset */
- NULL, /* resolveEntity */
- xmlBuilderGetEntity, /* getEntity */
- NULL, /* entityDecl */
- NULL, /* notationDecl */
- NULL, /* attributeDecl */
- NULL, /* elementDecl */
- NULL, /* unparsedEntityDecl */
- NULL, /* setDocumentLocator */
- NULL, /* startDocument */
- NULL, /* endDocument */
- xmlBuilderStartElement, /* startElement */
- xmlBuilderEndElement, /* endElement */
- NULL, /* reference */
- xmlBuilderHandleCharacter, /* characters */
- NULL, /* ignorableWhitespace */
- xmlBuilderProcInstruction, /* processingInstruction */
- xmlBuilderComment, /* comment */
- xmlBuilderParseError, /* xmlParserWarning */
- xmlBuilderParseError, /* xmlParserError */
- NULL, /* xmlParserFatalError : unused */
- NULL, /* getParameterEntity */
- NULL, /* cdataBlock; */
- xmlBuilderExtSubset, /* externalSubset; */
- 1,
- NULL,
- NULL, /* startElementNs */
- NULL, /* endElementNs */
- NULL /* xmlStructuredErrorFunc */
-};
-static const xmlSAXHandlerPtr xmlBuilderSaxHandler = &xmlBuilderSaxHandlerStruct;
-
-
Modified: branches/acq-experiment/Open-ILS/src/sql/Pg/reporter-schema.sql
===================================================================
--- branches/acq-experiment/Open-ILS/src/sql/Pg/reporter-schema.sql 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/src/sql/Pg/reporter-schema.sql 2008-04-24 00:38:57 UTC (rev 9443)
@@ -213,5 +213,29 @@
AND (stop_fines NOT IN ('LOST','CLAIMSRETURNED') OR stop_fines IS NULL)
AND due_date < now();
+CREATE OR REPLACE VIEW reporter.overdue_reports AS
+ SELECT s.id, c.barcode AS runner_barcode, r.name, s.run_time, s.run_time - now() AS scheduled_wait_time
+ FROM reporter.schedule s
+ JOIN reporter.report r ON r.id = s.report
+ JOIN actor.usr u ON s.runner = u.id
+ JOIN actor.card c ON c.id = u.card
+ WHERE s.start_time IS NULL AND s.run_time < now();
+
+CREATE OR REPLACE VIEW reporter.pending_reports AS
+ SELECT s.id, c.barcode AS runner_barcode, r.name, s.run_time, s.run_time - now() AS scheduled_wait_time
+ FROM reporter.schedule s
+ JOIN reporter.report r ON r.id = s.report
+ JOIN actor.usr u ON s.runner = u.id
+ JOIN actor.card c ON c.id = u.card
+ WHERE s.start_time IS NULL;
+
+CREATE OR REPLACE VIEW reporter.currently_running AS
+ SELECT s.id, c.barcode AS runner_barcode, r.name, s.run_time, s.run_time - now() AS scheduled_wait_time
+ FROM reporter.schedule s
+ JOIN reporter.report r ON r.id = s.report
+ JOIN actor.usr u ON s.runner = u.id
+ JOIN actor.card c ON c.id = u.card
+ WHERE s.start_time IS NOT NULL AND s.complete_time IS NULL;
+
COMMIT;
Modified: branches/acq-experiment/Open-ILS/web/conify/global/permission/perm_list.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/conify/global/permission/perm_list.html 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/web/conify/global/permission/perm_list.html 2008-04-24 00:38:57 UTC (rev 9443)
@@ -88,8 +88,32 @@
window.perm_grid_layout = [
{ cells : [
[
- { name : "Code", field : "code", width : "300px", editor : dojox.grid.editors.Dijit },
- { name : "Description", field : "description", width : "auto", editor : dojox.grid.editors.Editor }
+ { name : "Code", field : "code", width : "300px", editor : dojox.grid.editors.Dijit, rowSpan : "2" },
+ { name : "Description", field : "description", width : "auto", editor : dojox.grid.editors.Editor, style : "minHeight:1em;" }
+ ],
+ [
+ { name : "Translation",
+ width : "10em",
+ height : "2em",
+ get : function (row) {
+ if (!window.perm_rows) window.perm_rows = [];
+ var r = window.perm_data_model.getRow(row);
+ if (r) {
+ window.perm_rows[row] = new ccs().fromHash(window.perm_data_model.getRow(row));
+ setTimeout(
+ 'dojo.query(".perm_grid_trans_desc_' + row + '").'+
+ 'instantiate(openils.I18N.translationWidget,{field:"description",'+
+ 'targetObject:"window.perm_rows['+row+']",unique:"' + row + '"});'+
+ 'perm_grid.rowHeightChanged('+row+')',
+ 0
+ );
+ var oldnode = dojo.byId('description_translation_' + row);
+ if (oldnode) dijit.byNode(oldnode).destroyRecursive();
+ return '<span class="perm_grid_trans_desc_'+row+'"></span>';
+ }
+ return '';
+ }
+ }
]
]
}
Modified: branches/acq-experiment/Open-ILS/web/conify/global/permission/perm_list.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/conify/global/permission/perm_list.js 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/web/conify/global/permission/perm_list.js 2008-04-24 00:38:57 UTC (rev 9443)
@@ -16,6 +16,7 @@
*/
dojo.require('fieldmapper.dojoData');
+dojo.require('openils.I18N');
dojo.require('dojo.parser');
dojo.require('dojo.string');
dojo.require('dojo.data.ItemFileWriteStore');
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/User.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/User.js 2008-04-23 17:17:15 UTC (rev 9442)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/User.js 2008-04-24 00:38:57 UTC (rev 9443)
@@ -33,6 +33,7 @@
authtime : null,
constructor : function ( kwargs ) {
+ kwargs = kwargs || {};
this.id = kwargs.id;
this.user = kwargs.user;
this.passwd = kwargs.passwd;
@@ -54,7 +55,7 @@
req.oncomplete = function(r) {
var user = r.recv().content();
_u.user = user;
- if (!openils.User.user) !openils.User.user = _u.user;
+ if (!openils.User.user) openils.User.user = _u.user;
if(onComplete)
onComplete(user);
}
@@ -109,9 +110,9 @@
authReq.oncomplete = function(rr) {
var data = rr.recv().content();
_u.authtoken = data.payload.authtoken;
- if (!openils.User.authtoken) !openils.User.authtoken = _u.authtoken;
+ if (!openils.User.authtoken) openils.User.authtoken = _u.authtoken;
_u.authtime = data.payload.authtime;
- if (!openils.User.authtime) !openils.User.authtime = _u.authtime;
+ if (!openils.User.authtime) openils.User.authtime = _u.authtime;
_u.getBySession(onComplete);
}
authReq.send();
More information about the open-ils-commits
mailing list