[Bps-public-commit] rt-extension-selectize branch, master, updated. 575efcb6fe7a3eb6ce8ab73b4807dc0bcc9e9410
? sunnavy
sunnavy at bestpractical.com
Wed May 8 16:07:24 EDT 2019
The branch, master has been updated
via 575efcb6fe7a3eb6ce8ab73b4807dc0bcc9e9410 (commit)
from e95e540025acb132f3488b1a002e70c6eec01dee (commit)
Summary of changes:
patches/Switch-to-Selectize-for-multiple-user-inputs.patch | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 575efcb6fe7a3eb6ce8ab73b4807dc0bcc9e9410
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu May 9 04:01:31 2019 +0800
Sync labels on bubbles drag/drop
As we show lables in bubbles, it's important to keep it consistent.
diff --git a/patches/Switch-to-Selectize-for-multiple-user-inputs.patch b/patches/Switch-to-Selectize-for-multiple-user-inputs.patch
index 2d5522f..0962baf 100644
--- a/patches/Switch-to-Selectize-for-multiple-user-inputs.patch
+++ b/patches/Switch-to-Selectize-for-multiple-user-inputs.patch
@@ -30,10 +30,10 @@ index a1fa20a364..bd046c1e3d 100644
% if ($hide_cc_suggestions) {
<a href="#" class="ToggleSuggestions" data-hide-label="<% $hide_label %>" data-show-label="<% $show_label %>">
diff --git a/share/static/js/autocomplete.js b/share/static/js/autocomplete.js
-index cd8ab2b0d4..9fc4d25338 100644
+index cd8ab2b0d4..5fc5b75e8c 100644
--- a/share/static/js/autocomplete.js
+++ b/share/static/js/autocomplete.js
-@@ -8,6 +8,34 @@ window.RT.Autocomplete.Classes = {
+@@ -8,6 +8,35 @@ window.RT.Autocomplete.Classes = {
Queues: 'queues'
};
@@ -50,6 +50,7 @@ index cd8ab2b0d4..9fc4d25338 100644
+ 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);
@@ -68,7 +69,7 @@ index cd8ab2b0d4..9fc4d25338 100644
window.RT.Autocomplete.bind = function(from) {
jQuery("input[data-autocomplete]", from).each(function(){
-@@ -18,6 +46,62 @@ window.RT.Autocomplete.bind = function(from) {
+@@ -18,6 +47,62 @@ window.RT.Autocomplete.bind = function(from) {
if (!what || !window.RT.Autocomplete.Classes[what])
return;
@@ -93,7 +94,7 @@ index cd8ab2b0d4..9fc4d25338 100644
+ 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) {
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list