[Layout] Use refactored switcher in Edit

Update templates for Edit mode to reflect
simplifications to the view switcher introduced
to support its use on Layouts, transitioned for
WTD-535.
This commit is contained in:
Victor Woeltjen
2014-12-04 12:32:35 -08:00
parent 2c0574abff
commit 7b1c275dee
4 changed files with 22 additions and 20 deletions

View File

@@ -63,10 +63,6 @@
} }
], ],
"templates": [ "templates": [
{
"key": "topbar-edit",
"templateUrl": "templates/topbar-edit.html"
},
{ {
"key": "edit-library", "key": "edit-library",
"templateUrl": "templates/library.html" "templateUrl": "templates/library.html"
@@ -88,6 +84,10 @@
"templateUrl": "templates/elements.html", "templateUrl": "templates/elements.html",
"uses": [ "composition" ], "uses": [ "composition" ],
"gestures": [ "drop" ] "gestures": [ "drop" ]
},
{
"key": "topbar-edit",
"templateUrl": "templates/topbar-edit.html"
} }
] ]
} }

View File

@@ -1,22 +1,23 @@
<span ng-controller="ViewSwitcherController"> <mct-representation key="'topbar-edit'"
<mct-include key="'topbar-edit'" mct-object="domainObject"
parameters="{ switcher: switcher, object: domainObject }"> ng-model="representation">
</mct-include> </mct-representation>
<div class="holder edit-area outline abs"> <div class="holder edit-area outline abs">
<!-- edit toolbar goes here --> <!-- edit toolbar goes here -->
<div class='split-layout vertical contents abs work-area'> <div class='split-layout vertical contents abs work-area'>
<div class='split-pane-component edit-main pane' style="right: 200px; left: 0px;"> <div class='split-pane-component edit-main pane' style="right: 200px; left: 0px;">
<div class='holder abs object-holder'> <div class='holder abs object-holder'>
<mct-representation key="switcher.selected.key" mct-object="domainObject"> <mct-representation key="representation.selected.key"
mct-object="domainObject">
</mct-representation> </mct-representation>
</div> </div>
</div> </div>
<div class="splitter" style="right: 200px"></div> <div class="splitter" style="right: 200px"></div>
<div class='split-pane-component edit-objects pane menus-to-left' <div class='split-pane-component edit-objects pane menus-to-left'
style="right: 0px; width: 200px"> style="right: 0px; width: 200px">
<div class='holder abs split-layout horizontal'> <div class='holder abs split-layout horizontal'>
<mct-container key="accordion" title="Library" style="position: relative; top: 0px;"> <mct-container key="accordion" title="Library" style="position: relative; top: 0px; height: 200px;">
<mct-representation key="'tree'" mct-object="context.getRoot()"> <mct-representation key="'tree'" mct-object="context.getRoot()">
</mct-representation> </mct-representation>
</mct-container> </mct-container>
@@ -30,4 +31,3 @@
</div> </div>
</div> </div>
</div> </div>
</span>

View File

@@ -1,17 +1,19 @@
<div class='top-bar edit abs'> <div class='top-bar edit abs'>
<mct-representation key="'object-header'" mct-object="parameters.object" parameters="{ mode: 'Edit' }"> <mct-representation key="'object-header'"
mct-object="domainObject"
parameters="{ mode: 'Edit' }">
</mct-representation> </mct-representation>
<div class='buttons-main btn-bar buttons abs'> <div class='buttons-main btn-bar buttons abs'>
<mct-include key="'switcher'" <mct-representation key="'switcher'"
ng-model="parameters.switcher" mct-object="domainObject"
ng-if="parameters.switcher.options.length > 0"> ng-model="ngModel">
</mct-include> </mct-representation>
<mct-representation key="'edit-action-buttons'" <mct-representation key="'edit-action-buttons'"
mct-object="parameters.object" mct-object="domainObject"
class='conclude-editing'> class='conclude-editing'>
<!--a class='btn major' href=''>Save<span id='save-actions-menu' class='ui-symbol invoke-menu'>v</span></a> <!--a class='btn major' href=''>Save<span id='save-actions-menu' class='ui-symbol invoke-menu'>v</span></a>
<a class='btn subtle' href=''>Cancel</a--> <a class='btn subtle' href=''>Cancel</a-->
</mct-representation> </mct-representation>
</div> </div>
</div> </div>

View File

@@ -3,7 +3,7 @@
{{container.title}} {{container.title}}
</div> </div>
<div class="accordion-contents" <div class="accordion-contents"
ng-show="toggle.isActive()" ng-show="!toggle.isActive()"
style="height: 180px;" style="height: 180px;"
ng-transclude> ng-transclude>
</div> </div>