commit/galaxy-central: james_taylor: modal: Restore wider width, allow a close button in the title bar
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/5337e7104757/ Changeset: 5337e7104757 User: james_taylor Date: 2013-09-27 19:01:24 Summary: modal: Restore wider width, allow a close button in the title bar Affected #: 4 files diff -r eb61a8316af6a9886a1821cab129c1bfedb11665 -r 5337e71047572cd6b7dd812d74ff1513527b6897 static/scripts/galaxy.panels.js --- a/static/scripts/galaxy.panels.js +++ b/static/scripts/galaxy.panels.js @@ -125,15 +125,22 @@ this.$body = this.$dialog.find( ".modal-body" ); this.$footer = this.$dialog.find( ".modal-footer" ); this.$backdrop = options.backdrop; + // Close button + this.$header.find( ".close" ).on( "click", $.proxy( this.hide, this ) ); } $.extend( Modal.prototype, { setContent: function( options ) { + this.$header.hide(); // Title if ( options.title ) { this.$header.find( ".title" ).html( options.title ); this.$header.show(); + } + if ( options.closeButton ) { + this.$header.find( ".close" ).show(); + this.$header.show(); } else { - this.$header.hide(); + this.$header.find( ".close" ).hide(); } // Buttons this.$footer.hide(); @@ -223,8 +230,8 @@ hide_modal(); $("#overlay-background").unbind( "click.overlay" ); }); - show_modal( null, $( "<div style='margin: -5px;'><img id='close_button' style='position:absolute;right:-17px;top:-15px;src='" + galaxy_config.root + "static/images/closebox.png'><iframe style='margin: 0; padding: 0;' src='" + options.url + "' width='" + width + "' height='" + height + "' scrolling='" + scroll + "' frameborder='0'></iframe></div>" ) ); - $("#close_button").bind( "click", function() { hide_modal(); } ); + modal.setContent( { closeButton: true, title: " ", body: $( "<div style='margin: -5px;'><iframe style='margin: 0; padding: 0;' src='" + options.url + "' width='" + width + "' height='" + height + "' scrolling='" + scroll + "' frameborder='0'></iframe></div>" ) } ); + modal.show( { backdrop: true } ); } function user_changed( user_email, is_admin ) { diff -r eb61a8316af6a9886a1821cab129c1bfedb11665 -r 5337e71047572cd6b7dd812d74ff1513527b6897 static/style/blue/base.css --- a/static/style/blue/base.css +++ b/static/style/blue/base.css @@ -755,6 +755,7 @@ pre{overflow:auto;word-wrap:normal;white-space:pre} .dropdown-menu{max-width:auto} input[type="checkbox"],input[type="radio"]{margin-left:0.5ex;margin-right:0.5ex} +.modal-dialog{width:680px} .modal-body{overflow:auto} .nav-tabs{margin-bottom:15px} a{text-decoration:underline} diff -r eb61a8316af6a9886a1821cab129c1bfedb11665 -r 5337e71047572cd6b7dd812d74ff1513527b6897 static/style/src/less/galaxy_bootstrap/overrides.less --- a/static/style/src/less/galaxy_bootstrap/overrides.less +++ b/static/style/src/less/galaxy_bootstrap/overrides.less @@ -27,6 +27,10 @@ // Modal -- wider by default, scroll like Trello +.modal-dialog { + width: 690px; +} + /* NOTE: these styles do not currently work. diff -r eb61a8316af6a9886a1821cab129c1bfedb11665 -r 5337e71047572cd6b7dd812d74ff1513527b6897 templates/base/base_panels.mako --- a/templates/base/base_panels.mako +++ b/templates/base/base_panels.mako @@ -261,7 +261,8 @@ <div id="top-modal-dialog" class="modal-dialog"><div class="modal-content"><div class="modal-header"> - <span><h4 class='title'>${title}</h4></span> + <button type='button' class='close' style="display: none;">×</button> + <h4 class='title'>${title}</h4></div><div class="modal-body">${content}</div><div class="modal-footer"> 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.
participants (1)
-
commits-noreply@bitbucket.org