[Rt-commit] rt branch, 4.6/selectize-multiple-user-inputs, repushed

? sunnavy sunnavy at bestpractical.com
Thu Jun 20 10:05:23 EDT 2019


The branch 4.6/selectize-multiple-user-inputs was deleted and repushed:
       was a4c6997549a65808a689418d0e794db168bab2d8
       now 29c47233ed058ca9cf5d157081b26a2d6c9d4281

1: 23f81caae = 1: 23f81caae Add sortable component to jQuery UI, which is needed for Selectize
2: 3428fd96b = 2: 3428fd96b Add Selectize js lib to RT
4: 689ad00e3 = 3: 222468779 Add css to Theme.html for multiple user input bubbles
3: d5e1bd5ca ! 4: 2488057a8 Switch to Selectize for multiple user inputs
    @@ -98,6 +98,7 @@
     +                var self = input.selectize()[0].selectize;
     +                var value = ui.item.attr('data-value');
     +                self.createItem(value, false);
    ++                self.getItem(value).children('span').text(ui.item.children('span').text());
     +                self.getItem(value).insertBefore(ui.item);
     +                ui.item.remove();
     +                self.setCaret(self.items.length);
    @@ -122,13 +123,13 @@
      
     +        if (what === 'Users' && input.is('[data-autocomplete-multiple]')) {
     +            input.selectize({
    -+                plugins: ['remove_button', 'restore_on_backspace', 'rt_drag_drop'],
    ++                plugins: ['remove_button', 'rt_drag_drop'],
     +                valueField: 'value',
     +                labelField: 'label',
     +                searchField: ['label', 'value'],
     +                create: true,
     +                closeAfterSelect: true,
    -+                maxItems: input.is('[data-autocomplete-multiple]') ? null : 1,
    ++                maxItems: null,
     +                allowEmptyOption: false,
     +                openOnFocus: false,
     +                selectOnTab: true,
    @@ -141,7 +142,7 @@
     +                        return '<div class="option">' + escape(data.label) + '</div>';
     +                    },
     +                    item: function(data, escape) {
    -+                        return '<div class="item">' + escape(data.label) + '</div>';
    ++                        return '<div class="item">' + '<span>' + escape(data.label) + '</span></div>';
     +                    }
     +                },
     +                onItemRemove: function(value) {
    @@ -156,7 +157,7 @@
     +                load: function(input, callback) {
     +                    if (!input.length) return callback();
     +                    jQuery.ajax({
    -+                        url: RT.Config.WebPath + '/Helpers/AutoComplete/Users',
    ++                        url: RT.Config.WebPath + '/Helpers/Autocomplete/Users',
     +                        type: 'GET',
     +                        dataType: 'json',
     +                        data: {
5: a4c699754 < -:  ------- Sync labels on bubbles drag/drop
-:  ------- > 5: 32282bb99 Show labels instead of values(emails) for default values too
-:  ------- > 6: 974b288a4 Disable browser autocomplete for selectize related inputs
-:  ------- > 7: 29c47233e Support selectize_option/selectize_item from json to customize option/item UI



More information about the rt-commit mailing list