Fixes U4-5824 Grid editor lacks localized labels

This commit is contained in:
per ploug
2014-11-17 20:47:22 +01:00
parent 168893a888
commit 3c8be919da
6 changed files with 109 additions and 160 deletions

View File

@@ -2,7 +2,7 @@
ng-style="overlayMenu.style"
delayed-mouseleave="closeItemOverlay()">
<h5>Insert control</h5>
<h5><localize key="grid_insertControl" /></h5>
<ul class="elements">
<li ng-repeat="editor in area.$allowedEditors">

View File

@@ -2,10 +2,10 @@
<div class="umb-panel-body no-header with-footer">
<div class="umb-forms-settings">
<h5>Layout</h5>
<p>Adjust the layout by setting column widths and adding additional sections</p>
<h5><localize key="grid_addGridLayout" /></h5>
<p><localize key="grid_addGridLayoutDetail" /></p>
<umb-control-group label="Name">
<umb-control-group label="@general_name">
<input type="text" ng-model="currentLayout.name" />
</umb-control-group>
@@ -34,7 +34,7 @@
<div ng-if="currentSection" style="padding-bottom: 50px;">
<umb-control-group label="Width">
<umb-control-group label="@general_width">
<div class="grid-size-scaler" >
<a href ng-click="scaleDown(currentSection)">
<i class="icon icon-navigation-down"></i>
@@ -56,7 +56,7 @@
style="float: left; margin-right: 10px;"
ng-checked="currentSection.allowed === undefined"
ng-change="toggleCollection(currentSection.allowed, currentSection.allowAll)" />
Allow all row configurations
<localize key="grid_allowAllRowConfigurations"/>
</label>
</li>
</ul>
@@ -91,7 +91,7 @@
<div>
{{row.name}}<br />
<small>{{row.areas.length}} configurable cells</small><br />
<small>{{row.areas.length}} cells</small><br />
</div>
</label>

View File

@@ -3,10 +3,10 @@ ng-controller="Umbraco.PropertyEditors.GridPrevalueEditor.RowConfigController">
<div class="umb-panel-body no-header with-footer">
<div class="umb-forms-settings">
<h5>Row configuration</h5>
<p>Adjust the row by setting cell widths and adding additional cells</p>
<h5><localize key="grid_addRowConfiguration" /></h5>
<p><localize key="grid_addRowConfigurationDetail" /></p>
<umb-control-group label="Name">
<umb-control-group label="@general_name">
<input type="text" ng-model="currentRow.name" />
</umb-control-group>
@@ -34,7 +34,7 @@ ng-controller="Umbraco.PropertyEditors.GridPrevalueEditor.RowConfigController">
<div ng-if="currentCell" style="padding-bottom: 50px;">
<umb-control-group label="Width">
<umb-control-group label="@general_width">
<div class="grid-size-scaler" >
<div class="grid-size-scaler">
<a href ng-click="scaleDown(currentCell)">
@@ -57,7 +57,7 @@ ng-controller="Umbraco.PropertyEditors.GridPrevalueEditor.RowConfigController">
ng-model="currentCell.allowAll"
ng-checked="currentCell.allowed === undefined"
ng-change="toggleCollection(currentCell.allowed, currentCell.allowAll)" />
Allow all editors
<localize key="grid_allowAllEditors"/>
</label>
</li>
</ul>

View File

@@ -32,7 +32,7 @@
</div> <!-- .templates-preview-rows -->
<p><span class="help-text">Add rows to your layout</span></p>
<p><span class="help-text"><localize key="grid_addRows"/></span></p>
</div> <!-- .templates-preview -->
@@ -67,8 +67,8 @@
ng-mouseleave="disableWarnhighlightRow(row)">
<span ng-if="deletePrompt">
Are you sure?
<a href style="text-decoration: underline" ng-click="removeRow(section, $index)">Yes</a>
<localize key="general_areyousure"/>
<a href style="text-decoration: underline" ng-click="removeRow(section, $index)"><localize key="general_yes"/></a>
</span>
<i ng-if="!deletePrompt" class="icon icon-trash"></i>
@@ -131,8 +131,8 @@
ng-mouseleave="disableWarnhighlightControl(control)">
<span ng-show="deletePrompt">
Are you sure?
<a href style="text-decoration: underline" ng-click="removeControl(area, $index)">Yes</a>
<localize key="general_areyousure"/>
<a href style="text-decoration: underline" ng-click="removeControl(area, $index)"><localize key="general_yes"/></a>
</span>
<i ng-show="!deletePrompt" class="icon icon-trash"></i>
@@ -178,8 +178,7 @@
<div class="usky-control usky-control-placeholder"
ng-if="area.controls.length == 0">
<div class="help-text" style="margin-bottom: 15px">
To start, click the <i class=" icon icon-add blue">
</i> below and add your first element
<localize key="grid_addElement"/>
</div><br />
</div>
@@ -237,7 +236,7 @@
<p>
<span class="help-text">Add rows to your layout</span>
<span class="help-text"><localize key="grid_addRows" /></span>
</p>

View File

@@ -1,59 +1,54 @@
<div ng-controller="Umbraco.PropertyEditors.GridPrevalueEditorController" class="usky-grid usky-grid-configuration">
<div style="width: 600px">
<div class="control-group uSky-templates">
<div class="control-group uSky-templates">
<h4>Grid layouts</h4>
<p>Layouts are the overall work area for the grid editor, usually you only need one or two differnt layouts</p>
<h4><localize key="grid_gridLayouts"/></h4>
<p><localize key="grid_gridLayoutsDetail" /></p>
<ul class="unstyled"
ui-sortable
ng-model="model.value.templates">
<ul class="unstyled"
ui-sortable
ng-model="model.value.templates">
<li ng-repeat="template in model.value.templates">
<li ng-repeat="template in model.value.templates">
<div ng-click="configureTemplate(template)"
class="preview-rows layout" style="height: 80px; margin-top: 5px; margin-bottom: 25px; float:left">
<div ng-click="configureTemplate(template)"
class="preview-rows layout" style="height: 60px; margin-top: 5px; margin-bottom: 20px; float:left">
<div class="preview-row">
<div class="preview-col"
ng-class="{last:$last}"
ng-repeat="section in template.sections"
ng-style="{width: percentage(section.grid) + '%'}">
<div class="preview-cell"></div>
</div>
<div class="preview-row">
<div class="preview-col"
ng-class="{last:$last}"
ng-repeat="section in template.sections"
ng-style="{width: percentage(section.grid) + '%'}">
<div class="preview-cell"></div>
</div>
</div>
<div>
{{template.name}} <br/>
<small>{{template.sections.length}} sections</small> <br/>
<a class="btn btn-small btn-link"
href
ng-click="deleteTemplate($index)"><i class="icon-delete red">
</i>Delete</a>
</div>
</div>
<br style="clear: both"
</li>
</ul>
<div>
{{template.name}} <br/>
<i class="icon-delete red"></i>
<a class="btn btn-small btn-link"
href
ng-click="deleteTemplate($index)"><localize key="general_delete" /></a>
</div>
<button class="btn btn-small"
prevent-default
ng-click="configureTemplate()">
<i class="icon-add"></i>Add new layout
</button>
</div>
<br style="clear: both"
</li>
</ul>
<button class="btn btn-small"
prevent-default
ng-click="configureTemplate()">
<i class="icon-add"></i> <localize key="grid_addGridLayout" />
</button>
</div>
</div>
<div style="max-width: 600px">
<div class="control-group uSky-templates" ng-if="!currentTemplate">
<div class="control-group uSky-templates">
<h4>Row configurations</h4>
<p>Rows are predefined cells arranged horizontally</p>
<h4><localize key="grid_rowConfigurations" /></h4>
<p><localize key="grid_rowConfigurationsDetail" /></p>
<div class="control-group uSky-templates-rows">
<ul class="unstyled"
@@ -78,116 +73,38 @@
<div>
{{layout.name}}<br />
<a class="btn btn-small btn-link" href ng-click="deleteLayout($index)"><i class="icon-delete red"></i> Delete row </a>
<i class="icon-delete red"></i>
<a class="btn btn-small btn-link" href ng-click="deleteLayout($index)">
<localize key="general_delete" />
</a>
</div>
<br style="clear: both" />
</li>
</ul>
<button class="btn btn-small"
prevent-default
ng-click="configureLayout()"><i class="icon-add"></i>Add new row configuration</button>
<button class="btn btn-small" prevent-default ng-click="configureLayout()">
<i class="icon-add"></i> <localize key="grid_addRowConfiguration" />
</button>
</div>
</div>
<div ng-if="currentLayout">
<h5>Row configuration</h5>
<umb-control-group
label="Name"
hide-label="false">
<input type="text" class="" ng-model="currentLayout.name" />
</umb-control-group>
<umb-control-group label="Layout areas" hide-label="false" description="Choose a cell from the row to edit">
<div class="uSky-templates-template"
style="margin: 0; width: 350px; position: relative;">
<div class="tb" style="height: auto; border: none !important; background: none">
<div class="tr">
<a class="td uSky-templates-column"
ng-class="{last:$last, selected:area==currentArea}"
ng-repeat="area in currentLayout.areas"
ng-click="configureArea(area, currentLayout)"
style="width:{{ percentage(area.grid) }}%">
</a>
<a class="td uSky-templates-column add"
ng-click="configureArea(undefined, currentLayout)"
style="width:{{ percentage(availableLayoutSpace) }}%">
<i class="icon icon-add"></i>
</a>
</div>
</div>
</div>
<div ng-if="currentArea" style="padding-bottom: 50px;">
<umb-control-group label="Width" hide-label="false">
<div class="grid-size-scaler">
<a href ng-click="scaleDown(currentArea)">
<i class="icon icon-remove"></i>
</a>
{{currentArea.grid}}
<a href ng-click="scaleUp(currentArea, availableLayoutSpace, true)">
<i class="icon icon-add"></i>
</a>
</div>
</umb-control-group>
<umb-control-group hide-label="true">
<ul class="unstyled">
<li>
<label>
<input type="checkbox"
ng-model="currentArea.allowAll"
ng-checked="currentArea.allowed === undefined"
ng-change="toggleCollection(currentArea.allowed, currentArea.allowAll)" />
Allow all editors
</label>
</li>
</ul>
<div ng-if="currentArea.allowAll === false">
<hr />
<ul class="unstyled">
<li ng-repeat="editor in editors">
<label>
<input type="checkbox"
checklist-model="currentArea.allowed"
checklist-value="editor.alias">
<i class="icon {{editor.icon}}"></i> {{editor.name}}
</label>
</li>
</ul>
</div>
</umb-control-group>
<button prevent-default ng-click="closeArea()" class="btn btn-small">Finish editing cell</button>
<a class="btn btn-small btn-link"
href
ng-click="deleteArea($index)"><i class="icon-delete red"></i> Delete cell </a>
</div>
</umb-control-group>
<umb-control-group hide-label="false" ng-if="!currentArea">
<button prevent-default ng-click="closeLayout()" class="btn btn-small">Finish editing row</button>
</umb-control-group>
</div>
</div>
<div style="max-width: 600px" ng-if="!currentTemplate && !currentLayout">
<umb-control-group label="Columns" hide-label="false" description="Total combined number of columns in the grid layout">
<div style="max-width: 600px">
<umb-control-group
label="@grid_columns"
description="@grid_columnsDetails">
<input type="text" class="" ng-model="model.value.columns" />
</umb-control-group>
<umb-control-group label="Settings" hide-label="false" description="Configure what settings editors can change">
<umb-control-group
label="@grid_settings"
description="@grid_settingsDetails">
<ul class="unstyled list-icons umb-contentpicker"
ui-sortable
ng-model="model.config">
@@ -206,17 +123,17 @@
<ul class="unstyled list-icons">
<li>
<i class="icon icon-add blue"></i>
<a href="#" ng-click="editConfig()" prevent-default>
Edit settings
<localize key="general_edit" />
</a>
</li>
</ul>
</umb-control-group>
<umb-control-group label="Styles" hide-label="false" description="Configure what styling editors can change">
<umb-control-group label="@grid_styles" description="@grid_stylesDetails">
<ul class="unstyled list-icons umb-contentpicker"
ui-sortable
ng-model="model.value.styles">
@@ -237,7 +154,7 @@
<li>
<i class="icon icon-add blue"></i>
<a href="#" ng-click="editStyles()" prevent-default>
Edit style configuration
<localize key="general_edit" />
</a>
</li>
</ul>

View File

@@ -841,6 +841,39 @@ To manage your website, simply open the Umbraco back office and start adding con
<key alias="quickGuide">Quick Guide to Umbraco template tags</key>
<key alias="template">Template</key>
</area>
<area alias="grid">
<key alias="insertControl">Insert control</key>
<key alias="addRows">Add rows to your layout</key>
<key alias="addElement"><![CDATA[To start, click the <i class="icon icon-add blue"></i> below and add your first element]]></key>
<key alias="gridLayouts">Grid layouts</key>
<key alias="gridLayoutsDetail">Layouts are the overall work area for the grid editor, usually you only need one or two differnt layouts</key>
<key alias="addGridLayout">Add grid layout</key>
<key alias="addGridLayoutDetail">Adjust the layout by setting column widths and adding additional sections</key>
<key alias="rowConfigurations">Row configurations</key>
<key alias="rowConfigurationsDetail">Rows are predefined cells arranged horizontally</key>
<key alias="addRowConfiguration">Add row configuration</key>
<key alias="addRowConfigurationDetail">Adjust the row by setting cell widths and adding additional cells</key>
<key alias="columns">Columns</key>
<key alias="columnsDetails">Total combined number of columns in the grid layout</key>
<key alias="settings">Settings</key>
<key alias="settingsDetails">Configure what settings editors can change</key>
<key alias="styles">Styles</key>
<key alias="stylesDetails">Configure what styling editors can change</key>
<key alias="settingDialogDetails">Settings will only save if the entered json configuration is valid</key>
<key alias="allowAllEditors">Allow all editors</key>
<key alias="allowAllRowConfigurations">Allow all row configurations</key>
</area>
<area alias="templateEditor">
<key alias="alternativeField">Alternative field</key>
<key alias="alternativeText">Alternative Text</key>