mass tagger now loads the correct base directories for its static components
This commit is contained in:
parent
49d4f36071
commit
6c42842cb4
@ -23,20 +23,24 @@ function remove_mass_tag_id( button, list, id, string ) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function activate_mass_tagger () {
|
function activate_mass_tagger ( image_link ) {
|
||||||
|
|
||||||
$('.thumbblock').each(add_mass_tag_button);
|
$('.thumbblock').each(
|
||||||
|
function ( index, block ) {
|
||||||
|
add_mass_tag_button( block, image_link );
|
||||||
|
}
|
||||||
|
);
|
||||||
$('#mass_tagger_controls').attr( 'style', 'display:block' );
|
$('#mass_tagger_controls').attr( 'style', 'display:block' );
|
||||||
$('#mass_tagger_activate').attr( 'style', 'display:none' );
|
$('#mass_tagger_activate').attr( 'style', 'display:none' );
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_mass_tag_button ( index, block ) {
|
function add_mass_tag_button ( block, image_link ) {
|
||||||
|
|
||||||
var id = get_image_id( block );
|
var id = get_image_id( block );
|
||||||
|
|
||||||
var button = create_mass_tag_button( id );
|
var button = create_mass_tag_button( id, image_link );
|
||||||
$(block).append( button );
|
$(block).append( button );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -51,7 +55,7 @@ function get_image_id ( block ) {
|
|||||||
|
|
||||||
function create_mass_tag_button ( id ) {
|
function create_mass_tag_button ( id ) {
|
||||||
var img = $('<img />');
|
var img = $('<img />');
|
||||||
img.attr("src",'/ext/mass_tagger/toggle.gif');
|
img.attr( "src", image_link+'/ext/mass_tagger/toggle.gif' );
|
||||||
|
|
||||||
var link = $('<a />');
|
var link = $('<a />');
|
||||||
link.attr("class",'zoom');
|
link.attr("class",'zoom');
|
||||||
|
@ -5,12 +5,12 @@ class MassTaggerTheme extends Themelet {
|
|||||||
* Show $text on the $page
|
* Show $text on the $page
|
||||||
*/
|
*/
|
||||||
public function display_mass_tagger( Page $page, Event $event, $config ) {
|
public function display_mass_tagger( Page $page, Event $event, $config ) {
|
||||||
$base_href = $config->get_string('base_href');
|
$data_href = get_base_href();
|
||||||
$page->add_header("<link href='/ext/mass_tagger/mass_tagger.css' type='text/css' rel='stylesheet' />");
|
$page->add_header("<link href='$data_href/ext/mass_tagger/mass_tagger.css' type='text/css' rel='stylesheet' />");
|
||||||
$page->add_header("<script src='/ext/mass_tagger/mass_tagger.js' type='text/javascript'></script>");
|
$page->add_header("<script src='$data_href/ext/mass_tagger/mass_tagger.js' type='text/javascript'></script>");
|
||||||
$body = "
|
$body = "
|
||||||
<form action='".make_link("mass_tagger/tag")."' method='POST'>
|
<form action='".make_link("mass_tagger/tag")."' method='POST'>
|
||||||
<input id='mass_tagger_activate' type='button' onclick='activate_mass_tagger();' value='Activate'/>
|
<input id='mass_tagger_activate' type='button' onclick='activate_mass_tagger(\"$data_href\");' value='Activate'/>
|
||||||
<div id='mass_tagger_controls'>
|
<div id='mass_tagger_controls'>
|
||||||
Click on images to mark them. Use the 'Index Options' in the Board Config to increase the amount of shown images.
|
Click on images to mark them. Use the 'Index Options' in the Board Config to increase the amount of shown images.
|
||||||
<br />
|
<br />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user