You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dialogclose.js 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * Created by robin on 11/2/15.
  3. */
  4. angular.module('luticateUtils')
  5. .directive('dialogClose', ['luticateDialogErrorHelper',
  6. function (luticateDialogErrorHelper) {
  7. return {
  8. restrict: 'EA',
  9. transclude: true,
  10. templateUrl: '/luticateUtils/dialogclose-directive.html',
  11. link: function link($scope, element, attrs) {
  12. $scope.title = attrs.title;
  13. $scope.__close = function()
  14. {
  15. if ($scope.onClosed) {
  16. $scope.onClosed();
  17. }
  18. $scope.$close();
  19. };
  20. }
  21. };
  22. }]);
  23. angular.module("luticateUtils").run(["$templateCache", function($templateCache)
  24. {
  25. $templateCache.put("/luticateUtils/dialogclose-directive.html", '<div class="popin modal-content" xmlns="http://www.w3.org/1999/html">' +
  26. '<div class="modal-header">{{ title }}</div>' +
  27. '<div class="modal-body" lu-busy="modal">' +
  28. ' <div class="form-group">' +
  29. ' <ng-transclude></ng-transclude>' +
  30. ' </div>' +
  31. ' <div class="clearfix"></div>' +
  32. /*' <span class="error" ng-show="submitted">' +
  33. ' <p class="error">{{ errorString }}</p>' +
  34. '</span>' +*/
  35. '</div>' +
  36. '<div class="modal-footer">' +
  37. ' <button type="button" class="btn btn-inverse" ng-click="__close()">Close</button>' +
  38. ' </div>' +
  39. ' </div>')
  40. }]);