This file contains 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
page.base('/backbone-router'); | |
page('/', loadPage); | |
page('/orders', loadPage, triggerPageChangeEvent); | |
page('/customers', loadPage, triggerPageChangeEvent); | |
page('/search', loadPage, triggerPageChangeEvent); | |
page('*', notFound); |
This file contains 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
<script src="config.js"></script> | |
<script data-main="main" src="vendor/require.min.js"></script> | |
<!--(if target dist)> | |
<script> | |
require.config({ | |
urlArgs: '{{bustVersion}}' | |
}); | |
</script> | |
<!(endif)--> |
This file contains 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
targethtml: { | |
dist: { | |
options: { | |
curlyTags: { | |
bustVersion: '<%= grunt.template.today("yyyymmdd") %>' | |
} | |
}, | |
files: { | |
'dist/index.html': 'dev/index.html' |
This file contains 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
'.js-timezoneSelect': { | |
observe: 'timezone', | |
selectOptions: { | |
collection: Repository.getTimezoneCollection(), | |
labelPath: 'timeZoneName', | |
valuePath: 'timeZoneId', | |
defaultOption: { | |
label: 'Select One', |
This file contains 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
bindings: { | |
'.js-adminConsole': { | |
observe : 'message', | |
visible : function () { | |
return this.user.type = 'admin'; | |
}, | |
This file contains 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
bindings: { | |
'.js-startDate': { | |
observe : 'startDate', | |
onGet : function (value) { | |
return Formatter.convertToDDMMYYYY(value); | |
}, | |
This file contains 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
events: { | |
'keyup .js-full-name' : 'updateFullName' | |
} | |
updateFullName: function() { | |
this.model.set('fullName', this.$el.find('.js-full-name')); | |
} |
This file contains 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
bindings: { | |
'.js-full-name' : 'fullName', | |
'.js-address-line-1' : 'addressLine1', | |
'.js-address-line-2' : 'addressLine2', | |
'.js-city' : 'city', |
This file contains 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
initialize: function() { | |
this.listenTo(this.model, 'change:modelAttribute', this.updateView); | |
} |
This file contains 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
fetch: function (options) { | |
options.reset = true; | |
return Backbone.Collection.prototype.fetch.call(this, options); | |
} |