Element select improved, default style more clean
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
|
||||
<accordion-group ng-repeat="subSection in section.subSections"
|
||||
ng-class="{true:'selected', false:''}[isOpen]"
|
||||
is-open="(schemaFocus != '' && schemaFocus == subSection.schema.toLowerCase())">
|
||||
is-open="(schemaFocus != '' && schemaFocus == subSection.name.toLowerCase())">
|
||||
|
||||
<accordion-heading>
|
||||
<span ng-click="accordionOpened(subSection.name)" ng-mouseover="accordionWillBeOpened(subSection.schema)">
|
||||
@@ -78,63 +78,65 @@
|
||||
</span>
|
||||
</accordion-heading>
|
||||
|
||||
<div class="div-field" ng-repeat="field in subSection.fields">
|
||||
<div ng-mouseover="accordionWillBeOpened(subSection.schema)">
|
||||
<div class="div-field" ng-repeat="field in subSection.fields">
|
||||
|
||||
<span class="field-title">{{field.name}}:</span>
|
||||
<span class="field-title">{{field.name}}:</span>
|
||||
|
||||
<div ng-if="field.type == 'colorPicker'">
|
||||
<spectrum colorselected="field.value"></spectrum>
|
||||
<i ng-if="field.value != ''" ng-click="removeField(field)" class="icon icon-delete colorPickerDelete"></i>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'bgImagePicker'" class="imagePickerPreviewContainer">
|
||||
<div class="imagePickerPreview" ng-click="open(field)" style="background-image:{{ field.value }}">
|
||||
<i class="icon icon-add"></i>
|
||||
<div ng-if="field.type == 'colorPicker'">
|
||||
<spectrum colorselected="field.value"></spectrum>
|
||||
<i ng-if="field.value != ''" ng-click="removeField(field)" class="icon icon-delete colorPickerDelete"></i>
|
||||
</div>
|
||||
<i ng-if="field.value != ''" ng-click="removeField(field)" class="icon icon-delete colorPickerDelete"></i>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'bgPositionPicker'">
|
||||
<select ng-options="BackgroundPosition for BackgroundPosition in BackgroundPositions" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'bgRepeatPicker'">
|
||||
<select ng-options="BackgroundRepeat for BackgroundRepeat in BackgroundRepeats" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'bgAttachmentPicker'">
|
||||
<select ng-options="BackgroundAttachment for BackgroundAttachment in BackgroundAttachments" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'layoutPicker'">
|
||||
<select ng-options="Layout for Layout in Layouts" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div class="box-slider" ng-if="field.type == 'slider'">
|
||||
<div ui-slider min="{{field.min}}" max="{{field.max}}" step="1" ng-model="field.value"></div>
|
||||
<span class="slider-span">px</span><input class="slider-input" ng-model="field.value">
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'checkbox'">
|
||||
<input type="checkbox" ng-checked="field.value == 'true'" ng-model="field.value">
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'displayPicker'">
|
||||
<select ng-options="display for display in displays" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'optionHomePicker'">
|
||||
<select ng-options="optionHome for optionHome in optionHomes" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'fontFamilyPicker'">
|
||||
<div class="fontFamilyPickerPreview" ng-click="openFontFamilyPickerModal(field)" style="font-family:{{ field.value }}">
|
||||
<span>Aa</span>
|
||||
{{ field.value }}
|
||||
<div ng-if="field.type == 'bgImagePicker'" class="imagePickerPreviewContainer">
|
||||
<div class="imagePickerPreview" ng-click="open(field)" style="background-image:{{ field.value }}">
|
||||
<i class="icon icon-add"></i>
|
||||
</div>
|
||||
<i ng-if="field.value != ''" ng-click="removeField(field)" class="icon icon-delete colorPickerDelete"></i>
|
||||
</div>
|
||||
<i ng-if="field.value != ''" ng-click="removeField(field)" class="fa fa-times colorPickerDelete"></i>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'bgPositionPicker'">
|
||||
<select ng-options="BackgroundPosition for BackgroundPosition in BackgroundPositions" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'bgRepeatPicker'">
|
||||
<select ng-options="BackgroundRepeat for BackgroundRepeat in BackgroundRepeats" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'bgAttachmentPicker'">
|
||||
<select ng-options="BackgroundAttachment for BackgroundAttachment in BackgroundAttachments" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'layoutPicker'">
|
||||
<select ng-options="Layout for Layout in Layouts" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div class="box-slider" ng-if="field.type == 'slider'">
|
||||
<div ui-slider min="{{field.min}}" max="{{field.max}}" step="1" ng-model="field.value"></div>
|
||||
<span class="slider-span">px</span><input class="slider-input" ng-model="field.value">
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'checkbox'">
|
||||
<input type="checkbox" ng-checked="field.value == 'true'" ng-model="field.value">
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'displayPicker'">
|
||||
<select ng-options="display for display in displays" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'optionHomePicker'">
|
||||
<select ng-options="optionHome for optionHome in optionHomes" ng-model="field.value"></select>
|
||||
</div>
|
||||
|
||||
<div ng-if="field.type == 'fontFamilyPicker'">
|
||||
<div class="fontFamilyPickerPreview" ng-click="openFontFamilyPickerModal(field)" style="font-family:{{ field.value }}">
|
||||
<span>Aa</span>
|
||||
{{ field.value }}
|
||||
</div>
|
||||
<i ng-if="field.value != ''" ng-click="removeField(field)" class="fa fa-times colorPickerDelete"></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</accordion-group>
|
||||
|
||||
@@ -6,94 +6,93 @@
|
||||
{
|
||||
var onlyOneColumn = Model.columns != null ? ((System.Collections.ICollection)Model.columns).Count : 0;
|
||||
|
||||
<div class="@(onlyOneColumn > 1 ? "container" : "")">
|
||||
<div class="uSky-grid @(onlyOneColumn > 1 ? "container" : "")">
|
||||
<div class="row clearfix">
|
||||
@foreach (var column in Model.columns)
|
||||
{
|
||||
<div class="col-md-@column.grid column usky-grid-column">
|
||||
<div class="col-md-@column.grid column">
|
||||
@foreach (var row in column.rows)
|
||||
{
|
||||
<div class="gridrow_@row.uniqueId" >
|
||||
<div class="container">
|
||||
<div class="row clearfix usky-grid-row">
|
||||
<div class="row clearfix">
|
||||
|
||||
@foreach (var cell in row.cells)
|
||||
{
|
||||
<div class="col-md-@cell.model.grid column">
|
||||
<div class="usky-grid-cell">
|
||||
|
||||
@foreach (var control in cell.controls)
|
||||
@foreach (var control in cell.controls)
|
||||
{
|
||||
if (control != null && control.editor != null && control.editor.view != null)
|
||||
{
|
||||
if (control != null && control.editor != null && control.editor.view != null)
|
||||
|
||||
string editor = control.editor.view.ToString();
|
||||
|
||||
switch (editor)
|
||||
{
|
||||
case "rte":
|
||||
<text>
|
||||
@Html.Raw(TemplateUtilities.ParseInternalLinks(control.value.ToString()))
|
||||
</text>
|
||||
break;
|
||||
case "macro":
|
||||
|
||||
string editor = control.editor.view.ToString();
|
||||
string macroAlias = control.value.macroAlias.ToString();
|
||||
ViewDataDictionary parameters = new ViewDataDictionary();
|
||||
foreach (dynamic mpd in control.value.marcoParamsDictionary)
|
||||
{
|
||||
parameters.Add(mpd.Name, mpd.Value);
|
||||
}
|
||||
|
||||
switch (editor)
|
||||
{
|
||||
case "rte":
|
||||
<text>
|
||||
@Html.Raw(TemplateUtilities.ParseInternalLinks(control.value.ToString()))
|
||||
</text>
|
||||
break;
|
||||
case "macro":
|
||||
<text>
|
||||
@Umbraco.RenderMacro(macroAlias, parameters)
|
||||
</text>
|
||||
break;
|
||||
case "textstring":
|
||||
|
||||
string macroAlias = control.value.macroAlias.ToString();
|
||||
ViewDataDictionary parameters = new ViewDataDictionary();
|
||||
foreach (dynamic mpd in control.value.marcoParamsDictionary)
|
||||
{
|
||||
parameters.Add(mpd.Name, mpd.Value);
|
||||
}
|
||||
if (control.editor.config.markup != null)
|
||||
{
|
||||
string markup = control.editor.config.markup.ToString();
|
||||
|
||||
markup = markup.Replace("#value#", control.value.ToString());
|
||||
markup = markup.Replace("#style#", control.editor.config.style.ToString());
|
||||
|
||||
<text>
|
||||
@Umbraco.RenderMacro(macroAlias, parameters)
|
||||
@Html.Raw(markup)
|
||||
</text>
|
||||
break;
|
||||
case "textstring":
|
||||
|
||||
if (control.editor.config.markup != null)
|
||||
{
|
||||
string markup = control.editor.config.markup.ToString();
|
||||
|
||||
markup = markup.Replace("#value#", control.value.ToString());
|
||||
markup = markup.Replace("#style#", control.editor.config.style.ToString());
|
||||
|
||||
<text>
|
||||
@Html.Raw(markup)
|
||||
</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>
|
||||
<div style="@control.editor.config.style">@control.value</div>
|
||||
</text>
|
||||
}
|
||||
|
||||
break;
|
||||
case "media":
|
||||
<text>
|
||||
<div class="thumbnail">
|
||||
<img src="@control.value.image">
|
||||
</div>
|
||||
@if (control.value.caption != null)
|
||||
{
|
||||
<p class="caption">@control.value.caption</p>
|
||||
}
|
||||
</text>
|
||||
break;
|
||||
case "embed":
|
||||
<text>
|
||||
@Html.Raw(control.value)
|
||||
</text>
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>
|
||||
<div style="@control.editor.config.style">@control.value</div>
|
||||
</text>
|
||||
}
|
||||
|
||||
break;
|
||||
case "media":
|
||||
<text>
|
||||
<div class="thumbnail">
|
||||
<img src="@control.value.image">
|
||||
</div>
|
||||
@if (control.value.caption != null)
|
||||
{
|
||||
<p class="caption">@control.value.caption</p>
|
||||
}
|
||||
</text>
|
||||
break;
|
||||
case "embed":
|
||||
<text>
|
||||
@Html.Raw(control.value)
|
||||
</text>
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user