build/joosy.js in joosy-1.2.0.alpha.54 vs build/joosy.js in joosy-1.2.0.alpha.55
- old
+ new
@@ -537,18 +537,10 @@
var _ref;
if ((_ref = this.$container) != null) {
_ref.unbind().off();
}
return this.$container = $();
- },
- __loadData: function(done) {
- var _this = this;
- this.data = {};
- return this.__runFetchs([], function() {
- _this.dataFetched = true;
- return done();
- });
}
};
if ((typeof define !== "undefined" && define !== null ? define.amd : void 0) != null) {
define('joosy/modules/dom', function() {
@@ -1205,10 +1197,16 @@
return action();
}), delay);
this.__intervals.push(timer);
return timer;
},
+ clearTimeout: function(timer) {
+ return window.clearTimeout(timer);
+ },
+ clearInterval: function(timer) {
+ return window.clearInterval(timer);
+ },
__clearTime: function() {
var entry, _i, _j, _len, _len1, _ref, _ref1, _results;
if (this.__intervals) {
_ref = this.__intervals;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@@ -2304,29 +2302,37 @@
};
});
}).call(this);
(function() {
- Joosy.Application = {
- Pages: {},
- Layouts: {},
- Controls: {},
- initialized: false,
- loading: true,
- config: {
+ Joosy.Application = (function() {
+ function Application() {}
+
+ Application.Pages = {};
+
+ Application.Layouts = {};
+
+ Application.Controls = {};
+
+ Application.initialized = false;
+
+ Application.loading = true;
+
+ Application.config = {
test: false,
debug: false,
templater: {
prefix: ''
},
router: {
html5: false,
base: '',
prefix: ''
}
- },
- initialize: function(selector, options) {
+ };
+
+ Application.initialize = function(selector, options) {
var _this = this;
this.selector = selector;
if (options == null) {
options = {};
}
@@ -2350,52 +2356,55 @@
} else {
throw new "Unknown kind of route action";
}
});
return this.initialized = true;
- },
- reset: function() {
+ };
+
+ Application.reset = function() {
var _ref;
Joosy.Router.reset();
Joosy.templater(false);
Joosy.debug(false);
if ((_ref = this.page) != null) {
_ref.__unload();
}
delete this.page;
this.loading = true;
return this.initialized = false;
- },
- navigate: function() {
- var _ref;
- return (_ref = this.router).navigate.apply(_ref, arguments);
- },
- content: function() {
+ };
+
+ Application.content = function() {
return $(this.selector);
- },
- changePage: function(page, params) {
+ };
+
+ Application.changePage = function(page, params) {
var attempt;
attempt = new page(params, this.page);
if (!attempt.halted) {
if (attempt.layoutShouldChange && attempt.layout) {
attempt.layout.__bootstrapDefault(attempt, this.content());
} else {
attempt.__bootstrapDefault(this.content());
}
return this.page = attempt;
}
- },
- forceSandbox: function() {
+ };
+
+ Application.forceSandbox = function() {
var sandbox;
sandbox = Joosy.uid();
this.selector = "#" + sandbox;
return $('body').append($('<div/>').attr('id', sandbox).css({
height: '0px',
width: '0px',
overflow: 'hidden'
}));
- }
- };
+ };
+
+ return Application;
+
+ })();
if ((typeof define !== "undefined" && define !== null ? define.amd : void 0) != null) {
define('joosy/application', function() {
return Joosy.Application;
});