Created
April 10, 2015 10:10
-
-
Save umar-webonise/8d5921b1892a3bff0931 to your computer and use it in GitHub Desktop.
Multi select drop down with tree indentation
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 class="control labelMove bottomSpace4"> | |
<select | |
id="org_node" | |
name="orgNode" | |
class="chosen-select" | |
chosen="treeDropOptions" | |
required | |
ng-model="indicator.org_node_id"> | |
<option ng-repeat="opt in treeDropOptions" ng-value="opt.id"> | |
{{Array(opt.lvl * 7).join(" ")}} {{opt.name}} | |
</option> | |
</select> | |
<label for="org_node">Org Node</label> | |
</div> | |
<script> | |
$http.get("/org_nodes/org_tree.json").success(function (tree) { | |
var array = []; | |
$scope.Array = Array; | |
Utils.treeToArray( tree, array); | |
$scope.treeDropOptions = array; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment