commit/galaxy-central: martenson: better context handling in library javascript
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c98b209d93d1/ Changeset: c98b209d93d1 User: martenson Date: 2014-01-02 19:31:24 Summary: better context handling in library javascript Affected #: 2 files diff -r 72027582a03ddee4ba050d1ffc1bdf8991b1eda4 -r c98b209d93d15551ba1ae26c7aa95babf7b8be33 static/scripts/galaxy.library.js --- a/static/scripts/galaxy.library.js +++ b/static/scripts/galaxy.library.js @@ -415,7 +415,7 @@ 'Close' : function() { self.modal.hide(); $('.modal').remove(); self.modal = null; } // TODO refill nicely modal with data } }); - this.modal.bindEvents(event, this); + this.modal.bindEvents(event); $(".peek").html(item.get("peek")); var history_footer_tmpl = _.template(this.templateHistorySelectInModal(), {histories : histories.models}); diff -r 72027582a03ddee4ba050d1ffc1bdf8991b1eda4 -r c98b209d93d15551ba1ae26c7aa95babf7b8be33 static/scripts/galaxy.modal.js --- a/static/scripts/galaxy.modal.js +++ b/static/scripts/galaxy.modal.js @@ -38,7 +38,7 @@ }) // bind the 'click anywhere' to hide() function... $('html').on('click', function(event){ - that.hide(); + self.hide(); }) // ...but don't hide if the click is on modal content $('.modal-content').on('click', function(event){ @@ -47,14 +47,14 @@ }, // unbind the click-to-hide function - unbindEvents: function(event, that){ + unbindEvents: function(event){ // bind the ESC key to hide() function $(document).off('keyup', function(event){ - if (event.keyCode == 27) { that.hide(); } + if (event.keyCode == 27) { self.hide(); } }) // unbind the 'click anywhere' to hide() function... $('html').off('click', function(event){ - that.hide(); + self.hide(); }) $('.modal-content').off('click', function(event){ event.stopPropagation(); 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