Improved the function "forced_title_callback" to use the element title in a special case

This commit is contained in:
Alejandro Gallardo Escobar 2014-12-30 12:36:19 +01:00
parent 1e47df9ab2
commit 31b41f395f
1 changed files with 10 additions and 1 deletions

View File

@ -181,7 +181,16 @@ function forced_title_callback() {
// Put title in the layer
///////////////////////////////////////////
var title = $('#forced_title_'+img_id).html();
// If the '.forced_title' element has 'use_title_for_force_title' = 1
// into their 'data' prop, the element title will be used for the
// content.
if ($(this).data("use_title_for_force_title")) {
var title = $(this).prop("title");
}
else {
var title = $('#forced_title_'+img_id).html();
}
$('#forced_title_layer').html(title);
///////////////////////////////////////////