fixed path on drop item

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent ae98231fa7
commit 8d14c8c833
  1. 1
      resources/library/interactivities/associer_images.wgt/js/script.js
  2. 1
      resources/library/interactivities/associer_sounds.wgt/js/script.js
  3. 1
      resources/library/interactivities/categoriser_images.wgt/js/script.js
  4. 1
      resources/library/interactivities/etudier.wgt/js/script.js
  5. 1
      resources/library/interactivities/ordonner_des_images.wgt/js/script.js
  6. 1
      resources/library/interactivities/ordonner_des_letters.wgt/js/script.js
  7. 1
      resources/library/interactivities/ordonner_des_lettres.wgt/js/script.js
  8. 1
      resources/library/interactivities/selectionner.wgt/js/script.js

@ -705,7 +705,6 @@ function onDropTarget(obj, event) {
} }
textData = stringToXML(textData); textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
tmp = tmp.substr(1, tmp.length);
var tmp_img = $("<img/>").attr("src", tmp); var tmp_img = $("<img/>").attr("src", tmp);
$(obj).append(tmp_img); $(obj).append(tmp_img);
setTimeout(function(){ setTimeout(function(){

@ -811,7 +811,6 @@ function onDropAudio(obj, event) {
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
if(tmp_type.substr(0, 5) == "audio"){ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $(obj).find(".audio_block"); var audio_block = $(obj).find(".audio_block");
tmp = tmp.substr(1, tmp.length);
$(obj).find("audio").remove(); $(obj).find("audio").remove();
audio_block.find(":first-child").removeClass("stop").addClass("play"); audio_block.find(":first-child").removeClass("stop").addClass("play");
var source = $("<source/>").attr("src", tmp); var source = $("<source/>").attr("src", tmp);

@ -698,7 +698,6 @@ function onDropTarget(obj, event) {
textData = stringToXML(textData); textData = stringToXML(textData);
if(textData.getElementsByTagName("ready")[0].firstChild.textContent == "true"){ if(textData.getElementsByTagName("ready")[0].firstChild.textContent == "true"){
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
tmp = tmp.substr(1, tmp.length);
var img_block = $("<div class='img_block' style='text-align: center;'>"); var img_block = $("<div class='img_block' style='text-align: center;'>");
$("<div class='close_img'>").appendTo(img_block); $("<div class='close_img'>").appendTo(img_block);
$("<input type='hidden' value='" + $(obj).find("input[name='mask']").val() + "'/>").appendTo(img_block); $("<input type='hidden' value='" + $(obj).find("input[name='mask']").val() + "'/>").appendTo(img_block);

@ -529,7 +529,6 @@ function onDropTarget(obj, event) {
textData = stringToXML(textData); textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
tmp = tmp.substr(1, tmp.length);
if(tmp_type.substr(0, 5) == "audio"){ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $("<div class='audio_block'>").draggable().appendTo($(obj)); var audio_block = $("<div class='audio_block'>").draggable().appendTo($(obj));
audio_block.css("position","absolute").css("top",event.clientY).css("left",event.clientX); audio_block.css("position","absolute").css("top",event.clientY).css("left",event.clientX);

@ -444,7 +444,6 @@ function onDropTarget(obj, event) {
} }
textData = stringToXML(textData); textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
tmp = tmp.substr(1, tmp.length);
var tmp_img = $("<img/>").attr("src", tmp); var tmp_img = $("<img/>").attr("src", tmp);
$(obj).append(tmp_img); $(obj).append(tmp_img);
setTimeout(function(){ setTimeout(function(){

@ -438,7 +438,6 @@ function onDropAudio(obj, event) {
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
if(tmp_type.substr(0, 5) == "audio"){ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $(obj).find(".audio_block"); var audio_block = $(obj).find(".audio_block");
tmp = tmp.substr(1, tmp.length);
$(obj).find("audio").remove(); $(obj).find("audio").remove();
audio_block.find(":first-child").removeClass("stop").addClass("play"); audio_block.find(":first-child").removeClass("stop").addClass("play");
var source = $("<source/>").attr("src", tmp); var source = $("<source/>").attr("src", tmp);

@ -438,7 +438,6 @@ function onDropAudio(obj, event) {
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
if(tmp_type.substr(0, 5) == "audio"){ if(tmp_type.substr(0, 5) == "audio"){
var audio_block = $(obj).find(".audio_block"); var audio_block = $(obj).find(".audio_block");
tmp = tmp.substr(1, tmp.length);
$(obj).find("audio").remove(); $(obj).find("audio").remove();
audio_block.find(":first-child").removeClass("stop").addClass("play"); audio_block.find(":first-child").removeClass("stop").addClass("play");
var source = $("<source/>").attr("src", tmp); var source = $("<source/>").attr("src", tmp);

@ -415,7 +415,6 @@ function onDropTarget(obj, event) {
textData = stringToXML(textData); textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent; var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent; var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
tmp = tmp.substr(1, tmp.length);
if(tmp_type.substr(0, 5) == "audio"){ if(tmp_type.substr(0, 5) == "audio"){
var img_tmp = $("<div class='img_block'>").insertBefore($(obj).find(".add_img")); var img_tmp = $("<div class='img_block'>").insertBefore($(obj).find(".add_img"));
var audio_block = $("<div class='audio_block'>").appendTo(img_tmp) var audio_block = $("<div class='audio_block'>").appendTo(img_tmp)

Loading…
Cancel
Save