This is an automated email from the ASF dual-hosted git repository.

adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ofbiz-site.git


The following commit(s) were added to refs/heads/master by this push:
     new eec3090  Removed: unused bootstrap-select javascript plugin The plugin 
is no longer used and contains dependency with the vulnerability
eec3090 is described below

commit eec3090d837d6e931271596a48dca6e6c4a9aedb
Author: Aditya Sharma <adityasha...@apache.org>
AuthorDate: Thu Sep 3 15:00:00 2020 +0530

    Removed: unused bootstrap-select javascript plugin
    The plugin is no longer used and contains dependency with the vulnerability
---
 js/plugins/bootstrap-select/README.md              |  53 ----
 js/plugins/bootstrap-select/bootstrap-select.css   |  50 ----
 js/plugins/bootstrap-select/bootstrap-select.js    | 280 ---------------------
 .../bootstrap-select/bootstrap-select.min.css      |   1 -
 .../bootstrap-select/bootstrap-select.min.js       |   1 -
 js/plugins/bootstrap-select/package.json           |  25 --
 6 files changed, 410 deletions(-)

diff --git a/js/plugins/bootstrap-select/README.md 
b/js/plugins/bootstrap-select/README.md
deleted file mode 100644
index 0b3c1e4..0000000
--- a/js/plugins/bootstrap-select/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-bootstrap-select
-================
-
-A custom select for @twitter bootstrap using button dropdown, designed to 
behave like regular Bootstrap selects;
-
-## Demo
-
-See an [example](http://caseyjhol.github.com/bootstrap-select/).
-
-## Authors
-
-[Silvio Moreto](http://github.com/silviomoreto),
-[Ana Carolina](http://github.com/anacarolinats), and
-[caseyjhol](https://github.com/caseyjhol).
-
-## Usage
-
-Create your `<select>` with the `.selectpicker` class.
-
-    <select class="selectpicker">
-      <option>Mustard</option>
-      <option>Ketchup</option>
-      <option>Barbecue</option>
-    </select>
-    
-Enable Bootstrap-Select via JavaScript:
-
-    $('.selectpicker').selectpicker();
-
-Or just
-
-    $('select').selectpicker();
-    
-Options can be passed via data attributes or JavaScript.
-
-    $('.selectpicker').selectpicker({
-      style: 'btn-info',
-      size: 4
-    });
-
-You can set different Bootstrap classes on the button via the `data-style` 
attribute. Classes are applied to `.btn-group`.Apply `.span*` class to the 
selects to set the width. Add the `disabled` attribute to the select to apply 
the `.disabled` class. The `size` option is set to `'auto'` by default. When 
`size` is set to `'auto'`, the menu always opens up to show as many items as 
the window will allow without being cut off. Set `size` to `false` to always 
show all items. The size of the m [...]
-
-## Copyright and license
-
-Copyright (C) 2013 bootstrap-select
-
-Licensed under the MIT license.
-
-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.
diff --git a/js/plugins/bootstrap-select/bootstrap-select.css 
b/js/plugins/bootstrap-select/bootstrap-select.css
deleted file mode 100644
index e31c4a9..0000000
--- a/js/plugins/bootstrap-select/bootstrap-select.css
+++ /dev/null
@@ -1,50 +0,0 @@
-.clearfix:after {
-       visibility: hidden;
-       display: block;
-       font-size: 0;
-       content: " ";
-       clear: both;
-       height: 0;
-}
-.bootstrap-select.btn-group, .bootstrap-select.btn-group[class*="span"] {
-       float:none; 
-       display: inline-block;
-       margin-bottom: 10px;
-       margin-left:0;
-}
-.bootstrap-select {width: 220px;}
-.bootstrap-select .btn {width: 220px;}
-.bootstrap-select .btn:focus {
-       outline: thin dotted #333333 !important;
-       outline: 5px auto -webkit-focus-ring-color !important;
-       outline-offset: -2px;
-}
-.bootstrap-select.btn-group .btn .filter-option {
-       overflow:hidden; 
-       position:absolute;
-       left:12px; 
-       right:25px;
-       text-align:left;
-}
-.bootstrap-select.btn-group .btn .caret {
-       position:absolute;
-       right:12px;
-}
-.bootstrap-select.btn-group .disabled, .bootstrap-select.btn-group 
.dropdown-menu li.disabled > a {cursor: not-allowed;}
-.bootstrap-select.btn-group[class*="span"] .btn {
-       width:100%;
-}
-.bootstrap-select.btn-group .dropdown-menu {
-       min-width:100%;
-       -moz-box-sizing:border-box;
-       -webkit-box-sizing:border-box;
-       box-sizing:border-box;
-}
-.bootstrap-select.btn-group .dropdown-menu dt {
-       display:block; 
-       padding:3px 20px; 
-       cursor:default;
-}
-.bootstrap-select.btn-group .dropdown-menu li > a.opt {padding-left:35px;}
-.bootstrap-select.btn-group .dropdown-menu .optgroup-div {border-top:1px solid 
#e5e5e5;}
-.bootstrap-select.btn-group .dropdown-menu li > a {cursor: pointer;}
\ No newline at end of file
diff --git a/js/plugins/bootstrap-select/bootstrap-select.js 
b/js/plugins/bootstrap-select/bootstrap-select.js
deleted file mode 100644
index e0d845d..0000000
--- a/js/plugins/bootstrap-select/bootstrap-select.js
+++ /dev/null
@@ -1,280 +0,0 @@
-!function($) {
-    var Selectpicker = function(element, options, e) {
-        if (e ) {
-            e.stopPropagation();
-            e.preventDefault();
-        }
-        this.$element = $(element);
-        this.$newElement = null;
-        this.button = null;
-        this.options = $.extend({}, $.fn.selectpicker.defaults, 
this.$element.data(), typeof options == 'object' && options);
-        this.style = this.options.style;
-        this.size = this.options.size;
-        this.init();
-    };
-
-    Selectpicker.prototype = {
-
-        constructor: Selectpicker,
-
-        init: function (e) {
-            this.$element.hide();
-            var classList = this.$element.attr('class') !== undefined ? 
this.$element.attr('class').split(/\s+/) : '';
-            var template = this.getTemplate();
-            var id = this.$element.attr('id');
-            template = this.createLi(template);
-            this.$element.after(template);
-            this.$newElement = this.$element.next('.bootstrap-select');
-            var select = this.$newElement;
-            var menu = this.$newElement.find('.dropdown-menu');
-            var menuA = this.$newElement.find('.dropdown-menu li > a');
-            var liHeight = parseInt(menuA.css('line-height')) + 
menuA.outerHeight();
-            var selectOffset_top = this.$newElement.offset().top;
-            var size = 0;
-            var menuHeight = 0;
-            var selectHeight = this.$newElement.outerHeight();
-            this.button = this.$newElement.find('> button');
-            if (id !== undefined) {
-                this.button.attr('id', id);
-                $('label[for="' + id + '"]').click(function(){ 
select.find('button#'+id).focus(); })
-            }
-            for (var i = 0; i < classList.length; i++) {
-                if(classList[i] != 'selectpicker') {
-                    this.$newElement.addClass(classList[i]);
-                }
-            }
-            this.button.addClass(this.style);
-            this.checkDisabled();
-                       this.checkTabIndex();
-            this.clickListener();
-            var menuPadding = parseInt(menu.css('padding-top')) + 
parseInt(menu.css('padding-bottom')) + parseInt(menu.css('border-top-width')) + 
parseInt(menu.css('border-bottom-width'));
-            if (this.size == 'auto') {
-                function getSize() {
-                    var selectOffset_top_scroll = selectOffset_top - 
$(window).scrollTop();
-                    var windowHeight = window.innerHeight;
-                    var menuExtras = menuPadding + 
parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2;
-                    var selectOffset_bot = windowHeight - 
selectOffset_top_scroll - selectHeight - menuExtras;
-                    if (!select.hasClass('dropup')) {
-                    size = Math.floor(selectOffset_bot/liHeight);
-                    } else {
-                    size = Math.floor((selectOffset_top_scroll - 
menuExtras)/liHeight);
-                    }
-                    if (size < 4) {size = 3};
-                    menuHeight = liHeight*size + menuPadding;
-                    if (menu.find('li').length + menu.find('dt').length > 
size) {
-                        menu.css({'max-height' : menuHeight + 'px', 
'overflow-y' : 'scroll'});
-                    } else {
-                        menu.css({'max-height' : 'none', 'overflow-y' : 
'auto'});
-                    }
-            }
-                getSize();
-                $(window).resize(getSize);
-                $(window).scroll(getSize);
-                this.$element.bind('DOMNodeInserted', getSize);
-            } else if (this.size && this.size != 'auto' && 
menu.find('li').length > this.size) {
-                menuHeight = liHeight*this.size + menuPadding;
-                if (this.size == 1) {menuHeight = menuHeight + 8}
-                menu.css({'max-height' : menuHeight + 'px', 'overflow-y' : 
'scroll'});
-            }
-
-            this.$element.bind('DOMNodeInserted', $.proxy(this.reloadLi, 
this));
-        },
-
-        getTemplate: function() {
-            var template =
-                "<div class='btn-group bootstrap-select'>" +
-                    "<button class='btn dropdown-toggle clearfix' 
data-toggle='dropdown'>" +
-                        "<span class='filter-option 
pull-left'>__SELECTED_OPTION</span>&nbsp;" +
-                        "<span class='caret'></span>" +
-                    "</button>" +
-                    "<ul class='dropdown-menu' role='menu'>" +
-                        "__ADD_LI" +
-                    "</ul>" +
-                "</div>";
-
-            return template;
-        },
-
-        reloadLi: function() {
-            var _li = [];
-            var _liA = [];
-            var _liHtml = '';
-
-            this.$newElement.find('li').remove();
-
-            this.$element.find('option').each(function(){
-                _li.push($(this).text());
-            });
-
-            this.$element.find('option').each(function() {
-                var optionClass = $(this).attr("class") !== undefined ? 
$(this).attr("class") : '';
-                if ($(this).parent().is('optgroup')) {
-                    if ($(this).index() == 0) {
-                        if ($(this)[0].index != 0) {
-                            _liA.push(
-                                '<dt 
class="optgroup-div">'+$(this).parent().attr('label')+'</dt>'+
-                                '<a tabindex="-1" class="opt 
'+optionClass+'">'+$(this).text()+'</a>'
-                                );
-                        } else {
-                            _liA.push(
-                                '<dt>'+$(this).parent().attr('label')+'</dt>'+
-                                '<a tabindex="-1" class="opt 
'+optionClass+'">'+$(this).text()+'</a>'
-                                );
-                        }
-                    } else {
-                         _liA.push('<a tabindex="-1" class="opt 
'+optionClass+'">'+$(this).text()+'</a>');
-                    }
-                } else {
-                    _liA.push('<a tabindex="-1" 
class="'+optionClass+'">'+$(this).text()+'</a>');
-                }
-            });
-
-            if(_li.length > 0) {
-                for (var i = 0; i < _li.length; i++) {
-                    var disabled = 
this.$element.find('option').eq(i).is(':disabled') ? 'class="disabled"' : '';
-                    this.$newElement.find('ul').append(
-                        '<li rel=' + i + ' '+ disabled +'>' + _liA[i] + '</li>'
-                    );
-                }
-            }
-
-            this.$newElement.find('li dt').on('click', function(e) {
-                e.stopPropagation();
-                $select = $(this).parent().parents('.bootstrap-select');
-                $select.find('button').focus();
-            });
-            this.$newElement.find('li.disabled a').on('click', function(e) {
-                e.stopPropagation();
-                $select = $(this).parent().parents('.bootstrap-select');
-                $select.find('button').focus();
-            });
-        },
-
-        createLi: function(template) {
-
-            var _li = [];
-            var _liA = [];
-            var _liHtml = '';
-            var _this = this;
-            var _selected_index = this.$element[0].selectedIndex ? 
this.$element[0].selectedIndex : 0;
-
-            this.$element.find('option').each(function(){
-                _li.push($(this).text());
-            });
-
-            this.$element.find('option').each(function() {
-                var optionClass = $(this).attr("class") !== undefined ? 
$(this).attr("class") : '';
-                if ($(this).parent().is('optgroup')) {
-                    if ($(this).index() == 0) {
-                        if ($(this)[0].index != 0) {
-                            _liA.push(
-                                '<dt 
class="optgroup-div">'+$(this).parent().attr('label')+'</dt>'+
-                                '<a tabindex="-1" class="opt 
'+optionClass+'">'+$(this).text()+'</a>'
-                                );
-                        } else {
-                            _liA.push(
-                                '<dt>'+$(this).parent().attr('label')+'</dt>'+
-                                '<a tabindex="-1" class="opt 
'+optionClass+'">'+$(this).text()+'</a>'
-                                );
-                        }
-                    } else {
-                         _liA.push('<a tabindex="-1" class="opt 
'+optionClass+'">'+$(this).text()+'</a>');
-                    }
-                } else {
-                    _liA.push('<a tabindex="-1" 
class="'+optionClass+'">'+$(this).text()+'</a>');
-                }
-            });
-
-            if (_li.length > 0) {
-                template = template.replace('__SELECTED_OPTION', 
_li[_selected_index]);
-                for (var i = 0; i < _li.length; i++) {
-                    var disabled = 
this.$element.find('option').eq(i).is(':disabled') ? 'class="disabled"' : '';
-                    _liHtml += "<li rel=" + i + " "+ disabled +">" + _liA[i] + 
"</li>";
-                }
-            }
-
-            
this.$element.find('option').eq(_selected_index).prop('selected',true);
-
-            template = template.replace('__ADD_LI', _liHtml);
-
-            return template;
-        },
-
-        checkDisabled: function() {
-            if (this.$element.is(':disabled')) {
-                this.button.addClass('disabled');
-                this.button.click(function(e) {
-                    e.preventDefault();
-                });
-            }
-        },
-               
-               checkTabIndex: function() {
-                       if (this.$element.is('[tabindex]')) {
-                               var tabindex = this.$element.attr("tabindex");
-                               this.button.attr('tabindex', tabindex);
-                       }
-               },
-
-        clickListener: function() {
-            $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) 
{ e.stopPropagation(); });
-            this.$newElement.find('li dt').on('click', function(e) {
-                e.stopPropagation();
-                $select = $(this).parent().parents('.bootstrap-select');
-                $select.find('button').focus();
-            });
-            this.$newElement.find('li.disabled a').on('click', function(e) {
-                e.stopPropagation();
-                $select = $(this).parent().parents('.bootstrap-select');
-                $select.find('button').focus();
-            });
-            this.$newElement.on('click', 'li a', function(e){
-                e.preventDefault();
-                var selected = $(this).parent().index(),
-                    $this = $(this).parent(),
-                    $select = $this.parents('.bootstrap-select');
-
-                if ($select.prev('select').not(':disabled')){
-
-                    
$select.prev('select').find('option').removeAttr('selected');
-
-                    
$select.prev('select').find('option').eq(selected).prop('selected', 
true).attr('selected', 'selected');
-                    $select.find('.filter-option').html($this.text());
-                    $select.find('button').focus();
-
-                    // Trigger select 'change'
-                    $select.prev('select').trigger('change');
-                }
-
-            });
-            this.$element.on('change', function(e) {
-                if($(this).find('option:selected').attr('title')!=undefined){
-                    
$(this).next('.bootstrap-select').find('.filter-option').html($(this).find('option:selected').attr('title'));
-                }else{
-                    
$(this).next('.bootstrap-select').find('.filter-option').html($(this).find('option:selected').text());
-                }
-            });
-        }
-
-    };
-
-    $.fn.selectpicker = function(option, event) {
-        return this.each(function () {
-            var $this = $(this),
-                data = $this.data('selectpicker'),
-                options = typeof option == 'object' && option;
-            if (!data) {
-                $this.data('selectpicker', (data = new Selectpicker(this, 
options, event)));
-            }
-            if (typeof option == 'string') {
-                data[option]();
-            }
-        });
-    };
-
-    $.fn.selectpicker.defaults = {
-        style: null,
-        size: 'auto'
-    }
-
-}(window.jQuery);
\ No newline at end of file
diff --git a/js/plugins/bootstrap-select/bootstrap-select.min.css 
b/js/plugins/bootstrap-select/bootstrap-select.min.css
deleted file mode 100644
index 5468bf8..0000000
--- a/js/plugins/bootstrap-select/bootstrap-select.min.css
+++ /dev/null
@@ -1 +0,0 @@
-.clearfix:after{visibility:hidden;display:block;font-size:0;content:" 
";clear:both;height:0}.bootstrap-select.btn-group,.bootstrap-select.btn-group[class*="span"]{float:none;display:inline-block;margin-bottom:10px;margin-left:0}.bootstrap-select{width:220px}.bootstrap-select
 .btn{width:220px}.bootstrap-select .btn:focus{outline:thin dotted 
#333!important;outline:5px auto 
-webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.btn-group
 .btn .filter-option{overflow:hidden [...]
\ No newline at end of file
diff --git a/js/plugins/bootstrap-select/bootstrap-select.min.js 
b/js/plugins/bootstrap-select/bootstrap-select.min.js
deleted file mode 100644
index 9bcf6d9..0000000
--- a/js/plugins/bootstrap-select/bootstrap-select.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(b){var 
a=function(d,c,f){if(f){f.stopPropagation();f.preventDefault()}this.$element=b(d);this.$newElement=null;this.button=null;this.options=b.extend({},b.fn.selectpicker.defaults,this.$element.data(),typeof
 
c=="object"&&c);this.style=this.options.style;this.size=this.options.size;this.init()};a.prototype={constructor:a,init:function(n){this.$element.hide();var
 
f=this.$element.attr("class")!==undefined?this.$element.attr("class").split(/\s+/):"";var
 q=this.getTemplate();var d=t [...]
\ No newline at end of file
diff --git a/js/plugins/bootstrap-select/package.json 
b/js/plugins/bootstrap-select/package.json
deleted file mode 100644
index 1afeaa5..0000000
--- a/js/plugins/bootstrap-select/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  "name": "jquery",
-       "title": "jQuery",
-       "description": "JavaScript library for DOM operations",
-       "version": "2.0.0pre",
-       "homepage": "http://jquery.com";,
-       "author": {
-               "name": "Silvio Moreto",
-               "url": "https://github.com/silviomoreto/";
-       },
-       "repository": {
-               "type": "git",
-               "url": "git://github.com/antonellopasella/bootstrap-select.git"
-       },
-       "licenses": [
-               {
-                       "type": "Custom",
-                       "url": 
"https://github.com/silviomoreto/bootstrap-select/blob/master/README.md#copyright-and-license";
-               }
-       ],
-       "dependencies": {
-               "jquery": "1.8"
-       },
-       "keywords": []
-}

Reply via email to