Ensures internal generic properties are all wired up in c# and fixes up the boolean editor, adds templatepicker html file so that something is rendered and there are no js errors.
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
label: "Grid",
|
||||
id: 4,
|
||||
properties: [
|
||||
{ alias: "grid", label: "Grid", view: "grid", controller: "umbraco.grid", value: "test", hideLabel: true }
|
||||
{ alias: "grid", label: "Grid", view: "grid", value: "test", hideLabel: true }
|
||||
]
|
||||
}, {
|
||||
label: "Generic Properties",
|
||||
@@ -62,7 +62,7 @@
|
||||
{
|
||||
label: 'Created by',
|
||||
description: 'Original author',
|
||||
value: 1,
|
||||
value: "Administrator",
|
||||
view: "readonlyvalue",
|
||||
alias: "_umb_createdby"
|
||||
},
|
||||
@@ -71,9 +71,6 @@
|
||||
description: 'Time this document was created',
|
||||
value: new Date().toIsoDateTimeString(),
|
||||
view: "readonlyvalue",
|
||||
//NOTE: No need for filters because the date is a formatted string already because
|
||||
// that is how it comes from the server as a pre-formatted json string
|
||||
//config: {filter: 'date', format: 'medium'},
|
||||
alias: "_umb_createdate"
|
||||
},
|
||||
{
|
||||
@@ -99,10 +96,10 @@
|
||||
label: 'Template',
|
||||
value: "1234",
|
||||
view: "templatepicker",
|
||||
alias: "_umb_template"
|
||||
alias: "_umb_template"
|
||||
},
|
||||
{
|
||||
alias: "test", label: "Stuff", view: "test", controller: "umbraco.embeddedcontent", value: "",
|
||||
alias: "test", label: "Stuff", view: "test", value: "",
|
||||
config: {
|
||||
fields: [
|
||||
{ alias: "embedded", label: "Embbeded", view: "textstring", value: "" },
|
||||
|
||||
@@ -56,14 +56,14 @@ angular.module('umbraco.mocks').
|
||||
alias: "tab03",
|
||||
id: 3,
|
||||
properties: [
|
||||
{ alias: "grid", label: "Grid", view: "grid", controller: "umbraco.grid", value: "test", hideLabel: true }
|
||||
{ alias: "grid", label: "Grid", view: "grid", value: "test", hideLabel: true }
|
||||
]
|
||||
},{
|
||||
label: "WIP",
|
||||
alias: "tab04",
|
||||
id: 4,
|
||||
properties: [
|
||||
{ alias: "tes", label: "Stuff", view: "test", controller: "umbraco.embeddedcontent", value: "",
|
||||
{ alias: "tes", label: "Stuff", view: "test", value: "",
|
||||
|
||||
config: {
|
||||
fields: [
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
function booleanEditorController($scope, $rootScope, assetsService) {
|
||||
|
||||
$scope.renderModel = {
|
||||
value: false
|
||||
};
|
||||
if ($scope.model && $scope.model.value && ($scope.model.value.toString() === "1" || angular.lowercase($scope.model.value) === "true")) {
|
||||
$scope.renderModel.value = true;
|
||||
}
|
||||
|
||||
$scope.$watch("renderModel.value", function (newVal) {
|
||||
$scope.model.value = newVal === true ? "1" : "0";
|
||||
});
|
||||
|
||||
}
|
||||
angular.module("umbraco").controller("Umbraco.Editors.BooleanController", booleanEditorController);
|
||||
@@ -1 +1,3 @@
|
||||
<input type="checkbox" ng-model="model.value" ng-checked="{model.value == 1}" id="{{model.alias}} />
|
||||
<div ng-controller="Umbraco.Editors.BooleanController">
|
||||
<input type="checkbox" ng-model="renderModel.value" id="{{model.alias}" />
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<div class="span7">
|
||||
<h5>TODO: Implement this picker</h5>
|
||||
<div ng-model="model.value"></div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user