Loading public/javascript/app/base/views/_View.js +3 −2 Original line number Diff line number Diff line Loading @@ -67,10 +67,11 @@ define([ _afterShowView: function(request) { this._putMetaTags(); var callback = this._putMetaTags || this._putDefaultMetaTags; lang.hitch(this, callback)(); }, _putMetaTags: function() { _putDefaultMetaTags: function() { // summary: // Manda a publicar la información necesaria para que se generen las meta-tags // de la vista actual. Debe ejecutarse después del show de la vista, ya que este Loading public/javascript/app/designs/base/_ServiceOGC.js +4 −2 Original line number Diff line number Diff line Loading @@ -55,9 +55,11 @@ define([ pathSeparator: this.pathSeparator }); this._subscribe(this.filter.getChannel('ADDED_TO_QUERY'), lang.hitch(this, function() { this._subscribe(this.filter.getChannel('ADDED_TO_QUERY'), lang.hitch(this, function(query) { if (query && Object.keys(query).indexOf('suggest') === -1) { this._emitEvt('REFRESH'); } })); }, Loading public/javascript/app/designs/details/Controller.js +8 −4 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ define([ aspect.after(this, "_itemAvailable", lang.hitch(this, function(item, args) { if (this.target instanceof Array && this.target[0] !== args[0].target) { if (this.target instanceof Array && this.target[0] !== args[1].target) { return; } Loading Loading @@ -233,10 +233,14 @@ define([ var rows = config.height || 1, cols = config.width || 1, nodeParams = "[" + this._rowsParameterName + "=" + rows + "][" + this._colsParameterName + "=" + cols + "]", node = put("div." + this.hiddenClass + nodeParams); showInitially = config.showInitially || false, nodeParams = '[' + this._rowsParameterName + '=' + rows + '][' + this._colsParameterName + '=' + cols + ']', node = put('div' + nodeParams); if (!showInitially) { put(node, '.' + this.hiddenClass); } this._nodes[key] = node; put(this.centerNode, node); Loading public/javascript/app/designs/details/_TitleSelection.js +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ define([ constructor: function(args) { aspect.after(this, "_dataInTitle", this._groupSelected); aspect.after(this, "_addDataInTitle", this._groupSelected); aspect.after(this, "_createTitle", this._createTitleSelection); }, Loading public/javascript/app/designs/details/main/ServiceOGC.js +81 −45 Original line number Diff line number Diff line Loading @@ -53,8 +53,12 @@ define([ constructor: function(args) { this.target = redmicConfig.services.atlasLayer; this.activityTarget = "activitiesLayer"; this.atlasTarget = redmicConfig.services.atlasLayer; this.activityTarget = redmicConfig.services.activity; this.target = [this.atlasTarget, this.activityTarget]; this.selectionTarget = redmicConfig.services.atlasLayerSelection; this.activityLocalTarget = "activitiesLayer"; this.infoLayerTarget = 'infoLayerTarget'; this.config = { Loading Loading @@ -97,7 +101,7 @@ define([ title: this.i18n.dataSource, type: declare([ListImpl, _Framework, _ButtonsInRow]), props: { target: this.activityTarget, target: this.activityLocalTarget, template: TemplateActivities, bars: [{ instance: Total Loading @@ -119,7 +123,7 @@ define([ props: { template: TemplateImage, "class": "imageContainer", target: this.target, target: this.atlasTarget, associatedIds: [this.ownChannel] } },*/ Loading Loading @@ -168,42 +172,82 @@ define([ this._checkPathVariableId(); this._emitEvt('GET', { target: this.target, target: this.atlasTarget, requesterId: this.ownChannel, id: this.pathVariableId }); }, _itemAvailable: function(response) { _itemAvailable: function(response, resObj) { var target = resObj.target, data = response.data; if (target === this.activityTarget) { this._handleActivityItemAvailable(data); } else { this._handleAtlasItemAvailable(data); } }, var data = response.data; _handleAtlasItemAvailable: function(data) { this._emitEvt('INJECT_ITEM', { data: data, target: this.infoLayerTarget }); this._createMapBoundingLayer(data); this._retrieveLayerActivities(data); this._createMapLayer(data); }, _createMapBoundingLayer: function(data) { if (data && data.geometry && data.geometry.coordinates) { this._addPolygon(data.geometry); } }, var activities = data.activities; _addPolygon: function(geometry) { if (activities && activities.length) { for (var i = 0; i < activities.length; i++) { this.layerPolygon = L.geoJson(geometry, { style: { color: 'red', fillOpacity: 0 } }); var activity = activities[i]; this._publishMapBox("ADD_LAYER", { layer: this.layerPolygon, layerId: "boundingBox", layerLabel: this.i18n.boundingBox, optional: true }); }, activity.rank = RedmicUtilities.getActivityRankByPath(activity.path); _retrieveLayerActivities: function(data) { this._emitEvt('INJECT_ITEM', { data: activity, target: this.activityTarget }); var activities = data.activities; if (!activities || !activities.length) { return; } for (var i = 0; i < activities.length; i++) { var activity = activities[i]; this._publish(this._buildChannel(this.storeChannel, this.actions.GET), { target: this.activityTarget, id: activity[this.idProperty] }); } }, if (data.urlSource && data.name) { _createMapLayer: function(data) { if (!data.urlSource || !data.name) { return; } this.layer = new WmsLayerImpl({ parentChannel: this.getChannel(), Loading @@ -223,23 +267,15 @@ define([ this._publishMapBox("ADD_LAYER", { layer: this.layer }); } }, _addPolygon: function(geometry) { _handleActivityItemAvailable: function(activity) { this.layerPolygon = L.geoJson(geometry, { style: { color: 'red', fillOpacity: 0 } }); activity.rank = RedmicUtilities.getActivityRankByPath(activity.path); this._publishMapBox("ADD_LAYER", { layer: this.layerPolygon, layerId: "boundingBox", layerLabel: this.i18n.boundingBox, optional: true this._emitEvt('INJECT_ITEM', { data: activity, target: this.activityLocalTarget }); } }); Loading Loading
public/javascript/app/base/views/_View.js +3 −2 Original line number Diff line number Diff line Loading @@ -67,10 +67,11 @@ define([ _afterShowView: function(request) { this._putMetaTags(); var callback = this._putMetaTags || this._putDefaultMetaTags; lang.hitch(this, callback)(); }, _putMetaTags: function() { _putDefaultMetaTags: function() { // summary: // Manda a publicar la información necesaria para que se generen las meta-tags // de la vista actual. Debe ejecutarse después del show de la vista, ya que este Loading
public/javascript/app/designs/base/_ServiceOGC.js +4 −2 Original line number Diff line number Diff line Loading @@ -55,9 +55,11 @@ define([ pathSeparator: this.pathSeparator }); this._subscribe(this.filter.getChannel('ADDED_TO_QUERY'), lang.hitch(this, function() { this._subscribe(this.filter.getChannel('ADDED_TO_QUERY'), lang.hitch(this, function(query) { if (query && Object.keys(query).indexOf('suggest') === -1) { this._emitEvt('REFRESH'); } })); }, Loading
public/javascript/app/designs/details/Controller.js +8 −4 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ define([ aspect.after(this, "_itemAvailable", lang.hitch(this, function(item, args) { if (this.target instanceof Array && this.target[0] !== args[0].target) { if (this.target instanceof Array && this.target[0] !== args[1].target) { return; } Loading Loading @@ -233,10 +233,14 @@ define([ var rows = config.height || 1, cols = config.width || 1, nodeParams = "[" + this._rowsParameterName + "=" + rows + "][" + this._colsParameterName + "=" + cols + "]", node = put("div." + this.hiddenClass + nodeParams); showInitially = config.showInitially || false, nodeParams = '[' + this._rowsParameterName + '=' + rows + '][' + this._colsParameterName + '=' + cols + ']', node = put('div' + nodeParams); if (!showInitially) { put(node, '.' + this.hiddenClass); } this._nodes[key] = node; put(this.centerNode, node); Loading
public/javascript/app/designs/details/_TitleSelection.js +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ define([ constructor: function(args) { aspect.after(this, "_dataInTitle", this._groupSelected); aspect.after(this, "_addDataInTitle", this._groupSelected); aspect.after(this, "_createTitle", this._createTitleSelection); }, Loading
public/javascript/app/designs/details/main/ServiceOGC.js +81 −45 Original line number Diff line number Diff line Loading @@ -53,8 +53,12 @@ define([ constructor: function(args) { this.target = redmicConfig.services.atlasLayer; this.activityTarget = "activitiesLayer"; this.atlasTarget = redmicConfig.services.atlasLayer; this.activityTarget = redmicConfig.services.activity; this.target = [this.atlasTarget, this.activityTarget]; this.selectionTarget = redmicConfig.services.atlasLayerSelection; this.activityLocalTarget = "activitiesLayer"; this.infoLayerTarget = 'infoLayerTarget'; this.config = { Loading Loading @@ -97,7 +101,7 @@ define([ title: this.i18n.dataSource, type: declare([ListImpl, _Framework, _ButtonsInRow]), props: { target: this.activityTarget, target: this.activityLocalTarget, template: TemplateActivities, bars: [{ instance: Total Loading @@ -119,7 +123,7 @@ define([ props: { template: TemplateImage, "class": "imageContainer", target: this.target, target: this.atlasTarget, associatedIds: [this.ownChannel] } },*/ Loading Loading @@ -168,42 +172,82 @@ define([ this._checkPathVariableId(); this._emitEvt('GET', { target: this.target, target: this.atlasTarget, requesterId: this.ownChannel, id: this.pathVariableId }); }, _itemAvailable: function(response) { _itemAvailable: function(response, resObj) { var target = resObj.target, data = response.data; if (target === this.activityTarget) { this._handleActivityItemAvailable(data); } else { this._handleAtlasItemAvailable(data); } }, var data = response.data; _handleAtlasItemAvailable: function(data) { this._emitEvt('INJECT_ITEM', { data: data, target: this.infoLayerTarget }); this._createMapBoundingLayer(data); this._retrieveLayerActivities(data); this._createMapLayer(data); }, _createMapBoundingLayer: function(data) { if (data && data.geometry && data.geometry.coordinates) { this._addPolygon(data.geometry); } }, var activities = data.activities; _addPolygon: function(geometry) { if (activities && activities.length) { for (var i = 0; i < activities.length; i++) { this.layerPolygon = L.geoJson(geometry, { style: { color: 'red', fillOpacity: 0 } }); var activity = activities[i]; this._publishMapBox("ADD_LAYER", { layer: this.layerPolygon, layerId: "boundingBox", layerLabel: this.i18n.boundingBox, optional: true }); }, activity.rank = RedmicUtilities.getActivityRankByPath(activity.path); _retrieveLayerActivities: function(data) { this._emitEvt('INJECT_ITEM', { data: activity, target: this.activityTarget }); var activities = data.activities; if (!activities || !activities.length) { return; } for (var i = 0; i < activities.length; i++) { var activity = activities[i]; this._publish(this._buildChannel(this.storeChannel, this.actions.GET), { target: this.activityTarget, id: activity[this.idProperty] }); } }, if (data.urlSource && data.name) { _createMapLayer: function(data) { if (!data.urlSource || !data.name) { return; } this.layer = new WmsLayerImpl({ parentChannel: this.getChannel(), Loading @@ -223,23 +267,15 @@ define([ this._publishMapBox("ADD_LAYER", { layer: this.layer }); } }, _addPolygon: function(geometry) { _handleActivityItemAvailable: function(activity) { this.layerPolygon = L.geoJson(geometry, { style: { color: 'red', fillOpacity: 0 } }); activity.rank = RedmicUtilities.getActivityRankByPath(activity.path); this._publishMapBox("ADD_LAYER", { layer: this.layerPolygon, layerId: "boundingBox", layerLabel: this.i18n.boundingBox, optional: true this._emitEvt('INJECT_ITEM', { data: activity, target: this.activityLocalTarget }); } }); Loading