Mark Lenser pushed to branch feature/visual-editing-psp1-CHANNELMGR-986 at cms-community / hippo-addon-channel-manager
Commits: 1c7f5f25 by Mark at 2016-11-09T16:23:32+01:00 CHANNELMGR-986 make changes to the DOM and css to get the structure to work with the new always array setup - - - - - 3 changed files: - frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields.html - frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/rightSidePanel.html - frontend-ng/src/styles/_forms.scss Changes: ===================================== frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields.html ===================================== --- a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields.html +++ b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields.html @@ -13,17 +13,12 @@ See the License for the specific language governing permissions and limitations under the License. --> -<div class="field-wrapper" - ng-repeat="fieldType in ::$ctrl.fieldTypes" - ng-class="{ - 'form-field-focused': $ctrl.hasFocusedField(fieldType), - 'form-field-compound': fieldType.type == 'COMPOUND' - }" - ng-switch="fieldType.type"> - +<div ng-repeat="fieldType in ::$ctrl.fieldTypes" + ng-switch="fieldType.type" + class="field-wrapper"> <!-- edge case: a multiple field with zero values --> <md-input-container ng-if="::!$ctrl.hasValue(fieldType)" - class="md-block qa-field" + class="md-block field qa-field" md-no-float> <label>{{ ::fieldType.displayName }}</label> <input disabled value="{{ 'NONE' | translate }}" placeholder=""> @@ -31,6 +26,11 @@ <div ng-switch-when="COMPOUND" ng-if="::$ctrl.hasValue(fieldType)" + class="field" + ng-class="{ + 'form-field-focused': $ctrl.hasFocusedField(fieldType), + 'form-field-compound': fieldType.type == 'COMPOUND' + }" ng-repeat="value in ::$ctrl.fieldValues[fieldType.id]"> <h5> <md-icon class="material-icons">keyboard_arrow_down</md-icon> @@ -42,7 +42,8 @@ </div> <!-- other cases --> - <div ng-switch-default + <div class="field" + ng-switch-default ng-if="::$ctrl.hasValue(fieldType)"> <md-input-container class="md-block qa-field" md-no-float ===================================== frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/rightSidePanel.html ===================================== --- a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/rightSidePanel.html +++ b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/rightSidePanel.html @@ -26,7 +26,7 @@ </md-toolbar> <md-content flex="grow"> <form name="$ctrl.form" class="form-dense-layout" layout="column" ng-if="$ctrl.doc"> - <channel-fields field-types="::$ctrl.docType.fields" field-values="$ctrl.doc.fields"></channel-fields> + <channel-fields class="top-level" field-types="::$ctrl.docType.fields" field-values="$ctrl.doc.fields"></channel-fields> </form> </md-content> <md-toolbar> ===================================== frontend-ng/src/styles/_forms.scss ===================================== --- a/frontend-ng/src/styles/_forms.scss +++ b/frontend-ng/src/styles/_forms.scss @@ -26,42 +26,41 @@ } } -.field-wrapper { - padding: $form-padding; -} - -form { - &> channel-fields { +.top-level { + &> .field-wrapper { &> .form-field-compound { border-left: 3px solid $grey-500; } + &> .field { + padding: $form-padding; + } } } .form-field-compound { - padding: 0 8px; + padding-left: 8px !important; h5 { - margin-left: -6px; + margin-left: -8px; + } + &.form-field-focused { + border-color: $blue-500 !important; } } .form-field-focused { - &.form-field-compound { - border-color: $blue-500; - } - &> div { - &> h5 { + &> h5 { + color: $blue-500 !important; + md-icon { color: $blue-500 !important; - md-icon { - color: $blue-500 !important; - } } } } + channel-fields { channel-fields { md-input-container { - margin-left: 6px; + margin-left: 18px; } } } + View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/1c7f5f25fb590b77f05a84ce4f403cb6152fdbc0
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn