[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 8190509f88c61870ed151b10bccb9d2c635f5371

Evergreen Git git at git.evergreen-ils.org
Thu Sep 29 23:43:53 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_0 has been updated
       via  8190509f88c61870ed151b10bccb9d2c635f5371 (commit)
       via  260eaa516f8da0f0a33f1867531a8594ee382263 (commit)
       via  270c7523ce5c1948d294e1b19e3b8945ae41190a (commit)
       via  ccb5b344a2b2577bd52e552ae4acac8d7b5a43f9 (commit)
       via  80dc649d7c2e952a015db97daf3c4ab1ccbafc4d (commit)
      from  8de6c3bef0611abf1d0785297f0a77d4baf70834 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8190509f88c61870ed151b10bccb9d2c635f5371
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Sep 29 23:27:19 2011 -0400

    LP740320: Make <enter> submit the new bookbag dialog
    
    For the keyboard jockeys out there - if the enter key doesn't submit,
    the UI reviewer will not commit.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js
index 73efab2..663950b 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -600,7 +600,12 @@ function finishBookbag(exitstatus) {
  * Creates a new Bookbag for the user.
  */
 function rdetailNewBookbag() {
-	newBBDialog.show(); // Show the bookbag dialog.
+    newBBDialog.show(); // Show the bookbag dialog.
+    dojo.connect(dijit.byId('newBBDialog'), 'onKeyPress', function(evt) {
+        if (evt.keyCode == dojo.keys.ENTER) {
+            finishBookbag(0);
+        }
+    });
 }
 
 function rdetailAddToBookbag() {

commit 260eaa516f8da0f0a33f1867531a8594ee382263
Author: James Fournie <jfournie at sitka.bclibraries.ca>
Date:   Fri Aug 26 09:23:53 2011 -0700

    Initial dialog isn't quite wide enough, here's a hackish way to fix it
    
    Signed-off-by: James Fournie <jfournie at sitka.bclibraries.ca>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml b/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
index a60201a..e5e27c1 100644
--- a/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
+++ b/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
@@ -83,7 +83,7 @@
 
 	<div class='hide_me' id='rdetail_bb_none'>&rdetail.none;</div>
 	<div class='hide_me' id='rdetail_bb_item_success'>&rdetail.bookbag.add.success;</div>
-	<div dojoType='dijit.Dialog' id='newBBDialog' jsId='newBBDialog' title='&rdetail.bookbag.name;'>
+	<div dojoType='dijit.Dialog' id='newBBDialog' jsId='newBBDialog' title='&rdetail.bookbag.name;' style="width: 20em;">
         <input id='bbName' jsId='bbName' dojoType='dijit.form.TextBox'></input><br/>
         <button id='bbok' dojoType='dijit.form.Button' onClick='finishBookbag(0);' type='button'>&common.submit;</button>
         <button id='bbca' dojoType='dijit.form.Button' onClick='finishBookbag(1);' type='button'>&common.cancel;</button>

commit 270c7523ce5c1948d294e1b19e3b8945ae41190a
Author: James Fournie <jfournie at sitka.bclibraries.ca>
Date:   Fri Aug 26 09:19:14 2011 -0700

    Should probably use a more common button rather than the one for the advanced search
    
    Signed-off-by: James Fournie <jfournie at sitka.bclibraries.ca>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml b/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
index 25adbf3..a60201a 100644
--- a/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
+++ b/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
@@ -85,7 +85,7 @@
 	<div class='hide_me' id='rdetail_bb_item_success'>&rdetail.bookbag.add.success;</div>
 	<div dojoType='dijit.Dialog' id='newBBDialog' jsId='newBBDialog' title='&rdetail.bookbag.name;'>
         <input id='bbName' jsId='bbName' dojoType='dijit.form.TextBox'></input><br/>
-        <button id='bbok' dojoType='dijit.form.Button' onClick='finishBookbag(0);' type='button'>&advanced.go;</button>
+        <button id='bbok' dojoType='dijit.form.Button' onClick='finishBookbag(0);' type='button'>&common.submit;</button>
         <button id='bbca' dojoType='dijit.form.Button' onClick='finishBookbag(1);' type='button'>&common.cancel;</button>
     </div>
 	<div class='hide_me' id='rdetail_bb_success'>&rdetail.bookbag.create.success;</div>

commit ccb5b344a2b2577bd52e552ae4acac8d7b5a43f9
Author: James Fournie <jfournie at sitka.bclibraries.ca>
Date:   Fri Aug 26 08:56:44 2011 -0700

    This makes more sense as an alert; the Dojo dialog has no button which is not user-friendly.
    
    Signed-off-by: James Fournie <jfournie at sitka.bclibraries.ca>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js
index 137eb63..73efab2 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -588,7 +588,7 @@ function finishBookbag(exitstatus) {
 	var id;
 	
 	if( id = containerCreate( name ) ) {
-		new dijit.Dialog({content: $('rdetail_bb_success').innerHTML,}).show();
+		alert( $('rdetail_bb_success').innerHTML );
 		var selector = $('rdetail_more_actions_selector');
 		insertSelectorVal( selector, nextContainerIndex++, name, 
 				"container_" + id, rdetailAddToBookbag, 1 );

commit 80dc649d7c2e952a015db97daf3c4ab1ccbafc4d
Author: Mike Rylander <mrylander at gmail.com>
Date:   Tue Aug 2 12:42:53 2011 -0400

    Markup-based dijit.Dialog implementation, inspired by and based on a patch from Joseph Lewis in https://bugs.launchpad.net/evergreen/+bug/787162
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js
index 9742040..137eb63 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -46,6 +46,9 @@ var rdetailEnd = null;
 var mfhdDetails = [];
 var orgHiding = false;
 
+dojo.require("dijit.Dialog");
+dojo.require("dijit.form.TextBox");
+
 /* serials are currently the only use of Dojo strings in the OPAC */
 if (rdetailDisplaySerialHoldings) {
 	dojo.require("dijit.Menu");
@@ -569,13 +572,23 @@ function rdetailAddBookbags(r) {
 }
 
 var _actions = {};
-function rdetailNewBookbag() {
-	var name = prompt($('rdetail_bb_new').innerHTML,"");
-	if(!name) return;
-
+/**
+ * Adds a new bookbag and exits.
+ * 
+ * exitstatus should be 0 if the status is to be read.
+ */
+function finishBookbag(exitstatus) {
+	var name = bbName.attr('value');
+	
+	newBBDialog.hide();	
+	bbName.attr("value", ""); // Do this after hide so the text doesn't disappear.
+	
+	if(exitstatus != 0) return; // If the user canceled, just drop off here.
+	
 	var id;
+	
 	if( id = containerCreate( name ) ) {
-		alert($('rdetail_bb_success').innerHTML);
+		new dijit.Dialog({content: $('rdetail_bb_success').innerHTML,}).show();
 		var selector = $('rdetail_more_actions_selector');
 		insertSelectorVal( selector, nextContainerIndex++, name, 
 				"container_" + id, rdetailAddToBookbag, 1 );
@@ -583,6 +596,12 @@ function rdetailNewBookbag() {
 	}
 }
 
+/**
+ * Creates a new Bookbag for the user.
+ */
+function rdetailNewBookbag() {
+	newBBDialog.show(); // Show the bookbag dialog.
+}
 
 function rdetailAddToBookbag() {
 	var selector = $('rdetail_more_actions_selector');
diff --git a/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml b/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
index cfd2e69..25adbf3 100644
--- a/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
+++ b/Open-ILS/web/opac/skin/default/xml/page_rdetail.xml
@@ -83,7 +83,11 @@
 
 	<div class='hide_me' id='rdetail_bb_none'>&rdetail.none;</div>
 	<div class='hide_me' id='rdetail_bb_item_success'>&rdetail.bookbag.add.success;</div>
-	<div class='hide_me' id='rdetail_bb_new'>&rdetail.bookbag.name;</div>
+	<div dojoType='dijit.Dialog' id='newBBDialog' jsId='newBBDialog' title='&rdetail.bookbag.name;'>
+        <input id='bbName' jsId='bbName' dojoType='dijit.form.TextBox'></input><br/>
+        <button id='bbok' dojoType='dijit.form.Button' onClick='finishBookbag(0);' type='button'>&advanced.go;</button>
+        <button id='bbca' dojoType='dijit.form.Button' onClick='finishBookbag(1);' type='button'>&common.cancel;</button>
+    </div>
 	<div class='hide_me' id='rdetail_bb_success'>&rdetail.bookbag.create.success;</div>
 
 </div>

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/opac/skin/default/js/rdetail.js       |   34 +++++++++++++++++---
 .../web/opac/skin/default/xml/page_rdetail.xml     |    6 +++-
 2 files changed, 34 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list