Commit 3956b162 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Arregla edición de user, limpia containers de form

Elimina algunos ContentPane detectados en formularios, y adapta
estructura y estilo para representarlos correctamente.
Al corregir esto, también se soluciona un problema detectado en la vista
de perfil de usuario, que impedía abrir los formularios de edición.

También se ha retocado el estilo de los pasos de wizard, que ahora
muestran scroll cuando deben.
parent f6c836c4
Loading
Loading
Loading
Loading
+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
+4 −4
Original line number Diff line number Diff line
define([
	'app/redmicConfig'
	, 'dijit/_TemplatedMixin'
	, 'dijit/layout/ContentPane'
	, 'dijit/_WidgetBase'
	, 'dojo/_base/declare'
	, 'dojo/_base/lang'
	, 'dojo/Deferred'
@@ -61,7 +61,7 @@ define([
], function(
	redmicConfig
	, _TemplatedMixin
	, ContentPane
	, _WidgetBase
	, declare
	, lang
	, Deferred
@@ -120,7 +120,7 @@ define([
	, DomainList
) {

	return declare([ContentPane, Evented, _TemplatedMixin], {
	return declare([_WidgetBase, Evented, _TemplatedMixin], {
		//	summary:
		//		Contenedor de formularios de Redmic.
		//	description:
@@ -141,7 +141,7 @@ define([

			this.config = {
				region: 'center',
				'class': '',
				'class': 'formContainer',
				template: null,
				i18n: null,
				inputsProps: {},
+2 −1
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ define([

			if (!this.form) {
				this.form = new FormContainer(this.formContainerConfig);
				this.form.placeAt(this.domNode);

				this.form.startup();

@@ -251,7 +252,7 @@ define([

		_getNodeToShow: function() {

			return this.form.domNode;
			return this.domNode;
		},

		_submit: function() {
+4 −19
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ define([
	, put
	, _CreateKeypad
) {

	return declare(_CreateKeypad, {
		//	summary:
		//		Extensión del módulo Form para que cree un Keypad en el interior de su nodo.
@@ -18,7 +19,6 @@ define([
		constructor: function(args) {

			this.config = {
				classContainer: ".hardTexturedContainer.rounded"
			};

			lang.mixin(this, this.config, args);
@@ -41,30 +41,15 @@ define([
			}]);
		},

		_postCreateCreateKeypad: function() {

		},

		_getNodeToShowCreateKeypadBefore: function() {

		},

		_getNodeToShowCreateKeypadAfter: function() {

			var keypadNode = put(this.form.domNode, "div"),
				classStyle = ".containerFormAndKeypad";

			if (this.classContainer) {
				classStyle += this.classContainer;
			}

			put(this.form.domNode, classStyle);
			var keypadNode = put(this.domNode, "div");

			this._publish(this.keypad.getChannel("SHOW"), {
				node: keypadNode
			});

			return this.form.domNode;
			return this.domNode;
		}
	});
});
+15 −24
Original line number Diff line number Diff line
define([
	"dijit/layout/BorderContainer"
	, "dijit/layout/ContentPane"
	, "dojo/_base/declare"
	"dojo/_base/declare"
	, "dojo/_base/lang"
	, "dojo/aspect"
	, 'put-selector/put'
	, "redmic/modules/components/Keypad/TrizoneKeypadImpl"
	, "redmic/modules/form/_BaseCreateKeypad"
], function(
	BorderContainer
	, ContentPane
	, declare
	declare
	, lang
	, aspect
	, put
	, TrizoneKeypadImpl
	, _BaseCreateKeypad
) {

	return declare(_BaseCreateKeypad, {
		//	summary:
		//		Extensión del módulo Form para que adjunte un Keypad.
@@ -24,6 +23,7 @@ define([
		constructor: function(args) {

			this.config = {
				containerClass: 'formContainerWithKeypad',
				buttons: {
					cancel: {
						zone: "right",
@@ -61,7 +61,6 @@ define([
			aspect.after(this, "_defineSubscriptions", lang.hitch(this, this._defineCreateKeypadSubscriptions));
			aspect.after(this, "_definePublications", lang.hitch(this, this._defineCreateKeypadPublications));
			aspect.after(this, "postCreate", lang.hitch(this, this._postCreateCreateKeypad));
			aspect.before(this, "_getNodeToShow", lang.hitch(this, this._getNodeToShowCreateKeypadBefore));
			aspect.after(this, "_getNodeToShow", lang.hitch(this, this._getNodeToShowCreateKeypadAfter));

			lang.mixin(this, this.config, args);
@@ -109,31 +108,23 @@ define([

		_placeKeypad: function() {

			this.formAndKeypadContainer = new BorderContainer({
				'class': this['class']
			});

			this.keypadNode = new ContentPane({
				region: "bottom"
			});

			this.formAndKeypadContainer.addChild(this.keypadNode);
		},

		_getNodeToShowCreateKeypadBefore: function() {
			if (this.containerClass) {
				this.containerClass = this.containerClass.replace(/\ /g, '.');
			}

			this.form && this.formAndKeypadContainer.removeChild(this.form);
			this.formAndKeypadContainer = put('div.' + this.containerClass);
			this.keypadNode = put(this.formAndKeypadContainer, 'div');
		},

		_getNodeToShowCreateKeypadAfter: function() {

			this.formAndKeypadContainer.addChild(this.form);
			put(this.formAndKeypadContainer, this.domNode);

			this._publish(this.keypad.getChannel("SHOW"), {
				node: this.keypadNode.domNode
				node: this.keypadNode
			});

			return this.formAndKeypadContainer.domNode;
			return this.formAndKeypadContainer;
		},

		_subKeypadInput: function(req) {
Loading