diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-19 18:39:34 +0300 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-25 16:48:12 +0300 |
commit | 6f48cb860957676273d1e7bfc1195195599ab0f1 (patch) | |
tree | e50d42d20c6da2d983acd9634a0a4129a398ee21 /app/assets/javascripts/labels_select.js.coffee | |
parent | 531331f79d63a736efd1d40d7ad40b5a277327fd (diff) |
Fix broken functionality in sidebar after merge.
Added nice animations too.
Diffstat (limited to 'app/assets/javascripts/labels_select.js.coffee')
-rw-r--r-- | app/assets/javascripts/labels_select.js.coffee | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/app/assets/javascripts/labels_select.js.coffee b/app/assets/javascripts/labels_select.js.coffee index 78ee0ba467a..285e15feffe 100644 --- a/app/assets/javascripts/labels_select.js.coffee +++ b/app/assets/javascripts/labels_select.js.coffee @@ -28,8 +28,8 @@ class @LabelsSelect # Suggested colors in the dropdown to chose from pre-chosen colors $('.suggest-colors-dropdown a').on 'click', (e) -> - issueURLSplit = issueURL.split('/') if issueURL? - if issueURL + issueURLSplit = issueUpdateURL.split('/') if issueUpdateURL? + if issueUpdateURL labelHTMLTemplate = _.template( '<% _.each(labels, function(label){ %>'+ '<a href="'+ @@ -147,7 +147,7 @@ class @LabelsSelect $loading.fadeIn() $.ajax( type: 'PUT' - url: issueURL + url: issueUpdateURL dataType: 'JSON' data: data ).done (data) -> @@ -160,7 +160,15 @@ class @LabelsSelect href = $value .show() .html(template) ->>>>>>> Add multi select stay open functionality + $value + .find('a') + .each((i) -> + setTimeout(=> + glAnimate($(@), 'pulse') + ,200 * i + ) + ) + $dropdown.glDropdown( data: (term, callback) -> @@ -224,6 +232,8 @@ class @LabelsSelect hidden: -> $selectbox.hide() $value.show() + if $dropdown.hasClass 'js-multiselect' + saveLabelData() multiSelect: $dropdown.hasClass 'js-multiselect' |