[open-ils-commits] r18945 - in trunk/Open-ILS: web/js/ui/default/actor/user xul/staff_client/chrome/content/main xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 9 06:09:20 EST 2010
Author: phasefx
Date: 2010-12-09 06:09:13 -0500 (Thu, 09 Dec 2010)
New Revision: 18945
Modified:
trunk/Open-ILS/web/js/ui/default/actor/user/register.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
trunk/Open-ILS/xul/staff_client/server/patron/display.js
trunk/Open-ILS/xul/staff_client/server/patron/info_group.js
trunk/Open-ILS/xul/staff_client/server/patron/staged.js
Log:
unsaved data warning for patron editor. some debug output for lock_tab/unlock_tab
Modified: trunk/Open-ILS/web/js/ui/default/actor/user/register.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2010-12-09 11:09:11 UTC (rev 18944)
+++ trunk/Open-ILS/web/js/ui/default/actor/user/register.js 2010-12-09 11:09:13 UTC (rev 18945)
@@ -50,8 +50,8 @@
var dupeBarcode = false;
if(!window.xulG) var xulG = null;
+var lock_ready = false;
-
function load() {
staff = new openils.User().user;
pcrud = new openils.PermaCrud();
@@ -146,6 +146,8 @@
} else {
input.widget.attr('disabled', true).attr('readOnly', true);
}
+
+ lock_ready = true;
}
@@ -679,6 +681,16 @@
function attachWidgetEvents(fmcls, fmfield, widget) {
+ dojo.connect(
+ widget.widget,
+ 'onChange',
+ function(){
+ if (lock_ready && xulG && typeof xulG.lock_tab == 'function') {
+ xulG.lock_tab();
+ }
+ }
+ );
+
if(fmcls == 'ac') {
if(fmfield == 'barcode') {
dojo.connect(widget.widget, 'onChange',
@@ -1134,6 +1146,8 @@
{ async: true,
params: [openils.User.authtoken, patron],
oncomplete: function(r) {
+ lock_ready = false;
+ if (xulG && typeof xulG.unlock_tab == 'function') { xulG.unlock_tab(); }
newPatron = openils.Util.readResponse(r);
if(newPatron) {
uEditUpdateUserSettings(newPatron.id());
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-12-09 11:09:11 UTC (rev 18944)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2010-12-09 11:09:13 UTC (rev 18945)
@@ -1674,6 +1674,7 @@
while ( panel.lastChild ) panel.removeChild( panel.lastChild );
content_params.lock_tab = function() {
+ dump('lock_tab\n');
var id = tab.getAttribute('id');
if (typeof obj.tab_semaphores[id] == 'undefined') {
obj.tab_semaphores[id] = 0;
@@ -1683,6 +1684,7 @@
return obj.tab_semaphores[id];
};
content_params.unlock_tab = function() {
+ dump('unlock_tab\n');
var id = tab.getAttribute('id');
if (typeof obj.tab_semaphores[id] == 'undefined') {
obj.tab_semaphores[id] = 0;
Modified: trunk/Open-ILS/xul/staff_client/server/patron/display.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display.js 2010-12-09 11:09:11 UTC (rev 18944)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display.js 2010-12-09 11:09:13 UTC (rev 18945)
@@ -251,7 +251,9 @@
JSAN.use('patron.util');
patron.util.work_log_patron_edit(p_obj);
}
- }
+ },
+ 'lock_tab' : function() { return xulG.lock_tab(); },
+ 'unlock_tab' : function() { return xulG.unlock_tab(); }
}
);
}
@@ -289,7 +291,9 @@
'get_new_session' : function(a) { return xulG.get_new_session(a); },
'new_tab' : function(a,b,c) { return xulG.new_tab(a,b,c); },
'new_patron_tab' : function(a,b) { return xulG.new_patron_tab(a,b); }
- }
+ },
+ 'lock_tab' : function() { return xulG.lock_tab(); },
+ 'unlock_tab' : function() { return xulG.unlock_tab(); }
}
);
}
Modified: trunk/Open-ILS/xul/staff_client/server/patron/info_group.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/info_group.js 2010-12-09 11:09:11 UTC (rev 18944)
+++ trunk/Open-ILS/xul/staff_client/server/patron/info_group.js 2010-12-09 11:09:13 UTC (rev 18945)
@@ -333,6 +333,8 @@
},
'url_prefix' : xulG.url_prefix,
'new_tab' : xulG.new_tab,
+ 'lock_tab' : xulG.lock_tab,
+ 'unlock_tab' : xulG.unlock_tab
}
);
}
@@ -363,7 +365,9 @@
'tab_name' : $("patronStrings").getString('staff.patron.info_group.spawn_editor.editing_patron'),
'passthru_content_params' : passthru,
'url_prefix' : xulG.url_prefix,
- 'new_tab' : xulG.new_tab
+ 'new_tab' : xulG.new_tab,
+ 'lock_tab' : xulG.lock_tab,
+ 'unlock_tab' : xulG.unlock_tab
}
);
Modified: trunk/Open-ILS/xul/staff_client/server/patron/staged.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/staged.js 2010-12-09 11:09:11 UTC (rev 18944)
+++ trunk/Open-ILS/xul/staff_client/server/patron/staged.js 2010-12-09 11:09:13 UTC (rev 18945)
@@ -161,7 +161,9 @@
'new_patron_tab' : xulG.new_patron_tab,
'on_save' : function(p) { patron.util.work_log_patron_edit(p); if (typeof func == 'function') { func(p); } },
'params' : p
- }
+ },
+ 'lock_tab' : xulG.lock_tab,
+ 'unlock_tab' : xulG.unlock_tab
}
);
}
More information about the open-ils-commits
mailing list