From 98d0b2d732278a334fe366a8aaeaacc41f31f73c Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Fri, 7 Sep 2012 19:31:18 -0400 Subject: [PATCH] Wasted hours on this Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/templates/url_verify/select_urls.tt2 | 11 ++++++++--- Open-ILS/web/js/dojo/openils/FlattenerStore.js | 19 +++++++++++++++++-- Open-ILS/web/js/dojo/openils/URLVerify/SelectURLs.js | 5 +++++ .../web/js/dojo/openils/URLVerify/nls/URLVerify.js | 3 ++- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/templates/url_verify/select_urls.tt2 b/Open-ILS/src/templates/url_verify/select_urls.tt2 index c8d94ffdde..a44d563c1d 100644 --- a/Open-ILS/src/templates/url_verify/select_urls.tt2 +++ b/Open-ILS/src/templates/url_verify/select_urls.tt2 @@ -40,13 +40,12 @@ jsid="grid" dojoType="openils.widget.FlattenerGrid" columnPersistKey='"url_verify.select_url"' - autoHeight="10" editOnEnter="false" autoCoreFields="true" autoCoreFieldsFilter="true" autoCoreFieldsUnsorted="true" fetchLock="true" - mapExtras="{session_id: {path: 'item.session.id', filter: true}}" + mapExtras="{session_id: {path: 'session.id', filter: true}}" showLoadFilter="true" fmClass="'uvu'"> @@ -56,7 +55,13 @@ - Verifications + diff --git a/Open-ILS/web/js/dojo/openils/FlattenerStore.js b/Open-ILS/web/js/dojo/openils/FlattenerStore.js index 6f3f989979..b7452f5039 100644 --- a/Open-ILS/web/js/dojo/openils/FlattenerStore.js +++ b/Open-ILS/web/js/dojo/openils/FlattenerStore.js @@ -182,7 +182,9 @@ if (!dojo._hasResource["openils.FlattenerStore"]) { if (!this.mapKey) this._get_map_key(); - return this._build_flattener_params(req); + var p = this._build_flattener_params(req); + console.debug("_fetch_prepare() returning " + dojo.toJson(p)); + return p; }, "_fetch_execute": function(params,handle_as,mime_type,onload,onerror) { @@ -390,9 +392,17 @@ if (!dojo._hasResource["openils.FlattenerStore"]) { else might_be_a_lie += obj.length; + console.debug( + "process_fetch() calling onBegin with " + + might_be_a_lie + ", " + dojo.toJson(req) + ); req.onBegin.call(callback_scope, might_be_a_lie, req); } + console.debug( + "about to call onItem for " + obj.length + + " elements in the obj array" + ); dojo.forEach( obj, function(item) { @@ -404,8 +414,13 @@ if (!dojo._hasResource["openils.FlattenerStore"]) { } ); - if (typeof req.onComplete == "function") + if (typeof req.onComplete == "function") { + console.debug( + "here goes onComplete, with " + obj + " and " + + dojo.toJson(req) + ); req.onComplete.call(callback_scope, obj, req); + } }; var process_error = dojo.hitch( diff --git a/Open-ILS/web/js/dojo/openils/URLVerify/SelectURLs.js b/Open-ILS/web/js/dojo/openils/URLVerify/SelectURLs.js index 3023937244..bcea31a909 100644 --- a/Open-ILS/web/js/dojo/openils/URLVerify/SelectURLs.js +++ b/Open-ILS/web/js/dojo/openils/URLVerify/SelectURLs.js @@ -38,6 +38,11 @@ if (!dojo._hasResource["openils.URLVerify.SelectURLs"]) { module.verify_selected = function() { var really_everything = false; + if (module.grid.getSelectedItems().length < 1) { + alert(localeStrings.NOTHING_SELECTED); + return; + } + if (module.grid.everythingSeemsSelected()) really_everything = confirm(localeStrings.VERIFY_ALL); diff --git a/Open-ILS/web/js/dojo/openils/URLVerify/nls/URLVerify.js b/Open-ILS/web/js/dojo/openils/URLVerify/nls/URLVerify.js index 2db8ca8cf4..74f1b6ab58 100644 --- a/Open-ILS/web/js/dojo/openils/URLVerify/nls/URLVerify.js +++ b/Open-ILS/web/js/dojo/openils/URLVerify/nls/URLVerify.js @@ -10,5 +10,6 @@ "VERIFICATION_DIALOG": "Verifying URLs ...", "VERIFICATION_ATTEMPT_ID": "Verification attempt ID: ${0}", "VERIFICATION_ATTEMPT_START": "Attempt start time: ${0}", - "VERIFICATION_ATTEMPT_FINISH": "Attempt finish time: ${0}" + "VERIFICATION_ATTEMPT_FINISH": "Attempt finish time: ${0}", + "NOTHING_SELECTED": "No rows are selected, so no action will be taken." } -- 2.11.0