r537 - in trunk: . faxtomail-ui-web faxtomail-ui-web/src/main/webapp/WEB-INF faxtomail-ui-web/src/main/webapp/css faxtomail-ui-web/src/main/webapp/js
Author: echatellier Date: 2014-08-13 10:35:54 +0200 (Wed, 13 Aug 2014) New Revision: 537 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/537 Log: Remove unused chosen lib Removed: trunk/faxtomail-ui-web/src/main/webapp/css/chosen-spinner.css trunk/faxtomail-ui-web/src/main/webapp/css/spinner.gif trunk/faxtomail-ui-web/src/main/webapp/js/chosen.js Modified: trunk/faxtomail-ui-web/pom.xml trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js trunk/pom.xml Modified: trunk/faxtomail-ui-web/pom.xml =================================================================== --- trunk/faxtomail-ui-web/pom.xml 2014-08-13 08:28:08 UTC (rev 536) +++ trunk/faxtomail-ui-web/pom.xml 2014-08-13 08:35:54 UTC (rev 537) @@ -232,11 +232,6 @@ </exclusion> </exclusions> </dependency> - - <dependency> - <groupId>org.webjars</groupId> - <artifactId>chosen</artifactId> - </dependency> <dependency> <groupId>org.nuiton.js</groupId> Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml =================================================================== --- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml 2014-08-13 08:28:08 UTC (rev 536) +++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/wro.xml 2014-08-13 08:35:54 UTC (rev 537) @@ -28,11 +28,6 @@ <js>classpath:META-INF/resources/webjars/select2/3.5.0/select2.js</js> <js>classpath:META-INF/resources/webjars/select2/3.5.0/select2_locale_fr.js</js> </group> - - <group name='webjar-chosen' abstract="true"> - <css>classpath:META-INF/resources/webjars/chosen/1.1.0/chosen.css</css> - <js>classpath:META-INF/resources/webjars/chosen/1.1.0/chosen.jquery.js</js> - </group> <group name='webjar-angular-ui-sortable' abstract="true"> <js>classpath:META-INF/resources/webjars/angular-ui-sortable/0.12.7/sortable.min.js</js> @@ -55,12 +50,6 @@ <js>/js/select2sortable.js</js> </group> - <group name='angular-chosen' abstract="true"> - <group-ref>webjar-chosen</group-ref> - <js>/js/chosen.js</js> - <css>/css/chosen-spinner.css</css> - </group> - <group name='webjar-respond' abstract="true"> <js>classpath:META-INF/resources/webjars/respond/1.4.2/src/respond.js</js> </group> @@ -86,7 +75,6 @@ <group name='faxtomail-configuration'> <group-ref>select2</group-ref> <group-ref>select2sortable</group-ref> - <group-ref>angular-chosen</group-ref> <group-ref>webjar-angular-ui-sortable</group-ref> <group-ref>font-awesome</group-ref> <js>/js/configuration.js</js> @@ -95,7 +83,6 @@ <group name='faxtomail-user-folder'> <group-ref>select2sortable</group-ref> - <group-ref>angular-chosen</group-ref> <group-ref>font-awesome</group-ref> <js>/js/user-folder.js</js> <css>/css/faxtomail.css</css> Deleted: trunk/faxtomail-ui-web/src/main/webapp/css/chosen-spinner.css =================================================================== --- trunk/faxtomail-ui-web/src/main/webapp/css/chosen-spinner.css 2014-08-13 08:28:08 UTC (rev 536) +++ trunk/faxtomail-ui-web/src/main/webapp/css/chosen-spinner.css 2014-08-13 08:35:54 UTC (rev 537) @@ -1,12 +0,0 @@ -/* %%Ignore-License Additional styles to display a spinner image while options are loading */ -.localytics-chosen.loading+.chosen-container-multi .chosen-choices { - background-image: url('spinner.gif'); - background-repeat: no-repeat; - background-position: 95%; -} -.localytics-chosen.loading+.chosen-container-single .chosen-single span { - background: url('spinner.gif') no-repeat right; -} -.localytics-chosen.loading+.chosen-container-single .chosen-single .search-choice-close { - display: none; -} \ No newline at end of file Deleted: trunk/faxtomail-ui-web/src/main/webapp/css/spinner.gif =================================================================== (Binary files differ) Deleted: trunk/faxtomail-ui-web/src/main/webapp/js/chosen.js =================================================================== --- trunk/faxtomail-ui-web/src/main/webapp/js/chosen.js 2014-08-13 08:28:08 UTC (rev 536) +++ trunk/faxtomail-ui-web/src/main/webapp/js/chosen.js 2014-08-13 08:35:54 UTC (rev 537) @@ -1,109 +0,0 @@ -// %%Ignore-License Generated by CoffeeScript 1.6.2 -(function() { - var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - angular.module('localytics.directives', []); - - angular.module('localytics.directives').directive('chosen', function() { - var CHOSEN_OPTION_WHITELIST, NG_OPTIONS_REGEXP, isEmpty, snakeCase; - - NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/; - CHOSEN_OPTION_WHITELIST = ['noResultsText', 'allowSingleDeselect', 'disableSearchThreshold', 'disableSearch', 'enableSplitWordSearch', 'inheritSelectClasses', 'maxSelectedOptions', 'placeholderTextMultiple', 'placeholderTextSingle', 'searchContains', 'singleBackstrokeDelete', 'displayDisabledOptions', 'displaySelectedOptions', 'width']; - snakeCase = function(input) { - return input.replace(/[A-Z]/g, function($1) { - return "_" + ($1.toLowerCase()); - }); - }; - isEmpty = function(value) { - var key; - - if (angular.isArray(value)) { - return value.length === 0; - } else if (angular.isObject(value)) { - for (key in value) { - if (value.hasOwnProperty(key)) { - return false; - } - } - } - return true; - }; - return { - restrict: 'A', - require: '?ngModel', - terminal: true, - link: function(scope, element, attr, ngModel) { - var chosen, defaultText, disableWithMessage, empty, initOrUpdate, match, options, origRender, removeEmptyMessage, startLoading, stopLoading, valuesExpr, viewWatch; - - element.addClass('localytics-chosen'); - options = scope.$eval(attr.chosen) || {}; - angular.forEach(attr, function(value, key) { - if (__indexOf.call(CHOSEN_OPTION_WHITELIST, key) >= 0) { - return options[snakeCase(key)] = scope.$eval(value); - } - }); - startLoading = function() { - return element.addClass('loading').attr('disabled', true).trigger('chosen:updated'); - }; - stopLoading = function() { - return element.removeClass('loading').attr('disabled', false).trigger('chosen:updated'); - }; - chosen = null; - defaultText = null; - empty = false; - initOrUpdate = function() { - if (chosen) { - return element.trigger('chosen:updated'); - } else { - chosen = element.chosen(options).data('chosen'); - return defaultText = chosen.default_text; - } - }; - removeEmptyMessage = function() { - empty = false; - return element.attr('data-placeholder', defaultText); - }; - disableWithMessage = function() { - empty = true; - return element.attr('data-placeholder', chosen.results_none_found).attr('disabled', true).trigger('chosen:updated'); - }; - if (ngModel) { - origRender = ngModel.$render; - ngModel.$render = function() { - origRender(); - return initOrUpdate(); - }; - if (attr.multiple) { - viewWatch = function() { - return ngModel.$viewValue; - }; - scope.$watch(viewWatch, ngModel.$render, true); - } - } else { - initOrUpdate(); - } - attr.$observe('disabled', function() { - return element.trigger('chosen:updated'); - }); - if (attr.ngOptions && ngModel) { - match = attr.ngOptions.match(NG_OPTIONS_REGEXP); - valuesExpr = match[7]; - return scope.$watchCollection(valuesExpr, function(newVal, oldVal) { - if (angular.isUndefined(newVal)) { - return startLoading(); - } else { - if (empty) { - removeEmptyMessage(); - } - stopLoading(); - if (isEmpty(newVal)) { - return disableWithMessage(); - } - } - }); - } - } - }; - }); - -}).call(this); Modified: trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js =================================================================== --- trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-08-13 08:28:08 UTC (rev 536) +++ trunk/faxtomail-ui-web/src/main/webapp/js/configuration.js 2014-08-13 08:35:54 UTC (rev 537) @@ -22,7 +22,7 @@ * #L% */ -var ConfigurationModule = angular.module('ConfigurationModule', ['FaxToMail', 'ui.tree', 'ui.select2', 'ui.sortable', 'localytics.directives', 'ui.select2.sortable']); +var ConfigurationModule = angular.module('ConfigurationModule', ['FaxToMail', 'ui.tree', 'ui.select2', 'ui.sortable', 'ui.select2.sortable']); /** * Global configuration controller. Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2014-08-13 08:28:08 UTC (rev 536) +++ trunk/pom.xml 2014-08-13 08:35:54 UTC (rev 537) @@ -532,13 +532,6 @@ <version>3.5.0</version> <scope>runtime</scope> </dependency> - - <dependency> - <groupId>org.webjars</groupId> - <artifactId>chosen</artifactId> - <version>1.1.0</version> - <scope>runtime</scope> - </dependency> <dependency> <groupId>org.nuiton.js</groupId>
participants (1)
-
echatellier@users.forge.codelutin.com