[galaxy-commits] commit/galaxy-central: jgoecks: (1) Fail gracefully when visualization cannot be saved and (2) fix bug in setting modal's minimum width.

Bitbucket commits-noreply at bitbucket.org
Fri Dec 2 13:56:54 EST 2011


1 new commit in galaxy-central:


https://bitbucket.org/galaxy/galaxy-central/changeset/107d3f0a59fa/
changeset:   107d3f0a59fa
user:        jgoecks
date:        2011-12-02 19:56:45
summary:     (1) Fail gracefully when visualization cannot be saved and (2) fix bug in setting modal's minimum width.
affected #:  2 files

diff -r 4a9d57a68f91b17fa47b8e5b73e54b6bdcbc912d -r 107d3f0a59fae43ca9b62fe30453caed898993e6 static/scripts/galaxy.panels.js
--- a/static/scripts/galaxy.panels.js
+++ b/static/scripts/galaxy.panels.js
@@ -211,7 +211,7 @@
     }
     var body_elt = $( ".dialog-box" ).find( ".body" );
     // Clear min-width to allow for modal to take size of new body.
-    body_elt.css("min-width", "");
+    body_elt.css("min-width", "0px");
     $( ".dialog-box" ).find( ".body" ).html( body );
     if ( ! $(".dialog-box-container").is( ":visible" ) ) {
         $("#overlay").show();


diff -r 4a9d57a68f91b17fa47b8e5b73e54b6bdcbc912d -r 107d3f0a59fae43ca9b62fe30453caed898993e6 templates/tracks/browser.mako
--- a/templates/tracks/browser.mako
+++ b/templates/tracks/browser.mako
@@ -230,7 +230,7 @@
             
             $("#save-icon").click( function() {                
                 // Show saving dialog box
-                show_modal("Saving...", "<img src='${h.url_for('/static/images/yui/rel_interstitial_loading.gif')}'/>");
+                show_modal("Saving...", "progress");
                                     
                 // Save bookmarks.
                 var bookmarks = [];
@@ -267,7 +267,10 @@
                         // Needed to set URL when first saving a visualization.
                         window.history.pushState({}, "", vis_info.url);
                     },
-                    error: function() { alert("Could not save visualization"); }
+                    error: function() { 
+                        show_modal( "Could Not Save", "Could not save visualization. Please try again later.", 
+                                    { "Close" : hide_modal } );
+                    }
                 });
             });

Repository URL: https://bitbucket.org/galaxy/galaxy-central/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the galaxy-commits mailing list