[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 7e66a7e134c7ac8815c00d5bb7226f93496a2ff2

Evergreen Git git at git.evergreen-ils.org
Thu Sep 29 23:35:28 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_1 has been updated
       via  7e66a7e134c7ac8815c00d5bb7226f93496a2ff2 (commit)
       via  ab082e11549a02f1f83013950c75292e0861d7d0 (commit)
       via  180c72c9f42cfca48a0016ddb9353dccb35340b5 (commit)
       via  4d49e5ed42827de0587731ab9c407726c9b03452 (commit)
       via  a2d8e396bc5fc3ae2983f16bbbba50f9014b56c8 (commit)
      from  2f5577d3dfa8a0dec298b3d2ebc7e492d7ff2ff5 (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 7e66a7e134c7ac8815c00d5bb7226f93496a2ff2
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 ca72ec7..3fbc501 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -706,7 +706,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 ab082e11549a02f1f83013950c75292e0861d7d0
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 bd1ec4b..f676a72 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 180c72c9f42cfca48a0016ddb9353dccb35340b5
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 44e35ff..bd1ec4b 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 4d49e5ed42827de0587731ab9c407726c9b03452
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 0b04880..ca72ec7 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -694,7 +694,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 a2d8e396bc5fc3ae2983f16bbbba50f9014b56c8
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 eae2aa0..0b04880 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -51,6 +51,9 @@ if(location.href.match(/&place_hold=1/)) {
     hideMe(dojo.byId('canvas_main'));
 }
 
+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");
@@ -675,13 +678,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 );
@@ -689,6 +702,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 c816b6d..44e35ff 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