Skip to content

Instantly share code, notes, and snippets.

@sniffdk
Created May 17, 2018 11:22
Show Gist options
  • Save sniffdk/d2f8605f66fa7468aa8d7d449bdabaae to your computer and use it in GitHub Desktop.
Save sniffdk/d2f8605f66fa7468aa8d7d449bdabaae to your computer and use it in GitHub Desktop.
Simple custom Umbraco dropdown plugin
angular.module("umbraco").controller("SimpleDropDown",
function ($scope) {
});
<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>
{
"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