Created
May 17, 2018 11:22
-
-
Save sniffdk/d2f8605f66fa7468aa8d7d449bdabaae to your computer and use it in GitHub Desktop.
Simple custom Umbraco dropdown plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("umbraco").controller("SimpleDropDown", | |
function ($scope) { | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-controller="SimpleDropDown"> | |
<select name="simpleDropDownList" | |
class="umb-editor umb-dropdown" | |
ng-model="model.value" | |
ng-options="item.value for item in model.config.values track by item.value"> | |
<option></option> | |
</select> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"propertyEditors": [ | |
{ | |
"alias": "SimpleDropDown", | |
"name": "Simple drop down", | |
"editor": { | |
"view": "~/App_Plugins/SimpleDropDown/editor.html", | |
"valueType": "STRING" | |
}, | |
"prevalues": { | |
"fields": [ | |
{ | |
"label": "Add prevalue", | |
"description": "Add and remove values for the list", | |
"key": "values", | |
"view": "MultiValues" | |
} | |
] | |
} | |
} | |
], | |
"javascript": [ | |
"~/App_Plugins/SimpleDropDown/editor.controller.js" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment