Oops, fix regression of editor features on item lists page
I changed the type of this tag without realizing the JS references it by both class and `div`! I think at the time this was a perf suggestion for jQuery, because the best way to query by class name was to query by tag first then filter? It's possible our jQuery still does this, but I don't imagine it's very relevant today, so I'll just remove that for better guarding against similar bugs in the future instead.
This commit is contained in:
parent
666394de25
commit
1a1615e0ad
1 changed files with 5 additions and 5 deletions
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
var hangerGroups = [];
|
var hangerGroups = [];
|
||||||
|
|
||||||
$("div.closet-hangers-group").each(function () {
|
$(".closet-hangers-group").each(function () {
|
||||||
var el = $(this);
|
var el = $(this);
|
||||||
var lists = [];
|
var lists = [];
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
$("div.closet-hangers-group span.toggle").live("click", function () {
|
$(".closet-hangers-group span.toggle").live("click", function () {
|
||||||
$(this).closest(".closet-hangers-group").toggleClass("hidden");
|
$(this).closest(".closet-hangers-group").toggleClass("hidden");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
onHangersInit(function () {
|
onHangersInit(function () {
|
||||||
// Super-lame hack to get the user ID from where it already is :/
|
// Super-lame hack to get the user ID from where it already is :/
|
||||||
var currentUserId = itemsSearchForm.data("current-user-id");
|
var currentUserId = itemsSearchForm.data("current-user-id");
|
||||||
$("#closet-hangers div.closet-hangers-group").each(function () {
|
$("#closet-hangers .closet-hangers-group").each(function () {
|
||||||
var groupEl = $(this);
|
var groupEl = $(this);
|
||||||
var owned = groupEl.data("owned");
|
var owned = groupEl.data("owned");
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@
|
||||||
return $("#closet-list-" + id);
|
return $("#closet-list-" + id);
|
||||||
} else {
|
} else {
|
||||||
return $(
|
return $(
|
||||||
"div.closet-hangers-group[data-owned=" +
|
".closet-hangers-group[data-owned=" +
|
||||||
owned +
|
owned +
|
||||||
"] div.closet-list.unlisted",
|
"] div.closet-list.unlisted",
|
||||||
);
|
);
|
||||||
|
@ -615,7 +615,7 @@
|
||||||
for (var i in hangerGroups) {
|
for (var i in hangerGroups) {
|
||||||
group = hangerGroups[i];
|
group = hangerGroups[i];
|
||||||
itemEl = $(
|
itemEl = $(
|
||||||
"div.closet-hangers-group[data-owned=" +
|
".closet-hangers-group[data-owned=" +
|
||||||
group.owned +
|
group.owned +
|
||||||
"] div.object[data-item-id=" +
|
"] div.object[data-item-id=" +
|
||||||
item.id +
|
item.id +
|
||||||
|
|
Loading…
Reference in a new issue