Commit 0f3df1fd authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Merge branch 'release-0.19.0' into 'master'

Release 0.19.0

See merge request redmic-project/client/web!70
parents b50c7243 19fadb7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{
  "name": "REDMIC",
  "version": "0.18.1",
  "version": "0.19.0",
  "author": "REDMIC",
  "homepage": "https://gitlab.com/redmic-project/client/web/blob/master/README.md",
  "description": "Integrated marine data repository of Canary Islands - Client",
+2 −45
Original line number Diff line number Diff line
@@ -3,14 +3,12 @@ define([
	, 'redmic/modules/base/_Show'
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'dojo/has'
	, './_appItfc'
], function(
	_Module
	, _Show
	, declare
	, lang
	, has
	, _appItfc
){
	return declare([_Module, _Show, _appItfc], {
@@ -25,13 +23,11 @@ define([
			this.config = {
				ownChannel: 'app',
				events: {
					WINDOW_RESIZE: 'windowResize',
					MODULE_SHOWN: 'moduleShown'
				},
				actions: {
					SHOW_MODULE: 'showModule',
					MODULE_SHOWN: 'moduleShown',
					WINDOW_RESIZE: 'windowResize'
					MODULE_SHOWN: 'moduleShown'
				}
			};

@@ -43,9 +39,6 @@ define([
			this.subscriptionsConfig.push({
				channel: this.getChannel('SHOW_MODULE'),
				callback: '_subShowModule'
			},{
				channel: this.getChannel('RESIZE_VIEW'),
				callback: '_subResizeView'
			});
		},

@@ -54,41 +47,12 @@ define([
			this.publicationsConfig.push({
				event: 'MODULE_SHOWN',
				channel: this.getChannel('MODULE_SHOWN')
			},{
				event: 'WINDOW_RESIZE',
				channel: this.getChannel('WINDOW_RESIZE')
			});
		},

		_doEvtFacade: function() {

			this._getGlobalContext().onresize = lang.hitch(this, this._groupEventArgs, 'WINDOW_RESIZE');
		},

		_setOwnCallbacksForEvents: function() {

			this._onceEvt('SHOW', lang.hitch(this, this._onFirstShow));
		},

		_onFirstShow: function() {

			this.startup();
		},

		_getGlobalContext: function() {

			if (has('host-browser')) {
				return window;
			} else if (has('host-node')) {
				return global;
			} else {
				console.error('Environment not supported');
			}
		},

		_subResizeView: function(req) {

			this._doResize();
			this._onEvt('HIDE', lang.hitch(this, this._onAppHide));
		},

		_subShowModule: function(req) {
@@ -106,16 +70,9 @@ define([

		_onModuleShown: function(moduleKey, res) {

			this._doResize();

			this._emitEvt('MODULE_SHOWN', {
				key: moduleKey
			});
		},

		_getNodeToShow: function() {

			return this.domNode;
		}
	});
});
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@ define([

			return lang.mixin(this.inherited(arguments), {
				"_doResize": {},
				"_getNode": {}
				"_getNode": {},
				"_onAppHide": {}
			});
		}
	});
+0 −1
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@ define([
			}, this.selectInputConfig || {}]);

			this.formConfig = this._merge([{
				classContainer: '.mediumTexturedContainer',
				buttonsConfig: {
					reset: {
						noActive: false
+21 −16
Original line number Diff line number Diff line
define([
	"dojo/_base/declare"
	, "dijit/_WidgetBase"
	, "dijit/_TemplatedMixin"
	, "dojo/_base/lang"
	, 'put-selector/put'
], function(
	declare
	, _WidgetBase
	, _TemplatedMixin
	, lang
) {		return declare([_WidgetBase, _TemplatedMixin], {
	, put
) {

	return declare(null, {
		//	summary:
		//		Widget para la creación de un elemento boton
		//
@@ -33,23 +33,28 @@ define([
		// 	Url del módulo
		url: null,

		// cols: String
		// 	Clases correspondientes al griding por columnas
		cols: "col-xs-12 col-sm-6 col-md-4 col-lg-4",

		constructor: function(args) {

			lang.mixin(this, args);

			var item;
			if (this.domain) {
				this.templateString = "<a class='" + this.cols + " boxButton' href='" + this.url +
					"' d-state-url=true>" + "<div class='name mediumTexturedContainer colorWhite'>" + this.name + "</div></a>";
				this.moduleNode = put('a.boxButton[href="' + this.url + '"][d-state-url=true]');
				item = put(this.moduleNode, 'div.name.mediumSolidContainer.colorWhite');
				put(item, 'span', this.name);
			} else {
				this.templateString = "<a title='" + this.name +
					"' class='col-xs-12 col-sm-6 col-md-6 col-lg-3 module' href='" + this.url + "' d-state-url=true>" +
					"<div class='button mediumTexturedContainer colorWhite'>" +
					"<i class='" + this.icon + " iconModule'></i><div class='name'>" + this.name + "</div></div></a>";
				this.moduleNode = put('a.module[title="' + this.name + '"][href="' + this.url + '"][d-state-url=true]');
				item = put(this.moduleNode, 'div.button.mediumSolidContainer.colorWhite');
				put(item, 'i.iconModule.' + this.icon.replace(/\ /g, '.'));
				put(item, 'div.name', this.name);
			}
		},

		// TODO reemplazo de método de Dijit, eliminar si deja de usarse
		placeAt: function(node) {

			put(node, this.moduleNode);
		}
	});
});
Loading