\
\
@@ -1438,15 +1443,17 @@ my.FlotControls = Backbone.View.extend({
',
templateSeriesEditor: ' \
\
-
\
-
\
',
@@ -1801,11 +1808,11 @@ my.GridRow = Backbone.View.extend({
this.model.set(newData);
this.trigger('recline:flash', {message: "Actualizando fila...", loader: true});
this.model.save().then(function(response) {
- this.trigger('recline:flash', {message: "Fila actualizada correctamente", category: 'success'});
+ this.trigger('recline:flash', {message: "Fila actualizada con éxito", category: 'success'});
})
.fail(function() {
this.trigger('recline:flash', {
- message: 'Ha ocurrido un error para guardar la fila',
+ message: 'Ha ocurrido un error guardando la fila',
category: 'error',
persist: true
});
@@ -1874,6 +1881,7 @@ my.Map = Backbone.View.extend({
initialize: function(options) {
var self = this;
+ this.options = options;
this.visible = this.$el.is(':visible');
this.mapReady = false;
// this will be the Leaflet L.Map object (setup below)
@@ -2139,7 +2147,7 @@ my.Map = Backbone.View.extend({
_.each(docs,function(doc){
for (var key in self.features._layers){
- if (self.features._layers[key].feature.properties.cid == doc.cid){
+ if (self.features._layers[key].feature.geometry.properties.cid == doc.cid){
self.features.removeLayer(self.features._layers[key]);
}
}
@@ -2276,28 +2284,32 @@ my.Map = Backbone.View.extend({
// Private: Sets up the Leaflet map control and the features layer.
//
// The map uses a base layer from [Stamen](http://maps.stamen.com) based
- // on [OpenStreetMap](http://openstreetmap.org).
+ // on [OpenStreetMap data](http://openstreetmap.org) by default, but it can
+ // be configured passing the `mapTilesURL` and `mapTilesAttribution` options
+ // (`mapTilesSubdomains` is also supported), eg:
+ //
+ // view = new recline.View.Map({
+ // model: dataset,
+ // mapTilesURL: '//{s}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v7/{z}/{x}/{y}.png?access_token=pk.XXXX',
+ // mapTilesAttribution: '© MapBox etc..',
+ // mapTilesSubdomains: 'ab'
+ // })
+ //
//
_setupMap: function(){
- var self = this;
-
- if (!this.$map) {
- return;
- }
-
- this.map = new L.Map(this.$map.get(0));
-
// var mapUrl = "//stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg";
// var osmAttribution = 'Map tiles by
Stamen Design, under
CC BY 3.0. Data by
OpenStreetMap, under
CC BY SA.';
// var bg = new L.TileLayer(mapUrl, {maxZoom: 18, attribution: osmAttribution, subdomains: 'abcd'});
-
+
// Nueva url para el servidor de tiles:
var mapUrl = "//wms.ign.gob.ar/geoserver/gwc/service/tms/1.0.0/capabaseargenmap@EPSG%3A3857@png/{z}/{x}/{y}.png"
- // Damos los creditos a IGN
+ // Damos los créditos a IGN
var ignAttribution = '
Instituto Geografico Nacional'
// Creamos el layer:
+ var self = this;
+ this.map = new L.Map(this.$map.get(0));
var bg = new L.TileLayer(mapUrl, {maxZoom: 18, tms:true, attribution: ignAttribution, subdomains: 'abcd'});
this.map.addLayer(bg);
@@ -2339,24 +2351,24 @@ my.MapMenu = Backbone.View.extend({
\
\
+ Latitud y longitud \
\
\
\
-
\
+
\
\
-
\
-
\
+
\
\
- \
+ \
\
{{#fields}} \
\
@@ -2365,9 +2377,9 @@ my.MapMenu = Backbone.View.extend({
\
\
\
-
\
+
\
\
- \
+ \
\
{{#fields}} \
\
@@ -2377,15 +2389,15 @@ my.MapMenu = Backbone.View.extend({
\
\
\
- \
+ \
\
\
\
+ Ajustar zoom automáticamentev \
\
+ Agrupar marcadores \
\
\
\
@@ -2506,7 +2518,6 @@ my.MapMenu = Backbone.View.extend({
});
})(jQuery, recline.View);
-
/*jshint multistr:true */
// Standard JS module setup
@@ -2612,7 +2623,7 @@ my.MultiView = Backbone.View.extend({
\
\
{{#views}} \
-
{{label}} \
+
\
{{/views}} \
\
\
@@ -2622,7 +2633,7 @@ my.MultiView = Backbone.View.extend({
\
@@ -2633,8 +2644,8 @@ my.MultiView = Backbone.View.extend({
\
',
events: {
- 'click .menu-right a': '_onMenuClick',
- 'click .navigation a': '_onSwitchView'
+ 'click .menu-right button': '_onMenuClick',
+ 'click .navigation button': '_onSwitchView'
},
initialize: function(options) {
@@ -2642,7 +2653,10 @@ my.MultiView = Backbone.View.extend({
this._setupState(options.state);
// Hash of 'page' views (i.e. those for whole page) keyed by page name
- this.pageViews = [{
+ if (options.views) {
+ this.pageViews = options.views;
+ } else {
+ this.pageViews = [{
id: 'grid',
label: 'Tabla',
view: new my.SlickGrid({
@@ -2651,7 +2665,7 @@ my.MultiView = Backbone.View.extend({
})
}, {
id: 'graph',
- label: 'Gráficos',
+ label: 'Gráfico',
view: new my.Graph({
model: this.model,
state: this.state.get('view-graph')
@@ -2664,6 +2678,7 @@ my.MultiView = Backbone.View.extend({
state: this.state.get('view-map')
})
}];
+ }
// Hashes of sidebar elements
this.sidebarViews = [{
id: 'filterEditor',
@@ -2789,8 +2804,8 @@ my.MultiView = Backbone.View.extend({
},
updateNav: function(pageName) {
- this.$el.find('.navigation a').removeClass('active');
- var $el = this.$el.find('.navigation a[data-view="' + pageName + '"]');
+ this.$el.find('.navigation button').removeClass('active');
+ var $el = this.$el.find('.navigation button[data-view="' + pageName + '"]');
$el.addClass('active');
// add/remove sidebars and hide inactive views
@@ -2909,7 +2924,7 @@ my.MultiView = Backbone.View.extend({
// * loader: if true show loading spinner
notify: function(flash) {
var tmplData = _.extend({
- message: 'Ya casi estamos...',
+ message: 'Loading',
category: 'warning',
loader: false
},
@@ -3101,7 +3116,7 @@ my.SlickGrid = Backbone.View.extend({
// Template for row delete menu , change it if you don't love
this.templates = {
- "deleterow" : '
X'
+ "deleterow" : '
'
};
_.bindAll(this, 'render', 'onRecordChanged');
@@ -3490,7 +3505,7 @@ my.SlickGrid = Backbone.View.extend({
my.GridControl= Backbone.View.extend({
className: "recline-row-add",
// Template for row edit menu , change it if you don't love
- template: '
',
+ template: '
',
initialize: function(options){
var self = this;
@@ -3743,7 +3758,8 @@ my.Timeline = Backbone.View.extend({
"startDate": start,
"endDate": end,
"headline": String(record.get('title') || ''),
- "text": record.get('description') || record.summary()
+ "text": record.get('description') || record.summary(),
+ "tag": record.get('tags')
};
return tlEntry;
} else {
@@ -3942,12 +3958,12 @@ this.recline.View = this.recline.View || {};
my.Fields = Backbone.View.extend({
className: 'recline-fields-view',
template: ' \
-
\
+
\
Campos +
\
{{#fields}} \
-
\
-
\
-
\
+
\
+
\
+ \
\
{{label}} \
\
@@ -3956,8 +3972,8 @@ my.Fields = Backbone.View.extend({
\
\
\
-
\
-
\
+
\
+
\
{{#facets}} \
\
\
@@ -4023,30 +4039,32 @@ my.FilterEditor = Backbone.View.extend({
template: ' \
\
@@ -4056,10 +4074,10 @@ my.FilterEditor = Backbone.View.extend({
\
',
@@ -4067,13 +4085,17 @@ my.FilterEditor = Backbone.View.extend({
\
',
@@ -4081,15 +4103,21 @@ my.FilterEditor = Backbone.View.extend({
\
'
@@ -4191,10 +4219,10 @@ my.Pager = Backbone.View.extend({
className: 'recline-pager',
template: ' \
\
',
@@ -4264,12 +4292,17 @@ this.recline.View = this.recline.View || {};
my.QueryEditor = Backbone.View.extend({
className: 'recline-query-editor',
template: ' \
-