#459 wcag styles + now builds proprly
This commit is contained in:
26
dist/recline.css
vendored
26
dist/recline.css
vendored
@@ -219,6 +219,32 @@ div.data-table-cell-content-numeric > a.data-table-cell-edit {
|
|||||||
.recline-read-only a.row-header-menu {
|
.recline-read-only a.row-header-menu {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************
|
||||||
|
* WCAG 2.0
|
||||||
|
*************************/
|
||||||
|
|
||||||
|
.wcag_hide {
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
left:-10000px;
|
||||||
|
width:1px;
|
||||||
|
height:1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wcag_hide2 {
|
||||||
|
clip: rect(1px, 1px, 1px, 1px);
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wcag_show_on_focus {
|
||||||
|
font-size: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wcag_show_on_focus:focus {
|
||||||
|
font-size: 1em !important;
|
||||||
|
}
|
||||||
.recline-map .map {
|
.recline-map .map {
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|||||||
4
make
4
make
@@ -5,7 +5,9 @@ import os
|
|||||||
|
|
||||||
def cat():
|
def cat():
|
||||||
print("** Combining js files")
|
print("** Combining js files")
|
||||||
cmd = '{ ls src/**/*.js & ls src/*.js; } | grep -v couchdb | xargs cat > dist/recline.js'
|
cmd = 'ls src/**/*.js | grep -v couchdb | xargs cat > dist/recline.js'
|
||||||
|
os.system(cmd)
|
||||||
|
cmd = 'ls src/*.js | grep -v couchdb | xargs cat >> dist/recline.js'
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
cmd = 'cat src/model.js src/backend.memory.js > dist/recline.dataset.js'
|
cmd = 'cat src/model.js src/backend.memory.js > dist/recline.dataset.js'
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ this.recline.View.translations['en'] = {
|
|||||||
map_mapping: 'Coordinates source',
|
map_mapping: 'Coordinates source',
|
||||||
map_mapping_lat_lon: 'Latitude / Longitude fields',
|
map_mapping_lat_lon: 'Latitude / Longitude fields',
|
||||||
map_mapping_geojson: 'GeoJSON field'
|
map_mapping_geojson: 'GeoJSON field'
|
||||||
}
|
};
|
||||||
@@ -63,4 +63,4 @@ this.recline.View.translations['pl'] = {
|
|||||||
Cluster_markers: 'Łącz pobliskie punkty w grupy',
|
Cluster_markers: 'Łącz pobliskie punkty w grupy',
|
||||||
|
|
||||||
num_records: '<span class="doc-count">{recordCount}</span> rekordów'
|
num_records: '<span class="doc-count">{recordCount}</span> rekordów'
|
||||||
}
|
};
|
||||||
@@ -13,12 +13,11 @@ Backbone.I18nView = Backbone.View.extend({
|
|||||||
this.cache[this.locale] = {};
|
this.cache[this.locale] = {};
|
||||||
},
|
},
|
||||||
|
|
||||||
formatMessage(key, values) {
|
|
||||||
this.cachedMsg.format(key, values);
|
|
||||||
},
|
|
||||||
|
|
||||||
// TODO how to use it from outside? an singleton instance of I18n? use case: pass translated strings into view initializer
|
// TODO how to use it from outside? an singleton instance of I18n? use case: pass translated strings into view initializer
|
||||||
t: function(key, values = {}, defaultMessage = null) {
|
t: function(key) {
|
||||||
|
this.t(key, {}, null);
|
||||||
|
},
|
||||||
|
t: function(key, values, defaultMessage) {
|
||||||
// get the message from current locale
|
// get the message from current locale
|
||||||
var msg = recline.View.translations[this.locale][key];
|
var msg = recline.View.translations[this.locale][key];
|
||||||
|
|
||||||
@@ -38,8 +37,6 @@ Backbone.I18nView = Backbone.View.extend({
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO i18n documentation
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var formatter = this.cache[this.locale][msg];
|
var formatter = this.cache[this.locale][msg];
|
||||||
if (formatter === undefined) {
|
if (formatter === undefined) {
|
||||||
@@ -61,7 +58,7 @@ Backbone.I18nView = Backbone.View.extend({
|
|||||||
|
|
||||||
MustacheFormatter: function() {
|
MustacheFormatter: function() {
|
||||||
var formatter = new Proxy(this, {
|
var formatter = new Proxy(this, {
|
||||||
get(view, name) {
|
get: function(view, name) {
|
||||||
return function() {
|
return function() {
|
||||||
var f = function (text, render) {
|
var f = function (text, render) {
|
||||||
var trans = view.t(name, this, text);
|
var trans = view.t(name, this, text);
|
||||||
@@ -73,7 +70,7 @@ Backbone.I18nView = Backbone.View.extend({
|
|||||||
return f;
|
return f;
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
has(target, prop) {
|
has: function(target, prop) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -448,10 +448,11 @@ my.GridControl= Backbone.I18nView.extend({
|
|||||||
// Template for row edit menu , change it if you don't love
|
// Template for row edit menu , change it if you don't love
|
||||||
template: '<h1><button href="#" class="recline-row-add btn btn-default">{{t.Add_row}}</button></h1>',
|
template: '<h1><button href="#" class="recline-row-add btn btn-default">{{t.Add_row}}</button></h1>',
|
||||||
|
|
||||||
initialize: function(options = {}){
|
initialize: function(options){
|
||||||
var self = this;
|
var self = this;
|
||||||
_.bindAll(this, 'render');
|
_.bindAll(this, 'render');
|
||||||
this.state = new recline.Model.ObjectState();
|
this.state = new recline.Model.ObjectState();
|
||||||
|
options = options || {};
|
||||||
this.initializeI18n(options.locale);
|
this.initializeI18n(options.locale);
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
|||||||
@@ -27,9 +27,10 @@ my.QueryEditor = Backbone.I18nView.extend({
|
|||||||
'submit form': 'onFormSubmit'
|
'submit form': 'onFormSubmit'
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function(options = {}) {
|
initialize: function(options) {
|
||||||
_.bindAll(this, 'render');
|
_.bindAll(this, 'render');
|
||||||
this.listenTo(this.model, 'change', this.render);
|
this.listenTo(this.model, 'change', this.render);
|
||||||
|
options = options || {};
|
||||||
this.initializeI18n(options.locale);
|
this.initializeI18n(options.locale);
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
|||||||
@@ -50,10 +50,12 @@ my.ValueFilter = Backbone.I18nView.extend({
|
|||||||
'submit form.js-edit': 'onTermFiltersUpdate',
|
'submit form.js-edit': 'onTermFiltersUpdate',
|
||||||
'submit form.js-add': 'onAddFilter'
|
'submit form.js-add': 'onAddFilter'
|
||||||
},
|
},
|
||||||
initialize: function(options = {}) {
|
initialize: function(options) {
|
||||||
_.bindAll(this, 'render');
|
_.bindAll(this, 'render');
|
||||||
this.listenTo(this.model.fields, 'all', this.render);
|
this.listenTo(this.model.fields, 'all', this.render);
|
||||||
this.listenTo(this.model.queryState, 'change change:filters:new-blank', this.render);
|
this.listenTo(this.model.queryState, 'change change:filters:new-blank', this.render);
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
this.initializeI18n(options.locale);
|
this.initializeI18n(options.locale);
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
|
|||||||
Reference in New Issue
Block a user