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
<?php | |
// handle file ... | |
// more stuff ... | |
?> | |
<script language='javascript' type='text/javascript'> | |
window.top.window.EventBus.dispatch("upload_done", this, 42); | |
</script> |
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
var myView = Backbone.View.extend({ | |
events: { | |
'click .start_upload': 'start_upload' | |
} | |
initialize: function(){ | |
EventBus.addEventListener("upload_done", this.upload_callback); | |
} |
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
window.APP = Backbone.Router.extend({ | |
initialize: function(){ | |
this.route(/.*?/, "e404"); | |
this.route(/^$/, 'mainPage'); | |
//Some other routes | |
}, | |
e404: function(){ | |
console.log("Error 404!"); |
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
window.App = Backbone.Router.extend({ | |
initialize: function(){ | |
this.route(/^$/, 'mainPage'); | |
} | |
mainPage: function(){ | |
console.log("Showing main page..."); | |
var content = $('#content'); |
NewerOlder