You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2017/02/05 11:10:01 UTC
svn commit: r1781731 [23/45] - in /ofbiz/trunk:
applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/ideal/
applications/accounting/webapp/ap/error/
applications/accounting/webapp/ar/error/
applications/commonext/webapp/ofbizset...
Modified: ofbiz/trunk/plugins/solr/webapp/solr/js/lib/naturalSort.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/plugins/solr/webapp/solr/js/lib/naturalSort.js?rev=1781731&r1=1781730&r2=1781731&view=diff
==============================================================================
--- ofbiz/trunk/plugins/solr/webapp/solr/js/lib/naturalSort.js (original)
+++ ofbiz/trunk/plugins/solr/webapp/solr/js/lib/naturalSort.js Sun Feb 5 11:09:59 2017
@@ -1,82 +1,82 @@
-/*
-naturalSort.js
-- by Jim Palmer and other contributors
-
-The MIT License (MIT)
-
-Copyright (c) 2011 Jim Palmer and other contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-// naturalSort.js 0.7.0
-// https://github.com/jarinudom/naturalSort.js
-// (c) 2011 Jim Palmer and other contributors
-// naturalSort.js may be freely distributed under the MIT license.
-// Generated by CoffeeScript 1.7.1
-(function() {
- window.naturalSort = function(a, b) {
- var cLoc, dre, hre, i, numS, oFxNcL, oFyNcL, ore, re, sre, x, xD, xN, y, yD, yN;
- re = /(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/g;
- sre = /(^[ ]*|[ ]*$)/g;
- dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/;
- hre = /^0x[0-9a-f]+$/i;
- ore = /^0/;
- i = function(s) {
- return naturalSort.insensitive && ('' + s).toLowerCase() || '' + s;
- };
- x = i(a).replace(sre, '') || '';
- y = i(b).replace(sre, '') || '';
- xN = x.replace(re, '\u0000$1\u0000').replace(/\0$/, '').replace(/^\0/, '').split('\u0000');
- yN = y.replace(re, '\u0000$1\u0000').replace(/\0$/, '').replace(/^\0/, '').split('\u0000');
- xD = parseInt(x.match(hre), 16) || (xN.length !== 1 && x.match(dre) && Date.parse(x));
- yD = parseInt(y.match(hre), 16) || xD && y.match(dre) && Date.parse(y) || null;
- oFxNcL = void 0;
- oFyNcL = void 0;
- if (yD) {
- if (xD < yD) {
- return -1;
- }
- if (xD > yD) {
- return 1;
- }
- }
- cLoc = 0;
- numS = Math.max(xN.length, yN.length);
- while (cLoc < numS) {
- oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;
- oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;
- if (isNaN(oFxNcL) !== isNaN(oFyNcL)) {
- return (isNaN(oFxNcL) ? 1 : -1);
- } else if (typeof oFxNcL !== typeof oFyNcL) {
- oFxNcL += '';
- oFyNcL += '';
- }
- if (oFxNcL < oFyNcL) {
- return -1;
- }
- if (oFxNcL > oFyNcL) {
- return 1;
- }
- cLoc++;
- }
- return 0;
- };
-
-}).call(this);
+/*
+naturalSort.js
+- by Jim Palmer and other contributors
+
+The MIT License (MIT)
+
+Copyright (c) 2011 Jim Palmer and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+// naturalSort.js 0.7.0
+// https://github.com/jarinudom/naturalSort.js
+// (c) 2011 Jim Palmer and other contributors
+// naturalSort.js may be freely distributed under the MIT license.
+// Generated by CoffeeScript 1.7.1
+(function() {
+ window.naturalSort = function(a, b) {
+ var cLoc, dre, hre, i, numS, oFxNcL, oFyNcL, ore, re, sre, x, xD, xN, y, yD, yN;
+ re = /(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/g;
+ sre = /(^[ ]*|[ ]*$)/g;
+ dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/;
+ hre = /^0x[0-9a-f]+$/i;
+ ore = /^0/;
+ i = function(s) {
+ return naturalSort.insensitive && ('' + s).toLowerCase() || '' + s;
+ };
+ x = i(a).replace(sre, '') || '';
+ y = i(b).replace(sre, '') || '';
+ xN = x.replace(re, '\u0000$1\u0000').replace(/\0$/, '').replace(/^\0/, '').split('\u0000');
+ yN = y.replace(re, '\u0000$1\u0000').replace(/\0$/, '').replace(/^\0/, '').split('\u0000');
+ xD = parseInt(x.match(hre), 16) || (xN.length !== 1 && x.match(dre) && Date.parse(x));
+ yD = parseInt(y.match(hre), 16) || xD && y.match(dre) && Date.parse(y) || null;
+ oFxNcL = void 0;
+ oFyNcL = void 0;
+ if (yD) {
+ if (xD < yD) {
+ return -1;
+ }
+ if (xD > yD) {
+ return 1;
+ }
+ }
+ cLoc = 0;
+ numS = Math.max(xN.length, yN.length);
+ while (cLoc < numS) {
+ oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;
+ oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;
+ if (isNaN(oFxNcL) !== isNaN(oFyNcL)) {
+ return (isNaN(oFxNcL) ? 1 : -1);
+ } else if (typeof oFxNcL !== typeof oFyNcL) {
+ oFxNcL += '';
+ oFyNcL += '';
+ }
+ if (oFxNcL < oFyNcL) {
+ return -1;
+ }
+ if (oFxNcL > oFyNcL) {
+ return 1;
+ }
+ cLoc++;
+ }
+ return 0;
+ };
+
+}).call(this);
Propchange: ofbiz/trunk/plugins/solr/webapp/solr/js/lib/naturalSort.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ofbiz/trunk/plugins/solr/webapp/solr/js/scripts/segments.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/plugins/solr/webapp/solr/js/scripts/segments.js?rev=1781731&r1=1781730&r2=1781731&view=diff
==============================================================================
--- ofbiz/trunk/plugins/solr/webapp/solr/js/scripts/segments.js (original)
+++ ofbiz/trunk/plugins/solr/webapp/solr/js/scripts/segments.js Sun Feb 5 11:09:59 2017
@@ -1,206 +1,206 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-
-var get_tooltip = function( segment_response ) {
- var tooltip =
- '<div>Segment <b>' + segment_response.name + '</b>:</div>' +
- '<div class="label">#docs:</div><div>' + number_format(segment_response.size) +'</div>' +
- '<div class="label">#dels:</div><div>' + number_format(segment_response.delCount) + '</div>' +
- '<div class="label">size:</div><div>' + number_format(segment_response.sizeInBytes) + ' bytes </div>' +
- '<div class="label">age:</div><div>' + segment_response.age + '</div>' +
- '<div class="label">source:</div><div>' + segment_response.source + '</div>';
- return tooltip;
-};
-
-var get_entry = function( segment_response, segment_bytes_max ) {
- //calcualte dimensions of graph
- var dims = calculate_dimensions(segment_response.sizeInBytes,
- segment_bytes_max, segment_response.size, segment_response.delCount)
- //create entry for segment with given dimensions
- var entry = get_entry_item(segment_response.name, dims,
- get_tooltip(segment_response), (segment_response.mergeCandidate)?true:false);
-
- return entry;
-};
-
-var get_entry_item = function(name, dims, tooltip, isMergeCandidate) {
- var entry = '<li>' + "\n" +
- ' <dl class="clearfix" style="width: ' + dims['size'] + '%;">' + "\n" +
- ' <dt><div>' + name + '</div></dt>' + "\n" +
- ' <dd>';
- entry += '<div class="live' + ((isMergeCandidate)?' merge-candidate':'') +
- '" style="width: ' + dims['alive_doc_size'] + '%;"> </div>';
- entry += '<div class="toolitp">' + tooltip +'</div>';
-
- if (dims['deleted_doc_size'] > 0.001) {
- entry += '<div class="deleted" style="width:' + dims['deleted_doc_size']
- + '%;margin-left:' + dims['alive_doc_size'] + '%;"> </div>';
- }
- entry += '</dd></dl></li>';
- return entry;
-};
-
-var get_footer = function(deletions_count, documents_count) {
- return '<li><dl><dt></dt><dd>Deletions: ' +
- (documents_count == 0 ? 0 : round_2(deletions_count/documents_count * 100)) +
- '% </dd></dl></li>';
-};
-
-var calculate_dimensions = function(segment_size_in_bytes, segment_size_in_bytes_max, doc_count, delete_doc_count) {
- var segment_size_in_bytes_log = Math.log(segment_size_in_bytes);
- var segment_size_in_bytes_max_log = Math.log(segment_size_in_bytes_max);
-
- var dims = {};
- //Normalize to 100% size of bar
- dims['size'] = Math.floor((segment_size_in_bytes_log / segment_size_in_bytes_max_log ) * 100);
- //Deleted doc part size
- dims['deleted_doc_size'] = Math.floor((delete_doc_count/(delete_doc_count + doc_count)) * dims['size']);
- //Alive doc part size
- dims['alive_doc_size'] = dims['size'] - dims['deleted_doc_size'];
-
- return dims;
-};
-
-var calculate_max_size_on_disk = function(segment_entries) {
- var max = 0;
- $.each(segment_entries, function(idx, obj) {
- if (obj.sizeInBytes > max) {
- max = obj.sizeInBytes;
- }
- });
- return max;
-};
-
-var round_2 = function(num) {
- return Math.round(num*100)/100;
-};
-
-var number_format = function(x) {
- return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
-};
-
-var prepare_x_axis = function(segment_bytes_max) {
- var factor = 1024*1024; //for MB
-
- var segment_bytes_max_log = Math.log(segment_bytes_max);
-
- var series_entry = '<li>' + "\n" +
- ' <dl class="clearfix" style="width:100%;">' + "\n" +
- ' <dt><div>Size</div></dt>' + "\n" +
- ' <dd>' +
- ' <div class="start">0</div>';
- var step = 0;
- for (var j = 0; j < 3; j+=1) {
- step += segment_bytes_max_log/4;
- var step_value = number_format(Math.floor((Math.pow(Math.E, step))/factor))
- series_entry += '<div class="w5">' + ((step_value > 0.001)?step_value : ' ') + '</div>'
- }
- series_entry += '<div class="end">' + number_format(Math.floor(segment_bytes_max/factor)) + ' MB </div>' +
- ' </dd>' +
- ' </dl>' +
- '</li>';
- return series_entry;
-};
-
-// #/:core/admin/segments
-sammy.get
-(
- new RegExp( app.core_regex_base + '\\/(segments)$' ),
- function( context )
- {
- var core_basepath = this.active_core.attr( 'data-basepath' );
- var content_element = $( '#content' );
-
- $.get
- (
- 'tpl/segments.html',
- function( template )
- {
- content_element.html( template );
-
- var segments_element = $('#segments', content_element);
- var segments_reload = $( '#segments a.reload' );
- var url_element = $('#url', segments_element);
- var result_element = $('#result', segments_element);
- var response_element = $('#response', result_element);
- var segments_holder_element = $('.segments-holder', result_element);
-
- segments_reload
- .die( 'click' )
- .live
- (
- 'click',
- function( event )
- {
- $.ajax
- (
- {
- url : core_basepath + '/admin/segments?wt=json',
- dataType : 'json',
- context: this,
- beforeSend : function( arr, form, options )
- {
- loader.show( this );
- },
- success : function( response, text_status, xhr )
- {
- var segments_response = response['segments'],
- segments_entries = [],
- segment_bytes_max = calculate_max_size_on_disk( segments_response );
-
- //scale
- segments_entries.push( prepare_x_axis( segment_bytes_max ) );
-
- var documents_count = 0, deletions_count = 0;
-
- //elements
- $.each( segments_response, function( key, segment_response ) {
- segments_entries.push( get_entry( segment_response, segment_bytes_max ) );
-
- documents_count += segment_response.size;
- deletions_count += segment_response.delCount;
- });
-
- //footer
- segments_entries.push( get_footer( deletions_count, documents_count ) );
-
- $( 'ul', segments_holder_element ).html( segments_entries.join("\n" ) );
- },
- error : function( xhr, text_status, error_thrown )
- {
- $( this )
- .attr( 'title', '/admin/segments is not configured (' + xhr.status + ': ' + error_thrown + ')' );
-
- $( this ).parents( 'li' )
- .addClass( 'error' );
- },
- complete : function( xhr, text_status )
- {
- loader.hide( this );
- }
- }
- );
- return false;
- }
- );
- //initially submit
- segments_reload.click();
- }
- );
- }
-);
+/*
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+
+var get_tooltip = function( segment_response ) {
+ var tooltip =
+ '<div>Segment <b>' + segment_response.name + '</b>:</div>' +
+ '<div class="label">#docs:</div><div>' + number_format(segment_response.size) +'</div>' +
+ '<div class="label">#dels:</div><div>' + number_format(segment_response.delCount) + '</div>' +
+ '<div class="label">size:</div><div>' + number_format(segment_response.sizeInBytes) + ' bytes </div>' +
+ '<div class="label">age:</div><div>' + segment_response.age + '</div>' +
+ '<div class="label">source:</div><div>' + segment_response.source + '</div>';
+ return tooltip;
+};
+
+var get_entry = function( segment_response, segment_bytes_max ) {
+ //calcualte dimensions of graph
+ var dims = calculate_dimensions(segment_response.sizeInBytes,
+ segment_bytes_max, segment_response.size, segment_response.delCount)
+ //create entry for segment with given dimensions
+ var entry = get_entry_item(segment_response.name, dims,
+ get_tooltip(segment_response), (segment_response.mergeCandidate)?true:false);
+
+ return entry;
+};
+
+var get_entry_item = function(name, dims, tooltip, isMergeCandidate) {
+ var entry = '<li>' + "\n" +
+ ' <dl class="clearfix" style="width: ' + dims['size'] + '%;">' + "\n" +
+ ' <dt><div>' + name + '</div></dt>' + "\n" +
+ ' <dd>';
+ entry += '<div class="live' + ((isMergeCandidate)?' merge-candidate':'') +
+ '" style="width: ' + dims['alive_doc_size'] + '%;"> </div>';
+ entry += '<div class="toolitp">' + tooltip +'</div>';
+
+ if (dims['deleted_doc_size'] > 0.001) {
+ entry += '<div class="deleted" style="width:' + dims['deleted_doc_size']
+ + '%;margin-left:' + dims['alive_doc_size'] + '%;"> </div>';
+ }
+ entry += '</dd></dl></li>';
+ return entry;
+};
+
+var get_footer = function(deletions_count, documents_count) {
+ return '<li><dl><dt></dt><dd>Deletions: ' +
+ (documents_count == 0 ? 0 : round_2(deletions_count/documents_count * 100)) +
+ '% </dd></dl></li>';
+};
+
+var calculate_dimensions = function(segment_size_in_bytes, segment_size_in_bytes_max, doc_count, delete_doc_count) {
+ var segment_size_in_bytes_log = Math.log(segment_size_in_bytes);
+ var segment_size_in_bytes_max_log = Math.log(segment_size_in_bytes_max);
+
+ var dims = {};
+ //Normalize to 100% size of bar
+ dims['size'] = Math.floor((segment_size_in_bytes_log / segment_size_in_bytes_max_log ) * 100);
+ //Deleted doc part size
+ dims['deleted_doc_size'] = Math.floor((delete_doc_count/(delete_doc_count + doc_count)) * dims['size']);
+ //Alive doc part size
+ dims['alive_doc_size'] = dims['size'] - dims['deleted_doc_size'];
+
+ return dims;
+};
+
+var calculate_max_size_on_disk = function(segment_entries) {
+ var max = 0;
+ $.each(segment_entries, function(idx, obj) {
+ if (obj.sizeInBytes > max) {
+ max = obj.sizeInBytes;
+ }
+ });
+ return max;
+};
+
+var round_2 = function(num) {
+ return Math.round(num*100)/100;
+};
+
+var number_format = function(x) {
+ return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
+};
+
+var prepare_x_axis = function(segment_bytes_max) {
+ var factor = 1024*1024; //for MB
+
+ var segment_bytes_max_log = Math.log(segment_bytes_max);
+
+ var series_entry = '<li>' + "\n" +
+ ' <dl class="clearfix" style="width:100%;">' + "\n" +
+ ' <dt><div>Size</div></dt>' + "\n" +
+ ' <dd>' +
+ ' <div class="start">0</div>';
+ var step = 0;
+ for (var j = 0; j < 3; j+=1) {
+ step += segment_bytes_max_log/4;
+ var step_value = number_format(Math.floor((Math.pow(Math.E, step))/factor))
+ series_entry += '<div class="w5">' + ((step_value > 0.001)?step_value : ' ') + '</div>'
+ }
+ series_entry += '<div class="end">' + number_format(Math.floor(segment_bytes_max/factor)) + ' MB </div>' +
+ ' </dd>' +
+ ' </dl>' +
+ '</li>';
+ return series_entry;
+};
+
+// #/:core/admin/segments
+sammy.get
+(
+ new RegExp( app.core_regex_base + '\\/(segments)$' ),
+ function( context )
+ {
+ var core_basepath = this.active_core.attr( 'data-basepath' );
+ var content_element = $( '#content' );
+
+ $.get
+ (
+ 'tpl/segments.html',
+ function( template )
+ {
+ content_element.html( template );
+
+ var segments_element = $('#segments', content_element);
+ var segments_reload = $( '#segments a.reload' );
+ var url_element = $('#url', segments_element);
+ var result_element = $('#result', segments_element);
+ var response_element = $('#response', result_element);
+ var segments_holder_element = $('.segments-holder', result_element);
+
+ segments_reload
+ .die( 'click' )
+ .live
+ (
+ 'click',
+ function( event )
+ {
+ $.ajax
+ (
+ {
+ url : core_basepath + '/admin/segments?wt=json',
+ dataType : 'json',
+ context: this,
+ beforeSend : function( arr, form, options )
+ {
+ loader.show( this );
+ },
+ success : function( response, text_status, xhr )
+ {
+ var segments_response = response['segments'],
+ segments_entries = [],
+ segment_bytes_max = calculate_max_size_on_disk( segments_response );
+
+ //scale
+ segments_entries.push( prepare_x_axis( segment_bytes_max ) );
+
+ var documents_count = 0, deletions_count = 0;
+
+ //elements
+ $.each( segments_response, function( key, segment_response ) {
+ segments_entries.push( get_entry( segment_response, segment_bytes_max ) );
+
+ documents_count += segment_response.size;
+ deletions_count += segment_response.delCount;
+ });
+
+ //footer
+ segments_entries.push( get_footer( deletions_count, documents_count ) );
+
+ $( 'ul', segments_holder_element ).html( segments_entries.join("\n" ) );
+ },
+ error : function( xhr, text_status, error_thrown )
+ {
+ $( this )
+ .attr( 'title', '/admin/segments is not configured (' + xhr.status + ': ' + error_thrown + ')' );
+
+ $( this ).parents( 'li' )
+ .addClass( 'error' );
+ },
+ complete : function( xhr, text_status )
+ {
+ loader.hide( this );
+ }
+ }
+ );
+ return false;
+ }
+ );
+ //initially submit
+ segments_reload.click();
+ }
+ );
+ }
+);
Propchange: ofbiz/trunk/plugins/solr/webapp/solr/js/scripts/segments.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-chosen.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-chosen.js?rev=1781731&r1=1781730&r2=1781731&view=diff
==============================================================================
--- ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-chosen.js (original)
+++ ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-chosen.js Sun Feb 5 11:09:59 2017
@@ -1,139 +1,139 @@
-/*
-The MIT License
-
-Copyright (c) 2013 Localytics http://www.localytics.com
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-// Generated by CoffeeScript 1.8.0
-(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', [
- '$timeout', function($timeout) {
- 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];
- scope.$watchCollection(valuesExpr, function(newVal, oldVal) {
- var timer;
- return timer = $timeout(function() {
- if (angular.isUndefined(newVal)) {
- return startLoading();
- } else {
- if (empty) {
- removeEmptyMessage();
- }
- stopLoading();
- if (isEmpty(newVal)) {
- return disableWithMessage();
- }
- }
- });
- });
- return scope.$on('$destroy', function(event) {
- if (typeof timer !== "undefined" && timer !== null) {
- return $timeout.cancel(timer);
- }
- });
- }
- }
- };
- }
- ]);
-
-}).call(this);
+/*
+The MIT License
+
+Copyright (c) 2013 Localytics http://www.localytics.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+// Generated by CoffeeScript 1.8.0
+(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', [
+ '$timeout', function($timeout) {
+ 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];
+ scope.$watchCollection(valuesExpr, function(newVal, oldVal) {
+ var timer;
+ return timer = $timeout(function() {
+ if (angular.isUndefined(newVal)) {
+ return startLoading();
+ } else {
+ if (empty) {
+ removeEmptyMessage();
+ }
+ stopLoading();
+ if (isEmpty(newVal)) {
+ return disableWithMessage();
+ }
+ }
+ });
+ });
+ return scope.$on('$destroy', function(event) {
+ if (typeof timer !== "undefined" && timer !== null) {
+ return $timeout.cancel(timer);
+ }
+ });
+ }
+ }
+ };
+ }
+ ]);
+
+}).call(this);
Propchange: ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-chosen.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.js?rev=1781731&r1=1781730&r2=1781731&view=diff
==============================================================================
--- ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.js (original)
+++ ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.js Sun Feb 5 11:09:59 2017
@@ -1,229 +1,229 @@
-/*
-The MIT License
-
-Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-/**
- * @license AngularJS v1.3.8
- * (c) 2010-2014 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/**
- * @ngdoc module
- * @name ngCookies
- * @description
- *
- * # ngCookies
- *
- * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
- *
- *
- * <div doc-module-components="ngCookies"></div>
- *
- * See {@link ngCookies.$cookies `$cookies`} and
- * {@link ngCookies.$cookieStore `$cookieStore`} for usage.
- */
-
-
-angular.module('ngCookies', ['ng']).
- /**
- * @ngdoc service
- * @name $cookies
- *
- * @description
- * Provides read/write access to browser's cookies.
- *
- * Only a simple Object is exposed and by adding or removing properties to/from this object, new
- * cookies are created/deleted at the end of current $eval.
- * The object's properties can only be strings.
- *
- * Requires the {@link ngCookies `ngCookies`} module to be installed.
- *
- * @example
- *
- * ```js
- * angular.module('cookiesExample', ['ngCookies'])
- * .controller('ExampleController', ['$cookies', function($cookies) {
- * // Retrieving a cookie
- * var favoriteCookie = $cookies.myFavorite;
- * // Setting a cookie
- * $cookies.myFavorite = 'oatmeal';
- * }]);
- * ```
- */
- factory('$cookies', ['$rootScope', '$browser', function($rootScope, $browser) {
- var cookies = {},
- lastCookies = {},
- lastBrowserCookies,
- runEval = false,
- copy = angular.copy,
- isUndefined = angular.isUndefined;
-
- //creates a poller fn that copies all cookies from the $browser to service & inits the service
- $browser.addPollFn(function() {
- var currentCookies = $browser.cookies();
- if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
- lastBrowserCookies = currentCookies;
- copy(currentCookies, lastCookies);
- copy(currentCookies, cookies);
- if (runEval) $rootScope.$apply();
- }
- })();
-
- runEval = true;
-
- //at the end of each eval, push cookies
- //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
- // strings or browser refuses to store some cookies, we update the model in the push fn.
- $rootScope.$watch(push);
-
- return cookies;
-
-
- /**
- * Pushes all the cookies from the service to the browser and verifies if all cookies were
- * stored.
- */
- function push() {
- var name,
- value,
- browserCookies,
- updated;
-
- //delete any cookies deleted in $cookies
- for (name in lastCookies) {
- if (isUndefined(cookies[name])) {
- $browser.cookies(name, undefined);
- }
- }
-
- //update all cookies updated in $cookies
- for (name in cookies) {
- value = cookies[name];
- if (!angular.isString(value)) {
- value = '' + value;
- cookies[name] = value;
- }
- if (value !== lastCookies[name]) {
- $browser.cookies(name, value);
- updated = true;
- }
- }
-
- //verify what was actually stored
- if (updated) {
- updated = false;
- browserCookies = $browser.cookies();
-
- for (name in cookies) {
- if (cookies[name] !== browserCookies[name]) {
- //delete or reset all cookies that the browser dropped from $cookies
- if (isUndefined(browserCookies[name])) {
- delete cookies[name];
- } else {
- cookies[name] = browserCookies[name];
- }
- updated = true;
- }
- }
- }
- }
- }]).
-
-
- /**
- * @ngdoc service
- * @name $cookieStore
- * @requires $cookies
- *
- * @description
- * Provides a key-value (string-object) storage, that is backed by session cookies.
- * Objects put or retrieved from this storage are automatically serialized or
- * deserialized by angular's toJson/fromJson.
- *
- * Requires the {@link ngCookies `ngCookies`} module to be installed.
- *
- * @example
- *
- * ```js
- * angular.module('cookieStoreExample', ['ngCookies'])
- * .controller('ExampleController', ['$cookieStore', function($cookieStore) {
- * // Put cookie
- * $cookieStore.put('myFavorite','oatmeal');
- * // Get cookie
- * var favoriteCookie = $cookieStore.get('myFavorite');
- * // Removing a cookie
- * $cookieStore.remove('myFavorite');
- * }]);
- * ```
- */
- factory('$cookieStore', ['$cookies', function($cookies) {
-
- return {
- /**
- * @ngdoc method
- * @name $cookieStore#get
- *
- * @description
- * Returns the value of given cookie key
- *
- * @param {string} key Id to use for lookup.
- * @returns {Object} Deserialized cookie value.
- */
- get: function(key) {
- var value = $cookies[key];
- return value ? angular.fromJson(value) : value;
- },
-
- /**
- * @ngdoc method
- * @name $cookieStore#put
- *
- * @description
- * Sets a value for given cookie key
- *
- * @param {string} key Id for the `value`.
- * @param {Object} value Value to be stored.
- */
- put: function(key, value) {
- $cookies[key] = angular.toJson(value);
- },
-
- /**
- * @ngdoc method
- * @name $cookieStore#remove
- *
- * @description
- * Remove given cookie
- *
- * @param {string} key Id of the key-value pair to delete.
- */
- remove: function(key) {
- delete $cookies[key];
- }
- };
-
- }]);
-
-
-})(window, window.angular);
+/*
+The MIT License
+
+Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+/**
+ * @license AngularJS v1.3.8
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/**
+ * @ngdoc module
+ * @name ngCookies
+ * @description
+ *
+ * # ngCookies
+ *
+ * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
+ *
+ *
+ * <div doc-module-components="ngCookies"></div>
+ *
+ * See {@link ngCookies.$cookies `$cookies`} and
+ * {@link ngCookies.$cookieStore `$cookieStore`} for usage.
+ */
+
+
+angular.module('ngCookies', ['ng']).
+ /**
+ * @ngdoc service
+ * @name $cookies
+ *
+ * @description
+ * Provides read/write access to browser's cookies.
+ *
+ * Only a simple Object is exposed and by adding or removing properties to/from this object, new
+ * cookies are created/deleted at the end of current $eval.
+ * The object's properties can only be strings.
+ *
+ * Requires the {@link ngCookies `ngCookies`} module to be installed.
+ *
+ * @example
+ *
+ * ```js
+ * angular.module('cookiesExample', ['ngCookies'])
+ * .controller('ExampleController', ['$cookies', function($cookies) {
+ * // Retrieving a cookie
+ * var favoriteCookie = $cookies.myFavorite;
+ * // Setting a cookie
+ * $cookies.myFavorite = 'oatmeal';
+ * }]);
+ * ```
+ */
+ factory('$cookies', ['$rootScope', '$browser', function($rootScope, $browser) {
+ var cookies = {},
+ lastCookies = {},
+ lastBrowserCookies,
+ runEval = false,
+ copy = angular.copy,
+ isUndefined = angular.isUndefined;
+
+ //creates a poller fn that copies all cookies from the $browser to service & inits the service
+ $browser.addPollFn(function() {
+ var currentCookies = $browser.cookies();
+ if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
+ lastBrowserCookies = currentCookies;
+ copy(currentCookies, lastCookies);
+ copy(currentCookies, cookies);
+ if (runEval) $rootScope.$apply();
+ }
+ })();
+
+ runEval = true;
+
+ //at the end of each eval, push cookies
+ //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
+ // strings or browser refuses to store some cookies, we update the model in the push fn.
+ $rootScope.$watch(push);
+
+ return cookies;
+
+
+ /**
+ * Pushes all the cookies from the service to the browser and verifies if all cookies were
+ * stored.
+ */
+ function push() {
+ var name,
+ value,
+ browserCookies,
+ updated;
+
+ //delete any cookies deleted in $cookies
+ for (name in lastCookies) {
+ if (isUndefined(cookies[name])) {
+ $browser.cookies(name, undefined);
+ }
+ }
+
+ //update all cookies updated in $cookies
+ for (name in cookies) {
+ value = cookies[name];
+ if (!angular.isString(value)) {
+ value = '' + value;
+ cookies[name] = value;
+ }
+ if (value !== lastCookies[name]) {
+ $browser.cookies(name, value);
+ updated = true;
+ }
+ }
+
+ //verify what was actually stored
+ if (updated) {
+ updated = false;
+ browserCookies = $browser.cookies();
+
+ for (name in cookies) {
+ if (cookies[name] !== browserCookies[name]) {
+ //delete or reset all cookies that the browser dropped from $cookies
+ if (isUndefined(browserCookies[name])) {
+ delete cookies[name];
+ } else {
+ cookies[name] = browserCookies[name];
+ }
+ updated = true;
+ }
+ }
+ }
+ }
+ }]).
+
+
+ /**
+ * @ngdoc service
+ * @name $cookieStore
+ * @requires $cookies
+ *
+ * @description
+ * Provides a key-value (string-object) storage, that is backed by session cookies.
+ * Objects put or retrieved from this storage are automatically serialized or
+ * deserialized by angular's toJson/fromJson.
+ *
+ * Requires the {@link ngCookies `ngCookies`} module to be installed.
+ *
+ * @example
+ *
+ * ```js
+ * angular.module('cookieStoreExample', ['ngCookies'])
+ * .controller('ExampleController', ['$cookieStore', function($cookieStore) {
+ * // Put cookie
+ * $cookieStore.put('myFavorite','oatmeal');
+ * // Get cookie
+ * var favoriteCookie = $cookieStore.get('myFavorite');
+ * // Removing a cookie
+ * $cookieStore.remove('myFavorite');
+ * }]);
+ * ```
+ */
+ factory('$cookieStore', ['$cookies', function($cookies) {
+
+ return {
+ /**
+ * @ngdoc method
+ * @name $cookieStore#get
+ *
+ * @description
+ * Returns the value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {Object} Deserialized cookie value.
+ */
+ get: function(key) {
+ var value = $cookies[key];
+ return value ? angular.fromJson(value) : value;
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookieStore#put
+ *
+ * @description
+ * Sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {Object} value Value to be stored.
+ */
+ put: function(key, value) {
+ $cookies[key] = angular.toJson(value);
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookieStore#remove
+ *
+ * @description
+ * Remove given cookie
+ *
+ * @param {string} key Id of the key-value pair to delete.
+ */
+ remove: function(key) {
+ delete $cookies[key];
+ }
+ };
+
+ }]);
+
+
+})(window, window.angular);
Propchange: ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.min.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.min.js?rev=1781731&r1=1781730&r2=1781731&view=diff
==============================================================================
--- ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.min.js (original)
+++ ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.min.js Sun Feb 5 11:09:59 2017
@@ -1,31 +1,31 @@
-/*
-The MIT License
-
-Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-/*
- AngularJS v1.3.8
- (c) 2010-2014 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&e.$apply())})();k=!0;e.$watch(function(){var a,d,e;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)d=c[a],f.isString(d)||(d=""+d,c[a]=d),d!==g[a]&&(b.cookies(a,d),e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?delete c[a]:c[a]=d[a])});return c}]).factory("$cookieStore",
-["$cookies",function(e){return{get:function(b){return(b=e[b])?f.fromJson(b):b},put:function(b,c){e[b]=f.toJson(c)},remove:function(b){delete e[b]}}}])})(window,window.angular);
-//# sourceMappingURL=angular-cookies.min.js.map
+/*
+The MIT License
+
+Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+/*
+ AngularJS v1.3.8
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&e.$apply())})();k=!0;e.$watch(function(){var a,d,e;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)d=c[a],f.isString(d)||(d=""+d,c[a]=d),d!==g[a]&&(b.cookies(a,d),e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?delete c[a]:c[a]=d[a])});return c}]).factory("$cookieStore",
+["$cookies",function(e){return{get:function(b){return(b=e[b])?f.fromJson(b):b},put:function(b,c){e[b]=f.toJson(c)},remove:function(b){delete e[b]}}}])})(window,window.angular);
+//# sourceMappingURL=angular-cookies.min.js.map
Propchange: ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-cookies.min.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-resource.min.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-resource.min.js?rev=1781731&r1=1781730&r2=1781731&view=diff
==============================================================================
--- ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-resource.min.js (original)
+++ ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-resource.min.js Sun Feb 5 11:09:59 2017
@@ -1,36 +1,36 @@
-/*
-The MIT License
-
-Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-/*
- AngularJS v1.3.8
- (c) 2010-2014 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(I,d,B){'use strict';function D(f,q){q=q||{};d.forEach(q,function(d,h){delete q[h]});for(var h in f)!f.hasOwnProperty(h)||"$"===h.charAt(0)&&"$"===h.charAt(1)||(q[h]=f[h]);return q}var w=d.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var f=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};
-this.$get=["$http","$q",function(q,h){function t(d,g){this.template=d;this.defaults=s({},f.defaults,g);this.urlParams={}}function v(x,g,l,m){function c(b,k){var c={};k=s({},g,k);r(k,function(a,k){u(a)&&(a=a());var d;if(a&&a.charAt&&"@"==a.charAt(0)){d=b;var e=a.substr(1);if(null==e||""===e||"hasOwnProperty"===e||!C.test("."+e))throw w("badmember",e);for(var e=e.split("."),n=0,g=e.length;n<g&&d!==B;n++){var h=e[n];d=null!==d?d[h]:B}}else d=a;c[k]=d});return c}function F(b){return b.resource}function e(b){D(b||
-{},this)}var G=new t(x,m);l=s({},f.defaults.actions,l);e.prototype.toJSON=function(){var b=s({},this);delete b.$promise;delete b.$resolved;return b};r(l,function(b,k){var g=/^(POST|PUT|PATCH)$/i.test(b.method);e[k]=function(a,y,m,x){var n={},f,l,z;switch(arguments.length){case 4:z=x,l=m;case 3:case 2:if(u(y)){if(u(a)){l=a;z=y;break}l=y;z=m}else{n=a;f=y;l=m;break}case 1:u(a)?l=a:g?f=a:n=a;break;case 0:break;default:throw w("badargs",arguments.length);}var t=this instanceof e,p=t?f:b.isArray?[]:new e(f),
-A={},v=b.interceptor&&b.interceptor.response||F,C=b.interceptor&&b.interceptor.responseError||B;r(b,function(b,a){"params"!=a&&"isArray"!=a&&"interceptor"!=a&&(A[a]=H(b))});g&&(A.data=f);G.setUrlParams(A,s({},c(f,b.params||{}),n),b.url);n=q(A).then(function(a){var c=a.data,g=p.$promise;if(c){if(d.isArray(c)!==!!b.isArray)throw w("badcfg",k,b.isArray?"array":"object",d.isArray(c)?"array":"object");b.isArray?(p.length=0,r(c,function(a){"object"===typeof a?p.push(new e(a)):p.push(a)})):(D(c,p),p.$promise=
-g)}p.$resolved=!0;a.resource=p;return a},function(a){p.$resolved=!0;(z||E)(a);return h.reject(a)});n=n.then(function(a){var b=v(a);(l||E)(b,a.headers);return b},C);return t?n:(p.$promise=n,p.$resolved=!1,p)};e.prototype["$"+k]=function(a,b,c){u(a)&&(c=b,b=a,a={});a=e[k].call(this,a,this,b,c);return a.$promise||a}});e.bind=function(b){return v(x,s({},g,b),l)};return e}var E=d.noop,r=d.forEach,s=d.extend,H=d.copy,u=d.isFunction;t.prototype={setUrlParams:function(f,g,l){var m=this,c=l||m.template,h,
-e,q=m.urlParams={};r(c.split(/\W/),function(b){if("hasOwnProperty"===b)throw w("badname");!/^\d+$/.test(b)&&b&&(new RegExp("(^|[^\\\\]):"+b+"(\\W|$)")).test(c)&&(q[b]=!0)});c=c.replace(/\\:/g,":");g=g||{};r(m.urlParams,function(b,k){h=g.hasOwnProperty(k)?g[k]:m.defaults[k];d.isDefined(h)&&null!==h?(e=encodeURIComponent(h).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),c=c.replace(new RegExp(":"+
-k+"(\\W|$)","g"),function(b,a){return e+a})):c=c.replace(new RegExp("(/?):"+k+"(\\W|$)","g"),function(b,a,c){return"/"==c.charAt(0)?c:a+c})});m.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");f.url=c.replace(/\/\\\./,"/.");r(g,function(b,c){m.urlParams[c]||(f.params=f.params||{},f.params[c]=b)})}};return v}]})})(window,window.angular);
-//# sourceMappingURL=angular-resource.min.js.map
+/*
+The MIT License
+
+Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+/*
+ AngularJS v1.3.8
+ (c) 2010-2014 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(I,d,B){'use strict';function D(f,q){q=q||{};d.forEach(q,function(d,h){delete q[h]});for(var h in f)!f.hasOwnProperty(h)||"$"===h.charAt(0)&&"$"===h.charAt(1)||(q[h]=f[h]);return q}var w=d.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;d.module("ngResource",["ng"]).provider("$resource",function(){var f=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};
+this.$get=["$http","$q",function(q,h){function t(d,g){this.template=d;this.defaults=s({},f.defaults,g);this.urlParams={}}function v(x,g,l,m){function c(b,k){var c={};k=s({},g,k);r(k,function(a,k){u(a)&&(a=a());var d;if(a&&a.charAt&&"@"==a.charAt(0)){d=b;var e=a.substr(1);if(null==e||""===e||"hasOwnProperty"===e||!C.test("."+e))throw w("badmember",e);for(var e=e.split("."),n=0,g=e.length;n<g&&d!==B;n++){var h=e[n];d=null!==d?d[h]:B}}else d=a;c[k]=d});return c}function F(b){return b.resource}function e(b){D(b||
+{},this)}var G=new t(x,m);l=s({},f.defaults.actions,l);e.prototype.toJSON=function(){var b=s({},this);delete b.$promise;delete b.$resolved;return b};r(l,function(b,k){var g=/^(POST|PUT|PATCH)$/i.test(b.method);e[k]=function(a,y,m,x){var n={},f,l,z;switch(arguments.length){case 4:z=x,l=m;case 3:case 2:if(u(y)){if(u(a)){l=a;z=y;break}l=y;z=m}else{n=a;f=y;l=m;break}case 1:u(a)?l=a:g?f=a:n=a;break;case 0:break;default:throw w("badargs",arguments.length);}var t=this instanceof e,p=t?f:b.isArray?[]:new e(f),
+A={},v=b.interceptor&&b.interceptor.response||F,C=b.interceptor&&b.interceptor.responseError||B;r(b,function(b,a){"params"!=a&&"isArray"!=a&&"interceptor"!=a&&(A[a]=H(b))});g&&(A.data=f);G.setUrlParams(A,s({},c(f,b.params||{}),n),b.url);n=q(A).then(function(a){var c=a.data,g=p.$promise;if(c){if(d.isArray(c)!==!!b.isArray)throw w("badcfg",k,b.isArray?"array":"object",d.isArray(c)?"array":"object");b.isArray?(p.length=0,r(c,function(a){"object"===typeof a?p.push(new e(a)):p.push(a)})):(D(c,p),p.$promise=
+g)}p.$resolved=!0;a.resource=p;return a},function(a){p.$resolved=!0;(z||E)(a);return h.reject(a)});n=n.then(function(a){var b=v(a);(l||E)(b,a.headers);return b},C);return t?n:(p.$promise=n,p.$resolved=!1,p)};e.prototype["$"+k]=function(a,b,c){u(a)&&(c=b,b=a,a={});a=e[k].call(this,a,this,b,c);return a.$promise||a}});e.bind=function(b){return v(x,s({},g,b),l)};return e}var E=d.noop,r=d.forEach,s=d.extend,H=d.copy,u=d.isFunction;t.prototype={setUrlParams:function(f,g,l){var m=this,c=l||m.template,h,
+e,q=m.urlParams={};r(c.split(/\W/),function(b){if("hasOwnProperty"===b)throw w("badname");!/^\d+$/.test(b)&&b&&(new RegExp("(^|[^\\\\]):"+b+"(\\W|$)")).test(c)&&(q[b]=!0)});c=c.replace(/\\:/g,":");g=g||{};r(m.urlParams,function(b,k){h=g.hasOwnProperty(k)?g[k]:m.defaults[k];d.isDefined(h)&&null!==h?(e=encodeURIComponent(h).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),c=c.replace(new RegExp(":"+
+k+"(\\W|$)","g"),function(b,a){return e+a})):c=c.replace(new RegExp("(/?):"+k+"(\\W|$)","g"),function(b,a,c){return"/"==c.charAt(0)?c:a+c})});m.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");f.url=c.replace(/\/\\\./,"/.");r(g,function(b,c){m.urlParams[c]||(f.params=f.params||{},f.params[c]=b)})}};return v}]})})(window,window.angular);
+//# sourceMappingURL=angular-resource.min.js.map
Propchange: ofbiz/trunk/plugins/solr/webapp/solr/libs/angular-resource.min.js
------------------------------------------------------------------------------
svn:eol-style = native