Bert Leunis pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
1050424e by Bert Leunis at 2018-02-13T13:48:15+01:00
CHANNELMGR-1725 add extra continue button to take the user to editor in the 
content perpective

- - - - -
19707769 by Bert Leunis at 2018-02-16T09:35:56+01:00
CHANNELMGR-1725 Merge master changes in feature/CHANNELMGR-1725

- - - - -
b856c488 by Bert Leunis at 2018-02-16T12:26:02+01:00
CHANNELMGR-1725 Merge master changes in feature/CHANNELMGR-1725

- - - - -
f5090fbe by Bert Leunis at 2018-02-16T12:26:02+01:00
CHANNELMGR-1725 show an extra continue button for create content alternative 
step 2

Alternative step 2 occurs when a document type has required fields that are not 
supported by the editor yet. The user cannot save the document in the channel 
manager and must continue editing in the content perspective. There the 
document can be saved.

Two components use the content editor: the edit content component (for existing 
documents), and the create content step 2 component. With transclude they 
passed the content of the message at the top. The transclude is changed to 
support multiple slots: one for the message, one for extra buttons.

More of the message markup has moved to both parent component templates now. 
The multiple slot transclusion setup also allows (demands?) that the 
content-editor component gets names child component parts, which makes the 
transclusion better readable and less magic.

- - - - -
aadf457d by Bert Leunis at 2018-02-16T12:26:02+01:00
CHANNELMGR-1725 Reintegrate feature/CHANNELMGR-1725

- - - - -


4 changed files:

- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.component.js
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.html
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/createContent/step2/step2.html
- 
frontend-ng/src/app/channel/sidePanels/rightSidePanel/editContent/editContentMain.html


Changes:

=====================================
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.component.js
=====================================
--- 
a/frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.component.js
+++ 
b/frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.component.js
@@ -21,7 +21,10 @@ import template from './contentEditor.html';
 const contentEditorComponent = {
   controller,
   template,
-  transclude: true,
+  transclude: {
+    message: '?contentEditorMessage',
+    extraButton: '?contentEditorExtraButton',
+  },
   bindings: {
     allowSave: '<',
     cancelLabel: '@',
@@ -29,7 +32,6 @@ const contentEditorComponent = {
     onClose: '&',
     onSave: '&',
     onSwitchEditor: '&',
-    showMessage: '<',
   },
 };
 


=====================================
frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.html
=====================================
--- 
a/frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.html
+++ 
b/frontend-ng/src/app/channel/sidePanels/rightSidePanel/contentEditor/contentEditor.html
@@ -20,11 +20,7 @@
             layout="column"
             class="rightSidePanel-content">
 
-  <md-subheader ng-if="$ctrl.showMessage"
-                class="md-no-sticky"
-                md-colors="{background: 'hippo-grey-200'}">
-    <ng-transclude></ng-transclude>
-  </md-subheader>
+  <div ng-transclude="message"></div>
 
   <div ng-if="$ctrl.getError()"
        class="md-padding feedback qa-feedback"
@@ -67,5 +63,8 @@
                ng-disabled="!$ctrl.isSaveAllowed()">
       {{ ::'SAVE' | translate }}
     </md-button>
+
+    <div ng-transclude="extraButton"></div>
+
   </div>
 </md-toolbar>


=====================================
frontend-ng/src/app/channel/sidePanels/rightSidePanel/createContent/step2/step2.html
=====================================
--- 
a/frontend-ng/src/app/channel/sidePanels/rightSidePanel/createContent/step2/step2.html
+++ 
b/frontend-ng/src/app/channel/sidePanels/rightSidePanel/createContent/step2/step2.html
@@ -30,16 +30,31 @@
 
   <content-editor flex="grow"
                   layout="column"
-                  show-message="!$ctrl.allMandatoryFieldsShown()"
                   cancel-label="{{ ::'DISCARD' | translate }}"
                   close-label="{{ ::'DISCARD' | translate }}"
                   allow-save="$ctrl.allMandatoryFieldsShown()"
                   on-switch-editor="$ctrl.switchEditor()"
                   on-save="$ctrl.save()"
                   on-close="$ctrl.close()">
-    <div>{{ ::'NOT_ALL_MANDATORY_FIELDS_SHOWN' | translate }}</div>
-    <!-- use double quotes in the click action expression so we can use single 
quotes in the translation value -->
-    <div translate="NOT_ALL_MANDATORY_FIELDS_SHOWN_LINK" 
translate-value-click-action='$ctrl.switchEditor()' translate-compile></div>
+
+    <content-editor-message>
+      <md-subheader ng-if="!$ctrl.allMandatoryFieldsShown()"
+                    class="md-no-sticky"
+                    md-colors="{background: 'hippo-grey-200'}">
+        <div>{{ ::'NOT_ALL_MANDATORY_FIELDS_SHOWN' | translate }}</div>
+        <!-- use double quotes in the click action expression so we can use 
single quotes in the translation value -->
+        <div translate="NOT_ALL_MANDATORY_FIELDS_SHOWN_LINK" 
translate-value-click-action='$ctrl.switchEditor()' translate-compile></div>
+      </md-subheader>
+    </content-editor-message>
+
+    <content-editor-extra-button>
+      <md-button class="qa-continue"
+                 ng-click="$ctrl.switchEditor()"
+                 ng-if="!$ctrl.allMandatoryFieldsShown()">
+        {{ 'CONTINUE' | translate }}
+      </md-button>
+    </content-editor-extra-button>
+
   </content-editor>
 
 </div>


=====================================
frontend-ng/src/app/channel/sidePanels/rightSidePanel/editContent/editContentMain.html
=====================================
--- 
a/frontend-ng/src/app/channel/sidePanels/rightSidePanel/editContent/editContentMain.html
+++ 
b/frontend-ng/src/app/channel/sidePanels/rightSidePanel/editContent/editContentMain.html
@@ -19,12 +19,19 @@
 <content-editor ng-show="!$ctrl.showAddToProject()"
                 flex="grow"
                 layout="column"
-                show-message="$ctrl.notAllFieldsShown()"
                 allow-save="true"
                 on-switch-editor="$ctrl.switchEditor()"
                 on-save="$ctrl.save()"
                 on-close="$ctrl.close()">
-  <div>{{ ::'NOT_ALL_FIELDS_SHOWN' | translate }}</div>
-  <!-- use double quotes in the click action expression so we can use single 
quotes in the translation value -->
-  <div translate="NOT_ALL_FIELDS_SHOWN_LINK" 
translate-value-click-action='$ctrl.switchEditor()' translate-compile></div>
+
+  <content-editor-message>
+    <md-subheader ng-if="$ctrl.notAllFieldsShown()"
+                  class="md-no-sticky"
+                  md-colors="{background: 'hippo-grey-200'}">
+      <div>{{ ::'NOT_ALL_FIELDS_SHOWN' | translate }}</div>
+      <!-- use double quotes in the click action expression so we can use 
single quotes in the translation value -->
+      <div translate="NOT_ALL_FIELDS_SHOWN_LINK" 
translate-value-click-action='$ctrl.switchEditor()' translate-compile></div>
+    </md-subheader>
+  </content-editor-message>
+
 </content-editor>



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/6077cc9dff9eb5598045e339caee9d3e230b52a7...aadf457d1a6cd536020e120370a70bbddf13a14d

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/6077cc9dff9eb5598045e339caee9d3e230b52a7...aadf457d1a6cd536020e120370a70bbddf13a14d
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to