support for themes where .shm-thumb is not directly an A tag
This commit is contained in:
parent
dbfa995ba5
commit
22f3532035
@ -37,7 +37,7 @@ function validate_selections(form, confirmationMessage) {
|
|||||||
function activate_bulk_selector () {
|
function activate_bulk_selector () {
|
||||||
set_selected_items([]);
|
set_selected_items([]);
|
||||||
if(!bulk_selector_initialized) {
|
if(!bulk_selector_initialized) {
|
||||||
$("a.shm-thumb").each(
|
$(".shm-thumb").each(
|
||||||
function (index, block) {
|
function (index, block) {
|
||||||
add_selector_button($(block));
|
add_selector_button($(block));
|
||||||
}
|
}
|
||||||
@ -67,11 +67,11 @@ function get_selected_items() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function set_selected_items(items) {
|
function set_selected_items(items) {
|
||||||
$("a.shm-thumb").removeClass('selected');
|
$(".shm-thumb").removeClass('selected');
|
||||||
|
|
||||||
$(items).each(
|
$(items).each(
|
||||||
function(index,item) {
|
function(index,item) {
|
||||||
$('a.shm-thumb[data-post-id="' + item + '"]').addClass('selected');
|
$('.shm-thumb[data-post-id="' + item + '"]').addClass('selected');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ function toggle_selection( id ) {
|
|||||||
|
|
||||||
function select_all() {
|
function select_all() {
|
||||||
var items = [];
|
var items = [];
|
||||||
$("a.shm-thumb").each(
|
$(".shm-thumb").each(
|
||||||
function ( index, block ) {
|
function ( index, block ) {
|
||||||
block = $(block);
|
block = $(block);
|
||||||
var id = block.data("post-id");
|
var id = block.data("post-id");
|
||||||
@ -122,7 +122,7 @@ function select_all() {
|
|||||||
function select_invert() {
|
function select_invert() {
|
||||||
var currentItems = get_selected_items();
|
var currentItems = get_selected_items();
|
||||||
var items = [];
|
var items = [];
|
||||||
$("a.shm-thumb").each(
|
$(".shm-thumb").each(
|
||||||
function ( index, block ) {
|
function ( index, block ) {
|
||||||
block = $(block);
|
block = $(block);
|
||||||
var id = block.data("post-id");
|
var id = block.data("post-id");
|
||||||
@ -141,7 +141,7 @@ function select_none() {
|
|||||||
function select_range(start, end) {
|
function select_range(start, end) {
|
||||||
var data = get_selected_items();
|
var data = get_selected_items();
|
||||||
var selecting = false;
|
var selecting = false;
|
||||||
$("a.shm-thumb").each(
|
$(".shm-thumb").each(
|
||||||
function ( index, block ) {
|
function ( index, block ) {
|
||||||
block = $(block);
|
block = $(block);
|
||||||
var id = block.data("post-id");
|
var id = block.data("post-id");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user