folder_picker.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <div class="gf-form-inline">
  2. <div class="gf-form">
  3. <label class="gf-form-label {{ctrl.labelClass}}">Folder</label>
  4. <div class="dropdown" ng-hide="ctrl.createNewFolder">
  5. <gf-form-dropdown model="ctrl.folder"
  6. get-options="ctrl.getOptions($query)"
  7. on-change="ctrl.onFolderChange($option)">
  8. </gf-form-dropdown>
  9. </div>
  10. <input type="text"
  11. class="gf-form-input max-width-10"
  12. ng-show="ctrl.createNewFolder"
  13. give-focus="ctrl.createNewFolder"
  14. ng-model="ctrl.newFolderName"
  15. ng-model-options="{ debounce: 400 }"
  16. ng-class="{'validation-error': !ctrl.isNewFolderNameValid()}"
  17. ng-change="ctrl.newFolderNameChanged()" />
  18. </div>
  19. <div class="gf-form" ng-show="ctrl.createNewFolder">
  20. <label class="gf-form-label text-success"
  21. ng-show="ctrl.newFolderNameTouched && !ctrl.hasValidationError">
  22. <i class="fa fa-check"></i>
  23. </label>
  24. </div>
  25. <div class="gf-form" ng-show="ctrl.createNewFolder">
  26. <button class="gf-form-label"
  27. ng-click="ctrl.createFolder($event)"
  28. ng-disabled="!ctrl.newFolderNameTouched || ctrl.hasValidationError">
  29. <i class="fa fa-fw fa-save"></i>&nbsp;Create
  30. </button>
  31. </div>
  32. <div class="gf-form" ng-show="ctrl.createNewFolder">
  33. <button class="gf-form-label"
  34. ng-click="ctrl.cancelCreateFolder($event)">
  35. Cancel
  36. </button>
  37. </div>
  38. </div>
  39. <div class="gf-form-inline" ng-if="ctrl.newFolderNameTouched && ctrl.hasValidationError">
  40. <div class="gf-form gf-form--grow">
  41. <label class="gf-form-label text-warning gf-form-label--grow">
  42. <i class="fa fa-warning"></i>
  43. {{ctrl.validationError}}
  44. </label>
  45. </div>
  46. </div>