mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Add class for targeting
This commit is contained in:
@@ -42,7 +42,7 @@ export default TextField.extend({
|
|||||||
allowAny: this.get('allowAny'),
|
allowAny: this.get('allowAny'),
|
||||||
updateData: (opts && opts.updateData) ? opts.updateData : false,
|
updateData: (opts && opts.updateData) ? opts.updateData : false,
|
||||||
|
|
||||||
dataSource: function(term) {
|
dataSource(term) {
|
||||||
const termRegex = Discourse.User.currentProp('can_send_private_email_messages') ?
|
const termRegex = Discourse.User.currentProp('can_send_private_email_messages') ?
|
||||||
/[^a-zA-Z0-9_\-\.@\+]/ : /[^a-zA-Z0-9_\-\.]/;
|
/[^a-zA-Z0-9_\-\.@\+]/ : /[^a-zA-Z0-9_\-\.]/;
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ export default TextField.extend({
|
|||||||
return results;
|
return results;
|
||||||
},
|
},
|
||||||
|
|
||||||
transformComplete: function(v) {
|
transformComplete(v) {
|
||||||
if (v.username || v.name) {
|
if (v.username || v.name) {
|
||||||
if (!v.username) { groups.push(v.name); }
|
if (!v.username) { groups.push(v.name); }
|
||||||
return v.username || v.name;
|
return v.username || v.name;
|
||||||
@@ -72,7 +72,7 @@ export default TextField.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onChangeItems: function(items) {
|
onChangeItems(items) {
|
||||||
var hasGroups = false;
|
var hasGroups = false;
|
||||||
items = items.map(function(i) {
|
items = items.map(function(i) {
|
||||||
if (groups.indexOf(i) > -1) { hasGroups = true; }
|
if (groups.indexOf(i) > -1) { hasGroups = true; }
|
||||||
@@ -85,7 +85,7 @@ export default TextField.extend({
|
|||||||
if (self.get('onChangeCallback')) self.sendAction('onChangeCallback');
|
if (self.get('onChangeCallback')) self.sendAction('onChangeCallback');
|
||||||
},
|
},
|
||||||
|
|
||||||
reverseTransform: function(i) {
|
reverseTransform(i) {
|
||||||
return { username: i };
|
return { username: i };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{#d-modal-body}}
|
{{#d-modal-body class='change-ownership'}}
|
||||||
{{{i18n 'topic.change_owner.instructions' count=selectedPostsCount old_user=selectedPostsUsername}}}
|
{{{i18n 'topic.change_owner.instructions' count=selectedPostsCount old_user=selectedPostsUsername}}}
|
||||||
<p>
|
<p>
|
||||||
{{{i18n 'topic.change_owner.instructions_warn'}}}
|
{{{i18n 'topic.change_owner.instructions_warn'}}}
|
||||||
|
|||||||
Reference in New Issue
Block a user