Created
February 26, 2013 22:19
-
-
Save markupboy/5042837 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
registerPane: function(index, elem) { | |
var $elem = $(elem); | |
var name = $elem.data('pane'); | |
this.panes[name] = { | |
url: $elem.prop('href'), | |
pane: $('#settings_'+name), | |
link: $elem, | |
}; | |
this.panes.length++; | |
$elem.on('click', $.proxy(this.confirmIfDirty, this)); | |
}, | |
confirmIfDirty: function() { | |
if(this.panes.active.dirty) { | |
var check = confirm('are you sure?') | |
if(!check) { | |
return false | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment