Commit 759ff712 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Permite editar anidados de project y program

Al igual que activity, estas entidades tienen posibilidad de asociar
documentos, contactos, organizaciones y plataformas. Se generalizan los
pasos de edición y se incorporan a los asistentes de project y program.
parent c3e0c2bf
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -6,12 +6,12 @@ define([
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, "src/component/layout/wizard/_CompleteBySelection"
	, 'src/edition/activity/step/DocumentSetStep'
	, 'src/edition/activity/step/EmbeddedContentSetStep'
	, 'src/edition/activity/step/OrganisationSetStep'
	, 'src/edition/activity/step/PlatformSetStep'
	, 'src/edition/activity/step/ResourceSetStep'
	, 'src/edition/step/ContactSetStep'
	, 'src/edition/step/DocumentSetStep'
	, 'src/edition/step/OrganisationSetStep'
	, 'src/edition/step/PlatformSetStep'
	, 'src/redmicConfig'
], function(
	ActivityType
@@ -21,12 +21,12 @@ define([
	, declare
	, lang
	, _CompleteBySelection
	, DocumentSetStep
	, EmbeddedContentSetStep
	, OrganisationSetStep
	, PlatformSetStep
	, ResourceSetStep
	, ContactSetStep
	, DocumentSetStep
	, OrganisationSetStep
	, PlatformSetStep
	, redmicConfig
) {

@@ -45,7 +45,7 @@ define([
				target: redmicConfig.services.activity,
				propsToClean: [
					'code', 'id', 'contacts.{i}.id', 'organisations.{i}.id', 'documents.{i}.id', 'platforms.{i}.id',
					'resources.{i}.id'
					'resources.{i}.id', 'embeddedContents.{i}.id'
				]
			};

@@ -74,6 +74,12 @@ define([
						formTemplate: "administrative/views/templates/forms/Activity",
						label: this.i18n.activity
					}
				},{
					definition: DocumentSetStep,
					skippable: true,
					props: {
						propertyName: 'documents'
					}
				},{
					definition: OrganisationSetStep,
					props: {
@@ -92,12 +98,6 @@ define([
						propertyName: 'platforms'
					},
					skippable: true
				},{
					definition: DocumentSetStep,
					skippable: true,
					props: {
						propertyName: 'documents'
					}
				},{
					definition: ResourceSetStep,
					props: {
+34 −1
Original line number Diff line number Diff line
@@ -4,6 +4,10 @@ define([
	, "app/designs/edition/Layout"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, 'src/edition/step/ContactSetStep'
	, 'src/edition/step/DocumentSetStep'
	, 'src/edition/step/OrganisationSetStep'
	, 'src/edition/step/PlatformSetStep'
	, 'src/redmicConfig'
], function(
	MainDataStep
@@ -11,6 +15,10 @@ define([
	, Layout
	, declare
	, lang
	, ContactSetStep
	, DocumentSetStep
	, OrganisationSetStep
	, PlatformSetStep
	, redmicConfig
) {

@@ -27,7 +35,8 @@ define([

			this.config = {
				target: redmicConfig.services.program,
				propsToClean: ['code', 'id', 'contacts.{i}.id', 'organisations.{i}.id', 'documents.{i}.id']
				propsToClean: ['code', 'id', 'contacts.{i}.id', 'organisations.{i}.id', 'documents.{i}.id',
					'platforms.{i}.id']
			};

			lang.mixin(this, this.config, args);
@@ -48,6 +57,30 @@ define([
						formTemplate: "administrative/views/templates/forms/Program",
						label: this.i18n.program
					}
				},{
					definition: DocumentSetStep,
					skippable: true,
					props: {
						propertyName: 'documents'
					}
				},{
					definition: OrganisationSetStep,
					props: {
						propertyName: 'organisations'
					},
					skippable: true
				},{
					definition: ContactSetStep,
					props: {
						propertyName: 'contacts'
					},
					skippable: true
				},{
					definition: PlatformSetStep,
					props: {
						propertyName: 'platforms'
					},
					skippable: true
				}]
			}, this.editorConfig || {}]);
		}
+34 −1
Original line number Diff line number Diff line
@@ -4,6 +4,10 @@ define([
	, "app/designs/edition/Layout"
	, "dojo/_base/declare"
	, "dojo/_base/lang"
	, 'src/edition/step/ContactSetStep'
	, 'src/edition/step/DocumentSetStep'
	, 'src/edition/step/OrganisationSetStep'
	, 'src/edition/step/PlatformSetStep'
	, 'src/redmicConfig'
], function(
	MainDataStep
@@ -11,6 +15,10 @@ define([
	, Layout
	, declare
	, lang
	, ContactSetStep
	, DocumentSetStep
	, OrganisationSetStep
	, PlatformSetStep
	, redmicConfig
) {

@@ -27,7 +35,8 @@ define([

			this.config = {
				target: redmicConfig.services.project,
				propsToClean: ['code', 'id', 'contacts.{i}.id', 'organisations.{i}.id', 'documents.{i}.id']
				propsToClean: ['code', 'id', 'contacts.{i}.id', 'organisations.{i}.id', 'documents.{i}.id',
					'platforms.{i}.id']
			};

			lang.mixin(this, this.config, args);
@@ -48,6 +57,30 @@ define([
						formTemplate: "administrative/views/templates/forms/Project",
						label: this.i18n.project
					}
				},{
					definition: DocumentSetStep,
					skippable: true,
					props: {
						propertyName: 'documents'
					}
				},{
					definition: OrganisationSetStep,
					props: {
						propertyName: 'organisations'
					},
					skippable: true
				},{
					definition: ContactSetStep,
					props: {
						propertyName: 'contacts'
					},
					skippable: true
				},{
					definition: PlatformSetStep,
					props: {
						propertyName: 'platforms'
					},
					skippable: true
				}]
			}, this.editorConfig || {}]);
		}
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ define([

	return declare([Layout, Controller, _EditionFormList, _RememberDeleteItems], {
		//	summary:
		//		Step de ActivityContact.
		//		Step de edición de contactos.

		constructor: function(args) {

+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ define([

	return declare(Main, {
		//	summary:
		//		Step de ActivityDocument.
		//		Step de edición de documentos.

		constructor: function(args) {

Loading