Permalink
Browse files

Updated tableling to 0.0.17. Version bump to 0.0.14.

  • Loading branch information...
1 parent ba28a1c commit 33d2196e914a26c32bd47414ce367578e158c9fa @AlphaHydrae committed Mar 9, 2013
View
@@ -1 +1 @@
-0.0.13
+0.0.14
@@ -1,3 +1,3 @@
module Tableling
- VERSION = "0.0.13"
+ VERSION = "0.0.14"
end
@@ -3555,15 +3555,15 @@ _.extend(Marionette.Module, {
return Marionette;
})(Backbone, _, $ || window.jQuery || window.Zepto || window.ender);
/*!
- * Tableling v0.0.16
+ * Tableling v0.0.17
* Copyright (c) 2012-2013 Simon Oulevay (Alpha Hydrae) <hydrae.alpha@gmail.com>
* Distributed under MIT license
* https://github.com/AlphaHydrae/tableling
*/
Backbone.Tableling = Tableling = (function(Backbone, _, $){
var Tableling = {
- version : "0.0.16"
+ version : "0.0.17"
};
// Tableling
@@ -3803,7 +3803,13 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
// event aggregator.
Tableling.Module = Backbone.Marionette.ItemView.extend({
+ i18n : {},
+ templateHelpers : function() {
+ return this.i18n;
+ },
+
initialize : function(options) {
+
this.vent = options.vent;
// The `setup` method of the view is called when the table
@@ -3813,6 +3819,8 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
// The `refresh` method of the view is called every time the table
// is refreshed.
this.vent.on('table:refreshed', this.refresh, this);
+
+ this.i18n = _.clone(options.i18n || this.i18n);
},
// Call `update` to trigger an update of the table.
@@ -4003,9 +4011,16 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
});
Tableling.Plain.PageSizeView = Tableling.Plain.Table.prototype.pageSizeView = Tableling.FieldModule.extend({
+
// TODO: update current page intelligently
name : 'pageSize',
- template : _.template('<select name="pageSize" /> entries per page'),
+ template : function(data) {
+ return _.template('<select name="pageSize" /> <%- entries %>', data);
+ },
+
+ i18n : {
+ entries : 'entries per page'
+ },
sizes : [ 10, 15, 20, 25, 50 ],
ui : {
@@ -4036,7 +4051,13 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Plain.QuickSearchView = Tableling.Plain.Table.prototype.quickSearchView = Tableling.FieldModule.extend({
name : 'quickSearch',
- template : _.template('<input type="text" name="quickSearch" placeholder="Quick search..." />'),
+ template : function(data) {
+ return _.template('<input type="text" name="quickSearch" placeholder="<%- quickSearch %>" />', data);
+ },
+
+ i18n : {
+ quickSearch : 'Quick search...'
+ },
config : function() {
var config = Tableling.FieldModule.prototype.config.call(this);
@@ -4047,7 +4068,17 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Plain.InfoView = Tableling.Plain.Table.prototype.infoView = Tableling.Module.extend({
- template : _.template('Showing <span class="first">0</span> to <span class="last">0</span> of <span class="total">0</span> entries'),
+ template : function(data) {
+ return _.template(data.template, {
+ first : '<span class="first">0</span>',
+ last : '<span class="last">0</span>',
+ total : '<span class="total">0</span>'
+ });
+ },
+
+ i18n : {
+ template : 'Showing <%= first %> to <%= last %> of <%= total %> entries'
+ },
ui : {
first: '.first',
@@ -4150,7 +4181,10 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Bootstrap.TableView = Tableling.Plain.TableView.extend({});
Tableling.Bootstrap.PageSizeView = Tableling.Bootstrap.Table.prototype.pageSizeView = Tableling.Plain.PageSizeView.extend({
- template : _.template('<select name="pageSize" class="input-mini"><option>5</option><option>10</option><option>15</option></select> entries per page')
+
+ template : function(data) {
+ return _.template('<select name="pageSize" class="input-mini"><option>5</option><option>10</option><option>15</option></select> <%- entries %>', data);
+ }
});
Tableling.Bootstrap.QuickSearchView = Tableling.Bootstrap.Table.prototype.quickSearchView = Tableling.Plain.QuickSearchView.extend({});
@@ -1,13 +1,13 @@
/*!
- * Tableling v0.0.16
+ * Tableling v0.0.17
* Copyright (c) 2012-2013 Simon Oulevay (Alpha Hydrae) <hydrae.alpha@gmail.com>
* Distributed under MIT license
* https://github.com/AlphaHydrae/tableling
*/
Backbone.Tableling = Tableling = (function(Backbone, _, $){
var Tableling = {
- version : "0.0.16"
+ version : "0.0.17"
};
// Tableling
@@ -247,7 +247,13 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
// event aggregator.
Tableling.Module = Backbone.Marionette.ItemView.extend({
+ i18n : {},
+ templateHelpers : function() {
+ return this.i18n;
+ },
+
initialize : function(options) {
+
this.vent = options.vent;
// The `setup` method of the view is called when the table
@@ -257,6 +263,8 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
// The `refresh` method of the view is called every time the table
// is refreshed.
this.vent.on('table:refreshed', this.refresh, this);
+
+ this.i18n = _.clone(options.i18n || this.i18n);
},
// Call `update` to trigger an update of the table.
@@ -447,9 +455,16 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
});
Tableling.Plain.PageSizeView = Tableling.Plain.Table.prototype.pageSizeView = Tableling.FieldModule.extend({
+
// TODO: update current page intelligently
name : 'pageSize',
- template : _.template('<select name="pageSize" /> entries per page'),
+ template : function(data) {
+ return _.template('<select name="pageSize" /> <%- entries %>', data);
+ },
+
+ i18n : {
+ entries : 'entries per page'
+ },
sizes : [ 10, 15, 20, 25, 50 ],
ui : {
@@ -480,7 +495,13 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Plain.QuickSearchView = Tableling.Plain.Table.prototype.quickSearchView = Tableling.FieldModule.extend({
name : 'quickSearch',
- template : _.template('<input type="text" name="quickSearch" placeholder="Quick search..." />'),
+ template : function(data) {
+ return _.template('<input type="text" name="quickSearch" placeholder="<%- quickSearch %>" />', data);
+ },
+
+ i18n : {
+ quickSearch : 'Quick search...'
+ },
config : function() {
var config = Tableling.FieldModule.prototype.config.call(this);
@@ -491,7 +512,17 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Plain.InfoView = Tableling.Plain.Table.prototype.infoView = Tableling.Module.extend({
- template : _.template('Showing <span class="first">0</span> to <span class="last">0</span> of <span class="total">0</span> entries'),
+ template : function(data) {
+ return _.template(data.template, {
+ first : '<span class="first">0</span>',
+ last : '<span class="last">0</span>',
+ total : '<span class="total">0</span>'
+ });
+ },
+
+ i18n : {
+ template : 'Showing <%= first %> to <%= last %> of <%= total %> entries'
+ },
ui : {
first: '.first',
@@ -594,7 +625,10 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Bootstrap.TableView = Tableling.Plain.TableView.extend({});
Tableling.Bootstrap.PageSizeView = Tableling.Bootstrap.Table.prototype.pageSizeView = Tableling.Plain.PageSizeView.extend({
- template : _.template('<select name="pageSize" class="input-mini"><option>5</option><option>10</option><option>15</option></select> entries per page')
+
+ template : function(data) {
+ return _.template('<select name="pageSize" class="input-mini"><option>5</option><option>10</option><option>15</option></select> <%- entries %>', data);
+ }
});
Tableling.Bootstrap.QuickSearchView = Tableling.Bootstrap.Table.prototype.quickSearchView = Tableling.Plain.QuickSearchView.extend({});
@@ -14826,15 +14826,15 @@ _.extend(Marionette.Module, {
return Marionette;
})(Backbone, _, $ || window.jQuery || window.Zepto || window.ender);
/*!
- * Tableling v0.0.16
+ * Tableling v0.0.17
* Copyright (c) 2012-2013 Simon Oulevay (Alpha Hydrae) <hydrae.alpha@gmail.com>
* Distributed under MIT license
* https://github.com/AlphaHydrae/tableling
*/
Backbone.Tableling = Tableling = (function(Backbone, _, $){
var Tableling = {
- version : "0.0.16"
+ version : "0.0.17"
};
// Tableling
@@ -15074,7 +15074,13 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
// event aggregator.
Tableling.Module = Backbone.Marionette.ItemView.extend({
+ i18n : {},
+ templateHelpers : function() {
+ return this.i18n;
+ },
+
initialize : function(options) {
+
this.vent = options.vent;
// The `setup` method of the view is called when the table
@@ -15084,6 +15090,8 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
// The `refresh` method of the view is called every time the table
// is refreshed.
this.vent.on('table:refreshed', this.refresh, this);
+
+ this.i18n = _.clone(options.i18n || this.i18n);
},
// Call `update` to trigger an update of the table.
@@ -15274,9 +15282,16 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
});
Tableling.Plain.PageSizeView = Tableling.Plain.Table.prototype.pageSizeView = Tableling.FieldModule.extend({
+
// TODO: update current page intelligently
name : 'pageSize',
- template : _.template('<select name="pageSize" /> entries per page'),
+ template : function(data) {
+ return _.template('<select name="pageSize" /> <%- entries %>', data);
+ },
+
+ i18n : {
+ entries : 'entries per page'
+ },
sizes : [ 10, 15, 20, 25, 50 ],
ui : {
@@ -15307,7 +15322,13 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Plain.QuickSearchView = Tableling.Plain.Table.prototype.quickSearchView = Tableling.FieldModule.extend({
name : 'quickSearch',
- template : _.template('<input type="text" name="quickSearch" placeholder="Quick search..." />'),
+ template : function(data) {
+ return _.template('<input type="text" name="quickSearch" placeholder="<%- quickSearch %>" />', data);
+ },
+
+ i18n : {
+ quickSearch : 'Quick search...'
+ },
config : function() {
var config = Tableling.FieldModule.prototype.config.call(this);
@@ -15318,7 +15339,17 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Plain.InfoView = Tableling.Plain.Table.prototype.infoView = Tableling.Module.extend({
- template : _.template('Showing <span class="first">0</span> to <span class="last">0</span> of <span class="total">0</span> entries'),
+ template : function(data) {
+ return _.template(data.template, {
+ first : '<span class="first">0</span>',
+ last : '<span class="last">0</span>',
+ total : '<span class="total">0</span>'
+ });
+ },
+
+ i18n : {
+ template : 'Showing <%= first %> to <%= last %> of <%= total %> entries'
+ },
ui : {
first: '.first',
@@ -15421,7 +15452,10 @@ Backbone.Tableling = Tableling = (function(Backbone, _, $){
Tableling.Bootstrap.TableView = Tableling.Plain.TableView.extend({});
Tableling.Bootstrap.PageSizeView = Tableling.Bootstrap.Table.prototype.pageSizeView = Tableling.Plain.PageSizeView.extend({
- template : _.template('<select name="pageSize" class="input-mini"><option>5</option><option>10</option><option>15</option></select> entries per page')
+
+ template : function(data) {
+ return _.template('<select name="pageSize" class="input-mini"><option>5</option><option>10</option><option>15</option></select> <%- entries %>', data);
+ }
});
Tableling.Bootstrap.QuickSearchView = Tableling.Bootstrap.Table.prototype.quickSearchView = Tableling.Plain.QuickSearchView.extend({});

0 comments on commit 33d2196

Please sign in to comment.