deprecate tag subscriptions with warnings
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
Danbooru.Autocomplete.initialize_tag_autocomplete = function() {
|
||||
var $fields_multiple = $(
|
||||
"#tags,#post_tag_string,#upload_tag_string,#tag-script-field,#c-moderator-post-queues #query," +
|
||||
"#user_blacklisted_tags,#user_favorite_tags,#tag_subscription_tag_query,#search_post_tags_match"
|
||||
"#user_blacklisted_tags,#user_favorite_tags,#search_post_tags_match"
|
||||
);
|
||||
var $fields_single = $(
|
||||
"#c-tags #search_name_matches,#c-tag-aliases #query,#c-tag-implications #query," +
|
||||
@@ -184,9 +184,6 @@
|
||||
case "ordfav":
|
||||
Danbooru.Autocomplete.user_source(term, resp, metatag);
|
||||
break;
|
||||
case "sub":
|
||||
Danbooru.Autocomplete.subscription_source(term, resp);
|
||||
break;
|
||||
case "pool":
|
||||
case "-pool":
|
||||
case "ordpool":
|
||||
@@ -391,34 +388,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
Danbooru.Autocomplete.subscription_source = function(term, resp) {
|
||||
var match = term.match(/^(.+?):(.*)$/);
|
||||
if (match) {
|
||||
var user_name = match[1];
|
||||
var subscription_name = match[2];
|
||||
|
||||
$.ajax({
|
||||
url: "/tag_subscriptions.json",
|
||||
data: {
|
||||
"search[creator_name]": user_name,
|
||||
"search[name_matches]": subscription_name + "*",
|
||||
"limit": 10
|
||||
},
|
||||
method: "get",
|
||||
success: function(data) {
|
||||
resp($.map(data, function(subscription) {
|
||||
return {
|
||||
label: subscription.name.replace(/_/g, " "),
|
||||
value: "sub:" + user_name + ":" + subscription.name
|
||||
};
|
||||
}));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Danbooru.Autocomplete.user_source(term, resp, "sub");
|
||||
}
|
||||
}
|
||||
|
||||
Danbooru.Autocomplete.pool_source = function(term, resp, metatag) {
|
||||
$.ajax({
|
||||
url: "/pools.json",
|
||||
|
||||
Reference in New Issue
Block a user