diff --git a/UI/WebServerResources/scss/components/backdrop/backdrop.js b/UI/WebServerResources/scss/components/backdrop/backdrop.js deleted file mode 100644 index 5f84fed4b..000000000 --- a/UI/WebServerResources/scss/components/backdrop/backdrop.js +++ /dev/null @@ -1,31 +0,0 @@ -(function() { -'use strict'; - -/* - * @ngdoc module - * @name material.components.backdrop - * @description Backdrop - */ - -/** - * @ngdoc directive - * @name mdBackdrop - * @module material.components.backdrop - * - * @restrict E - * - * @description - * `` is a backdrop element used by other coponents, such as dialog and bottom sheet. - * Apply class `opaque` to make the backdrop use the theme backdrop color. - * - */ - -angular.module('material.components.backdrop', [ - 'material.core' -]) - .directive('mdBackdrop', BackdropDirective); - -function BackdropDirective($mdTheming) { - return $mdTheming; -} -})(); diff --git a/UI/WebServerResources/scss/components/bottomSheet/bottomSheet.js b/UI/WebServerResources/scss/components/bottomSheet/bottomSheet.js deleted file mode 100644 index d914b2b35..000000000 --- a/UI/WebServerResources/scss/components/bottomSheet/bottomSheet.js +++ /dev/null @@ -1,285 +0,0 @@ -(function() { -'use strict'; - -/** - * @ngdoc module - * @name material.components.bottomSheet - * @description - * BottomSheet - */ -angular.module('material.components.bottomSheet', [ - 'material.core', - 'material.components.backdrop' -]) - .directive('mdBottomSheet', MdBottomSheetDirective) - .provider('$mdBottomSheet', MdBottomSheetProvider); - -function MdBottomSheetDirective() { - return { - restrict: 'E' - }; -} - -/** - * @ngdoc service - * @name $mdBottomSheet - * @module material.components.bottomSheet - * - * @description - * `$mdBottomSheet` opens a bottom sheet over the app and provides a simple promise API. - * - * ### Restrictions - * - * - The bottom sheet's template must have an outer `` element. - * - Add the `md-grid` class to the bottom sheet for a grid layout. - * - Add the `md-list` class to the bottom sheet for a list layout. - * - * @usage - * - *
- * - * Open a Bottom Sheet! - * - *
- *
- * - * var app = angular.module('app', ['ngMaterial']); - * app.controller('MyController', function($scope, $mdBottomSheet) { - * $scope.openBottomSheet = function() { - * $mdBottomSheet.show({ - * template: 'Hello!' - * }); - * }; - * }); - * - */ - - /** - * @ngdoc method - * @name $mdBottomSheet#show - * - * @description - * Show a bottom sheet with the specified options. - * - * @param {object} options An options object, with the following properties: - * - * - `templateUrl` - `{string=}`: The url of an html template file that will - * be used as the content of the bottom sheet. Restrictions: the template must - * have an outer `md-bottom-sheet` element. - * - `template` - `{string=}`: Same as templateUrl, except this is an actual - * template string. - * - `controller` - `{string=}`: The controller to associate with this bottom sheet. - * - `locals` - `{string=}`: An object containing key/value pairs. The keys will - * be used as names of values to inject into the controller. For example, - * `locals: {three: 3}` would inject `three` into the controller with the value - * of 3. - * - `targetEvent` - `{DOMClickEvent=}`: A click's event object. When passed in as an option, - * the location of the click will be used as the starting point for the opening animation - * of the the dialog. - * - `resolve` - `{object=}`: Similar to locals, except it takes promises as values - * and the bottom sheet will not open until the promises resolve. - * - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope. - * - `parent` - `{element=}`: The element to append the bottom sheet to. Defaults to appending - * to the root element of the application. - * - * @returns {promise} A promise that can be resolved with `$mdBottomSheet.hide()` or - * rejected with `$mdBottomSheet.cancel()`. - */ - -/** - * @ngdoc method - * @name $mdBottomSheet#hide - * - * @description - * Hide the existing bottom sheet and resolve the promise returned from - * `$mdBottomSheet.show()`. - * - * @param {*=} response An argument for the resolved promise. - * - */ - -/** - * @ngdoc method - * @name $mdBottomSheet#cancel - * - * @description - * Hide the existing bottom sheet and reject the promise returned from - * `$mdBottomSheet.show()`. - * - * @param {*=} response An argument for the rejected promise. - * - */ - -function MdBottomSheetProvider($$interimElementProvider) { - - return $$interimElementProvider('$mdBottomSheet') - .setDefaults({ - options: bottomSheetDefaults - }); - - /* @ngInject */ - function bottomSheetDefaults($animate, $mdConstant, $timeout, $$rAF, $compile, $mdTheming, $mdBottomSheet, $rootElement) { - var backdrop; - - return { - themable: true, - targetEvent: null, - onShow: onShow, - onRemove: onRemove, - escapeToClose: true - }; - - function onShow(scope, element, options) { - // Add a backdrop that will close on click - backdrop = $compile('')(scope); - backdrop.on('click touchstart', function() { - $timeout($mdBottomSheet.cancel); - }); - - $mdTheming.inherit(backdrop, options.parent); - - $animate.enter(backdrop, options.parent, null); - - var bottomSheet = new BottomSheet(element); - options.bottomSheet = bottomSheet; - - // Give up focus on calling item - options.targetEvent && angular.element(options.targetEvent.target).blur(); - $mdTheming.inherit(bottomSheet.element, options.parent); - - return $animate.enter(bottomSheet.element, options.parent) - .then(function() { - var focusable = angular.element( - element[0].querySelector('button') || - element[0].querySelector('a') || - element[0].querySelector('[ng-click]') - ); - focusable.focus(); - - if (options.escapeToClose) { - options.rootElementKeyupCallback = function(e) { - if (e.keyCode === $mdConstant.KEY_CODE.ESCAPE) { - $timeout($mdBottomSheet.cancel); - } - }; - $rootElement.on('keyup', options.rootElementKeyupCallback); - } - }); - - } - - function onRemove(scope, element, options) { - var bottomSheet = options.bottomSheet; - $animate.leave(backdrop); - return $animate.leave(bottomSheet.element).then(function() { - bottomSheet.cleanup(); - - // Restore focus - options.targetEvent && angular.element(options.targetEvent.target).focus(); - }); - } - - /** - * BottomSheet class to apply bottom-sheet behavior to an element - */ - function BottomSheet(element) { - var MAX_OFFSET = 80; // amount past the bottom of the element that we can drag down, this is same as in _bottomSheet.scss - var WIGGLE_AMOUNT = 20; // point where it starts to get "harder" to drag - var CLOSING_VELOCITY = 10; // how fast we need to flick down to close the sheet - var startY, lastY, velocity, transitionDelay, startTarget; - - // coercion incase $mdCompiler returns multiple elements - element = element.eq(0); - - element.on('touchstart', onTouchStart) - .on('touchmove', onTouchMove) - .on('touchend', onTouchEnd); - - return { - element: element, - cleanup: function cleanup() { - element.off('touchstart', onTouchStart) - .off('touchmove', onTouchMove) - .off('touchend', onTouchEnd); - } - }; - - function onTouchStart(e) { - e.preventDefault(); - startTarget = e.target; - startY = getY(e); - - // Disable transitions on transform so that it feels fast - transitionDelay = element.css($mdConstant.CSS.TRANSITION_DURATION); - element.css($mdConstant.CSS.TRANSITION_DURATION, '0s'); - } - - function onTouchEnd(e) { - // Re-enable the transitions on transforms - element.css($mdConstant.CSS.TRANSITION_DURATION, transitionDelay); - - var currentY = getY(e); - // If we didn't scroll much, and we didn't change targets, assume its a click - if ( Math.abs(currentY - startY) < 5 && e.target == startTarget) { - angular.element(e.target).triggerHandler('click'); - } else { - // If they went fast enough, trigger a close. - if (velocity > CLOSING_VELOCITY) { - $timeout($mdBottomSheet.cancel); - - // Otherwise, untransform so that we go back to our normal position - } else { - setTransformY(undefined); - } - } - } - - function onTouchMove(e) { - var currentY = getY(e); - var delta = currentY - startY; - - velocity = currentY - lastY; - lastY = currentY; - - // Do some conversion on delta to get a friction-like effect - delta = adjustedDelta(delta); - setTransformY(delta + MAX_OFFSET); - } - - /** - * Helper function to find the Y aspect of various touch events. - **/ - function getY(e) { - var touch = e.touches && e.touches.length ? e.touches[0] : e.changedTouches[0]; - return touch.clientY; - } - - /** - * Transform the element along the y-axis - **/ - function setTransformY(amt) { - if (amt === null || amt === undefined) { - element.css($mdConstant.CSS.TRANSFORM, ''); - } else { - element.css($mdConstant.CSS.TRANSFORM, 'translate3d(0, ' + amt + 'px, 0)'); - } - } - - // Returns a new value for delta that will never exceed MAX_OFFSET_AMOUNT - // Will get harder to exceed it as you get closer to it - function adjustedDelta(delta) { - if ( delta < 0 && delta < -MAX_OFFSET + WIGGLE_AMOUNT) { - delta = -delta; - var base = MAX_OFFSET - WIGGLE_AMOUNT; - delta = Math.max(-MAX_OFFSET, -Math.min(MAX_OFFSET - 5, base + ( WIGGLE_AMOUNT * (delta - base)) / MAX_OFFSET) - delta / 50); - } - - return delta; - } - } - - } - -} - -})(); diff --git a/UI/WebServerResources/scss/components/bottomSheet/bottomSheet.spec.js b/UI/WebServerResources/scss/components/bottomSheet/bottomSheet.spec.js deleted file mode 100644 index 195454264..000000000 --- a/UI/WebServerResources/scss/components/bottomSheet/bottomSheet.spec.js +++ /dev/null @@ -1,44 +0,0 @@ -describe('$mdBottomSheet service', function() { - beforeEach(module('material.components.bottomSheet', 'ngAnimateMock')); - - describe('#build()', function() { - it('should escapeToClose == true', inject(function($mdBottomSheet, $rootScope, $rootElement, $timeout, $animate, $mdConstant) { - var parent = angular.element('
'); - $mdBottomSheet.show({ - template: '', - parent: parent, - escapeToClose: true - }); - $rootScope.$apply(); - - $animate.triggerCallbacks(); - - expect(parent.find('md-bottom-sheet').length).toBe(1); - - $rootElement.triggerHandler({type: 'keyup', - keyCode: $mdConstant.KEY_CODE.ESCAPE - }); - - $timeout.flush(); - expect(parent.find('md-bottom-sheet').length).toBe(0); - })); - - it('should escapeToClose == false', inject(function($mdBottomSheet, $rootScope, $rootElement, $timeout, $animate, $mdConstant) { - var parent = angular.element('
'); - $mdBottomSheet.show({ - template: '', - parent: parent, - escapeToClose: false - }); - $rootScope.$apply(); - - $animate.triggerCallbacks(); - - expect(parent.find('md-bottom-sheet').length).toBe(1); - - $rootElement.triggerHandler({ type: 'keyup', keyCode: $mdConstant.KEY_CODE.ESCAPE }); - - expect(parent.find('md-bottom-sheet').length).toBe(1); - })); - }); -}); diff --git a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/bottom-sheet-grid-template.html b/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/bottom-sheet-grid-template.html deleted file mode 100644 index f743f0b25..000000000 --- a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/bottom-sheet-grid-template.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -
- -
-

{{ item.name }}

-
- -
-
-
diff --git a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/bottom-sheet-list-template.html b/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/bottom-sheet-list-template.html deleted file mode 100644 index 348220518..000000000 --- a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/bottom-sheet-list-template.html +++ /dev/null @@ -1,12 +0,0 @@ - - Comment Actions - - - - - - {{ item.name }} - - - - diff --git a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/index.html b/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/index.html deleted file mode 100644 index 9762d0318..000000000 --- a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/index.html +++ /dev/null @@ -1,19 +0,0 @@ -
-

- Bottom sheet can be dismissed with the service or a swipe down. -

-
- - Show as List - -
- - Show as Grid - -
- -
- - {{alert}} - -
diff --git a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/script.js b/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/script.js deleted file mode 100644 index 25351a284..000000000 --- a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/script.js +++ /dev/null @@ -1,58 +0,0 @@ -angular.module('bottomSheetDemo1', ['ngMaterial']) - -.controller('BottomSheetExample', function($scope, $timeout, $mdBottomSheet) { - $scope.alert = ''; - - $scope.showListBottomSheet = function($event) { - $scope.alert = ''; - $mdBottomSheet.show({ - templateUrl: 'bottom-sheet-list-template.html', - controller: 'ListBottomSheetCtrl', - targetEvent: $event - }).then(function(clickedItem) { - $scope.alert = clickedItem.name + ' clicked!'; - }); - }; - - $scope.showGridBottomSheet = function($event) { - $scope.alert = ''; - $mdBottomSheet.show({ - templateUrl: 'bottom-sheet-grid-template.html', - controller: 'GridBottomSheetCtrl', - targetEvent: $event - }).then(function(clickedItem) { - $scope.alert = clickedItem.name + ' clicked!'; - }); - }; -}) - -.controller('ListBottomSheetCtrl', function($scope, $mdBottomSheet) { - - $scope.items = [ - { name: 'Share', icon: 'share' }, - { name: 'Upload', icon: 'upload' }, - { name: 'Copy', icon: 'copy' }, - { name: 'Print this page', icon: 'print' }, - ]; - - $scope.listItemClick = function($index) { - var clickedItem = $scope.items[$index]; - $mdBottomSheet.hide(clickedItem); - }; -}) -.controller('GridBottomSheetCtrl', function($scope, $mdBottomSheet) { - - $scope.items = [ - { name: 'Hangout', icon: 'hangout' }, - { name: 'Mail', icon: 'mail' }, - { name: 'Message', icon: 'message' }, - { name: 'Copy', icon: 'copy' }, - { name: 'Facebook', icon: 'facebook' }, - { name: 'Twitter', icon: 'twitter' }, - ]; - - $scope.listItemClick = function($index) { - var clickedItem = $scope.items[$index]; - $mdBottomSheet.hide(clickedItem); - }; -}); diff --git a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/style.css b/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/style.css deleted file mode 100644 index 6999d9d33..000000000 --- a/UI/WebServerResources/scss/components/bottomSheet/demoBasicUsage/style.css +++ /dev/null @@ -1,64 +0,0 @@ - -/* Temporary fix until md-icon is working, DO NOT USE! */ -md-inline-list-icon { - display: inline-block; - height: 24px; - width: 24px; -} - -.md-inline-list-icon-label { - padding-left: 20px; - display: inline-block; - margin-top: -5px; - height: 24px; - vertical-align: middle; -} - -md-inline-list-icon[icon=share] { - background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjRweCINCgkgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnIGlkPSJIZWFkZXIiPg0KCTxnPg0KCQk8cmVjdCB4PSItNjE4IiB5PSItMTA4MCIgZmlsbD0ibm9uZSIgd2lkdGg9IjE0MDAiIGhlaWdodD0iMzYwMCIvPg0KCTwvZz4NCjwvZz4NCjxnIGlkPSJMYWJlbCI+DQo8L2c+DQo8ZyBpZD0iSWNvbiI+DQoJPGc+DQoJCTxwYXRoIGZpbGw9IiM3ZDdkN2QiIGQ9Ik0yMSwxMWwtNy03djRDNyw5LDQsMTQsMywxOWMyLjUtMy41LDYtNS4xLDExLTUuMVYxOEwyMSwxMXoiLz4NCgkJPHJlY3QgZmlsbD0ibm9uZSIgd2lkd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line-list-icon[icon=print] { - background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iMjRweCINCgkgaGVpZ2h0PSIyNHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnIGlkPSJIZWFkZXIiPg0KCTxnPg0KCQk8cmVjdCB4PSItNjE4IiB5PSItMTQ2NCIgZmlsbD0ibm9uZSIgd2lkdGg9IjE0MDAiIGhlaWdodD0iMzYwMCIvPg0KCTwvZz4NCjwvZz4NCjxnIGlkPSJMYWJlbCI+DQo8L2c+DQo8ZyBpZD0iSWNvbiI+DQoJPGc+DQoJCTxnPg0KCQkJPHBhdGggZD0iTTE5LDhINWMtMS43LDAtMywxLjMtMywzdjZoNHY0aDEydi00aDR2LTZDMjIsOS4zLDIwLjcsOCwxOSw4eiBNMTYsMTlIOHYtNWg4VjE5eiBNMTksMTJjLTAuNiwwLTEtMC40LTEtMXMwLjQtMSwxLTENCgkJCQljMC42LDAsMSwwLjQsMSwxUzE5LjYsMTIsMTksMTJ6IE0xOCwzSDZ2NGgxMlYzeiIgZmlsbD0iIzdkN2Q3ZCIvPg0KCQk8L2c+DQoJCTxyZWN0IGZpbGw9Im5vbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIvPg0KCTwvZz4NCjwvZz4NCjxnIGlkPSJHcmlkIiBkaXNwbGF5PSJub25lIj4NCgk8ZyBkaXNwbGF5PSJpbmxpbmUiPg0KCTwvZz4NCjwvZz4NCjwvc3ZnPg=='); -} - -.md-icon-container md-inline-grid-icon { - display: inline-block; - height: 48px; - width: 48px; -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components/button/button.js deleted file mode 100644 index 9211d8574..000000000 --- a/UI/WebServerResources/scss/components/button/button.js +++ /dev/null @@ -1,87 +0,0 @@ -(function() { -'use strict'; - -/** - * @ngdoc module - * @name material.components.button - * @description - * - * Button - */ -angular.module('material.components.button', [ - 'material.core' -]) - .directive('mdButton', MdButtonDirective); - -/** - * @ngdoc directive - * @name mdButton - * @module material.components.button - * - * @restrict E - * - * @description - * `` is a button directive with optional ink ripples (default enabled). - * - * If you supply a `href` or `ng-href` attribute, it will become an `` element. Otherwise, it will - * become a `'; - } - - function postLink(scope, element, attr) { - var node = element[0]; - $mdTheming(element); - $mdInkRipple.attachButtonBehavior(scope, element); - - var elementHasText = node.textContent.trim(); - if (!elementHasText) { - $mdAria.expect(element, 'aria-label'); - } - - // For anchor elements, we have to set tabindex manually when the - // element is disabled - if (isAnchor(attr) && angular.isDefined(attr.ngDisabled) ) { - scope.$watch(attr.ngDisabled, function(isDisabled) { - element.attr('tabindex', isDisabled ? -1 : 0); - }); - } - } - -} -})(); diff --git a/UI/WebServerResources/scss/components/button/button.spec.js b/UI/WebServerResources/scss/components/button/button.spec.js deleted file mode 100644 index 614504d01..000000000 --- a/UI/WebServerResources/scss/components/button/button.spec.js +++ /dev/null @@ -1,91 +0,0 @@ -describe('md-button', function() { - - beforeEach(TestUtil.mockRaf); - beforeEach(module('material.components.button')); - - it('should convert attributes on an md-button to attributes on the generated button', inject(function($compile, $rootScope) { - var button = $compile('')($rootScope); - $rootScope.$apply(); - expect(button[0].hasAttribute('hide')).toBe(true); - expect(button[0].hasAttribute('hide-sm')).toBe(true); - })); - - it('should only have one ripple container when a custom ripple color is set', inject(function ($compile, $rootScope, $timeout) { - var button = $compile('button')($rootScope); - var scope = button.eq(0).scope(); - scope._onInput({ isFirst: true, eventType: Hammer.INPUT_START, center: { x: 0, y: 0 } }); - expect(button[0].getElementsByClassName('md-ripple-container').length).toBe(1); - })); - - - it('should expect an aria-label if element has no text', inject(function($compile, $rootScope, $log) { - spyOn($log, 'warn'); - var button = $compile('')($rootScope); - $rootScope.$apply(); - expect($log.warn).toHaveBeenCalled(); - - $log.warn.reset(); - button = $compile('')($rootScope); - $rootScope.$apply(); - expect($log.warn).not.toHaveBeenCalled(); - })); - - - describe('with href or ng-href', function() { - - it('should be anchor if href attr', inject(function($compile, $rootScope) { - var button = $compile('')($rootScope.$new()); - $rootScope.$apply(); - expect(button[0].tagName.toLowerCase()).toEqual('a'); - })); - - it('should be anchor if ng-href attr', inject(function($compile, $rootScope) { - var button = $compile('')($rootScope.$new()); - $rootScope.$apply(); - expect(button[0].tagName.toLowerCase()).toEqual('a'); - })); - - it('should be button otherwise', inject(function($compile, $rootScope) { - var button = $compile('')($rootScope.$new()); - $rootScope.$apply(); - expect(button[0].tagName.toLowerCase()).toEqual('button'); - })); - - }); - - - describe('with ng-disabled', function() { - - it('should not set `tabindex` when used without anchor attributes', inject(function ($compile, $rootScope, $timeout) { - var scope = angular.extend( $rootScope.$new(), { isDisabled : true } ); - var button = $compile('button')(scope); - $rootScope.$apply(); - - expect(button[0].hasAttribute('tabindex')).toBe(false); - })); - - it('should set `tabindex == -1` when used with href', inject(function ($compile, $rootScope, $timeout) { - var scope = angular.extend( $rootScope.$new(), { isDisabled : true } ); - var button = $compile('button')(scope); - - $rootScope.$apply(); - expect(button.attr('tabindex')).toBe("-1"); - - $rootScope.$apply(function(){ - scope.isDisabled = false; - }); - expect(button.attr('tabindex')).toBe("0"); - - })); - - it('should set `tabindex == -1` when used with ng-href', inject(function ($compile, $rootScope, $timeout) { - var scope = angular.extend( $rootScope.$new(), { isDisabled : true, url : "http://material.angularjs.org" }); - var button = $compile('button')(scope); - $rootScope.$apply(); - - expect(button.attr('tabindex')).toBe("-1"); - })); - - }) - -}); diff --git a/UI/WebServerResources/scss/components/button/demoBasicUsage/index.html b/UI/WebServerResources/scss/components/button/demoBasicUsage/index.html deleted file mode 100644 index 980521a91..000000000 --- a/UI/WebServerResources/scss/components/button/demoBasicUsage/index.html +++ /dev/null @@ -1,53 +0,0 @@ - -
- - -
- {{title1}} - Primary (md-noink) - Disabled - {{title4}} -
- -
- Button - Primary - Disabled - Warn -
raised
-
- -
- - - - - - - - - - - - - - - -
FAB
-
- -
- Go to Google - RSVP -
- -
- Primary Hue 1 - Warn Hue 2 - Accent - Accent Hue 3 -
Themed
-
- -
-
diff --git a/UI/WebServerResources/scss/components/button/demoBasicUsage/script.js b/UI/WebServerResources/scss/components/button/demoBasicUsage/script.js deleted file mode 100644 index a38166e95..000000000 --- a/UI/WebServerResources/scss/components/button/demoBasicUsage/script.js +++ /dev/null @@ -1,11 +0,0 @@ - -angular.module('buttonsDemo1', ['ngMaterial']) - -.controller('AppCtrl', function($scope) { - $scope.title1 = 'Button'; - $scope.title4 = 'Warn'; - $scope.isDisabled = true; - - $scope.googleUrl = 'http://google.com'; - -}); diff --git a/UI/WebServerResources/scss/components/button/demoBasicUsage/style.css b/UI/WebServerResources/scss/components/button/demoBasicUsage/style.css deleted file mode 100644 index da3de8341..000000000 --- a/UI/WebServerResources/scss/components/button/demoBasicUsage/style.css +++ /dev/null @@ -1,30 +0,0 @@ - -/** From vulcanized demo **/ - -section { - background: #f7f7f7; - border-radius: 3px; - text-align: center; - margin: 1em; - position: relative !important; - padding-bottom: 10px; -} -md-content { - margin-right: 7px; -} -section .md-button:not(.md-fab) { - min-width: 10em; -} -section .md-button { - display: block; - margin: 1em; - line-height: 25px; -} -.label { - position: absolute; - bottom: 5px; - left: 7px; - color: #ccc; - font-size: 14px; -} - diff --git a/UI/WebServerResources/scss/components/card/card.js b/UI/WebServerResources/scss/components/card/card.js deleted file mode 100644 index 56e6b5eea..000000000 --- a/UI/WebServerResources/scss/components/card/card.js +++ /dev/null @@ -1,51 +0,0 @@ -(function() { -'use strict'; - -/** - * @ngdoc module - * @name material.components.card - * - * @description - * Card components. - */ -angular.module('material.components.card', [ - 'material.core' -]) - .directive('mdCard', mdCardDirective); - - - -/** - * @ngdoc directive - * @name mdCard - * @module material.components.card - * - * @restrict E - * - * @description - * The `` directive is a container element used within `` containers. - * - * Cards have constant width and variable heights; where the maximum height is limited to what can - * fit within a single view on a platform, but it can temporarily expand as needed - * - * @usage - * - * - * - *

Paracosm

- *

- * The titles of Washed Out's breakthrough song and the first single from Paracosm share the * two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well... - *

- *
- *
- * - */ -function mdCardDirective($mdTheming) { - return { - restrict: 'E', - link: function($scope, $element, $attr) { - $mdTheming($element); - } - }; -} -})(); diff --git a/UI/WebServerResources/scss/components/card/card.spec.js b/UI/WebServerResources/scss/components/card/card.spec.js deleted file mode 100644 index a76fd3a0b..000000000 --- a/UI/WebServerResources/scss/components/card/card.spec.js +++ /dev/null @@ -1,16 +0,0 @@ -describe('mdCard directive', function() { - - beforeEach(module('material.components.card')); - - it('should have the default theme class when the md-theme attribute is not defined', inject(function($compile, $rootScope) { - var card = $compile('')($rootScope.$new()); - $rootScope.$apply(); - expect(card.hasClass('md-default-theme')).toBe(true); - })); - - it('should have the correct theme class when the md-theme attribute is defined', inject(function($compile, $rootScope) { - var card = $compile('')($rootScope.$new()); - $rootScope.$apply(); - expect(card.hasClass('md-green-theme')).toBe(true); - })); -}); diff --git a/UI/WebServerResources/scss/components/card/demoBasicUsage/index.html b/UI/WebServerResources/scss/components/card/demoBasicUsage/index.html deleted file mode 100644 index 39af425ad..000000000 --- a/UI/WebServerResources/scss/components/card/demoBasicUsage/index.html +++ /dev/null @@ -1,41 +0,0 @@ - -
- - - - - Washed Out - -

Paracosm

-

- The titles of Washed Out's breakthrough song and the first single from Paracosm share the - two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well... -

-
-
- - - Washed Out - -

Paracosm

-

- The titles of Washed Out's breakthrough song and the first single from Paracosm share the - two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well... -

-
-
- - - Washed Out - -

Paracosm

-

- The titles of Washed Out's breakthrough song and the first single from Paracosm share the - two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well... -

-
-
- - -
-
diff --git a/UI/WebServerResources/scss/components/card/demoBasicUsage/script.js b/UI/WebServerResources/scss/components/card/demoBasicUsage/script.js deleted file mode 100644 index cf0707b29..000000000 --- a/UI/WebServerResources/scss/components/card/demoBasicUsage/script.js +++ /dev/null @@ -1,6 +0,0 @@ - -angular.module('cardDemo1', ['ngMaterial']) - -.controller('AppCtrl', function($scope) { - -}); diff --git a/UI/WebServerResources/scss/components/card/demoBasicUsage/style.css b/UI/WebServerResources/scss/components/card/demoBasicUsage/style.css deleted file mode 100644 index dec8b72f6..000000000 --- a/UI/WebServerResources/scss/components/card/demoBasicUsage/style.css +++ /dev/null @@ -1,4 +0,0 @@ - -md-card { - min-height: 150px; -} diff --git a/UI/WebServerResources/scss/components/checkbox/checkbox.js b/UI/WebServerResources/scss/components/checkbox/checkbox.js deleted file mode 100644 index ea5d3bc7d..000000000 --- a/UI/WebServerResources/scss/components/checkbox/checkbox.js +++ /dev/null @@ -1,126 +0,0 @@ -(function() { -'use strict'; - -/** - * @ngdoc module - * @name material.components.checkbox - * @description Checkbox module! - */ -angular.module('material.components.checkbox', [ - 'material.core' -]) - .directive('mdCheckbox', MdCheckboxDirective); - -/** - * @ngdoc directive - * @name mdCheckbox - * @module material.components.checkbox - * @restrict E - * - * @description - * The checkbox directive is used like the normal [angular checkbox](https://docs.angularjs.org/api/ng/input/input%5Bcheckbox%5D). - * - * @param {string} ng-model Assignable angular expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {expression=} ng-true-value The value to which the expression should be set when selected. - * @param {expression=} ng-false-value The value to which the expression should be set when not selected. - * @param {string=} ng-change Angular expression to be executed when input changes due to user interaction with the input element. - * @param {boolean=} md-no-ink Use of attribute indicates use of ripple ink effects - * @param {string=} aria-label Adds label to checkbox for accessibility. - * Defaults to checkbox's text. If no default text is found, a warning will be logged. - * - * @usage - * - * - * Finished ? - * - * - * - * No Ink Effects - * - * - * - * Disabled - * - * - * - * - */ -function MdCheckboxDirective(inputDirective, $mdInkRipple, $mdAria, $mdConstant, $mdTheming, $mdUtil) { - inputDirective = inputDirective[0]; - var CHECKED_CSS = 'md-checked'; - - return { - restrict: 'E', - transclude: true, - require: '?ngModel', - template: - '
' + - '
' + - '
' + - '
', - compile: compile - }; - - // ********************************************************** - // Private Methods - // ********************************************************** - - function compile (tElement, tAttrs) { - - tAttrs.type = 'checkbox'; - tAttrs.tabIndex = 0; - tElement.attr('role', tAttrs.type); - - return function postLink(scope, element, attr, ngModelCtrl) { - ngModelCtrl = ngModelCtrl || $mdUtil.fakeNgModel(); - var checked = false; - $mdTheming(element); - - $mdAria.expectWithText(tElement, 'aria-label'); - - // Reuse the original input[type=checkbox] directive from Angular core. - // This is a bit hacky as we need our own event listener and own render - // function. - inputDirective.link.pre(scope, { - on: angular.noop, - 0: {} - }, attr, [ngModelCtrl]); - - // Used by switch. in Switch, we don't want click listeners; we have more granular - // touchup/touchdown listening. - if (!attr.mdNoClick) { - element.on('click', listener); - } - element.on('keypress', keypressHandler); - ngModelCtrl.$render = render; - - function keypressHandler(ev) { - if(ev.which === $mdConstant.KEY_CODE.SPACE) { - ev.preventDefault(); - listener(ev); - } - } - function listener(ev) { - if (element[0].hasAttribute('disabled')) return; - - scope.$apply(function() { - checked = !checked; - ngModelCtrl.$setViewValue(checked, ev && ev.type); - ngModelCtrl.$render(); - }); - } - - function render() { - checked = ngModelCtrl.$viewValue; - if(checked) { - element.addClass(CHECKED_CSS); - } else { - element.removeClass(CHECKED_CSS); - } - } - }; - } -} - -})(); diff --git a/UI/WebServerResources/scss/components/checkbox/checkbox.spec.js b/UI/WebServerResources/scss/components/checkbox/checkbox.spec.js deleted file mode 100644 index bb1947ec6..000000000 --- a/UI/WebServerResources/scss/components/checkbox/checkbox.spec.js +++ /dev/null @@ -1,172 +0,0 @@ - -describe('mdCheckbox', function() { - var CHECKED_CSS = 'md-checked'; - - beforeEach(module('material.components.checkbox')); - beforeEach(module('ngAria')); - beforeEach(TestUtil.mockRaf); - - it('should warn developers they need a label', inject(function($compile, $rootScope, $log){ - spyOn($log, "warn"); - - var element = $compile('
' + - '' + - '' + - '
')($rootScope); - - expect($log.warn).toHaveBeenCalled(); - })); - - it('should copy text content to aria-label', inject(function($compile, $rootScope){ - var element = $compile('
' + - '' + - 'Some text' + - '' + - '
')($rootScope); - - var cbElements = element.find('md-checkbox'); - expect(cbElements.eq(0).attr('aria-label')).toBe('Some text'); - })); - - it('should set checked css class and aria-checked attributes', inject(function($compile, $rootScope) { - var element = $compile('
' + - '' + - '' + - '' + - '' + - '
')($rootScope); - - $rootScope.$apply(function(){ - $rootScope.blue = false; - $rootScope.green = true; - }); - - var cbElements = element.find('md-checkbox'); - - expect(cbElements.eq(0).hasClass(CHECKED_CSS)).toEqual(false); - expect(cbElements.eq(1).hasClass(CHECKED_CSS)).toEqual(true); - expect(cbElements.eq(0).attr('aria-checked')).toEqual('false'); - expect(cbElements.eq(1).attr('aria-checked')).toEqual('true'); - expect(cbElements.eq(0).attr('role')).toEqual('checkbox'); - })); - - it('should be disabled with disabled attr', inject(function($compile, $rootScope) { - var element = $compile('
' + - '' + - '' + - '
')($rootScope); - - var checkbox = element.find('md-checkbox'); - $rootScope.$apply('isDisabled = true'); - - $rootScope.$apply('blue = false'); - - checkbox.triggerHandler('click'); - expect($rootScope.blue).toBe(false); - - $rootScope.$apply('isDisabled = false'); - - checkbox.triggerHandler('click'); - expect($rootScope.blue).toBe(true); - - - })); - - describe('ng core checkbox tests', function() { - - var inputElm; - var scope; - var $compile; - - beforeEach(inject(function(_$compile_, _$rootScope_) { - scope = _$rootScope_; - $compile = _$compile_; - })); - - function compileInput(html) { - inputElm = $compile(html)(scope); - } - - function isChecked(cbEl) { - return cbEl.hasClass(CHECKED_CSS); - } - - it('should format booleans', function() { - compileInput(''); - - scope.$apply("name = false"); - expect(isChecked(inputElm)).toBe(false); - - scope.$apply("name = true"); - expect(isChecked(inputElm)).toBe(true); - }); - - - it('should support type="checkbox" with non-standard capitalization', function() { - compileInput(''); - - inputElm.triggerHandler('click'); - expect(scope.checkbox).toBe(true); - - inputElm.triggerHandler('click'); - expect(scope.checkbox).toBe(false); - }); - - - it('should allow custom enumeration', function() { - compileInput(''); - - scope.$apply("name = 'y'"); - expect(isChecked(inputElm)).toBe(true); - - scope.$apply("name = 'n'"); - expect(isChecked(inputElm)).toBe(false); - - scope.$apply("name = 'something else'"); - expect(isChecked(inputElm)).toBe(false); - - inputElm.triggerHandler('click'); - expect(scope.name).toEqual('y'); - - inputElm.triggerHandler('click'); - expect(scope.name).toEqual('n'); - }); - - - it('should throw if ngTrueValue is present and not a constant expression', function() { - expect(function() { - compileInput(''); - }).toThrow(); - }); - - - it('should throw if ngFalseValue is present and not a constant expression', function() { - expect(function() { - compileInput(''); - }).toThrow(); - }); - - - it('should not throw if ngTrueValue or ngFalseValue are not present', function() { - expect(function() { - compileInput(''); - }).not.toThrow(); - }); - - - it('should be required if false', function() { - compileInput(''); - - inputElm.triggerHandler('click'); - expect(isChecked(inputElm)).toBe(true); - expect(inputElm.hasClass('ng-valid')).toBe(true); - - inputElm.triggerHandler('click'); - expect(isChecked(inputElm)).toBe(false); - expect(inputElm.hasClass('ng-invalid')).toBe(true); - }); - - }); - -}); diff --git a/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/index.html b/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/index.html deleted file mode 100644 index 24e006a62..000000000 --- a/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/index.html +++ /dev/null @@ -1,23 +0,0 @@ - -
- - - Checkbox 1: {{ data.cb1 }} - - - - Checkbox 2 (md-warn): {{ data.cb2 }} - - - - Checkbox: Disabled - - - - Checkbox: Disabled, Checked - - - - Checkbox (md-primary): No Ink - -
diff --git a/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/script.js b/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/script.js deleted file mode 100644 index d113d32bb..000000000 --- a/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/script.js +++ /dev/null @@ -1,13 +0,0 @@ - -angular.module('checkboxDemo1', ['ngMaterial']) - -.controller('AppCtrl', function($scope) { - - $scope.data = {}; - $scope.data.cb1 = true; - $scope.data.cb2 = false; - $scope.data.cb3 = false; - $scope.data.cb4 = false; - $scope.data.cb5 = false; - -}); diff --git a/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/style.css b/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/style.css deleted file mode 100644 index 5e315af58..000000000 --- a/UI/WebServerResources/scss/components/checkbox/demoBasicUsage/style.css +++ /dev/null @@ -1,4 +0,0 @@ - -body { - padding: 20px; -} diff --git a/UI/WebServerResources/scss/components/content/content.js b/UI/WebServerResources/scss/components/content/content.js deleted file mode 100644 index d1d2b02b5..000000000 --- a/UI/WebServerResources/scss/components/content/content.js +++ /dev/null @@ -1,53 +0,0 @@ -(function() { -'use strict'; - -/** - * @ngdoc module - * @name material.components.content - * - * @description - * Scrollable content - */ -angular.module('material.components.content', [ - 'material.core' -]) - .directive('mdContent', mdContentDirective); - -/** - * @ngdoc directive - * @name mdContent - * @module material.components.content - * - * @restrict E - * - * @description - * The `` directive is a container element useful for scrollable content - * - * ### Restrictions - * - * - Add the `md-padding` class to make the content padded. - * - * @usage - * - * - * Lorem ipsum dolor sit amet, ne quod novum mei. - * - * - * - */ -function mdContentDirective($mdTheming) { - return { - restrict: 'E', - controller: ['$scope', '$element', ContentController], - link: function($scope, $element, $attr) { - $mdTheming($element); - $scope.$broadcast('$mdContentLoaded', $element); - } - }; - - function ContentController($scope, $element) { - this.$scope = $scope; - this.$element = $element; - } -} -})(); diff --git a/UI/WebServerResources/scss/components/content/content.spec.js b/UI/WebServerResources/scss/components/content/content.spec.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/UI/WebServerResources/scss/components/content/demoBasicUsage/index.html b/UI/WebServerResources/scss/components/content/demoBasicUsage/index.html deleted file mode 100644 index 04268071c..000000000 --- a/UI/WebServerResources/scss/components/content/demoBasicUsage/index.html +++ /dev/null @@ -1,54 +0,0 @@ - -
- -
- Toolbar: md-accent -
-
- - - Lorem ipsum dolor sit amet, ne quod novum mei. Sea omnium invenire mediocrem at, in lobortis conclusionemque nam. Ne deleniti appetere reprimique pro, inani labitur disputationi te sed. At vix sale omnesque, id pro labitur reformidans accommodare, cum labores honestatis eu. Nec quem lucilius in, eam praesent reformidans no. Sed laudem aliquam ne. - -

-Facete delenit argumentum cum at. Pro rebum nostrum contentiones ad. Mel exerci tritani maiorum at, mea te audire phaedrum, mel et nibh aliquam. Malis causae equidem vel eu. Noster melius vis ea, duis alterum oporteat ea sea. Per cu vide munere fierent. -

- -

-Ad sea dolor accusata consequuntur. Sit facete convenire reprehendunt et. Usu cu nonumy dissentiet, mei choro omnes fuisset ad. Te qui docendi accusam efficiantur, doming noster prodesset eam ei. In vel posse movet, ut convenire referrentur eum, ceteros singulis intellegam eu sit. -

- -

-Sit saepe quaestio reprimique id, duo no congue nominati, cum id nobis facilisi. No est laoreet dissentias, idque consectetuer eam id. Clita possim assueverit cu his, solum virtute recteque et cum. Vel cu luptatum signiferumque, mel eu brute nostro senserit. Blandit euripidis consequat ex mei, atqui torquatos id cum, meliore luptatum ut usu. Cu zril perpetua gubergren pri. Accusamus rationibus instructior ei pro, eu nullam principes qui, reque justo omnes et quo. -

- -

-Sint unum eam id. At sit fastidii theophrastus, mutat senserit repudiare et has. Atqui appareat repudiare ad nam, et ius alii incorrupte. Alii nullam libris his ei, meis aeterno at eum. Ne aeque tincidunt duo. In audire malorum mel, tamquam efficiantur has te. -

- -

-Qui utamur tacimates quaestio ad, quod graece omnium ius ut. Pri ut vero debitis interpretaris, qui cu mentitum adipiscing disputationi. Voluptatum mediocritatem quo ut. Fabulas dolorem ei has, quem molestie persequeris et sit. -

- -

-Est in vivendum comprehensam conclusionemque, alia cetero iriure no usu, te cibo deterruisset pro. Ludus epicurei quo id, ex cum iudicabit intellegebat. Ex modo deseruisse quo, mel noster menandri sententiae ea, duo et tritani malorum recteque. Nullam suscipit partiendo nec id, indoctum vulputate per ex. Et has enim habemus tibique. Cu latine electram cum, ridens propriae intellegat eu mea. -

- -

-Duo at aliquid mnesarchum, nec ne impetus hendrerit. Ius id aeterno debitis atomorum, et sed feugait voluptua, brute tibique no vix. Eos modo esse ex, ei omittam imperdiet pro. Vel assum albucius incorrupte no. Vim viris prompta repudiare ne, vel ut viderer scripserit, dicant appetere argumentum mel ea. Eripuit feugait tincidunt pri ne, cu facilisi molestiae usu. -

- -

-Qui utamur tacimates quaestio ad, quod graece omnium ius ut. Pri ut vero debitis interpretaris, qui cu mentitum adipiscing disputationi. Voluptatum mediocritatem quo ut. Fabulas dolorem ei has, quem molestie persequeris et sit. -

- -

-Est in vivendum comprehensam conclusionemque, alia cetero iriure no usu, te cibo deterruisset pro. Ludus epicurei quo id, ex cum iudicabit intellegebat. Ex modo deseruisse quo, mel noster menandri sententiae ea, duo et tritani malorum recteque. Nullam suscipit partiendo nec id, indoctum vulputate per ex. Et has enim habemus tibique. Cu latine electram cum, ridens propriae intellegat eu mea. -

- -

-Duo at aliquid mnesarchum, nec ne impetus hendrerit. Ius id aeterno debitis atomorum, et sed feugait voluptua, brute tibique no vix. Eos modo esse ex, ei omittam imperdiet pro. Vel assum albucius incorrupte no. Vim viris prompta repudiare ne, vel ut viderer scripserit, dicant appetere argumentum mel ea. Eripuit feugait tincidunt pri ne, cu facilisi molestiae usu. -

- -
- -
diff --git a/UI/WebServerResources/scss/components/content/demoBasicUsage/script.js b/UI/WebServerResources/scss/components/content/demoBasicUsage/script.js deleted file mode 100644 index 5069400ce..000000000 --- a/UI/WebServerResources/scss/components/content/demoBasicUsage/script.js +++ /dev/null @@ -1,6 +0,0 @@ - -angular.module('contentDemo1', ['ngMaterial']) - -.controller('AppCtrl', function($scope) { - -}) diff --git a/UI/WebServerResources/scss/components/dialog/demoBasicUsage/dialog1.tmpl.html b/UI/WebServerResources/scss/components/dialog/demoBasicUsage/dialog1.tmpl.html deleted file mode 100644 index 1199f1d60..000000000 --- a/UI/WebServerResources/scss/components/dialog/demoBasicUsage/dialog1.tmpl.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - Mango (Fruit) -

- The mango is a juicy stone fruit belonging to the genus Mangifera, consisting of numerous tropical fruiting trees, cultivated mostly for edible fruit. The majority of these species are found in nature as wild mangoes. They all belong to the flowering plant family Anacardiaceae. The mango is native to South and Southeast Asia, from where it has been distributed worldwide to become one of the most cultivated fruits in the tropics. -

- - - -

- The highest concentration of Mangifera genus is in the western part of Malesia (Sumatra, Java and Borneo) and in Burma and India. While other Mangifera species (e.g. horse mango, M. foetida) are also grown on a more localized basis, Mangifera indica—the "common mango" or "Indian mango"—is the only mango tree commonly cultivated in many tropical and subtropical regions. -

-

- It originated in Indian subcontinent (present day India and Pakistan) and Burma. It is the national fruit of India, Pakistan, and the Philippines, and the national tree of Bangladesh. In several cultures, its fruit and leaves are ritually used as floral decorations at weddings, public celebrations, and religious ceremonies. -

-
- -
- - More on Wikipedia - - - - Not Useful - - - Useful - -
- -
diff --git a/UI/WebServerResources/scss/components/dialog/demoBasicUsage/index.html b/UI/WebServerResources/scss/components/dialog/demoBasicUsage/index.html deleted file mode 100644 index 9f632e564..000000000 --- a/UI/WebServerResources/scss/components/dialog/demoBasicUsage/index.html +++ /dev/null @@ -1,24 +0,0 @@ -
-

- Open a dialog over the app's content. Press escape or click outside to close the dialog. -

- -
- - Alert Dialog - -
- - Confirm Dialog - -
- - Custom Dialog - -
- -
- - {{alert}} - -
diff --git a/UI/WebServerResources/scss/components/dialog/demoBasicUsage/script.js b/UI/WebServerResources/scss/components/dialog/demoBasicUsage/script.js deleted file mode 100644 index a54168c07..000000000 --- a/UI/WebServerResources/scss/components/dialog/demoBasicUsage/script.js +++ /dev/null @@ -1,59 +0,0 @@ -angular.module('dialogDemo1', ['ngMaterial']) - -.controller('AppCtrl', function($scope, $mdDialog) { - $scope.alert = ''; - - $scope.showAlert = function(ev) { - $mdDialog.show( - $mdDialog.alert() - .title('This is an alert title') - .content('You can specify some description text in here.') - .ariaLabel('Password notification') - .ok('Got it!') - .targetEvent(ev) - ); - }; - - $scope.showConfirm = function(ev) { - var confirm = $mdDialog.confirm() - .title('Would you like to delete your debt?') - .content('All of the banks have agreed to forgive you your debts.') - .ariaLabel('Lucky day') - .ok('Please do it!') - .cancel('Sounds like a scam') - .targetEvent(ev); - - $mdDialog.show(confirm).then(function() { - $scope.alert = 'You decided to get rid of your debt.'; - }, function() { - $scope.alert = 'You decided to keep your debt.'; - }); - }; - - $scope.showAdvanced = function(ev) { - $mdDialog.show({ - controller: DialogController, - templateUrl: 'dialog1.tmpl.html', - targetEvent: ev, - }) - .then(function(answer) { - $scope.alert = 'You said the information was "' + answer + '".'; - }, function() { - $scope.alert = 'You cancelled the dialog.'; - }); - }; -}); - -function DialogController($scope, $mdDialog) { - $scope.hide = function() { - $mdDialog.hide(); - }; - - $scope.cancel = function() { - $mdDialog.cancel(); - }; - - $scope.answer = function(answer) { - $mdDialog.hide(answer); - }; -} diff --git a/UI/WebServerResources/scss/components/dialog/demoBasicUsage/style.css b/UI/WebServerResources/scss/components/dialog/demoBasicUsage/style.css deleted file mode 100644 index db6321a7c..000000000 --- a/UI/WebServerResources/scss/components/dialog/demoBasicUsage/style.css +++ /dev/null @@ -1,34 +0,0 @@ -.full { - width: 100%; - height: 100%; -} - -.gap { - width:50px; -} - - -.md-subheader { - background-color: #dcedc8; - margin: 0px; -} - -h2.md-subheader { - margin: 0px; - margin-left: -24px; - margin-right: -24px; - margin-top: -24px; -} - -h2.md-subheader.md-sticky-clone { - margin-right:0px; - margin-top:0px; - - box-shadow: 0px 2px 4px 0 rgba(0,0,0,0.16); -} - -h2 .md-subheader-content { - padding-left: 10px; -} - - diff --git a/UI/WebServerResources/scss/components/dialog/dialog.js b/UI/WebServerResources/scss/components/dialog/dialog.js deleted file mode 100644 index 078d3a109..000000000 --- a/UI/WebServerResources/scss/components/dialog/dialog.js +++ /dev/null @@ -1,485 +0,0 @@ -(function() { -'use strict'; - -/** - * @ngdoc module - * @name material.components.dialog - */ -angular.module('material.components.dialog', [ - 'material.core', - 'material.components.backdrop' -]) - .directive('mdDialog', MdDialogDirective) - .provider('$mdDialog', MdDialogProvider); - -function MdDialogDirective($$rAF, $mdTheming) { - return { - restrict: 'E', - link: function(scope, element, attr) { - $mdTheming(element); - $$rAF(function() { - var content = element[0].querySelector('md-content'); - if (content && content.scrollHeight > content.clientHeight) { - element.addClass('md-content-overflow'); - } - }); - } - }; -} - -/** - * @ngdoc service - * @name $mdDialog - * @module material.components.dialog - * - * @description - * `$mdDialog` opens a dialog over the app and provides a simple promise API. - * - * ### Restrictions - * - * - The dialog is always given an isolate scope. - * - The dialog's template must have an outer `` element. - * Inside, use an `` element for the dialog's content, and use - * an element with class `md-actions` for the dialog's actions. - * - * @usage - * ##### HTML - * - * - *
- * - * Employee Alert! - * - * - * Close Alert - * - * - * Greet Employee - * - *
- *
- * - * ##### JavaScript - * - * - * (function(angular, undefined){ - * "use strict"; - * - * angular - * .module('demoApp', ['ngMaterial']) - * .controller('EmployeeController', EmployeeEditor) - * .controller('GreetingController', GreetingController); - * - * // Fictitious Employee Editor to show how to use simple and complex dialogs. - * - * function EmployeeEditor($scope, $mdDialog) { - * var alert; - * - * $scope.showAlert = showAlert; - * $scope.closeAlert = closeAlert; - * $scope.showGreeting = showCustomGreeting; - * - * $scope.hasAlert = function() { return !!alert }; - * $scope.userName = $scope.userName || 'Bobby'; - * - * // Dialog #1 - Show simple alert dialog and cache - * // reference to dialog instance - * - * function showAlert() { - * alert = $mdDialog.alert() - * .title('Attention, ' + $scope.userName) - * .content('This is an example of how easy dialogs can be!') - * .ok('Close'); - * - * $mdDialog - * .show( alert ) - * .finally(function() { - * alert = undefined; - * }); - * } - * - * // Close the specified dialog instance and resolve with 'finished' flag - * // Normally this is not needed, just use '$mdDialog.hide()' to close - * // the most recent dialog popup. - * - * function closeAlert() { - * $mdDialog.hide( alert, "finished" ); - * alert = undefined; - * } - * - * // Dialog #2 - Demonstrate more complex dialogs construction and popup. - * - * function showCustomGreeting($event) { - * $mdDialog.show({ - * targetEvent: $event, - * template: - * '' + - * - * ' Hello {{ employee }}!' + - * - * '
' + - * ' ' + - * ' Close Greeting' + - * - * ' ' + - * '
' + - * '
', - * controller: 'GreetingController', - * onComplete: afterShowAnimation, - * locals: { employee: $scope.userName } - * }); - * - * // When the 'enter' animation finishes... - * - * function afterShowAnimation(scope, element, options) { - * // post-show code here: DOM element focus, etc. - * } - * } - * } - * - * // Greeting controller used with the more complex 'showCustomGreeting()' custom dialog - * - * function GreetingController($scope, $mdDialog, employee) { - * // Assigned from construction locals options... - * $scope.employee = employee; - * - * $scope.closeDialog = function() { - * // Easily hides most recent dialog shown... - * // no specific instance reference is needed. - * $mdDialog.hide(); - * }; - * } - * - * })(angular); - *
- */ - - /** - * @ngdoc method - * @name $mdDialog#alert - * - * @description - * Builds a preconfigured dialog with the specified message. - * - * @returns {obj} an `$mdDialogPreset` with the chainable configuration methods: - * - * - $mdDialogPreset#title(string) - sets title to string - * - $mdDialogPreset#content(string) - sets content / message to string - * - $mdDialogPreset#ok(string) - sets okay button text to string - * - */ - - /** - * @ngdoc method - * @name $mdDialog#confirm - * - * @description - * Builds a preconfigured dialog with the specified message. You can call show and the promise returned - * will be resolved only if the user clicks the confirm action on the dialog. - * - * @returns {obj} an `$mdDialogPreset` with the chainable configuration methods: - * - * Additionally, it supports the following methods: - * - * - $mdDialogPreset#title(string) - sets title to string - * - $mdDialogPreset#content(string) - sets content / message to string - * - $mdDialogPreset#ok(string) - sets okay button text to string - * - $mdDialogPreset#cancel(string) - sets cancel button text to string - * - */ - -/** - * @ngdoc method - * @name $mdDialog#show - * - * @description - * Show a dialog with the specified options. - * - * @param {object} optionsOrPreset Either provide an `$mdDialogPreset` returned from `alert()`, - * `confirm()` or an options object with the following properties: - * - `templateUrl` - `{string=}`: The url of a template that will be used as the content - * of the dialog. - * - `template` - `{string=}`: Same as templateUrl, except this is an actual template string. - * - `targetEvent` - `{DOMClickEvent=}`: A click's event object. When passed in as an option, - * the location of the click will be used as the starting point for the opening animation - * of the the dialog. - * - `disableParentScroll` - `{boolean=}`: Whether to disable scrolling while the dialog is open. - * Default true. - * - `hasBackdrop` - `{boolean=}`: Whether there should be an opaque backdrop behind the dialog. - * Default true. - * - `clickOutsideToClose` - `{boolean=}`: Whether the user can click outside the dialog to - * close it. Default true. - * - `escapeToClose` - `{boolean=}`: Whether the user can press escape to close the dialog. - * Default true. - * - `controller` - `{string=}`: The controller to associate with the dialog. The controller - * will be injected with the local `$hideDialog`, which is a function used to hide the dialog. - * - `locals` - `{object=}`: An object containing key/value pairs. The keys will be used as names - * of values to inject into the controller. For example, `locals: {three: 3}` would inject - * `three` into the controller, with the value 3. If `bindToController` is true, they will be - * copied to the controller instead. - * - `bindToController` - `bool`: bind the locals to the controller, instead of passing them in - * - `resolve` - `{object=}`: Similar to locals, except it takes promises as values, and the - * dialog will not open until all of the promises resolve. - * - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope. - * - `parent` - `{element=}`: The element to append the dialog to. Defaults to appending - * to the root element of the application. - * - `onComplete` `{function=}`: Callback function used to announce when the show() action is - * finished. - * - * @returns {promise} A promise that can be resolved with `$mdDialog.hide()` or - * rejected with `mdDialog.cancel()`. - */ - -/** - * @ngdoc method - * @name $mdDialog#hide - * - * @description - * Hide an existing dialog and resolve the promise returned from `$mdDialog.show()`. - * - * @param {*=} response An argument for the resolved promise. - */ - -/** - * @ngdoc method - * @name $mdDialog#cancel - * - * @description - * Hide an existing dialog and reject the promise returned from `$mdDialog.show()`. - * - * @param {*=} response An argument for the rejected promise. - */ - -function MdDialogProvider($$interimElementProvider) { - - var alertDialogMethods = ['title', 'content', 'ariaLabel', 'ok']; - - return $$interimElementProvider('$mdDialog') - .setDefaults({ - methods: ['disableParentScroll', 'hasBackdrop', 'clickOutsideToClose', 'escapeToClose', 'targetEvent'], - options: dialogDefaultOptions - }) - .addPreset('alert', { - methods: ['title', 'content', 'ariaLabel', 'ok'], - options: advancedDialogOptions - }) - .addPreset('confirm', { - methods: ['title', 'content', 'ariaLabel', 'ok', 'cancel'], - options: advancedDialogOptions - }); - - /* @ngInject */ - function advancedDialogOptions($mdDialog) { - return { - template: [ - '', - '', - '

{{ dialog.title }}

', - '

{{ dialog.content }}

', - '
', - '
', - '', - '{{ dialog.cancel }}', - '', - '', - '{{ dialog.ok }}', - '', - '
', - '
' - ].join(''), - controller: function mdDialogCtrl() { - this.hide = function() { - $mdDialog.hide(true); - }; - this.abort = function() { - $mdDialog.cancel(); - }; - }, - controllerAs: 'dialog', - bindToController: true - }; - } - - /* @ngInject */ - function dialogDefaultOptions($timeout, $rootElement, $compile, $animate, $mdAria, $document, - $mdUtil, $mdConstant, $mdTheming, $$rAF, $q, $mdDialog) { - return { - hasBackdrop: true, - isolateScope: true, - onShow: onShow, - onRemove: onRemove, - clickOutsideToClose: true, - escapeToClose: true, - targetEvent: null, - disableParentScroll: true, - transformTemplate: function(template) { - return '
' + template + '
'; - } - }; - - - // On show method for dialogs - function onShow(scope, element, options) { - // Incase the user provides a raw dom element, always wrap it in jqLite - options.parent = angular.element(options.parent); - - options.popInTarget = angular.element((options.targetEvent || {}).target); - var closeButton = findCloseButton(); - - configureAria(element.find('md-dialog')); - - if (options.hasBackdrop) { - options.backdrop = angular.element(''); - $mdTheming.inherit(options.backdrop, options.parent); - $animate.enter(options.backdrop, options.parent); - } - - if (options.disableParentScroll) { - options.oldOverflowStyle = options.parent.css('overflow'); - options.parent.css('overflow', 'hidden'); - } - - return dialogPopIn( - element, - options.parent, - options.popInTarget && options.popInTarget.length && options.popInTarget - ) - .then(function() { - if (options.escapeToClose) { - options.rootElementKeyupCallback = function(e) { - if (e.keyCode === $mdConstant.KEY_CODE.ESCAPE) { - $timeout($mdDialog.cancel); - } - }; - $rootElement.on('keyup', options.rootElementKeyupCallback); - } - - if (options.clickOutsideToClose) { - options.dialogClickOutsideCallback = function(e) { - // Only close if we click the flex container outside the backdrop - if (e.target === element[0]) { - $timeout($mdDialog.cancel); - } - }; - element.on('click', options.dialogClickOutsideCallback); - } - closeButton.focus(); - }); - - - function findCloseButton() { - //If no element with class dialog-close, try to find the last - //button child in md-actions and assume it is a close button - var closeButton = element[0].querySelector('.dialog-close'); - if (!closeButton) { - var actionButtons = element[0].querySelectorAll('.md-actions button'); - closeButton = actionButtons[ actionButtons.length - 1 ]; - } - return angular.element(closeButton); - } - - } - - // On remove function for all dialogs - function onRemove(scope, element, options) { - - if (options.backdrop) { - $animate.leave(options.backdrop); - } - if (options.disableParentScroll) { - options.parent.css('overflow', options.oldOverflowStyle); - $document[0].removeEventListener('scroll', options.captureScroll, true); - } - if (options.escapeToClose) { - $rootElement.off('keyup', options.rootElementKeyupCallback); - } - if (options.clickOutsideToClose) { - element.off('click', options.dialogClickOutsideCallback); - } - return dialogPopOut( - element, - options.parent, - options.popInTarget && options.popInTarget.length && options.popInTarget - ).then(function() { - options.scope.$destroy(); - element.remove(); - options.popInTarget && options.popInTarget.focus(); - }); - - } - - /** - * Inject ARIA-specific attributes appropriate for Dialogs - */ - function configureAria(element) { - element.attr({ - 'role': 'dialog' - }); - - var dialogContent = element.find('md-content'); - if (dialogContent.length === 0){ - dialogContent = element; - } - $mdAria.expectAsync(element, 'aria-label', function() { - var words = dialogContent.text().split(/\s+/); - if (words.length > 3) words = words.slice(0,3).concat('...'); - return words.join(' '); - }); - } - - function dialogPopIn(container, parentElement, clickElement) { - var dialogEl = container.find('md-dialog'); - - parentElement.append(container); - transformToClickElement(dialogEl, clickElement); - - $$rAF(function() { - dialogEl.addClass('transition-in') - .css($mdConstant.CSS.TRANSFORM, ''); - }); - - return dialogTransitionEnd(dialogEl); - } - - function dialogPopOut(container, parentElement, clickElement) { - var dialogEl = container.find('md-dialog'); - - dialogEl.addClass('transition-out').removeClass('transition-in'); - transformToClickElement(dialogEl, clickElement); - - return dialogTransitionEnd(dialogEl); - } - - function transformToClickElement(dialogEl, clickElement) { - if (clickElement) { - var clickRect = clickElement[0].getBoundingClientRect(); - var dialogRect = dialogEl[0].getBoundingClientRect(); - - var scaleX = Math.min(0.5, clickRect.width / dialogRect.width); - var scaleY = Math.min(0.5, clickRect.height / dialogRect.height); - - dialogEl.css($mdConstant.CSS.TRANSFORM, 'translate3d(' + - (-dialogRect.left + clickRect.left + clickRect.width/2 - dialogRect.width/2) + 'px,' + - (-dialogRect.top + clickRect.top + clickRect.height/2 - dialogRect.height/2) + 'px,' + - '0) scale(' + scaleX + ',' + scaleY + ')' - ); - } - } - - function dialogTransitionEnd(dialogEl) { - var deferred = $q.defer(); - dialogEl.on($mdConstant.CSS.TRANSITIONEND, finished); - function finished(ev) { - //Make sure this transitionend didn't bubble up from a child - if (ev.target === dialogEl[0]) { - dialogEl.off($mdConstant.CSS.TRANSITIONEND, finished); - deferred.resolve(); - } - } - return deferred.promise; - } - - } -} - -})(); diff --git a/UI/WebServerResources/scss/components/dialog/dialog.spec.js b/UI/WebServerResources/scss/components/dialog/dialog.spec.js deleted file mode 100644 index d000bc045..000000000 --- a/UI/WebServerResources/scss/components/dialog/dialog.spec.js +++ /dev/null @@ -1,479 +0,0 @@ -describe('$mdDialog', function() { - - beforeEach(TestUtil.mockRaf); - beforeEach(module('material.components.dialog', 'ngAnimateMock')); - - beforeEach(inject(function spyOnMdEffects($$q, $animate) { - spyOn($animate, 'leave').andCallFake(function(element) { - element.remove(); - return $$q.when(); - }); - spyOn($animate, 'enter').andCallFake(function(element, parent) { - parent.append(element); - return $$q.when(); - }); - })); - - describe('#alert()', function() { - hasConfigurationMethods('alert', [ - 'title', 'content', 'ariaLabel', - 'ok', 'targetEvent' - ]); - - it('shows a basic alert dialog', inject(function($animate, $rootScope, $mdDialog, $mdConstant) { - var parent = angular.element('
'); - var resolved = false; - $mdDialog.show( - $mdDialog.alert({ - parent: parent - }) - .title('Title') - .content('Hello world') - .ok('Next') - ).then(function() { - resolved = true; - }); - - $rootScope.$apply(); - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - container.triggerHandler('transitionend'); - $rootScope.$apply(); - - var title = angular.element(parent[0].querySelector('h2')); - expect(title.text()).toBe('Title'); - var content = parent.find('p'); - expect(content.text()).toBe('Hello world'); - var buttons = parent.find('md-button'); - expect(buttons.length).toBe(1); - expect(buttons.eq(0).text()).toBe('Next'); - buttons.eq(0).triggerHandler('click'); - $rootScope.$apply(); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - expect(parent.find('h2').length).toBe(0); - expect(resolved).toBe(true); - })); - }); - - describe('#confirm()', function() { - hasConfigurationMethods('confirm', [ - 'title', 'content', 'ariaLabel', - 'ok', 'cancel', 'targetEvent' - ]); - - it('shows a basic confirm dialog', inject(function($rootScope, $mdDialog, $animate, $mdConstant) { - var parent = angular.element('
'); - var rejected = false; - $mdDialog.show( - $mdDialog.confirm({ - parent: parent - }) - .title('Title') - .content('Hello world') - .ok('Next') - .cancel('Forget it') - ).catch(function() { - rejected = true; - }); - - $rootScope.$apply(); - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - container.triggerHandler('transitionend'); - $rootScope.$apply(); - - var title = parent.find('h2'); - expect(title.text()).toBe('Title'); - var content = parent.find('p'); - expect(content.text()).toBe('Hello world'); - var buttons = parent.find('md-button'); - expect(buttons.length).toBe(2); - expect(buttons.eq(0).text()).toBe('Next'); - expect(buttons.eq(1).text()).toBe('Forget it'); - buttons.eq(1).triggerHandler('click'); - $rootScope.$digest(); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - expect(parent.find('h2').length).toBe(0); - expect(rejected).toBe(true); - })); - }); - - describe('#build()', function() { - it('should support onComplete callbacks within `show()`', inject(function($mdDialog, $rootScope, $timeout, $mdConstant) { - - var template = 'Hello'; - var parent = angular.element('
'); - var ready = false; - - $mdDialog.show({ - template: template, - parent: parent, - onComplete: function(scope, element, options) { - expect( arguments.length ).toEqual( 3 ); - ready = true; - } - }); - $rootScope.$apply(); - - expect(ready).toBe( false ); - - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - - container = angular.element(parent[0].querySelector('.md-dialog-container')); - expect(container.length).toBe(1); - expect(ready).toBe( true ); - })); - - it('should append dialog with container', inject(function($mdDialog, $rootScope) { - - var template = 'Hello'; - var parent = angular.element('
'); - - $mdDialog.show({ - template: template, - parent: parent - }); - - $rootScope.$apply(); - - var container = parent[0].querySelectorAll('.md-dialog-container'); - expect(container.length).toBe(1); - })); - - it('should escapeToClose == true', inject(function($mdDialog, $rootScope, $rootElement, $timeout, $animate, $mdConstant) { - var parent = angular.element('
'); - $mdDialog.show({ - template: '', - parent: parent, - escapeToClose: true - }); - $rootScope.$apply(); - - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - - expect(parent.find('md-dialog').length).toBe(1); - - $rootElement.triggerHandler({type: 'keyup', - keyCode: $mdConstant.KEY_CODE.ESCAPE - }); - - $timeout.flush(); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - expect(parent.find('md-dialog').length).toBe(0); - })); - - it('should escapeToClose == false', inject(function($mdDialog, $rootScope, $rootElement, $timeout, $animate, $mdConstant) { - var parent = angular.element('
'); - $mdDialog.show({ - template: '', - parent: parent, - escapeToClose: false - }); - $rootScope.$apply(); - - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - container.triggerHandler('transitionend'); - $rootScope.$apply(); - - expect(parent.find('md-dialog').length).toBe(1); - - $rootElement.triggerHandler({ type: 'keyup', keyCode: $mdConstant.KEY_CODE.ESCAPE }); - - $timeout.flush(); - $animate.triggerCallbacks(); - expect(parent.find('md-dialog').length).toBe(1); - })); - - it('should clickOutsideToClose == true', inject(function($mdDialog, $rootScope, $timeout, $animate, $mdConstant) { - - var parent = angular.element('
'); - $mdDialog.show({ - template: '', - parent: parent, - clickOutsideToClose: true - }); - $rootScope.$apply(); - - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - - expect(parent.find('md-dialog').length).toBe(1); - - container.triggerHandler({ - type: 'click', - target: container[0] - }); - $timeout.flush(); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - - expect(parent.find('md-dialog').length).toBe(0); - })); - - it('should clickOutsideToClose == false', inject(function($mdDialog, $rootScope, $timeout, $animate) { - - var parent = angular.element('
'); - $mdDialog.show({ - template: '', - parent: parent, - clickOutsideToClose: false - }); - - $rootScope.$apply(); - expect(parent.find('md-dialog').length).toBe(1); - - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - - container.triggerHandler('click'); - $timeout.flush(); - $animate.triggerCallbacks(); - - expect(parent[0].querySelectorAll('md-dialog').length).toBe(1); - })); - - it('should disableParentScroll == true', inject(function($mdDialog, $animate, $rootScope) { - var parent = angular.element('
'); - $mdDialog.show({ - template: '', - parent: parent, - disableParentScroll: true - }); - $rootScope.$apply(); - $animate.triggerCallbacks(); - $rootScope.$apply(); - expect(parent.css('overflow')).toBe('hidden'); - })); - - it('should hasBackdrop == true', inject(function($mdDialog, $animate, $rootScope) { - var parent = angular.element('
'); - $mdDialog.show({ - template: '', - parent: parent, - hasBackdrop: true - }); - - $rootScope.$apply(); - $animate.triggerCallbacks(); - $rootScope.$apply(); - expect(parent.find('md-dialog').length).toBe(1); - expect(parent.find('md-backdrop').length).toBe(1); - })); - - it('should hasBackdrop == false', inject(function($mdDialog, $rootScope) { - var parent = angular.element('
'); - $mdDialog.show({ - template: '', - parent: parent, - hasBackdrop: false - }); - - $rootScope.$apply(); - expect(parent[0].querySelectorAll('md-dialog').length).toBe(1); - expect(parent[0].querySelectorAll('md-backdrop').length).toBe(0); - })); - - it('should focus `md-button.dialog-close` on open', inject(function($mdDialog, $rootScope, $document, $timeout, $mdConstant) { - TestUtil.mockElementFocus(this); - - var parent = angular.element('
'); - $mdDialog.show({ - template: - '' + - '
' + - '' + - '
' + - '
', - parent: parent - }); - - $rootScope.$apply(); - $timeout.flush(); - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - container.triggerHandler('transitionend'); - $rootScope.$apply(); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - - - expect($document.activeElement).toBe(parent[0].querySelector('.dialog-close')); - })); - - it('should focus the last `md-button` in md-actions open if no `.dialog-close`', inject(function($mdDialog, $rootScope, $document, $timeout, $mdConstant) { - TestUtil.mockElementFocus(this); - - var parent = angular.element('
'); - $mdDialog.show({ - template: - '' + - '
' + - '
' + - '
', - parent: parent - }); - - $rootScope.$apply(); - $timeout.flush(); - - var container = angular.element(parent[0].querySelector('.md-dialog-container')); - container.triggerHandler('transitionend'); - $rootScope.$apply(); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - - expect($document.activeElement).toBe(parent[0].querySelector('#focus-target')); - })); - - it('should only allow one open at a time', inject(function($mdDialog, $rootScope) { - var parent = angular.element('
'); - $mdDialog.show({ - template: '', - parent: parent - }); - - $rootScope.$apply(); - expect(parent[0].querySelectorAll('md-dialog.one').length).toBe(1); - expect(parent[0].querySelectorAll('md-dialog.two').length).toBe(0); - - $mdDialog.show({ - template: '', - parent: parent - }); - - $rootScope.$apply(); - parent.find('md-dialog').triggerHandler('transitionend'); - $rootScope.$apply(); - expect(parent[0].querySelectorAll('md-dialog.one').length).toBe(0); - expect(parent[0].querySelectorAll('md-dialog.two').length).toBe(1); - })); - - it('should have the dialog role', inject(function($mdDialog, $rootScope) { - var template = 'Hello'; - var parent = angular.element('
'); - - $mdDialog.show({ - template: template, - parent: parent - }); - - $rootScope.$apply(); - - var dialog = angular.element(parent[0].querySelectorAll('md-dialog')); - expect(dialog.attr('role')).toBe('dialog'); - })); - - it('should create an ARIA label if one is missing', inject(function($mdDialog, $rootScope) { - var template = 'Hello'; - var parent = angular.element('
'); - - $mdDialog.show({ - template: template, - parent: parent - }); - - $rootScope.$apply(); - angular.element(parent[0].querySelector('.md-dialog-container')).triggerHandler('transitionend'); - $rootScope.$apply(); - - var dialog = angular.element(parent[0].querySelector('md-dialog')); - expect(dialog.attr('aria-label')).toEqual(dialog.text()); - })); - - it('should not modify an existing ARIA label', inject(function($mdDialog, $rootScope){ - var template = 'Hello'; - var parent = angular.element('
'); - - $mdDialog.show({ - template: template, - parent: parent - }); - - $rootScope.$apply(); - - var dialog = angular.element(parent[0].querySelector('md-dialog')); - expect(dialog.attr('aria-label')).not.toEqual(dialog.text()); - expect(dialog.attr('aria-label')).toEqual('Some Other Thing'); - })); - }); - - function hasConfigurationMethods(preset, methods) { - angular.forEach(methods, function(method) { - return it('supports config method #' + method, inject(function($mdDialog) { - var dialog = $mdDialog[preset](); - expect(typeof dialog[method]).toBe('function'); - expect(dialog[method]()).toEqual(dialog); - })); - }); - } -}); - -describe('$mdDialog with custom interpolation symbols', function() { - beforeEach(TestUtil.mockRaf); - beforeEach(module('material.components.dialog', 'ngAnimateMock')); - - beforeEach(module(function($interpolateProvider) { - $interpolateProvider.startSymbol('[[').endSymbol(']]'); - })); - - it('displays #alert() correctly', inject(function($mdDialog, $rootScope) { - var parent = angular.element('
'); - var dialog = $mdDialog. - alert({parent: parent}). - ariaLabel('test alert'). - title('Title'). - content('Hello, world !'). - ok('OK'); - - $mdDialog.show(dialog); - $rootScope.$digest(); - - var mdContainer = angular.element(parent[0].querySelector('.md-dialog-container')); - var mdDialog = mdContainer.find('md-dialog'); - var mdContent = mdDialog.find('md-content'); - var title = mdContent.find('h2'); - var content = mdContent.find('p'); - var mdActions = angular.element(mdDialog[0].querySelector('.md-actions')); - var buttons = mdActions.find('md-button'); - - expect(mdDialog.attr('aria-label')).toBe('test alert'); - expect(title.text()).toBe('Title'); - expect(content.text()).toBe('Hello, world !'); - expect(buttons.eq(0).text()).toBe('OK'); - })); - - it('displays #confirm() correctly', inject(function($mdDialog, $rootScope) { - var parent = angular.element('
'); - var dialog = $mdDialog. - confirm({parent: parent}). - ariaLabel('test alert'). - title('Title'). - content('Hello, world !'). - cancel('CANCEL'). - ok('OK'); - - $mdDialog.show(dialog); - $rootScope.$digest(); - - var mdContainer = angular.element(parent[0].querySelector('.md-dialog-container')); - var mdDialog = mdContainer.find('md-dialog'); - var mdContent = mdDialog.find('md-content'); - var title = mdContent.find('h2'); - var content = mdContent.find('p'); - var mdActions = angular.element(mdDialog[0].querySelector('.md-actions')); - var buttons = mdActions.find('md-button'); - - expect(mdDialog.attr('aria-label')).toBe('test alert'); - expect(title.text()).toBe('Title'); - expect(content.text()).toBe('Hello, world !'); - expect(buttons.eq(0).text()).toBe('CANCEL'); - expect(buttons.eq(1).text()).toBe('OK'); - })); -}); - diff --git a/UI/WebServerResources/scss/components/divider/demoBasicUsage/index.html b/UI/WebServerResources/scss/components/divider/demoBasicUsage/index.html deleted file mode 100644 index fb98459c7..000000000 --- a/UI/WebServerResources/scss/components/divider/demoBasicUsage/index.html +++ /dev/null @@ -1,51 +0,0 @@ -
- - -

- Full Bleed -

-
- - - - - -
-

{{item.what}}

-

{{item.who}}

-

- {{item.notes}} -

-
-
- -
-
-
- - -

- Inset -

-
- - - - - -
- {{item.who}} -
-
-

{{item.what}}

-

{{item.who}}

-

- {{item.notes}} -

-
-
- -
-
-
-
diff --git a/UI/WebServerResources/scss/components/divider/demoBasicUsage/script.js b/UI/WebServerResources/scss/components/divider/demoBasicUsage/script.js deleted file mode 100644 index c10891e46..000000000 --- a/UI/WebServerResources/scss/components/divider/demoBasicUsage/script.js +++ /dev/null @@ -1,34 +0,0 @@ -angular.module('dividerDemo1', ['ngMaterial']) - .controller('AppCtrl', function($scope) { - $scope.messages = [{ - face: '/img/list/60.jpeg', - what: 'Brunch this weekend?', - who: 'Min Li Chan', - when: '3:08PM', - notes: " I'll be in your neighborhood doing errands" - }, { - face: '/img/list/60.jpeg', - what: 'Brunch this weekend?', - who: 'Min Li Chan', - when: '3:08PM', - notes: " I'll be in your neighborhood doing errands" - }, { - face: '/img/list/60.jpeg', - what: 'Brunch this weekend?', - who: 'Min Li Chan', - when: '3:08PM', - notes: " I'll be in your neighborhood doing errands" - }, { - face: '/img/list/60.jpeg', - what: 'Brunch this weekend?', - who: 'Min Li Chan', - when: '3:08PM', - notes: " I'll be in your neighborhood doing errands" - }, { - face: '/img/list/60.jpeg', - what: 'Brunch this weekend?', - who: 'Min Li Chan', - when: '3:08PM', - notes: " I'll be in your neighborhood doing errands" - }]; - }); diff --git a/UI/WebServerResources/scss/components/divider/demoBasicUsage/style.css b/UI/WebServerResources/scss/components/divider/demoBasicUsage/style.css deleted file mode 100644 index 1a93bc1e9..000000000 --- a/UI/WebServerResources/scss/components/divider/demoBasicUsage/style.css +++ /dev/null @@ -1,6 +0,0 @@ -.face { - border-radius: 30px; - border: 1px solid #ddd; - width: 48px; - margin: 16px; -} diff --git a/UI/WebServerResources/scss/components/divider/divider.js b/UI/WebServerResources/scss/components/divider/divider.js deleted file mode 100644 index 676c51498..000000000 --- a/UI/WebServerResources/scss/components/divider/divider.js +++ /dev/null @@ -1,41 +0,0 @@ -(function() { -'use strict'; - -/** - * @ngdoc module - * @name material.components.divider - * @description Divider module! - */ -angular.module('material.components.divider', [ - 'material.core' -]) - .directive('mdDivider', MdDividerDirective); - -function MdDividerController(){} - -/** - * @ngdoc directive - * @name mdDivider - * @module material.components.divider - * @restrict E - * - * @description - * Dividers group and separate content within lists and page layouts using strong visual and spatial distinctions. This divider is a thin rule, lightweight enough to not distract the user from content. - * - * @param {boolean=} md-inset Add this attribute to activate the inset divider style. - * @usage - * - * - * - * - * - * - */ -function MdDividerDirective($mdTheming) { - return { - restrict: 'E', - link: $mdTheming, - controller: [MdDividerController] - }; -} -})(); diff --git a/UI/WebServerResources/scss/components/input/demoBasicUsage/index.html b/UI/WebServerResources/scss/components/input/demoBasicUsage/index.html deleted file mode 100644 index 93466f4b9..000000000 --- a/UI/WebServerResources/scss/components/input/demoBasicUsage/index.html +++ /dev/null @@ -1,58 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
- - - - - - -
- - - - - - - - - - - - -
- - - - - - -
-
diff --git a/UI/WebServerResources/scss/components/input/demoBasicUsage/script.js b/UI/WebServerResources/scss/components/input/demoBasicUsage/script.js deleted file mode 100644 index 514268b79..000000000 --- a/UI/WebServerResources/scss/components/input/demoBasicUsage/script.js +++ /dev/null @@ -1,16 +0,0 @@ -angular.module('inputBasicDemo', ['ngMaterial']) - -.controller('DemoCtrl', function($scope) { - $scope.user = { - title: 'Developer', - email: 'ipsum@lorem.com', - firstName: '', - lastName: '' , - company: 'Google' , - address: '1600 Amphitheatre Pkwy' , - city: 'Mountain View' , - state: 'CA' , - biography: 'Loves kittens, snowboarding, and can type at 130 WPM. And rumor has it she bouldered up Castle Craig!', - postalCode : '94043' - }; -}); diff --git a/UI/WebServerResources/scss/components/input/input.js b/UI/WebServerResources/scss/components/input/input.js deleted file mode 100644 index 6cb2ded2c..000000000 --- a/UI/WebServerResources/scss/components/input/input.js +++ /dev/null @@ -1,189 +0,0 @@ -(function() { - -/** - * @ngdoc module - * @name material.components.input - */ - -angular.module('material.components.input', [ - 'material.core' -]) - .directive('mdInputContainer', mdInputContainerDirective) - .directive('label', labelDirective) - .directive('input', inputTextareaDirective) - .directive('textarea', inputTextareaDirective); - -/** - * @ngdoc directive - * @name mdInputContainer - * @module material.components.input - * - * @restrict E - * - * @description - * `` is the parent of any input or textarea element. - * - * Input and textarea elements will not behave properly unless the md-input-container - * parent is provided. - * - * @usage - * - * - * - * - * - * - * - * - * - * - * - * - * - */ -function mdInputContainerDirective($mdTheming) { - return { - restrict: 'E', - link: postLink, - controller: ContainerCtrl - }; - - function postLink(scope, element, attr) { - $mdTheming(element); - } - function ContainerCtrl($scope, $element, $mdUtil) { - var self = this; - - self.setFocused = function(isFocused) { - $element.toggleClass('md-input-focused', !!isFocused); - }; - self.setHasValue = function(hasValue) { - $element.toggleClass('md-input-has-value', !!hasValue); - }; - - $scope.$watch(function() { - return self.label && self.input; - }, function(hasLabelAndInput) { - if (hasLabelAndInput && !self.label.attr('for')) { - self.label.attr('for', self.input.attr('id')); - } - }); - } -} - -function labelDirective() { - return { - restrict: 'E', - require: '^?mdInputContainer', - link: function(scope, element, attr, containerCtrl) { - if (!containerCtrl) return; - - containerCtrl.label = element; - scope.$on('$destroy', function() { - containerCtrl.label = null; - }); - } - }; -} - -function inputTextareaDirective($mdUtil, $window) { - return { - restrict: 'E', - require: ['^?mdInputContainer', '?ngModel'], - compile: compile, - }; - - function compile(element) { - element.addClass('md-input'); - return postLink; - } - function postLink(scope, element, attr, ctrls) { - - var containerCtrl = ctrls[0]; - var ngModelCtrl = ctrls[1]; - - if ( !containerCtrl ) return; - - if (element[0].tagName.toLowerCase() === 'textarea') { - setupTextarea(); - } - - if (containerCtrl.input) { - throw new Error(" can only have *one* or