[open-ils-commits] r12385 - trunk/Open-ILS/web/js/ui/default/actor/user (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 3 15:25:15 EST 2009
Author: erickson
Date: 2009-03-03 15:25:10 -0500 (Tue, 03 Mar 2009)
New Revision: 12385
Modified:
trunk/Open-ILS/web/js/ui/default/actor/user/register.js
Log:
fixed editing number widgets, setting ischanged on user
Modified: trunk/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2009-03-03 19:40:11 UTC (rev 12384)
+++ trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2009-03-03 20:25:10 UTC (rev 12385)
@@ -309,27 +309,26 @@
function uEditWidgetVal(w) {
var val = (w.getFormattedValue) ? w.getFormattedValue() : w.attr('value');
- if(val == '') val = null;
+ if(val === '') val = null;
return val;
}
function uEditSave() {
for(var idx in widgetPile) {
var w = widgetPile[idx];
+ var val = uEditWidgetVal(w);
switch(w._wtype) {
case 'au':
- patron[w._fmfield](uEditWidgetVal(w));
+ patron[w._fmfield](val);
break;
case 'ac':
- patron.card()[w._fmfield](uEditWidgetVal(w));
+ patron.card()[w._fmfield](val);
break;
case 'aua':
var addr = patron.addresses().filter(function(i){return (i.id() == w._addr)})[0];
- var val = uEditWidgetVal(w);
- //console.log('addr ' + w._addr + ' : ' + addr);
if(!addr) {
addr = new fieldmapper.aua();
addr.id(w._addr);
@@ -344,7 +343,6 @@
break;
case 'survey':
- var val = uEditWidgetVal(w);
if(val == null) break;
var resp = new fieldmapper.asvr();
resp.isnew(1);
@@ -356,7 +354,6 @@
break;
case 'statcat':
- var val = uEditWidgetVal(w);
if(val == null) break;
var map = patron.stat_cat_entries().filter(
@@ -380,6 +377,7 @@
}
}
+ patron.ischanged(1);
fieldmapper.standardRequest(
['open-ils.actor', 'open-ils.actor.patron.update'],
{ async: true,
@@ -387,7 +385,6 @@
oncomplete: function(r) {
patron = openils.Util.readResponse(r);
if(patron) {
- //alert('done');
uEditRefresh();
}
}
More information about the open-ils-commits
mailing list