diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-07-19 00:44:58 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-19 00:44:58 +0300 |
commit | aba558a4a8c7e9e3c691c0e689a0926d4604a26a (patch) | |
tree | 34f75775af7a8cddd6390bf43ba1be00d7f6aa2c /app/assets/javascripts | |
parent | 4b6e6d0ad222e0fbacf300975be961fcbc7bdccd (diff) | |
parent | 36dc4a5ce74dfd76a4acd7580fabec43ede1a254 (diff) |
Merge branch 'caironoleto/gitlab-ce-cn-issue-19747'
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/issues-bulk-assignment.js.coffee | 13 | ||||
-rw-r--r-- | app/assets/javascripts/subscription_select.js.coffee | 18 |
2 files changed, 25 insertions, 6 deletions
diff --git a/app/assets/javascripts/issues-bulk-assignment.js.coffee b/app/assets/javascripts/issues-bulk-assignment.js.coffee index 6b0e69dbae7..3d09ea08e3b 100644 --- a/app/assets/javascripts/issues-bulk-assignment.js.coffee +++ b/app/assets/javascripts/issues-bulk-assignment.js.coffee @@ -85,12 +85,13 @@ class @IssuableBulkActions getFormDataAsObject: -> formData = update: - state_event : @form.find('input[name="update[state_event]"]').val() - assignee_id : @form.find('input[name="update[assignee_id]"]').val() - milestone_id : @form.find('input[name="update[milestone_id]"]').val() - issues_ids : @form.find('input[name="update[issues_ids]"]').val() - add_label_ids : [] - remove_label_ids : [] + state_event : @form.find('input[name="update[state_event]"]').val() + assignee_id : @form.find('input[name="update[assignee_id]"]').val() + milestone_id : @form.find('input[name="update[milestone_id]"]').val() + issues_ids : @form.find('input[name="update[issues_ids]"]').val() + subscription_event : @form.find('input[name="update[subscription_event]"]').val() + add_label_ids : [] + remove_label_ids : [] if @willUpdateLabels @getLabelsToApply().map (id) -> diff --git a/app/assets/javascripts/subscription_select.js.coffee b/app/assets/javascripts/subscription_select.js.coffee new file mode 100644 index 00000000000..e5eb7a50d80 --- /dev/null +++ b/app/assets/javascripts/subscription_select.js.coffee @@ -0,0 +1,18 @@ +class @SubscriptionSelect + constructor: -> + $('.js-subscription-event').each (i, el) -> + fieldName = $(el).data("field-name") + + $(el).glDropdown( + selectable: true + fieldName: fieldName + toggleLabel: (selected, el, instance) => + label = 'Subscription' + $item = instance.dropdown.find('.is-active') + label = $item.text() if $item.length + label + clicked: (item, $el, e)-> + e.preventDefault() + id: (obj, el) -> + $(el).data("id") + ) |