resourceEditor.html 1.2 KB

1234567891011121314151617181920212223242526272829
  1. <div class="resource-editor">
  2. <div class="input-group">
  3. <input class="form-control" type="text" ng-model="newResourceName"
  4. ng-required
  5. ng-keypress="$event.keyCode == 13 && addResource(newResourceName)"
  6. ng-disabled="!enabled" />
  7. <span class="input-group-btn">
  8. <button class="btn btn-default" ng-click="addResource(newResourceName)" ng-disabled="!enabled">添加</button>
  9. </span>
  10. </div>
  11. <div class="resource-dropdown clearfix" id="resource-dropdown">
  12. <ul class="km-resource"
  13. ng-init="resourceListOpen = false"
  14. ng-class="{'open': resourceListOpen}">
  15. <li ng-repeat="resource in used" ng-disabled="!enabled" ng-blur="blurCB()">
  16. <label style="background: {{resourceColor(resource.name)}}">
  17. <input type="checkbox" ng-model="resource.selected" ng-disabled="!enabled" />
  18. <span>{{resource.name}}</span>
  19. </label>
  20. </li>
  21. </ul>
  22. <div class="resource-caret"
  23. click-anywhere-but-here="resourceListOpen = false"
  24. is-active="resourceListOpen"
  25. ng-click="resourceListOpen = !resourceListOpen">
  26. <span class="caret"></span>
  27. </div>
  28. </div>
  29. </div>