/*jshint indent:2, curly:true, eqeqeq:true, immed:true, latedef:true,
newcap:true, noarg:true, regexp:true, undef:true, trailing:true,
white:true*/
-/*global enyo:true, XT:true, _:true, document:true, window:true, XM:true */
+/*global Backbone:true, enyo:true, XT:true, _:true, document:true, window:true, XM:true */
(function () {
*/
handleKeyDown: function (inSender, inEvent) {
var that = this,
- keyCode = inEvent.keyCode,
+ keyCode = inEvent.which,
exoticTransforms = {},
numberShiftCharacters = ")!@#$%^&*(";
details = XT.session.details;
loginInfo.setContent(details.username + " ยท " + details.organization);
this.state = RUNNING;
+ that.startupProcess();
+
+ // TODO - 7. Initiate Empty Database Startup "checklist" process for empty/quick start databases
+ } else if (this.state === RUNNING) {
+ // No process in place so proceed to activate
XM.Tuplespace.trigger("activate");
XT.app.$.postbooks.activate();
+
+ // Send no Base Currency event
+ if (!XT.baseCurrency()) {
+ this.waterfallNoBaseCurr();
+ }
+ Backbone.history.start();
}
},
start: function (debug) {
- if (this.getIsStarted()) { return; }
+ if (this.getIsStarted()) {return; }
XT.app = this;
this.setDebug(debug);
togglePullout: function (inSender, inEvent) {
this.$.pullout.togglePullout(inSender, inEvent);
},
+ waterfallNoBaseCurr: function (inSender, inEvent) {
+ this.$.postbooks.waterfall("onNoBaseCurr", inEvent);
+ return true;
+ },
waterfallSearch: function (inSender, inEvent) {
this.$.postbooks.waterfall("onSearch", inEvent);
return true; // don't want to double up