[open-ils-commits] [GIT] Evergreen ILS branch master updated. d34fa398b8d875524808a8005aa19fe65e107822

Evergreen Git git at git.evergreen-ils.org
Thu Sep 29 23:31:31 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, master has been updated
       via  d34fa398b8d875524808a8005aa19fe65e107822 (commit)
       via  c947f931015bd2ae7b10b7658392ece9e3e9812b (commit)
       via  f8b04fff3c1c9e676748c7de71017c289c9a0305 (commit)
       via  ab9105555d12927c19b7191d20705e691bec66a8 (commit)
       via  1540fbd90ac4311e0eda95f88efb73cea37a60a7 (commit)
      from  75316b940b908ad47682dea64210d1775e96fc90 (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 d34fa398b8d875524808a8005aa19fe65e107822
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 c947f931015bd2ae7b10b7658392ece9e3e9812b
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 f8b04fff3c1c9e676748c7de71017c289c9a0305
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 ab9105555d12927c19b7191d20705e691bec66a8
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 1540fbd90ac4311e0eda95f88efb73cea37a60a7
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