diff --git a/Makefile b/Makefile index 86b99966..2f14d51b 100644 --- a/Makefile +++ b/Makefile @@ -185,7 +185,6 @@ appstore: --exclude=/js/vendor/angular-ui-select/composer.json \ --exclude=/js/vendor/angular-ui-select/deploy-docs.sh \ --exclude=/js/vendor/jstzdetect/jstz.js \ - --exclude=/js/vendor/davclient.js/index.html \ --exclude=/js/vendor/ical.js/build/benchmark \ --exclude=/js/vendor/ical.js/lib \ --exclude=/js/vendor/ical.js/samples \ diff --git a/js/Gruntfile.js b/js/Gruntfile.js index 4e921456..f0d34e0a 100644 --- a/js/Gruntfile.js +++ b/js/Gruntfile.js @@ -26,7 +26,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-wrap'); - grunt.loadNpmTasks('grunt-karma'); + // grunt.loadNpmTasks('grunt-karma'); grunt.initConfig({ meta: { @@ -93,8 +93,8 @@ module.exports = function(grunt) { } } }); - grunt.registerTask('ci', ['karma:continuous']); - grunt.registerTask('js', ['concat', 'wrap']); + // grunt.registerTask('ci', ['karma:continuous']); + grunt.registerTask('js', ['concat']); grunt.registerTask('default', 'js'); - grunt.registerTask('build', ['concat', 'wrap']); + grunt.registerTask('build', ['concat']); }; diff --git a/js/app/services/request.js b/js/app/services/request.js index 3cfd0388..6e195b3c 100644 --- a/js/app/services/request.js +++ b/js/app/services/request.js @@ -63,18 +63,18 @@ angular.module('Tasks').factory('Request', [ if (defaultConfig.method === 'GET') { defaultConfig.params = defaultConfig.data; } - return this.$http(defaultConfig).success((function(_this) { - return function(data, status, headers, config) { + return this.$http(defaultConfig).then((function(_this) { + return function(response) { var name, ref, value; - ref = data.data; + ref = response.data.data; for (name in ref) { value = ref[name]; _this.publisher.publishDataTo(value, name); } - return defaultData.onSuccess(data, status, headers, config); + return defaultData.onSuccess(response.data, response.status, response.headers, response.config); }; - })(this)).error(function(data, status, headers, config) { - return defaultData.onFailure(data, status, headers, config); + })(this)).catch(function(response) { + return defaultData.onFailure(response.data, response.status, response.headers, response.config); }); }; diff --git a/js/bower.json b/js/bower.json index c536500d..5f710db4 100644 --- a/js/bower.json +++ b/js/bower.json @@ -6,12 +6,11 @@ "angular-route": "1.5.5", "angular-animate": "1.5.5", "angular-sanitize": "1.5.5", - "angular-ui-select": "https://github.com/angular-ui/ui-select.git#v0.17.0", - "angular-draganddrop": "https://github.com/marceljuenemann/angular-drag-and-drop-lists.git#v1.4.0", + "angular-ui-select": "https://github.com/angular-ui/ui-select.git#v0.19.8", + "angular-draganddrop": "https://github.com/marceljuenemann/angular-drag-and-drop-lists.git#v2.1.0", "jquery-timepicker": "", - "ical.js": "~1.1.2", - "jstzdetect": "", - "davclient.js": "https://github.com/evert/davclient.js.git" + "ical.js": "~1.2.2", + "jstzdetect": "" }, "devDependencies": {}, "homepage": "https://github.com/nextcloud/tasks", diff --git a/js/public/app.js b/js/public/app.js index 7bfe170f..554cf092 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -1,4 +1,3 @@ - /** * Nextcloud - Tasks - v0.9.5 * @@ -4652,18 +4651,18 @@ angular.module('Tasks').factory('Request', [ if (defaultConfig.method === 'GET') { defaultConfig.params = defaultConfig.data; } - return this.$http(defaultConfig).success((function(_this) { - return function(data, status, headers, config) { + return this.$http(defaultConfig).then((function(_this) { + return function(response) { var name, ref, value; - ref = data.data; + ref = response.data.data; for (name in ref) { value = ref[name]; _this.publisher.publishDataTo(value, name); } - return defaultData.onSuccess(data, status, headers, config); + return defaultData.onSuccess(response.data, response.status, response.headers, response.config); }; - })(this)).error(function(data, status, headers, config) { - return defaultData.onFailure(data, status, headers, config); + })(this)).catch(function(response) { + return defaultData.onFailure(response.data, response.status, response.headers, response.config); }); }; @@ -4945,4 +4944,3 @@ angular.module('Tasks').service('VTodoService', ['DavClient', 'RandomStringServi // }; }]); - diff --git a/js/vendor/angular-draganddrop/.bower.json b/js/vendor/angular-draganddrop/.bower.json index c934a097..cdcf14da 100644 --- a/js/vendor/angular-draganddrop/.bower.json +++ b/js/vendor/angular-draganddrop/.bower.json @@ -1,10 +1,10 @@ { "name": "angular-drag-and-drop-lists", "main": "angular-drag-and-drop-lists.js", - "version": "1.4.0", + "version": "2.1.0", "homepage": "https://github.com/marceljuenemann/angular-drag-and-drop-lists", "authors": [ - "Marcel Juenemann " + "Marcel Juenemann " ], "description": "Angular directives for sorting nested lists using the HTML5 Drag & Drop API", "keywords": [ @@ -27,13 +27,13 @@ "test", "tests" ], - "_release": "1.4.0", + "_release": "2.1.0", "_resolution": { "type": "version", - "tag": "v1.4.0", - "commit": "141e13919b30578ed53d079bdd269fb99b20f78f" + "tag": "2.1.0", + "commit": "7e98e194a8d66fa735bf6dc7c3e39886287b914e" }, "_source": "https://github.com/marceljuenemann/angular-drag-and-drop-lists.git", - "_target": "v1.4.0", + "_target": "v2.1.0", "_originalSource": "https://github.com/marceljuenemann/angular-drag-and-drop-lists.git" } \ No newline at end of file diff --git a/js/vendor/angular-draganddrop/CHANGELOG.md b/js/vendor/angular-draganddrop/CHANGELOG.md index f5c9fdc6..20782166 100644 --- a/js/vendor/angular-draganddrop/CHANGELOG.md +++ b/js/vendor/angular-draganddrop/CHANGELOG.md @@ -1,3 +1,42 @@ +# 2.1.0 (2017-01-15) + +## Changes + +- **Custom callbacks with dnd-callback**: The new `dnd-callback` attribute allows for communication between the source and target scopes. For example, this can be used to access information about the object being dragged during dragover, or to transfer objects without serialization, which allows to use complex objects that contain functions references and prototypes. [Demo](https://jsfiddle.net/Ldxffyod/1/) +- **Drop effects fixed and extended**: Most of the bugs around drop effect have been fixed. You can now use move, copy and link, or a combination of them. Drop effects can be restricted using `dnd-effect-allowed` on both the source and target element, and if there are multiple options, the user can choose one using modifier keys (Ctrl or Alt). See the [design document](https://github.com/marceljuenemann/angular-drag-and-drop-lists/wiki/Drop-Effects-Design) for more details. Drop effects don't work on IE9. They do work accross browser tabs if `dnd-external-sources` is activated, although the source restrictions are lost in Safari and IE. +- **New dragleave handler**: Previously, the dragleave handler used a timeout to determine whether the placeholder needs to be removed from a `dnd-list`. The new implementation utilizes `document.elementFromPoint` to determine whether the mouse cursor is outside the target list. +- **Remove dndDraggingSource without timeout**: Fixes problems with ngAnimate (#121). + +## Tested browsers + +- Chrome 55 (Mac, Ubuntu & Windows 7) +- Firefox 50 (Ubuntu) +- Safari 10 (MacOS) +- Microsoft Edge 20 (Windows 10 emulator) +- Internet Explorer 11 (Windows 7) +- Internet Explorer 9 (Windows 7 emulator) + + +# 2.0.0 (2016-12-25) + +## Changes + +There have been some major changes to how the directive works internally, although these changes should not affect users of the library. + +- **Simpler placeholder positioning algorithm**: The logic for placeholder positiong is unchanged, i.e. the placeholder will be placed after an element if the mouse cursor is in the second half of the element it is hovering over, otherwise it is placed before it. However, the implementation of this algorithm was massively simplified by using `getBoundingClientRect`. As a result, developers are no longer required to have `position: relative` on the list and list item elements. +- **New dataTransfer algorithm**: The directive now uses custom mime types in modern browsers, and falls back to using `Text` in non-standard comform browsers. As a result, dragged elements can no longer be dropped into arbitrary input fields. More details on how this works can be found in the [design document](https://github.com/marceljuenemann/angular-drag-and-drop-lists/wiki/Data-Transfer-Design). **Breaking change:** As mime types are used, all dnd-type attributes are automatically converted to lower case. +- **Internal test infrastructure**: The mocks used for drag and drop events in unit tests are now much nicer. + +## Tested browsers + +- Chrome 55 (Mac, Ubuntu & Windows 10) +- Firefox 50 (Ubuntu) +- Safari 10 (Mac) +- Microsoft Edge 20 (Windows 10) +- Internet Explorer 11 (Windows 10) +- Internet Explorer 9 (Windows Vista) + + # 1.4.0 (2016-02-06) ## Features @@ -98,7 +137,7 @@ Initial release - bower.json - package.json - JS files -- Minify and test (npm run-script minify) +- Minify and test (npm run-script minify, check semicolon at EOF) - Test different OS & browsers (npm start) - Update README and CHANGELOG - Merge to master diff --git a/js/vendor/angular-draganddrop/README.md b/js/vendor/angular-draganddrop/README.md index 797ebffc..426f172c 100644 --- a/js/vendor/angular-draganddrop/README.md +++ b/js/vendor/angular-draganddrop/README.md @@ -18,31 +18,27 @@ Internet Explorer 8 or lower is *not supported*, but all modern browsers are (se ## Download & Installation -Download `angular-drag-and-drop-lists.js` (or the minified version) and include it in your application. If you use bower, you can of course just add it via bower. Add the `dndLists` module as dependency to your angular app. +* Download `angular-drag-and-drop-lists.js` (or the minified version) and include it in your application. If you use bower or npm, just include the `angular-drag-and-drop-lists` package. +* Add the `dndLists` module as a dependency to your angular app. ## dnd-draggable directive Use the dnd-draggable directive to make your element draggable **Attributes** * `dnd-draggable` Required attribute. The value has to be an object that represents the data of the element. In case of a drag and drop operation the object will be serialized and unserialized on the receiving end. -* `dnd-effect-allowed` Use this attribute to limit the operations that can be performed. Options are: - * `move` The drag operation will move the element. This is the default - * `copy` The drag operation will copy the element. There will be a copy cursor. - * `copyMove` The user can choose between copy and move by pressing the ctrl or shift key. - * *Not supported in IE:* In Internet Explorer this option will be the same as `copy`. - * *Not fully supported in Chrome on Windows:* In the Windows version of Chrome the cursor will always be the move cursor. However, when the user drops an element and has the ctrl key pressed, we will perform a copy anyways. - * HTML5 also specifies the `link` option, but this library does not actively support it yet, so use it at your own risk. - * [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) -* `dnd-type` Use this attribute if you have different kinds of items in your application and you want to limit which items can be dropped into which lists. Combine with dnd-allowed-types on the dnd-list(s). This attribute should evaluate to a string, although this restriction is not enforced (at the moment). [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/types) -* `dnd-disable-if` You can use this attribute to dynamically disable the draggability of the element. This is useful if you have certain list items that you don't want to be draggable, or if you want to disable drag & drop completely without having two different code branches (e.g. only allow for admins). *Note*: If your element is not draggable, the user is probably able to select text or images inside of it. Since a selection is always draggable, this breaks your UI. You most likely want to disable user selection via CSS (see [user-select](http://stackoverflow.com/a/4407335)). [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/types) +* `dnd-effect-allowed` Use this attribute to limit the operations that can be performed. Valid options are `move`, `copy` and `link`, as well as `all`, `copyMove`, `copyLink` and `linkMove`, while `move` is the default value. The semantics of these operations are up to you and have to be implemented using the callbacks described below. If you allow multiple options, the user can choose between them by using the modifier keys (OS specific). The cursor will be changed accordingly, expect for IE and Edge, where this is not supported. Note that the implementation of this attribute is very buggy in IE9. This attribute works together with `dnd-external-sources` except on Safari and IE, where the restriction will be lost when dragging accross browser tabs. [Design document](https://github.com/marceljuenemann/angular-drag-and-drop-lists/wiki/Drop-Effects-Design) [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) +* `dnd-type` Use this attribute if you have different kinds of items in your application and you want to limit which items can be dropped into which lists. Combine with dnd-allowed-types on the dnd-list(s). This attribute must be a lower case string. Upper case characters can be used, but will be converted to lower case automatically. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/types) +* `dnd-disable-if` You can use this attribute to dynamically disable the draggability of the element. This is useful if you have certain list items that you don't want to be draggable, or if you want to disable drag & drop completely without having two different code branches (e.g. only allow for admins). [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/types) **Callbacks** +* `dnd-dragstart` Callback that is invoked when the element was dragged. The original dragstart event will be provided in the local `event` variable. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) * `dnd-moved` Callback that is invoked when the element was moved. Usually you will remove your element from the original list in this callback, since the directive is not doing that for you automatically. The original dragend event will be provided in the local `event` variable. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) * `dnd-copied` Same as dnd-moved, just that it is called when the element was copied instead of moved. The original dragend event will be provided in the local `event` variable. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) +* `dnd-linked` Same as dnd-moved, just that it is called when the element was linked instead of moved. The original dragend event will be provided in the local `event` variable. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) * `dnd-canceled` Callback that is invoked if the element was dragged, but the operation was canceled and the element was not dropped. The original dragend event will be provided in the local event variable. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) -* `dnd-dragstart` Callback that is invoked when the element was dragged. The original dragstart event will be provided in the local `event` variable. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) * `dnd-dragend` Callback that is invoked when the drag operation ended. Available local variables are `event` and `dropEffect`. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) * `dnd-selected` Callback that is invoked when the element was clicked but not dragged. The original click event will be provided in the local `event` variable. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/nested) +* `dnd-callback` Custom callback that is passed to dropzone callbacks and can be used to communicate between source and target scopes. The dropzone can pass user defined variables to this callback. This can be used to transfer objects without serialization, see [Demo](https://jsfiddle.net/Ldxffyod/1/). **CSS classes** * `dndDragging` This class will be added to the element while the element is being dragged. It will affect both the element you see while dragging and the source element that stays at it's position. Do not try to hide the source element with this class, because that will abort the drag operation. @@ -50,33 +46,29 @@ Use the dnd-draggable directive to make your element draggable ## dnd-list directive -Use the dnd-list attribute to make your list element a dropzone. Usually you will add a single li element as child with the ng-repeat directive. If you don't do that, we will not be able to position the dropped element correctly. If you want your list to be sortable, also add the dnd-draggable directive to your li element(s). Both the dnd-list and it's direct children must have position: relative CSS style, otherwise the positioning algorithm will not be able to determine the correct placeholder position in all browsers. +Use the dnd-list attribute to make your list element a dropzone. Usually you will add a single li element as child with the ng-repeat directive. If you don't do that, we will not be able to position the dropped element correctly. If you want your list to be sortable, also add the dnd-draggable directive to your li element(s). **Attributes** -* `dnd-list` Required attribute. The value has to be the array in which the data of the dropped element should be inserted. -* `dnd-allowed-types` Optional array of allowed item types. When used, only items that had a matching dnd-type attribute will be dropable. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/types) +* `dnd-list` Required attribute. The value has to be the array in which the data of the dropped element should be inserted. The value can be blank if used with a custom dnd-drop handler that handles the insertion on its own. +* `dnd-allowed-types` Optional array of allowed item types. When used, only items that had a matching dnd-type attribute will be dropable. Upper case characters will automatically be converted to lower case. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/types) +* `dnd-effect-allowed` Optional string expression that limits the drop effects that can be performed on the list. See dnd-effect-allowed on dnd-draggable for more details on allowed options. The default value is `all`. * `dnd-disable-if` Optional boolean expression. When it evaluates to true, no dropping into the list is possible. Note that this also disables rearranging items inside the list. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/types) * `dnd-horizontal-list` Optional boolean expression. When it evaluates to true, the positioning algorithm will use the left and right halfs of the list items instead of the upper and lower halfs. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) -* `dnd-external-sources` Optional boolean expression. When it evaluates to true, the list accepts drops from sources outside of the current browser tab. This allows to drag and drop accross different browser tabs. Note that this will allow to drop arbitrary text into the list, thus it is highly recommended to implement the dnd-drop callback to check the incoming element for sanity. Furthermore, the dnd-type of external sources can not be determined, therefore do not rely on restrictions of dnd-allowed-type. Also note that this feature does not work very well in Internet Explorer. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) +* `dnd-external-sources` Optional boolean expression. When it evaluates to true, the list accepts drops from sources outside of the current browser tab, which allows to drag and drop accross different browser tabs. The only major browser for which this is currently not working is Microsoft Edge. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) **Callbacks** * `dnd-dragover` Optional expression that is invoked when an element is dragged over the list. If the expression is set, but does not return true, the element is not allowed to be dropped. The following variables will be available: * `event` The original dragover event sent by the browser. * `index` The position in the list at which the element would be dropped. - * `type` The `dnd-type` set on the dnd-draggable, or undefined if unset. + * `type` The `dnd-type` set on the dnd-draggable, or undefined if unset. Will be null for drops from external sources in IE and Edge, since we don't know the type in those cases. * `external` Whether the element was dragged from an external source. See `dnd-external-sources`. + * `dropEffect` The dropEffect that is going to be performed, see dnd-effect-allowed. + * `callback` If dnd-callback was set on the source element, this is a function reference to the callback. The callback can be invoked with custom variables like this: `callback({var1: value1, var2: value2})`. The callback will be executed on the scope of the source element. If dnd-external-sources was set and external is true, this callback will not be available. * [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) -* `dnd-drop` Optional expression that is invoked when an element is dropped on the list. - * The following variables will be available: - * `event` The original drop event sent by the browser. - * `index` The position in the list at which the element would be dropped. - * `item` The transferred object. - * `type` The dnd-type set on the dnd-draggable, or undefined if unset. - * `external` Whether the element was dragged from an external source. See `dnd-external-sources`. - * The return value determines the further handling of the drop: - * `false` The drop will be canceled and the element won't be inserted. - * `true` Signalises that the drop is allowed, but the dnd-drop callback will take care of inserting the element. - * Otherwise: All other return values will be treated as the object to insert into the array. In most cases you simply want to return the `item` parameter, but there are no restrictions on what you can return. +* `dnd-drop` Optional expression that is invoked when an element is dropped on the list. The same variables as for dnd-dragover will be available, with the exception that type is always known and therefore never null. There will also be an `item` variable, which is the transferred object. The return value determines the further handling of the drop: + * `falsy` The drop will be canceled and the element won't be inserted. + * `true` Signalises that the drop is allowed, but the dnd-drop callback will take care of inserting the element. + * Otherwise: All other return values will be treated as the object to insert into the array. In most cases you simply want to return the `item` parameter, but there are no restrictions on what you can return. * `dnd-inserted` Optional expression that is invoked after a drop if the element was actually inserted into the list. The same local variables as for `dnd-drop` will be available. Note that for reorderings inside the same list the old element will still be in the list due to the fact that `dnd-moved` was not called yet. [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/advanced) **CSS classes** @@ -99,28 +91,26 @@ Use the `dnd-handle` directive within a `dnd-nodrag` element in order to allow d [Demo](http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/types) -## Required CSS styles -Both the dnd-list and it's children require relative positioning, so that the directive can determine the mouse position relative to the list and thus calculate the correct drop position. - -
-ul[dnd-list], ul[dnd-list] > li {
-    position: relative;
-}
-
+## Recommended CSS styles +It is recommended that you apply the following CSS styles: +* If your application is about moving elements by drag and drop, it is recommended that you hide the source element while dragging, i.e. setting `display: none` on the `.dndDraggingSource` class. +* If your application allows to drop elements into empty lists, you need to ensure that empty lists never have a height or width of zero, e.g. by setting a `min-width`. +* You should style the `.dndPlaceholder` class accordingly. +**Note:** Previous versions of this directive required `postion: relative` on certain elements, but this is no longer required. ## Why another drag & drop library? There are tons of other drag & drop libraries out there, but none of them met my three requirements: -* **Angular:** If you use angular.js, you really don't want to throw a bunch of jQuery into your app. Instead you want to use libraries that were build the "angular way" and support **two-way data binding** to update your data model automatically. +* **Angular:** If you use angular.js, you really don't want to throw a bunch of jQuery into your app. Instead you want to use libraries that were built the "angular way" and support **two-way data binding** to update your data model automatically. * **Nested lists:** If you want to build a **WYSIWYG editor** or have some fancy **tree structure**, the library has to support nested lists. -* **HTML5 drag & drop:** Most drag & drop applications you'll find on the internet use pure JavaScript drag & drop. But with the arrival of HTML5 we can delegate most of the work to the browser. For example: If you want to show the user what he's currently dragging, you'll have to update the position of the element all the time and set it below the mouse pointer. In HTML5 the browser will do that for you! But you can not only save code lines, you can also offer a more **native user experience**: If you click on an element in a pure JavaScript drag & drop implementation, it will usually start the drag operation. But remember what happens when you click an icon on your desktop: The icon will be selected, not dragged! This is the native behaviour you can bring to your web application with HTML5. +* **HTML5 drag & drop:** Most drag & drop applications you'll find on the internet use pure JavaScript drag & drop. But with the arrival of HTML5 we can delegate most of the work to the browser. For example: If you want to show the user what they are currently dragging, you'll have to update the position of the element all the time and set it below the mouse pointer. In HTML5 the browser will do that for you! But you can not only save code lines, you can also offer a more **native user experience**: If you click on an element in a pure JavaScript drag & drop implementation, it will usually start the drag operation. But remember what happens when you click an icon on your desktop: The icon will be selected, not dragged! This is the native behaviour you can bring to your web application with HTML5. If this doesn't fit your requirements, check out one of the other awesome drag & drop libraries: * [angular-ui-tree](https://github.com/JimLiu/angular-ui-tree): Very similar to this library, but does not use the HTML5 API. Therefore you need to write some more markup to see what you are dragging and it will create another DOM node that you have to style. However, if you plan to support touch devices this is probably your best choice. -* [angular-dragdrop](https://github.com/ganarajpr/angular-dragdrop): One of many libraries with the same name. This one uses the HTML5 API, but if you want to build (nested) sortable lists, you're on your own, because it does not calculate the correct element position for you. +* [angular-dragdrop](https://github.com/angular-dragdrop/angular-dragdrop): One of many libraries with the same name. This one uses the HTML5 API, but if you want to build (nested) sortable lists, you're on your own, because it does not calculate the correct element position for you. * [more...](https://www.google.de/search?q=angular+drag+and+drop) @@ -128,7 +118,7 @@ If this doesn't fit your requirements, check out one of the other awesome drag & Copyright (c) 2014 [Marcel Juenemann](mailto:marcel@juenemann.cc) -Copyright (c) 2014-2016 Google Inc. +Copyright (c) 2014-2017 Google Inc. This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google. diff --git a/js/vendor/angular-draganddrop/angular-drag-and-drop-lists.js b/js/vendor/angular-draganddrop/angular-drag-and-drop-lists.js index 4a1f2ecc..8a07ce33 100644 --- a/js/vendor/angular-draganddrop/angular-drag-and-drop-lists.js +++ b/js/vendor/angular-draganddrop/angular-drag-and-drop-lists.js @@ -1,13 +1,23 @@ /** - * angular-drag-and-drop-lists v1.4.0 + * angular-drag-and-drop-lists v2.1.0 * * Copyright (c) 2014 Marcel Juenemann marcel@juenemann.cc - * Copyright (c) 2014-2016 Google Inc. + * Copyright (c) 2014-2017 Google Inc. * https://github.com/marceljuenemann/angular-drag-and-drop-lists * * License: MIT */ -angular.module('dndLists', []) +(function(dndLists) { + + // In standard-compliant browsers we use a custom mime type and also encode the dnd-type in it. + // However, IE and Edge only support a limited number of mime types. The workarounds are described + // in https://github.com/marceljuenemann/angular-drag-and-drop-lists/wiki/Data-Transfer-Design + var MIME_TYPE = 'application/x-dnd'; + var EDGE_MIME_TYPE = 'application/json'; + var MSIE_MIME_TYPE = 'Text'; + + // All valid HTML5 drop effects, in the order in which we prefer to use them. + var ALL_EFFECTS = ['move', 'copy', 'link']; /** * Use the dnd-draggable attribute to make your element draggable @@ -16,45 +26,44 @@ angular.module('dndLists', []) * - dnd-draggable Required attribute. The value has to be an object that represents the data * of the element. In case of a drag and drop operation the object will be * serialized and unserialized on the receiving end. - * - dnd-selected Callback that is invoked when the element was clicked but not dragged. - * The original click event will be provided in the local event variable. - * - dnd-effect-allowed Use this attribute to limit the operations that can be performed. Options: - * - "move": The drag operation will move the element. This is the default. - * - "copy": The drag operation will copy the element. Shows a copy cursor. - * - "copyMove": The user can choose between copy and move by pressing the - * ctrl or shift key. *Not supported in IE:* In Internet Explorer this - * option will be the same as "copy". *Not fully supported in Chrome on - * Windows:* In the Windows version of Chrome the cursor will always be the - * move cursor. However, when the user drops an element and has the ctrl - * key pressed, we will perform a copy anyways. - * - HTML5 also specifies the "link" option, but this library does not - * actively support it yet, so use it at your own risk. - * - dnd-moved Callback that is invoked when the element was moved. Usually you will - * remove your element from the original list in this callback, since the - * directive is not doing that for you automatically. The original dragend - * event will be provided in the local event variable. - * - dnd-canceled Callback that is invoked if the element was dragged, but the operation was - * canceled and the element was not dropped. The original dragend event will - * be provided in the local event variable. - * - dnd-copied Same as dnd-moved, just that it is called when the element was copied - * instead of moved. The original dragend event will be provided in the local - * event variable. - * - dnd-dragstart Callback that is invoked when the element was dragged. The original - * dragstart event will be provided in the local event variable. - * - dnd-dragend Callback that is invoked when the drag operation ended. Available local - * variables are event and dropEffect. + * - dnd-effect-allowed Use this attribute to limit the operations that can be performed. Valid + * options are "move", "copy" and "link", as well as "all", "copyMove", + * "copyLink" and "linkMove". The semantics of these operations are up to you + * and have to be implemented using the callbacks described below. If you + * allow multiple options, the user can choose between them by using the + * modifier keys (OS specific). The cursor will be changed accordingly, + * expect for IE and Edge, where this is not supported. * - dnd-type Use this attribute if you have different kinds of items in your * application and you want to limit which items can be dropped into which * lists. Combine with dnd-allowed-types on the dnd-list(s). This attribute - * should evaluate to a string, although this restriction is not enforced. + * must be a lower case string. Upper case characters can be used, but will + * be converted to lower case automatically. * - dnd-disable-if You can use this attribute to dynamically disable the draggability of the * element. This is useful if you have certain list items that you don't want * to be draggable, or if you want to disable drag & drop completely without * having two different code branches (e.g. only allow for admins). - * **Note**: If your element is not draggable, the user is probably able to - * select text or images inside of it. Since a selection is always draggable, - * this breaks your UI. You most likely want to disable user selection via - * CSS (see user-select). + * + * Callbacks: + * - dnd-dragstart Callback that is invoked when the element was dragged. The original + * dragstart event will be provided in the local event variable. + * - dnd-moved Callback that is invoked when the element was moved. Usually you will + * remove your element from the original list in this callback, since the + * directive is not doing that for you automatically. The original dragend + * event will be provided in the local event variable. + * - dnd-copied Same as dnd-moved, just that it is called when the element was copied + * instead of moved, so you probably want to implement a different logic. + * - dnd-linked Same as dnd-moved, just that it is called when the element was linked + * instead of moved, so you probably want to implement a different logic. + * - dnd-canceled Callback that is invoked if the element was dragged, but the operation was + * canceled and the element was not dropped. The original dragend event will + * be provided in the local event variable. + * - dnd-dragend Callback that is invoked when the drag operation ended. Available local + * variables are event and dropEffect. + * - dnd-selected Callback that is invoked when the element was clicked but not dragged. + * The original click event will be provided in the local event variable. + * - dnd-callback Custom callback that is passed to dropzone callbacks and can be used to + * communicate between source and target scopes. The dropzone can pass user + * defined variables to this callback. * * CSS classes: * - dndDragging This class will be added to the element while the element is being @@ -66,13 +75,12 @@ angular.module('dndLists', []) * it's source position, and not the "element" that the user is dragging with * his mouse pointer. */ - .directive('dndDraggable', ['$parse', '$timeout', 'dndDropEffectWorkaround', 'dndDragTypeWorkaround', - function($parse, $timeout, dndDropEffectWorkaround, dndDragTypeWorkaround) { + dndLists.directive('dndDraggable', ['$parse', '$timeout', function($parse, $timeout) { return function(scope, element, attr) { - // Set the HTML5 draggable attribute on the element + // Set the HTML5 draggable attribute on the element. element.attr("draggable", "true"); - // If the dnd-disable-if attribute is set, we have to watch that + // If the dnd-disable-if attribute is set, we have to watch that. if (attr.dndDisableIf) { scope.$watch(attr.dndDisableIf, function(disabled) { element.attr("draggable", !disabled); @@ -89,31 +97,51 @@ angular.module('dndLists', []) // Check whether the element is draggable, since dragstart might be triggered on a child. if (element.attr('draggable') == 'false') return true; - // Serialize the data associated with this element. IE only supports the Text drag type - event.dataTransfer.setData("Text", angular.toJson(scope.$eval(attr.dndDraggable))); + // Initialize global state. + dndState.isDragging = true; + dndState.itemType = attr.dndType && scope.$eval(attr.dndType).toLowerCase(); - // Only allow actions specified in dnd-effect-allowed attribute - event.dataTransfer.effectAllowed = attr.dndEffectAllowed || "move"; + // Set the allowed drop effects. See below for special IE handling. + dndState.dropEffect = "none"; + dndState.effectAllowed = attr.dndEffectAllowed || ALL_EFFECTS[0]; + event.dataTransfer.effectAllowed = dndState.effectAllowed; - // Add CSS classes. See documentation above + // Internet Explorer and Microsoft Edge don't support custom mime types, see design doc: + // https://github.com/marceljuenemann/angular-drag-and-drop-lists/wiki/Data-Transfer-Design + var item = scope.$eval(attr.dndDraggable); + var mimeType = MIME_TYPE + (dndState.itemType ? ('-' + dndState.itemType) : ''); + try { + event.dataTransfer.setData(mimeType, angular.toJson(item)); + } catch (e) { + // Setting a custom MIME type did not work, we are probably in IE or Edge. + var data = angular.toJson({item: item, type: dndState.itemType}); + try { + event.dataTransfer.setData(EDGE_MIME_TYPE, data); + } catch (e) { + // We are in Internet Explorer and can only use the Text MIME type. Also note that IE + // does not allow changing the cursor in the dragover event, therefore we have to choose + // the one we want to display now by setting effectAllowed. + var effectsAllowed = filterEffects(ALL_EFFECTS, dndState.effectAllowed); + event.dataTransfer.effectAllowed = effectsAllowed[0]; + event.dataTransfer.setData(MSIE_MIME_TYPE, data); + } + } + + // Add CSS classes. See documentation above. element.addClass("dndDragging"); $timeout(function() { element.addClass("dndDraggingSource"); }, 0); - // Workarounds for stupid browsers, see description below - dndDropEffectWorkaround.dropEffect = "none"; - dndDragTypeWorkaround.isDragging = true; - - // Save type of item in global state. Usually, this would go into the dataTransfer - // typename, but we have to use "Text" there to support IE - dndDragTypeWorkaround.dragType = attr.dndType ? scope.$eval(attr.dndType) : undefined; - // Try setting a proper drag image if triggered on a dnd-handle (won't work in IE). if (event._dndHandle && event.dataTransfer.setDragImage) { event.dataTransfer.setDragImage(element[0], 0, 0); } - // Invoke callback + // Invoke dragstart callback and prepare extra callback for dropzone. $parse(attr.dndDragstart)(scope, {event: event}); + if (attr.dndCallback) { + var callback = $parse(attr.dndCallback); + dndState.callback = function(params) { return callback(scope, params || {}); }; + } event.stopPropagation(); }); @@ -130,27 +158,22 @@ angular.module('dndLists', []) // the used effect, but Chrome has not implemented that field correctly. On Windows // it always sets it to 'none', while Chrome on Linux sometimes sets it to something // else when it's supposed to send 'none' (drag operation aborted). - var dropEffect = dndDropEffectWorkaround.dropEffect; scope.$apply(function() { - switch (dropEffect) { - case "move": - $parse(attr.dndMoved)(scope, {event: event}); - break; - case "copy": - $parse(attr.dndCopied)(scope, {event: event}); - break; - case "none": - $parse(attr.dndCanceled)(scope, {event: event}); - break; - } + var dropEffect = dndState.dropEffect; + var cb = {copy: 'dndCopied', link: 'dndLinked', move: 'dndMoved', none: 'dndCanceled'}; + $parse(attr[cb[dropEffect]])(scope, {event: event}); $parse(attr.dndDragend)(scope, {event: event, dropEffect: dropEffect}); }); // Clean up + dndState.isDragging = false; + dndState.callback = undefined; element.removeClass("dndDragging"); - $timeout(function() { element.removeClass("dndDraggingSource"); }, 0); - dndDragTypeWorkaround.isDragging = false; + element.removeClass("dndDraggingSource"); event.stopPropagation(); + + // In IE9 it is possible that the timeout from dragstart triggers after the dragend handler. + $timeout(function() { element.removeClass("dndDraggingSource"); }, 0); }); /** @@ -176,43 +199,58 @@ angular.module('dndLists', []) if (this.dragDrop) this.dragDrop(); }); }; - }]) + }]); /** * Use the dnd-list attribute to make your list element a dropzone. Usually you will add a single * li element as child with the ng-repeat directive. If you don't do that, we will not be able to * position the dropped element correctly. If you want your list to be sortable, also add the - * dnd-draggable directive to your li element(s). Both the dnd-list and it's direct children must - * have position: relative CSS style, otherwise the positioning algorithm will not be able to - * determine the correct placeholder position in all browsers. + * dnd-draggable directive to your li element(s). * * Attributes: * - dnd-list Required attribute. The value has to be the array in which the data of - * the dropped element should be inserted. + * the dropped element should be inserted. The value can be blank if used + * with a custom dnd-drop handler that always returns true. * - dnd-allowed-types Optional array of allowed item types. When used, only items that had a - * matching dnd-type attribute will be dropable. + * matching dnd-type attribute will be dropable. Upper case characters will + * automatically be converted to lower case. + * - dnd-effect-allowed Optional string expression that limits the drop effects that can be + * performed in the list. See dnd-effect-allowed on dnd-draggable for more + * details on allowed options. The default value is all. * - dnd-disable-if Optional boolean expresssion. When it evaluates to true, no dropping * into the list is possible. Note that this also disables rearranging * items inside the list. * - dnd-horizontal-list Optional boolean expresssion. When it evaluates to true, the positioning * algorithm will use the left and right halfs of the list items instead of * the upper and lower halfs. + * - dnd-external-sources Optional boolean expression. When it evaluates to true, the list accepts + * drops from sources outside of the current browser tab. This allows to + * drag and drop accross different browser tabs. The only major browser + * that does not support this is currently Microsoft Edge. + * + * Callbacks: * - dnd-dragover Optional expression that is invoked when an element is dragged over the * list. If the expression is set, but does not return true, the element is * not allowed to be dropped. The following variables will be available: * - event: The original dragover event sent by the browser. * - index: The position in the list at which the element would be dropped. - * - type: The dnd-type set on the dnd-draggable, or undefined if unset. + * - type: The dnd-type set on the dnd-draggable, or undefined if non was + * set. Will be null for drops from external sources in IE and Edge, + * since we don't know the type in those cases. + * - dropEffect: One of move, copy or link, see dnd-effect-allowed. * - external: Whether the element was dragged from an external source. + * - callback: If dnd-callback was set on the source element, this is a + * function reference to the callback. The callback can be invoked with + * custom variables like this: callback({var1: value1, var2: value2}). + * The callback will be executed on the scope of the source element. If + * dnd-external-sources was set and external is true, this callback will + * not be available. * - dnd-drop Optional expression that is invoked when an element is dropped on the - * list. The following variables will be available: - * - event: The original drop event sent by the browser. - * - index: The position in the list at which the element would be dropped. - * - item: The transferred object. - * - type: The dnd-type set on the dnd-draggable, or undefined if unset. - * - external: Whether the element was dragged from an external source. - * The return value determines the further handling of the drop: - * - false: The drop will be canceled and the element won't be inserted. + * list. The same variables as for dnd-dragover will be available, with the + * exception that type is always known and therefore never null. There + * will also be an item variable, which is the transferred object. The + * return value determines the further handling of the drop: + * - falsy: The drop will be canceled and the element won't be inserted. * - true: Signalises that the drop is allowed, but the dnd-drop * callback already took care of inserting the element. * - otherwise: All other return values will be treated as the object to @@ -223,13 +261,6 @@ angular.module('dndLists', []) * dnd-drop will be available. Note that for reorderings inside the same * list the old element will still be in the list due to the fact that * dnd-moved was not called yet. - * - dnd-external-sources Optional boolean expression. When it evaluates to true, the list accepts - * drops from sources outside of the current browser tab. This allows to - * drag and drop accross different browser tabs. Note that this will allow - * to drop arbitrary text into the list, thus it is highly recommended to - * implement the dnd-drop callback to check the incoming element for - * sanity. Furthermore, the dnd-type of external sources can not be - * determined, therefore do not rely on restrictions of dnd-allowed-type. * * CSS classes: * - dndPlaceholder When an element is dragged over the list, a new placeholder child @@ -238,18 +269,16 @@ angular.module('dndLists', []) * by creating a child element with dndPlaceholder class. * - dndDragover Will be added to the list while an element is dragged over the list. */ - .directive('dndList', ['$parse', '$timeout', 'dndDropEffectWorkaround', 'dndDragTypeWorkaround', - function($parse, $timeout, dndDropEffectWorkaround, dndDragTypeWorkaround) { + dndLists.directive('dndList', ['$parse', function($parse) { return function(scope, element, attr) { // While an element is dragged over the list, this placeholder element is inserted - // at the location where the element would be inserted after dropping + // at the location where the element would be inserted after dropping. var placeholder = getPlaceholderElement(); - var placeholderNode = placeholder[0]; - var listNode = element[0]; placeholder.remove(); - var horizontal = attr.dndHorizontalList && scope.$eval(attr.dndHorizontalList); - var externalSources = attr.dndExternalSources && scope.$eval(attr.dndExternalSources); + var placeholderNode = placeholder[0]; + var listNode = element[0]; + var listSettings = {}; /** * The dragenter event is fired when a dragged element or text selection enters a valid drop @@ -259,7 +288,18 @@ angular.module('dndLists', []) */ element.on('dragenter', function (event) { event = event.originalEvent || event; - if (!isDropAllowed(event)) return true; + + // Calculate list properties, so that we don't have to repeat this on every dragover event. + var types = attr.dndAllowedTypes && scope.$eval(attr.dndAllowedTypes); + listSettings = { + allowedTypes: angular.isArray(types) && types.join('|').toLowerCase().split('|'), + disabled: attr.dndDisableIf && scope.$eval(attr.dndDisableIf), + externalSources: attr.dndExternalSources && scope.$eval(attr.dndExternalSources), + horizontal: attr.dndHorizontalList && scope.$eval(attr.dndHorizontalList) + }; + + var mimeType = getMimeType(event.dataTransfer.types); + if (!mimeType || !isDropAllowed(getItemType(mimeType))) return true; event.preventDefault(); }); @@ -270,62 +310,58 @@ angular.module('dndLists', []) element.on('dragover', function(event) { event = event.originalEvent || event; - if (!isDropAllowed(event)) return true; + // Check whether the drop is allowed and determine mime type. + var mimeType = getMimeType(event.dataTransfer.types); + var itemType = getItemType(mimeType); + if (!mimeType || !isDropAllowed(itemType)) return true; - // First of all, make sure that the placeholder is shown - // This is especially important if the list is empty + // Make sure the placeholder is shown, which is especially important if the list is empty. if (placeholderNode.parentNode != listNode) { element.append(placeholder); } - if (event.target !== listNode) { + if (event.target != listNode) { // Try to find the node direct directly below the list node. var listItemNode = event.target; - while (listItemNode.parentNode !== listNode && listItemNode.parentNode) { + while (listItemNode.parentNode != listNode && listItemNode.parentNode) { listItemNode = listItemNode.parentNode; } - if (listItemNode.parentNode === listNode && listItemNode !== placeholderNode) { - // If the mouse pointer is in the upper half of the child element, - // we place it before the child element, otherwise below it. - if (isMouseInFirstHalf(event, listItemNode)) { - listNode.insertBefore(placeholderNode, listItemNode); + if (listItemNode.parentNode == listNode && listItemNode != placeholderNode) { + // If the mouse pointer is in the upper half of the list item element, + // we position the placeholder before the list item, otherwise after it. + var rect = listItemNode.getBoundingClientRect(); + if (listSettings.horizontal) { + var isFirstHalf = event.clientX < rect.left + rect.width / 2; } else { - listNode.insertBefore(placeholderNode, listItemNode.nextSibling); - } - } - } else { - // This branch is reached when we are dragging directly over the list element. - // Usually we wouldn't need to do anything here, but the IE does not fire it's - // events for the child element, only for the list directly. Therefore, we repeat - // the positioning algorithm for IE here. - if (isMouseInFirstHalf(event, placeholderNode, true)) { - // Check if we should move the placeholder element one spot towards the top. - // Note that display none elements will have offsetTop and offsetHeight set to - // zero, therefore we need a special check for them. - while (placeholderNode.previousElementSibling - && (isMouseInFirstHalf(event, placeholderNode.previousElementSibling, true) - || placeholderNode.previousElementSibling.offsetHeight === 0)) { - listNode.insertBefore(placeholderNode, placeholderNode.previousElementSibling); - } - } else { - // Check if we should move the placeholder element one spot towards the bottom - while (placeholderNode.nextElementSibling && - !isMouseInFirstHalf(event, placeholderNode.nextElementSibling, true)) { - listNode.insertBefore(placeholderNode, - placeholderNode.nextElementSibling.nextElementSibling); + var isFirstHalf = event.clientY < rect.top + rect.height / 2; } + listNode.insertBefore(placeholderNode, + isFirstHalf ? listItemNode : listItemNode.nextSibling); } } + // In IE we set a fake effectAllowed in dragstart to get the correct cursor, we therefore + // ignore the effectAllowed passed in dataTransfer. We must also not access dataTransfer for + // drops from external sources, as that throws an exception. + var ignoreDataTransfer = mimeType == MSIE_MIME_TYPE; + var dropEffect = getDropEffect(event, ignoreDataTransfer); + if (dropEffect == 'none') return stopDragover(); + // At this point we invoke the callback, which still can disallow the drop. // We can't do this earlier because we want to pass the index of the placeholder. - if (attr.dndDragover && !invokeCallback(attr.dndDragover, event, getPlaceholderIndex())) { + if (attr.dndDragover && !invokeCallback(attr.dndDragover, event, dropEffect, itemType)) { return stopDragover(); } - element.addClass("dndDragover"); + // Set dropEffect to modify the cursor shown by the browser, unless we're in IE, where this + // is not supported. This must be done after preventDefault in Firefox. event.preventDefault(); + if (!ignoreDataTransfer) { + event.dataTransfer.dropEffect = dropEffect; + } + + element.addClass("dndDragover"); event.stopPropagation(); return false; }); @@ -338,51 +374,54 @@ angular.module('dndLists', []) element.on('drop', function(event) { event = event.originalEvent || event; - if (!isDropAllowed(event)) return true; + // Check whether the drop is allowed and determine mime type. + var mimeType = getMimeType(event.dataTransfer.types); + var itemType = getItemType(mimeType); + if (!mimeType || !isDropAllowed(itemType)) return true; // The default behavior in Firefox is to interpret the dropped element as URL and // forward to it. We want to prevent that even if our drop is aborted. event.preventDefault(); - // Unserialize the data that was serialized in dragstart. According to the HTML5 specs, - // the "Text" drag type will be converted to text/plain, but IE does not do that. - var data = event.dataTransfer.getData("Text") || event.dataTransfer.getData("text/plain"); - var transferredObject; + // Unserialize the data that was serialized in dragstart. try { - transferredObject = JSON.parse(data); + var data = JSON.parse(event.dataTransfer.getData(mimeType)); } catch(e) { return stopDragover(); } + // Drops with invalid types from external sources might not have been filtered out yet. + if (mimeType == MSIE_MIME_TYPE || mimeType == EDGE_MIME_TYPE) { + itemType = data.type || undefined; + data = data.item; + if (!isDropAllowed(itemType)) return stopDragover(); + } + + // Special handling for internal IE drops, see dragover handler. + var ignoreDataTransfer = mimeType == MSIE_MIME_TYPE; + var dropEffect = getDropEffect(event, ignoreDataTransfer); + if (dropEffect == 'none') return stopDragover(); + // Invoke the callback, which can transform the transferredObject and even abort the drop. var index = getPlaceholderIndex(); if (attr.dndDrop) { - transferredObject = invokeCallback(attr.dndDrop, event, index, transferredObject); - if (!transferredObject) { - return stopDragover(); - } + data = invokeCallback(attr.dndDrop, event, dropEffect, itemType, index, data); + if (!data) return stopDragover(); + } + + // The drop is definitely going to happen now, store the dropEffect. + dndState.dropEffect = dropEffect; + if (!ignoreDataTransfer) { + event.dataTransfer.dropEffect = dropEffect; } // Insert the object into the array, unless dnd-drop took care of that (returned true). - if (transferredObject !== true) { + if (data !== true) { scope.$apply(function() { - scope.$eval(attr.dndList).splice(index, 0, transferredObject); + scope.$eval(attr.dndList).splice(index, 0, data); }); } - invokeCallback(attr.dndInserted, event, index, transferredObject); - - // In Chrome on Windows the dropEffect will always be none... - // We have to determine the actual effect manually from the allowed effects - if (event.dataTransfer.dropEffect === "none") { - if (event.dataTransfer.effectAllowed === "copy" || - event.dataTransfer.effectAllowed === "move") { - dndDropEffectWorkaround.dropEffect = event.dataTransfer.effectAllowed; - } else { - dndDropEffectWorkaround.dropEffect = event.ctrlKey ? "copy" : "move"; - } - } else { - dndDropEffectWorkaround.dropEffect = event.dataTransfer.dropEffect; - } + invokeCallback(attr.dndInserted, event, dropEffect, itemType, index, data); // Clean up stopDragover(); @@ -393,37 +432,118 @@ angular.module('dndLists', []) /** * We have to remove the placeholder when the element is no longer dragged over our list. The * problem is that the dragleave event is not only fired when the element leaves our list, - * but also when it leaves a child element -- so practically it's fired all the time. As a - * workaround we wait a few milliseconds and then check if the dndDragover class was added - * again. If it is there, dragover must have been called in the meantime, i.e. the element - * is still dragging over the list. If you know a better way of doing this, please tell me! + * but also when it leaves a child element. Therefore, we determine whether the mouse cursor + * is still pointing to an element inside the list or not. */ element.on('dragleave', function(event) { event = event.originalEvent || event; - element.removeClass("dndDragover"); - $timeout(function() { - if (!element.hasClass("dndDragover")) { - placeholder.remove(); - } - }, 100); + var newTarget = document.elementFromPoint(event.clientX, event.clientY); + if (listNode.contains(newTarget) && !event._dndPhShown) { + // Signalize to potential parent lists that a placeholder is already shown. + event._dndPhShown = true; + } else { + stopDragover(); + } }); /** - * Checks whether the mouse pointer is in the first half of the given target element. - * - * In Chrome we can just use offsetY, but in Firefox we have to use layerY, which only - * works if the child element has position relative. In IE the events are only triggered - * on the listNode instead of the listNodeItem, therefore the mouse positions are - * relative to the parent element of targetNode. + * Given the types array from the DataTransfer object, returns the first valid mime type. + * A type is valid if it starts with MIME_TYPE, or it equals MSIE_MIME_TYPE or EDGE_MIME_TYPE. */ - function isMouseInFirstHalf(event, targetNode, relativeToParent) { - var mousePointer = horizontal ? (event.offsetX || event.layerX) - : (event.offsetY || event.layerY); - var targetSize = horizontal ? targetNode.offsetWidth : targetNode.offsetHeight; - var targetPosition = horizontal ? targetNode.offsetLeft : targetNode.offsetTop; - targetPosition = relativeToParent ? targetPosition : 0; - return mousePointer < targetPosition + targetSize / 2; + function getMimeType(types) { + if (!types) return MSIE_MIME_TYPE; // IE 9 workaround. + for (var i = 0; i < types.length; i++) { + if (types[i] == MSIE_MIME_TYPE || types[i] == EDGE_MIME_TYPE || + types[i].substr(0, MIME_TYPE.length) == MIME_TYPE) { + return types[i]; + } + } + return null; + } + + /** + * Determines the type of the item from the dndState, or from the mime type for items from + * external sources. Returns undefined if no item type was set and null if the item type could + * not be determined. + */ + function getItemType(mimeType) { + if (dndState.isDragging) return dndState.itemType || undefined; + if (mimeType == MSIE_MIME_TYPE || mimeType == EDGE_MIME_TYPE) return null; + return (mimeType && mimeType.substr(MIME_TYPE.length + 1)) || undefined; + } + + /** + * Checks various conditions that must be fulfilled for a drop to be allowed, including the + * dnd-allowed-types attribute. If the item Type is unknown (null), the drop will be allowed. + */ + function isDropAllowed(itemType) { + if (listSettings.disabled) return false; + if (!listSettings.externalSources && !dndState.isDragging) return false; + if (!listSettings.allowedTypes || itemType === null) return true; + return itemType && listSettings.allowedTypes.indexOf(itemType) != -1; + } + + /** + * Determines which drop effect to use for the given event. In Internet Explorer we have to + * ignore the effectAllowed field on dataTransfer, since we set a fake value in dragstart. + * In those cases we rely on dndState to filter effects. Read the design doc for more details: + * https://github.com/marceljuenemann/angular-drag-and-drop-lists/wiki/Data-Transfer-Design + */ + function getDropEffect(event, ignoreDataTransfer) { + var effects = ALL_EFFECTS; + if (!ignoreDataTransfer) { + effects = filterEffects(effects, event.dataTransfer.effectAllowed); + } + if (dndState.isDragging) { + effects = filterEffects(effects, dndState.effectAllowed); + } + if (attr.dndEffectAllowed) { + effects = filterEffects(effects, attr.dndEffectAllowed); + } + // MacOS automatically filters dataTransfer.effectAllowed depending on the modifier keys, + // therefore the following modifier keys will only affect other operating systems. + if (!effects.length) { + return 'none'; + } else if (event.ctrlKey && effects.indexOf('copy') != -1) { + return 'copy'; + } else if (event.altKey && effects.indexOf('link') != -1) { + return 'link'; + } else { + return effects[0]; + } + } + + /** + * Small helper function that cleans up if we aborted a drop. + */ + function stopDragover() { + placeholder.remove(); + element.removeClass("dndDragover"); + return true; + } + + /** + * Invokes a callback with some interesting parameters and returns the callbacks return value. + */ + function invokeCallback(expression, event, dropEffect, itemType, index, item) { + return $parse(expression)(scope, { + callback: dndState.callback, + dropEffect: dropEffect, + event: event, + external: !dndState.isDragging, + index: index !== undefined ? index : getPlaceholderIndex(), + item: item || undefined, + type: itemType + }); + } + + /** + * We use the position of the placeholder node to determine at which position of the array the + * object needs to be inserted + */ + function getPlaceholderIndex() { + return Array.prototype.indexOf.call(listNode.children, placeholderNode); } /** @@ -440,77 +560,8 @@ angular.module('dndLists', []) }); return placeholder || angular.element("
  • "); } - - /** - * We use the position of the placeholder node to determine at which position of the array the - * object needs to be inserted - */ - function getPlaceholderIndex() { - return Array.prototype.indexOf.call(listNode.children, placeholderNode); - } - - /** - * Checks various conditions that must be fulfilled for a drop to be allowed - */ - function isDropAllowed(event) { - // Disallow drop from external source unless it's allowed explicitly. - if (!dndDragTypeWorkaround.isDragging && !externalSources) return false; - - // Check mimetype. Usually we would use a custom drag type instead of Text, but IE doesn't - // support that. - if (!hasTextMimetype(event.dataTransfer.types)) return false; - - // Now check the dnd-allowed-types against the type of the incoming element. For drops from - // external sources we don't know the type, so it will need to be checked via dnd-drop. - if (attr.dndAllowedTypes && dndDragTypeWorkaround.isDragging) { - var allowed = scope.$eval(attr.dndAllowedTypes); - if (angular.isArray(allowed) && allowed.indexOf(dndDragTypeWorkaround.dragType) === -1) { - return false; - } - } - - // Check whether droping is disabled completely - if (attr.dndDisableIf && scope.$eval(attr.dndDisableIf)) return false; - - return true; - } - - /** - * Small helper function that cleans up if we aborted a drop. - */ - function stopDragover() { - placeholder.remove(); - element.removeClass("dndDragover"); - return true; - } - - /** - * Invokes a callback with some interesting parameters and returns the callbacks return value. - */ - function invokeCallback(expression, event, index, item) { - return $parse(expression)(scope, { - event: event, - index: index, - item: item || undefined, - external: !dndDragTypeWorkaround.isDragging, - type: dndDragTypeWorkaround.isDragging ? dndDragTypeWorkaround.dragType : undefined - }); - } - - /** - * Check if the dataTransfer object contains a drag type that we can handle. In old versions - * of IE the types collection will not even be there, so we just assume a drop is possible. - */ - function hasTextMimetype(types) { - if (!types) return true; - for (var i = 0; i < types.length; i++) { - if (types[i] === "Text" || types[i] === "text/plain") return true; - } - - return false; - } }; - }]) + }]); /** * Use the dnd-nodrag attribute inside of dnd-draggable elements to prevent them from starting @@ -518,7 +569,7 @@ angular.module('dndLists', []) * dnd-draggable elements or create specific handle elements. Note: This directive does not work * in Internet Explorer 9. */ - .directive('dndNodrag', function() { + dndLists.directive('dndNodrag', function() { return function(scope, element, attr) { // Set as draggable so that we can cancel the events explicitly element.attr("draggable", "true"); @@ -551,7 +602,7 @@ angular.module('dndLists', []) } }); }; - }) + }); /** * Use the dnd-handle directive within a dnd-nodrag element in order to allow dragging with that @@ -561,7 +612,7 @@ angular.module('dndLists', []) * can work around this by styling the handle element differently when it is being dragged. Use * the CSS selector .dndDragging:not(.dndDraggingSource) [dnd-handle] for that. */ - .directive('dndHandle', function() { + dndLists.directive('dndHandle', function() { return function(scope, element, attr) { element.attr("draggable", "true"); @@ -570,21 +621,30 @@ angular.module('dndLists', []) event._dndHandle = true; }); }; - }) + }); /** - * This workaround handles the fact that Internet Explorer does not support drag types other than - * "Text" and "URL". That means we can not know whether the data comes from one of our elements or - * is just some other data like a text selection. As a workaround we save the isDragging flag in - * here. When a dropover event occurs, we only allow the drop if we are already dragging, because - * that means the element is ours. + * Filters an array of drop effects using a HTML5 effectAllowed string. */ - .factory('dndDragTypeWorkaround', function(){ return {} }) + function filterEffects(effects, effectAllowed) { + if (effectAllowed == 'all') return effects; + return effects.filter(function(effect) { + return effectAllowed.toLowerCase().indexOf(effect) != -1; + }); + } /** - * Chrome on Windows does not set the dropEffect field, which we need in dragend to determine - * whether a drag operation was successful. Therefore we have to maintain it in this global - * variable. The bug report for that has been open for years: - * https://code.google.com/p/chromium/issues/detail?id=39399 + * For some features we need to maintain global state. This is done here, with these fields: + * - callback: A callback function set at dragstart that is passed to internal dropzone handlers. + * - dropEffect: Set in dragstart to "none" and to the actual value in the drop handler. We don't + * rely on the dropEffect passed by the browser, since there are various bugs in Chrome and + * Safari, and Internet Explorer defaults to copy if effectAllowed is copyMove. + * - effectAllowed: Set in dragstart based on dnd-effect-allowed. This is needed for IE because + * setting effectAllowed on dataTransfer might result in an undesired cursor. + * - isDragging: True between dragstart and dragend. Falsy for drops from external sources. + * - itemType: The item type of the dragged element set via dnd-type. This is needed because IE + * and Edge don't support custom mime types that we can use to transfer this information. */ - .factory('dndDropEffectWorkaround', function(){ return {} }); + var dndState = {}; + +})(angular.module('dndLists', [])); diff --git a/js/vendor/angular-draganddrop/angular-drag-and-drop-lists.min.js b/js/vendor/angular-draganddrop/angular-drag-and-drop-lists.min.js index 35325821..0d957a69 100644 --- a/js/vendor/angular-draganddrop/angular-drag-and-drop-lists.min.js +++ b/js/vendor/angular-draganddrop/angular-drag-and-drop-lists.min.js @@ -1,35 +1,49 @@ /** - * angular-drag-and-drop-lists v1.4.0 + * angular-drag-and-drop-lists v2.1.0 * * Copyright (c) 2014 Marcel Juenemann marcel@juenemann.cc - * Copyright (c) 2014-2016 Google Inc. + * Copyright (c) 2014-2017 Google Inc. * https://github.com/marceljuenemann/angular-drag-and-drop-lists * * License: MIT */ -angular.module("dndLists",[]).directive("dndDraggable",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,n,r,t){return function(a,d,o){d.attr("draggable","true"),o.dndDisableIf&&a.$watch(o.dndDisableIf,function(e){d.attr("draggable",!e)}),d.on("dragstart",function(i){return i=i.originalEvent||i,"false"==d.attr("draggable")?!0:(i.dataTransfer.setData("Text",angular.toJson(a.$eval(o.dndDraggable))),i.dataTransfer.effectAllowed=o.dndEffectAllowed||"move",d.addClass("dndDragging"),n(function(){d.addClass("dndDraggingSource")},0),r.dropEffect="none",t.isDragging=!0,t.dragType=o.dndType?a.$eval(o.dndType):void 0,i._dndHandle&&i.dataTransfer.setDragImage&&i.dataTransfer.setDragImage(d[0],0,0),e(o.dndDragstart)(a,{event:i}),void i.stopPropagation())}),d.on("dragend",function(i){i=i.originalEvent||i -var f=r.dropEffect -a.$apply(function(){switch(f){case"move":e(o.dndMoved)(a,{event:i}) -break -case"copy":e(o.dndCopied)(a,{event:i}) -break -case"none":e(o.dndCanceled)(a,{event:i})}e(o.dndDragend)(a,{event:i,dropEffect:f})}),d.removeClass("dndDragging"),n(function(){d.removeClass("dndDraggingSource")},0),t.isDragging=!1,i.stopPropagation()}),d.on("click",function(n){o.dndSelected&&(n=n.originalEvent||n,a.$apply(function(){e(o.dndSelected)(a,{event:n})}),n.stopPropagation())}),d.on("selectstart",function(){this.dragDrop&&this.dragDrop()})}}]).directive("dndList",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,n,r,t){return function(a,d,o){function i(e,n,r){var t=E?e.offsetX||e.layerX:e.offsetY||e.layerY,a=E?n.offsetWidth:n.offsetHeight,d=E?n.offsetLeft:n.offsetTop -return d=r?d:0,d+a/2>t}function f(){var e -return angular.forEach(d.children(),function(n){var r=angular.element(n) -r.hasClass("dndPlaceholder")&&(e=r)}),e||angular.element("
  • ")}function l(){return Array.prototype.indexOf.call(D.children,v)}function g(e){if(!t.isDragging&&!y)return!1 -if(!c(e.dataTransfer.types))return!1 -if(o.dndAllowedTypes&&t.isDragging){var n=a.$eval(o.dndAllowedTypes) -if(angular.isArray(n)&&-1===n.indexOf(t.dragType))return!1}return o.dndDisableIf&&a.$eval(o.dndDisableIf)?!1:!0}function s(){return p.remove(),d.removeClass("dndDragover"),!0}function u(n,r,d,o){return e(n)(a,{event:r,index:d,item:o||void 0,external:!t.isDragging,type:t.isDragging?t.dragType:void 0})}function c(e){if(!e)return!0 -for(var n=0;n")}var T=y() +T.remove() +var h=T[0],m=l[0],E={} +l.on("dragenter",function(e){e=e.originalEvent||e +var n=f.dndAllowedTypes&&i.$eval(f.dndAllowedTypes) +E={allowedTypes:angular.isArray(n)&&n.join("|").toLowerCase().split("|"),disabled:f.dndDisableIf&&i.$eval(f.dndDisableIf),externalSources:f.dndExternalSources&&i.$eval(f.dndExternalSources),horizontal:f.dndHorizontalList&&i.$eval(f.dndHorizontalList)} +var a=c(e.dataTransfer.types) +return a&&g(s(a))?void e.preventDefault():!0}),l.on("dragover",function(e){e=e.originalEvent||e +var n=c(e.dataTransfer.types),a=s(n) +if(!n||!g(a))return!0 +if(h.parentNode!=m&&l.append(T),e.target!=m){for(var r=e.target;r.parentNode!=m&&r.parentNode;)r=r.parentNode +if(r.parentNode==m&&r!=h){var d=r.getBoundingClientRect() +if(E.horizontal)var o=e.clientX" + "Marcel Juenemann " ], "description": "Angular directives for sorting nested lists using the HTML5 Drag & Drop API", "keywords": [ diff --git a/js/vendor/angular-ui-select/.bower.json b/js/vendor/angular-ui-select/.bower.json index 0e09629b..ce85b5c1 100644 --- a/js/vendor/angular-ui-select/.bower.json +++ b/js/vendor/angular-ui-select/.bower.json @@ -1,6 +1,5 @@ { "name": "angular-ui-select", - "version": "0.17.0", "homepage": "https://github.com/angular-ui/ui-select", "authors": [ "AngularUI" @@ -29,13 +28,14 @@ "angular-sanitize": ">=1.2.18", "angular-mocks": ">=1.2.18" }, - "_release": "0.17.0", + "version": "0.19.8", + "_release": "0.19.8", "_resolution": { "type": "version", - "tag": "v0.17.0", - "commit": "c41b8928a846288583cd977b48a499d35a53ac45" + "tag": "v0.19.8", + "commit": "fc6502179847b41f864be042d432eec32e8530c4" }, "_source": "https://github.com/angular-ui/ui-select.git", - "_target": "v0.17.0", + "_target": "v0.19.8", "_originalSource": "https://github.com/angular-ui/ui-select.git" } \ No newline at end of file diff --git a/js/vendor/angular-ui-select/CHANGELOG.md b/js/vendor/angular-ui-select/CHANGELOG.md index 6bf0f3ae..8dcd96b1 100644 --- a/js/vendor/angular-ui-select/CHANGELOG.md +++ b/js/vendor/angular-ui-select/CHANGELOG.md @@ -1,7 +1,143 @@ - -## [0.16.1](https://github.com/angular-ui/ui-select/compare/v0.16.1...v0.16.1) (2016-05-11) + +## [0.19.8](https://github.com/angular-ui/ui-select/compare/v0.19.7...v0.19.8) (2017-04-15) + + + +## [0.19.6](https://github.com/angular-ui/ui-select/compare/v0.19.6...v0.19.6) (2017-04-12) + + +### Bug Fixes + +* **lockedItems:** Properly unlock locked items when lock conditions change ([10ee076](https://github.com/angular-ui/ui-select/commit/10ee076)), closes [#1824](https://github.com/angular-ui/ui-select/issues/1824) +* **select-spinner:** fix spec test ([2d62e0b](https://github.com/angular-ui/ui-select/commit/2d62e0b)) +* **spec:** Use exceptionHandler to test errors. (#1879) ([b549db9](https://github.com/angular-ui/ui-select/commit/b549db9)), closes [#1877](https://github.com/angular-ui/ui-select/issues/1877) +* **spinner-class:** add glyphicon to default spinner class, update css. Fixes #1893. ([c8f69db](https://github.com/angular-ui/ui-select/commit/c8f69db)), closes [#1893](https://github.com/angular-ui/ui-select/issues/1893) +* **uiSelectChoices:** prevent template element from being modified (#1850) ([7aabdc4](https://github.com/angular-ui/ui-select/commit/7aabdc4)), closes [#1851](https://github.com/angular-ui/ui-select/issues/1851) +* **uiSelectCtrl:** Reset refreshing flag even if async request errors ([be60430](https://github.com/angular-ui/ui-select/commit/be60430)), closes [#1833](https://github.com/angular-ui/ui-select/issues/1833) +* **uiSelectMatch:** set model value to `null` when cleared ([f711ec2](https://github.com/angular-ui/ui-select/commit/f711ec2)), closes [#863](https://github.com/angular-ui/ui-select/issues/863) +* **uiSelectMultiple:** Don't call onSelectCallback if limit already reached ([b7ac99a](https://github.com/angular-ui/ui-select/commit/b7ac99a)), closes [#1836](https://github.com/angular-ui/ui-select/issues/1836) + +### Features + +* **Header & Footer:** Add header & footer to the dropdown list. ([f65bad1](https://github.com/angular-ui/ui-select/commit/f65bad1)) +* **uiSelectSingle:** add option to avoid backspace resetting the model ([7413321](https://github.com/angular-ui/ui-select/commit/7413321)), closes [#926](https://github.com/angular-ui/ui-select/issues/926) [#525](https://github.com/angular-ui/ui-select/issues/525) + + + + +## [0.19.5](https://github.com/angular-ui/ui-select/compare/v0.19.5...v0.19.5) (2016-10-24) + +## Reverted + +* **Bug fix:** Search input isn't blocked ([0d81493](https://github.com/angular-ui/ui-select/commit/0d81493)) + + +## [0.19.4](https://github.com/angular-ui/ui-select/compare/v0.19.4...v0.19.4) (2016-10-19) + +### Bug Fixes + +* **bootstrap:** add aria-expanded to the multiple select ([6766754](https://github.com/angular-ui/ui-select/commit/6766754)), closes [#1775](https://github.com/angular-ui/ui-select/issues/1775) +* ensure aria-activedescendant is correct ([e3be4d1](https://github.com/angular-ui/ui-select/commit/e3be4d1)) +* only apply listbox role when open ([e902ffc](https://github.com/angular-ui/ui-select/commit/e902ffc)) +* **bootstrap:** add search role ([f3194bf](https://github.com/angular-ui/ui-select/commit/f3194bf)) + +### Features + +* **selectize:** add support for multiple selection ([ff8071d](https://github.com/angular-ui/ui-select/commit/ff8071d)), closes [#295](https://github.com/angular-ui/ui-select/issues/295) [#1787](https://github.com/angular-ui/ui-select/issues/1787) + + +## [0.19.3](https://github.com/angular-ui/ui-select/compare/v0.19.3...v0.19.3) (2016-08-17) + + + +## [0.19.2](https://github.com/angular-ui/ui-select/compare/v0.19.0...v0.19.2) (2016-08-16) + + +### Bug Fixes + +* **bootstrap layout:** Restrict selected length to ui-select-container (#1680) ([01055c5](https://github.com/angular-ui/ui-select/commit/01055c5)), closes [#1576](https://github.com/angular-ui/ui-select/issues/1576) +* **release:** bump version with built files ([76cf9c3](https://github.com/angular-ui/ui-select/commit/76cf9c3)) + + +## [0.19.1](https://github.com/angular-ui/ui-select/compare/v0.19.0...v0.19.1) (2016-08-09) + +### Bug Fixes + +* **bootstrap layout:** Restrict selected length to ui-select-container (#1680) ([01055c5](https://github.com/angular-ui/ui-select/commit/01055c5)), closes [#1576](https://github.com/angular-ui/ui-select/issues/1576) + + +# [0.19.0](https://github.com/angular-ui/ui-select/compare/v0.19.0...v0.19.0) (2016-08-07) + +### Bug Fixes + +* **bootstrap layout:** Restrict selected length to ui-select-container (#1680) ([01055c5](https://github.com/angular-ui/ui-select/commit/01055c5)), closes [#1576](https://github.com/angular-ui/ui-select/issues/1576) + + +## [0.18.1](https://github.com/angular-ui/ui-select/compare/v0.18.1...v0.18.1) (2016-08-07) + +### Bug Fixes + +* **bootstrap:** remove anchor tag in choices ([b15189d](https://github.com/angular-ui/ui-select/commit/b15189d)) +* **uiSelect:** remove flicker on search change ([81c33d0](https://github.com/angular-ui/ui-select/commit/81c33d0)), closes [#1298](https://github.com/angular-ui/ui-select/issues/1298) [#1594](https://github.com/angular-ui/ui-select/issues/1594) [#1557](https://github.com/angular-ui/ui-select/issues/1557) +* **uiSelectController:** Select by click on non-multiple tagging (bis) (#1727) ([3dfde71](https://github.com/angular-ui/ui-select/commit/3dfde71)) + +### Features + +* **events:** add open-close callback ([21bcd5e](https://github.com/angular-ui/ui-select/commit/21bcd5e)), closes [#432](https://github.com/angular-ui/ui-select/issues/432) [#1153](https://github.com/angular-ui/ui-select/issues/1153) + +### Performance Improvements + +* **repeatParserService:** track groups by name ([1770038](https://github.com/angular-ui/ui-select/commit/1770038)), closes [#1721](https://github.com/angular-ui/ui-select/issues/1721) [#1722](https://github.com/angular-ui/ui-select/issues/1722) + + +## [0.18.1](https://github.com/angular-ui/ui-select/compare/v0.18.0...v0.18.1) (2016-07-10) + +### Bug Fixes + +* **isDisabled:** do not modify item ([b95bf9f](https://github.com/angular-ui/ui-select/commit/b95bf9f)), closes [#1200](https://github.com/angular-ui/ui-select/issues/1200) [#1661](https://github.com/angular-ui/ui-select/issues/1661) +* **isLocked:** do not modify item ([c01d363](https://github.com/angular-ui/ui-select/commit/c01d363)), closes [#1269](https://github.com/angular-ui/ui-select/issues/1269) [#514](https://github.com/angular-ui/ui-select/issues/514) +* **removeSelected:** fix incorrect removal of preselected item ([32b7924](https://github.com/angular-ui/ui-select/commit/32b7924)), closes [#1672](https://github.com/angular-ui/ui-select/issues/1672) +* **searchEnabled:** watch evaluated attribute value ([4503295](https://github.com/angular-ui/ui-select/commit/4503295)), closes [#505](https://github.com/angular-ui/ui-select/issues/505) +* **select2:** Up-direction when using global theme ([5336dc5](https://github.com/angular-ui/ui-select/commit/5336dc5)), closes [#1674](https://github.com/angular-ui/ui-select/issues/1674) +* **Selectize:** hide input box when selected data is 0 ([e179dc6](https://github.com/angular-ui/ui-select/commit/e179dc6)), closes [#1304](https://github.com/angular-ui/ui-select/issues/1304) +* **tagging:** infite digest loops when name is similar ([fcd9bc5](https://github.com/angular-ui/ui-select/commit/fcd9bc5)), closes [#1693](https://github.com/angular-ui/ui-select/issues/1693) +* **tagging:** Support paste with tagging enabled and tagging-label="false" ([668a0f3](https://github.com/angular-ui/ui-select/commit/668a0f3)), closes [#1668](https://github.com/angular-ui/ui-select/issues/1668) +* **uiSelectMultiple:** $select.refreshItems is not a function ([a41a7fc](https://github.com/angular-ui/ui-select/commit/a41a7fc)) +* **uiSelectMultiple:** Allow duplicates in $select.selected ([9f5d6ec](https://github.com/angular-ui/ui-select/commit/9f5d6ec)), closes [#1688](https://github.com/angular-ui/ui-select/issues/1688) +* **uiSelectMultiple:** tolerate null/undefined view value ([0c29b64](https://github.com/angular-ui/ui-select/commit/0c29b64)) +* **uiSelectNoChoice:** support Select2 theme ([e59e008](https://github.com/angular-ui/ui-select/commit/e59e008)), closes [#1608](https://github.com/angular-ui/ui-select/issues/1608) +* **uiSelectNoChoice:** support Selectize theme ([a7210c4](https://github.com/angular-ui/ui-select/commit/a7210c4)), closes [#1692](https://github.com/angular-ui/ui-select/issues/1692) + + +## [0.18.0](https://github.com/angular-ui/ui-select/compare/v0.17.1...v0.18.0) (2016-06-09) + +### Bug Fixes + +* **positioning:** stop flicker when closed ([ca4d09e](https://github.com/angular-ui/ui-select/commit/ca4d09e)) +* **positioning:** wait for animation to complete ([aa90dd8](https://github.com/angular-ui/ui-select/commit/aa90dd8)), closes [#1593](https://github.com/angular-ui/ui-select/issues/1593) +* search input width resizing ([5c8cf86](https://github.com/angular-ui/ui-select/commit/5c8cf86)), closes [#1575](https://github.com/angular-ui/ui-select/issues/1575) +* **uiSelectCtrl:** Prevent error when using ngAnimate < v1.4 ([8becac3](https://github.com/angular-ui/ui-select/commit/8becac3)), closes [#1626](https://github.com/angular-ui/ui-select/issues/1626) +* **uiSelectNoChoice:** make compatible with Angular 1.5 ([c944307](https://github.com/angular-ui/ui-select/commit/c944307)), closes [#1609](https://github.com/angular-ui/ui-select/issues/1609) +* **uiSelectNoChoice:** support bootstrap-multiple ([9d29307](https://github.com/angular-ui/ui-select/commit/9d29307)), closes [#1614](https://github.com/angular-ui/ui-select/issues/1614) [#1615](https://github.com/angular-ui/ui-select/issues/1615) + +### Features + +* **limit:** Change multi-select limit attr (#1632) ([f5888fb](https://github.com/angular-ui/ui-select/commit/f5888fb)) +* **removeSelected:** Implement removeSelected property for multiple selects ([3ad084f](https://github.com/angular-ui/ui-select/commit/3ad084f)) + + +## [0.17.1](https://github.com/angular-ui/ui-select/compare/v0.17.0...v0.17.1) (2016-05-16) + +### Bug Fixes + +* **parserResult:** Ignore undefined parserResult when using custom tpl ([cee24e5](https://github.com/angular-ui/ui-select/commit/cee24e5)), closes [#1597](https://github.com/angular-ui/ui-select/issues/1597) +* **select2:** hide dropdown if there are no items to show (same as #1588 for bootstrap) ([4c561ac](https://github.com/angular-ui/ui-select/commit/4c561ac)) + + +## [0.17.0](https://github.com/angular-ui/ui-select/compare/v0.16.1...v0.17.0) (2016-05-11) + ### Bug Fixes * **a11y:** prevent list from being focusable ([4e9ab7e](https://github.com/angular-ui/ui-select/commit/4e9ab7e)), closes [#898](https://github.com/angular-ui/ui-select/issues/898) @@ -33,8 +169,6 @@ * **uiSelectCtrl:** moving activate events out of $timeout ([926f462](https://github.com/angular-ui/ui-select/commit/926f462)) * change test in ctrl.isActive ([d6c14d4](https://github.com/angular-ui/ui-select/commit/d6c14d4)) - - # [0.16.1](https://github.com/angular-ui/ui-select/compare/v0.16.0...v0.16.1) (2016-03-23) diff --git a/js/vendor/angular-ui-select/CONTRIBUTING.md b/js/vendor/angular-ui-select/CONTRIBUTING.md index 13998a9c..27455c0c 100644 --- a/js/vendor/angular-ui-select/CONTRIBUTING.md +++ b/js/vendor/angular-ui-select/CONTRIBUTING.md @@ -42,6 +42,8 @@ To ensure consistency throughout the source code, keep these rules in mind as yo support for markdown and templating via @ngdoc tag). To see how we document our APIs, please check out the existing ngdocs and see [this wiki page][ngDocs]. +**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) + ## Git Commit Guidelines We have very precise rules over how our git commit messages can be formatted for maintenance of the changelog and semvar versioning. This leads to **more diff --git a/js/vendor/angular-ui-select/README.md b/js/vendor/angular-ui-select/README.md index 71e42393..926d9501 100644 --- a/js/vendor/angular-ui-select/README.md +++ b/js/vendor/angular-ui-select/README.md @@ -1,4 +1,5 @@ -# AngularJS ui-select [![Build Status](https://travis-ci.org/angular-ui/ui-select.svg?branch=master)](https://travis-ci.org/angular-ui/ui-select) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/ui-select?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +# AngularJS ui-select [![Build Status](https://travis-ci.org/angular-ui/ui-select.svg?branch=master)](https://travis-ci.org/angular-ui/ui-select) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/ui-select?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) + AngularJS-native version of [Select2](http://ivaynberg.github.io/select2/) and [Selectize](http://brianreavis.github.io/selectize.js/). [http://angular-ui.github.io/ui-select/](http://angular-ui.github.io/ui-select/) diff --git a/js/vendor/angular-ui-select/bower.json b/js/vendor/angular-ui-select/bower.json index feebe119..d7a7bafd 100644 --- a/js/vendor/angular-ui-select/bower.json +++ b/js/vendor/angular-ui-select/bower.json @@ -1,6 +1,5 @@ { - "name": "angular-ui-select", - "version": "0.17.0", + "name": "angular-ui-select", "homepage": "https://github.com/angular-ui/ui-select", "authors": [ "AngularUI" diff --git a/js/vendor/angular-ui-select/deploy-docs.sh b/js/vendor/angular-ui-select/deploy-docs.sh index f18e63a7..d9d85561 100644 --- a/js/vendor/angular-ui-select/deploy-docs.sh +++ b/js/vendor/angular-ui-select/deploy-docs.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -e [[ $TRAVIS_SECURE_ENV_VARS == "true" ]] || { echo "No github key avaliable, aborting publishing"; exit 0; } @@ -27,5 +27,5 @@ git config user.email "travisci@users.noreply.github.com" git commit -m "docs(*): new deploy (angular-ui/ui-select@${ID_REF})" -git push origin --quiet -#> /dev/null 2>&1 \ No newline at end of file +git push origin --quiet +#> /dev/null 2>&1 diff --git a/js/vendor/angular-ui-select/dist/select.css b/js/vendor/angular-ui-select/dist/select.css index b1e9d65c..0e713bb1 100644 --- a/js/vendor/angular-ui-select/dist/select.css +++ b/js/vendor/angular-ui-select/dist/select.css @@ -1,7 +1,7 @@ /*! * ui-select * http://github.com/angular-ui/ui-select - * Version: 0.16.0 - 2016-03-23T20:51:56.678Z + * Version: 0.19.7 - 2017-04-15T14:28:36.790Z * License: MIT */ @@ -54,12 +54,14 @@ body > .select2-container.open { } /* Handle up direction Select2 */ -.ui-select-container[theme="select2"].direction-up .ui-select-match { +.ui-select-container[theme="select2"].direction-up .ui-select-match, +.ui-select-container.select2.direction-up .ui-select-match { border-radius: 4px; /* FIXME hardcoded value :-/ */ border-top-left-radius: 0; border-top-right-radius: 0; } -.ui-select-container[theme="select2"].direction-up .ui-select-dropdown { +.ui-select-container[theme="select2"].direction-up .ui-select-dropdown, +.ui-select-container.select2.direction-up .ui-select-dropdown { border-radius: 4px; /* FIXME hardcoded value :-/ */ border-bottom-left-radius: 0; border-bottom-right-radius: 0; @@ -71,13 +73,25 @@ body > .select2-container.open { margin-top: -4px; /* FIXME hardcoded value :-/ */ } -.ui-select-container[theme="select2"].direction-up .ui-select-dropdown .select2-search { +.ui-select-container[theme="select2"].direction-up .ui-select-dropdown .select2-search, +.ui-select-container.select2.direction-up .ui-select-dropdown .select2-search { margin-top: 4px; /* FIXME hardcoded value :-/ */ } -.ui-select-container[theme="select2"].direction-up.select2-dropdown-open .ui-select-match { +.ui-select-container[theme="select2"].direction-up.select2-dropdown-open .ui-select-match, +.ui-select-container.select2.direction-up.select2-dropdown-open .ui-select-match { border-bottom-color: #5897fb; } +.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden, +.ui-select-container[theme="select2"] .ui-select-dropdown .ui-select-search-hidden input{ + opacity: 0; + height: 0; + min-height: 0; + padding: 0; + margin: 0; + border:0; +} + /* Selectize theme */ /* Helper class to show styles when focus */ @@ -86,10 +100,15 @@ body > .select2-container.open { } /* Fix input width for Selectize theme */ -.selectize-control > .selectize-input > input { +.selectize-control.single > .selectize-input > input { width: 100%; } +/* Fix line break when there's at least one item selected with the Selectize theme */ +.selectize-control.multi > .selectize-input > input { + margin: 0 !important; +} + /* Fix dropdown width for Selectize theme */ .selectize-control > .selectize-dropdown { width: 100%; @@ -103,10 +122,19 @@ body > .select2-container.open { /* Handle up direction Selectize */ .ui-select-container[theme="selectize"].direction-up .ui-select-dropdown { box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); - margin-top: -2px; /* FIXME hardcoded value :-/ */ } +.ui-select-container[theme="selectize"] input.ui-select-search-hidden{ + opacity: 0; + height: 0; + min-height: 0; + padding: 0; + margin: 0; + border:0; + width: 0; +} + /* Bootstrap theme */ /* Helper class to show styles when focus */ @@ -149,6 +177,15 @@ body > .select2-container.open { border-bottom-right-radius: 0 !important; } +.ui-select-bootstrap .ui-select-search-hidden{ + opacity: 0; + height: 0; + min-height: 0; + padding: 0; + margin: 0; + border:0; +} + .ui-select-bootstrap > .ui-select-match > .btn{ /* Instead of center because of .btn */ text-align: left !important; @@ -161,7 +198,7 @@ body > .select2-container.open { } /* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */ -.ui-select-bootstrap > .ui-select-choices { +.ui-select-bootstrap > .ui-select-choices ,.ui-select-bootstrap > .ui-select-no-choice { width: 100%; height: auto; max-height: 200px; @@ -200,7 +237,11 @@ body > .ui-select-bootstrap.open { position: relative; } -.ui-select-multiple .ui-select-match-item.dropping-before:before { +.ui-select-multiple .ui-select-match-item.dropping .ui-select-match-close { + pointer-events: none; +} + +.ui-select-multiple:hover .ui-select-match-item.dropping-before:before { content: ""; position: absolute; top: 0; @@ -210,7 +251,7 @@ body > .ui-select-bootstrap.open { border-left: 1px solid #428bca; } -.ui-select-multiple .ui-select-match-item.dropping-after:after { +.ui-select-multiple:hover .ui-select-match-item.dropping-after:after { content: ""; position: absolute; top: 0; @@ -220,7 +261,8 @@ body > .ui-select-bootstrap.open { border-right: 1px solid #428bca; } -.ui-select-bootstrap .ui-select-choices-row>a { +.ui-select-bootstrap .ui-select-choices-row>span { + cursor: pointer; display: block; padding: 3px 20px; clear: both; @@ -230,21 +272,21 @@ body > .ui-select-bootstrap.open { white-space: nowrap; } -.ui-select-bootstrap .ui-select-choices-row>a:hover, .ui-select-bootstrap .ui-select-choices-row>a:focus { +.ui-select-bootstrap .ui-select-choices-row>span:hover, .ui-select-bootstrap .ui-select-choices-row>span:focus { text-decoration: none; color: #262626; background-color: #f5f5f5; } -.ui-select-bootstrap .ui-select-choices-row.active>a { +.ui-select-bootstrap .ui-select-choices-row.active>span { color: #fff; text-decoration: none; outline: 0; background-color: #428bca; } -.ui-select-bootstrap .ui-select-choices-row.disabled>a, -.ui-select-bootstrap .ui-select-choices-row.active.disabled>a { +.ui-select-bootstrap .ui-select-choices-row.disabled>span, +.ui-select-bootstrap .ui-select-choices-row.active.disabled>span { color: #777; cursor: not-allowed; background-color: #fff; @@ -265,3 +307,56 @@ body > .ui-select-bootstrap.open { .ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown { box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); } + +.ui-select-bootstrap .ui-select-match-text { + width: 100%; + padding-right: 1em; +} +.ui-select-bootstrap .ui-select-match-text span { + display: inline-block; + width: 100%; + overflow: hidden; +} +.ui-select-bootstrap .ui-select-toggle > a.btn { + position: absolute; + height: 10px; + right: 10px; + margin-top: -2px; +} + +/* Spinner */ +.ui-select-refreshing.glyphicon { + position: absolute; + right: 0; + padding: 8px 27px; + } + +@-webkit-keyframes ui-select-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes ui-select-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} + +.ui-select-spin { + -webkit-animation: ui-select-spin 2s infinite linear; + animation: ui-select-spin 2s infinite linear; +} + +.ui-select-refreshing.ng-animate { + -webkit-animation: none 0s; +} diff --git a/js/vendor/angular-ui-select/dist/select.js b/js/vendor/angular-ui-select/dist/select.js index 07aeb8a0..5ac4e0b7 100644 --- a/js/vendor/angular-ui-select/dist/select.js +++ b/js/vendor/angular-ui-select/dist/select.js @@ -1,7 +1,7 @@ /*! * ui-select * http://github.com/angular-ui/ui-select - * Version: 0.16.0 - 2016-03-23T20:51:56.609Z + * Version: 0.19.7 - 2017-04-15T14:28:36.649Z * License: MIT */ @@ -41,7 +41,7 @@ var KEY = { return true; } - if (e.metaKey) return true; + if (e.metaKey || e.ctrlKey || e.altKey) return true; return false; }, @@ -64,6 +64,10 @@ var KEY = { } }; +function isNil(value) { + return angular.isUndefined(value) || value === null; +} + /** * Add querySelectorAll() to jqLite. * @@ -111,10 +115,15 @@ var uis = angular.module('ui.select', []) closeOnSelect: true, skipFocusser: false, dropdownPosition: 'auto', + removeSelected: true, + resetSearchInput: true, generateId: function() { return latestId++; }, - appendToBody: false + appendToBody: false, + spinnerEnabled: false, + spinnerClass: 'glyphicon glyphicon-refresh ui-select-spin', + backspaceReset: true }) // See Rename minErr and make it accessible from outside https://github.com/angular/angular.js/issues/6913 @@ -175,6 +184,31 @@ var uis = angular.module('ui.select', []) }; }]); +/** + * Debounces functions + * + * Taken from UI Bootstrap $$debounce source code + * See https://github.com/angular-ui/bootstrap/blob/master/src/debounce/debounce.js + * + */ +uis.factory('$$uisDebounce', ['$timeout', function($timeout) { + return function(callback, debounceTime) { + var timeoutPromise; + + return function() { + var self = this; + var args = Array.prototype.slice.call(arguments); + if (timeoutPromise) { + $timeout.cancel(timeoutPromise); + } + + timeoutPromise = $timeout(function() { + callback.apply(self, args); + }, debounceTime); + }; + }; +}]); + uis.directive('uiSelectChoices', ['uiSelectConfig', 'uisRepeatParser', 'uiSelectMinErr', '$compile', '$window', function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile, $window) { @@ -197,47 +231,46 @@ uis.directive('uiSelectChoices', if (!tAttrs.repeat) throw uiSelectMinErr('repeat', "Expected 'repeat' expression."); - return function link(scope, element, attrs, $select, transcludeFn) { + // var repeat = RepeatParser.parse(attrs.repeat); + var groupByExp = tAttrs.groupBy; + var groupFilterExp = tAttrs.groupFilter; + + if (groupByExp) { + var groups = tElement.querySelectorAll('.ui-select-choices-group'); + if (groups.length !== 1) throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-group but got '{0}'.", groups.length); + groups.attr('ng-repeat', RepeatParser.getGroupNgRepeatExpression()); + } + + var parserResult = RepeatParser.parse(tAttrs.repeat); + + var choices = tElement.querySelectorAll('.ui-select-choices-row'); + if (choices.length !== 1) { + throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row but got '{0}'.", choices.length); + } + + choices.attr('ng-repeat', parserResult.repeatExpression(groupByExp)) + .attr('ng-if', '$select.open'); //Prevent unnecessary watches when dropdown is closed + + + var rowsInner = tElement.querySelectorAll('.ui-select-choices-row-inner'); + if (rowsInner.length !== 1) { + throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row-inner but got '{0}'.", rowsInner.length); + } + rowsInner.attr('uis-transclude-append', ''); //Adding uisTranscludeAppend directive to row element after choices element has ngRepeat + + // If IE8 then need to target rowsInner to apply the ng-click attr as choices will not capture the event. + var clickTarget = $window.document.addEventListener ? choices : rowsInner; + clickTarget.attr('ng-click', '$select.select(' + parserResult.itemName + ',$select.skipFocusser,$event)'); + + return function link(scope, element, attrs, $select) { - // var repeat = RepeatParser.parse(attrs.repeat); - var groupByExp = attrs.groupBy; - var groupFilterExp = attrs.groupFilter; $select.parseRepeatAttr(attrs.repeat, groupByExp, groupFilterExp); //Result ready at $select.parserResult - $select.disableChoiceExpression = attrs.uiDisableChoice; $select.onHighlightCallback = attrs.onHighlight; - + $select.minimumInputLength = parseInt(attrs.minimumInputLength) || 0; $select.dropdownPosition = attrs.position ? attrs.position.toLowerCase() : uiSelectConfig.dropdownPosition; - if(groupByExp) { - var groups = element.querySelectorAll('.ui-select-choices-group'); - if (groups.length !== 1) throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-group but got '{0}'.", groups.length); - groups.attr('ng-repeat', RepeatParser.getGroupNgRepeatExpression()); - } - - var choices = element.querySelectorAll('.ui-select-choices-row'); - if (choices.length !== 1) { - throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row but got '{0}'.", choices.length); - } - - choices.attr('ng-repeat', $select.parserResult.repeatExpression(groupByExp)) - .attr('ng-if', '$select.open'); //Prevent unnecessary watches when dropdown is closed - if ($window.document.addEventListener) { //crude way to exclude IE8, specifically, which also cannot capture events - choices.attr('ng-mouseenter', '$select.setActiveItem('+$select.parserResult.itemName +')') - .attr('ng-click', '$select.select(' + $select.parserResult.itemName + ',$select.skipFocusser,$event)'); - } - - var rowsInner = element.querySelectorAll('.ui-select-choices-row-inner'); - if (rowsInner.length !== 1) throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row-inner but got '{0}'.", rowsInner.length); - rowsInner.attr('uis-transclude-append', ''); //Adding uisTranscludeAppend directive to row element after choices element has ngRepeat - if (!$window.document.addEventListener) { //crude way to target IE8, specifically, which also cannot capture events - so event bindings must be here - rowsInner.attr('ng-mouseenter', '$select.setActiveItem('+$select.parserResult.itemName +')') - .attr('ng-click', '$select.select(' + $select.parserResult.itemName + ',$select.skipFocusser,$event)'); - } - - $compile(element, transcludeFn)(scope); //Passing current transcludeFn to be able to append elements correctly from uisTranscludeAppend - scope.$watch('$select.search', function(newValue) { if(newValue && !$select.open && $select.multiple) $select.activate(false, true); $select.activeIndex = $select.tagging.isActivated ? -1 : 0; @@ -253,6 +286,15 @@ uis.directive('uiSelectChoices', var refreshDelay = scope.$eval(attrs.refreshDelay); $select.refreshDelay = refreshDelay !== undefined ? refreshDelay : uiSelectConfig.refreshDelay; }); + + scope.$watch('$select.open', function(open) { + if (open) { + tElement.attr('role', 'listbox'); + $select.refresh(attrs.refresh); + } else { + element.removeAttr('role'); + } + }); }; } }; @@ -265,8 +307,8 @@ uis.directive('uiSelectChoices', * put as much logic in the controller (instead of the link functions) as possible so it can be easily tested. */ uis.controller('uiSelectCtrl', - ['$scope', '$element', '$timeout', '$filter', 'uisRepeatParser', 'uiSelectMinErr', 'uiSelectConfig', '$parse', '$injector', '$window', - function($scope, $element, $timeout, $filter, RepeatParser, uiSelectMinErr, uiSelectConfig, $parse, $injector, $window) { + ['$scope', '$element', '$timeout', '$filter', '$$uisDebounce', 'uisRepeatParser', 'uiSelectMinErr', 'uiSelectConfig', '$parse', '$injector', '$window', + function($scope, $element, $timeout, $filter, $$uisDebounce, RepeatParser, uiSelectMinErr, uiSelectConfig, $parse, $injector, $window) { var ctrl = this; @@ -277,8 +319,11 @@ uis.controller('uiSelectCtrl', ctrl.sortable = uiSelectConfig.sortable; ctrl.refreshDelay = uiSelectConfig.refreshDelay; ctrl.paste = uiSelectConfig.paste; - - ctrl.removeSelected = false; //If selected item(s) should be removed from dropdown list + ctrl.resetSearchInput = uiSelectConfig.resetSearchInput; + ctrl.refreshing = false; + ctrl.spinnerEnabled = uiSelectConfig.spinnerEnabled; + ctrl.spinnerClass = uiSelectConfig.spinnerClass; + ctrl.removeSelected = uiSelectConfig.removeSelected; //If selected item(s) should be removed from dropdown list ctrl.closeOnSelect = true; //Initialized inside uiSelect directive link function ctrl.skipFocusser = false; //Set to true to avoid returning focus to ctrl when item is selected ctrl.search = EMPTY_SEARCH; @@ -294,7 +339,6 @@ uis.controller('uiSelectCtrl', ctrl.dropdownPosition = 'auto'; ctrl.focusser = undefined; //Reference to input element used to handle focus events - ctrl.resetSearchInput = true; ctrl.multiple = undefined; // Initialized inside uiSelect directive link function ctrl.disableChoiceExpression = undefined; // Initialized inside uiSelectChoices directive link function ctrl.tagging = {isActivated: false, fct: undefined}; @@ -302,6 +346,7 @@ uis.controller('uiSelectCtrl', ctrl.lockChoiceExpression = undefined; // Initialized inside uiSelectMatch directive link function ctrl.clickTriggeredSelect = false; ctrl.$filter = $filter; + ctrl.$element = $element; // Use $injector to check for $animate and store a reference to it ctrl.$animate = (function () { @@ -319,7 +364,7 @@ uis.controller('uiSelectCtrl', } ctrl.isEmpty = function() { - return angular.isUndefined(ctrl.selected) || ctrl.selected === null || ctrl.selected === '' || (ctrl.multiple && ctrl.selected.length === 0); + return isNil(ctrl.selected) || ctrl.selected === '' || (ctrl.multiple && ctrl.selected.length === 0); }; function _findIndex(collection, predicate, thisArg){ @@ -342,7 +387,7 @@ uis.controller('uiSelectCtrl', // Most of the time the user does not want to empty the search input when in typeahead mode function _resetSearchInput() { - if (ctrl.resetSearchInput || (ctrl.resetSearchInput === undefined && uiSelectConfig.resetSearchInput)) { + if (ctrl.resetSearchInput) { ctrl.search = EMPTY_SEARCH; //reset activeIndex if (ctrl.selected && ctrl.items.length && !ctrl.multiple) { @@ -371,11 +416,8 @@ uis.controller('uiSelectCtrl', if(!avoidReset) _resetSearchInput(); $scope.$broadcast('uis:activate'); - ctrl.open = true; - ctrl.activeIndex = ctrl.activeIndex >= ctrl.items.length ? 0 : ctrl.activeIndex; - // ensure that the index is set to zero for tagging variants // that where first option is auto-selected if ( ctrl.activeIndex === -1 && ctrl.taggingLabel !== false ) { @@ -383,15 +425,29 @@ uis.controller('uiSelectCtrl', } var container = $element.querySelectorAll('.ui-select-choices-content'); + var searchInput = $element.querySelectorAll('.ui-select-search'); if (ctrl.$animate && ctrl.$animate.on && ctrl.$animate.enabled(container[0])) { - ctrl.$animate.on('enter', container[0], function (elem, phase) { - if (phase === 'close') { + var animateHandler = function(elem, phase) { + if (phase === 'start' && ctrl.items.length === 0) { // Only focus input after the animation has finished + ctrl.$animate.off('removeClass', searchInput[0], animateHandler); + $timeout(function () { + ctrl.focusSearchInput(initSearchValue); + }); + } else if (phase === 'close') { + // Only focus input after the animation has finished + ctrl.$animate.off('enter', container[0], animateHandler); $timeout(function () { ctrl.focusSearchInput(initSearchValue); }); } - }); + }; + + if (ctrl.items.length > 0) { + ctrl.$animate.on('enter', container[0], animateHandler); + } else { + ctrl.$animate.on('removeClass', searchInput[0], animateHandler); + } } else { $timeout(function () { ctrl.focusSearchInput(initSearchValue); @@ -401,6 +457,10 @@ uis.controller('uiSelectCtrl', }); } } + else if (ctrl.open && !ctrl.searchEnabled) { + // Close the selection if we don't have search enabled, and we click on the select again + ctrl.close(); + } }; ctrl.focusSearchInput = function (initSearchValue) { @@ -443,7 +503,7 @@ uis.controller('uiSelectCtrl', } function setPlainItems(items) { - ctrl.items = items; + ctrl.items = items || []; } ctrl.setItemsFn = groupByExp ? updateGroups : setPlainItems; @@ -480,14 +540,14 @@ uis.controller('uiSelectCtrl', data = data || ctrl.parserResult.source($scope); var selectedItems = ctrl.selected; //TODO should implement for single mode removeSelected - if (ctrl.isEmpty() || (angular.isArray(selectedItems) && !selectedItems.length) || !ctrl.removeSelected) { + if (ctrl.isEmpty() || (angular.isArray(selectedItems) && !selectedItems.length) || !ctrl.multiple || !ctrl.removeSelected) { ctrl.setItemsFn(data); }else{ - if ( data !== undefined ) { + if ( data !== undefined && data !== null ) { var filteredItems = data.filter(function(i) { - return selectedItems.every(function(selectedItem) { + return angular.isArray(selectedItems) ? selectedItems.every(function(selectedItem) { return !angular.equals(i, selectedItem); - }); + }) : !angular.equals(i, selectedItems); }); ctrl.setItemsFn(filteredItems); } @@ -495,6 +555,7 @@ uis.controller('uiSelectCtrl', if (ctrl.dropdownPosition === 'auto' || ctrl.dropdownPosition === 'up'){ $scope.calculateDropdownPos(); } + $scope.$broadcast('uis:refresh'); }; // See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L259 @@ -511,7 +572,11 @@ uis.controller('uiSelectCtrl', //Remove already selected items (ex: while searching) //TODO Should add a test ctrl.refreshItems(items); - ctrl.ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters + + //update the view value with fresh data from items, if there is a valid model value + if(angular.isDefined(ctrl.ngModel.$modelValue)) { + ctrl.ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters + } } } }); @@ -527,7 +592,6 @@ uis.controller('uiSelectCtrl', */ ctrl.refresh = function(refreshAttr) { if (refreshAttr !== undefined) { - // Debounce // See https://github.com/angular-ui/bootstrap/blob/0.10.0/src/typeahead/typeahead.js#L155 // FYI AngularStrap typeahead does not have debouncing: https://github.com/mgcrea/angular-strap/blob/v2.0.0-rc.4/src/typeahead/typeahead.js#L177 @@ -535,7 +599,15 @@ uis.controller('uiSelectCtrl', $timeout.cancel(_refreshDelayPromise); } _refreshDelayPromise = $timeout(function() { - $scope.$eval(refreshAttr); + if ($scope.$select.search.length >= $scope.$select.minimumInputLength) { + var refreshPromise = $scope.$eval(refreshAttr); + if (refreshPromise && angular.isFunction(refreshPromise.then) && !ctrl.refreshing) { + ctrl.refreshing = true; + refreshPromise.finally(function() { + ctrl.refreshing = false; + }); + } + } }, ctrl.refreshDelay); } }; @@ -547,7 +619,7 @@ uis.controller('uiSelectCtrl', var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]); var isActive = itemIndex == ctrl.activeIndex; - if ( !isActive || ( itemIndex < 0 && ctrl.taggingLabel !== false ) ||( itemIndex < 0 && ctrl.taggingLabel === false) ) { + if ( !isActive || itemIndex < 0 ) { return false; } @@ -558,18 +630,49 @@ uis.controller('uiSelectCtrl', return isActive; }; + var _isItemSelected = function (item) { + return (ctrl.selected && angular.isArray(ctrl.selected) && + ctrl.selected.filter(function (selection) { return angular.equals(selection, item); }).length > 0); + }; + + var disabledItems = []; + + function _updateItemDisabled(item, isDisabled) { + var disabledItemIndex = disabledItems.indexOf(item); + if (isDisabled && disabledItemIndex === -1) { + disabledItems.push(item); + } + + if (!isDisabled && disabledItemIndex > -1) { + disabledItems.splice(disabledItemIndex, 1); + } + } + + function _isItemDisabled(item) { + return disabledItems.indexOf(item) > -1; + } + ctrl.isDisabled = function(itemScope) { if (!ctrl.open) return; - var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]); + var item = itemScope[ctrl.itemProperty]; + var itemIndex = ctrl.items.indexOf(item); var isDisabled = false; - var item; - if (itemIndex >= 0 && !angular.isUndefined(ctrl.disableChoiceExpression)) { - item = ctrl.items[itemIndex]; - isDisabled = !!(itemScope.$eval(ctrl.disableChoiceExpression)); // force the boolean value - item._uiSelectChoiceDisabled = isDisabled; // store this for later reference + if (itemIndex >= 0 && (angular.isDefined(ctrl.disableChoiceExpression) || ctrl.multiple)) { + + if (item.isTag) return false; + + if (ctrl.multiple) { + isDisabled = _isItemSelected(item); + } + + if (!isDisabled && angular.isDefined(ctrl.disableChoiceExpression)) { + isDisabled = !!(itemScope.$eval(ctrl.disableChoiceExpression)); + } + + _updateItemDisabled(item, isDisabled); } return isDisabled; @@ -578,16 +681,23 @@ uis.controller('uiSelectCtrl', // When the user selects an item with ENTER or clicks the dropdown ctrl.select = function(item, skipFocusser, $event) { - if (item === undefined || !item._uiSelectChoiceDisabled) { + if (isNil(item) || !_isItemDisabled(item)) { if ( ! ctrl.items && ! ctrl.search && ! ctrl.tagging.isActivated) return; - if (!item || !item._uiSelectChoiceDisabled) { - if(ctrl.tagging.isActivated) { - // if taggingLabel is disabled, we pull from ctrl.search val + if (!item || !_isItemDisabled(item)) { + // if click is made on existing item, prevent from tagging, ctrl.search does not matter + ctrl.clickTriggeredSelect = false; + if($event && ($event.type === 'click' || $event.type === 'touchend') && item) + ctrl.clickTriggeredSelect = true; + + if(ctrl.tagging.isActivated && ctrl.clickTriggeredSelect === false) { + // if taggingLabel is disabled and item is undefined we pull from ctrl.search if ( ctrl.taggingLabel === false ) { if ( ctrl.activeIndex < 0 ) { - item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : ctrl.search; + if (item === undefined) { + item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : ctrl.search; + } if (!item || angular.equals( ctrl.items[0], item ) ) { return; } @@ -616,30 +726,17 @@ uis.controller('uiSelectCtrl', } } // search ctrl.selected for dupes potentially caused by tagging and return early if found - if ( ctrl.selected && angular.isArray(ctrl.selected) && ctrl.selected.filter( function (selection) { return angular.equals(selection, item); }).length > 0 ) { + if (_isItemSelected(item)) { ctrl.close(skipFocusser); return; } } - + _resetSearchInput(); $scope.$broadcast('uis:select', item); - var locals = {}; - locals[ctrl.parserResult.itemName] = item; - - $timeout(function(){ - ctrl.onSelectCallback($scope, { - $item: item, - $model: ctrl.parserResult.modelMapper($scope, locals) - }); - }); - if (ctrl.closeOnSelect) { ctrl.close(skipFocusser); } - if ($event && $event.type === 'click') { - ctrl.clickTriggeredSelect = true; - } } } }; @@ -648,9 +745,8 @@ uis.controller('uiSelectCtrl', ctrl.close = function(skipFocusser) { if (!ctrl.open) return; if (ctrl.ngModel && ctrl.ngModel.$setTouched) ctrl.ngModel.$setTouched(); - _resetSearchInput(); ctrl.open = false; - + _resetSearchInput(); $scope.$broadcast('uis:close', skipFocusser); }; @@ -660,7 +756,7 @@ uis.controller('uiSelectCtrl', }; ctrl.clear = function($event) { - ctrl.select(undefined); + ctrl.select(null); $event.stopPropagation(); $timeout(function() { ctrl.focusser[0].focus(); @@ -678,22 +774,60 @@ uis.controller('uiSelectCtrl', } }; - ctrl.isLocked = function(itemScope, itemIndex) { - var isLocked, item = ctrl.selected[itemIndex]; + // Set default function for locked choices - avoids unnecessary + // logic if functionality is not being used + ctrl.isLocked = function () { + return false; + }; - if (item && !angular.isUndefined(ctrl.lockChoiceExpression)) { - isLocked = !!(itemScope.$eval(ctrl.lockChoiceExpression)); // force the boolean value - item._uiSelectChoiceLocked = isLocked; // store this for later reference + $scope.$watch(function () { + return angular.isDefined(ctrl.lockChoiceExpression) && ctrl.lockChoiceExpression !== ""; + }, _initaliseLockedChoices); + + function _initaliseLockedChoices(doInitalise) { + if(!doInitalise) return; + + var lockedItems = []; + + function _updateItemLocked(item, isLocked) { + var lockedItemIndex = lockedItems.indexOf(item); + if (isLocked && lockedItemIndex === -1) { + lockedItems.push(item); + } + + if (!isLocked && lockedItemIndex > -1) { + lockedItems.splice(lockedItemIndex, 1); + } + } + + function _isItemlocked(item) { + return lockedItems.indexOf(item) > -1; + } + + ctrl.isLocked = function (itemScope, itemIndex) { + var isLocked = false, + item = ctrl.selected[itemIndex]; + + if(item) { + if (itemScope) { + isLocked = !!(itemScope.$eval(ctrl.lockChoiceExpression)); + _updateItemLocked(item, isLocked); + } else { + isLocked = _isItemlocked(item); + } } return isLocked; - }; + }; + } + var sizeWatch = null; + var updaterScheduled = false; ctrl.sizeSearchInput = function() { var input = ctrl.searchInput[0], - container = ctrl.searchInput.parent().parent()[0], + container = ctrl.$element[0], calculateContainerWidth = function() { // Return the container width only if the search input is visible return container.clientWidth * !!input.offsetParent; @@ -702,7 +836,7 @@ uis.controller('uiSelectCtrl', if (containerWidth === 0) { return false; } - var inputWidth = containerWidth - input.offsetLeft - 10; + var inputWidth = containerWidth - input.offsetLeft; if (inputWidth < 50) inputWidth = containerWidth; ctrl.searchInput.css('width', inputWidth+'px'); return true; @@ -711,12 +845,18 @@ uis.controller('uiSelectCtrl', ctrl.searchInput.css('width', '10px'); $timeout(function() { //Give tags time to render correctly if (sizeWatch === null && !updateIfVisible(calculateContainerWidth())) { - sizeWatch = $scope.$watch(calculateContainerWidth, function(containerWidth) { - if (updateIfVisible(containerWidth)) { - sizeWatch(); - sizeWatch = null; + sizeWatch = $scope.$watch(function() { + if (!updaterScheduled) { + updaterScheduled = true; + $scope.$$postDigest(function() { + updaterScheduled = false; + if (updateIfVisible(calculateContainerWidth())) { + sizeWatch(); + sizeWatch = null; + } + }); } - }); + }, angular.noop); } }); }; @@ -726,11 +866,22 @@ uis.controller('uiSelectCtrl', switch (key) { case KEY.DOWN: if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode - else if (ctrl.activeIndex < ctrl.items.length - 1) { ctrl.activeIndex++; } + else if (ctrl.activeIndex < ctrl.items.length - 1) { + var idx = ++ctrl.activeIndex; + while(_isItemDisabled(ctrl.items[idx]) && idx < ctrl.items.length) { + ctrl.activeIndex = ++idx; + } + } break; case KEY.UP: + var minActiveIndex = (ctrl.search.length === 0 && ctrl.tagging.isActivated) ? -1 : 0; if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode - else if (ctrl.activeIndex > 0 || (ctrl.search.length === 0 && ctrl.tagging.isActivated && ctrl.activeIndex > -1)) { ctrl.activeIndex--; } + else if (ctrl.activeIndex > minActiveIndex) { + var idxmin = --ctrl.activeIndex; + while(_isItemDisabled(ctrl.items[idxmin]) && idxmin > minActiveIndex) { + ctrl.activeIndex = --idxmin; + } + } break; case KEY.TAB: if (!ctrl.multiple || ctrl.open) ctrl.select(ctrl.items[ctrl.activeIndex], true); @@ -761,17 +912,15 @@ uis.controller('uiSelectCtrl', e.stopPropagation(); } - // if(~[KEY.ESC,KEY.TAB].indexOf(key)){ - // //TODO: SEGURO? - // ctrl.close(); - // } - $scope.$apply(function() { var tagged = false; if (ctrl.items.length > 0 || ctrl.tagging.isActivated) { - _handleDropDownSelection(key); + if(!_handleDropDownSelection(key) && !ctrl.searchEnabled) { + e.preventDefault(); + e.stopPropagation(); + } if ( ctrl.taggingTokens.isActivated ) { for (var i = 0; i < ctrl.taggingTokens.tokens.length; i++) { if ( ctrl.taggingTokens.tokens[i] === KEY.MAP[e.keyCode] ) { @@ -822,20 +971,27 @@ uis.controller('uiSelectCtrl', if (data && data.length > 0) { // If tagging try to split by tokens and add items if (ctrl.taggingTokens.isActivated) { - var separator = KEY.toSeparator(ctrl.taggingTokens.tokens[0]); - var items = data.split(separator || ctrl.taggingTokens.tokens[0]); // split by first token only - if (items && items.length > 0) { - var oldsearch = ctrl.search; - angular.forEach(items, function (item) { - var newItem = ctrl.tagging.fct ? ctrl.tagging.fct(item) : item; - if (newItem) { - ctrl.select(newItem, true); - } - }); - ctrl.search = oldsearch || EMPTY_SEARCH; - e.preventDefault(); - e.stopPropagation(); + var items = []; + for (var i = 0; i < ctrl.taggingTokens.tokens.length; i++) { // split by first token that is contained in data + var separator = KEY.toSeparator(ctrl.taggingTokens.tokens[i]) || ctrl.taggingTokens.tokens[i]; + if (data.indexOf(separator) > -1) { + items = data.split(separator); + break; // only split by one token + } } + if (items.length === 0) { + items = [data]; + } + var oldsearch = ctrl.search; + angular.forEach(items, function (item) { + var newItem = ctrl.tagging.fct ? ctrl.tagging.fct(item) : item; + if (newItem) { + ctrl.select(newItem, true); + } + }); + ctrl.search = oldsearch || EMPTY_SEARCH; + e.preventDefault(); + e.stopPropagation(); } else if (ctrl.paste) { ctrl.paste(data); ctrl.search = EMPTY_SEARCH; @@ -877,14 +1033,28 @@ uis.controller('uiSelectCtrl', } } + var onResize = $$uisDebounce(function() { + ctrl.sizeSearchInput(); + }, 50); + + angular.element($window).bind('resize', onResize); + $scope.$on('$destroy', function() { ctrl.searchInput.off('keyup keydown tagged blur paste'); + angular.element($window).off('resize', onResize); }); - angular.element($window).bind('resize', function() { - ctrl.sizeSearchInput(); + $scope.$watch('$select.activeIndex', function(activeIndex) { + if (activeIndex) + $element.find('input').attr( + 'aria-activedescendant', + 'ui-select-choices-row-' + ctrl.generatedId + '-' + activeIndex); }); + $scope.$watch('$select.open', function(open) { + if (!open) + $element.find('input').removeAttr('aria-activedescendant'); + }); }]); uis.directive('uiSelect', @@ -949,9 +1119,6 @@ uis.directive('uiSelect', $select.onSelectCallback = $parse(attrs.onSelect); $select.onRemoveCallback = $parse(attrs.onRemove); - //Limit the number of selections allowed - $select.limit = (angular.isDefined(attrs.limit)) ? parseInt(attrs.limit, 10) : undefined; - //Set reference to ngModel from uiSelectCtrl $select.ngModel = ngModel; @@ -966,9 +1133,8 @@ uis.directive('uiSelect', }); } - scope.$watch('searchEnabled', function() { - var searchEnabled = scope.$eval(attrs.searchEnabled); - $select.searchEnabled = searchEnabled !== undefined ? searchEnabled : uiSelectConfig.searchEnabled; + scope.$watch(function () { return scope.$eval(attrs.searchEnabled); }, function(newVal) { + $select.searchEnabled = newVal !== undefined ? newVal : uiSelectConfig.searchEnabled; }); scope.$watch('sortable', function() { @@ -976,6 +1142,22 @@ uis.directive('uiSelect', $select.sortable = sortable !== undefined ? sortable : uiSelectConfig.sortable; }); + attrs.$observe('backspaceReset', function() { + // $eval() is needed otherwise we get a string instead of a boolean + var backspaceReset = scope.$eval(attrs.backspaceReset); + $select.backspaceReset = backspaceReset !== undefined ? backspaceReset : true; + }); + + attrs.$observe('limit', function() { + //Limit the number of selections allowed + $select.limit = (angular.isDefined(attrs.limit)) ? parseInt(attrs.limit, 10) : undefined; + }); + + scope.$watch('removeSelected', function() { + var removeSelected = scope.$eval(attrs.removeSelected); + $select.removeSelected = removeSelected !== undefined ? removeSelected : uiSelectConfig.removeSelected; + }); + attrs.$observe('disabled', function() { // No need to use $eval() (thanks to ng-disabled) since we already get a boolean instead of a string $select.disabled = attrs.disabled !== undefined ? attrs.disabled : false; @@ -1026,6 +1208,17 @@ uis.directive('uiSelect', } }); + attrs.$observe('spinnerEnabled', function() { + // $eval() is needed otherwise we get a string instead of a boolean + var spinnerEnabled = scope.$eval(attrs.spinnerEnabled); + $select.spinnerEnabled = spinnerEnabled !== undefined ? spinnerEnabled : uiSelectConfig.spinnerEnabled; + }); + + attrs.$observe('spinnerClass', function() { + var spinnerClass = attrs.spinnerClass; + $select.spinnerClass = spinnerClass !== undefined ? attrs.spinnerClass : uiSelectConfig.spinnerClass; + }); + //Automatically gets focus when loaded if (angular.isDefined(attrs.autofocus)){ $timeout(function(){ @@ -1103,6 +1296,13 @@ uis.directive('uiSelect', throw uiSelectMinErr('transcluded', "Expected 1 .ui-select-choices but got '{0}'.", transcludedChoices.length); } element.querySelectorAll('.ui-select-choices').replaceWith(transcludedChoices); + + var transcludedNoChoice = transcluded.querySelectorAll('.ui-select-no-choice'); + transcludedNoChoice.removeAttr('ui-select-no-choice'); //To avoid loop in case directive as attr + transcludedNoChoice.removeAttr('data-ui-select-no-choice'); // Properly handle HTML5 data-attributes + if (transcludedNoChoice.length == 1) { + element.querySelectorAll('.ui-select-no-choice').replaceWith(transcludedNoChoice); + } }); // Support for appending the select field to the body when its open @@ -1205,57 +1405,75 @@ uis.directive('uiSelect', }; - scope.calculateDropdownPos = function(){ + var calculateDropdownPosAfterAnimation = function() { + // Delay positioning the dropdown until all choices have been added so its height is correct. + $timeout(function() { + if ($select.dropdownPosition === 'up') { + //Go UP + setDropdownPosUp(); + } else { + //AUTO + element.removeClass(directionUpClassName); + var offset = uisOffset(element); + var offsetDropdown = uisOffset(dropdown); + + //https://code.google.com/p/chromium/issues/detail?id=342307#c4 + var scrollTop = $document[0].documentElement.scrollTop || $document[0].body.scrollTop; //To make it cross browser (blink, webkit, IE, Firefox). + + // Determine if the direction of the dropdown needs to be changed. + if (offset.top + offset.height + offsetDropdown.height > scrollTop + $document[0].documentElement.clientHeight) { + //Go UP + setDropdownPosUp(offset, offsetDropdown); + }else{ + //Go DOWN + setDropdownPosDown(offset, offsetDropdown); + } + } + + // Display the dropdown once it has been positioned. + dropdown[0].style.opacity = 1; + }); + }; + + var opened = false; + + scope.calculateDropdownPos = function() { if ($select.open) { dropdown = angular.element(element).querySelectorAll('.ui-select-dropdown'); + if (dropdown.length === 0) { return; } - // Hide the dropdown so there is no flicker until $timeout is done executing. - dropdown[0].style.opacity = 0; + // Hide the dropdown so there is no flicker until $timeout is done executing. + if ($select.search === '' && !opened) { + dropdown[0].style.opacity = 0; + opened = true; + } - // Delay positioning the dropdown until all choices have been added so its height is correct. - $timeout(function(){ + if (!uisOffset(dropdown).height && $select.$animate && $select.$animate.on && $select.$animate.enabled(dropdown)) { + var needsCalculated = true; - if ($select.dropdownPosition === 'up'){ - //Go UP - setDropdownPosUp(); - - }else{ //AUTO - - element.removeClass(directionUpClassName); - - var offset = uisOffset(element); - var offsetDropdown = uisOffset(dropdown); - - //https://code.google.com/p/chromium/issues/detail?id=342307#c4 - var scrollTop = $document[0].documentElement.scrollTop || $document[0].body.scrollTop; //To make it cross browser (blink, webkit, IE, Firefox). - - // Determine if the direction of the dropdown needs to be changed. - if (offset.top + offset.height + offsetDropdown.height > scrollTop + $document[0].documentElement.clientHeight) { - //Go UP - setDropdownPosUp(offset, offsetDropdown); - }else{ - //Go DOWN - setDropdownPosDown(offset, offsetDropdown); + $select.$animate.on('enter', dropdown, function (elem, phase) { + if (phase === 'close' && needsCalculated) { + calculateDropdownPosAfterAnimation(); + needsCalculated = false; } - - } - - // Display the dropdown once it has been positioned. - dropdown[0].style.opacity = 1; - }); + }); + } else { + calculateDropdownPosAfterAnimation(); + } } else { - if (dropdown === null || dropdown.length === 0) { - return; - } + if (dropdown === null || dropdown.length === 0) { + return; + } - // Reset the position of the dropdown. - dropdown[0].style.position = ''; - dropdown[0].style.top = ''; - element.removeClass(directionUpClassName); + // Reset the position of the dropdown. + dropdown[0].style.opacity = 0; + dropdown[0].style.position = ''; + dropdown[0].style.top = ''; + element.removeClass(directionUpClassName); } }; }; @@ -1273,10 +1491,12 @@ uis.directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) { // Needed so the uiSelect can detect the transcluded content tElement.addClass('ui-select-match'); + var parent = tElement.parent(); // Gets theme attribute from parent (ui-select) - var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; - var multi = tElement.parent().attr('multiple'); - return theme + (multi ? '/match-multiple.tpl.html' : '/match.tpl.html'); + var theme = getAttribute(parent, 'theme') || uiSelectConfig.theme; + var multi = angular.isDefined(getAttribute(parent, 'multiple')); + + return theme + (multi ? '/match-multiple.tpl.html' : '/match.tpl.html'); }, link: function(scope, element, attrs, $select) { $select.lockChoiceExpression = attrs.uiLockChoice; @@ -1297,6 +1517,17 @@ uis.directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) { } }; + + function getAttribute(elem, attribute) { + if (elem[0].hasAttribute(attribute)) + return elem.attr(attribute); + + if (elem[0].hasAttribute('data-' + attribute)) + return elem.attr('data-' + attribute); + + if (elem[0].hasAttribute('x-' + attribute)) + return elem.attr('x-' + attribute); + } }]); uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelectMinErr, $timeout) { @@ -1327,17 +1558,21 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec //Remove already selected items //e.g. When user clicks on a selection, the selected array changes and //the dropdown should remove that item - $select.refreshItems(); - $select.sizeSearchInput(); + if($select.refreshItems){ + $select.refreshItems(); + } + if($select.sizeSearchInput){ + $select.sizeSearchInput(); + } }; // Remove item from multiple select ctrl.removeChoice = function(index){ - var removedChoice = $select.selected[index]; + // if the choice is locked, don't remove it + if($select.isLocked(null, index)) return false; - // if the choice is locked, can't remove it - if(removedChoice._uiSelectChoiceLocked) return; + var removedChoice = $select.selected[index]; var locals = {}; locals[$select.parserResult.itemName] = removedChoice; @@ -1356,6 +1591,7 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec ctrl.updateModel(); + return true; }; ctrl.getPlaceholder = function(){ @@ -1377,7 +1613,6 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec //$select.selected = raw selected objects (ignoring any property binding) $select.multiple = true; - $select.removeSelected = true; //Input that will handle focus $select.focusInput = $select.searchInput; @@ -1403,7 +1638,7 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec // From model --> view ngModel.$formatters.unshift(function (inputValue) { - var data = $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search + var data = $select.parserResult && $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search locals = {}, result; if (!data) return inputValue; @@ -1447,7 +1682,10 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec //Watch for external model changes scope.$watchCollection(function(){ return ngModel.$modelValue; }, function(newValue, oldValue) { if (oldValue != newValue){ - ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters + //update the view value with fresh data from items, if there is a valid model value + if(angular.isDefined(ngModel.$modelValue)) { + ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters + } $selectMultiple.refreshComponent(); } }); @@ -1456,8 +1694,8 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec // Make sure that model value is array if(!angular.isArray(ngModel.$viewValue)){ // Have tolerance for null or undefined values - if(angular.isUndefined(ngModel.$viewValue) || ngModel.$viewValue === null){ - $select.selected = []; + if (isNil(ngModel.$viewValue)){ + ngModel.$viewValue = []; } else { throw uiSelectMinErr('multiarr', "Expected model value to be array but got '{0}'", ngModel.$viewValue); } @@ -1472,6 +1710,15 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec return; } $select.selected.push(item); + var locals = {}; + locals[$select.parserResult.itemName] = item; + + $timeout(function(){ + $select.onSelectCallback(scope, { + $item: item, + $model: $select.parserResult.modelMapper(scope, locals) + }); + }); $selectMultiple.updateModel(); }); @@ -1541,11 +1788,16 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec case KEY.BACKSPACE: // Remove selected item and select previous/first if(~$selectMultiple.activeMatchIndex){ - $selectMultiple.removeChoice(curr); - return prev; + if($selectMultiple.removeChoice(curr)) { + return prev; + } else { + return curr; + } + + } else { + // If nothing yet selected, select last item + return last; } - // Select last item - else return last; break; case KEY.DELETE: // Remove selected item and select next item @@ -1609,7 +1861,7 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec // verify the new tag doesn't match the value of a possible selection choice or an already selected item. if ( stashArr.some(function (origItem) { - return angular.equals(origItem, $select.tagging.fct($select.search)); + return angular.equals(origItem, newItem); }) || $select.selected.some(function (origItem) { return angular.equals(origItem, newItem); @@ -1621,7 +1873,7 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec }); return; } - newItem.isTag = true; + if (newItem) newItem.isTag = true; // handle newItem string and stripping dupes in tagging string context } else { // find any tagging items already in the $select.items array and store them @@ -1670,12 +1922,23 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec items = items.slice(dupeIndex+1,items.length-1); } else { items = []; - items.push(newItem); + if (newItem) items.push(newItem); items = items.concat(stashArr); } scope.$evalAsync( function () { $select.activeIndex = 0; $select.items = items; + + if ($select.isGrouped) { + // update item references in groups, so that indexOf will work after angular.copy + var itemsWithoutTag = newItem ? items.slice(1) : items; + $select.setItemsFn(itemsWithoutTag); + if (newItem) { + // add tag item as a new group + $select.items.unshift(newItem); + $select.groups.unshift({name: '', items: [newItem], tagging: true}); + } + } }); } }); @@ -1728,6 +1991,24 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec }; }]); +uis.directive('uiSelectNoChoice', + ['uiSelectConfig', function (uiSelectConfig) { + return { + restrict: 'EA', + require: '^uiSelect', + replace: true, + transclude: true, + templateUrl: function (tElement) { + // Needed so the uiSelect can detect the transcluded content + tElement.addClass('ui-select-no-choice'); + + // Gets theme attribute from parent (ui-select) + var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; + return theme + '/no-choice.tpl.html'; + } + }; + }]); + uis.directive('uiSelectSingle', ['$timeout','$compile', function($timeout, $compile) { return { restrict: 'EA', @@ -1739,6 +2020,11 @@ uis.directive('uiSelectSingle', ['$timeout','$compile', function($timeout, $comp //From view --> model ngModel.$parsers.unshift(function (inputValue) { + // Keep original value for undefined and null + if (isNil(inputValue)) { + return inputValue; + } + var locals = {}, result; locals[$select.parserResult.itemName] = inputValue; @@ -1748,14 +2034,19 @@ uis.directive('uiSelectSingle', ['$timeout','$compile', function($timeout, $comp //From model --> view ngModel.$formatters.unshift(function (inputValue) { - var data = $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search + // Keep original value for undefined and null + if (isNil(inputValue)) { + return inputValue; + } + + var data = $select.parserResult && $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search locals = {}, result; if (data){ var checkFnSingle = function(d){ locals[$select.parserResult.itemName] = d; result = $select.parserResult.modelMapper(scope, locals); - return result == inputValue; + return result === inputValue; }; //If possible pass same object stored in $select.selected if ($select.selected && checkFnSingle($select.selected)) { @@ -1781,6 +2072,15 @@ uis.directive('uiSelectSingle', ['$timeout','$compile', function($timeout, $comp scope.$on('uis:select', function (event, item) { $select.selected = item; + var locals = {}; + locals[$select.parserResult.itemName] = item; + + $timeout(function() { + $select.onSelectCallback(scope, { + $item: item, + $model: isNil(item) ? item : $select.parserResult.modelMapper(scope, locals) + }); + }); }); scope.$on('uis:close', function (event, skipFocusser) { @@ -1815,7 +2115,7 @@ uis.directive('uiSelectSingle', ['$timeout','$compile', function($timeout, $comp }); focusser.bind("keydown", function(e){ - if (e.which === KEY.BACKSPACE) { + if (e.which === KEY.BACKSPACE && $select.backspaceReset !== false) { e.preventDefault(); e.stopPropagation(); $select.select(undefined); @@ -1852,15 +2152,19 @@ uis.directive('uiSelectSingle', ['$timeout','$compile', function($timeout, $comp } }; }]); + // Make multiple matches sortable uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', function($timeout, uiSelectConfig, uiSelectMinErr) { return { - require: '^^uiSelect', - link: function(scope, element, attrs, $select) { + require: ['^^uiSelect', '^ngModel'], + link: function(scope, element, attrs, ctrls) { if (scope[attrs.uiSelectSort] === null) { throw uiSelectMinErr('sort', 'Expected a list to sort'); } + var $select = ctrls[0]; + var $ngModel = ctrls[1]; + var options = angular.extend({ axis: 'horizontal' }, @@ -1889,7 +2193,7 @@ uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', f }); element.on('dragend', function() { - element.removeClass(draggingClassName); + removeClass(draggingClassName); }); var move = function(from, to) { @@ -1897,17 +2201,23 @@ uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', f this.splice(to, 0, this.splice(from, 1)[0]); }; + var removeClass = function(className) { + angular.forEach($select.$element.querySelectorAll('.' + className), function(el){ + angular.element(el).removeClass(className); + }); + }; + var dragOverHandler = function(event) { event.preventDefault(); var offset = axis === 'vertical' ? event.offsetY || event.layerY || (event.originalEvent ? event.originalEvent.offsetY : 0) : event.offsetX || event.layerX || (event.originalEvent ? event.originalEvent.offsetX : 0); if (offset < (this[axis === 'vertical' ? 'offsetHeight' : 'offsetWidth'] / 2)) { - element.removeClass(droppingAfterClassName); + removeClass(droppingAfterClassName); element.addClass(droppingBeforeClassName); } else { - element.removeClass(droppingBeforeClassName); + removeClass(droppingBeforeClassName); element.addClass(droppingAfterClassName); } }; @@ -1947,6 +2257,8 @@ uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', f move.apply(theList, [droppedItemIndex, newIndex]); + $ngModel.$setViewValue(Date.now()); + scope.$apply(function() { scope.$emit('uiSelectSort:change', { array: theList, @@ -1956,9 +2268,9 @@ uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', f }); }); - element.removeClass(droppingClassName); - element.removeClass(droppingBeforeClassName); - element.removeClass(droppingAfterClassName); + removeClass(droppingClassName); + removeClass(droppingBeforeClassName); + removeClass(droppingAfterClassName); element.off('drop', dropHandler); }; @@ -1978,9 +2290,10 @@ uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', f if (event.target != element) { return; } - element.removeClass(droppingClassName); - element.removeClass(droppingBeforeClassName); - element.removeClass(droppingAfterClassName); + + removeClass(droppingClassName); + removeClass(droppingBeforeClassName); + removeClass(droppingAfterClassName); element.off('dragover', dragOverHandler); element.off('drop', dropHandler); @@ -1989,6 +2302,26 @@ uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', f }; }]); +uis.directive('uisOpenClose', ['$parse', '$timeout', function ($parse, $timeout) { + return { + restrict: 'A', + require: 'uiSelect', + link: function (scope, element, attrs, $select) { + $select.onOpenCloseCallback = $parse(attrs.uisOpenClose); + + scope.$watch('$select.open', function (isOpen, previousState) { + if (isOpen !== previousState) { + $timeout(function () { + $select.onOpenCloseCallback(scope, { + isOpen: isOpen + }); + }); + } + }); + } + }; +}]); + /** * Parses "repeat" attribute. * @@ -2068,22 +2401,27 @@ uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinE }; self.getGroupNgRepeatExpression = function() { - return '$group in $select.groups'; + return '$group in $select.groups track by $group.name'; }; }]); }()); -angular.module("ui.select").run(["$templateCache", function($templateCache) {$templateCache.put("bootstrap/choices.tpl.html","
    • 0\">
    "); -$templateCache.put("bootstrap/match-multiple.tpl.html"," × "); -$templateCache.put("bootstrap/match.tpl.html","
    {{$select.placeholder}}
    "); -$templateCache.put("bootstrap/select-multiple.tpl.html","
    "); -$templateCache.put("bootstrap/select.tpl.html","
    "); -$templateCache.put("select2/choices.tpl.html","
    "); -$templateCache.put("select2/match-multiple.tpl.html","
  • "); +angular.module("ui.select").run(["$templateCache", function($templateCache) {$templateCache.put("bootstrap/choices.tpl.html","
      0\">
    • 0\">
    "); +$templateCache.put("bootstrap/match-multiple.tpl.html"," × "); +$templateCache.put("bootstrap/match.tpl.html","
    {{$select.placeholder}}
    "); +$templateCache.put("bootstrap/no-choice.tpl.html","
    "); +$templateCache.put("bootstrap/select-multiple.tpl.html","
    "); +$templateCache.put("bootstrap/select.tpl.html","
    "); +$templateCache.put("select2/choices.tpl.html","
    "); +$templateCache.put("select2/match-multiple.tpl.html","
  • "); $templateCache.put("select2/match.tpl.html","{{$select.placeholder}} "); -$templateCache.put("select2/select-multiple.tpl.html","
    "); -$templateCache.put("select2/select.tpl.html","
    "); -$templateCache.put("selectize/choices.tpl.html","
    "); -$templateCache.put("selectize/match.tpl.html","
    "); -$templateCache.put("selectize/select.tpl.html","
    ");}]); \ No newline at end of file +$templateCache.put("select2/no-choice.tpl.html","
    "); +$templateCache.put("select2/select-multiple.tpl.html","
    "); +$templateCache.put("select2/select.tpl.html","
    "); +$templateCache.put("selectize/choices.tpl.html","
    "); +$templateCache.put("selectize/match-multiple.tpl.html","
    ×
    "); +$templateCache.put("selectize/match.tpl.html","
    {{$select.placeholder}}
    "); +$templateCache.put("selectize/no-choice.tpl.html","
    "); +$templateCache.put("selectize/select-multiple.tpl.html","
    "); +$templateCache.put("selectize/select.tpl.html","
    ");}]); \ No newline at end of file diff --git a/js/vendor/angular-ui-select/dist/select.min.css b/js/vendor/angular-ui-select/dist/select.min.css index 99fea152..39a10f4b 100644 --- a/js/vendor/angular-ui-select/dist/select.min.css +++ b/js/vendor/angular-ui-select/dist/select.min.css @@ -1,6 +1,7 @@ /*! * ui-select * http://github.com/angular-ui/ui-select - * Version: 0.16.0 - 2016-03-23T20:51:56.678Z + * Version: 0.19.7 - 2017-04-15T14:28:36.790Z * License: MIT - */.ui-select-highlight{font-weight:700}.ui-select-offscreen{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.ui-select-choices-row:hover{background-color:#f5f5f5}.ng-dirty.ng-invalid>a.select2-choice{border-color:#D44950}.select2-result-single{padding-left:0}.select-locked>.ui-select-match-close,.select2-locked>.select2-search-choice-close{display:none}body>.select2-container.open{z-index:9999}.ui-select-container[theme=select2].direction-up .ui-select-match{border-radius:0 0 4px 4px}.ui-select-container[theme=select2].direction-up .ui-select-dropdown{border-radius:4px 4px 0 0;border-top-width:1px;border-top-style:solid;box-shadow:0 -4px 8px rgba(0,0,0,.25);margin-top:-4px}.ui-select-container[theme=select2].direction-up .ui-select-dropdown .select2-search{margin-top:4px}.ui-select-container[theme=select2].direction-up.select2-dropdown-open .ui-select-match{border-bottom-color:#5897fb}.selectize-input.selectize-focus{border-color:#007FBB!important}.selectize-control>.selectize-dropdown,.selectize-control>.selectize-input>input{width:100%}.ng-dirty.ng-invalid>div.selectize-input{border-color:#D44950}.ui-select-container[theme=selectize].direction-up .ui-select-dropdown{box-shadow:0 -4px 8px rgba(0,0,0,.25);margin-top:-2px}.btn-default-focus{color:#333;background-color:#EBEBEB;border-color:#ADADAD;text-decoration:none;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.ui-select-bootstrap .ui-select-toggle{position:relative}.ui-select-bootstrap .ui-select-toggle>.caret{position:absolute;height:10px;top:50%;right:10px;margin-top:-2px}.input-group>.ui-select-bootstrap.dropdown{position:static}.input-group>.ui-select-bootstrap>input.ui-select-search.form-control{border-radius:4px 0 0 4px}.input-group>.ui-select-bootstrap>input.ui-select-search.form-control.direction-up{border-radius:4px 0 0 4px!important}.ui-select-bootstrap>.ui-select-match>.btn{text-align:left!important}.ui-select-bootstrap>.ui-select-match>.caret{position:absolute;top:45%;right:15px}.ui-select-bootstrap>.ui-select-choices{width:100%;height:auto;max-height:200px;overflow-x:hidden;margin-top:-1px}body>.ui-select-bootstrap.open{z-index:1000}.ui-select-multiple.ui-select-bootstrap{height:auto;padding:3px 3px 0}.ui-select-multiple.ui-select-bootstrap input.ui-select-search{background-color:transparent!important;border:none;outline:0;height:1.666666em;margin-bottom:3px}.ui-select-multiple.ui-select-bootstrap .ui-select-match .close{font-size:1.6em;line-height:.75}.ui-select-multiple.ui-select-bootstrap .ui-select-match-item{outline:0;margin:0 3px 3px 0}.ui-select-multiple .ui-select-match-item{position:relative}.ui-select-multiple .ui-select-match-item.dropping-before:before{content:"";position:absolute;top:0;right:100%;height:100%;margin-right:2px;border-left:1px solid #428bca}.ui-select-multiple .ui-select-match-item.dropping-after:after{content:"";position:absolute;top:0;left:100%;height:100%;margin-left:2px;border-right:1px solid #428bca}.ui-select-bootstrap .ui-select-choices-row>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.ui-select-bootstrap .ui-select-choices-row>a:focus,.ui-select-bootstrap .ui-select-choices-row>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.ui-select-bootstrap .ui-select-choices-row.active>a{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.ui-select-bootstrap .ui-select-choices-row.active.disabled>a,.ui-select-bootstrap .ui-select-choices-row.disabled>a{color:#777;cursor:not-allowed;background-color:#fff}.ui-select-match.ng-hide-add,.ui-select-search.ng-hide-add{display:none!important}.ui-select-bootstrap.ng-dirty.ng-invalid>button.btn.ui-select-match{border-color:#D44950}.ui-select-container[theme=bootstrap].direction-up .ui-select-dropdown{box-shadow:0 -4px 8px rgba(0,0,0,.25)} \ No newline at end of file + */.ui-select-highlight{font-weight:700}.ui-select-offscreen{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.selectize-control.single>.selectize-input>input,.selectize-control>.selectize-dropdown{width:100%}.ui-select-choices-row:hover{background-color:#f5f5f5}.ng-dirty.ng-invalid>a.select2-choice{border-color:#D44950}.select2-result-single{padding-left:0}.select-locked>.ui-select-match-close,.select2-locked>.select2-search-choice-close{display:none}body>.select2-container.open{z-index:9999}.ui-select-container.select2.direction-up .ui-select-match,.ui-select-container[theme=select2].direction-up .ui-select-match{border-radius:0 0 4px 4px}.ui-select-container.select2.direction-up .ui-select-dropdown,.ui-select-container[theme=select2].direction-up .ui-select-dropdown{border-radius:4px 4px 0 0;border-top-width:1px;border-top-style:solid;box-shadow:0 -4px 8px rgba(0,0,0,.25);margin-top:-4px}.ui-select-container.select2.direction-up .ui-select-dropdown .select2-search,.ui-select-container[theme=select2].direction-up .ui-select-dropdown .select2-search{margin-top:4px}.ui-select-container.select2.direction-up.select2-dropdown-open .ui-select-match,.ui-select-container[theme=select2].direction-up.select2-dropdown-open .ui-select-match{border-bottom-color:#5897fb}.ui-select-container[theme=select2] .ui-select-dropdown .ui-select-search-hidden,.ui-select-container[theme=select2] .ui-select-dropdown .ui-select-search-hidden input{opacity:0;height:0;min-height:0;padding:0;margin:0;border:0}.selectize-input.selectize-focus{border-color:#007FBB!important}.selectize-control.multi>.selectize-input>input{margin:0!important}.ng-dirty.ng-invalid>div.selectize-input{border-color:#D44950}.ui-select-container[theme=selectize].direction-up .ui-select-dropdown{box-shadow:0 -4px 8px rgba(0,0,0,.25);margin-top:-2px}.ui-select-container[theme=selectize] input.ui-select-search-hidden{opacity:0;height:0;min-height:0;padding:0;margin:0;border:0;width:0}.btn-default-focus{color:#333;background-color:#EBEBEB;border-color:#ADADAD;text-decoration:none;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.ui-select-bootstrap .ui-select-toggle{position:relative}.ui-select-bootstrap .ui-select-toggle>.caret{position:absolute;height:10px;top:50%;right:10px;margin-top:-2px}.input-group>.ui-select-bootstrap.dropdown{position:static}.input-group>.ui-select-bootstrap>input.ui-select-search.form-control{border-radius:4px 0 0 4px}.input-group>.ui-select-bootstrap>input.ui-select-search.form-control.direction-up{border-radius:4px 0 0 4px!important}.ui-select-bootstrap .ui-select-search-hidden{opacity:0;height:0;min-height:0;padding:0;margin:0;border:0}.ui-select-bootstrap>.ui-select-match>.btn{text-align:left!important}.ui-select-bootstrap>.ui-select-match>.caret{position:absolute;top:45%;right:15px}.ui-select-bootstrap>.ui-select-choices,.ui-select-bootstrap>.ui-select-no-choice{width:100%;height:auto;max-height:200px;overflow-x:hidden;margin-top:-1px}body>.ui-select-bootstrap.open{z-index:1000}.ui-select-multiple.ui-select-bootstrap{height:auto;padding:3px 3px 0}.ui-select-multiple.ui-select-bootstrap input.ui-select-search{background-color:transparent!important;border:none;outline:0;height:1.666666em;margin-bottom:3px}.ui-select-multiple.ui-select-bootstrap .ui-select-match .close{font-size:1.6em;line-height:.75}.ui-select-multiple.ui-select-bootstrap .ui-select-match-item{outline:0;margin:0 3px 3px 0}.ui-select-multiple .ui-select-match-item{position:relative}.ui-select-multiple .ui-select-match-item.dropping .ui-select-match-close{pointer-events:none}.ui-select-multiple:hover .ui-select-match-item.dropping-before:before{content:"";position:absolute;top:0;right:100%;height:100%;margin-right:2px;border-left:1px solid #428bca}.ui-select-multiple:hover .ui-select-match-item.dropping-after:after{content:"";position:absolute;top:0;left:100%;height:100%;margin-left:2px;border-right:1px solid #428bca}.ui-select-bootstrap .ui-select-choices-row>span{cursor:pointer;display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.ui-select-bootstrap .ui-select-choices-row>span:focus,.ui-select-bootstrap .ui-select-choices-row>span:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.ui-select-bootstrap .ui-select-choices-row.active>span{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.ui-select-bootstrap .ui-select-choices-row.active.disabled>span,.ui-select-bootstrap .ui-select-choices-row.disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.ui-select-match.ng-hide-add,.ui-select-search.ng-hide-add{display:none!important}.ui-select-bootstrap.ng-dirty.ng-invalid>button.btn.ui-select-match{border-color:#D44950}.ui-select-container[theme=bootstrap].direction-up .ui-select-dropdown{box-shadow:0 -4px 8px rgba(0,0,0,.25)}.ui-select-bootstrap .ui-select-match-text{width:100%;padding-right:1em}.ui-select-bootstrap .ui-select-match-text span{display:inline-block;width:100%;overflow:hidden}.ui-select-bootstrap .ui-select-toggle>a.btn{position:absolute;height:10px;right:10px;margin-top:-2px}.ui-select-refreshing.glyphicon{position:absolute;right:0;padding:8px 27px}@-webkit-keyframes ui-select-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes ui-select-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.ui-select-spin{-webkit-animation:ui-select-spin 2s infinite linear;animation:ui-select-spin 2s infinite linear}.ui-select-refreshing.ng-animate{-webkit-animation:none 0s} +/*# sourceMappingURL=select.min.css.map */ diff --git a/js/vendor/angular-ui-select/dist/select.min.css.map b/js/vendor/angular-ui-select/dist/select.min.css.map new file mode 100644 index 00000000..477a6873 --- /dev/null +++ b/js/vendor/angular-ui-select/dist/select.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["select.css","common.css"],"names":[],"mappings":";;;;;AAIA,qBACE,YAAa,ICLf,qBACA,KAAA,wBACA,MAAA,cACA,OAAA,cACA,OAAA,YACA,OAAA,YACA,QAAA,YACA,SAAA,iBACA,SAAA,mBACA,QAAA,YACA,KAAA,YACA,IAAA,YA8EA,iDAUA,uCACA,MAAA,KArFA,6BACA,iBAAA,QAMA,sCACA,aAAA,QAGA,uBACA,aAAA,EAOA,sCAJA,6CACA,QAAA,KAOA,6BACA,QAAA,KAKA,2DADA,kEAEA,cACA,EACA,EAFA,IAAA,IAKA,8DADA,qEAEA,cAAA,IAAA,IAEA,EADA,EAGA,iBAAA,IACA,iBAAA,MAEA,WAAA,EAAA,KAAA,IAAA,gBAEA,WAAA,KAGA,8EADA,qFAEA,WAAA,IAGA,iFADA,wFAEA,oBAAA,QAGA,iFACA,uFACA,QAAA,EACA,OAAA,EACA,WAAA,EACA,QAAA,EACA,OAAA,EACA,OAAA,EAMA,iCACA,aAAA,kBASA,gDACA,OAAA,YASA,yCACA,aAAA,QAIA,uEACA,WAAA,EAAA,KAAA,IAAA,gBACA,WAAA,KAGA,oEACA,QAAA,EACA,OAAA,EACA,WAAA,EACA,QAAA,EACA,OAAA,EACA,OAAA,EACA,MAAA,EAMA,mBACA,MAAA,KACA,iBAAA,QACA,aAAA,QACA,gBAAA,KACA,QAAA,yBAAA,KAAA,IACA,eAAA,KACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,qBAGA,uCACA,SAAA,SAGA,8CACA,SAAA,S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AA,IAAA,KAGA,kCACA,GACA,kBAAA,UACA,UAAA,UAEA,KACA,kBAAA,eACA,UAAA,gBAGA,0BACA,GACA,kBAAA,UACA,UAAA,UAEA,KACA,kBAAA,eACA,UAAA,gBAIA,gBACA,kBAAA,eAAA,GAAA,SAAA,OACA,UAAA,eAAA,GAAA,SAAA,OAGA,iCACA,kBAAA,KAAA","file":"select.min.css","sourcesContent":["/*!\n * ui-select\n * http://github.com/angular-ui/ui-select\n * Version: 0.19.7 - 2017-04-15T14:28:36.790Z\n * License: MIT\n */\n\n\n/* Style when highlighting a search. */\n.ui-select-highlight {\n font-weight: bold;\n}\n\n.ui-select-offscreen {\n clip: rect(0 0 0 0) !important;\n width: 1px !important;\n height: 1px !important;\n border: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden !important;\n position: absolute !important;\n outline: 0 !important;\n left: 0px !important;\n top: 0px !important;\n}\n\n\n.ui-select-choices-row:hover {\n background-color: #f5f5f5;\n}\n\n/* Select2 theme */\n\n/* Mark invalid Select2 */\n.ng-dirty.ng-invalid > a.select2-choice {\n border-color: #D44950;\n}\n\n.select2-result-single {\n padding-left: 0;\n}\n\n.select2-locked > .select2-search-choice-close{\n display:none;\n}\n\n.select-locked > .ui-select-match-close{\n display:none;\n}\n\nbody > .select2-container.open {\n z-index: 9999; /* The z-index Select2 applies to the select2-drop */\n}\n\n/* Handle up direction Select2 */\n.ui-select-container[theme=\"select2\"].direction-up .ui-select-match,\n.ui-select-container.select2.direction-up .ui-select-match {\n border-radius: 4px; /* FIXME hardcoded value :-/ */\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.ui-select-container[theme=\"select2\"].direction-up .ui-select-dropdown,\n.ui-select-container.select2.direction-up .ui-select-dropdown {\n border-radius: 4px; /* FIXME hardcoded value :-/ */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n\n border-top-width: 1px; /* FIXME hardcoded value :-/ */\n border-top-style: solid;\n\n box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);\n\n margin-top: -4px; /* FIXME hardcoded value :-/ */\n}\n.ui-select-container[theme=\"select2\"].direction-up .ui-select-dropdown .select2-search,\n.ui-select-container.select2.direction-up .ui-select-dropdown .select2-search {\n margin-top: 4px; /* FIXME hardcoded value :-/ */\n}\n.ui-select-container[theme=\"select2\"].direction-up.select2-dropdown-open .ui-select-match,\n.ui-select-container.select2.direction-up.select2-dropdown-open .ui-select-match {\n border-bottom-color: #5897fb;\n}\n\n.ui-select-container[theme=\"select2\"] .ui-select-dropdown .ui-select-search-hidden,\n.ui-select-container[theme=\"select2\"] .ui-select-dropdown .ui-select-search-hidden input{\n opacity: 0;\n height: 0;\n min-height: 0;\n padding: 0;\n margin: 0;\n border:0;\n}\n\n/* Selectize theme */\n\n/* Helper class to show styles when focus */\n.selectize-input.selectize-focus{\n border-color: #007FBB !important;\n}\n\n/* Fix input width for Selectize theme */\n.selectize-control.single > .selectize-input > input {\n width: 100%;\n}\n\n/* Fix line break when there's at least one item selected with the Selectize theme */\n.selectize-control.multi > .selectize-input > input {\n margin: 0 !important;\n}\n\n/* Fix dropdown width for Selectize theme */\n.selectize-control > .selectize-dropdown {\n width: 100%;\n}\n\n/* Mark invalid Selectize */\n.ng-dirty.ng-invalid > div.selectize-input {\n border-color: #D44950;\n}\n\n/* Handle up direction Selectize */\n.ui-select-container[theme=\"selectize\"].direction-up .ui-select-dropdown {\n box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);\n margin-top: -2px; /* FIXME hardcoded value :-/ */\n}\n\n.ui-select-container[theme=\"selectize\"] input.ui-select-search-hidden{\n opacity: 0;\n height: 0;\n min-height: 0;\n padding: 0;\n margin: 0;\n border:0;\n width: 0;\n}\n\n/* Bootstrap theme */\n\n/* Helper class to show styles when focus */\n.btn-default-focus {\n color: #333;\n background-color: #EBEBEB;\n border-color: #ADADAD;\n text-decoration: none;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n\n.ui-select-bootstrap .ui-select-toggle {\n position: relative;\n}\n\n.ui-select-bootstrap .ui-select-toggle > .caret {\n position: absolute;\n height: 10px;\n top: 50%;\n right: 10px;\n margin-top: -2px;\n}\n\n/* Fix Bootstrap dropdown position when inside a input-group */\n.input-group > .ui-select-bootstrap.dropdown {\n /* Instead of relative */\n position: static;\n}\n\n.input-group > .ui-select-bootstrap > input.ui-select-search.form-control {\n border-radius: 4px; /* FIXME hardcoded value :-/ */\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.input-group > .ui-select-bootstrap > input.ui-select-search.form-control.direction-up {\n border-radius: 4px !important; /* FIXME hardcoded value :-/ */\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n}\n\n.ui-select-bootstrap .ui-select-search-hidden{\n opacity: 0;\n height: 0;\n min-height: 0;\n padding: 0;\n margin: 0;\n border:0;\n}\n\n.ui-select-bootstrap > .ui-select-match > .btn{\n /* Instead of center because of .btn */\n text-align: left !important;\n}\n\n.ui-select-bootstrap > .ui-select-match > .caret {\n position: absolute;\n top: 45%;\n right: 15px;\n}\n\n/* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */\n.ui-select-bootstrap > .ui-select-choices ,.ui-select-bootstrap > .ui-select-no-choice {\n width: 100%;\n height: auto;\n max-height: 200px;\n overflow-x: hidden;\n margin-top: -1px;\n}\n\nbody > .ui-select-bootstrap.open {\n z-index: 1000; /* Standard Bootstrap dropdown z-index */\n}\n\n.ui-select-multiple.ui-select-bootstrap {\n height: auto;\n padding: 3px 3px 0 3px;\n}\n\n.ui-select-multiple.ui-select-bootstrap input.ui-select-search {\n background-color: transparent !important; /* To prevent double background when disabled */\n border: none;\n outline: none;\n height: 1.666666em;\n margin-bottom: 3px;\n}\n\n.ui-select-multiple.ui-select-bootstrap .ui-select-match .close {\n font-size: 1.6em;\n line-height: 0.75;\n}\n\n.ui-select-multiple.ui-select-bootstrap .ui-select-match-item {\n outline: 0;\n margin: 0 3px 3px 0;\n}\n\n.ui-select-multiple .ui-select-match-item {\n position: relative;\n}\n\n.ui-select-multiple .ui-select-match-item.dropping .ui-select-match-close {\n pointer-events: none;\n}\n\n.ui-select-multiple:hover .ui-select-match-item.dropping-before:before {\n content: \"\";\n position: absolute;\n top: 0;\n right: 100%;\n height: 100%;\n margin-right: 2px;\n border-left: 1px solid #428bca;\n}\n\n.ui-select-multiple:hover .ui-select-match-item.dropping-after:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 100%;\n height: 100%;\n margin-left: 2px;\n border-right: 1px solid #428bca;\n}\n\n.ui-select-bootstrap .ui-select-choices-row>span {\n cursor: pointer;\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: 400;\n line-height: 1.42857143;\n color: #333;\n white-space: nowrap;\n}\n\n.ui-select-bootstrap .ui-select-choices-row>span:hover, .ui-select-bootstrap .ui-select-choices-row>span:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n\n.ui-select-bootstrap .ui-select-choices-row.active>span {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #428bca;\n}\n\n.ui-select-bootstrap .ui-select-choices-row.disabled>span,\n.ui-select-bootstrap .ui-select-choices-row.active.disabled>span {\n color: #777;\n cursor: not-allowed;\n background-color: #fff;\n}\n\n/* fix hide/show angular animation */\n.ui-select-match.ng-hide-add,\n.ui-select-search.ng-hide-add {\n display: none !important;\n}\n\n/* Mark invalid Bootstrap */\n.ui-select-bootstrap.ng-dirty.ng-invalid > button.btn.ui-select-match {\n border-color: #D44950;\n}\n\n/* Handle up direction Bootstrap */\n.ui-select-container[theme=\"bootstrap\"].direction-up .ui-select-dropdown {\n box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);\n}\n\n.ui-select-bootstrap .ui-select-match-text {\n width: 100%;\n padding-right: 1em;\n}\n.ui-select-bootstrap .ui-select-match-text span {\n display: inline-block;\n width: 100%;\n overflow: hidden;\n}\n.ui-select-bootstrap .ui-select-toggle > a.btn {\n position: absolute;\n height: 10px;\n right: 10px;\n margin-top: -2px;\n}\n\n/* Spinner */\n.ui-select-refreshing.glyphicon {\n position: absolute;\n right: 0;\n padding: 8px 27px;\n }\n\n@-webkit-keyframes ui-select-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n@keyframes ui-select-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n.ui-select-spin {\n -webkit-animation: ui-select-spin 2s infinite linear;\n animation: ui-select-spin 2s infinite linear;\n}\n\n.ui-select-refreshing.ng-animate {\n -webkit-animation: none 0s;\n}\n","/* Style when highlighting a search. */\n.ui-select-highlight {\n font-weight: bold;\n}\n\n.ui-select-offscreen {\n clip: rect(0 0 0 0) !important;\n width: 1px !important;\n height: 1px !important;\n border: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden !important;\n position: absolute !important;\n outline: 0 !important;\n left: 0px !important;\n top: 0px !important;\n}\n\n\n.ui-select-choices-row:hover {\n background-color: #f5f5f5;\n}\n\n/* Select2 theme */\n\n/* Mark invalid Select2 */\n.ng-dirty.ng-invalid > a.select2-choice {\n border-color: #D44950;\n}\n\n.select2-result-single {\n padding-left: 0;\n}\n\n.select2-locked > .select2-search-choice-close{\n display:none;\n}\n\n.select-locked > .ui-select-match-close{\n display:none;\n}\n\nbody > .select2-container.open {\n z-index: 9999; /* The z-index Select2 applies to the select2-drop */\n}\n\n/* Handle up direction Select2 */\n.ui-select-container[theme=\"select2\"].direction-up .ui-select-match,\n.ui-select-container.select2.direction-up .ui-select-match {\n border-radius: 4px; /* FIXME hardcoded value :-/ */\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.ui-select-container[theme=\"select2\"].direction-up .ui-select-dropdown,\n.ui-select-container.select2.direction-up .ui-select-dropdown {\n border-radius: 4px; /* FIXME hardcoded value :-/ */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n\n border-top-width: 1px; /* FIXME hardcoded value :-/ */\n border-top-style: solid;\n\n box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);\n\n margin-top: -4px; /* FIXME hardcoded value :-/ */\n}\n.ui-select-container[theme=\"select2\"].direction-up .ui-select-dropdown .select2-search,\n.ui-select-container.select2.direction-up .ui-select-dropdown .select2-search {\n margin-top: 4px; /* FIXME hardcoded value :-/ */\n}\n.ui-select-container[theme=\"select2\"].direction-up.select2-dropdown-open .ui-select-match,\n.ui-select-container.select2.direction-up.select2-dropdown-open .ui-select-match {\n border-bottom-color: #5897fb;\n}\n\n.ui-select-container[theme=\"select2\"] .ui-select-dropdown .ui-select-search-hidden,\n.ui-select-container[theme=\"select2\"] .ui-select-dropdown .ui-select-search-hidden input{\n opacity: 0;\n height: 0;\n min-height: 0;\n padding: 0;\n margin: 0;\n border:0;\n}\n\n/* Selectize theme */\n\n/* Helper class to show styles when focus */\n.selectize-input.selectize-focus{\n border-color: #007FBB !important;\n}\n\n/* Fix input width for Selectize theme */\n.selectize-control.single > .selectize-input > input {\n width: 100%;\n}\n\n/* Fix line break when there's at least one item selected with the Selectize theme */\n.selectize-control.multi > .selectize-input > input {\n margin: 0 !important;\n}\n\n/* Fix dropdown width for Selectize theme */\n.selectize-control > .selectize-dropdown {\n width: 100%;\n}\n\n/* Mark invalid Selectize */\n.ng-dirty.ng-invalid > div.selectize-input {\n border-color: #D44950;\n}\n\n/* Handle up direction Selectize */\n.ui-select-container[theme=\"selectize\"].direction-up .ui-select-dropdown {\n box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);\n margin-top: -2px; /* FIXME hardcoded value :-/ */\n}\n\n.ui-select-container[theme=\"selectize\"] input.ui-select-search-hidden{\n opacity: 0;\n height: 0;\n min-height: 0;\n padding: 0;\n margin: 0;\n border:0;\n width: 0;\n}\n\n/* Bootstrap theme */\n\n/* Helper class to show styles when focus */\n.btn-default-focus {\n color: #333;\n background-color: #EBEBEB;\n border-color: #ADADAD;\n text-decoration: none;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n\n.ui-select-bootstrap .ui-select-toggle {\n position: relative;\n}\n\n.ui-select-bootstrap .ui-select-toggle > .caret {\n position: absolute;\n height: 10px;\n top: 50%;\n right: 10px;\n margin-top: -2px;\n}\n\n/* Fix Bootstrap dropdown position when inside a input-group */\n.input-group > .ui-select-bootstrap.dropdown {\n /* Instead of relative */\n position: static;\n}\n\n.input-group > .ui-select-bootstrap > input.ui-select-search.form-control {\n border-radius: 4px; /* FIXME hardcoded value :-/ */\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.input-group > .ui-select-bootstrap > input.ui-select-search.form-control.direction-up {\n border-radius: 4px !important; /* FIXME hardcoded value :-/ */\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n}\n\n.ui-select-bootstrap .ui-select-search-hidden{\n opacity: 0;\n height: 0;\n min-height: 0;\n padding: 0;\n margin: 0;\n border:0;\n}\n\n.ui-select-bootstrap > .ui-select-match > .btn{\n /* Instead of center because of .btn */\n text-align: left !important;\n}\n\n.ui-select-bootstrap > .ui-select-match > .caret {\n position: absolute;\n top: 45%;\n right: 15px;\n}\n\n/* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */\n.ui-select-bootstrap > .ui-select-choices ,.ui-select-bootstrap > .ui-select-no-choice {\n width: 100%;\n height: auto;\n max-height: 200px;\n overflow-x: hidden;\n margin-top: -1px;\n}\n\nbody > .ui-select-bootstrap.open {\n z-index: 1000; /* Standard Bootstrap dropdown z-index */\n}\n\n.ui-select-multiple.ui-select-bootstrap {\n height: auto;\n padding: 3px 3px 0 3px;\n}\n\n.ui-select-multiple.ui-select-bootstrap input.ui-select-search {\n background-color: transparent !important; /* To prevent double background when disabled */\n border: none;\n outline: none;\n height: 1.666666em;\n margin-bottom: 3px;\n}\n\n.ui-select-multiple.ui-select-bootstrap .ui-select-match .close {\n font-size: 1.6em;\n line-height: 0.75;\n}\n\n.ui-select-multiple.ui-select-bootstrap .ui-select-match-item {\n outline: 0;\n margin: 0 3px 3px 0;\n}\n\n.ui-select-multiple .ui-select-match-item {\n position: relative;\n}\n\n.ui-select-multiple .ui-select-match-item.dropping .ui-select-match-close {\n pointer-events: none;\n}\n\n.ui-select-multiple:hover .ui-select-match-item.dropping-before:before {\n content: \"\";\n position: absolute;\n top: 0;\n right: 100%;\n height: 100%;\n margin-right: 2px;\n border-left: 1px solid #428bca;\n}\n\n.ui-select-multiple:hover .ui-select-match-item.dropping-after:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 100%;\n height: 100%;\n margin-left: 2px;\n border-right: 1px solid #428bca;\n}\n\n.ui-select-bootstrap .ui-select-choices-row>span {\n cursor: pointer;\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: 400;\n line-height: 1.42857143;\n color: #333;\n white-space: nowrap;\n}\n\n.ui-select-bootstrap .ui-select-choices-row>span:hover, .ui-select-bootstrap .ui-select-choices-row>span:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n\n.ui-select-bootstrap .ui-select-choices-row.active>span {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #428bca;\n}\n\n.ui-select-bootstrap .ui-select-choices-row.disabled>span,\n.ui-select-bootstrap .ui-select-choices-row.active.disabled>span {\n color: #777;\n cursor: not-allowed;\n background-color: #fff;\n}\n\n/* fix hide/show angular animation */\n.ui-select-match.ng-hide-add,\n.ui-select-search.ng-hide-add {\n display: none !important;\n}\n\n/* Mark invalid Bootstrap */\n.ui-select-bootstrap.ng-dirty.ng-invalid > button.btn.ui-select-match {\n border-color: #D44950;\n}\n\n/* Handle up direction Bootstrap */\n.ui-select-container[theme=\"bootstrap\"].direction-up .ui-select-dropdown {\n box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25);\n}\n\n.ui-select-bootstrap .ui-select-match-text {\n width: 100%;\n padding-right: 1em;\n}\n.ui-select-bootstrap .ui-select-match-text span {\n display: inline-block;\n width: 100%;\n overflow: hidden;\n}\n.ui-select-bootstrap .ui-select-toggle > a.btn {\n position: absolute;\n height: 10px;\n right: 10px;\n margin-top: -2px;\n}\n\n/* Spinner */\n.ui-select-refreshing.glyphicon {\n position: absolute;\n right: 0;\n padding: 8px 27px;\n }\n\n@-webkit-keyframes ui-select-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n@keyframes ui-select-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n.ui-select-spin {\n -webkit-animation: ui-select-spin 2s infinite linear;\n animation: ui-select-spin 2s infinite linear;\n}\n\n.ui-select-refreshing.ng-animate {\n -webkit-animation: none 0s;\n}\n"]} \ No newline at end of file diff --git a/js/vendor/angular-ui-select/dist/select.min.js b/js/vendor/angular-ui-select/dist/select.min.js index 1490c090..61be14d2 100644 --- a/js/vendor/angular-ui-select/dist/select.min.js +++ b/js/vendor/angular-ui-select/dist/select.min.js @@ -1,8 +1,9 @@ /*! * ui-select * http://github.com/angular-ui/ui-select - * Version: 0.16.0 - 2016-03-23T20:51:56.609Z + * Version: 0.19.7 - 2017-04-15T14:28:36.649Z * License: MIT */ -!function(){"use strict";var e={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(t){var s=t.which;switch(s){case e.COMMAND:case e.SHIFT:case e.CTRL:case e.ALT:return!0}return t.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&123>=e},isVerticalMovement:function(t){return~[e.UP,e.DOWN].indexOf(t)},isHorizontalMovement:function(t){return~[e.LEFT,e.RIGHT,e.BACKSPACE,e.DELETE].indexOf(t)},toSeparator:function(t){var s={ENTER:"\n",TAB:" ",SPACE:" "}[t];return s?s:e[t]?void 0:t}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(e){return angular.element(this[0].querySelectorAll(e))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(e){for(var t=this[0],s=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;t;){if(s.bind(t)(e))return t;t=t.parentElement}return!1});var t=0,s=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,skipFocusser:!1,dropdownPosition:"auto",generateId:function(){return t++},appendToBody:!1}).service("uiSelectMinErr",function(){var e=angular.$$minErr("ui.select");return function(){var t=e.apply(this,arguments),s=t.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(s)}}).directive("uisTranscludeAppend",function(){return{link:function(e,t,s,i,c){c(e,function(e){t.append(e)})}}}).filter("highlight",function(){function e(e){return(""+e).replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,s){return s&&t?(""+t).replace(new RegExp(e(s),"gi"),'$&'):t}}).factory("uisOffset",["$document","$window",function(e,t){return function(s){var i=s[0].getBoundingClientRect();return{width:i.width||s.prop("offsetWidth"),height:i.height||s.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}]);s.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile","$window",function(e,t,s,i,c){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){t.addClass("ui-select-choices");var s=t.parent().attr("theme")||e.theme;return s+"/choices.tpl.html"},compile:function(l,n){if(!n.repeat)throw s("repeat","Expected 'repeat' expression.");return function(l,n,a,r,o){var u=a.groupBy,d=a.groupFilter;if(r.parseRepeatAttr(a.repeat,u,d),r.disableChoiceExpression=a.uiDisableChoice,r.onHighlightCallback=a.onHighlight,r.dropdownPosition=a.position?a.position.toLowerCase():e.dropdownPosition,u){var p=n.querySelectorAll(".ui-select-choices-group");if(1!==p.length)throw s("rows","Expected 1 .ui-select-choices-group but got '{0}'.",p.length);p.attr("ng-repeat",t.getGroupNgRepeatExpression())}var g=n.querySelectorAll(".ui-select-choices-row");if(1!==g.length)throw s("rows","Expected 1 .ui-select-choices-row but got '{0}'.",g.length);g.attr("ng-repeat",r.parserResult.repeatExpression(u)).attr("ng-if","$select.open"),c.document.addEventListener&&g.attr("ng-mouseenter","$select.setActiveItem("+r.parserResult.itemName+")").attr("ng-click","$select.select("+r.parserResult.itemName+",$select.skipFocusser,$event)");var h=n.querySelectorAll(".ui-select-choices-row-inner");if(1!==h.length)throw s("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",h.length);h.attr("uis-transclude-append",""),c.document.addEventListener||h.attr("ng-mouseenter","$select.setActiveItem("+r.parserResult.itemName+")").attr("ng-click","$select.select("+r.parserResult.itemName+",$select.skipFocusser,$event)"),i(n,o)(l),l.$watch("$select.search",function(e){e&&!r.open&&r.multiple&&r.activate(!1,!0),r.activeIndex=r.tagging.isActivated?-1:0,!a.minimumInputLength||r.search.length>=a.minimumInputLength?r.refresh(a.refresh):r.items=[]}),a.$observe("refreshDelay",function(){var t=l.$eval(a.refreshDelay);r.refreshDelay=void 0!==t?t:e.refreshDelay})}}}}]),s.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","uisRepeatParser","uiSelectMinErr","uiSelectConfig","$parse","$injector","$window",function(t,s,i,c,l,n,a,r,o,u){function d(e,t,s){if(e.findIndex)return e.findIndex(t,s);for(var i,c=Object(e),l=c.length>>>0,n=0;l>n;n++)if(i=c[n],t.call(s,i,n,c))return n;return-1}function p(){(v.resetSearchInput||void 0===v.resetSearchInput&&a.resetSearchInput)&&(v.search=m,v.selected&&v.items.length&&!v.multiple&&(v.activeIndex=d(v.items,function(e){return angular.equals(this,e)},v.selected)))}function g(e,t){var s,i,c=[];for(s=0;s0||0===v.search.length&&v.tagging.isActivated&&v.activeIndex>-1)&&v.activeIndex--;break;case e.TAB:(!v.multiple||v.open)&&v.select(v.items[v.activeIndex],!0);break;case e.ENTER:v.open&&(v.tagging.isActivated||v.activeIndex>=0)?v.select(v.items[v.activeIndex],v.skipFocusser):v.activate(!1,!0);break;case e.ESC:v.close();break;default:s=!1}return s}function f(){var e=s.querySelectorAll(".ui-select-choices-content"),t=e.querySelectorAll(".ui-select-choices-row");if(t.length<1)throw n("choices","Expected multiple .ui-select-choices-row but got '{0}'.",t.length);if(!(v.activeIndex<0)){var i=t[v.activeIndex],c=i.offsetTop+i.clientHeight-e[0].scrollTop,l=e[0].offsetHeight;c>l?e[0].scrollTop+=c-l:c=v.items.length?0:v.activeIndex,-1===v.activeIndex&&v.taggingLabel!==!1&&(v.activeIndex=0);var l=s.querySelectorAll(".ui-select-choices-content");v.$animate&&v.$animate.on&&v.$animate.enabled(l[0])?v.$animate.on("enter",l[0],function(t,s){"close"===s&&i(function(){v.focusSearchInput(e)})}):i(function(){v.focusSearchInput(e),!v.tagging.isActivated&&v.items.length>1&&f()})}},v.focusSearchInput=function(e){v.search=e||v.search,v.searchInput[0].focus()},v.findGroupByName=function(e){return v.groups&&v.groups.filter(function(t){return t.name===e})[0]},v.parseRepeatAttr=function(e,s,i){function c(e){var c=t.$eval(s);if(v.groups=[],angular.forEach(e,function(e){var t=angular.isFunction(c)?c(e):e[c],s=v.findGroupByName(t);s?s.items.push(e):v.groups.push({name:t,items:[e]})}),i){var l=t.$eval(i);angular.isFunction(l)?v.groups=l(v.groups):angular.isArray(l)&&(v.groups=g(v.groups,l))}v.items=[],v.groups.forEach(function(e){v.items=v.items.concat(e.items)})}function a(e){v.items=e}v.setItemsFn=s?c:a,v.parserResult=l.parse(e),v.isGrouped=!!s,v.itemProperty=v.parserResult.itemName;var o=v.parserResult.source,u=function(){var e=o(t);t.$uisSource=Object.keys(e).map(function(t){var s={};return s[v.parserResult.keyName]=t,s.value=e[t],s})};v.parserResult.keyName&&(u(),v.parserResult.source=r("$uisSource"+v.parserResult.filters),t.$watch(o,function(e,t){e!==t&&u()},!0)),v.refreshItems=function(e){e=e||v.parserResult.source(t);var s=v.selected;if(v.isEmpty()||angular.isArray(s)&&!s.length||!v.removeSelected)v.setItemsFn(e);else if(void 0!==e){var i=e.filter(function(e){return s.every(function(t){return!angular.equals(e,t)})});v.setItemsFn(i)}("auto"===v.dropdownPosition||"up"===v.dropdownPosition)&&t.calculateDropdownPos()},t.$watchCollection(v.parserResult.source,function(e){if(void 0===e||null===e)v.items=[];else{if(!angular.isArray(e))throw n("items","Expected an array but got '{0}'.",e);v.refreshItems(e),v.ngModel.$modelValue=null}})};var $;v.refresh=function(e){void 0!==e&&($&&i.cancel($),$=i(function(){t.$eval(e)},v.refreshDelay))},v.isActive=function(e){if(!v.open)return!1;var t=v.items.indexOf(e[v.itemProperty]),s=t==v.activeIndex;return!s||0>t&&v.taggingLabel!==!1||0>t&&v.taggingLabel===!1?!1:(s&&!angular.isUndefined(v.onHighlightCallback)&&e.$eval(v.onHighlightCallback),s)},v.isDisabled=function(e){if(v.open){var t,s=v.items.indexOf(e[v.itemProperty]),i=!1;return s>=0&&!angular.isUndefined(v.disableChoiceExpression)&&(t=v.items[s],i=!!e.$eval(v.disableChoiceExpression),t._uiSelectChoiceDisabled=i),i}},v.select=function(e,s,c){if(void 0===e||!e._uiSelectChoiceDisabled){if(!v.items&&!v.search&&!v.tagging.isActivated)return;if(!e||!e._uiSelectChoiceDisabled){if(v.tagging.isActivated){if(v.taggingLabel===!1)if(v.activeIndex<0){if(e=void 0!==v.tagging.fct?v.tagging.fct(v.search):v.search,!e||angular.equals(v.items[0],e))return}else e=v.items[v.activeIndex];else if(0===v.activeIndex){if(void 0===e)return;if(void 0!==v.tagging.fct&&"string"==typeof e){if(e=v.tagging.fct(e),!e)return}else"string"==typeof e&&(e=e.replace(v.taggingLabel,"").trim())}if(v.selected&&angular.isArray(v.selected)&&v.selected.filter(function(t){return angular.equals(t,e)}).length>0)return v.close(s),void 0}t.$broadcast("uis:select",e);var l={};l[v.parserResult.itemName]=e,i(function(){v.onSelectCallback(t,{$item:e,$model:v.parserResult.modelMapper(t,l)})}),v.closeOnSelect&&v.close(s),c&&"click"===c.type&&(v.clickTriggeredSelect=!0)}}},v.close=function(e){v.open&&(v.ngModel&&v.ngModel.$setTouched&&v.ngModel.$setTouched(),p(),v.open=!1,t.$broadcast("uis:close",e))},v.setFocus=function(){v.focus||v.focusInput[0].focus()},v.clear=function(e){v.select(void 0),e.stopPropagation(),i(function(){v.focusser[0].focus()},0,!1)},v.toggle=function(e){v.open?(v.close(),e.preventDefault(),e.stopPropagation()):v.activate()},v.isLocked=function(e,t){var s,i=v.selected[t];return i&&!angular.isUndefined(v.lockChoiceExpression)&&(s=!!e.$eval(v.lockChoiceExpression),i._uiSelectChoiceLocked=s),s};var b=null;v.sizeSearchInput=function(){var e=v.searchInput[0],s=v.searchInput.parent().parent()[0],c=function(){return s.clientWidth*!!e.offsetParent},l=function(t){if(0===t)return!1;var s=t-e.offsetLeft-10;return 50>s&&(s=t),v.searchInput.css("width",s+"px"),!0};v.searchInput.css("width","10px"),i(function(){null!==b||l(c())||(b=t.$watch(c,function(e){l(e)&&(b(),b=null)}))})},v.searchInput.on("keydown",function(s){var c=s.which;~[e.ENTER,e.ESC].indexOf(c)&&(s.preventDefault(),s.stopPropagation()),t.$apply(function(){var t=!1;if((v.items.length>0||v.tagging.isActivated)&&(h(c),v.taggingTokens.isActivated)){for(var l=0;l0&&(t=!0);t&&i(function(){v.searchInput.triggerHandler("tagged");var t=v.search.replace(e.MAP[s.keyCode],"").trim();v.tagging.fct&&(t=v.tagging.fct(t)),t&&v.select(t,!0)})}}),e.isVerticalMovement(c)&&v.items.length>0&&f(),(c===e.ENTER||c===e.ESC)&&(s.preventDefault(),s.stopPropagation())}),v.searchInput.on("paste",function(t){var s;if(s=window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):(t.originalEvent||t).clipboardData.getData("text/plain"),s=v.search+s,s&&s.length>0)if(v.taggingTokens.isActivated){var i=e.toSeparator(v.taggingTokens.tokens[0]),c=s.split(i||v.taggingTokens.tokens[0]);if(c&&c.length>0){var l=v.search;angular.forEach(c,function(e){var t=v.tagging.fct?v.tagging.fct(e):e;t&&v.select(t,!0)}),v.search=l||m,t.preventDefault(),t.stopPropagation()}}else v.paste&&(v.paste(s),v.search=m,t.preventDefault(),t.stopPropagation())}),v.searchInput.on("tagged",function(){i(function(){p()})}),t.$on("$destroy",function(){v.searchInput.off("keyup keydown tagged blur paste")}),angular.element(u).bind("resize",function(){v.sizeSearchInput()})}]),s.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(e,t,s,i,c,l,n){return{restrict:"EA",templateUrl:function(e,s){var i=s.theme||t.theme;return i+(angular.isDefined(s.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(c,a){var r=/{(.*)}\s*{(.*)}/.exec(a.ngClass);if(r){var o="{"+r[1]+", "+r[2]+"}";a.ngClass=o,c.attr("ng-class",o)}return angular.isDefined(a.multiple)?c.append("").removeAttr("multiple"):c.append(""),a.inputId&&(c.querySelectorAll("input.ui-select-search")[0].id=a.inputId),function(c,a,r,o,u){function d(e){if(h.open){var t=!1;if(t=window.jQuery?window.jQuery.contains(a[0],e.target):a[0].contains(e.target),!t&&!h.clickTriggeredSelect){var s;if(h.skipFocusser)s=!0;else{var i=["input","button","textarea","select"],l=angular.element(e.target).controller("uiSelect");s=l&&l!==h,s||(s=~i.indexOf(e.target.tagName.toLowerCase()))}h.close(s),c.$digest()}h.clickTriggeredSelect=!1}}function p(){var t=i(a);m=angular.element('
    '),m[0].style.width=t.width+"px",m[0].style.height=t.height+"px",a.after(m),$=a[0].style.width,e.find("body").append(a),a[0].style.position="absolute",a[0].style.left=t.left+"px",a[0].style.top=t.top+"px",a[0].style.width=t.width+"px"}function g(){null!==m&&(m.replaceWith(a),m=null,a[0].style.position="",a[0].style.left="",a[0].style.top="",a[0].style.width=$,h.setFocus())}var h=o[0],f=o[1];h.generatedId=t.generateId(),h.baseTitle=r.title||"Select box",h.focusserTitle=h.baseTitle+" focus",h.focusserId="focusser-"+h.generatedId,h.closeOnSelect=function(){return angular.isDefined(r.closeOnSelect)?l(r.closeOnSelect)():t.closeOnSelect}(),c.$watch("skipFocusser",function(){var e=c.$eval(r.skipFocusser);h.skipFocusser=void 0!==e?e:t.skipFocusser}),h.onSelectCallback=l(r.onSelect),h.onRemoveCallback=l(r.onRemove),h.limit=angular.isDefined(r.limit)?parseInt(r.limit,10):void 0,h.ngModel=f,h.choiceGrouped=function(e){return h.isGrouped&&e&&e.name},r.tabindex&&r.$observe("tabindex",function(e){h.focusInput.attr("tabindex",e),a.removeAttr("tabindex")}),c.$watch("searchEnabled",function(){var e=c.$eval(r.searchEnabled);h.searchEnabled=void 0!==e?e:t.searchEnabled}),c.$watch("sortable",function(){var e=c.$eval(r.sortable);h.sortable=void 0!==e?e:t.sortable}),r.$observe("disabled",function(){h.disabled=void 0!==r.disabled?r.disabled:!1}),r.$observe("resetSearchInput",function(){var e=c.$eval(r.resetSearchInput);h.resetSearchInput=void 0!==e?e:!0}),r.$observe("paste",function(){h.paste=c.$eval(r.paste)}),r.$observe("tagging",function(){if(void 0!==r.tagging){var e=c.$eval(r.tagging);h.tagging={isActivated:!0,fct:e!==!0?e:void 0}}else h.tagging={isActivated:!1,fct:void 0}}),r.$observe("taggingLabel",function(){void 0!==r.tagging&&(h.taggingLabel="false"===r.taggingLabel?!1:void 0!==r.taggingLabel?r.taggingLabel:"(new)")}),r.$observe("taggingTokens",function(){if(void 0!==r.tagging){var e=void 0!==r.taggingTokens?r.taggingTokens.split("|"):[",","ENTER"];h.taggingTokens={isActivated:!0,tokens:e}}}),angular.isDefined(r.autofocus)&&n(function(){h.setFocus()}),angular.isDefined(r.focusOn)&&c.$on(r.focusOn,function(){n(function(){h.setFocus()})}),e.on("click",d),c.$on("$destroy",function(){e.off("click",d)}),u(c,function(e){var t=angular.element("
    ").append(e),i=t.querySelectorAll(".ui-select-match");if(i.removeAttr("ui-select-match"),i.removeAttr("data-ui-select-match"),1!==i.length)throw s("transcluded","Expected 1 .ui-select-match but got '{0}'.",i.length);a.querySelectorAll(".ui-select-match").replaceWith(i);var c=t.querySelectorAll(".ui-select-choices");if(c.removeAttr("ui-select-choices"),c.removeAttr("data-ui-select-choices"),1!==c.length)throw s("transcluded","Expected 1 .ui-select-choices but got '{0}'.",c.length);a.querySelectorAll(".ui-select-choices").replaceWith(c)});var v=c.$eval(r.appendToBody);(void 0!==v?v:t.appendToBody)&&(c.$watch("$select.open",function(e){e?p():g()}),c.$on("$destroy",function(){g()}));var m=null,$="",b=null,w="direction-up";c.$watch("$select.open",function(){("auto"===h.dropdownPosition||"up"===h.dropdownPosition)&&c.calculateDropdownPos()});var x=function(e,t){e=e||i(a),t=t||i(b),b[0].style.position="absolute",b[0].style.top=-1*t.height+"px",a.addClass(w)},y=function(e,t){a.removeClass(w),e=e||i(a),t=t||i(b),b[0].style.position="",b[0].style.top=""};c.calculateDropdownPos=function(){if(h.open){if(b=angular.element(a).querySelectorAll(".ui-select-dropdown"),0===b.length)return;b[0].style.opacity=0,n(function(){if("up"===h.dropdownPosition)x();else{a.removeClass(w);var t=i(a),s=i(b),c=e[0].documentElement.scrollTop||e[0].body.scrollTop;t.top+t.height+s.height>c+e[0].documentElement.clientHeight?x(t,s):y(t,s)}b[0].style.opacity=1})}else{if(null===b||0===b.length)return;b[0].style.position="",b[0].style.top="",a.removeClass(w)}}}}}}]),s.directive("uiSelectMatch",["uiSelectConfig",function(e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){t.addClass("ui-select-match");var s=t.parent().attr("theme")||e.theme,i=t.parent().attr("multiple");return s+(i?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(t,s,i,c){function l(e){c.allowClear=angular.isDefined(e)?""===e?!0:"true"===e.toLowerCase():!1}c.lockChoiceExpression=i.uiLockChoice,i.$observe("placeholder",function(t){c.placeholder=void 0!==t?t:e.placeholder}),i.$observe("allowClear",l),l(i.allowClear),c.multiple&&c.sizeSearchInput()}}}]),s.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(t,s){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(e,t){var s,i=this,c=e.$select;angular.isUndefined(c.selected)&&(c.selected=[]),e.$evalAsync(function(){s=e.ngModel}),i.activeMatchIndex=-1,i.updateModel=function(){s.$setViewValue(Date.now()),i.refreshComponent()},i.refreshComponent=function(){c.refreshItems(),c.sizeSearchInput()},i.removeChoice=function(s){var l=c.selected[s];if(!l._uiSelectChoiceLocked){var n={};n[c.parserResult.itemName]=l,c.selected.splice(s,1),i.activeMatchIndex=-1,c.sizeSearchInput(),t(function(){c.onRemoveCallback(e,{$item:l,$model:c.parserResult.modelMapper(e,n)})}),i.updateModel()}},i.getPlaceholder=function(){return c.selected&&c.selected.length?void 0:c.placeholder}}],controllerAs:"$selectMultiple",link:function(i,c,l,n){function a(e){return angular.isNumber(e.selectionStart)?e.selectionStart:e.value.length}function r(t){function s(){switch(t){case e.LEFT:return~g.activeMatchIndex?u:n;case e.RIGHT:return~g.activeMatchIndex&&r!==n?o:(d.activate(),!1);case e.BACKSPACE:return~g.activeMatchIndex?(g.removeChoice(r),u):n;case e.DELETE:return~g.activeMatchIndex?(g.removeChoice(g.activeMatchIndex),r):!1}}var i=a(d.searchInput[0]),c=d.selected.length,l=0,n=c-1,r=g.activeMatchIndex,o=g.activeMatchIndex+1,u=g.activeMatchIndex-1,p=r;return i>0||d.search.length&&t==e.RIGHT?!1:(d.close(),p=s(),g.activeMatchIndex=d.selected.length&&p!==!1?Math.min(n,Math.max(l,p)):-1,!0)}function o(e){if(void 0===e||void 0===d.search)return!1;var t=e.filter(function(e){return void 0===d.search.toUpperCase()||void 0===e?!1:e.toUpperCase()===d.search.toUpperCase()}).length>0;return t}function u(e,t){var s=-1;if(angular.isArray(e))for(var i=angular.copy(e),c=0;c=0;c--)t={},t[d.parserResult.itemName]=d.selected[c],e=d.parserResult.modelMapper(i,t),s.unshift(e);return s}),p.$formatters.unshift(function(e){var t,s=d.parserResult.source(i,{$select:{search:""}}),c={};if(!s)return e;var l=[],n=function(e,s){if(e&&e.length){for(var n=e.length-1;n>=0;n--){if(c[d.parserResult.itemName]=e[n],t=d.parserResult.modelMapper(i,c),d.parserResult.trackByExp){var a=/(\w*)\./.exec(d.parserResult.trackByExp),r=/\.([^\s]+)/.exec(d.parserResult.trackByExp);if(a&&a.length>0&&a[1]==d.parserResult.itemName&&r&&r.length>0&&t[r[1]]==s[r[1]])return l.unshift(e[n]),!0}if(angular.equals(t,s))return l.unshift(e[n]),!0}return!1}};if(!e)return l;for(var a=e.length-1;a>=0;a--)n(d.selected,e[a])||n(s,e[a])||l.unshift(e[a]);return l}),i.$watchCollection(function(){return p.$modelValue},function(e,t){t!=e&&(p.$modelValue=null,g.refreshComponent())}),p.$render=function(){if(!angular.isArray(p.$viewValue)){if(!angular.isUndefined(p.$viewValue)&&null!==p.$viewValue)throw t("multiarr","Expected model value to be array but got '{0}'",p.$viewValue);d.selected=[]}d.selected=p.$viewValue,g.refreshComponent(),i.$evalAsync()},i.$on("uis:select",function(e,t){d.selected.length>=d.limit||(d.selected.push(t),g.updateModel())}),i.$on("uis:activate",function(){g.activeMatchIndex=-1}),i.$watch("$select.disabled",function(e,t){t&&!e&&d.sizeSearchInput()}),d.searchInput.on("keydown",function(t){var s=t.which;i.$apply(function(){var i=!1;e.isHorizontalMovement(s)&&(i=r(s)),i&&s!=e.TAB&&(t.preventDefault(),t.stopPropagation())})}),d.searchInput.on("keyup",function(t){if(e.isVerticalMovement(t.which)||i.$evalAsync(function(){d.activeIndex=d.taggingLabel===!1?-1:0}),d.tagging.isActivated&&d.search.length>0){if(t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||e.isVerticalMovement(t.which))return;if(d.activeIndex=d.taggingLabel===!1?-1:0,d.taggingLabel===!1)return;var s,c,l,n,a=angular.copy(d.items),r=angular.copy(d.items),p=!1,g=-1;if(void 0!==d.tagging.fct){if(l=d.$filter("filter")(a,{isTag:!0}),l.length>0&&(n=l[0]),a.length>0&&n&&(p=!0,a=a.slice(1,a.length),r=r.slice(1,r.length)),s=d.tagging.fct(d.search),r.some(function(e){return angular.equals(e,d.tagging.fct(d.search))})||d.selected.some(function(e){return angular.equals(e,s)}))return i.$evalAsync(function(){d.activeIndex=0,d.items=a}),void 0;s.isTag=!0}else{if(l=d.$filter("filter")(a,function(e){return e.match(d.taggingLabel)}),l.length>0&&(n=l[0]),c=a[0],void 0!==c&&a.length>0&&n&&(p=!0,a=a.slice(1,a.length),r=r.slice(1,r.length)),s=d.search+" "+d.taggingLabel,u(d.selected,d.search)>-1)return;if(o(r.concat(d.selected)))return p&&(a=r,i.$evalAsync(function(){d.activeIndex=0,d.items=a})),void 0;if(o(r))return p&&(d.items=r.slice(1,r.length)),void 0}p&&(g=u(d.selected,s)),g>-1?a=a.slice(g+1,a.length-1):(a=[],a.push(s),a=a.concat(r)),i.$evalAsync(function(){d.activeIndex=0,d.items=a})}}),d.searchInput.on("blur",function(){s(function(){g.activeMatchIndex=-1})})}}}]),s.directive("uiSelectSingle",["$timeout","$compile",function(t,s){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(i,c,l,n){var a=n[0],r=n[1];r.$parsers.unshift(function(e){var t,s={};return s[a.parserResult.itemName]=e,t=a.parserResult.modelMapper(i,s)}),r.$formatters.unshift(function(e){var t,s=a.parserResult.source(i,{$select:{search:""}}),c={};if(s){var l=function(s){return c[a.parserResult.itemName]=s,t=a.parserResult.modelMapper(i,c),t==e};if(a.selected&&l(a.selected))return a.selected;for(var n=s.length-1;n>=0;n--)if(l(s[n]))return s[n]}return e}),i.$watch("$select.selected",function(e){r.$viewValue!==e&&r.$setViewValue(e)}),r.$render=function(){a.selected=r.$viewValue},i.$on("uis:select",function(e,t){a.selected=t}),i.$on("uis:close",function(e,s){t(function(){a.focusser.prop("disabled",!1),s||a.focusser[0].focus()},0,!1)}),i.$on("uis:activate",function(){o.prop("disabled",!0)});var o=angular.element("");s(o)(i),a.focusser=o,a.focusInput=o,c.parent().append(o),o.bind("focus",function(){i.$evalAsync(function(){a.focus=!0})}),o.bind("blur",function(){i.$evalAsync(function(){a.focus=!1})}),o.bind("keydown",function(t){return t.which===e.BACKSPACE?(t.preventDefault(),t.stopPropagation(),a.select(void 0),i.$apply(),void 0):(t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||((t.which==e.DOWN||t.which==e.UP||t.which==e.ENTER||t.which==e.SPACE)&&(t.preventDefault(),t.stopPropagation(),a.activate()),i.$digest()),void 0)}),o.bind("keyup input",function(t){t.which===e.TAB||e.isControl(t)||e.isFunctionKey(t)||t.which===e.ESC||t.which==e.ENTER||t.which===e.BACKSPACE||(a.activate(o.val()),o.val(""),i.$digest())})}}}]),s.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(e,t,s){return{require:"^^uiSelect",link:function(t,i,c,l){if(null===t[c.uiSelectSort])throw s("sort","Expected a list to sort");var n=angular.extend({axis:"horizontal"},t.$eval(c.uiSelectSortOptions)),a=n.axis,r="dragging",o="dropping",u="dropping-before",d="dropping-after";t.$watch(function(){return l.sortable},function(e){e?i.attr("draggable",!0):i.removeAttr("draggable")}),i.on("dragstart",function(e){i.addClass(r),(e.dataTransfer||e.originalEvent.dataTransfer).setData("text",t.$index.toString())}),i.on("dragend",function(){i.removeClass(r)});var p,g=function(e,t){this.splice(t,0,this.splice(e,1)[0])},h=function(e){e.preventDefault();var t="vertical"===a?e.offsetY||e.layerY||(e.originalEvent?e.originalEvent.offsetY:0):e.offsetX||e.layerX||(e.originalEvent?e.originalEvent.offsetX:0);t
  • '),e.put("bootstrap/match-multiple.tpl.html",' × '),e.put("bootstrap/match.tpl.html",'
    {{$select.placeholder}}
    '),e.put("bootstrap/select-multiple.tpl.html",''),e.put("bootstrap/select.tpl.html",''),e.put("select2/choices.tpl.html",'
    '),e.put("select2/match-multiple.tpl.html",'
  • '),e.put("select2/match.tpl.html",'{{$select.placeholder}} '),e.put("select2/select-multiple.tpl.html",'
    '),e.put("select2/select.tpl.html",'
    '),e.put("selectize/choices.tpl.html",'
    '),e.put("selectize/match.tpl.html",'
    '),e.put("selectize/select.tpl.html",'
    ') -}]); \ No newline at end of file +!function(){"use strict";function e(e){return angular.isUndefined(e)||null===e}var t={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(e){var s=e.which;switch(s){case t.COMMAND:case t.SHIFT:case t.CTRL:case t.ALT:return!0}return!!(e.metaKey||e.ctrlKey||e.altKey)},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123},isVerticalMovement:function(e){return~[t.UP,t.DOWN].indexOf(e)},isHorizontalMovement:function(e){return~[t.LEFT,t.RIGHT,t.BACKSPACE,t.DELETE].indexOf(e)},toSeparator:function(e){var s={ENTER:"\n",TAB:"\t",SPACE:" "}[e];return s?s:t[e]?void 0:e}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(e){return angular.element(this[0].querySelectorAll(e))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(e){for(var t=this[0],s=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;t;){if(s.bind(t)(e))return t;t=t.parentElement}return!1});var s=0,i=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,skipFocusser:!1,dropdownPosition:"auto",removeSelected:!0,resetSearchInput:!0,generateId:function(){return s++},appendToBody:!1,spinnerEnabled:!1,spinnerClass:"glyphicon glyphicon-refresh ui-select-spin",backspaceReset:!0}).service("uiSelectMinErr",function(){var e=angular.$$minErr("ui.select");return function(){var t=e.apply(this,arguments),s=t.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(s)}}).directive("uisTranscludeAppend",function(){return{link:function(e,t,s,i,c){c(e,function(e){t.append(e)})}}}).filter("highlight",function(){function e(e){return(""+e).replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,s){return s&&t?(""+t).replace(new RegExp(e(s),"gi"),'$&'):t}}).factory("uisOffset",["$document","$window",function(e,t){return function(s){var i=s[0].getBoundingClientRect();return{width:i.width||s.prop("offsetWidth"),height:i.height||s.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}]);i.factory("$$uisDebounce",["$timeout",function(e){return function(t,s){var i;return function(){var c=this,n=Array.prototype.slice.call(arguments);i&&e.cancel(i),i=e(function(){t.apply(c,n)},s)}}}]),i.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile","$window",function(e,t,s,i,c){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){t.addClass("ui-select-choices");var s=t.parent().attr("theme")||e.theme;return s+"/choices.tpl.html"},compile:function(i,n){if(!n.repeat)throw s("repeat","Expected 'repeat' expression.");var l=n.groupBy,a=n.groupFilter;if(l){var r=i.querySelectorAll(".ui-select-choices-group");if(1!==r.length)throw s("rows","Expected 1 .ui-select-choices-group but got '{0}'.",r.length);r.attr("ng-repeat",t.getGroupNgRepeatExpression())}var o=t.parse(n.repeat),u=i.querySelectorAll(".ui-select-choices-row");if(1!==u.length)throw s("rows","Expected 1 .ui-select-choices-row but got '{0}'.",u.length);u.attr("ng-repeat",o.repeatExpression(l)).attr("ng-if","$select.open");var d=i.querySelectorAll(".ui-select-choices-row-inner");if(1!==d.length)throw s("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",d.length);d.attr("uis-transclude-append","");var p=c.document.addEventListener?u:d;return p.attr("ng-click","$select.select("+o.itemName+",$select.skipFocusser,$event)"),function(t,s,c,n){n.parseRepeatAttr(c.repeat,l,a),n.disableChoiceExpression=c.uiDisableChoice,n.onHighlightCallback=c.onHighlight,n.minimumInputLength=parseInt(c.minimumInputLength)||0,n.dropdownPosition=c.position?c.position.toLowerCase():e.dropdownPosition,t.$watch("$select.search",function(e){e&&!n.open&&n.multiple&&n.activate(!1,!0),n.activeIndex=n.tagging.isActivated?-1:0,!c.minimumInputLength||n.search.length>=c.minimumInputLength?n.refresh(c.refresh):n.items=[]}),c.$observe("refreshDelay",function(){var s=t.$eval(c.refreshDelay);n.refreshDelay=void 0!==s?s:e.refreshDelay}),t.$watch("$select.open",function(e){e?(i.attr("role","listbox"),n.refresh(c.refresh)):s.removeAttr("role")})}}}}]),i.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","$$uisDebounce","uisRepeatParser","uiSelectMinErr","uiSelectConfig","$parse","$injector","$window",function(s,i,c,n,l,a,r,o,u,d,p){function h(e,t,s){if(e.findIndex)return e.findIndex(t,s);for(var i,c=Object(e),n=c.length>>>0,l=0;l-1&&I.splice(s,1)}function m(e){return I.indexOf(e)>-1}function $(e){function t(e,t){var s=i.indexOf(e);t&&s===-1&&i.push(e),!t&&s>-1&&i.splice(s,1)}function s(e){return i.indexOf(e)>-1}if(e){var i=[];y.isLocked=function(e,i){var c=!1,n=y.selected[i];return n&&(e?(c=!!e.$eval(y.lockChoiceExpression),t(n,c)):c=s(n)),c}}}function b(e){var s=!0;switch(e){case t.DOWN:if(!y.open&&y.multiple)y.activate(!1,!0);else if(y.activeIndexc)for(var n=--y.activeIndex;m(y.items[n])&&n>c;)y.activeIndex=--n;break;case t.TAB:y.multiple&&!y.open||y.select(y.items[y.activeIndex],!0);break;case t.ENTER:y.open&&(y.tagging.isActivated||y.activeIndex>=0)?y.select(y.items[y.activeIndex],y.skipFocusser):y.activate(!1,!0);break;case t.ESC:y.close();break;default:s=!1}return s}function w(){var e=i.querySelectorAll(".ui-select-choices-content"),t=e.querySelectorAll(".ui-select-choices-row");if(t.length<1)throw r("choices","Expected multiple .ui-select-choices-row but got '{0}'.",t.length);if(!(y.activeIndex<0)){var s=t[y.activeIndex],c=s.offsetTop+s.clientHeight-e[0].scrollTop,n=e[0].offsetHeight;c>n?e[0].scrollTop+=c-n:c=y.items.length?0:y.activeIndex,y.activeIndex===-1&&y.taggingLabel!==!1&&(y.activeIndex=0);var n=i.querySelectorAll(".ui-select-choices-content"),l=i.querySelectorAll(".ui-select-search");if(y.$animate&&y.$animate.on&&y.$animate.enabled(n[0])){var a=function(t,s){"start"===s&&0===y.items.length?(y.$animate.off("removeClass",l[0],a),c(function(){y.focusSearchInput(e)})):"close"===s&&(y.$animate.off("enter",n[0],a),c(function(){y.focusSearchInput(e)}))};y.items.length>0?y.$animate.on("enter",n[0],a):y.$animate.on("removeClass",l[0],a)}else c(function(){y.focusSearchInput(e),!y.tagging.isActivated&&y.items.length>1&&w()})}},y.focusSearchInput=function(e){y.search=e||y.search,y.searchInput[0].focus()},y.findGroupByName=function(e){return y.groups&&y.groups.filter(function(t){return t.name===e})[0]},y.parseRepeatAttr=function(e,t,i){function c(e){var c=s.$eval(t);if(y.groups=[],angular.forEach(e,function(e){var t=angular.isFunction(c)?c(e):e[c],s=y.findGroupByName(t);s?s.items.push(e):y.groups.push({name:t,items:[e]})}),i){var n=s.$eval(i);angular.isFunction(n)?y.groups=n(y.groups):angular.isArray(n)&&(y.groups=f(y.groups,n))}y.items=[],y.groups.forEach(function(e){y.items=y.items.concat(e.items)})}function n(e){y.items=e||[]}y.setItemsFn=t?c:n,y.parserResult=a.parse(e),y.isGrouped=!!t,y.itemProperty=y.parserResult.itemName;var l=y.parserResult.source,o=function(){var e=l(s);s.$uisSource=Object.keys(e).map(function(t){var s={};return s[y.parserResult.keyName]=t,s.value=e[t],s})};y.parserResult.keyName&&(o(),y.parserResult.source=u("$uisSource"+y.parserResult.filters),s.$watch(l,function(e,t){e!==t&&o()},!0)),y.refreshItems=function(e){e=e||y.parserResult.source(s);var t=y.selected;if(y.isEmpty()||angular.isArray(t)&&!t.length||!y.multiple||!y.removeSelected)y.setItemsFn(e);else if(void 0!==e&&null!==e){var i=e.filter(function(e){return angular.isArray(t)?t.every(function(t){return!angular.equals(e,t)}):!angular.equals(e,t)});y.setItemsFn(i)}"auto"!==y.dropdownPosition&&"up"!==y.dropdownPosition||s.calculateDropdownPos(),s.$broadcast("uis:refresh")},s.$watchCollection(y.parserResult.source,function(e){if(void 0===e||null===e)y.items=[];else{if(!angular.isArray(e))throw r("items","Expected an array but got '{0}'.",e);y.refreshItems(e),angular.isDefined(y.ngModel.$modelValue)&&(y.ngModel.$modelValue=null)}})};var E;y.refresh=function(e){void 0!==e&&(E&&c.cancel(E),E=c(function(){if(s.$select.search.length>=s.$select.minimumInputLength){var t=s.$eval(e);t&&angular.isFunction(t.then)&&!y.refreshing&&(y.refreshing=!0,t["finally"](function(){y.refreshing=!1}))}},y.refreshDelay))},y.isActive=function(e){if(!y.open)return!1;var t=y.items.indexOf(e[y.itemProperty]),s=t==y.activeIndex;return!(!s||t<0)&&(s&&!angular.isUndefined(y.onHighlightCallback)&&e.$eval(y.onHighlightCallback),s)};var S=function(e){return y.selected&&angular.isArray(y.selected)&&y.selected.filter(function(t){return angular.equals(t,e)}).length>0},I=[];y.isDisabled=function(e){if(y.open){var t=e[y.itemProperty],s=y.items.indexOf(t),i=!1;if(s>=0&&(angular.isDefined(y.disableChoiceExpression)||y.multiple)){if(t.isTag)return!1;y.multiple&&(i=S(t)),!i&&angular.isDefined(y.disableChoiceExpression)&&(i=!!e.$eval(y.disableChoiceExpression)),v(t,i)}return i}},y.select=function(t,i,c){if(e(t)||!m(t)){if(!y.items&&!y.search&&!y.tagging.isActivated)return;if(!t||!m(t)){if(y.clickTriggeredSelect=!1,c&&("click"===c.type||"touchend"===c.type)&&t&&(y.clickTriggeredSelect=!0),y.tagging.isActivated&&y.clickTriggeredSelect===!1){if(y.taggingLabel===!1)if(y.activeIndex<0){if(void 0===t&&(t=void 0!==y.tagging.fct?y.tagging.fct(y.search):y.search),!t||angular.equals(y.items[0],t))return}else t=y.items[y.activeIndex];else if(0===y.activeIndex){if(void 0===t)return;if(void 0!==y.tagging.fct&&"string"==typeof t){if(t=y.tagging.fct(t),!t)return}else"string"==typeof t&&(t=t.replace(y.taggingLabel,"").trim())}if(S(t))return void y.close(i)}g(),s.$broadcast("uis:select",t),y.closeOnSelect&&y.close(i)}}},y.close=function(e){y.open&&(y.ngModel&&y.ngModel.$setTouched&&y.ngModel.$setTouched(),y.open=!1,g(),s.$broadcast("uis:close",e))},y.setFocus=function(){y.focus||y.focusInput[0].focus()},y.clear=function(e){y.select(null),e.stopPropagation(),c(function(){y.focusser[0].focus()},0,!1)},y.toggle=function(e){y.open?(y.close(),e.preventDefault(),e.stopPropagation()):y.activate()},y.isLocked=function(){return!1},s.$watch(function(){return angular.isDefined(y.lockChoiceExpression)&&""!==y.lockChoiceExpression},$);var C=null,k=!1;y.sizeSearchInput=function(){var e=y.searchInput[0],t=y.$element[0],i=function(){return t.clientWidth*!!e.offsetParent},n=function(t){if(0===t)return!1;var s=t-e.offsetLeft;return s<50&&(s=t),y.searchInput.css("width",s+"px"),!0};y.searchInput.css("width","10px"),c(function(){null!==C||n(i())||(C=s.$watch(function(){k||(k=!0,s.$$postDigest(function(){k=!1,n(i())&&(C(),C=null)}))},angular.noop))})},y.searchInput.on("keydown",function(e){var i=e.which;~[t.ENTER,t.ESC].indexOf(i)&&(e.preventDefault(),e.stopPropagation()),s.$apply(function(){var s=!1;if((y.items.length>0||y.tagging.isActivated)&&(b(i)||y.searchEnabled||(e.preventDefault(),e.stopPropagation()),y.taggingTokens.isActivated)){for(var n=0;n0&&(s=!0);s&&c(function(){y.searchInput.triggerHandler("tagged");var s=y.search.replace(t.MAP[e.keyCode],"").trim();y.tagging.fct&&(s=y.tagging.fct(s)),s&&y.select(s,!0)})}}),t.isVerticalMovement(i)&&y.items.length>0&&w(),i!==t.ENTER&&i!==t.ESC||(e.preventDefault(),e.stopPropagation())}),y.searchInput.on("paste",function(e){var s;if(s=window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):(e.originalEvent||e).clipboardData.getData("text/plain"),s=y.search+s,s&&s.length>0)if(y.taggingTokens.isActivated){for(var i=[],c=0;c-1){i=s.split(n);break}}0===i.length&&(i=[s]);var l=y.search;angular.forEach(i,function(e){var t=y.tagging.fct?y.tagging.fct(e):e;t&&y.select(t,!0)}),y.search=l||x,e.preventDefault(),e.stopPropagation()}else y.paste&&(y.paste(s),y.search=x,e.preventDefault(),e.stopPropagation())}),y.searchInput.on("tagged",function(){c(function(){g()})});var A=l(function(){y.sizeSearchInput()},50);angular.element(p).bind("resize",A),s.$on("$destroy",function(){y.searchInput.off("keyup keydown tagged blur paste"),angular.element(p).off("resize",A)}),s.$watch("$select.activeIndex",function(e){e&&i.find("input").attr("aria-activedescendant","ui-select-choices-row-"+y.generatedId+"-"+e)}),s.$watch("$select.open",function(e){e||i.find("input").removeAttr("aria-activedescendant")})}]),i.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(e,t,s,i,c,n,l){return{restrict:"EA",templateUrl:function(e,s){var i=s.theme||t.theme;return i+(angular.isDefined(s.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(c,a){var r=/{(.*)}\s*{(.*)}/.exec(a.ngClass);if(r){var o="{"+r[1]+", "+r[2]+"}";a.ngClass=o,c.attr("ng-class",o)}return angular.isDefined(a.multiple)?c.append("").removeAttr("multiple"):c.append(""),a.inputId&&(c.querySelectorAll("input.ui-select-search")[0].id=a.inputId),function(c,a,r,o,u){function d(e){if(g.open){var t=!1;if(t=window.jQuery?window.jQuery.contains(a[0],e.target):a[0].contains(e.target),!t&&!g.clickTriggeredSelect){var s;if(g.skipFocusser)s=!0;else{var i=["input","button","textarea","select"],n=angular.element(e.target).controller("uiSelect");s=n&&n!==g,s||(s=~i.indexOf(e.target.tagName.toLowerCase()))}g.close(s),c.$digest()}g.clickTriggeredSelect=!1}}function p(){var t=i(a);m=angular.element('
    '),m[0].style.width=t.width+"px",m[0].style.height=t.height+"px",a.after(m),$=a[0].style.width,e.find("body").append(a),a[0].style.position="absolute",a[0].style.left=t.left+"px",a[0].style.top=t.top+"px",a[0].style.width=t.width+"px"}function h(){null!==m&&(m.replaceWith(a),m=null,a[0].style.position="",a[0].style.left="",a[0].style.top="",a[0].style.width=$,g.setFocus())}var g=o[0],f=o[1];g.generatedId=t.generateId(),g.baseTitle=r.title||"Select box",g.focusserTitle=g.baseTitle+" focus",g.focusserId="focusser-"+g.generatedId,g.closeOnSelect=function(){return angular.isDefined(r.closeOnSelect)?n(r.closeOnSelect)():t.closeOnSelect}(),c.$watch("skipFocusser",function(){var e=c.$eval(r.skipFocusser);g.skipFocusser=void 0!==e?e:t.skipFocusser}),g.onSelectCallback=n(r.onSelect),g.onRemoveCallback=n(r.onRemove),g.ngModel=f,g.choiceGrouped=function(e){return g.isGrouped&&e&&e.name},r.tabindex&&r.$observe("tabindex",function(e){g.focusInput.attr("tabindex",e),a.removeAttr("tabindex")}),c.$watch(function(){return c.$eval(r.searchEnabled)},function(e){g.searchEnabled=void 0!==e?e:t.searchEnabled}),c.$watch("sortable",function(){var e=c.$eval(r.sortable);g.sortable=void 0!==e?e:t.sortable}),r.$observe("backspaceReset",function(){var e=c.$eval(r.backspaceReset);g.backspaceReset=void 0===e||e}),r.$observe("limit",function(){g.limit=angular.isDefined(r.limit)?parseInt(r.limit,10):void 0}),c.$watch("removeSelected",function(){var e=c.$eval(r.removeSelected);g.removeSelected=void 0!==e?e:t.removeSelected}),r.$observe("disabled",function(){g.disabled=void 0!==r.disabled&&r.disabled}),r.$observe("resetSearchInput",function(){var e=c.$eval(r.resetSearchInput);g.resetSearchInput=void 0===e||e}),r.$observe("paste",function(){g.paste=c.$eval(r.paste)}),r.$observe("tagging",function(){if(void 0!==r.tagging){var e=c.$eval(r.tagging);g.tagging={isActivated:!0,fct:e!==!0?e:void 0}}else g.tagging={isActivated:!1,fct:void 0}}),r.$observe("taggingLabel",function(){void 0!==r.tagging&&("false"===r.taggingLabel?g.taggingLabel=!1:g.taggingLabel=void 0!==r.taggingLabel?r.taggingLabel:"(new)")}),r.$observe("taggingTokens",function(){if(void 0!==r.tagging){var e=void 0!==r.taggingTokens?r.taggingTokens.split("|"):[",","ENTER"];g.taggingTokens={isActivated:!0,tokens:e}}}),r.$observe("spinnerEnabled",function(){var e=c.$eval(r.spinnerEnabled);g.spinnerEnabled=void 0!==e?e:t.spinnerEnabled}),r.$observe("spinnerClass",function(){var e=r.spinnerClass;g.spinnerClass=void 0!==e?r.spinnerClass:t.spinnerClass}),angular.isDefined(r.autofocus)&&l(function(){g.setFocus()}),angular.isDefined(r.focusOn)&&c.$on(r.focusOn,function(){l(function(){g.setFocus()})}),e.on("click",d),c.$on("$destroy",function(){e.off("click",d)}),u(c,function(e){var t=angular.element("
    ").append(e),i=t.querySelectorAll(".ui-select-match");if(i.removeAttr("ui-select-match"),i.removeAttr("data-ui-select-match"),1!==i.length)throw s("transcluded","Expected 1 .ui-select-match but got '{0}'.",i.length);a.querySelectorAll(".ui-select-match").replaceWith(i);var c=t.querySelectorAll(".ui-select-choices");if(c.removeAttr("ui-select-choices"),c.removeAttr("data-ui-select-choices"),1!==c.length)throw s("transcluded","Expected 1 .ui-select-choices but got '{0}'.",c.length);a.querySelectorAll(".ui-select-choices").replaceWith(c);var n=t.querySelectorAll(".ui-select-no-choice");n.removeAttr("ui-select-no-choice"),n.removeAttr("data-ui-select-no-choice"),1==n.length&&a.querySelectorAll(".ui-select-no-choice").replaceWith(n)});var v=c.$eval(r.appendToBody);(void 0!==v?v:t.appendToBody)&&(c.$watch("$select.open",function(e){e?p():h()}),c.$on("$destroy",function(){h()}));var m=null,$="",b=null,w="direction-up";c.$watch("$select.open",function(){"auto"!==g.dropdownPosition&&"up"!==g.dropdownPosition||c.calculateDropdownPos()});var y=function(e,t){e=e||i(a),t=t||i(b),b[0].style.position="absolute",b[0].style.top=t.height*-1+"px",a.addClass(w)},x=function(e,t){a.removeClass(w),e=e||i(a),t=t||i(b),b[0].style.position="",b[0].style.top=""},E=function(){l(function(){if("up"===g.dropdownPosition)y();else{a.removeClass(w);var t=i(a),s=i(b),c=e[0].documentElement.scrollTop||e[0].body.scrollTop;t.top+t.height+s.height>c+e[0].documentElement.clientHeight?y(t,s):x(t,s)}b[0].style.opacity=1})},S=!1;c.calculateDropdownPos=function(){if(g.open){if(b=angular.element(a).querySelectorAll(".ui-select-dropdown"),0===b.length)return;if(""!==g.search||S||(b[0].style.opacity=0,S=!0),!i(b).height&&g.$animate&&g.$animate.on&&g.$animate.enabled(b)){var e=!0;g.$animate.on("enter",b,function(t,s){"close"===s&&e&&(E(),e=!1)})}else E()}else{if(null===b||0===b.length)return;b[0].style.opacity=0,b[0].style.position="",b[0].style.top="",a.removeClass(w)}}}}}}]),i.directive("uiSelectMatch",["uiSelectConfig",function(e){function t(e,t){return e[0].hasAttribute(t)?e.attr(t):e[0].hasAttribute("data-"+t)?e.attr("data-"+t):e[0].hasAttribute("x-"+t)?e.attr("x-"+t):void 0}return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(s){s.addClass("ui-select-match");var i=s.parent(),c=t(i,"theme")||e.theme,n=angular.isDefined(t(i,"multiple"));return c+(n?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(t,s,i,c){function n(e){c.allowClear=!!angular.isDefined(e)&&(""===e||"true"===e.toLowerCase())}c.lockChoiceExpression=i.uiLockChoice,i.$observe("placeholder",function(t){c.placeholder=void 0!==t?t:e.placeholder}),i.$observe("allowClear",n),n(i.allowClear),c.multiple&&c.sizeSearchInput()}}}]),i.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(s,i){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(e,t){var s,i=this,c=e.$select;angular.isUndefined(c.selected)&&(c.selected=[]),e.$evalAsync(function(){s=e.ngModel}),i.activeMatchIndex=-1,i.updateModel=function(){s.$setViewValue(Date.now()),i.refreshComponent()},i.refreshComponent=function(){c.refreshItems&&c.refreshItems(),c.sizeSearchInput&&c.sizeSearchInput()},i.removeChoice=function(s){if(c.isLocked(null,s))return!1;var n=c.selected[s],l={};return l[c.parserResult.itemName]=n,c.selected.splice(s,1),i.activeMatchIndex=-1,c.sizeSearchInput(),t(function(){c.onRemoveCallback(e,{$item:n,$model:c.parserResult.modelMapper(e,l)})}),i.updateModel(),!0},i.getPlaceholder=function(){if(!c.selected||!c.selected.length)return c.placeholder}}],controllerAs:"$selectMultiple",link:function(c,n,l,a){function r(e){return angular.isNumber(e.selectionStart)?e.selectionStart:e.value.length}function o(e){function s(){switch(e){case t.LEFT:return~g.activeMatchIndex?u:l;case t.RIGHT:return~g.activeMatchIndex&&a!==l?o:(p.activate(),!1);case t.BACKSPACE:return~g.activeMatchIndex?g.removeChoice(a)?u:a:l;case t.DELETE:return!!~g.activeMatchIndex&&(g.removeChoice(g.activeMatchIndex),a)}}var i=r(p.searchInput[0]),c=p.selected.length,n=0,l=c-1,a=g.activeMatchIndex,o=g.activeMatchIndex+1,u=g.activeMatchIndex-1,d=a;return!(i>0||p.search.length&&e==t.RIGHT)&&(p.close(),d=s(),p.selected.length&&d!==!1?g.activeMatchIndex=Math.min(l,Math.max(n,d)):g.activeMatchIndex=-1,!0)}function u(e){if(void 0===e||void 0===p.search)return!1;var t=e.filter(function(e){return void 0!==p.search.toUpperCase()&&void 0!==e&&e.toUpperCase()===p.search.toUpperCase()}).length>0;return t}function d(e,t){var s=-1;if(angular.isArray(e))for(var i=angular.copy(e),c=0;c=0;i--)t={},t[p.parserResult.itemName]=p.selected[i],e=p.parserResult.modelMapper(c,t),s.unshift(e);return s}),h.$formatters.unshift(function(e){var t,s=p.parserResult&&p.parserResult.source(c,{$select:{search:""}}),i={};if(!s)return e;var n=[],l=function(e,s){if(e&&e.length){for(var l=e.length-1;l>=0;l--){if(i[p.parserResult.itemName]=e[l],t=p.parserResult.modelMapper(c,i),p.parserResult.trackByExp){var a=/(\w*)\./.exec(p.parserResult.trackByExp),r=/\.([^\s]+)/.exec(p.parserResult.trackByExp);if(a&&a.length>0&&a[1]==p.parserResult.itemName&&r&&r.length>0&&t[r[1]]==s[r[1]])return n.unshift(e[l]),!0}if(angular.equals(t,s))return n.unshift(e[l]),!0}return!1}};if(!e)return n;for(var a=e.length-1;a>=0;a--)l(p.selected,e[a])||l(s,e[a])||n.unshift(e[a]);return n}),c.$watchCollection(function(){return h.$modelValue},function(e,t){t!=e&&(angular.isDefined(h.$modelValue)&&(h.$modelValue=null),g.refreshComponent())}),h.$render=function(){if(!angular.isArray(h.$viewValue)){if(!e(h.$viewValue))throw s("multiarr","Expected model value to be array but got '{0}'",h.$viewValue);h.$viewValue=[]}p.selected=h.$viewValue,g.refreshComponent(),c.$evalAsync()},c.$on("uis:select",function(e,t){if(!(p.selected.length>=p.limit)){p.selected.push(t);var s={};s[p.parserResult.itemName]=t,i(function(){p.onSelectCallback(c,{$item:t,$model:p.parserResult.modelMapper(c,s)})}),g.updateModel()}}),c.$on("uis:activate",function(){g.activeMatchIndex=-1}),c.$watch("$select.disabled",function(e,t){t&&!e&&p.sizeSearchInput()}),p.searchInput.on("keydown",function(e){var s=e.which;c.$apply(function(){var i=!1;t.isHorizontalMovement(s)&&(i=o(s)),i&&s!=t.TAB&&(e.preventDefault(),e.stopPropagation())})}),p.searchInput.on("keyup",function(e){if(t.isVerticalMovement(e.which)||c.$evalAsync(function(){p.activeIndex=p.taggingLabel===!1?-1:0}),p.tagging.isActivated&&p.search.length>0){if(e.which===t.TAB||t.isControl(e)||t.isFunctionKey(e)||e.which===t.ESC||t.isVerticalMovement(e.which))return;if(p.activeIndex=p.taggingLabel===!1?-1:0,p.taggingLabel===!1)return;var s,i,n,l,a=angular.copy(p.items),r=angular.copy(p.items),o=!1,h=-1;if(void 0!==p.tagging.fct){if(n=p.$filter("filter")(a,{isTag:!0}),n.length>0&&(l=n[0]),a.length>0&&l&&(o=!0,a=a.slice(1,a.length),r=r.slice(1,r.length)),s=p.tagging.fct(p.search),r.some(function(e){return angular.equals(e,s)})||p.selected.some(function(e){return angular.equals(e,s)}))return void c.$evalAsync(function(){p.activeIndex=0,p.items=a});s&&(s.isTag=!0)}else{if(n=p.$filter("filter")(a,function(e){return e.match(p.taggingLabel)}),n.length>0&&(l=n[0]),i=a[0],void 0!==i&&a.length>0&&l&&(o=!0,a=a.slice(1,a.length),r=r.slice(1,r.length)),s=p.search+" "+p.taggingLabel,d(p.selected,p.search)>-1)return;if(u(r.concat(p.selected)))return void(o&&(a=r,c.$evalAsync(function(){p.activeIndex=0,p.items=a})));if(u(r))return void(o&&(p.items=r.slice(1,r.length)))}o&&(h=d(p.selected,s)),h>-1?a=a.slice(h+1,a.length-1):(a=[],s&&a.push(s),a=a.concat(r)),c.$evalAsync(function(){if(p.activeIndex=0,p.items=a,p.isGrouped){var e=s?a.slice(1):a;p.setItemsFn(e),s&&(p.items.unshift(s),p.groups.unshift({name:"",items:[s],tagging:!0}))}})}}),p.searchInput.on("blur",function(){i(function(){g.activeMatchIndex=-1})})}}}]),i.directive("uiSelectNoChoice",["uiSelectConfig",function(e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(t){t.addClass("ui-select-no-choice");var s=t.parent().attr("theme")||e.theme;return s+"/no-choice.tpl.html"}}}]),i.directive("uiSelectSingle",["$timeout","$compile",function(s,i){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(c,n,l,a){var r=a[0],o=a[1];o.$parsers.unshift(function(t){if(e(t))return t;var s,i={};return i[r.parserResult.itemName]=t,s=r.parserResult.modelMapper(c,i)}),o.$formatters.unshift(function(t){if(e(t))return t;var s,i=r.parserResult&&r.parserResult.source(c,{$select:{search:""}}),n={};if(i){var l=function(e){return n[r.parserResult.itemName]=e,s=r.parserResult.modelMapper(c,n),s===t};if(r.selected&&l(r.selected))return r.selected;for(var a=i.length-1;a>=0;a--)if(l(i[a]))return i[a]}return t}),c.$watch("$select.selected",function(e){o.$viewValue!==e&&o.$setViewValue(e)}),o.$render=function(){r.selected=o.$viewValue},c.$on("uis:select",function(t,i){r.selected=i;var n={};n[r.parserResult.itemName]=i,s(function(){r.onSelectCallback(c,{$item:i,$model:e(i)?i:r.parserResult.modelMapper(c,n)})})}),c.$on("uis:close",function(e,t){s(function(){r.focusser.prop("disabled",!1),t||r.focusser[0].focus()},0,!1)}),c.$on("uis:activate",function(){u.prop("disabled",!0)});var u=angular.element("");i(u)(c),r.focusser=u,r.focusInput=u,n.parent().append(u),u.bind("focus",function(){c.$evalAsync(function(){r.focus=!0})}),u.bind("blur",function(){c.$evalAsync(function(){r.focus=!1})}),u.bind("keydown",function(e){return e.which===t.BACKSPACE&&r.backspaceReset!==!1?(e.preventDefault(),e.stopPropagation(),r.select(void 0),void c.$apply()):void(e.which===t.TAB||t.isControl(e)||t.isFunctionKey(e)||e.which===t.ESC||(e.which!=t.DOWN&&e.which!=t.UP&&e.which!=t.ENTER&&e.which!=t.SPACE||(e.preventDefault(),e.stopPropagation(),r.activate()),c.$digest()))}),u.bind("keyup input",function(e){e.which===t.TAB||t.isControl(e)||t.isFunctionKey(e)||e.which===t.ESC||e.which==t.ENTER||e.which===t.BACKSPACE||(r.activate(u.val()),u.val(""),c.$digest())})}}}]),i.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(e,t,s){return{require:["^^uiSelect","^ngModel"],link:function(t,i,c,n){if(null===t[c.uiSelectSort])throw s("sort","Expected a list to sort");var l=n[0],a=n[1],r=angular.extend({axis:"horizontal"},t.$eval(c.uiSelectSortOptions)),o=r.axis,u="dragging",d="dropping",p="dropping-before",h="dropping-after";t.$watch(function(){return l.sortable},function(e){e?i.attr("draggable",!0):i.removeAttr("draggable")}),i.on("dragstart",function(e){i.addClass(u),(e.dataTransfer||e.originalEvent.dataTransfer).setData("text",t.$index.toString())}),i.on("dragend",function(){v(u)});var g,f=function(e,t){this.splice(t,0,this.splice(e,1)[0])},v=function(e){angular.forEach(l.$element.querySelectorAll("."+e),function(t){angular.element(t).removeClass(e)})},m=function(e){e.preventDefault();var t="vertical"===o?e.offsetY||e.layerY||(e.originalEvent?e.originalEvent.offsetY:0):e.offsetX||e.layerX||(e.originalEvent?e.originalEvent.offsetX:0);t
  • '),e.put("bootstrap/match-multiple.tpl.html",' × '),e.put("bootstrap/match.tpl.html",'
    {{$select.placeholder}}
    '),e.put("bootstrap/no-choice.tpl.html",''),e.put("bootstrap/select-multiple.tpl.html",''),e.put("bootstrap/select.tpl.html",''),e.put("select2/choices.tpl.html",'
    '),e.put("select2/match-multiple.tpl.html",'
  • '),e.put("select2/match.tpl.html",'{{$select.placeholder}} '),e.put("select2/no-choice.tpl.html",''),e.put("select2/select-multiple.tpl.html",'
    '),e.put("select2/select.tpl.html",'
    '),e.put("selectize/choices.tpl.html",'
    '),e.put("selectize/match-multiple.tpl.html",'
    ×
    '),e.put("selectize/match.tpl.html",'
    {{$select.placeholder}}
    '),e.put("selectize/no-choice.tpl.html",'
    '),e.put("selectize/select-multiple.tpl.html",'
    '),e.put("selectize/select.tpl.html",'
    ')}]); +//# sourceMappingURL=select.min.js.map diff --git a/js/vendor/angular-ui-select/dist/select.min.js.map b/js/vendor/angular-ui-select/dist/select.min.js.map new file mode 100644 index 00000000..04891040 --- /dev/null +++ b/js/vendor/angular-ui-select/dist/select.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["select.js","select_without_templates.js","templates.js"],"names":["isNil","value","angular","isUndefined","KEY","TAB","ENTER","ESC","SPACE","LEFT","UP","RIGHT","DOWN","SHIFT","CTRL","ALT","PAGE_UP","PAGE_DOWN","HOME","END","BACKSPACE","DELETE","COMMAND","MAP","91","8","9","13","16","17","18","19","20","27","32","33","34","35","36","37","38","39","40","43","44","45","46","48","49","50","51","52","53","54","55","56","57","59","61","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","96","97","98","99","100","101","102","103","104","105","106","107","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","144","145","186","187","188","189","190","191","192","219","220","221","222","isControl","e","k","which","metaKey","ctrlKey","altKey","isFunctionKey","isVerticalMovement","indexOf","isHorizontalMovement","toSeparator","sep","undefined","element","prototype","querySelectorAll","selector","this","closest","elem","matchesSelector","matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","bind","parentElement","latestId","uis","module","constant","theme","searchEnabled","sortable","placeholder","refreshDelay","closeOnSelect","skipFocusser","dropdownPosition","removeSelected","resetSearchInput","generateId","appendToBody","spinnerEnabled","spinnerClass","backspaceReset","service","minErr","$$minErr","error","apply","arguments","message","replace","RegExp","Error","directive","link","scope","attrs","ctrl","transclude","clone","append","filter","escapeRegexp","queryToEscape","matchItem","query","factory","$document","$window","boundingClientRect","getBoundingClientRect","width","prop","height","top","pageYOffset","documentElement","scrollTop","left","pageXOffset","scrollLeft","$timeout","callback","debounceTime","timeoutPromise","self","args","Array","slice","call","cancel","uiSelectConfig","RepeatParser","uiSelectMinErr","$compile","restrict","require","templateUrl","tElement","addClass","parent","attr","compile","tAttrs","repeat","groupByExp","groupBy","groupFilterExp","groupFilter","groups","length","getGroupNgRepeatExpression","parserResult","parse","choices","repeatExpression","rowsInner","clickTarget","document","addEventListener","itemName","$select","parseRepeatAttr","disableChoiceExpression","uiDisableChoice","onHighlightCallback","onHighlight","minimumInputLength","parseInt","position","toLowerCase","$watch","newValue","open","multiple","activate","activeIndex","tagging","isActivated","search","refresh","items","$observe","$eval","removeAttr","controller","$scope","$element","$filter","$$uisDebounce","$parse","$injector","_findIndex","collection","predicate","thisArg","findIndex","list","Object","i","_resetSearchInput","EMPTY_SEARCH","selected","item","equals","_groupsFilter","groupNames","j","result","name","push","_updateItemDisabled","isDisabled","disabledItemIndex","disabledItems","splice","_isItemDisabled","_initaliseLockedChoices","doInitalise","_updateItemLocked","isLocked","lockedItemIndex","lockedItems","_isItemlocked","itemScope","itemIndex","lockChoiceExpression","_handleDropDownSelection","key","processed","idx","minActiveIndex","idxmin","select","close","_ensureHighlightVisible","container","highlighted","posY","offsetTop","clientHeight","offsetHeight","isGrouped","paste","refreshing","focus","disabled","focusser","fct","taggingTokens","tokens","clickTriggeredSelect","$animate","get","err","searchInput","isEmpty","initSearchValue","avoidReset","$broadcast","taggingLabel","on","enabled","animateHandler","phase","off","focusSearchInput","findGroupByName","group","repeatAttr","updateGroups","groupFn","forEach","groupName","isFunction","groupFilterFn","isArray","concat","setPlainItems","setItemsFn","itemProperty","originalSource","source","createArrayFromObject","origSrc","$uisSource","keys","map","v","keyName","filters","newVal","oldVal","refreshItems","data","selectedItems","filteredItems","every","selectedItem","calculateDropdownPos","$watchCollection","isDefined","ngModel","$modelValue","_refreshDelayPromise","refreshAttr","refreshPromise","then","isActive","_isItemSelected","selection","isTag","$event","type","trim","$setTouched","setFocus","focusInput","clear","stopPropagation","toggle","preventDefault","sizeWatch","updaterScheduled","sizeSearchInput","input","calculateContainerWidth","clientWidth","offsetParent","updateIfVisible","containerWidth","inputWidth","offsetLeft","css","$$postDigest","noop","$apply","tagged","keyCode","triggerHandler","newItem","window","clipboardData","getData","originalEvent","separator","split","oldsearch","onResize","$on","find","generatedId","uisOffset","controllerAs","match","exec","ngClass","combined","inputId","id","ctrls","transcludeFn","onDocumentClick","contains","jQuery","target","focusableControls","targetController","tagName","$digest","positionDropdown","offset","style","after","originalWidth","resetDropdown","replaceWith","baseTitle","title","focusserTitle","focusserId","onSelectCallback","onSelect","onRemoveCallback","onRemove","choiceGrouped","tabindex","limit","taggingEval","autofocus","focusOn","transcluded","transcludedMatch","transcludedChoices","transcludedNoChoice","isOpen","dropdown","directionUpClassName","setDropdownPosUp","offsetDropdown","setDropdownPosDown","removeClass","calculateDropdownPosAfterAnimation","body","opacity","opened","needsCalculated","getAttribute","attribute","hasAttribute","multi","setAllowClear","allow","allowClear","uiLockChoice","$evalAsync","activeMatchIndex","updateModel","$setViewValue","Date","now","refreshComponent","removeChoice","index","removedChoice","locals","$item","$model","modelMapper","getPlaceholder","_getCaretPosition","el","isNumber","selectionStart","_handleMatchSelection","getNewActiveMatchIndex","$selectMultiple","prev","last","curr","next","caretPosition","first","newIndex","Math","min","max","_findCaseInsensitiveDupe","arr","hasDupe","origItem","toUpperCase","_findApproxDupe","haystack","needle","dupeIndex","tempArr","copy","mockObj","isObject","$isEmpty","$parsers","unshift","resultMultiple","$formatters","inputValue","checkFnMultiple","p","trackByExp","propsItemNameMatches","oldValue","$render","$viewValue","event","tagItems","tagItem","stashArr","hasTag","some","itemsWithoutTag","checkFnSingle","d","val","uiSelectSort","$ngModel","options","extend","axis","uiSelectSortOptions","draggingClassName","droppingClassName","droppingBeforeClassName","droppingAfterClassName","dataTransfer","setData","$index","toString","dropTimeout","move","from","to","className","dragOverHandler","offsetY","layerY","offsetX","layerX","dropHandler","droppedItemIndex","_dropHandler","theList","itemToMove","hasClass","$emit","array","onOpenCloseCallback","uisOpenClose","previousState","expression","filterMatch","grouped","run","$templateCache","put"],"mappings":";;;;;;CAQC,WACD,YC+CA,SAAAA,GAAAC,GACA,MAAAC,SAAAC,YAAAF,IAAA,OAAAA,EAzDA,GAAAG,IACAC,IAAA,EACAC,MAAA,GACAC,IAAA,GACAC,MAAA,GACAC,KAAA,GACAC,GAAA,GACAC,MAAA,GACAC,KAAA,GACAC,MAAA,GACAC,KAAA,GACAC,IAAA,GACAC,QAAA,GACAC,UAAA,GACAC,KAAA,GACAC,IAAA,GACAC,UAAA,EACAC,OAAA,GACAC,QAAA,GAEAC,KAAAC,GAAA,UAAAC,EAAA,YAAAC,EAAA,MAAAC,GAAA,QAAAC,GAAA,QAAAC,GAAA,OAAAC,GAAA,MAAAC,GAAA,aAAAC,GAAA,WAAAC,GAAA,MAAAC,GAAA,QAAAC,GAAA,UAAAC,GAAA,YAAAC,GAAA,MAAAC,GAAA,OAAAC,GAAA,OAAAC,GAAA,KAAAC,GAAA,QAAAC,GAAA,OAAAC,GAAA,IAAAC,GAAA,cAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,GAAA,IAAAC,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A,GACAjE,QAAAiE,EAAA,GACAxE,OAAA5F,EAAA4F,GACAQ,QAAAA,EACAkL,WAAAlH,EAAA,GACA0E,YAAA9O,EAAAoK,EAAA,IAAAA,EAAA,IAAAA,EAAA,IACAvM,iBAAA,SAAA6W,GACA,GAAAF,GAAAhd,KAAA0G,SAAA,QAAAwW,EAAA,eAAA,gBAIA,OAHAld,MAAA8Z,aACAkD,GAAA,aAAAhd,KAAA8Z,YAEAkD,KAMAzY,EAAA0B,2BAAA,WACA,MAAA,uDDgBA9O,QAAQyJ,OAAO,aAAauc,KAAK,iBAAkB,SAASC,GEz2E5DA,EAAAC,IAAA,6BAAA,uqBACAD,EAAAC,IAAA,oCAAA,2mBACAD,EAAAC,IAAA,2BAAA,2/BACAD,EAAAC,IAAA,+BAAA,qHACAD,EAAAC,IAAA,qCAAA,wqBACAD,EAAAC,IAAA,4BAAA,2sBACAD,EAAAC,IAAA,2BAAA,i0BACAD,EAAAC,IAAA,kCAAA,mgBACAD,EAAAC,IAAA,yBAAA,6hBACAD,EAAAC,IAAA,6BAAA,2KACAD,EAAAC,IAAA,mCAAA,qnCACAD,EAAAC,IAAA,0BAAA,kiCACAD,EAAAC,IAAA,6BAAA,6mBACAD,EAAAC,IAAA,oCAAA,0hBACAD,EAAAC,IAAA,2BAAA,8UACAD,EAAAC,IAAA,+BAAA,+LACAD,EAAAC,IAAA,qCAAA,gzBACAD,EAAAC,IAAA,4BAAA","file":"select.min.js","sourcesContent":["/*!\n * ui-select\n * http://github.com/angular-ui/ui-select\n * Version: 0.19.7 - 2017-04-15T14:28:36.649Z\n * License: MIT\n */\n\n\n(function () { \n\"use strict\";\nvar KEY = {\n TAB: 9,\n ENTER: 13,\n ESC: 27,\n SPACE: 32,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n HOME: 36,\n END: 35,\n BACKSPACE: 8,\n DELETE: 46,\n COMMAND: 91,\n\n MAP: { 91 : \"COMMAND\", 8 : \"BACKSPACE\" , 9 : \"TAB\" , 13 : \"ENTER\" , 16 : \"SHIFT\" , 17 : \"CTRL\" , 18 : \"ALT\" , 19 : \"PAUSEBREAK\" , 20 : \"CAPSLOCK\" , 27 : \"ESC\" , 32 : \"SPACE\" , 33 : \"PAGE_UP\", 34 : \"PAGE_DOWN\" , 35 : \"END\" , 36 : \"HOME\" , 37 : \"LEFT\" , 38 : \"UP\" , 39 : \"RIGHT\" , 40 : \"DOWN\" , 43 : \"+\" , 44 : \"PRINTSCREEN\" , 45 : \"INSERT\" , 46 : \"DELETE\", 48 : \"0\" , 49 : \"1\" , 50 : \"2\" , 51 : \"3\" , 52 : \"4\" , 53 : \"5\" , 54 : \"6\" , 55 : \"7\" , 56 : \"8\" , 57 : \"9\" , 59 : \";\", 61 : \"=\" , 65 : \"A\" , 66 : \"B\" , 67 : \"C\" , 68 : \"D\" , 69 : \"E\" , 70 : \"F\" , 71 : \"G\" , 72 : \"H\" , 73 : \"I\" , 74 : \"J\" , 75 : \"K\" , 76 : \"L\", 77 : \"M\" , 78 : \"N\" , 79 : \"O\" , 80 : \"P\" , 81 : \"Q\" , 82 : \"R\" , 83 : \"S\" , 84 : \"T\" , 85 : \"U\" , 86 : \"V\" , 87 : \"W\" , 88 : \"X\" , 89 : \"Y\" , 90 : \"Z\", 96 : \"0\" , 97 : \"1\" , 98 : \"2\" , 99 : \"3\" , 100 : \"4\" , 101 : \"5\" , 102 : \"6\" , 103 : \"7\" , 104 : \"8\" , 105 : \"9\", 106 : \"*\" , 107 : \"+\" , 109 : \"-\" , 110 : \".\" , 111 : \"/\", 112 : \"F1\" , 113 : \"F2\" , 114 : \"F3\" , 115 : \"F4\" , 116 : \"F5\" , 117 : \"F6\" , 118 : \"F7\" , 119 : \"F8\" , 120 : \"F9\" , 121 : \"F10\" , 122 : \"F11\" , 123 : \"F12\", 144 : \"NUMLOCK\" , 145 : \"SCROLLLOCK\" , 186 : \";\" , 187 : \"=\" , 188 : \",\" , 189 : \"-\" , 190 : \".\" , 191 : \"/\" , 192 : \"`\" , 219 : \"[\" , 220 : \"\\\\\" , 221 : \"]\" , 222 : \"'\"\n },\n\n isControl: function (e) {\n var k = e.which;\n switch (k) {\n case KEY.COMMAND:\n case KEY.SHIFT:\n case KEY.CTRL:\n case KEY.ALT:\n return true;\n }\n\n if (e.metaKey || e.ctrlKey || e.altKey) return true;\n\n return false;\n },\n isFunctionKey: function (k) {\n k = k.which ? k.which : k;\n return k >= 112 && k <= 123;\n },\n isVerticalMovement: function (k){\n return ~[KEY.UP, KEY.DOWN].indexOf(k);\n },\n isHorizontalMovement: function (k){\n return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k);\n },\n toSeparator: function (k) {\n var sep = {ENTER:\"\\n\",TAB:\"\\t\",SPACE:\" \"}[k];\n if (sep) return sep;\n // return undefined for special keys other than enter, tab or space.\n // no way to use them to cut strings.\n return KEY[k] ? undefined : k;\n }\n };\n\nfunction isNil(value) {\n return angular.isUndefined(value) || value === null;\n}\n\n/**\n * Add querySelectorAll() to jqLite.\n *\n * jqLite find() is limited to lookups by tag name.\n * TODO This will change with future versions of AngularJS, to be removed when this happens\n *\n * See jqLite.find - why not use querySelectorAll? https://github.com/angular/angular.js/issues/3586\n * See feat(jqLite): use querySelectorAll instead of getElementsByTagName in jqLite.find https://github.com/angular/angular.js/pull/3598\n */\nif (angular.element.prototype.querySelectorAll === undefined) {\n angular.element.prototype.querySelectorAll = function(selector) {\n return angular.element(this[0].querySelectorAll(selector));\n };\n}\n\n/**\n * Add closest() to jqLite.\n */\nif (angular.element.prototype.closest === undefined) {\n angular.element.prototype.closest = function( selector) {\n var elem = this[0];\n var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector;\n\n while (elem) {\n if (matchesSelector.bind(elem)(selector)) {\n return elem;\n } else {\n elem = elem.parentElement;\n }\n }\n return false;\n };\n}\n\nvar latestId = 0;\n\nvar uis = angular.module('ui.select', [])\n\n.constant('uiSelectConfig', {\n theme: 'bootstrap',\n searchEnabled: true,\n sortable: false,\n placeholder: '', // Empty by default, like HTML tag \");\n $compile(focusser)(scope);\n $select.focusser = focusser;\n\n //Input that will handle focus\n $select.focusInput = focusser;\n\n element.parent().append(focusser);\n focusser.bind(\"focus\", function(){\n scope.$evalAsync(function(){\n $select.focus = true;\n });\n });\n focusser.bind(\"blur\", function(){\n scope.$evalAsync(function(){\n $select.focus = false;\n });\n });\n focusser.bind(\"keydown\", function(e){\n\n if (e.which === KEY.BACKSPACE && $select.backspaceReset !== false) {\n e.preventDefault();\n e.stopPropagation();\n $select.select(undefined);\n scope.$apply();\n return;\n }\n\n if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) {\n return;\n }\n\n if (e.which == KEY.DOWN || e.which == KEY.UP || e.which == KEY.ENTER || e.which == KEY.SPACE){\n e.preventDefault();\n e.stopPropagation();\n $select.activate();\n }\n\n scope.$digest();\n });\n\n focusser.bind(\"keyup input\", function(e){\n\n if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || e.which == KEY.ENTER || e.which === KEY.BACKSPACE) {\n return;\n }\n\n $select.activate(focusser.val()); //User pressed some regular key, so we pass it to the search input\n focusser.val('');\n scope.$digest();\n\n });\n\n\n }\n };\n}]);\n\n// Make multiple matches sortable\nuis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', function($timeout, uiSelectConfig, uiSelectMinErr) {\n return {\n require: ['^^uiSelect', '^ngModel'],\n link: function(scope, element, attrs, ctrls) {\n if (scope[attrs.uiSelectSort] === null) {\n throw uiSelectMinErr('sort', 'Expected a list to sort');\n }\n\n var $select = ctrls[0];\n var $ngModel = ctrls[1];\n\n var options = angular.extend({\n axis: 'horizontal'\n },\n scope.$eval(attrs.uiSelectSortOptions));\n\n var axis = options.axis;\n var draggingClassName = 'dragging';\n var droppingClassName = 'dropping';\n var droppingBeforeClassName = 'dropping-before';\n var droppingAfterClassName = 'dropping-after';\n\n scope.$watch(function(){\n return $select.sortable;\n }, function(newValue){\n if (newValue) {\n element.attr('draggable', true);\n } else {\n element.removeAttr('draggable');\n }\n });\n\n element.on('dragstart', function(event) {\n element.addClass(draggingClassName);\n\n (event.dataTransfer || event.originalEvent.dataTransfer).setData('text', scope.$index.toString());\n });\n\n element.on('dragend', function() {\n removeClass(draggingClassName);\n });\n\n var move = function(from, to) {\n /*jshint validthis: true */\n this.splice(to, 0, this.splice(from, 1)[0]);\n };\n\n var removeClass = function(className) {\n angular.forEach($select.$element.querySelectorAll('.' + className), function(el){\n angular.element(el).removeClass(className);\n });\n };\n\n var dragOverHandler = function(event) {\n event.preventDefault();\n\n var offset = axis === 'vertical' ? event.offsetY || event.layerY || (event.originalEvent ? event.originalEvent.offsetY : 0) : event.offsetX || event.layerX || (event.originalEvent ? event.originalEvent.offsetX : 0);\n\n if (offset < (this[axis === 'vertical' ? 'offsetHeight' : 'offsetWidth'] / 2)) {\n removeClass(droppingAfterClassName);\n element.addClass(droppingBeforeClassName);\n\n } else {\n removeClass(droppingBeforeClassName);\n element.addClass(droppingAfterClassName);\n }\n };\n\n var dropTimeout;\n\n var dropHandler = function(event) {\n event.preventDefault();\n\n var droppedItemIndex = parseInt((event.dataTransfer || event.originalEvent.dataTransfer).getData('text'), 10);\n\n // prevent event firing multiple times in firefox\n $timeout.cancel(dropTimeout);\n dropTimeout = $timeout(function() {\n _dropHandler(droppedItemIndex);\n }, 20);\n };\n\n var _dropHandler = function(droppedItemIndex) {\n var theList = scope.$eval(attrs.uiSelectSort);\n var itemToMove = theList[droppedItemIndex];\n var newIndex = null;\n\n if (element.hasClass(droppingBeforeClassName)) {\n if (droppedItemIndex < scope.$index) {\n newIndex = scope.$index - 1;\n } else {\n newIndex = scope.$index;\n }\n } else {\n if (droppedItemIndex < scope.$index) {\n newIndex = scope.$index;\n } else {\n newIndex = scope.$index + 1;\n }\n }\n\n move.apply(theList, [droppedItemIndex, newIndex]);\n\n $ngModel.$setViewValue(Date.now());\n\n scope.$apply(function() {\n scope.$emit('uiSelectSort:change', {\n array: theList,\n item: itemToMove,\n from: droppedItemIndex,\n to: newIndex\n });\n });\n\n removeClass(droppingClassName);\n removeClass(droppingBeforeClassName);\n removeClass(droppingAfterClassName);\n\n element.off('drop', dropHandler);\n };\n\n element.on('dragenter', function() {\n if (element.hasClass(draggingClassName)) {\n return;\n }\n\n element.addClass(droppingClassName);\n\n element.on('dragover', dragOverHandler);\n element.on('drop', dropHandler);\n });\n\n element.on('dragleave', function(event) {\n if (event.target != element) {\n return;\n }\n\n removeClass(droppingClassName);\n removeClass(droppingBeforeClassName);\n removeClass(droppingAfterClassName);\n\n element.off('dragover', dragOverHandler);\n element.off('drop', dropHandler);\n });\n }\n };\n}]);\n\nuis.directive('uisOpenClose', ['$parse', '$timeout', function ($parse, $timeout) {\n return {\n restrict: 'A',\n require: 'uiSelect',\n link: function (scope, element, attrs, $select) {\n $select.onOpenCloseCallback = $parse(attrs.uisOpenClose);\n\n scope.$watch('$select.open', function (isOpen, previousState) {\n if (isOpen !== previousState) {\n $timeout(function () {\n $select.onOpenCloseCallback(scope, {\n isOpen: isOpen\n });\n });\n }\n });\n }\n };\n}]);\n\n/**\n * Parses \"repeat\" attribute.\n *\n * Taken from AngularJS ngRepeat source code\n * See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L211\n *\n * Original discussion about parsing \"repeat\" attribute instead of fully relying on ng-repeat:\n * https://github.com/angular-ui/ui-select/commit/5dd63ad#commitcomment-5504697\n */\n\nuis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinErr, $parse) {\n var self = this;\n\n /**\n * Example:\n * expression = \"address in addresses | filter: {street: $select.search} track by $index\"\n * itemName = \"address\",\n * source = \"addresses | filter: {street: $select.search}\",\n * trackByExp = \"$index\",\n */\n self.parse = function(expression) {\n\n\n var match;\n //var isObjectCollection = /\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)/.test(expression);\n // If an array is used as collection\n\n // if (isObjectCollection){\n // 000000000000000000000000000000111111111000000000000000222222222222220033333333333333333333330000444444444444444444000000000000000055555555555000000000000000000000066666666600000000\n match = expression.match(/^\\s*(?:([\\s\\S]+?)\\s+as\\s+)?(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+(\\s*[\\s\\S]+?)?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n // 1 Alias\n // 2 Item\n // 3 Key on (key,value)\n // 4 Value on (key,value)\n // 5 Source expression (including filters)\n // 6 Track by\n\n if (!match) {\n throw uiSelectMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n expression);\n }\n \n var source = match[5], \n filters = '';\n\n // When using (key,value) ui-select requires filters to be extracted, since the object\n // is converted to an array for $select.items \n // (in which case the filters need to be reapplied)\n if (match[3]) {\n // Remove any enclosing parenthesis\n source = match[5].replace(/(^\\()|(\\)$)/g, '');\n // match all after | but not after ||\n var filterMatch = match[5].match(/^\\s*(?:[\\s\\S]+?)(?:[^\\|]|\\|\\|)+([\\s\\S]*)\\s*$/);\n if(filterMatch && filterMatch[1].trim()) {\n filters = filterMatch[1];\n source = source.replace(filters, '');\n } \n }\n\n return {\n itemName: match[4] || match[2], // (lhs) Left-hand side,\n keyName: match[3], //for (key, value) syntax\n source: $parse(source),\n filters: filters,\n trackByExp: match[6],\n modelMapper: $parse(match[1] || match[4] || match[2]),\n repeatExpression: function (grouped) {\n var expression = this.itemName + ' in ' + (grouped ? '$group.items' : '$select.items');\n if (this.trackByExp) {\n expression += ' track by ' + this.trackByExp;\n }\n return expression;\n } \n };\n\n };\n\n self.getGroupNgRepeatExpression = function() {\n return '$group in $select.groups track by $group.name';\n };\n\n}]);\n\n}());\nangular.module(\"ui.select\").run([\"$templateCache\", function($templateCache) {$templateCache.put(\"bootstrap/choices.tpl.html\",\"
      0\\\">
    • 0\\\">
    \");\n$templateCache.put(\"bootstrap/match-multiple.tpl.html\",\" × \");\n$templateCache.put(\"bootstrap/match.tpl.html\",\"
    {{$select.placeholder}}
    \");\n$templateCache.put(\"bootstrap/no-choice.tpl.html\",\"
    \");\n$templateCache.put(\"bootstrap/select-multiple.tpl.html\",\"
    \");\n$templateCache.put(\"bootstrap/select.tpl.html\",\"
    \");\n$templateCache.put(\"select2/choices.tpl.html\",\"
    \");\n$templateCache.put(\"select2/match-multiple.tpl.html\",\"
  • \");\n$templateCache.put(\"select2/match.tpl.html\",\"{{$select.placeholder}} \");\n$templateCache.put(\"select2/no-choice.tpl.html\",\"
    \");\n$templateCache.put(\"select2/select-multiple.tpl.html\",\"
    \");\n$templateCache.put(\"select2/select.tpl.html\",\"
    \");\n$templateCache.put(\"selectize/choices.tpl.html\",\"
    \");\n$templateCache.put(\"selectize/match-multiple.tpl.html\",\"
    ×
    \");\n$templateCache.put(\"selectize/match.tpl.html\",\"
    {{$select.placeholder}}
    \");\n$templateCache.put(\"selectize/no-choice.tpl.html\",\"
    \");\n$templateCache.put(\"selectize/select-multiple.tpl.html\",\"
    \");\n$templateCache.put(\"selectize/select.tpl.html\",\"
    \");}]);",null,null]} \ No newline at end of file diff --git a/js/vendor/angular-ui-select/docs/assets/demo.js b/js/vendor/angular-ui-select/docs/assets/demo.js index 7aaf3364..fcd74a14 100644 --- a/js/vendor/angular-ui-select/docs/assets/demo.js +++ b/js/vendor/angular-ui-select/docs/assets/demo.js @@ -14,7 +14,7 @@ app.filter('propsFilter', function() { if (angular.isArray(items)) { var keys = Object.keys(props); - + items.forEach(function(item) { var itemMatches = false; @@ -150,6 +150,8 @@ app.controller('DemoCtrl', function ($scope, $http, $timeout, $interval) { vm.person.selectedValue = vm.peopleObj[3]; vm.person.selectedSingle = 'Samantha'; vm.person.selectedSingleKey = '5'; + // To run the demos with a preselected person object, uncomment the line below. + //vm.person.selected = vm.person.selectedValue; vm.people = [ { name: 'Adam', email: 'adam@email.com', age: 12, country: 'United States' }, @@ -175,6 +177,7 @@ app.controller('DemoCtrl', function ($scope, $http, $timeout, $interval) { vm.multipleDemo.selectedPeople2 = vm.multipleDemo.selectedPeople; vm.multipleDemo.selectedPeopleWithGroupBy = [vm.people[8], vm.people[6]]; vm.multipleDemo.selectedPeopleSimple = ['samantha@email.com','wladimir@email.com']; + vm.multipleDemo.removeSelectIsFalse = [vm.people[2], vm.people[0]]; vm.appendToBodyDemo = { remainingToggleTime: 0, diff --git a/js/vendor/angular-ui-select/docs/assets/docs.css b/js/vendor/angular-ui-select/docs/assets/docs.css index 98ed6173..059a3cd3 100644 --- a/js/vendor/angular-ui-select/docs/assets/docs.css +++ b/js/vendor/angular-ui-select/docs/assets/docs.css @@ -164,7 +164,6 @@ section { text-shadow: 0 1px 0 rgba(0,0,0,.15); color: #cdbfe3; background-color: #563d7c; - background-image: url(header.png); } .bs-header a { diff --git a/js/vendor/angular-ui-select/docs/index.html b/js/vendor/angular-ui-select/docs/index.html index 734486bd..b0b45543 100644 --- a/js/vendor/angular-ui-select/docs/index.html +++ b/js/vendor/angular-ui-select/docs/index.html @@ -135,7 +135,7 @@ AngularJS (requires AngularJS 1.2.x or higher, tested with 1.5.3).
  • - Angular-Sanitze (the version should match your version of angular.js). + Angular-Sanitize (the version should match your version of angular.js).
  • The matching CSS for your the theme you wish to use: @@ -188,4 +188,4 @@
  • - \ No newline at end of file + diff --git a/js/vendor/angular-ui-select/docs/partials/_header.html b/js/vendor/angular-ui-select/docs/partials/_header.html index b6bb1e4b..a657ac0a 100644 --- a/js/vendor/angular-ui-select/docs/partials/_header.html +++ b/js/vendor/angular-ui-select/docs/partials/_header.html @@ -5,12 +5,12 @@ AngularJS ui-select - - + + @@ -28,11 +28,11 @@ - - - - - + + + + + +