]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1472316 - Decommission new-bug page
authorKohei Yoshino <kohei.yoshino@gmail.com>
Wed, 26 Jun 2019 17:21:43 +0000 (13:21 -0400)
committerGitHub <noreply@github.com>
Wed, 26 Jun 2019 17:21:43 +0000 (13:21 -0400)
13 files changed:
Bugzilla/App/CGI.pm
extensions/BugModal/template/en/default/bug_modal/common_header.html.tmpl [deleted file]
extensions/BugModal/web/common_bug_modal.js [deleted file]
extensions/BugModal/web/new_bug.css [deleted file]
extensions/BugModal/web/new_bug.js [deleted file]
extensions/ProdCompSearch/web/js/prod_comp_search.js
js/jquery/plugins/selectize/selectize-min.js [deleted file]
js/jquery/plugins/selectize/selectize.bootstrap2.css [deleted file]
js/jquery/plugins/selectize/selectize.bootstrap3.css [deleted file]
js/jquery/plugins/selectize/selectize.css [deleted file]
js/jquery/plugins/selectize/selectize.default.css [deleted file]
new_bug.cgi [deleted file]
template/en/default/bug/new_bug.html.tmpl [deleted file]

index 3fc4c91305a368da0b95bce3805d3d5789516397..a3b82ff9f7de6300fd8198a0127f167fbc61ab3a 100644 (file)
@@ -43,7 +43,12 @@ sub setup_routes {
   $r->get('/robots.txt')->to('CGI#robots_cgi');
   $r->any('/login')->to('CGI#index_cgi' => {'GoAheadAndLogIn' => '1'});
   $r->any('/logout')->to('CGI#index_cgi' => {'logout' => '1'});
-  $r->any('/:new_bug' => [new_bug => qr{new[-_]bug}])->to('CGI#new_bug_cgi');
+
+  $r->any('/:new_bug' => [new_bug => qr{new[-_]bug}] => sub {
+    my $c = shift;
+    $c->res->code(301);
+    $c->redirect_to(Bugzilla->localconfig->basepath . 'enter_bug.cgi');
+  });
 }
 
 sub load_one {
diff --git a/extensions/BugModal/template/en/default/bug_modal/common_header.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/common_header.html.tmpl
deleted file mode 100644 (file)
index fc9dea2..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-[%# This Source Code Form is subject to the terms of the Mozilla Public
-  # License, v. 2.0. If a copy of the MPL was not distributed with this
-  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-  #
-  # This Source Code Form is "Incompatible With Secondary Licenses", as
-  # defined by the Mozilla Public License, v. 2.0.
-  #%]
-
-[%
-  PROCESS global/variables.none.tmpl;
-
-  title = title
-
-  generate_api_token = 1;
-
-  # these aren't always defined
-  UNLESS bodyclasses.defined;
-    bodyclasses = [];
-  END;
-  UNLESS javascript_urls.defined;
-    javascript_urls = [];
-  END;
-  UNLESS style_urls.defined;
-    style_urls = [];
-  END;
-  UNLESS jquery.defined;
-    jquery = [];
-  END;
-
-  # right now we need yui for tracking flags and needinfo extensions
-  no_yui = 0;
-
-  # add body classes for sec-groups, etc
-  bodyclasses.push("bug_modal");
-
-  # assets
-  javascript_urls.push(
-    "extensions/ProdCompSearch/web/js/prod_comp_search.js",
-    "extensions/BugModal/web/common_bug_modal.js",
-    "extensions/BugModal/web/comments.js",
-    "js/bugzilla-readable-status-min.js",
-    "js/field.js",
-    "js/comments.js"
-  );
-  jquery.push(
-    "datetimepicker",
-    "contextMenu",
-    "visibility"
-  );
-  style_urls.unshift(
-    "extensions/BugModal/web/bug_modal.css",
-    "js/jquery/plugins/datetimepicker/datetimepicker.css",
-    "js/jquery/plugins/contextMenu/contextMenu.css"
-  );
-%]
-
-[% javascript = BLOCK %]
-
-  [%# expose useful data to js %]
-
-  BUGZILLA.user = {
-    id: [% user.id FILTER none %],
-    login: '[% user.login FILTER js %]',
-    is_insider: [% user.is_insider ? "true" : "false" %],
-    is_timetracker: [% user.is_timetracker ? "true" : "false" %],
-    can_tag: [% user.can_tag_comments ? "true" : "false" %],
-    settings: {
-      quote_replies: '[% user.settings.quote_replies.value FILTER js %]',
-      zoom_textareas: [% user.settings.zoom_textareas.value == "on" ? "true" : "false" %],
-      remember_collapsed: [% user.settings.ui_remember_collapsed.value == "on" ? "true" : "false" %]
-    }
-  };
-[% END %]
-
-[% Hook.process("end") %]
diff --git a/extensions/BugModal/web/common_bug_modal.js b/extensions/BugModal/web/common_bug_modal.js
deleted file mode 100644 (file)
index 00dcfa7..0000000
+++ /dev/null
@@ -1,1378 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This Source Code Form is "Incompatible With Secondary Licenses", as
- * defined by the Mozilla Public License, v. 2.0. */
-
-// expand/collapse module
-function slide_module(module, action, fast) {
-    if (!module.attr('id'))
-        return;
-    var latch = module.find('.module-latch');
-    var spinner = module.find('.module-spinner');
-    var content = $(module.children('.module-content')[0]);
-    var duration = fast ? 0 : 200;
-
-    function slide_done() {
-        var is_visible = content.is(':visible');
-        spinner.attr({
-            'aria-expanded': is_visible,
-            'aria-label': is_visible ? latch.data('label-expanded') : latch.data('label-collapsed'),
-        });
-        if (BUGZILLA.user.settings.remember_collapsed)
-            localStorage.setItem(module.attr('id') + '.visibility', is_visible ? 'show' : 'hide');
-    }
-
-    if (action == 'show') {
-        content.slideDown(duration, 'swing', slide_done);
-    }
-    else if (action == 'hide') {
-        content.slideUp(duration, 'swing', slide_done);
-    }
-    else {
-        content.slideToggle(duration, 'swing', slide_done);
-    }
-}
-
-function init_module_visibility() {
-    if (!BUGZILLA.user.settings.remember_collapsed)
-        return;
-    $('.module').each(function() {
-        var that = $(this);
-        var id = that.attr('id');
-        if (!id) return;
-        if (that.data('non-stick')) return;
-        var stored = localStorage.getItem(id + '.visibility');
-        if (stored) {
-            slide_module(that, stored, true);
-        }
-    });
-}
-
-$(function() {
-    'use strict';
-
-    // update relative dates
-    var relative_timer_duration = 60000;
-    var relative_timer_id = window.setInterval(relativeTimer, relative_timer_duration);
-    $(document).on('show.visibility', function() {
-        relative_timer_id = window.setInterval(relativeTimer, relative_timer_duration);
-    });
-    $(document).on('hide.visibility', function() {
-        window.clearInterval(relative_timer_id);
-    });
-
-    function relativeTimer() {
-        var now = Math.floor(new Date().getTime() / 1000);
-        $('.rel-time').each(function() {
-            $(this).text(timeAgo(now - $(this).data('time')));
-        });
-        $('.rel-time-title').each(function() {
-            $(this).attr('title', timeAgo(now - $(this).data('time')));
-        });
-    }
-
-    // all keywords for autocompletion (lazy-loaded on edit)
-    var keywords = [];
-
-    // products with descriptions (also lazy-loaded)
-    var products = [];
-
-    // restore edit mode after navigating back
-    function restoreEditMode() {
-        if (!$('#editing').val())
-            return;
-        $('.module')
-            .each(function() {
-                slide_module($(this), 'hide', true);
-            });
-        $($('#editing').val().split(' '))
-            .each(function() {
-                slide_module($('#' + this), 'show', true);
-            });
-        $('#mode-btn').click();
-        $('.save-btn').prop('disabled', false);
-        $('#editing').val('');
-    }
-
-    // expand/colapse module
-    $('.module-latch')
-        .click(function(event) {
-            event.preventDefault();
-            slide_module($(this).parents('.module'));
-        })
-        .keydown(function(event) {
-            // expand/colapse module with the enter or space key
-            if (event.keyCode === 13 || event.keyCode === 32) {
-                event.preventDefault();
-                slide_module($(this).parents('.module'));
-            }
-        });
-
-    // toggle obsolete attachments
-    $('#attachments-obsolete-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $(event.target).text(($('#attachments tr:hidden').length ? 'Hide' : 'Show') + ' Obsolete Attachments');
-            $('#attachments tr.attach-obsolete').toggle();
-        });
-
-    // url --> unsafe warning
-    $('.bug-url')
-        .click(function(event) {
-            var that = $(this);
-            event.stopPropagation();
-            if (!that.data('safe')) {
-                event.preventDefault();
-                if (confirm('This is considered an unsafe URL and could possibly be harmful. ' +
-                            'The full URL is:\n\n' + that.attr('href') + '\n\nContinue?'))
-                {
-                    try {
-                        window.open(that.attr('href'));
-                    } catch(ex) {
-                        alert('Malformed URL');
-                    }
-                }
-            }
-        });
-
-    // top btn
-    $('#top-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $.scrollTo($('#main-inner'));
-        });
-
-    // bottom btn
-    $('#bottom-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $.scrollTo($('#bottom-actions'));
-        });
-
-    // hide floating message when clicked
-    $('#floating-message')
-        .click(function(event) {
-            event.preventDefault();
-            $(this).hide();
-        });
-
-    // use non-native tooltips for relative/absolute times and bug summaries
-    $('.rel-time, .rel-time-title, .abs-time-title, .bz_bug_link, .tt').tooltip({
-        position: { my: "left top+8", at: "left bottom", collision: "flipfit" },
-        show: { effect: 'none' },
-        hide: { effect: 'none' }
-    });
-
-    // tooltips create a new ui-helper-hidden-accessible div each time a
-    // tooltip is shown.  this is never removed leading to memory leak and
-    // bloated dom.  http://bugs.jqueryui.com/ticket/10689
-    $('.ui-helper-hidden-accessible').remove();
-
-    // product/component info
-    $('.spin-toggle, #product-latch, #component-latch')
-        .click(function(event) {
-            spin_toggle(event);
-        }).keydown(function(event) {
-            // allow space or enter to toggle visibility
-            if (event.keyCode == 13 || event.keyCode == 32) {
-                spin_toggle(event);
-            }
-        });
-
-    function spin_toggle(event) {
-        event.preventDefault();
-        var type  = $(event.target).data('for');
-        var latch = $('#' + type + '-latch');
-        var name  = $('#' + type + '-name');
-        var info  = $('#' + type + '-info');
-        var label = latch.attr('aria-label');
-
-        if (latch.data('expanded')) {
-            label = label.replace(/^hide/, 'show');
-            latch.data('expanded', false).html('&#9656;');
-            latch.attr('aria-expanded', false);
-            info.hide();
-        }
-        else {
-            label = label.replace(/^show/, 'hide');
-            latch.data('expanded', true).html('&#9662;');
-            latch.attr('aria-expanded', true);
-            info.show();
-        }
-        latch.attr('aria-label', label);
-        name.attr('title', label);
-    }
-
-    // cc list
-
-    function ccListLoading() {
-        $('#cc-list').html(
-            `<img src="${BUGZILLA.config.basepath}extensions/BugModal/web/throbber.gif" width="16" height="11"> Loading...`
-        );
-    }
-
-    function ccListUpdate() {
-        bugzilla_ajax(
-            {
-                url: `${BUGZILLA.config.basepath}rest/bug_modal/cc/${BUGZILLA.bug_id}`
-            },
-            function(data) {
-                $('#cc-list').html(data.html);
-                $('#cc-latch').data('fetched', true);
-                $('#cc-list .cc-user').hover(
-                    function() {
-                        $('#ccr-' + $(this).data('n')).css('visibility', 'visible');
-                    },
-                    function() {
-                        $('#ccr-' + $(this).data('n')).css('visibility', 'hidden');
-                    }
-                );
-                $('#cc-list .cc-remove')
-                    .click(function(event) {
-                        event.preventDefault();
-                        $('#top-save-btn').show();
-                        var n = $(this).data('n');
-                        var ccu = $('#ccu-' + n);
-                        if (ccu.hasClass('cc-removed')) {
-                            ccu.removeClass('cc-removed');
-                            $('#cc-' + n).remove();
-                        }
-                        else {
-                            $('#removecc').val('on');
-                            ccu.addClass('cc-removed');
-                            $('<input>').attr({
-                                type: 'hidden',
-                                id: 'cc-' + n,
-                                value: $('#ccr-' + n).data('login'),
-                                name: 'cc'
-                            }).appendTo('#changeform');
-                        }
-                    });
-            }
-        );
-    }
-
-    if (BUGZILLA.user.id) {
-        $('#cc-summary').addClass('cc-loadable');
-        $('#cc-latch, #cc-summary')
-            .click(function(event) {
-                cc_toggle(event);
-            }).keydown(function(event) {
-                // allow space or enter to toggle visibility
-                if (event.keyCode == 13 || event.keyCode == 32) {
-                    cc_toggle(event);
-                }
-            });
-    }
-
-    function cc_toggle(event) {
-        event.preventDefault();
-        var latch = $('#cc-latch');
-        var label = latch.attr('aria-label');
-        if (latch.data('expanded')) {
-            label = label.replace(/^hide/, 'show');
-            latch.data('expanded', false).html('&#9656;');
-            $('#cc-list').hide();
-        }
-        else {
-            latch.data('expanded', true).html('&#9662;');
-            label = label.replace(/^show/, 'hide');
-            $('#cc-list').show();
-            if (!latch.data('fetched')) {
-                ccListLoading();
-                ccListUpdate();
-            }
-        }
-        latch.attr('aria-label', label);
-        $('#cc-summary').attr('aria-label', label);
-    }
-
-    // copy summary to clipboard
-
-    function clipboardSummary() {
-        return 'Bug ' + BUGZILLA.bug_id + ' - ' + $('#field-value-short_desc').text();
-    }
-
-    if ($('#copy-summary').length) {
-        var hasExecCopy = false;
-        try {
-            hasExecCopy = document.queryCommandSupported("copy");
-        } catch(ex) {
-            // ignore
-        }
-
-        if (hasExecCopy) {
-            $('#copy-summary')
-                .click(function() {
-                    // execCommand("copy") only works on selected text
-                    $('#clip-container').show();
-                    $('#clip').val(clipboardSummary()).select();
-                    document.execCommand("copy");
-                    $('#clip-container').hide();
-                });
-        }
-        else {
-            $('#copy-summary').hide();
-        }
-    }
-
-    // lightboxes
-    $('.lightbox, .comment-text .lightbox + span:first-of-type a:first-of-type')
-        .click(function(event) {
-            if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey)
-                return;
-            event.preventDefault();
-            lb_show(this);
-        });
-
-    // when copying the bug id and summary, reformat to remove \n and alias
-    $(document).on(
-        'copy', function(event) {
-            var selection = document.getSelection().toString().trim();
-            var match = selection.match(/^(Bug \d+)\s*\n(.+)$/) ||
-                selection.match(/^(Bug \d+)\s+\([^\)]+\)\s*\n(.+)$/);
-            if (match) {
-                var content = match[1] + ' - ' + match[2].trim();
-                if (event.originalEvent.clipboardData) {
-                    event.originalEvent.clipboardData.setData('text/plain', content);
-                }
-                else if (window.clipboardData) {
-                    window.clipboardData.setData('Text', content);
-                }
-                else {
-                    return;
-                }
-                event.preventDefault();
-            }
-        });
-
-    // action button actions
-
-    // reset
-    $('#action-reset')
-        .click(function(event) {
-            event.preventDefault();
-            var visible = $(this).data('modules');
-            $('.module-content').each(function() {
-                var content = $(this);
-                var moduleID = content.parent('.module').attr('id');
-                var isDefault = $.inArray(moduleID, visible) !== -1;
-                if (content.is(':visible') && !isDefault) {
-                    slide_module($('#' + moduleID), 'hide');
-                }
-                else if (content.is(':hidden') && isDefault) {
-                    slide_module($('#' + moduleID), 'show');
-                }
-            });
-        })
-        .data('modules', $('.module-content:visible').map(function() {
-            return $(this).parent('.module').attr('id');
-        }));
-
-    // expand all modules
-    $('#action-expand-all')
-        .click(function(event) {
-            event.preventDefault();
-            $('.module-content:hidden').each(function() {
-                slide_module($(this).parent('.module'));
-            });
-        });
-
-    // collapse all modules
-    $('#action-collapse-all')
-        .click(function(event) {
-            event.preventDefault();
-            $('.module-content:visible').each(function() {
-                slide_module($(this).parent('.module'));
-            });
-        });
-
-    // add comment menuitem, scroll the textarea into view
-    $('#action-add-comment, #add-comment-btn')
-        .click(function(event) {
-            event.preventDefault();
-            // focus first to grow the textarea, so we scroll to the correct location
-            $('#comment').focus();
-            $.scrollTo($('#bottom-save-btn'));
-        });
-
-    // last comment menuitem
-    $('#action-last-comment')
-        .click(function(event) {
-            event.preventDefault();
-            var id = $('.comment:last')[0].parentNode.id;
-            $.scrollTo(id);
-        });
-
-    // show bug history
-    $('#action-history')
-        .click(function(event) {
-            event.preventDefault();
-            document.location.href = `${BUGZILLA.config.basepath}show_activity.cgi?id=${BUGZILLA.bug_id}`;
-        });
-
-    // use scrollTo for in-page activity links
-    $('.activity-ref')
-        .click(function(event) {
-            event.preventDefault();
-            $.scrollTo($(this).attr('href').substr(1));
-        });
-
-    // Update readable bug status
-    var rbs = $("#readable-bug-status");
-    var rbs_text = bugzillaReadableStatus.readable(rbs.data('readable-bug-status'));
-    rbs.text(rbs_text);
-
-    if (BUGZILLA.user.id === 0) return;
-
-    //
-    // anything after this point is only executed for logged in users
-    //
-
-    // dirty field tracking
-    $('#changeform select').each(function() {
-        var that = $(this);
-        var dirty = $('#' + that.attr('id') + '-dirty');
-        if (!dirty) return;
-        var isMultiple = that.attr('multiple');
-
-        // store the option that had the selected attribute when we
-        // initially loaded
-        var value = that.find('option[selected]').map(function() { return this.value; }).toArray();
-        if (value.length === 0 && !that.attr('multiple'))
-            value = that.find('option:first').map(function() { return this.value; }).toArray();
-        that.data('preselected', value);
-
-        // if the user hasn't touched a field, override the browser's choice
-        // with bugzilla's
-        if (!dirty.val())
-            that.val(value);
-    });
-
-    // edit/save mode button
-    $('#mode-btn')
-        .click(function(event) {
-            event.preventDefault();
-
-            // hide buttons, old error messages
-            $('#mode-btn-readonly').hide();
-
-            // toggle visibility
-            $('.edit-hide').hide();
-            $('.edit-show').show();
-
-            // expand specific modules during the initial edit
-            if (!$('#editing').val())
-                slide_module($('#module-details'), 'show');
-
-            // if there's no current user-story, it's a better experience if it's editable by default
-            if ($('#cf_user_story').val() === '') {
-                $('#user-story-edit-btn').click();
-            }
-
-            // "loading.." ui
-            $('#mode-btn-loading').show();
-            $('#cancel-btn').prop('disabled', true);
-            $('#mode-btn').prop('disabled', true);
-
-            // load the missing select data
-            bugzilla_ajax(
-                {
-                    url: `${BUGZILLA.config.basepath}rest/bug_modal/edit/${BUGZILLA.bug_id}`
-                },
-                function(data) {
-                    $('#mode-btn').hide();
-
-                    // populate select menus
-                    $.each(data.options, function(key, value) {
-                        var el = $('#' + key);
-                        if (!el) return;
-                        var selected = el.val();
-                        el.empty();
-                        $(value).each(function(i, v) {
-                            el.append($('<option>', { value: v.name, text: v.name }));
-                        });
-                        el.val(selected);
-                        if (el.attr('multiple') && value.length < 5) {
-                            el.attr('size', value.length);
-                        }
-                    });
-
-                    // build our product description hash
-                    $.each(data.options.product, function() {
-                        products[this.name] = this.description;
-                    });
-
-                    // keywords is a multi-value autocomplete
-                    keywords = data.keywords;
-                    $('#keywords')
-                        .devbridgeAutocomplete({
-                            appendTo: $('#main-inner'),
-                            forceFixPosition: true,
-                            lookup: function(query, done) {
-                                query = query.toLowerCase();
-                                var matchStart =
-                                    $.grep(keywords, function(keyword) {
-                                        return keyword.toLowerCase().substr(0, query.length) === query;
-                                    });
-                                var matchSub =
-                                    $.grep(keywords, function(keyword) {
-                                        return keyword.toLowerCase().indexOf(query) !== -1 &&
-                                            $.inArray(keyword, matchStart) === -1;
-                                    });
-                                var suggestions =
-                                    $.map($.merge(matchStart, matchSub), function(suggestion) {
-                                        return { value: suggestion };
-                                    });
-                                done({ suggestions: suggestions });
-                            },
-                            tabDisabled: true,
-                            delimiter: /,\s*/,
-                            minChars: 0,
-                            autoSelectFirst: false,
-                            triggerSelectOnValidInput: false,
-                            formatResult: function(suggestion, currentValue) {
-                                // disable <b> wrapping of matched substring
-                                return suggestion.value.htmlEncode();
-                            },
-                            onSearchStart: function(params) {
-                                var that = $(this);
-                                // adding spaces shouldn't initiate a new search
-                                var parts = that.val().split(/,\s*/);
-                                var query = parts[parts.length - 1];
-                                return query === $.trim(query);
-                            },
-                            onSelect: function() {
-                                this.value = this.value + ', ';
-                                this.focus();
-                            }
-                        })
-                        .addClass('bz_autocomplete');
-
-                    $('#cancel-btn').prop('disabled', false);
-                    $('#top-save-btn').show();
-                    $('#cancel-btn').show();
-                    $('#commit-btn').show();
-                },
-                function() {
-                    $('#mode-btn-readonly').show();
-                    $('#mode-btn-loading').hide();
-                    $('#mode-btn').prop('disabled', false);
-                    $('#mode-btn').show();
-                    $('#cancel-btn').hide();
-                    $('#commit-btn').hide();
-
-                    $('.edit-show').hide();
-                    $('.edit-hide').show();
-                }
-            );
-        });
-    $('#mode-btn').prop('disabled', false);
-
-    // disable the save buttons while posting
-    $('.save-btn')
-        .click(function(event) {
-            event.preventDefault();
-            if (document.changeform.checkValidity && !document.changeform.checkValidity())
-                return;
-            $('.save-btn').attr('disabled', true);
-            this.form.submit();
-
-            // remember expanded modules
-            $('#editing').val(
-                $('.module .module-content:visible')
-                    .parent()
-                    .map(function(el) { return $(this).attr('id'); })
-                    .toArray()
-                    .join(' ')
-            );
-        })
-        .attr('disabled', false);
-
-    // cc toggle (follow/stop following)
-    $('#cc-btn')
-        .click(function(event) {
-            event.preventDefault();
-            var is_cced = $(event.target).data('is-cced') == '1';
-
-            var cc_change;
-            var cc_count = $('#cc-summary').data('count');
-            if (is_cced) {
-                cc_change = { remove: [ BUGZILLA.user.login ] };
-                cc_count--;
-                $('#cc-btn')
-                    .text('Follow')
-                    .data('is-cced', '0')
-                    .prop('disabled', true);
-            }
-            else {
-                cc_change = { add: [ BUGZILLA.user.login ] };
-                cc_count++;
-                $('#cc-btn')
-                    .text('Stop Following')
-                    .data('is-cced', '1')
-                    .prop('disabled', true);
-            }
-            is_cced = !is_cced;
-
-            // update visible count
-            $('#cc-summary').data('count', cc_count);
-            if (cc_count == 1) {
-                $('#cc-summary').text(is_cced ? 'Just you' : '1 person');
-            }
-            else {
-                $('#cc-summary').text(cc_count + ' people');
-            }
-
-            // clear/update user list
-            $('#cc-latch').data('fetched', false);
-            if ($('#cc-latch').data('expanded'))
-                ccListLoading();
-
-            // show message
-            $('#floating-message-text')
-                .text(is_cced ? 'You are now following this bug' : 'You are no longer following this bug');
-            $('#floating-message')
-                .fadeIn(250)
-                .delay(2500)
-                .fadeOut();
-
-            // show/hide "add me to the cc list"
-            if (is_cced) {
-                $('#add-self-cc-container').hide();
-                $('#add-self-cc').attr('disabled', true);
-            }
-            else {
-                $('#add-self-cc-container').show();
-                $('#add-self-cc').attr('disabled', false);
-            }
-
-            bugzilla_ajax(
-                {
-                    url: `${BUGZILLA.config.basepath}rest/bug/${BUGZILLA.bug_id}`,
-                    type: 'PUT',
-                    data: JSON.stringify({ cc: cc_change })
-                },
-                function(data) {
-                    $('#cc-btn').prop('disabled', false);
-                    if (!(data.bugs[0].changes && data.bugs[0].changes.cc))
-                        return;
-                    if (data.bugs[0].changes.cc.added == BUGZILLA.user.login) {
-                        $('#cc-btn')
-                            .text('Stop Following')
-                            .data('is-cced', '1');
-                    }
-                    else if (data.bugs[0].changes.cc.removed == BUGZILLA.user.login) {
-                        $('#cc-btn')
-                            .text('Follow')
-                            .data('is-cced', '0');
-                    }
-                    if ($('#cc-latch').data('expanded'))
-                        ccListUpdate();
-                },
-                function(message) {
-                    $('#cc-btn').prop('disabled', false);
-                    if ($('#cc-latch').data('expanded'))
-                        ccListUpdate();
-                }
-            );
-
-        });
-
-    // cancel button, reset the ui back to read-only state
-    // for now, do this with a redirect to self
-    // ideally this should revert all field back to their initially loaded
-    // values and switch the ui back to read-only mode without the redirect
-    $('#cancel-btn')
-        .click(function(event) {
-            event.preventDefault();
-            window.location.replace($('#this-bug').attr('href'));
-        });
-
-    // Open help page
-    $('#help-btn')
-        .click(function(event) {
-            event.preventDefault();
-            window.open("https://wiki.mozilla.org/BMO/UserGuide", "_blank");
-        });
-
-    // needinfo in people section -> scroll to near-comment ui
-    $('#needinfo-scroll')
-        .click(function(event) {
-            event.preventDefault();
-            $.scrollTo($('#needinfo_container'), function() { $('#needinfo_role').focus(); });
-        });
-
-    // knob
-    $('#bug_status, #bottom-bug_status')
-        .change(function(event) {
-            var that = $(this);
-            var val = that.val();
-            var other = $(that.attr('id') == 'bug_status' ? '#bottom-bug_status' : '#bug_status');
-            other.val(val);
-            if (val == "RESOLVED" || val == "VERIFIED") {
-                $('#resolution, #bottom-resolution').change().show();
-            }
-            else {
-                $('#resolution, #bottom-resolution').hide();
-                $('#duplicate-container, #bottom-duplicate-container').hide();
-                $('#mark-as-dup-btn, #bottom-mark-as-dup-btn').show();
-            }
-        })
-        .change();
-    $('#resolution, #bottom-resolution')
-        .change(function(event) {
-            var that = $(this);
-            var val = that.val();
-            var other = $(that.attr('id') == 'resolution' ? '#bottom-resolution' : '#resolution');
-            other.val(val);
-            var bug_status = $('#bug_status').val();
-            if ((bug_status == "RESOLVED" || bug_status == "VERIFIED") && val == "DUPLICATE") {
-                $('#duplicate-container, #bottom-duplicate-container').show();
-                $('#mark-as-dup-btn, #bottom-mark-as-dup-btn').hide();
-                $(that.attr('id') == 'resolution' ? '#dup_id' : '#bottom-dup_id').focus();
-            }
-            else {
-                $('#duplicate-container, #bottom-duplicate-container').hide();
-                $('#mark-as-dup-btn, #bottom-mark-as-dup-btn').show();
-            }
-        })
-        .change();
-    $('#mark-as-dup-btn, #bottom-mark-as-dup-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $('#bug_status').val('RESOLVED').change();
-            $('#resolution').val('DUPLICATE').change();
-            $($(this).attr('id') == 'mark-as-dup-btn' ? '#dup_id' : '#bottom-dup_id').focus();
-        });
-    $('#dup_id, #bottom-dup_id')
-        .change(function(event) {
-            var that = $(this);
-            var other = $(that.attr('id') == 'dup_id' ? '#bottom-dup_id' : '#dup_id');
-            other.val(that.val());
-        });
-
-    // add see-also button
-    $('.bug-urls-btn')
-        .click(function(event) {
-            event.preventDefault();
-            var name = event.target.id.replace(/-btn$/, '');
-            $(event.target).hide();
-            $('#' + name).show().focus();
-        });
-
-    // bug flag value <select>
-    $('.bug-flag')
-        .change(function(event) {
-            var target = $(event.target);
-            var id = target.prop('id').replace(/^flag(_type)?-(\d+)/, "#requestee$1-$2");
-            if (target.val() == '?') {
-                $(id + '-container').show();
-                $(id).focus().select();
-            }
-            else {
-                $(id + '-container').hide();
-            }
-        });
-
-    // tracking flags
-    $('.tracking-flags select')
-        .change(function(event) {
-            tracking_flag_change(event.target);
-        });
-
-    // take button
-    $('.take-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $('#field-status-view').hide();
-            $('#field-status-edit').show();
-            if ($('#bug_status option').filter(function() { return $(this).val() == 'ASSIGNED'; }).length) {
-                $('#assigned-container').show();
-            }
-            var field = $(this).data('field');
-            $('#field-' + field + '.edit-hide').hide();
-            $('#field-' + field + '.edit-show').show();
-            $('#' + field).val(BUGZILLA.user.login).focus().select();
-            $('#top-save-btn').show();
-            if ($('#set-default-assignee').is(':checked')) {
-                $('#set-default-assignee').click();
-            }
-        });
-
-    // mark as assigned
-    $('#mark-as-assigned-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $('#bug_status').val('ASSIGNED').change();
-        });
-
-    // reply button
-    $('.reply-btn')
-        .click(function(event) {
-            event.preventDefault();
-            var comment_id = $(event.target).data('reply-id');
-            var comment_author = $(event.target).data('reply-name');
-
-            var prefix = "(In reply to " + comment_author + " from comment #" + comment_id + ")\n";
-            var reply_text = "";
-            if (BUGZILLA.user.settings.quote_replies == 'quoted_reply') {
-                var text = $('#ct-' + comment_id).text();
-                reply_text = prefix + wrapReplyText(text);
-            }
-            else if (BUGZILLA.user.settings.quote_replies == 'simply_reply') {
-                reply_text = prefix;
-            }
-
-            // quoting a private comment, check the 'private' cb
-            $('#add-comment-private-cb').prop('checked',
-                $('#add-comment-private-cb:checked').length || $('#is-private-' + comment_id + ':checked').length);
-
-            // remove embedded links to attachment details
-            reply_text = reply_text.replace(/(attachment\s+\d+)(\s+\[[^\[\n]+\])+/gi, '$1');
-
-            $.scrollTo($('#comment'), function() {
-                if ($('#comment').val() != reply_text) {
-                    $('#comment').val($('#comment').val() + reply_text);
-                }
-
-                $('#comment').focus();
-            });
-        });
-
-    // add comment --> private
-    $('#add-comment-private-cb')
-        .click(function(event) {
-            if ($(event.target).prop('checked')) {
-                $('#comment').addClass('private-comment');
-            }
-            else {
-                $('#comment').removeClass('private-comment');
-            }
-        });
-
-    // show "save changes" button if there are any immediately editable elements
-    if ($('.module select:visible').length || $('.module input:visible').length) {
-        $('#top-save-btn').show();
-    }
-
-    // status/resolve as buttons
-    $('.resolution-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $('#field-status-view').hide();
-            $('#field-status-edit').show();
-            $('#field-status-edit .name').show();
-            $('#bug_status').val('RESOLVED').change();
-            $('#bottom-resolution').val($(event.target).text()).change();
-            $('#top-save-btn').show();
-            $('#resolve-as').hide();
-            $('#bottom-status').show();
-            $('#bottom-dup_id').focus();
-        });
-    $('.status-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $('#field-status-view').hide();
-            $('#field-status-edit').show();
-            $('#bug_status').val($(event.target).data('status')).change();
-            $('#top-save-btn').show();
-            $('#resolve-as').hide();
-            $('#bottom-status').show();
-        });
-
-    // vote button
-    // ideally this should function like CC and xhr it, but that would require
-    // a rewrite of the voting extension
-    $('#vote-btn')
-        .click(function(event) {
-            event.preventDefault();
-            window.location.href = `${BUGZILLA.config.basepath}page.cgi?` +
-                                   `id=voting/user.html&bug_id=${BUGZILLA.bug_id}#vote_${BUGZILLA.bug_id}`;
-        });
-
-    // user-story
-    $('#user-story-edit-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $('#user-story').hide();
-            $('#user-story-edit-btn').hide();
-            $('#top-save-btn').show();
-            $('#cf_user_story').show();
-            // don't focus the user-story field when restoring edit mode after navigation
-            if ($('#editing').val() === '')
-                $('#cf_user_story').focus().select();
-        });
-    $('#user-story-reply-btn')
-        .click(function(event) {
-            event.preventDefault();
-            var text = "(Commenting on User Story)\n" + wrapReplyText($('#cf_user_story').val());
-            var current = $('#comment').val();
-            if (current != text) {
-                $('#comment').val(current + text);
-                $('#comment').focus();
-                $.scrollTo($('#bottom-save-btn'));
-            }
-        });
-
-    // cab review 'gate'
-    $('#cab-review-gate-close')
-        .click(function(event) {
-            event.preventDefault();
-            $('#cab-review-gate').hide();
-            $('#cab-review-edit').show();
-        });
-
-    // custom textarea fields
-    $('.edit-textarea-btn')
-        .click(function(event) {
-            event.preventDefault();
-            var id = $(event.target).attr('id').replace(/-edit$/, '');
-            $(event.target).hide();
-            $('#' + id + '-view').hide();
-            $('#' + id).show().focus().select();
-        });
-
-    // date/datetime pickers
-    $('.cf_datetime').datetimepicker({
-        format: 'Y-m-d G:i:s',
-        datepicker: true,
-        timepicker: true,
-        scrollInput: false,
-        lazyInit: false, // there's a bug which prevents img->show from working with lazy:true
-        closeOnDateSelect: true
-    });
-    $('.cf_date').datetimepicker({
-        format: 'Y-m-d',
-        datepicker: true,
-        timepicker: false,
-        scrollInput: false,
-        lazyInit: false,
-        closeOnDateSelect: true
-    });
-    $('.cf_datetime-img, .cf_date-img')
-        .click(function(event) {
-            var id = $(event.target).attr('id').replace(/-img$/, '');
-            $('#' + id).datetimepicker('show');
-        });
-
-    // timetracking
-    $('#work_time').change(function() {
-        // subtracts time spent from remaining time
-        // prevent negative values if work_time > fRemainingTime
-        var new_time = Math.max(BUGZILLA.remaining_time - $('#work_time').val(), 0.0);
-        // get upto 2 decimal places
-        $('#remaining_time').val(Math.round((new_time * 100)/100).toFixed(1));
-    });
-    $('#remaining_time').change(function() {
-        // if the remaining time is changed manually, update BUGZILLA.remaining_time
-        BUGZILLA.remaining_time = $('#remaining_time').val();
-    });
-
-    // "reset to default" checkboxes
-    $('#product, #component')
-        .change(function(event) {
-            $('.set-default-container').show();
-            $('#set-default-assignee').prop('checked', $('#assigned_to').val() == BUGZILLA.default_assignee).change();
-            $('#set-default-qa-contact').prop('checked', $('#qa_contact').val() == BUGZILLA.default_qa_contact).change();
-            slide_module($('#module-people'), 'show');
-        });
-    $('.set-default')
-        .change(function(event) {
-            var cb = $(event.target);
-            var input = $('#' + cb.data('for'));
-            input.attr('disabled', cb.prop('checked'));
-        })
-        .change();
-
-    // hotkeys
-    $(window)
-        .keydown(function(event) {
-            if (!(event.ctrlKey || event.metaKey))
-                return;
-            switch(String.fromCharCode(event.which).toLowerCase()) {
-                // ctrl+e or meta+e = enter edit mode
-                case 'e':
-                    if (event.shiftKey)
-                        return;
-                    // don't conflict with text input shortcut
-                    if (document.activeElement.nodeNode == 'INPUT' || document.activeElement.nodeName == 'TEXTAREA')
-                        return;
-                    if ($('#cancel-btn:visible').length === 0) {
-                        event.preventDefault();
-                        $('#mode-btn').click();
-                    }
-                    break;
-
-                // ctrl+shift+p = toggle comment preview
-                case 'p':
-                    if (event.metaKey || !event.shiftKey)
-                        return;
-                    if (document.activeElement.id == 'comment') {
-                        event.preventDefault();
-                        $('#comment-preview-tab').click();
-                    }
-                    else if ($('#comment-preview:visible').length !== 0) {
-                        event.preventDefault();
-                        $('#comment-edit-tab').click();
-                    }
-                    break;
-            }
-        });
-
-    // add cc button
-    $('#add-cc-btn')
-        .click(function(event) {
-            event.preventDefault();
-            $('#add-cc-btn').hide();
-            $('#add-cc-container').show();
-            $('#top-save-btn').show();
-            $('#add-cc').focus();
-        });
-
-    // Add user to cc list if they mark the bug as security sensitive
-    $('.restrict_sensitive')
-        .change(function(event) {
-            $('#add-self-cc:not(:checked)').attr('checked', true);
-        });
-
-    // product change --> load components, versions, milestones, groups
-    $('#product').data('default', $('#product').val());
-    $('#component, #version, #target_milestone').each(function() {
-        $(this).data('default', $(this).val());
-    });
-
-    // product/component search
-    $('#product-search')
-        .click(function(event) {
-            event.preventDefault();
-            $('#product').hide();
-            $('#product-search').hide();
-            $('#product-search-cancel').show();
-            $('.pcs-form').show();
-            $('#pcs').val('').focus();
-        });
-    $('#product-search-cancel')
-        .click(function(event) {
-            event.preventDefault();
-            $('#product-search-error').hide();
-            $('.pcs-form').hide();
-            $('#product').show();
-            $('#product-search-cancel').hide();
-            $('#product-search').show();
-        });
-    $('#pcs')
-        .devbridgeAutocomplete('setOptions', {
-            onSelect: function(suggestion) {
-                $('#product-search-error').hide();
-                $('.pcs-form').hide();
-                $('#product-search-cancel').hide();
-                $('#product-search').show();
-                if ($('#product').val() != suggestion.data.product) {
-                    $('#component').data('preselect', suggestion.data.component);
-                    $('#product').val(suggestion.data.product).change();
-                }
-                else {
-                    $('#component').val(suggestion.data.component);
-                }
-                $('#product').show();
-            }
-        });
-    $(document)
-        .on('pcs:search', function(event) {
-            $('#product-search-error').hide();
-        })
-        .on('pcs:results', function(event) {
-            $('#product-search-error').hide();
-        })
-        .on('pcs:no_results', function(event) {
-            $('#product-search-error')
-                .prop('title', 'No components found')
-                .show();
-        })
-        .on('pcs:too_many_results', function(event, el) {
-            $('#product-search-error')
-                .prop('title', 'Results limited to ' + el.data('max_results') + ' components')
-                .show();
-        })
-        .on('pcs:error', function(event, message) {
-            $('#product-search-error')
-                .prop('title', message)
-                .show();
-        });
-
-    // comment preview
-    var last_comment_text = '';
-    $('#comment-tabs li').click(function() {
-        var that = $(this);
-        if (that.attr('aria-selected') === 'true')
-            return;
-
-        // ensure preview's height matches the comment
-        var comment = $('#comment');
-        var preview = $('#comment-preview');
-        var comment_height = comment[0].offsetHeight;
-
-        // change tabs
-        $('#comment-tabs li').attr({ tabindex: -1, 'aria-selected': false });
-        $('.comment-tabpanel').hide();
-        that.attr({ tabindex: 0, 'aria-selected': true });
-        var tabpanel = $('#' + that.attr('aria-controls')).show();
-        var focus = that.data('focus');
-        if (focus !== '') {
-            $('#' + focus).focus();
-        }
-
-        // update preview
-        preview.css('height', comment_height + 'px');
-        if (tabpanel.attr('id') != 'comment-preview-tabpanel' || last_comment_text == comment.val())
-            return;
-        $('#preview-throbber').show();
-        preview.html('');
-        bugzilla_ajax(
-            {
-                url: `${BUGZILLA.config.basepath}rest/bug/comment/render`,
-                type: 'POST',
-                data: { text: comment.val() },
-                hideError: true
-            },
-            function(data) {
-                $('#preview-throbber').hide();
-                preview.html(data.html);
-            },
-            function(message) {
-                $('#preview-throbber').hide();
-                var container = $('<div/>');
-                container.addClass('preview-error');
-                container.text(message);
-                preview.html(container);
-            }
-        );
-        last_comment_text = comment.val();
-    }).keydown(function(event) {
-        var that = $(this);
-        var tabs = $('#comment-tabs li');
-        var target;
-
-        // enable keyboard navigation on tabs
-        switch (event.keyCode) {
-            case 35: // End
-                target = tabs.last();
-                break;
-            case 36: // Home
-                target = tabs.first();
-                break;
-            case 37: // Left arrow
-                target = that.prev('[role="tab"]');
-                break;
-            case 39: // Right arrow
-                target = that.next('[role="tab"]');
-                break;
-        }
-
-        if (target && target.length) {
-            event.preventDefault();
-            target.click().focus();
-        }
-    });
-
-    // dirty field tracking
-    $('#changeform select')
-        .change(function() {
-            var that = $(this);
-            var dirty = $('#' + that.attr('id') + '-dirty');
-            if (!dirty) return;
-            if (that.attr('multiple')) {
-                var preselected = that.data('preselected');
-                var selected = that.val();
-                var isDirty = preselected.length != selected.length;
-                if (!isDirty) {
-                    for (var i = 0, l = preselected.length; i < l; i++) {
-                        if (selected[i] != preselected[i]) {
-                            isDirty = true;
-                            break;
-                        }
-                    }
-                }
-                dirty.val(isDirty ? '1' : '');
-            }
-            else {
-                dirty.val(that.val() === that.data('preselected')[0] ? '' : '1');
-            }
-        });
-
-    // finally switch to edit mode if we navigate back to a page that was editing
-    $(window).on('pageshow', restoreEditMode);
-    restoreEditMode();
-});
-
-function confirmUnsafeURL(url) {
-    return confirm(
-        'This is considered an unsafe URL and could possibly be harmful.\n' +
-        'The full URL is:\n\n' + url + '\n\nContinue?');
-}
-
-// fix url after bug creation/update
-if (history && history.replaceState) {
-    var href = document.location.href;
-    if (!href.match(/new-bug/) && !href.match(/show_bug\.cgi/)) {
-        history.replaceState(null, BUGZILLA.bug_title, `${BUGZILLA.config.basepath}show_bug.cgi?id=${BUGZILLA.bug_id}`);
-        document.title = BUGZILLA.bug_title;
-    }
-    if (href.match(/show_bug\.cgi\?.*list_id=/)) {
-        href = href.replace(/[\?&]+list_id=(\d+|cookie)/, '');
-        history.replaceState(null, BUGZILLA.bug_title, href);
-    }
-}
-
-// ajax wrapper, to simplify error handling and auth
-function bugzilla_ajax(request, done_fn, error_fn) {
-    $('#xhr-error').hide('');
-    $('#xhr-error').html('');
-    request.url += (request.url.match('\\?') ? '&' : '?') +
-        'Bugzilla_api_token=' + encodeURIComponent(BUGZILLA.api_token);
-    if (request.type != 'GET') {
-        request.contentType = 'application/json';
-        request.processData = false;
-        if (request.data && request.data.constructor === Object) {
-            request.data = JSON.stringify(request.data);
-        }
-    }
-    return $.ajax(request)
-        .done(function(data) {
-            if (data.error) {
-                if (!request.hideError) {
-                    $('#xhr-error').html(data.message);
-                    $('#xhr-error').show('fast');
-                }
-                if (error_fn)
-                    error_fn(data.message);
-            }
-            else if (done_fn) {
-                done_fn(data);
-            }
-        })
-        .fail(function(data) {
-            if (data.statusText === 'abort')
-                return;
-            var message = data.responseJSON ? data.responseJSON.message : 'Unexpected Error'; // all errors are unexpected :)
-            if (!request.hideError) {
-                $('#xhr-error').html(message);
-                $('#xhr-error').show('fast');
-            }
-            if (error_fn)
-                error_fn(message);
-        });
-}
-
-// lightbox
-
-function lb_show(el) {
-    $(window).trigger('close');
-    $(document).bind('keyup.lb', function(event) {
-        if (event.keyCode == 27) {
-            lb_close(event);
-        }
-    });
-    var overlay = $('<div>')
-        .prop('id', 'lb_overlay')
-        .css({ opacity: 0 })
-        .appendTo('body');
-    var overlay2 = $('<div>')
-        .prop('id', 'lb_overlay2')
-        .css({ top: $(window).scrollTop() + 5 })
-        .appendTo('body');
-    var title = $('<div>')
-        .prop('id', 'lb_text')
-        .appendTo(overlay2);
-    var img = $('<img>')
-        .prop('id', 'lb_img')
-        .prop('src', el.href)
-        .prop('alt', 'Loading...')
-        .css({ opacity: 0 })
-        .appendTo(overlay2)
-        .click(function(event) {
-            event.stopPropagation();
-            window.location.href = el.href;
-        });
-    var close_btn = $('<button>')
-        .prop('id', 'lb_close_btn')
-        .prop('type', 'button')
-        .addClass('minor')
-        .text('Close')
-        .appendTo(overlay2);
-    title.text(el.title);
-    overlay.add(overlay2).click(lb_close);
-    img.add(overlay).animate({ opacity: 1 }, 200);
-}
-
-function lb_close(event) {
-    event.preventDefault();
-    $(document).unbind('keyup.lb');
-    $('#lb_overlay, #lb_overlay2, #lb_close_btn, #lb_img, #lb_text').remove();
-}
-
-$(function() {
-    $("button.button-link").on("click", function (event) {
-        event.preventDefault();
-        window.location = $(this).data("href");
-    });
-});
-
-// extensions
-
-(function($) {
-    $.extend({
-        // Case insensative $.inArray (http://api.jquery.com/jquery.inarray/)
-        // $.inArrayIn(value, array [, fromIndex])
-        //  value (type: String)
-        //    The value to search for
-        //  array (type: Array)
-        //    An array through which to search.
-        //  fromIndex (type: Number)
-        //    The index of the array at which to begin the search.
-        //    The default is 0, which will search the whole array.
-        inArrayIn: function(elem, arr, i) {
-            // not looking for a string anyways, use default method
-            if (typeof elem !== 'string') {
-                return $.inArray.apply(this, arguments);
-            }
-            // confirm array is populated
-            if (arr) {
-                var len = arr.length;
-                i = i ? (i < 0 ? Math.max(0, len + i) : i) : 0;
-                elem = elem.toLowerCase();
-                for (; i < len; i++) {
-                    if (i in arr && arr[i].toLowerCase() == elem) {
-                        return i;
-                    }
-                }
-            }
-            // stick with inArray/indexOf and return -1 on no match
-            return -1;
-        },
-
-        // Bring an element into view, leaving space for the outline. If passed
-        // a string, it will be treated as an id - the page will scroll and the
-        // url will be added to the browser's history. If passed an element, no
-        // entry will be added to the history.
-        scrollTo: function(target, complete) {
-            let $target;
-
-            if (typeof target === 'string') {
-                $target = document.getElementById(target);
-                window.location.hash = target;
-            } else {
-                // Use raw DOM node instead of jQuery
-                $target = target.get(0);
-            }
-
-            if ($target) {
-                scroll_element_into_view($target, complete);
-            }
-        }
-
-    });
-})(jQuery);
diff --git a/extensions/BugModal/web/new_bug.css b/extensions/BugModal/web/new_bug.css
deleted file mode 100644 (file)
index 6fe9fa2..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This Source Code Form is "Incompatible With Secondary Licenses", as
- * defined by the Mozilla Public License, v. 2.0. */
-
-#bugzilla-body {
-  max-width: initial;
-  min-width: initial;
-  width: initial;
-}
-
-#create-btn {
-  margin: 5px 0 5px 0;
-  float: right;
-}
-
-#reset {
-  padding: 1.5px 8px;
-}
-
-.new-bug-container {
-  display: flex;
-  flex-direction: column;
-  padding: 5px;
-}
-
-.new-bug {
-  display: flex;
-  flex-flow: row wrap;
-  padding: 5px;
-}
-
-.new-bug-split-1 {
-  flex: 2 1 30px;
-  margin: 5px;
-}
-
-.new-bug-split-2 {
-  flex: 4 1 30px;
-  margin: 5px;
-}
-
-.new-bug-title {
-  flex: 6 1 30px;
-  margin: 5px;
-}
-
-.file-container {
-  padding: 8px;
-}
-
-.module-content {
-  padding: 8px;
-}
-
-.module .field {
-  width: auto;
-}
diff --git a/extensions/BugModal/web/new_bug.js b/extensions/BugModal/web/new_bug.js
deleted file mode 100644 (file)
index 3f4ac0e..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-var initial = {}
-var comp_desc = {}
-var comp_default_bug_type = {}
-var product_name = '';
-
-var component_load = function(product) {
-    $('#product-throbber').show();
-    $('#component').attr('disabled', true);
-    bugzilla_ajax(
-        {
-            url: `${BUGZILLA.config.basepath}rest/bug_modal/product_info?product=${encodeURIComponent(product)}`
-        },
-        function(data) {
-            $('#product-throbber').hide();
-            $('#component').attr('disabled', false);
-            $('#comp_desc').text('Select a component to read its description.');
-            var selectize = $("#component")[0].selectize;
-            selectize.clear();
-            selectize.clearOptions();
-            selectize.load(function(callback) {
-                callback(data.components)
-            });
-
-            for (const comp of data.components) {
-                comp_desc[comp.name] = comp.description;
-                comp_default_bug_type[comp.name] = comp.default_bug_type;
-            }
-
-            selectize = $("#version")[0].selectize;
-            selectize.clear();
-            selectize.clearOptions();
-            selectize.load(function(callback) {
-                callback(data.versions);
-            });
-        },
-        function() {
-            alert("Network issues. Please refresh the page and try again");
-        }
-    );
-}
-
-$(document).ready(function() {
-    var product_name = window.location.hash? window.location.hash.substr(1) : null;
-    bugzilla_ajax(
-            {
-                url: `${BUGZILLA.config.basepath}rest/bug_modal/initial_field_values`
-            },
-            function(data) {
-                initial = data
-                if (product_name) {
-                    for (product in initial.products) {
-                        if (initial.products[product].name.toLowerCase() === product_name.toLowerCase()) {
-                            $("#product_wrap").html('<input name="product" type="hidden" id="product"><h3 style="padding-left:20px;" id="product_name_heading">Hello</h3>')
-                            $("#product").val(initial.products[product].name);
-                            $("#product_name_heading").text(initial.products[product].name);
-                            component_load(initial.products[product].name);
-                            return;
-                        }
-                    }
-                }
-                var $product_sel = $("#product").selectize({
-                    valueField: 'name',
-                    labelField: 'name',
-                    placeholder: 'Product',
-                    searchField: 'name',
-                    options: [],
-                    preload: true,
-                    create: false,
-                    load: function(query, callback) {
-                        callback(initial.products);
-                    }
-                });
-
-                $("#bug_type").selectize({
-                    valueField: 'value',
-                    labelField: 'label',
-                    placeholder: 'Type',
-                    searchField: 'value',
-                    options: initial.default_bug_types.map(type => ({ label: type, value: type })),
-                    preload: true,
-                    create: false,
-                });
-            },
-            function() {
-                alert("Network issues. Please refresh the page and try again");
-            }
-        );
-    var component_sel = $("#component").selectize({
-        valueField: 'name',
-        labelField: 'name',
-        placeholder: 'Component',
-        searchField: 'name',
-        options: [],
-    });
-
-    var version_sel = $("#version").selectize({
-        valueField: 'name',
-        labelField: 'name',
-        placeholder: 'Version',
-        searchField: 'name',
-        options: [],
-    });
-
-    var keywords_sel = $("#keywords").selectize({
-        delimiter: ', ',
-        valueField: 'name',
-        labelField: 'name',
-        placeholder: 'Keywords',
-        searchField: 'name',
-        options: [],
-        preload: true,
-        create: false,
-        load: function(query, callback) {
-            callback(initial.keywords);
-        }
-    });
-
-    $("#product").on("change", function () {
-        component_load($("#product").val());
-    });
-
-    component_sel.on("change", function () {
-        const name = $("#component")[0].selectize.getValue();
-        $('#comp_desc').text(comp_desc[name]);
-        $("#bug_type")[0].selectize.setValue(comp_default_bug_type[name]);
-    });
-
-    $('.create-btn')
-        .click(function(event) {
-            event.preventDefault();
-            if (document.newbugform.checkValidity && !document.newbugform.checkValidity()) {
-                alert("Required fields are empty");
-                return;
-            }
-            else {
-                this.form.submit()
-            }
-        });
-
-    $('#data').on("change", function () {
-        if (!$('#data').val()) {
-            return
-        } else {
-            document.getElementById('reset').style.display = "inline-block";
-            $("#description").prop('required',true);
-        }
-    });
-    $('#reset')
-        .click(function(event) {
-            event.preventDefault();
-            document.getElementById('data').value = "";
-            document.getElementById('reset').style.display = "none";
-            $("#description").prop('required',false);
-        });
-    $('#comment-edit-tab')
-        .click(function() {
-            $('#comment-preview-tab').css("background-color", "#fff");
-            $(this).css("background-color", "#eee");
-        });
-    $('#comment-preview-tab')
-        .click(function() {
-            $('#comment-edit-tab').css("background-color", "#fff");
-            $(this).css("background-color", "#eee");
-        });
-    $('#comment-edit-tab').click();
-    window.onhashchange = function() {
-        location.reload();
-    }
-});
index 42731912a47384f24e4636ae81fab308e81735b0..e4d9092c179e9957db1e92082fba804380dfdeb9 100644 (file)
@@ -148,6 +148,15 @@ $(function() {
             });
         })
         .data('counter', 0);
+
+    const $input = document.querySelector('.prod_comp_search');
+
+    // Check for product name passed with the URL hash, which was supported by the experimental new-bug page now
+    // redirected to enter_bug.cgi, e.g. https://bugzilla.mozilla.org/new-bug#Firefox
+    if ($input && location.pathname === `${BUGZILLA.config.basepath}enter_bug.cgi` && location.hash) {
+        $input.value = location.hash.substr(1);
+        $input.dispatchEvent(new InputEvent('input'));
+    }
 });
 
 /**
diff --git a/js/jquery/plugins/selectize/selectize-min.js b/js/jquery/plugins/selectize/selectize-min.js
deleted file mode 100644 (file)
index d11be61..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/*! selectize.js - v0.12.4 | https://github.com/selectize/selectize.js | Apache License (v2) */
-!function(a,b){"function"==typeof define&&define.amd?define("sifter",b):"object"==typeof exports?module.exports=b():a.Sifter=b()}(this,function(){var a=function(a,b){this.items=a,this.settings=b||{diacritics:!0}};a.prototype.tokenize=function(a){if(a=e(String(a||"").toLowerCase()),!a||!a.length)return[];var b,c,d,g,i=[],j=a.split(/ +/);for(b=0,c=j.length;b<c;b++){if(d=f(j[b]),this.settings.diacritics)for(g in h)h.hasOwnProperty(g)&&(d=d.replace(new RegExp(g,"g"),h[g]));i.push({string:j[b],regex:new RegExp(d,"i")})}return i},a.prototype.iterator=function(a,b){var c;c=g(a)?Array.prototype.forEach||function(a){for(var b=0,c=this.length;b<c;b++)a(this[b],b,this)}:function(a){for(var b in this)this.hasOwnProperty(b)&&a(this[b],b,this)},c.apply(a,[b])},a.prototype.getScoreFunction=function(a,b){var c,e,f,g,h;c=this,a=c.prepareSearch(a,b),f=a.tokens,e=a.options.fields,g=f.length,h=a.options.nesting;var i=function(a,b){var c,d;return a?(a=String(a||""),d=a.search(b.regex),d===-1?0:(c=b.string.length/a.length,0===d&&(c+=.5),c)):0},j=function(){var a=e.length;return a?1===a?function(a,b){return i(d(b,e[0],h),a)}:function(b,c){for(var f=0,g=0;f<a;f++)g+=i(d(c,e[f],h),b);return g/a}:function(){return 0}}();return g?1===g?function(a){return j(f[0],a)}:"and"===a.options.conjunction?function(a){for(var b,c=0,d=0;c<g;c++){if(b=j(f[c],a),b<=0)return 0;d+=b}return d/g}:function(a){for(var b=0,c=0;b<g;b++)c+=j(f[b],a);return c/g}:function(){return 0}},a.prototype.getSortFunction=function(a,c){var e,f,g,h,i,j,k,l,m,n,o;if(g=this,a=g.prepareSearch(a,c),o=!a.query&&c.sort_empty||c.sort,m=function(a,b){return"$score"===a?b.score:d(g.items[b.id],a,c.nesting)},i=[],o)for(e=0,f=o.length;e<f;e++)(a.query||"$score"!==o[e].field)&&i.push(o[e]);if(a.query){for(n=!0,e=0,f=i.length;e<f;e++)if("$score"===i[e].field){n=!1;break}n&&i.unshift({field:"$score",direction:"desc"})}else for(e=0,f=i.length;e<f;e++)if("$score"===i[e].field){i.splice(e,1);break}for(l=[],e=0,f=i.length;e<f;e++)l.push("desc"===i[e].direction?-1:1);return j=i.length,j?1===j?(h=i[0].field,k=l[0],function(a,c){return k*b(m(h,a),m(h,c))}):function(a,c){var d,e,f;for(d=0;d<j;d++)if(f=i[d].field,e=l[d]*b(m(f,a),m(f,c)))return e;return 0}:null},a.prototype.prepareSearch=function(a,b){if("object"==typeof a)return a;b=c({},b);var d=b.fields,e=b.sort,f=b.sort_empty;return d&&!g(d)&&(b.fields=[d]),e&&!g(e)&&(b.sort=[e]),f&&!g(f)&&(b.sort_empty=[f]),{options:b,query:String(a||"").toLowerCase(),tokens:this.tokenize(a),total:0,items:[]}},a.prototype.search=function(a,b){var c,d,e,f,g=this;return d=this.prepareSearch(a,b),b=d.options,a=d.query,f=b.score||g.getScoreFunction(d),a.length?g.iterator(g.items,function(a,e){c=f(a),(b.filter===!1||c>0)&&d.items.push({score:c,id:e})}):g.iterator(g.items,function(a,b){d.items.push({score:1,id:b})}),e=g.getSortFunction(d,b),e&&d.items.sort(e),d.total=d.items.length,"number"==typeof b.limit&&(d.items=d.items.slice(0,b.limit)),d};var b=function(a,b){return"number"==typeof a&&"number"==typeof b?a>b?1:a<b?-1:0:(a=i(String(a||"")),b=i(String(b||"")),a>b?1:b>a?-1:0)},c=function(a,b){var c,d,e,f;for(c=1,d=arguments.length;c<d;c++)if(f=arguments[c])for(e in f)f.hasOwnProperty(e)&&(a[e]=f[e]);return a},d=function(a,b,c){if(a&&b){if(!c)return a[b];for(var d=b.split(".");d.length&&(a=a[d.shift()]););return a}},e=function(a){return(a+"").replace(/^\s+|\s+$|/g,"")},f=function(a){return(a+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},g=Array.isArray||"undefined"!=typeof $&&$.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},h={a:"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]",b:"[b␢βΒB฿𐌁ᛒ]",c:"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]",d:"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]",e:"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]",f:"[fƑƒḞḟ]",g:"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]",h:"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]",i:"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]",j:"[jȷĴĵɈɉʝɟʲ]",k:"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]",l:"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]",n:"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]",o:"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]",p:"[pṔṕṖṗⱣᵽƤƥᵱ]",q:"[qꝖꝗʠɊɋꝘꝙq̃]",r:"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]",s:"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]",t:"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]",u:"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]",v:"[vṼṽṾṿƲʋꝞꝟⱱʋ]",w:"[wẂẃẀẁŴŵẄẅẆẇẈẉ]",x:"[xẌẍẊẋχ]",y:"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]",z:"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]"},i=function(){var a,b,c,d,e="",f={};for(c in h)if(h.hasOwnProperty(c))for(d=h[c].substring(2,h[c].length-1),e+=d,a=0,b=d.length;a<b;a++)f[d.charAt(a)]=c;var g=new RegExp("["+e+"]","g");return function(a){return a.replace(g,function(a){return f[a]}).toLowerCase()}}();return a}),function(a,b){"function"==typeof define&&define.amd?define("microplugin",b):"object"==typeof exports?module.exports=b():a.MicroPlugin=b()}(this,function(){var a={};a.mixin=function(a){a.plugins={},a.prototype.initializePlugins=function(a){var c,d,e,f=this,g=[];if(f.plugins={names:[],settings:{},requested:{},loaded:{}},b.isArray(a))for(c=0,d=a.length;c<d;c++)"string"==typeof a[c]?g.push(a[c]):(f.plugins.settings[a[c].name]=a[c].options,g.push(a[c].name));else if(a)for(e in a)a.hasOwnProperty(e)&&(f.plugins.settings[e]=a[e],g.push(e));for(;g.length;)f.require(g.shift())},a.prototype.loadPlugin=function(b){var c=this,d=c.plugins,e=a.plugins[b];if(!a.plugins.hasOwnProperty(b))throw new Error('Unable to find "'+b+'" plugin');d.requested[b]=!0,d.loaded[b]=e.fn.apply(c,[c.plugins.settings[b]||{}]),d.names.push(b)},a.prototype.require=function(a){var b=this,c=b.plugins;if(!b.plugins.loaded.hasOwnProperty(a)){if(c.requested[a])throw new Error('Plugin has circular dependency ("'+a+'")');b.loadPlugin(a)}return c.loaded[a]},a.define=function(b,c){a.plugins[b]={name:b,fn:c}}};var b={isArray:Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}};return a}),function(a,b){"function"==typeof define&&define.amd?define("selectize",["jquery","sifter","microplugin"],b):"object"==typeof exports?module.exports=b(require("jquery"),require("sifter"),require("microplugin")):a.Selectize=b(a.jQuery,a.Sifter,a.MicroPlugin)}(this,function(a,b,c){"use strict";var d=function(a,b){if("string"!=typeof b||b.length){var c="string"==typeof b?new RegExp(b,"i"):b,d=function(a){var b=0;if(3===a.nodeType){var e=a.data.search(c);if(e>=0&&a.data.length>0){var f=a.data.match(c),g=document.createElement("span");g.className="highlight";var h=a.splitText(e),i=(h.splitText(f[0].length),h.cloneNode(!0));g.appendChild(i),h.parentNode.replaceChild(g,h),b=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(var j=0;j<a.childNodes.length;++j)j+=d(a.childNodes[j]);return b};return a.each(function(){d(this)})}};a.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var a=this.parentNode;a.replaceChild(this.firstChild,this),a.normalize()}).end()};var e=function(){};e.prototype={on:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},off:function(a,b){var c=arguments.length;return 0===c?delete this._events:1===c?delete this._events[a]:(this._events=this._events||{},void(a in this._events!=!1&&this._events[a].splice(this._events[a].indexOf(b),1)))},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;b<this._events[a].length;b++)this._events[a][b].apply(this,Array.prototype.slice.call(arguments,1))}},e.mixin=function(a){for(var b=["on","off","trigger"],c=0;c<b.length;c++)a.prototype[b[c]]=e.prototype[b[c]]};var f=/Mac/.test(navigator.userAgent),g=65,h=13,i=27,j=37,k=38,l=80,m=39,n=40,o=78,p=8,q=46,r=16,s=f?91:17,t=f?18:17,u=9,v=1,w=2,x=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("input").validity,y=function(a){return"undefined"!=typeof a},z=function(a){return"undefined"==typeof a||null===a?null:"boolean"==typeof a?a?"1":"0":a+""},A=function(a){return(a+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},B={};B.before=function(a,b,c){var d=a[b];a[b]=function(){return c.apply(a,arguments),d.apply(a,arguments)}},B.after=function(a,b,c){var d=a[b];a[b]=function(){var b=d.apply(a,arguments);return c.apply(a,arguments),b}};var C=function(a){var b=!1;return function(){b||(b=!0,a.apply(this,arguments))}},D=function(a,b){var c;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},E=function(a,b,c){var d,e=a.trigger,f={};a.trigger=function(){var c=arguments[0];return b.indexOf(c)===-1?e.apply(a,arguments):void(f[c]=arguments)},c.apply(a,[]),a.trigger=e;for(d in f)f.hasOwnProperty(d)&&e.apply(a,f[d])},F=function(a,b,c,d){a.on(b,c,function(b){for(var c=b.target;c&&c.parentNode!==a[0];)c=c.parentNode;return b.currentTarget=c,d.apply(this,[b])})},G=function(a){var b={};if("selectionStart"in a)b.start=a.selectionStart,b.length=a.selectionEnd-b.start;else if(document.selection){a.focus();var c=document.selection.createRange(),d=document.selection.createRange().text.length;c.moveStart("character",-a.value.length),b.start=c.text.length-d,b.length=d}return b},H=function(a,b,c){var d,e,f={};if(c)for(d=0,e=c.length;d<e;d++)f[c[d]]=a.css(c[d]);else f=a.css();b.css(f)},I=function(b,c){if(!b)return 0;var d=a("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(b).appendTo("body");H(c,d,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var e=d.width();return d.remove(),e},J=function(a){var b=null,c=function(c,d){var e,f,g,h,i,j,k,l;c=c||window.event||{},d=d||{},c.metaKey||c.altKey||(d.force||a.data("grow")!==!1)&&(e=a.val(),c.type&&"keydown"===c.type.toLowerCase()&&(f=c.keyCode,g=f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||32===f,f===q||f===p?(l=G(a[0]),l.length?e=e.substring(0,l.start)+e.substring(l.start+l.length):f===p&&l.start?e=e.substring(0,l.start-1)+e.substring(l.start+1):f===q&&"undefined"!=typeof l.start&&(e=e.substring(0,l.start)+e.substring(l.start+1))):g&&(j=c.shiftKey,k=String.fromCharCode(c.keyCode),k=j?k.toUpperCase():k.toLowerCase(),e+=k)),h=a.attr("placeholder"),!e&&h&&(e=h),i=I(e,a)+4,i!==b&&(b=i,a.width(i),a.triggerHandler("resize")))};a.on("keydown keyup update blur",c),c()},K=function(a){var b=document.createElement("div");return b.appendChild(a.cloneNode(!0)),b.innerHTML},L=function(a,b){b||(b={});var c="Selectize";console.error(c+": "+a),b.explanation&&(console.group&&console.group(),console.error(b.explanation),console.group&&console.groupEnd())},M=function(c,d){var e,f,g,h,i=this;h=c[0],h.selectize=i;var j=window.getComputedStyle&&window.getComputedStyle(h,null);if(g=j?j.getPropertyValue("direction"):h.currentStyle&&h.currentStyle.direction,g=g||c.parents("[dir]:first").attr("dir")||"",a.extend(i,{order:0,settings:d,$input:c,tabIndex:c.attr("tabindex")||"",tagType:"select"===h.tagName.toLowerCase()?v:w,rtl:/rtl/i.test(g),eventNS:".selectize"+ ++M.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:c.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===d.loadThrottle?i.onSearchChange:D(i.onSearchChange,d.loadThrottle)}),i.sifter=new b(this.options,{diacritics:d.diacritics}),i.settings.options){for(e=0,f=i.settings.options.length;e<f;e++)i.registerOption(i.settings.options[e]);delete i.settings.options}if(i.settings.optgroups){for(e=0,f=i.settings.optgroups.length;e<f;e++)i.registerOptionGroup(i.settings.optgroups[e]);delete i.settings.optgroups}i.settings.mode=i.settings.mode||(1===i.settings.maxItems?"single":"multi"),"boolean"!=typeof i.settings.hideSelected&&(i.settings.hideSelected="multi"===i.settings.mode),i.initializePlugins(i.settings.plugins),i.setupCallbacks(),i.setupTemplates(),i.setup()};return e.mixin(M),"undefined"!=typeof c?c.mixin(M):L("Dependency MicroPlugin is missing",{explanation:'Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.'}),a.extend(M.prototype,{setup:function(){var b,c,d,e,g,h,i,j,k,l,m=this,n=m.settings,o=m.eventNS,p=a(window),q=a(document),u=m.$input;if(i=m.settings.mode,j=u.attr("class")||"",b=a("<div>").addClass(n.wrapperClass).addClass(j).addClass(i),c=a("<div>").addClass(n.inputClass).addClass("items").appendTo(b),d=a('<input type="text" autocomplete="off" />').appendTo(c).attr("tabindex",u.is(":disabled")?"-1":m.tabIndex),h=a(n.dropdownParent||b),e=a("<div>").addClass(n.dropdownClass).addClass(i).hide().appendTo(h),g=a("<div>").addClass(n.dropdownContentClass).appendTo(e),(l=u.attr("id"))&&(d.attr("id",l+"-selectized"),a("label[for='"+l+"']").attr("for",l+"-selectized")),m.settings.copyClassesToDropdown&&e.addClass(j),b.css({width:u[0].style.width}),m.plugins.names.length&&(k="plugin-"+m.plugins.names.join(" plugin-"),b.addClass(k),e.addClass(k)),(null===n.maxItems||n.maxItems>1)&&m.tagType===v&&u.attr("multiple","multiple"),m.settings.placeholder&&d.attr("placeholder",n.placeholder),!m.settings.splitOn&&m.settings.delimiter){var w=m.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");m.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}u.attr("autocorrect")&&d.attr("autocorrect",u.attr("autocorrect")),u.attr("autocapitalize")&&d.attr("autocapitalize",u.attr("autocapitalize")),m.$wrapper=b,m.$control=c,m.$control_input=d,m.$dropdown=e,m.$dropdown_content=g,e.on("mouseenter","[data-selectable]",function(){return m.onOptionHover.apply(m,arguments)}),e.on("mousedown click","[data-selectable]",function(){return m.onOptionSelect.apply(m,arguments)}),F(c,"mousedown","*:not(input)",function(){return m.onItemSelect.apply(m,arguments)}),J(d),c.on({mousedown:function(){return m.onMouseDown.apply(m,arguments)},click:function(){return m.onClick.apply(m,arguments)}}),d.on({mousedown:function(a){a.stopPropagation()},keydown:function(){return m.onKeyDown.apply(m,arguments)},keyup:function(){return m.onKeyUp.apply(m,arguments)},keypress:function(){return m.onKeyPress.apply(m,arguments)},resize:function(){m.positionDropdown.apply(m,[])},blur:function(){return m.onBlur.apply(m,arguments)},focus:function(){return m.ignoreBlur=!1,m.onFocus.apply(m,arguments)},paste:function(){return m.onPaste.apply(m,arguments)}}),q.on("keydown"+o,function(a){m.isCmdDown=a[f?"metaKey":"ctrlKey"],m.isCtrlDown=a[f?"altKey":"ctrlKey"],m.isShiftDown=a.shiftKey}),q.on("keyup"+o,function(a){a.keyCode===t&&(m.isCtrlDown=!1),a.keyCode===r&&(m.isShiftDown=!1),a.keyCode===s&&(m.isCmdDown=!1)}),q.on("mousedown"+o,function(a){if(m.isFocused){if(a.target===m.$dropdown[0]||a.target.parentNode===m.$dropdown[0])return!1;m.$control.has(a.target).length||a.target===m.$control[0]||m.blur(a.target)}}),p.on(["scroll"+o,"resize"+o].join(" "),function(){m.isOpen&&m.positionDropdown.apply(m,arguments)}),p.on("mousemove"+o,function(){m.ignoreHover=!1}),this.revertSettings={$children:u.children().detach(),tabindex:u.attr("tabindex")},u.attr("tabindex",-1).hide().after(m.$wrapper),a.isArray(n.items)&&(m.setValue(n.items),delete n.items),x&&u.on("invalid"+o,function(a){a.preventDefault(),m.isInvalid=!0,m.refreshState()}),m.updateOriginalInput(),m.refreshItems(),m.refreshState(),m.updatePlaceholder(),m.isSetup=!0,u.is(":disabled")&&m.disable(),m.on("change",this.onChange),u.data("selectize",m),u.addClass("selectized"),m.trigger("initialize"),n.preload===!0&&m.onSearchChange("")},setupTemplates:function(){var b=this,c=b.settings.labelField,d=b.settings.optgroupLabelField,e={optgroup:function(a){return'<div class="optgroup">'+a.html+"</div>"},optgroup_header:function(a,b){return'<div class="optgroup-header">'+b(a[d])+"</div>"},option:function(a,b){return'<div class="option">'+b(a[c])+"</div>"},item:function(a,b){return'<div class="item">'+b(a[c])+"</div>"},option_create:function(a,b){return'<div class="create">Add <strong>'+b(a.input)+"</strong>&hellip;</div>"}};b.settings.render=a.extend({},e,b.settings.render)},setupCallbacks:function(){var a,b,c={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(a in c)c.hasOwnProperty(a)&&(b=this.settings[c[a]],b&&this.on(a,b))},onClick:function(a){var b=this;b.isFocused||(b.focus(),a.preventDefault())},onMouseDown:function(b){var c=this,d=b.isDefaultPrevented();a(b.target);if(c.isFocused){if(b.target!==c.$control_input[0])return"single"===c.settings.mode?c.isOpen?c.close():c.open():d||c.setActiveItem(null),!1}else d||window.setTimeout(function(){c.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(b){var c=this;return c.isFull()||c.isInputHidden||c.isLocked?void b.preventDefault():void(c.settings.splitOn&&setTimeout(function(){var b=c.$control_input.val();if(b.match(c.settings.splitOn))for(var d=a.trim(b).split(c.settings.splitOn),e=0,f=d.length;e<f;e++)c.createItem(d[e])},0))},onKeyPress:function(a){if(this.isLocked)return a&&a.preventDefault();var b=String.fromCharCode(a.keyCode||a.which);return this.settings.create&&"multi"===this.settings.mode&&b===this.settings.delimiter?(this.createItem(),a.preventDefault(),!1):void 0},onKeyDown:function(a){var b=(a.target===this.$control_input[0],this);if(b.isLocked)return void(a.keyCode!==u&&a.preventDefault());switch(a.keyCode){case g:if(b.isCmdDown)return void b.selectAll();break;case i:return void(b.isOpen&&(a.preventDefault(),a.stopPropagation(),b.close()));case o:if(!a.ctrlKey||a.altKey)break;case n:if(!b.isOpen&&b.hasOptions)b.open();else if(b.$activeOption){b.ignoreHover=!0;var c=b.getAdjacentOption(b.$activeOption,1);c.length&&b.setActiveOption(c,!0,!0)}return void a.preventDefault();case l:if(!a.ctrlKey||a.altKey)break;case k:if(b.$activeOption){b.ignoreHover=!0;var d=b.getAdjacentOption(b.$activeOption,-1);d.length&&b.setActiveOption(d,!0,!0)}return void a.preventDefault();case h:return void(b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),a.preventDefault()));case j:return void b.advanceSelection(-1,a);case m:return void b.advanceSelection(1,a);case u:return b.settings.selectOnTab&&b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),b.isFull()||a.preventDefault()),void(b.settings.create&&b.createItem()&&a.preventDefault());case p:case q:return void b.deleteSelection(a)}return!b.isFull()&&!b.isInputHidden||(f?a.metaKey:a.ctrlKey)?void 0:void a.preventDefault()},onKeyUp:function(a){var b=this;if(b.isLocked)return a&&a.preventDefault();var c=b.$control_input.val()||"";b.lastValue!==c&&(b.lastValue=c,b.onSearchChange(c),b.refreshOptions(),b.trigger("type",c))},onSearchChange:function(a){var b=this,c=b.settings.load;c&&(b.loadedSearches.hasOwnProperty(a)||(b.loadedSearches[a]=!0,b.load(function(d){c.apply(b,[a,d])})))},onFocus:function(a){var b=this,c=b.isFocused;return b.isDisabled?(b.blur(),a&&a.preventDefault(),!1):void(b.ignoreFocus||(b.isFocused=!0,"focus"===b.settings.preload&&b.onSearchChange(""),c||b.trigger("focus"),b.$activeItems.length||(b.showInput(),b.setActiveItem(null),b.refreshOptions(!!b.settings.openOnFocus)),b.refreshState()))},onBlur:function(a,b){var c=this;if(c.isFocused&&(c.isFocused=!1,!c.ignoreFocus)){if(!c.ignoreBlur&&document.activeElement===c.$dropdown_content[0])return c.ignoreBlur=!0,void c.onFocus(a);var d=function(){c.close(),c.setTextboxValue(""),c.setActiveItem(null),c.setActiveOption(null),c.setCaret(c.items.length),c.refreshState(),b&&b.focus&&b.focus(),c.ignoreFocus=!1,c.trigger("blur")};c.ignoreFocus=!0,c.settings.create&&c.settings.createOnBlur?c.createItem(null,!1,d):d()}},onOptionHover:function(a){this.ignoreHover||this.setActiveOption(a.currentTarget,!1)},onOptionSelect:function(b){var c,d,e=this;b.preventDefault&&(b.preventDefault(),b.stopPropagation()),d=a(b.currentTarget),d.hasClass("create")?e.createItem(null,function(){e.settings.closeAfterSelect&&e.close()}):(c=d.attr("data-value"),"undefined"!=typeof c&&(e.lastQuery=null,e.setTextboxValue(""),e.addItem(c),e.settings.closeAfterSelect?e.close():!e.settings.hideSelected&&b.type&&/mouse/.test(b.type)&&e.setActiveOption(e.getOption(c))))},onItemSelect:function(a){var b=this;b.isLocked||"multi"===b.settings.mode&&(a.preventDefault(),b.setActiveItem(a.currentTarget,a))},load:function(a){var b=this,c=b.$wrapper.addClass(b.settings.loadingClass);b.loading++,a.apply(b,[function(a){b.loading=Math.max(b.loading-1,0),a&&a.length&&(b.addOption(a),b.refreshOptions(b.isFocused&&!b.isInputHidden)),b.loading||c.removeClass(b.settings.loadingClass),b.trigger("load",a)}])},setTextboxValue:function(a){var b=this.$control_input,c=b.val()!==a;c&&(b.val(a).triggerHandler("update"),this.lastValue=a)},getValue:function(){return this.tagType===v&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(a,b){var c=b?[]:["change"];E(this,c,function(){this.clear(b),this.addItems(a,b)})},setActiveItem:function(b,c){var d,e,f,g,h,i,j,k,l=this;if("single"!==l.settings.mode){if(b=a(b),!b.length)return a(l.$activeItems).removeClass("active"),l.$activeItems=[],void(l.isFocused&&l.showInput());if(d=c&&c.type.toLowerCase(),"mousedown"===d&&l.isShiftDown&&l.$activeItems.length){for(k=l.$control.children(".active:last"),g=Array.prototype.indexOf.apply(l.$control[0].childNodes,[k[0]]),h=Array.prototype.indexOf.apply(l.$control[0].childNodes,[b[0]]),g>h&&(j=g,g=h,h=j),e=g;e<=h;e++)i=l.$control[0].childNodes[e],l.$activeItems.indexOf(i)===-1&&(a(i).addClass("active"),l.$activeItems.push(i));c.preventDefault()}else"mousedown"===d&&l.isCtrlDown||"keydown"===d&&this.isShiftDown?b.hasClass("active")?(f=l.$activeItems.indexOf(b[0]),l.$activeItems.splice(f,1),b.removeClass("active")):l.$activeItems.push(b.addClass("active")[0]):(a(l.$activeItems).removeClass("active"),l.$activeItems=[b.addClass("active")[0]]);l.hideInput(),this.isFocused||l.focus()}},setActiveOption:function(b,c,d){var e,f,g,h,i,j=this;j.$activeOption&&j.$activeOption.removeClass("active"),j.$activeOption=null,b=a(b),b.length&&(j.$activeOption=b.addClass("active"),!c&&y(c)||(e=j.$dropdown_content.height(),f=j.$activeOption.outerHeight(!0),c=j.$dropdown_content.scrollTop()||0,g=j.$activeOption.offset().top-j.$dropdown_content.offset().top+c,h=g,i=g-e+f,g+f>e+c?j.$dropdown_content.stop().animate({scrollTop:i},d?j.settings.scrollDuration:0):g<c&&j.$dropdown_content.stop().animate({scrollTop:h},d?j.settings.scrollDuration:0)))},selectAll:function(){var a=this;"single"!==a.settings.mode&&(a.$activeItems=Array.prototype.slice.apply(a.$control.children(":not(input)").addClass("active")),a.$activeItems.length&&(a.hideInput(),a.close()),a.focus())},hideInput:function(){var a=this;a.setTextboxValue(""),a.$control_input.css({opacity:0,position:"absolute",left:a.rtl?1e4:-1e4}),a.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var a=this;a.isDisabled||(a.ignoreFocus=!0,a.$control_input[0].focus(),window.setTimeout(function(){a.ignoreFocus=!1,a.onFocus()},0))},blur:function(a){this.$control_input[0].blur(),this.onBlur(null,a)},getScoreFunction:function(a){return this.sifter.getScoreFunction(a,this.getSearchOptions())},getSearchOptions:function(){var a=this.settings,b=a.sortField;return"string"==typeof b&&(b=[{field:b}]),{fields:a.searchField,conjunction:a.searchConjunction,sort:b}},search:function(b){var c,d,e,f=this,g=f.settings,h=this.getSearchOptions();if(g.score&&(e=f.settings.score.apply(this,[b]),"function"!=typeof e))throw new Error('Selectize "score" setting must be a function that returns a function');if(b!==f.lastQuery?(f.lastQuery=b,d=f.sifter.search(b,a.extend(h,{score:e})),f.currentResults=d):d=a.extend(!0,{},f.currentResults),g.hideSelected)for(c=d.items.length-1;c>=0;c--)f.items.indexOf(z(d.items[c].id))!==-1&&d.items.splice(c,1);return d},refreshOptions:function(b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;"undefined"==typeof b&&(b=!0);var t=this,u=a.trim(t.$control_input.val()),v=t.search(u),w=t.$dropdown_content,x=t.$activeOption&&z(t.$activeOption.attr("data-value"));for(g=v.items.length,"number"==typeof t.settings.maxOptions&&(g=Math.min(g,t.settings.maxOptions)),h={},i=[],c=0;c<g;c++)for(j=t.options[v.items[c].id],k=t.render("option",j),l=j[t.settings.optgroupField]||"",m=a.isArray(l)?l:[l],e=0,f=m&&m.length;e<f;e++)l=m[e],t.optgroups.hasOwnProperty(l)||(l=""),h.hasOwnProperty(l)||(h[l]=document.createDocumentFragment(),i.push(l)),h[l].appendChild(k);for(this.settings.lockOptgroupOrder&&i.sort(function(a,b){var c=t.optgroups[a].$order||0,d=t.optgroups[b].$order||0;return c-d}),n=document.createDocumentFragment(),c=0,g=i.length;c<g;c++)l=i[c],t.optgroups.hasOwnProperty(l)&&h[l].childNodes.length?(o=document.createDocumentFragment(),o.appendChild(t.render("optgroup_header",t.optgroups[l])),o.appendChild(h[l]),n.appendChild(t.render("optgroup",a.extend({},t.optgroups[l],{html:K(o),dom:o})))):n.appendChild(h[l]);if(w.html(n),t.settings.highlight&&v.query.length&&v.tokens.length)for(w.removeHighlight(),c=0,g=v.tokens.length;c<g;c++)d(w,v.tokens[c].regex);if(!t.settings.hideSelected)for(c=0,g=t.items.length;c<g;c++)t.getOption(t.items[c]).addClass("selected");p=t.canCreate(u),p&&(w.prepend(t.render("option_create",{input:u})),s=a(w[0].childNodes[0])),t.hasOptions=v.items.length>0||p,t.hasOptions?(v.items.length>0?(r=x&&t.getOption(x),r&&r.length?q=r:"single"===t.settings.mode&&t.items.length&&(q=t.getOption(t.items[0])),q&&q.length||(q=s&&!t.settings.addPrecedence?t.getAdjacentOption(s,1):w.find("[data-selectable]:first"))):q=s,t.setActiveOption(q),b&&!t.isOpen&&t.open()):(t.setActiveOption(null),b&&t.isOpen&&t.close())},addOption:function(b){var c,d,e,f=this;if(a.isArray(b))for(c=0,d=b.length;c<d;c++)f.addOption(b[c]);else(e=f.registerOption(b))&&(f.userOptions[e]=!0,f.lastQuery=null,f.trigger("option_add",e,b))},registerOption:function(a){var b=z(a[this.settings.valueField]);return"undefined"!=typeof b&&null!==b&&!this.options.hasOwnProperty(b)&&(a.$order=a.$order||++this.order,this.options[b]=a,b)},registerOptionGroup:function(a){var b=z(a[this.settings.optgroupValueField]);return!!b&&(a.$order=a.$order||++this.order,this.optgroups[b]=a,b)},addOptionGroup:function(a,b){b[this.settings.optgroupValueField]=a,(a=this.registerOptionGroup(b))&&this.trigger("optgroup_add",a,b)},removeOptionGroup:function(a){this.optgroups.hasOwnProperty(a)&&(delete this.optgroups[a],this.renderCache={},this.trigger("optgroup_remove",a))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(b,c){var d,e,f,g,h,i,j,k=this;if(b=z(b),f=z(c[k.settings.valueField]),null!==b&&k.options.hasOwnProperty(b)){if("string"!=typeof f)throw new Error("Value must be set in option data");j=k.options[b].$order,f!==b&&(delete k.options[b],g=k.items.indexOf(b),g!==-1&&k.items.splice(g,1,f)),c.$order=c.$order||j,k.options[f]=c,h=k.renderCache.item,i=k.renderCache.option,h&&(delete h[b],delete h[f]),i&&(delete i[b],delete i[f]),k.items.indexOf(f)!==-1&&(d=k.getItem(b),e=a(k.render("item",c)),d.hasClass("active")&&e.addClass("active"),d.replaceWith(e)),k.lastQuery=null,k.isOpen&&k.refreshOptions(!1)}},removeOption:function(a,b){var c=this;a=z(a);var d=c.renderCache.item,e=c.renderCache.option;d&&delete d[a],e&&delete e[a],delete c.userOptions[a],delete c.options[a],c.lastQuery=null,c.trigger("option_remove",a),c.removeItem(a,b)},clearOptions:function(){var a=this;a.loadedSearches={},a.userOptions={},a.renderCache={},a.options=a.sifter.items={},a.lastQuery=null,a.trigger("option_clear"),a.clear()},getOption:function(a){return this.getElementWithValue(a,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(b,c){var d=this.$dropdown.find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e<d.length?d.eq(e):a()},getElementWithValue:function(b,c){if(b=z(b),"undefined"!=typeof b&&null!==b)for(var d=0,e=c.length;d<e;d++)if(c[d].getAttribute("data-value")===b)return a(c[d]);return a()},getItem:function(a){return this.getElementWithValue(a,this.$control.children())},addItems:function(b,c){for(var d=a.isArray(b)?b:[b],e=0,f=d.length;e<f;e++)this.isPending=e<f-1,this.addItem(d[e],c)},addItem:function(b,c){var d=c?[]:["change"];E(this,d,function(){var d,e,f,g,h,i=this,j=i.settings.mode;return b=z(b),i.items.indexOf(b)!==-1?void("single"===j&&i.close()):void(i.options.hasOwnProperty(b)&&("single"===j&&i.clear(c),"multi"===j&&i.isFull()||(d=a(i.render("item",i.options[b])),h=i.isFull(),i.items.splice(i.caretPos,0,b),i.insertAtCaret(d),(!i.isPending||!h&&i.isFull())&&i.refreshState(),i.isSetup&&(f=i.$dropdown_content.find("[data-selectable]"),i.isPending||(e=i.getOption(b),g=i.getAdjacentOption(e,1).attr("data-value"),i.refreshOptions(i.isFocused&&"single"!==j),g&&i.setActiveOption(i.getOption(g))),!f.length||i.isFull()?i.close():i.positionDropdown(),i.updatePlaceholder(),i.trigger("item_add",b,d),i.updateOriginalInput({silent:c})))))})},removeItem:function(b,c){var d,e,f,g=this;d=b instanceof a?b:g.getItem(b),b=z(d.attr("data-value")),e=g.items.indexOf(b),e!==-1&&(d.remove(),d.hasClass("active")&&(f=g.$activeItems.indexOf(d[0]),g.$activeItems.splice(f,1)),g.items.splice(e,1),g.lastQuery=null,!g.settings.persist&&g.userOptions.hasOwnProperty(b)&&g.removeOption(b,c),e<g.caretPos&&g.setCaret(g.caretPos-1),g.refreshState(),g.updatePlaceholder(),g.updateOriginalInput({silent:c}),g.positionDropdown(),g.trigger("item_remove",b,d))},createItem:function(b,c){var d=this,e=d.caretPos;b=b||a.trim(d.$control_input.val()||"");var f=arguments[arguments.length-1];if("function"!=typeof f&&(f=function(){}),"boolean"!=typeof c&&(c=!0),!d.canCreate(b))return f(),!1;d.lock();var g="function"==typeof d.settings.create?this.settings.create:function(a){var b={};return b[d.settings.labelField]=a,b[d.settings.valueField]=a,b},h=C(function(a){if(d.unlock(),!a||"object"!=typeof a)return f();var b=z(a[d.settings.valueField]);return"string"!=typeof b?f():(d.setTextboxValue(""),d.addOption(a),d.setCaret(e),d.addItem(b),d.refreshOptions(c&&"single"!==d.settings.mode),void f(a))}),i=g.apply(this,[b,h]);return"undefined"!=typeof i&&h(i),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var a=!this.items.length;this.isInvalid=a,this.$control_input.prop("required",a),this.$input.prop("required",!a)},refreshClasses:function(){var b=this,c=b.isFull(),d=b.isLocked;b.$wrapper.toggleClass("rtl",b.rtl),b.$control.toggleClass("focus",b.isFocused).toggleClass("disabled",b.isDisabled).toggleClass("required",b.isRequired).toggleClass("invalid",b.isInvalid).toggleClass("locked",d).toggleClass("full",c).toggleClass("not-full",!c).toggleClass("input-active",b.isFocused&&!b.isInputHidden).toggleClass("dropdown-active",b.isOpen).toggleClass("has-options",!a.isEmptyObject(b.options)).toggleClass("has-items",b.items.length>0),b.$control_input.data("grow",!c&&!d)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(a){var b,c,d,e,f=this;if(a=a||{},f.tagType===v){for(d=[],b=0,c=f.items.length;b<c;b++)e=f.options[f.items[b]][f.settings.labelField]||"",d.push('<option value="'+A(f.items[b])+'" selected="selected">'+A(e)+"</option>");d.length||this.$input.attr("multiple")||d.push('<option value="" selected="selected"></option>'),
-f.$input.html(d.join(""))}else f.$input.val(f.getValue()),f.$input.attr("value",f.$input.val());f.isSetup&&(a.silent||f.trigger("change",f.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var a=this.$control_input;this.items.length?a.removeAttr("placeholder"):a.attr("placeholder",this.settings.placeholder),a.triggerHandler("update",{force:!0})}},open:function(){var a=this;a.isLocked||a.isOpen||"multi"===a.settings.mode&&a.isFull()||(a.focus(),a.isOpen=!0,a.refreshState(),a.$dropdown.css({visibility:"hidden",display:"block"}),a.positionDropdown(),a.$dropdown.css({visibility:"visible"}),a.trigger("dropdown_open",a.$dropdown))},close:function(){var a=this,b=a.isOpen;"single"===a.settings.mode&&a.items.length&&(a.hideInput(),a.$control_input.blur()),a.isOpen=!1,a.$dropdown.hide(),a.setActiveOption(null),a.refreshState(),b&&a.trigger("dropdown_close",a.$dropdown)},positionDropdown:function(){var a=this.$control,b="body"===this.settings.dropdownParent?a.offset():a.position();b.top+=a.outerHeight(!0),this.$dropdown.css({width:a.outerWidth(),top:b.top,left:b.left})},clear:function(a){var b=this;b.items.length&&(b.$control.children(":not(input)").remove(),b.items=[],b.lastQuery=null,b.setCaret(0),b.setActiveItem(null),b.updatePlaceholder(),b.updateOriginalInput({silent:a}),b.refreshState(),b.showInput(),b.trigger("clear"))},insertAtCaret:function(b){var c=Math.min(this.caretPos,this.items.length);0===c?this.$control.prepend(b):a(this.$control[0].childNodes[c]).before(b),this.setCaret(c+1)},deleteSelection:function(b){var c,d,e,f,g,h,i,j,k,l=this;if(e=b&&b.keyCode===p?-1:1,f=G(l.$control_input[0]),l.$activeOption&&!l.settings.hideSelected&&(i=l.getAdjacentOption(l.$activeOption,-1).attr("data-value")),g=[],l.$activeItems.length){for(k=l.$control.children(".active:"+(e>0?"last":"first")),h=l.$control.children(":not(input)").index(k),e>0&&h++,c=0,d=l.$activeItems.length;c<d;c++)g.push(a(l.$activeItems[c]).attr("data-value"));b&&(b.preventDefault(),b.stopPropagation())}else(l.isFocused||"single"===l.settings.mode)&&l.items.length&&(e<0&&0===f.start&&0===f.length?g.push(l.items[l.caretPos-1]):e>0&&f.start===l.$control_input.val().length&&g.push(l.items[l.caretPos]));if(!g.length||"function"==typeof l.settings.onDelete&&l.settings.onDelete.apply(l,[g])===!1)return!1;for("undefined"!=typeof h&&l.setCaret(h);g.length;)l.removeItem(g.pop());return l.showInput(),l.positionDropdown(),l.refreshOptions(!0),i&&(j=l.getOption(i),j.length&&l.setActiveOption(j)),!0},advanceSelection:function(a,b){var c,d,e,f,g,h,i=this;0!==a&&(i.rtl&&(a*=-1),c=a>0?"last":"first",d=G(i.$control_input[0]),i.isFocused&&!i.isInputHidden?(f=i.$control_input.val().length,g=a<0?0===d.start&&0===d.length:d.start===f,g&&!f&&i.advanceCaret(a,b)):(h=i.$control.children(".active:"+c),h.length&&(e=i.$control.children(":not(input)").index(h),i.setActiveItem(null),i.setCaret(a>0?e+1:e))))},advanceCaret:function(a,b){var c,d,e=this;0!==a&&(c=a>0?"next":"prev",e.isShiftDown?(d=e.$control_input[c](),d.length&&(e.hideInput(),e.setActiveItem(d),b&&b.preventDefault())):e.setCaret(e.caretPos+a))},setCaret:function(b){var c=this;if(b="single"===c.settings.mode?c.items.length:Math.max(0,Math.min(c.items.length,b)),!c.isPending){var d,e,f,g;for(f=c.$control.children(":not(input)"),d=0,e=f.length;d<e;d++)g=a(f[d]).detach(),d<b?c.$control_input.before(g):c.$control.append(g)}c.caretPos=b},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var a=this;a.$input.prop("disabled",!0),a.$control_input.prop("disabled",!0).prop("tabindex",-1),a.isDisabled=!0,a.lock()},enable:function(){var a=this;a.$input.prop("disabled",!1),a.$control_input.prop("disabled",!1).prop("tabindex",a.tabIndex),a.isDisabled=!1,a.unlock()},destroy:function(){var b=this,c=b.eventNS,d=b.revertSettings;b.trigger("destroy"),b.off(),b.$wrapper.remove(),b.$dropdown.remove(),b.$input.html("").append(d.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:d.tabindex}).show(),b.$control_input.removeData("grow"),b.$input.removeData("selectize"),a(window).off(c),a(document).off(c),a(document.body).off(c),delete b.$input[0].selectize},render:function(b,c){var d,e,f="",g=!1,h=this;return"option"!==b&&"item"!==b||(d=z(c[h.settings.valueField]),g=!!d),g&&(y(h.renderCache[b])||(h.renderCache[b]={}),h.renderCache[b].hasOwnProperty(d))?h.renderCache[b][d]:(f=a(h.settings.render[b].apply(this,[c,A])),"option"===b||"option_create"===b?f.attr("data-selectable",""):"optgroup"===b&&(e=c[h.settings.optgroupValueField]||"",f.attr("data-group",e)),"option"!==b&&"item"!==b||f.attr("data-value",d||""),g&&(h.renderCache[b][d]=f[0]),f[0])},clearCache:function(a){var b=this;"undefined"==typeof a?b.renderCache={}:delete b.renderCache[a]},canCreate:function(a){var b=this;if(!b.settings.create)return!1;var c=b.settings.createFilter;return a.length&&("function"!=typeof c||c.apply(b,[a]))&&("string"!=typeof c||new RegExp(c).test(a))&&(!(c instanceof RegExp)||c.test(a))}}),M.count=0,M.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},a.fn.selectize=function(b){var c=a.fn.selectize.defaults,d=a.extend({},c,b),e=d.dataAttr,f=d.labelField,g=d.valueField,h=d.optgroupField,i=d.optgroupLabelField,j=d.optgroupValueField,k=function(b,c){var h,i,j,k,l=b.attr(e);if(l)for(c.options=JSON.parse(l),h=0,i=c.options.length;h<i;h++)c.items.push(c.options[h][g]);else{var m=a.trim(b.val()||"");if(!d.allowEmptyOption&&!m.length)return;for(j=m.split(d.delimiter),h=0,i=j.length;h<i;h++)k={},k[f]=j[h],k[g]=j[h],c.options.push(k);c.items=j}},l=function(b,c){var k,l,m,n,o=c.options,p={},q=function(a){var b=e&&a.attr(e);return"string"==typeof b&&b.length?JSON.parse(b):null},r=function(b,e){b=a(b);var i=z(b.val());if(i||d.allowEmptyOption)if(p.hasOwnProperty(i)){if(e){var j=p[i][h];j?a.isArray(j)?j.push(e):p[i][h]=[j,e]:p[i][h]=e}}else{var k=q(b)||{};k[f]=k[f]||b.text(),k[g]=k[g]||i,k[h]=k[h]||e,p[i]=k,o.push(k),b.is(":selected")&&c.items.push(i)}},s=function(b){var d,e,f,g,h;for(b=a(b),f=b.attr("label"),f&&(g=q(b)||{},g[i]=f,g[j]=f,c.optgroups.push(g)),h=a("option",b),d=0,e=h.length;d<e;d++)r(h[d],f)};for(c.maxItems=b.attr("multiple")?null:1,n=b.children(),k=0,l=n.length;k<l;k++)m=n[k].tagName.toLowerCase(),"optgroup"===m?s(n[k]):"option"===m&&r(n[k])};return this.each(function(){if(!this.selectize){var e,f=a(this),g=this.tagName.toLowerCase(),h=f.attr("placeholder")||f.attr("data-placeholder");h||d.allowEmptyOption||(h=f.children('option[value=""]').text());var i={placeholder:h,options:[],optgroups:[],items:[]};"select"===g?l(f,i):k(f,i),e=new M(f,a.extend(!0,{},c,i,b))}})},a.fn.selectize.defaults=M.defaults,a.fn.selectize.support={validity:x},M.define("drag_drop",function(b){if(!a.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var c=this;c.lock=function(){var a=c.lock;return function(){var b=c.$control.data("sortable");return b&&b.disable(),a.apply(c,arguments)}}(),c.unlock=function(){var a=c.unlock;return function(){var b=c.$control.data("sortable");return b&&b.enable(),a.apply(c,arguments)}}(),c.setup=function(){var b=c.setup;return function(){b.apply(this,arguments);var d=c.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:c.isLocked,start:function(a,b){b.placeholder.css("width",b.helper.css("width")),d.css({overflow:"visible"})},stop:function(){d.css({overflow:"hidden"});var b=c.$activeItems?c.$activeItems.slice():null,e=[];d.children("[data-value]").each(function(){e.push(a(this).attr("data-value"))}),c.setValue(e),c.setActiveItem(b)}})}}()}}),M.define("dropdown_header",function(b){var c=this;b=a.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(a){return'<div class="'+a.headerClass+'"><div class="'+a.titleRowClass+'"><span class="'+a.labelClass+'">'+a.title+'</span><a href="javascript:void(0)" class="'+a.closeClass+'">&times;</a></div></div>'}},b),c.setup=function(){var d=c.setup;return function(){d.apply(c,arguments),c.$dropdown_header=a(b.html(b)),c.$dropdown.prepend(c.$dropdown_header)}}()}),M.define("optgroup_columns",function(b){var c=this;b=a.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(b,c){var d=b.closest("[data-group]").find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e<d.length?d.eq(e):a()},this.onKeyDown=function(){var a=c.onKeyDown;return function(b){var d,e,f,g;return!this.isOpen||b.keyCode!==j&&b.keyCode!==m?a.apply(this,arguments):(c.ignoreHover=!0,g=this.$activeOption.closest("[data-group]"),d=g.find("[data-selectable]").index(this.$activeOption),g=b.keyCode===j?g.prev("[data-group]"):g.next("[data-group]"),f=g.find("[data-selectable]"),e=f.eq(Math.min(f.length-1,d)),void(e.length&&this.setActiveOption(e)))}}();var d=function(){var a,b=d.width,c=document;return"undefined"==typeof b&&(a=c.createElement("div"),a.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',a=a.firstChild,c.body.appendChild(a),b=d.width=a.offsetWidth-a.clientWidth,c.body.removeChild(a)),b},e=function(){var e,f,g,h,i,j,k;if(k=a("[data-group]",c.$dropdown_content),f=k.length,f&&c.$dropdown_content.width()){if(b.equalizeHeight){for(g=0,e=0;e<f;e++)g=Math.max(g,k.eq(e).height());k.css({height:g})}b.equalizeWidth&&(j=c.$dropdown_content.innerWidth()-d(),h=Math.round(j/f),k.css({width:h}),f>1&&(i=j-h*(f-1),k.eq(f-1).css({width:i})))}};(b.equalizeHeight||b.equalizeWidth)&&(B.after(this,"positionDropdown",e),B.after(this,"refreshOptions",e))}),M.define("remove_button",function(b){b=a.extend({label:"&times;",title:"Remove",className:"remove",append:!0},b);var c=function(b,c){c.className="remove-single";var d=b,e='<a href="javascript:void(0)" class="'+c.className+'" tabindex="-1" title="'+A(c.title)+'">'+c.label+"</a>",f=function(a,b){return a+b};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=a(d.$input.context).attr("id"),i=(a("#"+h),d.settings.render.item);d.settings.render.item=function(a){return f(i.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(a){a.preventDefault(),d.isLocked||d.clear()})}}()},d=function(b,c){var d=b,e='<a href="javascript:void(0)" class="'+c.className+'" tabindex="-1" title="'+A(c.title)+'">'+c.label+"</a>",f=function(a,b){var c=a.search(/(<\/[^>]+>\s*)$/);return a.substring(0,c)+b+a.substring(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=d.settings.render.item;d.settings.render.item=function(a){return f(h.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(b){if(b.preventDefault(),!d.isLocked){var c=a(b.currentTarget).parent();d.setActiveItem(c),d.deleteSelection()&&d.setCaret(d.items.length)}})}}()};return"single"===this.settings.mode?void c(this,b):void d(this,b)}),M.define("restore_on_backspace",function(a){var b=this;a.text=a.text||function(a){return a[this.settings.labelField]},this.onKeyDown=function(){var c=b.onKeyDown;return function(b){var d,e;return b.keyCode===p&&""===this.$control_input.val()&&!this.$activeItems.length&&(d=this.caretPos-1,d>=0&&d<this.items.length)?(e=this.options[this.items[d]],this.deleteSelection(b)&&(this.setTextboxValue(a.text.apply(this,[e])),this.refreshOptions(!0)),void b.preventDefault()):c.apply(this,arguments)}}()}),M});
\ No newline at end of file
diff --git a/js/jquery/plugins/selectize/selectize.bootstrap2.css b/js/jquery/plugins/selectize/selectize.bootstrap2.css
deleted file mode 100644 (file)
index 419862f..0000000
+++ /dev/null
@@ -1,494 +0,0 @@
-/**
- * selectize.bootstrap2.css (v0.12.4) - Bootstrap 2 Theme
- * Copyright (c) 2013–2015 Brian Reavis & contributors
- *
- * Licensed 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.
- *
- * @author Brian Reavis <brian@thirdroute.com>
- */
-.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
-  visibility: visible !important;
-  background: #f2f2f2 !important;
-  background: rgba(0, 0, 0, 0.06) !important;
-  border: 0 none !important;
-  -webkit-box-shadow: inset 0 0 12px 4px #ffffff;
-  box-shadow: inset 0 0 12px 4px #ffffff;
-}
-.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
-  content: '!';
-  visibility: hidden;
-}
-.selectize-control.plugin-drag_drop .ui-sortable-helper {
-  -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
-  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
-}
-.selectize-dropdown-header {
-  position: relative;
-  padding: 3px 10px;
-  border-bottom: 1px solid #d0d0d0;
-  background: #f8f8f8;
-  -webkit-border-radius: 4px 4px 0 0;
-  -moz-border-radius: 4px 4px 0 0;
-  border-radius: 4px 4px 0 0;
-}
-.selectize-dropdown-header-close {
-  position: absolute;
-  right: 10px;
-  top: 50%;
-  color: #333333;
-  opacity: 0.4;
-  margin-top: -12px;
-  line-height: 20px;
-  font-size: 20px !important;
-}
-.selectize-dropdown-header-close:hover {
-  color: #000000;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup {
-  border-right: 1px solid #f2f2f2;
-  border-top: 0 none;
-  float: left;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
-  border-right: 0 none;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
-  display: none;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
-  border-top: 0 none;
-}
-.selectize-control.plugin-remove_button [data-value] {
-  position: relative;
-  padding-right: 24px !important;
-}
-.selectize-control.plugin-remove_button [data-value] .remove {
-  z-index: 1;
-  /* fixes ie bug (see #392) */
-  position: absolute;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  width: 17px;
-  text-align: center;
-  font-weight: bold;
-  font-size: 12px;
-  color: inherit;
-  text-decoration: none;
-  vertical-align: middle;
-  display: inline-block;
-  padding: 1px 0 0 0;
-  border-left: 1px solid #cccccc;
-  -webkit-border-radius: 0 2px 2px 0;
-  -moz-border-radius: 0 2px 2px 0;
-  border-radius: 0 2px 2px 0;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.selectize-control.plugin-remove_button [data-value] .remove:hover {
-  background: rgba(0, 0, 0, 0.05);
-}
-.selectize-control.plugin-remove_button [data-value].active .remove {
-  border-left-color: #0077b3;
-}
-.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
-  background: none;
-}
-.selectize-control.plugin-remove_button .disabled [data-value] .remove {
-  border-left-color: #e0e0e0;
-}
-.selectize-control.plugin-remove_button .remove-single {
-  position: absolute;
-  right: 28px;
-  top: 6px;
-  font-size: 23px;
-}
-.selectize-control {
-  position: relative;
-}
-.selectize-dropdown,
-.selectize-input,
-.selectize-input input {
-  color: #333333;
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 14px;
-  line-height: 20px;
-  -webkit-font-smoothing: inherit;
-}
-.selectize-input,
-.selectize-control.single .selectize-input.input-active {
-  background: #ffffff;
-  cursor: text;
-  display: inline-block;
-}
-.selectize-input {
-  border: 1px solid #d0d0d0;
-  padding: 7px 10px;
-  display: inline-block;
-  width: 100%;
-  overflow: hidden;
-  position: relative;
-  z-index: 1;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  -webkit-box-shadow: none;
-  box-shadow: none;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-.selectize-control.multi .selectize-input.has-items {
-  padding: 5px 10px 2px;
-}
-.selectize-input.full {
-  background-color: #ffffff;
-}
-.selectize-input.disabled,
-.selectize-input.disabled * {
-  cursor: default !important;
-}
-.selectize-input.focus {
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
-}
-.selectize-input.dropdown-active {
-  -webkit-border-radius: 4px 4px 0 0;
-  -moz-border-radius: 4px 4px 0 0;
-  border-radius: 4px 4px 0 0;
-}
-.selectize-input > * {
-  vertical-align: baseline;
-  display: -moz-inline-stack;
-  display: inline-block;
-  zoom: 1;
-  *display: inline;
-}
-.selectize-control.multi .selectize-input > div {
-  cursor: pointer;
-  margin: 0 3px 3px 0;
-  padding: 1px 3px;
-  background: #e6e6e6;
-  color: #333333;
-  border: 1px solid #cccccc;
-}
-.selectize-control.multi .selectize-input > div.active {
-  background: #0088cc;
-  color: #ffffff;
-  border: 1px solid #0077b3;
-}
-.selectize-control.multi .selectize-input.disabled > div,
-.selectize-control.multi .selectize-input.disabled > div.active {
-  color: #474747;
-  background: #fafafa;
-  border: 1px solid #e0e0e0;
-}
-.selectize-input > input {
-  display: inline-block !important;
-  padding: 0 !important;
-  min-height: 0 !important;
-  max-height: none !important;
-  max-width: 100% !important;
-  margin: 0 !important;
-  text-indent: 0 !important;
-  border: 0 none !important;
-  background: none !important;
-  line-height: inherit !important;
-  -webkit-user-select: auto !important;
-  -webkit-box-shadow: none !important;
-  box-shadow: none !important;
-}
-.selectize-input > input::-ms-clear {
-  display: none;
-}
-.selectize-input > input:focus {
-  outline: none !important;
-}
-.selectize-input::after {
-  content: ' ';
-  display: block;
-  clear: left;
-}
-.selectize-input.dropdown-active::before {
-  content: ' ';
-  display: block;
-  position: absolute;
-  background: #e5e5e5;
-  height: 1px;
-  bottom: 0;
-  left: 0;
-  right: 0;
-}
-.selectize-dropdown {
-  position: absolute;
-  z-index: 10;
-  border: 1px solid #cccccc;
-  background: #ffffff;
-  margin: -1px 0 0 0;
-  border-top: 0 none;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-  -webkit-border-radius: 0 0 4px 4px;
-  -moz-border-radius: 0 0 4px 4px;
-  border-radius: 0 0 4px 4px;
-}
-.selectize-dropdown [data-selectable] {
-  cursor: pointer;
-  overflow: hidden;
-}
-.selectize-dropdown [data-selectable] .highlight {
-  background: rgba(255, 237, 40, 0.4);
-  -webkit-border-radius: 1px;
-  -moz-border-radius: 1px;
-  border-radius: 1px;
-}
-.selectize-dropdown [data-selectable],
-.selectize-dropdown .optgroup-header {
-  padding: 3px 10px;
-}
-.selectize-dropdown .optgroup:first-child .optgroup-header {
-  border-top: 0 none;
-}
-.selectize-dropdown .optgroup-header {
-  color: #999999;
-  background: #ffffff;
-  cursor: default;
-}
-.selectize-dropdown .active {
-  background-color: #0088cc;
-  color: #ffffff;
-}
-.selectize-dropdown .active.create {
-  color: #ffffff;
-}
-.selectize-dropdown .create {
-  color: rgba(51, 51, 51, 0.5);
-}
-.selectize-dropdown-content {
-  overflow-y: auto;
-  overflow-x: hidden;
-  max-height: 200px;
-  -webkit-overflow-scrolling: touch;
-}
-.selectize-control.single .selectize-input,
-.selectize-control.single .selectize-input input {
-  cursor: pointer;
-}
-.selectize-control.single .selectize-input.input-active,
-.selectize-control.single .selectize-input.input-active input {
-  cursor: text;
-}
-.selectize-control.single .selectize-input:after {
-  content: ' ';
-  display: block;
-  position: absolute;
-  top: 50%;
-  right: 15px;
-  margin-top: -3px;
-  width: 0;
-  height: 0;
-  border-style: solid;
-  border-width: 5px 5px 0 5px;
-  border-color: #000000 transparent transparent transparent;
-}
-.selectize-control.single .selectize-input.dropdown-active:after {
-  margin-top: -4px;
-  border-width: 0 5px 5px 5px;
-  border-color: transparent transparent #000000 transparent;
-}
-.selectize-control.rtl.single .selectize-input:after {
-  left: 15px;
-  right: auto;
-}
-.selectize-control.rtl .selectize-input > input {
-  margin: 0 4px 0 -2px !important;
-}
-.selectize-control .selectize-input.disabled {
-  opacity: 0.5;
-  background-color: #ffffff;
-}
-.selectize-dropdown {
-  margin: 2px 0 0 0;
-  z-index: 1000;
-  border: 1px solid rgba(0, 0, 0, 0.2);
-  border-radius: 4px;
-  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-}
-.selectize-dropdown .optgroup-header {
-  font-size: 11px;
-  font-weight: bold;
-  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
-  text-transform: uppercase;
-}
-.selectize-dropdown .optgroup:first-child:before {
-  display: none;
-}
-.selectize-dropdown .optgroup:before {
-  content: ' ';
-  display: block;
-  *width: 100%;
-  height: 1px;
-  margin: 9px 1px;
-  *margin: -5px 0 5px;
-  overflow: hidden;
-  background-color: #e5e5e5;
-  border-bottom: 1px solid #ffffff;
-  margin-left: -10px;
-  margin-right: -10px;
-}
-.selectize-dropdown [data-selectable].active {
-  background-color: #0081c2;
-  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
-  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
-  background-image: -o-linear-gradient(top, #0088cc, #0077b3);
-  background-image: linear-gradient(to bottom, #0088cc, #0077b3);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
-}
-.selectize-dropdown-content {
-  padding: 5px 0;
-}
-.selectize-dropdown-header {
-  padding: 6px 10px;
-}
-.selectize-input {
-  -webkit-transition: border linear .2s, box-shadow linear .2s;
-  -moz-transition: border linear .2s, box-shadow linear .2s;
-  -o-transition: border linear .2s, box-shadow linear .2s;
-  transition: border linear .2s, box-shadow linear .2s;
-}
-.selectize-input.dropdown-active {
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-.selectize-input.dropdown-active::before {
-  display: none;
-}
-.selectize-input.input-active,
-.selectize-input.input-active:hover,
-.selectize-control.multi .selectize-input.focus {
-  background: #ffffff !important;
-  border-color: rgba(82, 168, 236, 0.8) !important;
-  outline: 0 !important;
-  outline: thin dotted \9 !important;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important;
-  -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important;
-  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important;
-}
-.selectize-control.single .selectize-input {
-  color: #333333;
-  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-  background-color: #f5f5f5;
-  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
-  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
-  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
-  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
-  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-  *background-color: #e6e6e6;
-  /* Darken IE7 buttons by default so they stand out more given they won't have borders */
-  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-  -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-}
-.selectize-control.single .selectize-input:hover,
-.selectize-control.single .selectize-input:focus,
-.selectize-control.single .selectize-input:active,
-.selectize-control.single .selectize-input.active,
-.selectize-control.single .selectize-input.disabled,
-.selectize-control.single .selectize-input[disabled] {
-  color: #333333;
-  background-color: #e6e6e6;
-  *background-color: #d9d9d9;
-}
-.selectize-control.single .selectize-input:active,
-.selectize-control.single .selectize-input.active {
-  background-color: #cccccc \9;
-}
-.selectize-control.single .selectize-input:hover {
-  color: #333333;
-  text-decoration: none;
-  background-position: 0 -15px;
-  -webkit-transition: background-position 0.1s linear;
-  -moz-transition: background-position 0.1s linear;
-  -o-transition: background-position 0.1s linear;
-  transition: background-position 0.1s linear;
-}
-.selectize-control.single .selectize-input.disabled {
-  background: #e6e6e6 !important;
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-}
-.selectize-control.multi .selectize-input {
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-.selectize-control.multi .selectize-input.has-items {
-  padding-left: 7px;
-  padding-right: 7px;
-}
-.selectize-control.multi .selectize-input > div {
-  color: #333333;
-  text-shadow: none;
-  background-color: #f5f5f5;
-  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
-  background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
-  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
-  background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
-  border-color: #e6e6e6 #e6e6e6 #bfbfbf;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-  *background-color: #e6e6e6;
-  border: 1px solid #cccccc;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-  -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-}
-.selectize-control.multi .selectize-input > div.active {
-  -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-  -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-  box-shadow: 0 1px 2px rgba(0,0,0,.05);
-  color: #ffffff;
-  text-shadow: none;
-  background-color: #0081c2;
-  background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
-  background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
-  background-image: -o-linear-gradient(top, #0088cc, #0077b3);
-  background-image: linear-gradient(to bottom, #0088cc, #0077b3);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
-  border-color: #0077b3 #0077b3 #004466;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-  *background-color: #0088cc;
-  border: 1px solid #0088cc;
-}
\ No newline at end of file
diff --git a/js/jquery/plugins/selectize/selectize.bootstrap3.css b/js/jquery/plugins/selectize/selectize.bootstrap3.css
deleted file mode 100644 (file)
index 411d8d9..0000000
+++ /dev/null
@@ -1,408 +0,0 @@
-/**
- * selectize.bootstrap3.css (v0.12.4) - Bootstrap 3 Theme
- * Copyright (c) 2013–2015 Brian Reavis & contributors
- *
- * Licensed 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.
- *
- * @author Brian Reavis <brian@thirdroute.com>
- */
-.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
-  visibility: visible !important;
-  background: #f2f2f2 !important;
-  background: rgba(0, 0, 0, 0.06) !important;
-  border: 0 none !important;
-  -webkit-box-shadow: inset 0 0 12px 4px #ffffff;
-  box-shadow: inset 0 0 12px 4px #ffffff;
-}
-.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
-  content: '!';
-  visibility: hidden;
-}
-.selectize-control.plugin-drag_drop .ui-sortable-helper {
-  -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
-  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
-}
-.selectize-dropdown-header {
-  position: relative;
-  padding: 3px 12px;
-  border-bottom: 1px solid #d0d0d0;
-  background: #f8f8f8;
-  -webkit-border-radius: 4px 4px 0 0;
-  -moz-border-radius: 4px 4px 0 0;
-  border-radius: 4px 4px 0 0;
-}
-.selectize-dropdown-header-close {
-  position: absolute;
-  right: 12px;
-  top: 50%;
-  color: #333333;
-  opacity: 0.4;
-  margin-top: -12px;
-  line-height: 20px;
-  font-size: 20px !important;
-}
-.selectize-dropdown-header-close:hover {
-  color: #000000;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup {
-  border-right: 1px solid #f2f2f2;
-  border-top: 0 none;
-  float: left;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
-  border-right: 0 none;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
-  display: none;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
-  border-top: 0 none;
-}
-.selectize-control.plugin-remove_button [data-value] {
-  position: relative;
-  padding-right: 24px !important;
-}
-.selectize-control.plugin-remove_button [data-value] .remove {
-  z-index: 1;
-  /* fixes ie bug (see #392) */
-  position: absolute;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  width: 17px;
-  text-align: center;
-  font-weight: bold;
-  font-size: 12px;
-  color: inherit;
-  text-decoration: none;
-  vertical-align: middle;
-  display: inline-block;
-  padding: 1px 0 0 0;
-  border-left: 1px solid rgba(0, 0, 0, 0);
-  -webkit-border-radius: 0 2px 2px 0;
-  -moz-border-radius: 0 2px 2px 0;
-  border-radius: 0 2px 2px 0;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.selectize-control.plugin-remove_button [data-value] .remove:hover {
-  background: rgba(0, 0, 0, 0.05);
-}
-.selectize-control.plugin-remove_button [data-value].active .remove {
-  border-left-color: rgba(0, 0, 0, 0);
-}
-.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
-  background: none;
-}
-.selectize-control.plugin-remove_button .disabled [data-value] .remove {
-  border-left-color: rgba(77, 77, 77, 0);
-}
-.selectize-control.plugin-remove_button .remove-single {
-  position: absolute;
-  right: 28px;
-  top: 6px;
-  font-size: 23px;
-}
-.selectize-control {
-  position: relative;
-}
-.selectize-dropdown,
-.selectize-input,
-.selectize-input input {
-  color: #333333;
-  font-family: inherit;
-  font-size: inherit;
-  line-height: 20px;
-  -webkit-font-smoothing: inherit;
-}
-.selectize-input,
-.selectize-control.single .selectize-input.input-active {
-  background: #ffffff;
-  cursor: text;
-  display: inline-block;
-}
-.selectize-input {
-  border: 1px solid #cccccc;
-  padding: 6px 12px;
-  display: inline-block;
-  width: 100%;
-  overflow: hidden;
-  position: relative;
-  z-index: 1;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  -webkit-box-shadow: none;
-  box-shadow: none;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-.selectize-control.multi .selectize-input.has-items {
-  padding: 5px 12px 2px;
-}
-.selectize-input.full {
-  background-color: #ffffff;
-}
-.selectize-input.disabled,
-.selectize-input.disabled * {
-  cursor: default !important;
-}
-.selectize-input.focus {
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
-}
-.selectize-input.dropdown-active {
-  -webkit-border-radius: 4px 4px 0 0;
-  -moz-border-radius: 4px 4px 0 0;
-  border-radius: 4px 4px 0 0;
-}
-.selectize-input > * {
-  vertical-align: baseline;
-  display: -moz-inline-stack;
-  display: inline-block;
-  zoom: 1;
-  *display: inline;
-}
-.selectize-control.multi .selectize-input > div {
-  cursor: pointer;
-  margin: 0 3px 3px 0;
-  padding: 1px 3px;
-  background: #efefef;
-  color: #333333;
-  border: 0 solid rgba(0, 0, 0, 0);
-}
-.selectize-control.multi .selectize-input > div.active {
-  background: #428bca;
-  color: #ffffff;
-  border: 0 solid rgba(0, 0, 0, 0);
-}
-.selectize-control.multi .selectize-input.disabled > div,
-.selectize-control.multi .selectize-input.disabled > div.active {
-  color: #808080;
-  background: #ffffff;
-  border: 0 solid rgba(77, 77, 77, 0);
-}
-.selectize-input > input {
-  display: inline-block !important;
-  padding: 0 !important;
-  min-height: 0 !important;
-  max-height: none !important;
-  max-width: 100% !important;
-  margin: 0 !important;
-  text-indent: 0 !important;
-  border: 0 none !important;
-  background: none !important;
-  line-height: inherit !important;
-  -webkit-user-select: auto !important;
-  -webkit-box-shadow: none !important;
-  box-shadow: none !important;
-}
-.selectize-input > input::-ms-clear {
-  display: none;
-}
-.selectize-input > input:focus {
-  outline: none !important;
-}
-.selectize-input::after {
-  content: ' ';
-  display: block;
-  clear: left;
-}
-.selectize-input.dropdown-active::before {
-  content: ' ';
-  display: block;
-  position: absolute;
-  background: #ffffff;
-  height: 1px;
-  bottom: 0;
-  left: 0;
-  right: 0;
-}
-.selectize-dropdown {
-  position: absolute;
-  z-index: 10;
-  border: 1px solid #d0d0d0;
-  background: #ffffff;
-  margin: -1px 0 0 0;
-  border-top: 0 none;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-  -webkit-border-radius: 0 0 4px 4px;
-  -moz-border-radius: 0 0 4px 4px;
-  border-radius: 0 0 4px 4px;
-}
-.selectize-dropdown [data-selectable] {
-  cursor: pointer;
-  overflow: hidden;
-}
-.selectize-dropdown [data-selectable] .highlight {
-  background: rgba(255, 237, 40, 0.4);
-  -webkit-border-radius: 1px;
-  -moz-border-radius: 1px;
-  border-radius: 1px;
-}
-.selectize-dropdown [data-selectable],
-.selectize-dropdown .optgroup-header {
-  padding: 3px 12px;
-}
-.selectize-dropdown .optgroup:first-child .optgroup-header {
-  border-top: 0 none;
-}
-.selectize-dropdown .optgroup-header {
-  color: #777777;
-  background: #ffffff;
-  cursor: default;
-}
-.selectize-dropdown .active {
-  background-color: #f5f5f5;
-  color: #262626;
-}
-.selectize-dropdown .active.create {
-  color: #262626;
-}
-.selectize-dropdown .create {
-  color: rgba(51, 51, 51, 0.5);
-}
-.selectize-dropdown-content {
-  overflow-y: auto;
-  overflow-x: hidden;
-  max-height: 200px;
-  -webkit-overflow-scrolling: touch;
-}
-.selectize-control.single .selectize-input,
-.selectize-control.single .selectize-input input {
-  cursor: pointer;
-}
-.selectize-control.single .selectize-input.input-active,
-.selectize-control.single .selectize-input.input-active input {
-  cursor: text;
-}
-.selectize-control.single .selectize-input:after {
-  content: ' ';
-  display: block;
-  position: absolute;
-  top: 50%;
-  right: 17px;
-  margin-top: -3px;
-  width: 0;
-  height: 0;
-  border-style: solid;
-  border-width: 5px 5px 0 5px;
-  border-color: #333333 transparent transparent transparent;
-}
-.selectize-control.single .selectize-input.dropdown-active:after {
-  margin-top: -4px;
-  border-width: 0 5px 5px 5px;
-  border-color: transparent transparent #333333 transparent;
-}
-.selectize-control.rtl.single .selectize-input:after {
-  left: 17px;
-  right: auto;
-}
-.selectize-control.rtl .selectize-input > input {
-  margin: 0 4px 0 -2px !important;
-}
-.selectize-control .selectize-input.disabled {
-  opacity: 0.5;
-  background-color: #ffffff;
-}
-.selectize-dropdown,
-.selectize-dropdown.form-control {
-  height: auto;
-  padding: 0;
-  margin: 2px 0 0 0;
-  z-index: 1000;
-  background: #ffffff;
-  border: 1px solid #cccccc;
-  border: 1px solid rgba(0, 0, 0, 0.15);
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-}
-.selectize-dropdown .optgroup-header {
-  font-size: 12px;
-  line-height: 1.42857143;
-}
-.selectize-dropdown .optgroup:first-child:before {
-  display: none;
-}
-.selectize-dropdown .optgroup:before {
-  content: ' ';
-  display: block;
-  height: 1px;
-  margin: 9px 0;
-  overflow: hidden;
-  background-color: #e5e5e5;
-  margin-left: -12px;
-  margin-right: -12px;
-}
-.selectize-dropdown-content {
-  padding: 5px 0;
-}
-.selectize-dropdown-header {
-  padding: 6px 12px;
-}
-.selectize-input {
-  min-height: 34px;
-}
-.selectize-input.dropdown-active {
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-}
-.selectize-input.dropdown-active::before {
-  display: none;
-}
-.selectize-input.focus {
-  border-color: #66afe9;
-  outline: 0;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-.has-error .selectize-input {
-  border-color: #a94442;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-.has-error .selectize-input:focus {
-  border-color: #843534;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
-}
-.selectize-control.multi .selectize-input.has-items {
-  padding-left: 9px;
-  padding-right: 9px;
-}
-.selectize-control.multi .selectize-input > div {
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-}
-.form-control.selectize-control {
-  padding: 0;
-  height: auto;
-  border: none;
-  background: none;
-  -webkit-box-shadow: none;
-  box-shadow: none;
-  -webkit-border-radius: 0;
-  -moz-border-radius: 0;
-  border-radius: 0;
-}
\ No newline at end of file
diff --git a/js/jquery/plugins/selectize/selectize.css b/js/jquery/plugins/selectize/selectize.css
deleted file mode 100644 (file)
index 96d0e19..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-/**
- * selectize.css (v0.12.4)
- * Copyright (c) 2013–2015 Brian Reavis & contributors
- *
- * Licensed 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.
- *
- * @author Brian Reavis <brian@thirdroute.com>
- */
-
-.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
-  visibility: visible !important;
-  background: #f2f2f2 !important;
-  background: rgba(0, 0, 0, 0.06) !important;
-  border: 0 none !important;
-  -webkit-box-shadow: inset 0 0 12px 4px #ffffff;
-  box-shadow: inset 0 0 12px 4px #ffffff;
-}
-.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
-  content: '!';
-  visibility: hidden;
-}
-.selectize-control.plugin-drag_drop .ui-sortable-helper {
-  -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
-  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
-}
-.selectize-dropdown-header {
-  position: relative;
-  padding: 5px 8px;
-  border-bottom: 1px solid #d0d0d0;
-  background: #f8f8f8;
-  -webkit-border-radius: 3px 3px 0 0;
-  -moz-border-radius: 3px 3px 0 0;
-  border-radius: 3px 3px 0 0;
-}
-.selectize-dropdown-header-close {
-  position: absolute;
-  right: 8px;
-  top: 50%;
-  color: #303030;
-  opacity: 0.4;
-  margin-top: -12px;
-  line-height: 20px;
-  font-size: 20px !important;
-}
-.selectize-dropdown-header-close:hover {
-  color: #000000;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup {
-  border-right: 1px solid #f2f2f2;
-  border-top: 0 none;
-  float: left;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
-  border-right: 0 none;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
-  display: none;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
-  border-top: 0 none;
-}
-.selectize-control.plugin-remove_button [data-value] {
-  position: relative;
-  padding-right: 24px !important;
-}
-.selectize-control.plugin-remove_button [data-value] .remove {
-  z-index: 1;
-  /* fixes ie bug (see #392) */
-  position: absolute;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  width: 17px;
-  text-align: center;
-  font-weight: bold;
-  font-size: 12px;
-  color: inherit;
-  text-decoration: none;
-  vertical-align: middle;
-  display: inline-block;
-  padding: 2px 0 0 0;
-  border-left: 1px solid #d0d0d0;
-  -webkit-border-radius: 0 2px 2px 0;
-  -moz-border-radius: 0 2px 2px 0;
-  border-radius: 0 2px 2px 0;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.selectize-control.plugin-remove_button [data-value] .remove:hover {
-  background: rgba(0, 0, 0, 0.05);
-}
-.selectize-control.plugin-remove_button [data-value].active .remove {
-  border-left-color: #cacaca;
-}
-.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
-  background: none;
-}
-.selectize-control.plugin-remove_button .disabled [data-value] .remove {
-  border-left-color: #ffffff;
-}
-.selectize-control.plugin-remove_button .remove-single {
-  position: absolute;
-  right: 28px;
-  top: 6px;
-  font-size: 23px;
-}
-.selectize-control {
-  position: relative;
-}
-.selectize-dropdown,
-.selectize-input,
-.selectize-input input {
-  color: #303030;
-  font-family: inherit;
-  font-size: 13px;
-  line-height: 18px;
-  -webkit-font-smoothing: inherit;
-}
-.selectize-input,
-.selectize-control.single .selectize-input.input-active {
-  background: #ffffff;
-  cursor: text;
-  display: inline-block;
-}
-.selectize-input {
-  border: 1px solid #d0d0d0;
-  padding: 8px 8px;
-  display: inline-block;
-  width: 100%;
-  overflow: hidden;
-  position: relative;
-  z-index: 1;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-}
-.selectize-control.multi .selectize-input.has-items {
-  padding: 6px 8px 3px;
-}
-.selectize-input.full {
-  background-color: #ffffff;
-}
-.selectize-input.disabled,
-.selectize-input.disabled * {
-  cursor: default !important;
-}
-.selectize-input.focus {
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
-}
-.selectize-input.dropdown-active {
-  -webkit-border-radius: 3px 3px 0 0;
-  -moz-border-radius: 3px 3px 0 0;
-  border-radius: 3px 3px 0 0;
-}
-.selectize-input > * {
-  vertical-align: baseline;
-  display: -moz-inline-stack;
-  display: inline-block;
-  zoom: 1;
-  *display: inline;
-}
-.selectize-control.multi .selectize-input > div {
-  cursor: pointer;
-  margin: 0 3px 3px 0;
-  padding: 2px 6px;
-  background: #f2f2f2;
-  color: #303030;
-  border: 0 solid #d0d0d0;
-}
-.selectize-control.multi .selectize-input > div.active {
-  background: #e8e8e8;
-  color: #303030;
-  border: 0 solid #cacaca;
-}
-.selectize-control.multi .selectize-input.disabled > div,
-.selectize-control.multi .selectize-input.disabled > div.active {
-  color: #7d7d7d;
-  background: #ffffff;
-  border: 0 solid #ffffff;
-}
-.selectize-input > input {
-  display: inline-block !important;
-  padding: 0 !important;
-  min-height: 0 !important;
-  max-height: none !important;
-  max-width: 100% !important;
-  margin: 0 2px 0 0 !important;
-  text-indent: 0 !important;
-  border: 0 none !important;
-  background: none !important;
-  line-height: inherit !important;
-  -webkit-user-select: auto !important;
-  -webkit-box-shadow: none !important;
-  box-shadow: none !important;
-}
-.selectize-input > input::-ms-clear {
-  display: none;
-}
-.selectize-input > input:focus {
-  outline: none !important;
-}
-.selectize-input::after {
-  content: ' ';
-  display: block;
-  clear: left;
-}
-.selectize-input.dropdown-active::before {
-  content: ' ';
-  display: block;
-  position: absolute;
-  background: #f0f0f0;
-  height: 1px;
-  bottom: 0;
-  left: 0;
-  right: 0;
-}
-.selectize-dropdown {
-  position: absolute;
-  z-index: 10;
-  border: 1px solid #d0d0d0;
-  background: #ffffff;
-  margin: -1px 0 0 0;
-  border-top: 0 none;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-  -webkit-border-radius: 0 0 3px 3px;
-  -moz-border-radius: 0 0 3px 3px;
-  border-radius: 0 0 3px 3px;
-}
-.selectize-dropdown [data-selectable] {
-  cursor: pointer;
-  overflow: hidden;
-}
-.selectize-dropdown [data-selectable] .highlight {
-  background: rgba(125, 168, 208, 0.2);
-  -webkit-border-radius: 1px;
-  -moz-border-radius: 1px;
-  border-radius: 1px;
-}
-.selectize-dropdown [data-selectable],
-.selectize-dropdown .optgroup-header {
-  padding: 5px 8px;
-}
-.selectize-dropdown .optgroup:first-child .optgroup-header {
-  border-top: 0 none;
-}
-.selectize-dropdown .optgroup-header {
-  color: #303030;
-  background: #ffffff;
-  cursor: default;
-}
-.selectize-dropdown .active {
-  background-color: #f5fafd;
-  color: #495c68;
-}
-.selectize-dropdown .active.create {
-  color: #495c68;
-}
-.selectize-dropdown .create {
-  color: rgba(48, 48, 48, 0.5);
-}
-.selectize-dropdown-content {
-  overflow-y: auto;
-  overflow-x: hidden;
-  max-height: 200px;
-  -webkit-overflow-scrolling: touch;
-}
-.selectize-control.single .selectize-input,
-.selectize-control.single .selectize-input input {
-  cursor: pointer;
-}
-.selectize-control.single .selectize-input.input-active,
-.selectize-control.single .selectize-input.input-active input {
-  cursor: text;
-}
-.selectize-control.single .selectize-input:after {
-  content: ' ';
-  display: block;
-  position: absolute;
-  top: 50%;
-  right: 15px;
-  margin-top: -3px;
-  width: 0;
-  height: 0;
-  border-style: solid;
-  border-width: 5px 5px 0 5px;
-  border-color: #808080 transparent transparent transparent;
-}
-.selectize-control.single .selectize-input.dropdown-active:after {
-  margin-top: -4px;
-  border-width: 0 5px 5px 5px;
-  border-color: transparent transparent #808080 transparent;
-}
-.selectize-control.rtl.single .selectize-input:after {
-  left: 15px;
-  right: auto;
-}
-.selectize-control.rtl .selectize-input > input {
-  margin: 0 4px 0 -2px !important;
-}
-.selectize-control .selectize-input.disabled {
-  opacity: 0.5;
-  background-color: #fafafa;
-}
\ No newline at end of file
diff --git a/js/jquery/plugins/selectize/selectize.default.css b/js/jquery/plugins/selectize/selectize.default.css
deleted file mode 100644 (file)
index eed1314..0000000
+++ /dev/null
@@ -1,394 +0,0 @@
-/**
- * selectize.default.css (v0.12.4) - Default Theme
- * Copyright (c) 2013–2015 Brian Reavis & contributors
- *
- * Licensed 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.
- *
- * @author Brian Reavis <brian@thirdroute.com>
- */
-.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
-  visibility: visible !important;
-  background: #f2f2f2 !important;
-  background: rgba(0, 0, 0, 0.06) !important;
-  border: 0 none !important;
-  -webkit-box-shadow: inset 0 0 12px 4px #ffffff;
-  box-shadow: inset 0 0 12px 4px #ffffff;
-}
-.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
-  content: '!';
-  visibility: hidden;
-}
-.selectize-control.plugin-drag_drop .ui-sortable-helper {
-  -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
-  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
-}
-.selectize-dropdown-header {
-  position: relative;
-  padding: 5px 8px;
-  border-bottom: 1px solid #d0d0d0;
-  background: #f8f8f8;
-  -webkit-border-radius: 3px 3px 0 0;
-  -moz-border-radius: 3px 3px 0 0;
-  border-radius: 3px 3px 0 0;
-}
-.selectize-dropdown-header-close {
-  position: absolute;
-  right: 8px;
-  top: 50%;
-  color: #303030;
-  opacity: 0.4;
-  margin-top: -12px;
-  line-height: 20px;
-  font-size: 20px !important;
-}
-.selectize-dropdown-header-close:hover {
-  color: #000000;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup {
-  border-right: 1px solid #f2f2f2;
-  border-top: 0 none;
-  float: left;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
-  border-right: 0 none;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
-  display: none;
-}
-.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
-  border-top: 0 none;
-}
-.selectize-control.plugin-remove_button [data-value] {
-  position: relative;
-  padding-right: 24px !important;
-}
-.selectize-control.plugin-remove_button [data-value] .remove {
-  z-index: 1;
-  /* fixes ie bug (see #392) */
-  position: absolute;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  width: 17px;
-  text-align: center;
-  font-weight: bold;
-  font-size: 12px;
-  color: inherit;
-  text-decoration: none;
-  vertical-align: middle;
-  display: inline-block;
-  padding: 2px 0 0 0;
-  border-left: 1px solid #0073bb;
-  -webkit-border-radius: 0 2px 2px 0;
-  -moz-border-radius: 0 2px 2px 0;
-  border-radius: 0 2px 2px 0;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.selectize-control.plugin-remove_button [data-value] .remove:hover {
-  background: rgba(0, 0, 0, 0.05);
-}
-.selectize-control.plugin-remove_button [data-value].active .remove {
-  border-left-color: #00578d;
-}
-.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
-  background: none;
-}
-.selectize-control.plugin-remove_button .disabled [data-value] .remove {
-  border-left-color: #aaaaaa;
-}
-.selectize-control.plugin-remove_button .remove-single {
-  position: absolute;
-  right: 28px;
-  top: 6px;
-  font-size: 23px;
-}
-.selectize-control {
-  position: relative;
-}
-.selectize-dropdown,
-.selectize-input,
-.selectize-input input {
-  color: #303030;
-  font-family: inherit;
-  font-size: 13px;
-  line-height: 13px;
-  -webkit-font-smoothing: inherit;
-}
-.selectize-input,
-.selectize-control.single .selectize-input.input-active {
-  background: #ffffff;
-  cursor: text;
-  display: inline-block;
-}
-.selectize-input {
-  border: 1px solid #d0d0d0;
-  padding: 8px 8px;
-  display: inline-block;
-  width: 100%;
-  overflow: hidden;
-  position: relative;
-  z-index: 1;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-}
-.selectize-control.multi .selectize-input.has-items {
-  padding: 5px 8px 2px;
-}
-.selectize-input.full {
-  background-color: #ffffff;
-}
-.selectize-input.disabled,
-.selectize-input.disabled * {
-  cursor: default !important;
-}
-.selectize-input.focus {
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
-}
-.selectize-input.dropdown-active {
-  -webkit-border-radius: 3px 3px 0 0;
-  -moz-border-radius: 3px 3px 0 0;
-  border-radius: 3px 3px 0 0;
-}
-.selectize-input > * {
-  vertical-align: baseline;
-  display: -moz-inline-stack;
-  display: inline-block;
-  zoom: 1;
-  *display: inline;
-}
-.selectize-control.multi .selectize-input > div {
-  cursor: pointer;
-  margin: 0 3px 3px 0;
-  padding: 2px 6px;
-  background: #1da7ee;
-  color: #ffffff;
-  border: 1px solid #0073bb;
-}
-.selectize-control.multi .selectize-input > div.active {
-  background: #92c836;
-  color: #ffffff;
-  border: 1px solid #00578d;
-}
-.selectize-control.multi .selectize-input.disabled > div,
-.selectize-control.multi .selectize-input.disabled > div.active {
-  color: #ffffff;
-  background: #d2d2d2;
-  border: 1px solid #aaaaaa;
-}
-.selectize-input > input {
-  display: inline-block !important;
-  padding: 0 !important;
-  min-height: 0 !important;
-  max-height: none !important;
-  max-width: 100% !important;
-  margin: 0 1px !important;
-  text-indent: 0 !important;
-  border: 0 none !important;
-  background: none !important;
-  line-height: inherit !important;
-  -webkit-user-select: auto !important;
-  -webkit-box-shadow: none !important;
-  box-shadow: none !important;
-}
-.selectize-input > input::-ms-clear {
-  display: none;
-}
-.selectize-input > input:focus {
-  outline: none !important;
-}
-.selectize-input::after {
-  content: ' ';
-  display: block;
-  clear: left;
-}
-.selectize-input.dropdown-active::before {
-  content: ' ';
-  display: block;
-  position: absolute;
-  background: #f0f0f0;
-  height: 1px;
-  bottom: 0;
-  left: 0;
-  right: 0;
-}
-.selectize-dropdown {
-  position: absolute;
-  z-index: 10;
-  border: 1px solid #d0d0d0;
-  background: #ffffff;
-  margin: -1px 0 0 0;
-  border-top: 0 none;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-  -webkit-border-radius: 0 0 3px 3px;
-  -moz-border-radius: 0 0 3px 3px;
-  border-radius: 0 0 3px 3px;
-}
-.selectize-dropdown [data-selectable] {
-  cursor: pointer;
-  overflow: hidden;
-}
-.selectize-dropdown [data-selectable] .highlight {
-  background: rgba(125, 168, 208, 0.2);
-  -webkit-border-radius: 1px;
-  -moz-border-radius: 1px;
-  border-radius: 1px;
-}
-.selectize-dropdown [data-selectable],
-.selectize-dropdown .optgroup-header {
-  padding: 5px 8px;
-}
-.selectize-dropdown .optgroup:first-child .optgroup-header {
-  border-top: 0 none;
-}
-.selectize-dropdown .optgroup-header {
-  color: #303030;
-  background: #ffffff;
-  cursor: default;
-}
-.selectize-dropdown .active {
-  background-color: #f5fafd;
-  color: #495c68;
-}
-.selectize-dropdown .active.create {
-  color: #495c68;
-}
-.selectize-dropdown .create {
-  color: rgba(48, 48, 48, 0.5);
-}
-.selectize-dropdown-content {
-  overflow-y: auto;
-  overflow-x: hidden;
-  max-height: 200px;
-  -webkit-overflow-scrolling: touch;
-}
-.selectize-control.single .selectize-input,
-.selectize-control.single .selectize-input input {
-  cursor: pointer;
-}
-.selectize-control.single .selectize-input.input-active,
-.selectize-control.single .selectize-input.input-active input {
-  cursor: text;
-}
-.selectize-control.single .selectize-input:after {
-  content: ' ';
-  display: block;
-  position: absolute;
-  top: 50%;
-  right: 15px;
-  margin-top: -3px;
-  width: 0;
-  height: 0;
-  border-style: solid;
-  border-width: 5px 5px 0 5px;
-  border-color: #808080 transparent transparent transparent;
-}
-.selectize-control.single .selectize-input.dropdown-active:after {
-  margin-top: -4px;
-  border-width: 0 5px 5px 5px;
-  border-color: transparent transparent #808080 transparent;
-}
-.selectize-control.rtl.single .selectize-input:after {
-  left: 15px;
-  right: auto;
-}
-.selectize-control.rtl .selectize-input > input {
-  margin: 0 4px 0 -2px !important;
-}
-.selectize-control .selectize-input.disabled {
-  opacity: 0.5;
-  background-color: #fafafa;
-}
-.selectize-control.multi .selectize-input.has-items {
-  padding-left: 5px;
-  padding-right: 5px;
-}
-.selectize-control.multi .selectize-input.disabled [data-value] {
-  color: #999;
-  text-shadow: none;
-  background: none;
-  -webkit-box-shadow: none;
-  box-shadow: none;
-}
-.selectize-control.multi .selectize-input.disabled [data-value],
-.selectize-control.multi .selectize-input.disabled [data-value] .remove {
-  border-color: #e6e6e6;
-}
-.selectize-control.multi .selectize-input.disabled [data-value] .remove {
-  background: none;
-}
-.selectize-control.multi .selectize-input [data-value] {
-  text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);
-  -webkit-border-radius: 3px;
-  -moz-border-radius: 3px;
-  border-radius: 3px;
-  background-color: #1b9dec;
-  background-image: -moz-linear-gradient(top, #1da7ee, #178ee9);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1da7ee), to(#178ee9));
-  background-image: -webkit-linear-gradient(top, #1da7ee, #178ee9);
-  background-image: -o-linear-gradient(top, #1da7ee, #178ee9);
-  background-image: linear-gradient(to bottom, #1da7ee, #178ee9);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1da7ee', endColorstr='#ff178ee9', GradientType=0);
-  -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
-  box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
-}
-.selectize-control.multi .selectize-input [data-value].active {
-  background-color: #0085d4;
-  background-image: -moz-linear-gradient(top, #008fd8, #0075cf);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#008fd8), to(#0075cf));
-  background-image: -webkit-linear-gradient(top, #008fd8, #0075cf);
-  background-image: -o-linear-gradient(top, #008fd8, #0075cf);
-  background-image: linear-gradient(to bottom, #008fd8, #0075cf);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff008fd8', endColorstr='#ff0075cf', GradientType=0);
-}
-.selectize-control.single .selectize-input {
-  -webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
-  box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
-  background-color: #f9f9f9;
-  background-image: -moz-linear-gradient(top, #fefefe, #f2f2f2);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fefefe), to(#f2f2f2));
-  background-image: -webkit-linear-gradient(top, #fefefe, #f2f2f2);
-  background-image: -o-linear-gradient(top, #fefefe, #f2f2f2);
-  background-image: linear-gradient(to bottom, #fefefe, #f2f2f2);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffefefe', endColorstr='#fff2f2f2', GradientType=0);
-}
-.selectize-control.single .selectize-input,
-.selectize-dropdown.single {
-  border-color: #b8b8b8;
-}
-.selectize-dropdown .optgroup-header {
-  padding-top: 7px;
-  font-weight: bold;
-  font-size: 0.85em;
-}
-.selectize-dropdown .optgroup {
-  border-top: 1px solid #f0f0f0;
-}
-.selectize-dropdown .optgroup:first-child {
-  border-top: 0 none;
-}
diff --git a/new_bug.cgi b/new_bug.cgi
deleted file mode 100755 (executable)
index edc53e9..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/usr/bin/env perl
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This Source Code Form is "Incompatible With Secondary Licenses", as
-# defined by the Mozilla Public License, v. 2.0.
-#
-# Contributor(s): Sebastin Santy <sebastinssanty@gmail.com>
-#
-##############################################################################
-#
-# new_bug.cgi
-# -------------
-# Single page interface to file bugs
-#
-##############################################################################
-
-use 5.10.1;
-use strict;
-use warnings;
-
-use lib qw(. lib local/lib/perl5);
-
-use Bugzilla;
-use Bugzilla::Constants;
-use Bugzilla::Util;
-use Bugzilla::Error;
-use Bugzilla::Bug;
-use Bugzilla::User;
-use Bugzilla::Hook;
-use Bugzilla::Product;
-use Bugzilla::Classification;
-use Bugzilla::Keyword;
-use Bugzilla::Token;
-use Bugzilla::Field;
-use Bugzilla::Status;
-use Bugzilla::UserAgent;
-use Bugzilla::BugMail;
-
-use List::MoreUtils qw(uniq);
-
-my $user = Bugzilla->login(LOGIN_REQUIRED);
-
-my $cgi      = Bugzilla->cgi;
-my $template = Bugzilla->template;
-my $vars     = {};
-my $dbh      = Bugzilla->dbh;
-
-if (lc($cgi->request_method) eq 'post') {
-  my $token = $cgi->param('token');
-  check_hash_token($token, ['new_bug']);
-  my @keywords   = $cgi->param('keywords');
-  my @groups     = $cgi->param('groups');
-  my @cc         = split /\s*,\s*/, $cgi->param('cc');
-  my @bug_mentor = split /\s*,\s*/, $cgi->param('bug_mentor');
-  my $new_bug    = Bugzilla::Bug->create({
-    short_desc   => scalar($cgi->param('short_desc')),
-    product      => scalar($cgi->param('product')),
-    component    => scalar($cgi->param('component')),
-    bug_type     => scalar($cgi->param('bug_type')),
-    bug_severity => 'normal',
-    groups       => \@groups,
-    op_sys       => 'Unspecified',
-    rep_platform => 'Unspecified',
-    version      => scalar($cgi->param('version')),
-    keywords     => \@keywords,
-    cc           => \@cc,
-    comment      => scalar($cgi->param('comment')),
-    dependson    => scalar($cgi->param('dependson')),
-    blocked      => scalar($cgi->param('blocked')),
-    assigned_to  => scalar($cgi->param('assigned_to')),
-    bug_mentors  => \@bug_mentor,
-  });
-  delete_token($token);
-
-  my $data_fh = $cgi->upload('data');
-
-  if ($data_fh) {
-    my $content_type = Bugzilla::Attachment::get_content_type();
-    my $attachment;
-
-    my $error_mode_cache = Bugzilla->error_mode;
-    Bugzilla->error_mode(ERROR_MODE_DIE);
-    my $timestamp
-      = $dbh->selectrow_array('SELECT creation_ts FROM bugs WHERE bug_id = ?',
-      undef, $new_bug->bug_id);
-    eval {
-      $attachment = Bugzilla::Attachment->create({
-        bug         => $new_bug,
-        creation_ts => $timestamp,
-        data        => $data_fh,
-        description => scalar $cgi->param('description'),
-        filename    => $data_fh,
-        ispatch     => 0,
-        isprivate   => 0,
-        mimetype    => $content_type,
-      });
-    };
-    Bugzilla->error_mode($error_mode_cache);
-
-    unless ($attachment) {
-      $vars->{'message'} = 'attachment_creation_failed';
-    }
-  }
-
-  my $recipients = {changer => $user};
-  my $bug_sent = Bugzilla::BugMail::Send($new_bug->bug_id, $recipients);
-  $bug_sent->{type} = 'created';
-  $bug_sent->{id}   = $new_bug->bug_id;
-  my @all_mail_results = ($bug_sent);
-
-  foreach my $dep (@{$new_bug->dependson || []}, @{$new_bug->blocked || []}) {
-    my $dep_sent = Bugzilla::BugMail::Send($dep, $recipients);
-    $dep_sent->{type} = 'dep';
-    $dep_sent->{id}   = $dep;
-    push(@all_mail_results, $dep_sent);
-  }
-
-  # Sending emails for any referenced bugs.
-  foreach my $ref_bug_id (uniq @{$new_bug->{see_also_changes} || []}) {
-    my $ref_sent = Bugzilla::BugMail::Send($ref_bug_id, $recipients);
-    $ref_sent->{id} = $ref_bug_id;
-    push(@all_mail_results, $ref_sent);
-  }
-
-  $cgi->base_redirect('show_bug.cgi?id=' . $new_bug->bug_id);
-}
-else {
-  print $cgi->header();
-  $template->process("bug/new_bug.html.tmpl", $vars)
-    or ThrowTemplateError($template->error());
-}
-
diff --git a/template/en/default/bug/new_bug.html.tmpl b/template/en/default/bug/new_bug.html.tmpl
deleted file mode 100644 (file)
index 8f592ba..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-[%# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This Source Code Form is "Incompatible With Secondary Licenses", as
-# defined by the Mozilla Public License, v. 2.0.%]
-
-[% PROCESS global/variables.none.tmpl %]
-[% title = BLOCK %]Enter [% terms.Bug %] [% END %]
-[% PROCESS bug_modal/common_header.html.tmpl
-    title = title
-    jquery = [ "selectize" ]
-    jquery_css = [ "js/jquery/plugins/selectize/selectize.bootstrap3.css" ]
-    javascript_urls = ['extensions/BugModal/web/new_bug.js']
-    style_urls = ['extensions/BugModal/web/new_bug.css']
-%]
-[% PROCESS global/header.html.tmpl %]
-
-<div style="display: none" id="xhr-error"></div>
-<form name="newbugform" id="newbugform" method="post" action="[% basepath FILTER none %]new_bug.cgi" enctype="multipart/form-data">
-  <input type="hidden" value="[% issue_hash_token(['new_bug']) FILTER html %]" name="token">
-  <div class="new-bug-container">
-    <div class="new-bug">
-      <div class="new-bug-pad">
-      </div>
-      <div class="new-bug-title">
-        <h2>Create New [% terms.Bug %]</h2>
-        <p>
-          Before reporting a [% terms.bug %], make sure you've read our
-          <a href="https://developer.mozilla.org/docs/Mozilla/QA/Bug_writing_guidelines">
-          [% terms.bug %] writing guidelines</a> and double checked that your [% terms.bug %] hasn't already
-          been reported. Consult our list of <a href="https://bugzilla.mozilla.org/duplicates.cgi">
-          most frequently reported [% terms.bugs %]</a> and <a href="https://bugzilla.mozilla.org/query.cgi">
-          search through descriptions</a> of previously reported [% terms.bugs %].
-        </p>
-      </div>
-      <div class="new-bug-pad">
-      </div>
-    </div>
-    <div class="new-bug">
-      <div class="new-bug-pad">
-      </div>
-      <div class="new-bug-split-2">
-        [% WRAPPER bug_modal/module.html.tmpl title = "" %]
-        [%# summary %]
-        [% INCLUDE bug_modal/field.html.tmpl
-            field = bug_fields.short_desc
-            field_type = constants.FIELD_TYPE_FREETEXT
-            edit_only = 1
-            editable = 1
-            required = 1
-            help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#short_desc"
-        %]
-
-        [% INCLUDE new_comment %]
-        <input name="groups" value="core-security" id="group_core-security" type="checkbox"> Many users could be harmed by this security problem:
-        it should be kept hidden from the public until it is resolved <br>
-        [% END %]
-        [% WRAPPER bug_modal/module.html.tmpl title = "Attach a File" collapsed = 1 %]
-        <div class="file-container">
-          <input type="file" style="display: inline-block;" id="data" name="data" size="50">
-          <button id="reset" style="display: none;">Reset</button>
-        </div>
-          <label for="description" style="display: inline-block;">Description:</label>
-          <input type="text" id="description" name="description" class="required"
-         size="60" maxlength="200" style="display: inline-block;">
-         <input type="radio" id="autodetect"
-     name="contenttypemethod" value="autodetect" checked="checked" style="display:none">
-        [% END %]
-        <button type="submit" id="create-btn" class="create-btn major">Submit</button>
-      </div>
-      <div class="new-bug-split-1">
-        [% WRAPPER bug_modal/module.html.tmpl title = "Status" %]
-          [% can_edit_product   = bug.check_can_change_field("product", 0, 1) %]
-          [% filtered_product   = bug.product_obj.name FILTER uri %]
-          [% filtered_component = bug.component_obj.name FILTER uri %]
-          <div id="product_wrap">
-          [% WRAPPER bug_modal/field.html.tmpl
-              field        = bug_fields.product
-              field_type   = constants.FIELD_TYPE_SINGLE_SELECT
-              edit_only = 1
-              editable = 1
-              help         = basepath _ "describecomponents.cgi?product=$filtered_product"
-          %]
-
-            <span aria-owns="product-name product-latch">
-              <span role="button" aria-label="show product information" aria-expanded="false" tabindex="0"
-                    class="spin-latch" id="product-latch" data-latch="product" data-for="product">&#9656;</span>
-              <div title="show product information" tabindex="0" class="spin-toggle"
-                  id="product-name" data-latch="product" data-for="product">
-                [% bug.product FILTER html %]
-              </div>
-              <div id="product-info" style="display:none">
-                [% bug.product_obj.description FILTER html_light %]
-              </div>
-            </span>
-          [% END %]
-          </div>
-          [% INCLUDE bug_modal/field.html.tmpl
-              field          = bug_fields.product
-              field_type     = constants.FIELD_TYPE_SINGLE_SELECT
-              hide_on_view   = 1
-              hide_on_edit   = !can_edit_product
-              append_content = 1
-              help           = basepath _ "describecomponents.cgi?product=$filtered_product" %]
-
-          [%# component %]
-          [% WRAPPER bug_modal/field.html.tmpl
-              field      = bug_fields.component
-              field_type = constants.FIELD_TYPE_SINGLE_SELECT
-              help       = basepath _ "describecomponents.cgi?product=$filtered_product&component=$filtered_component#$filtered_component"
-              edit_only = 1
-              editable = 1
-          %]
-            <span aria-owns="component-name component-latch">
-              <span role="button" aria-label="show component description" aria-expanded="false" tabindex="0"
-                    class="spin-latch" id="component-latch" data-latch="component" data-for="component">&#9656;</span>
-              <div title="show component information" tabindex="0" class="spin-toggle" id="component-name"
-                  data-latch="#component-latch" data-for="component">
-                  [% bug.component FILTER html %]
-              </div>
-              <div id="component-info" style="display:none">
-                <div>[% bug.component_obj.description FILTER html_light %]</div>
-                <a href="[% basepath FILTER none %]buglist.cgi?component=[% bug.component FILTER uri %]&amp;
-                        [%~ %]product=[% bug.product FILTER uri %]&amp;
-                        [%~ %]bug_status=__open__" target="_blank">Other [% terms.Bugs %]</a>
-              </div>
-            </span>
-          [% END %]
-
-          [% INCLUDE bug_modal/field.html.tmpl
-            field = bug_fields.version
-            field_type = constants.FIELD_TYPE_SINGLE_SELECT
-            help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#version"
-            edit_only = 1
-            editable = 1
-          %]
-
-          [% INCLUDE bug_modal/field.html.tmpl
-            field = bug_fields.bug_type
-            field_type = constants.FIELD_TYPE_SINGLE_SELECT
-            help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#bug_type"
-            edit_only = 1
-            editable = 1
-          %]
-        [% END %]
-        [% WRAPPER bug_modal/module.html.tmpl title = "Tracking" %]
-          [%# keywords %]
-          [% INCLUDE bug_modal/field.html.tmpl
-              field = bug_fields.keywords
-              field_type = constants.FIELD_TYPE_MULTI_SELECT
-              edit_only = 1
-              editable = 1
-              help = basepath _ "describekeywords.cgi"
-          %]
-
-          [% WRAPPER bug_modal/field.html.tmpl
-              field = bug_fields.status_whiteboard
-              field_type = constants.FIELD_TYPE_FREETEXT
-              help = "https://wiki.mozilla.org/BMO/UserGuide/Whiteboard"
-              edit_only = 1
-              editable = 1
-          %]
-            [% bug.status_whiteboard == "" ? "---" : bug.status_whiteboard FILTER html %]
-          [% END %]
-        [% END %]
-
-          [% WRAPPER bug_modal/module.html.tmpl
-            title = "People"
-            collapsed = 1
-          %]
-            [%# people %]
-            [% INCLUDE bug_modal/field.html.tmpl
-                field = bug_fields.assigned_to
-                field_type = constants.FIELD_TYPE_USER
-                edit_only = 1
-                editable = 1
-                help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#assigned_to"
-            %]
-            [% INCLUDE bug_modal/field.html.tmpl
-                field = bug_fields.bug_mentor
-                field_type = constants.FIELD_TYPE_USERS
-                name = "bug_mentors"
-                label = "Mentors"
-                edit_only = 1
-                editable = 1
-                help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#bug_mentor"
-            %]
-            [% INCLUDE bug_modal/field.html.tmpl
-                field = bug_fields.cc
-                field_type = constants.FIELD_TYPE_USERS
-                name = "cc"
-                label = "CC"
-                edit_only = 1
-                editable = 1
-                help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#cc"
-            %]
-          [% END %]
-
-          [% WRAPPER bug_modal/module.html.tmpl
-            title = "Dependency Tree"
-            collapsed = 1
-          %]
-          [%# depends on %]
-          [% INCLUDE bug_modal/field.html.tmpl
-              field = bug_fields.dependson
-              field_type = constants.FIELD_TYPE_FREETEXT
-              edit_only = 1
-              editable = 1
-              help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#dependson"
-          %]
-
-          [%# blocks %]
-          [% INCLUDE bug_modal/field.html.tmpl
-              field = bug_fields.blocked
-              field_type = constants.FIELD_TYPE_FREETEXT
-              edit_only = 1
-              editable = 1
-              help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#blocks"
-          %]
-          [% END %]
-        </div>
-        <div class="new-bug-pad">
-        </div>
-      </div>
-    </div>
-  </div>
-</form>
-
-[% PROCESS global/footer.html.tmpl %]
-
-[% BLOCK fields_lhs %]
-    <div class="fields-lhs">[% content FILTER none %]</div>
-[% END %]
-
-[% BLOCK fields_rhs %]
-    <div class="fields-rhs">[% content FILTER none %]</div>
-[% END %]
-
-[% BLOCK new_comment %]
-<div id="add-comment">
-  <ul id="comment-tabs" role="tablist">
-    <li id="comment-edit-tab" data-focus="comment" role="tab" tabindex="0" aria-controls="comment-edit-tabpanel" aria-selected="true">
-      Description
-    </li>
-    <li id="comment-preview-tab" role="tab" tabindex="-1" aria-controls="comment-preview-tabpanel" aria-selected="false">
-      Preview
-      <img id="preview-throbber" src="[% basepath FILTER none %]extensions/BugModal/web/throbber.gif" width="16" height="11" style="display:none">
-    </li>
-  </ul>
-  <div id="comment-edit-tabpanel" class="comment-tabpanel" role="tabpanel" aria-labelledby="comment-edit-tab">
-    <textarea rows="5" name="comment" id="comment" aria-labelledby="comment-edit-tab"></textarea>
-  </div>
-  <div id="comment-preview-tabpanel" class="comment-tabpanel" role="tabpanel" aria-labelledby="comment-preview-tab" style="display:none">
-    <pre id="comment-preview" class="comment-text"></pre>
-  </div>
-</div>
-[% END %]