Skip to content

Commit

Permalink
Merge pull request #8690 from nextcloud/feature/8565/make-thunderbird…
Browse files Browse the repository at this point in the history
…-and-outlook-addons-identifyable

[Part2] Make thunderbird and outlook addons identifyable
  • Loading branch information
rullzer authored Aug 9, 2018
2 parents ad8e7d8 + 1fbfe7b commit a21c93a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions apps/workflowengine/js/requestuseragentplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

var placeholder = 'Mozilla/5.0 User Agent';

if (check['operator'] === 'matches' || check['operator'] === '!matches') {
if (check.operator === 'matches' || check.operator === '!matches') {
placeholder = '/^Mozilla\\/5\\.0 (.*)$/i';
}

Expand All @@ -56,8 +56,8 @@
placement: 'bottom'
});

if (check['operator'] === 'matches' || check['operator'] === '!matches') {
if (this._validateRegex(check['value'])) {
if (check.operator === 'matches' || check.operator === '!matches') {
if (this._validateRegex(check.value)) {
$(element).removeClass('invalid-input');
} else {
$(element).addClass('invalid-input');
Expand All @@ -70,21 +70,22 @@
children: [
{id: 'android', text: t('workflowengine', 'Android client')},
{id: 'ios', text: t('workflowengine', 'iOS client')},
{id: 'desktop', text: t('workflowengine', 'Desktop client')}
{id: 'desktop', text: t('workflowengine', 'Desktop client')},
{id: 'mail', text: t('workflowengine', 'Thunderbird & Outlook addons')}
]
}
];
if (this.predefinedValues.indexOf(check['value']) === -1) {
if (this.predefinedValues.indexOf(check.value) === -1) {
data.unshift({
id: check['value'],
text: check['value']
})
id: check.value,
text: check.value
});
}

$(element).select2({
data: data,
createSearchChoice: function(term) {
if (self.predefinedValues.indexOf(check['value']) === -1) {
if (self.predefinedValues.indexOf(check.value) === -1) {
return {
id: term,
text: term
Expand Down

0 comments on commit a21c93a

Please sign in to comment.