|
|
|
@ -12,37 +12,43 @@ $(document).ready(function() { |
|
|
|
data_terms=datos.split("[|.|_|.|-|.|]");
|
|
|
|
data_terms=datos.split("[|.|_|.|-|.|]");
|
|
|
|
for(i=0;i<data_terms.length;i++) { |
|
|
|
for(i=0;i<data_terms.length;i++) { |
|
|
|
specific_terms=data_terms[i].split("__|__|"); |
|
|
|
specific_terms=data_terms[i].split("__|__|"); |
|
|
|
new_html=my_text.replace(specific_terms[1],"<a href=\"javascript:void(0)\" class=\"glossary-ajax\" name=\"link"+specific_terms[0]+"\" onclick=\"\">"+specific_terms[1]+"</a>"); |
|
|
|
var my_specific_terms = new RegExp(specific_terms[1],"gi"); |
|
|
|
|
|
|
|
new_html=my_text.replace(my_specific_terms,"<a href=\"javascript:void(0)\" class=\"glossary-ajax\" name=\"link"+specific_terms[0]+"\" onclick=\"\">"+specific_terms[1]+"</a>"); |
|
|
|
$("body").html(new_html); |
|
|
|
$("body").html(new_html); |
|
|
|
my_text=$("body").html(); |
|
|
|
my_text=$("body").html(); |
|
|
|
} |
|
|
|
} |
|
|
|
$("body .glossary-ajax").toggle(function(){ |
|
|
|
|
|
|
|
random_id=Math.round(Math.random()*100); |
|
|
|
$("body .glossary-ajax").mouseover(function(){ |
|
|
|
div_show_id="div_show_id"+random_id; |
|
|
|
random_id=Math.round(Math.random()*100); |
|
|
|
div_content_id="div_content_id"+random_id; |
|
|
|
div_show_id="div_show_id"+random_id; |
|
|
|
$(this).append("<div id="+div_show_id+" ><div id="+div_content_id+"> </div></div>"); |
|
|
|
div_content_id="div_content_id"+random_id; |
|
|
|
$("div#"+div_show_id).attr("style","display:inline;float:left;position:absolute;background-color:#F5F6CE;border-bottom: 1px dashed #dddddd;border-right: 1px dashed #dddddd;border-left: 1px dashed #dddddd;border-top: 1px dashed #dddddd;color:#305582;margin-left:5px;margin-right:5px;"); |
|
|
|
$(this).append("<div id="+div_show_id+" ><div id="+div_content_id+"> </div></div>"); |
|
|
|
$("div#"+div_content_id).attr("style","background-color:#F5F6CE;color:#305582;margin-left:8px;margin-right:8px;margin-top:5px;margin-bottom:5px;"); |
|
|
|
$("div#"+div_show_id).attr("style","display:inline;float:left;position:absolute;background-color:#F5F6CE;border-bottom: 1px dashed #dddddd;border-right: 1px dashed #dddddd;border-left: 1px dashed #dddddd;border-top: 1px dashed #dddddd;color:#305582;margin-left:5px;margin-right:5px;"); |
|
|
|
notebook_id=$(this).attr("name"); |
|
|
|
$("div#"+div_content_id).attr("style","background-color:#F5F6CE;color:#305582;margin-left:8px;margin-right:8px;margin-top:5px;margin-bottom:5px;"); |
|
|
|
data_notebook=notebook_id.split("link"); |
|
|
|
notebook_id=$(this).attr("name"); |
|
|
|
my_glossary_id=data_notebook[1]; |
|
|
|
data_notebook=notebook_id.split("link"); |
|
|
|
$.ajax({ |
|
|
|
my_glossary_id=data_notebook[1]; |
|
|
|
contentType: "application/x-www-form-urlencoded", |
|
|
|
$.ajax({ |
|
|
|
beforeSend: function(objeto) { |
|
|
|
contentType: "application/x-www-form-urlencoded", |
|
|
|
$("div#"+div_content_id).html("<img src=\'../../../main/inc/lib/javascript/indicator.gif\' />"); }, |
|
|
|
beforeSend: function(objeto) { |
|
|
|
type: "POST", |
|
|
|
$("div#"+div_content_id).html("<img src=\'../../../main/inc/lib/javascript/indicator.gif\' />"); }, |
|
|
|
url: "../../../main/glossary/glossary_ajax_request.php", |
|
|
|
type: "POST", |
|
|
|
data: "glossary_id="+my_glossary_id, |
|
|
|
url: "../../../main/glossary/glossary_ajax_request.php", |
|
|
|
success: function(datos) { |
|
|
|
data: "glossary_id="+my_glossary_id, |
|
|
|
$("div#"+div_content_id).html(datos); |
|
|
|
success: function(datos) { |
|
|
|
} |
|
|
|
$("div#"+div_content_id).html(datos); |
|
|
|
});
|
|
|
|
} |
|
|
|
},function(){ |
|
|
|
});
|
|
|
|
var current_element, |
|
|
|
}); |
|
|
|
current_element=$(this); |
|
|
|
$("body .glossary-ajax").mouseout(function(){ |
|
|
|
div_show_id=current_element.find("div").attr("id"); |
|
|
|
var current_element, |
|
|
|
$("div#"+div_show_id).remove(); |
|
|
|
current_element=$(this); |
|
|
|
}); }
|
|
|
|
div_show_id=current_element.find("div").attr("id"); |
|
|
|
|
|
|
|
$("div#"+div_show_id).remove();
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|