[open-ils-commits] r19943 - in branches/rel_2_1/Open-ILS: web/js/ui/default/booking xul/staff_client/chrome/content/main xul/staff_client/server/patron (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 4 12:29:00 EDT 2011
Author: senator
Date: 2011-04-04 12:28:57 -0400 (Mon, 04 Apr 2011)
New Revision: 19943
Modified:
branches/rel_2_1/Open-ILS/web/js/ui/default/booking/capture.js
branches/rel_2_1/Open-ILS/web/js/ui/default/booking/pull_list.js
branches/rel_2_1/Open-ILS/web/js/ui/default/booking/reservation.js
branches/rel_2_1/Open-ILS/xul/staff_client/chrome/content/main/menu.js
branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/display.js
Log:
Backport r19942 from trunk
Booking: This should a) make booking interfaces behave better when a staff
login session times out and is replaced by use of a re-auth dialog, and b)
wrap booking interfaces in a <browser> element with the attendant
back/forward/reload buttons that most similar interfaces already had.
Modified: branches/rel_2_1/Open-ILS/web/js/ui/default/booking/capture.js
===================================================================
--- branches/rel_2_1/Open-ILS/web/js/ui/default/booking/capture.js 2011-04-04 16:28:17 UTC (rev 19942)
+++ branches/rel_2_1/Open-ILS/web/js/ui/default/booking/capture.js 2011-04-04 16:28:57 UTC (rev 19943)
@@ -195,7 +195,7 @@
"open-ils.booking",
"open-ils.booking.resources.capture_for_reservation"
],
- [xulG.auth.session.key, barcode]
+ [openils.User.authtoken, barcode]
);
if (result && result.ilsevent !== undefined) {
Modified: branches/rel_2_1/Open-ILS/web/js/ui/default/booking/pull_list.js
===================================================================
--- branches/rel_2_1/Open-ILS/web/js/ui/default/booking/pull_list.js 2011-04-04 16:28:17 UTC (rev 19942)
+++ branches/rel_2_1/Open-ILS/web/js/ui/default/booking/pull_list.js 2011-04-04 16:28:57 UTC (rev 19943)
@@ -31,7 +31,7 @@
return fieldmapper.standardRequest(
["open-ils.booking", "open-ils.booking.reservations.get_pull_list"],
- [xulG.auth.session.key, null, secs, owning_lib_selected]
+ [openils.User.authtoken, null, secs, owning_lib_selected]
);
}
@@ -121,7 +121,7 @@
"open-ils.booking",
"open-ils.booking.asset.get_copy_fleshed_just_right"
],
- [xulG.auth.session.key, barcodes]
+ [openils.User.authtoken, barcodes]
);
if (!results) {
Modified: branches/rel_2_1/Open-ILS/web/js/ui/default/booking/reservation.js
===================================================================
--- branches/rel_2_1/Open-ILS/web/js/ui/default/booking/reservation.js 2011-04-04 16:28:17 UTC (rev 19942)
+++ branches/rel_2_1/Open-ILS/web/js/ui/default/booking/reservation.js 2011-04-04 16:28:57 UTC (rev 19943)
@@ -215,7 +215,7 @@
return fieldmapper.standardRequest(
["open-ils.booking", "open-ils.booking.resources.filtered_id_list"],
- [xulG.auth.session.key, options]
+ [openils.User.authtoken, options]
);
}
@@ -298,7 +298,7 @@
results = fieldmapper.standardRequest(
["open-ils.booking", "open-ils.booking.reservations.create"],
[
- xulG.auth.session.key,
+ openils.User.authtoken,
barcode,
reserve_timestamp_range.get_range(),
pickup_lib_selected,
@@ -413,7 +413,7 @@
function get_actor_by_barcode(barcode) {
var usr = fieldmapper.standardRequest(
["open-ils.actor", "open-ils.actor.user.fleshed.retrieve_by_barcode"],
- [xulG.auth.session.key, barcode]
+ [openils.User.authtoken, barcode]
);
if (usr == null) {
alert(localeStrings.GET_PATRON_NO_RESULT);
@@ -432,7 +432,7 @@
["open-ils.booking",
"open-ils.booking.reservations.filtered_id_list"
],
- [xulG.auth.session.key, {
+ [openils.User.authtoken, {
"user_barcode": barcode,
"fields": {
"pickup_time": null,
@@ -480,7 +480,7 @@
try {
var result = fieldmapper.standardRequest(
["open-ils.booking", "open-ils.booking.reservations.cancel"],
- [xulG.auth.session.key, bresv_id_list]
+ [openils.User.authtoken, bresv_id_list]
);
} catch (E) {
alert(localeStrings.CXL_BRESV_FAILURE2 + E);
@@ -509,7 +509,7 @@
var r = fieldmapper.standardRequest(
["open-ils.booking",
"open-ils.booking.resources.create_from_copies"],
- [xulG.auth.session.key,
+ [openils.User.authtoken,
copy_list.map(function(o) { return o.id(); })]
);
Modified: branches/rel_2_1/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2011-04-04 16:28:17 UTC (rev 19942)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2011-04-04 16:28:57 UTC (rev 19943)
@@ -911,75 +911,45 @@
'cmd_booking_reservation' : [
['oncommand'],
function() {
- obj.set_tab(
+ open_eg_web_page(
"/eg/booking/reservation",
- {
- "tab_name": offlineStrings.getString(
- "menu.cmd_booking_reservation.tab"
- ),
- "browser": false
- },
- xulG
+ "menu.cmd_booking_reservation.tab"
);
}
],
'cmd_booking_pull_list' : [
['oncommand'],
function() {
- obj.set_tab(
+ open_eg_web_page(
"/eg/booking/pull_list",
- {
- "tab_name": offlineStrings.getString(
- "menu.cmd_booking_pull_list.tab"
- ),
- "browser": false
- },
- xulG
+ "menu.cmd_booking_pull_list.tab"
);
}
],
'cmd_booking_capture' : [
['oncommand'],
function() {
- obj.set_tab(
+ open_eg_web_page(
"/eg/booking/capture",
- {
- "tab_name": offlineStrings.getString(
- "menu.cmd_booking_capture.tab"
- ),
- "browser": false
- },
- xulG
+ "menu.cmd_booking_capture.tab"
);
}
],
'cmd_booking_reservation_pickup' : [
['oncommand'],
function() {
- obj.set_tab(
+ open_eg_web_page(
"/eg/booking/pickup",
- {
- "tab_name": offlineStrings.getString(
- "menu.cmd_booking_reservation_pickup.tab"
- ),
- "browser": false
- },
- xulG
+ "menu.cmd_booking_reservation_pickup.tab"
);
}
],
'cmd_booking_reservation_return' : [
['oncommand'],
function() {
- obj.set_tab(
+ open_eg_web_page(
"/eg/booking/return",
- {
- "tab_name": offlineStrings.getString(
- "menu.cmd_booking_reservation_return.tab"
- ),
- "browser": false
- },
- xulG
+ "menu.cmd_booking_reservation_return.tab"
);
}
],
Modified: branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/display.js
===================================================================
--- branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/display.js 2011-04-04 16:28:17 UTC (rev 19942)
+++ branches/rel_2_1/Open-ILS/xul/staff_client/server/patron/display.js 2011-04-04 16:28:57 UTC (rev 19943)
@@ -1,4 +1,6 @@
dump('entering patron/display.js\n');
+dojo.require("openils.User");
+dojo.require("openils.XUL");
function $(id) { return document.getElementById(id); }
@@ -385,63 +387,51 @@
'cmd_patron_reservation' : [
['command'],
function(ev) {
- if (xulG.auth == undefined) {
- xulG.auth = {"session": {"key": ses()}};
- }
- xulG.bresv_interface_opts = {
- "patron_barcode": obj.patron.card().barcode()
- };
- xulG.new_tab(
+ openils.XUL.newTabEasy(
"/eg/booking/reservation",
- {
- "tab_name": $("offlineStrings").getString(
- "menu.cmd_booking_reservation.tab"
- ),
- "browser": false
+ $("offlineStrings").getString(
+ "menu.cmd_booking_reservation.tab"
+ ), {
+ "bresv_interface_opts": {
+ "patron_barcode":
+ obj.patron.card().barcode()
+ }
},
- xulG
+ true
);
}
],
'cmd_patron_reservation_pickup' : [
['command'],
function(ev) {
- if (xulG.auth == undefined) {
- xulG.auth = {"session": {"key": ses()}};
- }
- xulG.bresv_interface_opts = {
- "patron_barcode": obj.patron.card().barcode()
- };
- xulG.new_tab(
+ openils.XUL.newTabEasy(
"/eg/booking/pickup",
- {
- "tab_name": $("offlineStrings").getString(
- "menu.cmd_booking_reservation_pickup.tab"
- ),
- "browser": false
+ $("offlineStrings").getString(
+ "menu.cmd_booking_reservation_pickup.tab"
+ ), {
+ "bresv_interface_opts": {
+ "patron_barcode":
+ obj.patron.card().barcode()
+ }
},
- xulG
+ true
);
}
],
'cmd_patron_reservation_return' : [
['command'],
function(ev) {
- if (xulG.auth == undefined) {
- xulG.auth = {"session": {"key": ses()}};
- }
- xulG.bresv_interface_opts = {
- "patron_barcode": obj.patron.card().barcode()
- };
- xulG.new_tab(
+ openils.XUL.newTabEasy(
"/eg/booking/return",
- {
- "tab_name": $("offlineStrings").getString(
- "menu.cmd_booking_reservation_return.tab"
- ),
- "browser": false
+ $("offlineStrings").getString(
+ "menu.cmd_booking_reservation_return.tab"
+ ), {
+ "bresv_interface_opts": {
+ "patron_barcode":
+ obj.patron.card().barcode()
+ }
},
- xulG
+ true
);
}
],
More information about the open-ils-commits
mailing list