3m5-coco
Advanced tools
Comparing version 0.1.84 to 0.1.85
# Coco changelog | ||
## 0.1.84 (unpublished) | ||
## 0.1.85 | ||
- deactivate HandleBars Helper: is, isNot, isGreater, isGreaterThan, isLess, isLessThan | ||
- added Handelbars Helpers: add, sub, concat, for | ||
- do not fire route, if it is the same as previous | ||
## 0.1.84 | ||
- Coco.translator now does not eats all errors in loadMessages success callback, so you can use promises OR callback | ||
@@ -6,0 +12,0 @@ |
@@ -161,3 +161,3 @@ "use strict"; | ||
$statics: { | ||
version: "0.1.84", | ||
version: "0.1.85", | ||
initialized: false | ||
@@ -164,0 +164,0 @@ }, |
@@ -74,54 +74,44 @@ 'use strict'; | ||
Handlebars.registerHelper('is', function (v1, v2, options) { | ||
console.warn("Handlebars.Helper 'is' is deprecated! use 'ifCond' instead!"); | ||
if (v1 == v2) { | ||
return options.fn(this); | ||
} | ||
Handlebars.registerHelper('add', function (v1, v2) { | ||
return Number(v1) + Number(v2); | ||
}); | ||
return options.inverse(this); | ||
Handlebars.registerHelper('sub', function (v1, v2) { | ||
return Number(v1) - Number(v2); | ||
}); | ||
Handlebars.registerHelper('isNot', function (v1, v2, options) { | ||
console.warn("Handlebars.Helper 'isNot' is deprecated! use 'ifCond' instead!"); | ||
if (v1 != v2) { | ||
return options.fn(this); | ||
Handlebars.registerHelper('concat', function (v1, v2) { | ||
return v1 + v2; | ||
}); | ||
Handlebars.registerHelper('for', function (from, to, step, block) { | ||
var accum = ''; | ||
for (var i = from; i < to; i += step) { | ||
accum += block.fn(i); | ||
} | ||
return accum; | ||
}); | ||
return options.inverse(this); | ||
Handlebars.registerHelper('is', function (v1, v2, options) { | ||
console.error("Handlebars.Helper 'is' is deprecated! use 'ifCond' instead!"); | ||
}); | ||
Handlebars.registerHelper('isNot', function (v1, v2, options) { | ||
console.error("Handlebars.Helper 'isNot' is deprecated! use 'ifCond' instead!"); | ||
}); | ||
Handlebars.registerHelper('isGreater', function (v1, v2, options) { | ||
console.warn("Handlebars.Helper 'isGreater' is deprecated! use 'ifCond' instead!"); | ||
if (v1 > v2) { | ||
return options.fn(this); | ||
} | ||
return options.inverse(this); | ||
console.error("Handlebars.Helper 'isGreater' is deprecated! use 'ifCond' instead!"); | ||
}); | ||
Handlebars.registerHelper('isGreaterThan', function (v1, v2, options) { | ||
console.warn("Handlebars.Helper 'isGreaterThan' is deprecated! use 'ifCond' instead!"); | ||
if (v1 >= v2) { | ||
return options.fn(this); | ||
} | ||
return options.inverse(this); | ||
console.error("Handlebars.Helper 'isGreaterThan' is deprecated! use 'ifCond' instead!"); | ||
}); | ||
Handlebars.registerHelper('isLess', function (v1, v2, options) { | ||
console.warn("Handlebars.Helper 'isLess' is deprecated! use 'ifCond' instead!"); | ||
if (v1 < v2) { | ||
return options.fn(this); | ||
} | ||
return options.inverse(this); | ||
Handlebars.registerHelper('isLess', function () { | ||
console.error("Handlebars.Helper 'isLess' is deprecated! use 'ifCond' instead!"); | ||
}); | ||
Handlebars.registerHelper('isLessThan', function (v1, v2, options) { | ||
console.warn("Handlebars.Helper 'isLessThan' is deprecated! use 'ifCond' instead!"); | ||
if (v1 <= v2) { | ||
return options.fn(this); | ||
} | ||
return options.inverse(this); | ||
Handlebars.registerHelper('isLessThan', function () { | ||
console.error("Handlebars.Helper 'isLessThan' is deprecated! use 'ifCond' instead!"); | ||
}); | ||
@@ -128,0 +118,0 @@ |
@@ -492,2 +492,7 @@ "use strict"; | ||
__fireRoute: function __fireRoute() { | ||
//do not fire route, if it is the same as previous | ||
if (this.__nextRoute && this.__currentRoute && this.__nextRoute.key == this.__currentRoute.key && JSON.stringify(this.__nextRoute.args) == JSON.stringify(this.__currentRoute.args)) { | ||
return false; | ||
} | ||
if (this.__currentRoute != null) { | ||
@@ -494,0 +499,0 @@ // The onPause method of a view can return a value that is pushed to the params to the next active view. |
@@ -234,3 +234,3 @@ "use strict"; | ||
Object.keys(data).forEach(function (k) { | ||
if (typeof data[k] != 'boolean' && !data[k]) { | ||
if (typeof data[k] != 'boolean' && typeof data[k] != 'number' && !data[k]) { | ||
delete data[k]; | ||
@@ -237,0 +237,0 @@ } |
{ | ||
"name": "3m5-coco", | ||
"version": "0.1.84", | ||
"version": "0.1.85", | ||
"description": "a simple MVC Framework", | ||
@@ -5,0 +5,0 @@ "main": "lib/Coco.Init.js", |
422332
35
7597