add current work path

skala
Juan Carlos Raña 16 years ago
parent bc1231b1df
commit 8b2430a3c4
  1. 8
      main/inc/lib/fckeditor/editor/plugins/glossary/fck_glossary_automatic.js
  2. 6
      main/inc/lib/fckeditor/editor/plugins/glossary/fck_glossary_manual.js

@ -2,12 +2,14 @@ $(document).ready(function() {
$(window).load(function () {
var my_text=$("body").html();
my_protocol = location.protocol;
my_pathname=location.pathname;
work_path = my_pathname.substr(0,my_pathname.indexOf('/courses/'));
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
},
type: "POST",
url: my_protocol+"//"+location.host+"/main/glossary/glossary_ajax_request.php",
url: my_protocol+"//"+location.host+work_path+"/main/glossary/glossary_ajax_request.php",
data: "glossary_data=true",
success: function(datos) {
if (datos.length==0) {
@ -35,9 +37,9 @@ $(document).ready(function() {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#"+div_content_id).html("<img src="+my_protocol+"//"+location.host+"/main/inc/lib/javascript/indicator.gif />"); },
$("div#"+div_content_id).html("<img src="+my_protocol+"//"+location.host+work_path+"/main/inc/lib/javascript/indicator.gif />"); },
type: "POST",
url: my_protocol+"//"+location.host+"/main/glossary/glossary_ajax_request.php",
url: my_protocol+"//"+location.host+work_path+"/main/glossary/glossary_ajax_request.php",
data: "glossary_id="+my_glossary_id,
success: function(datos) {
$("div#"+div_content_id).html(datos);

@ -1,6 +1,8 @@
$(document).ready(function() {
$(window).load(function () {
my_protocol = location.protocol;
my_pathname=location.pathname;
work_path = my_pathname.substr(0,my_pathname.indexOf('/courses/'));
$("body .glossary").mouseover(function(){
is_glossary_name=$(this).html();
random_id=Math.round(Math.random()*100);
@ -13,9 +15,9 @@ $(document).ready(function() {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(objeto) {
$("div#"+div_content_id).html("<img src="+my_protocol+"//"+location.host+"/main/inc/lib/javascript/indicator.gif />"); },
$("div#"+div_content_id).html("<img src="+my_protocol+"//"+location.host+work_path+"/main/inc/lib/javascript/indicator.gif />"); },
type: "POST",
url: my_protocol+"//"+location.host+"/main/glossary/glossary_ajax_request.php",
url: my_protocol+"//"+location.host+work_path+"/main/glossary/glossary_ajax_request.php",
data: "glossary_name="+is_glossary_name,
success: function(datos) {
$("div#"+div_content_id).html(datos);

Loading…
Cancel
Save