fixed relativePath

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 833bead797
commit 0e7ba26796
  1. 1
      resources/library/interactivities/associer_images.wgt/js/script.js
  2. 3
      resources/library/interactivities/associer_sounds.wgt/js/script.js
  3. 3
      resources/library/interactivities/categoriser_images.wgt/js/script.js
  4. 3
      resources/library/interactivities/etudier.wgt/js/script.js
  5. 1
      resources/library/interactivities/ordonner_des_images.wgt/js/script.js
  6. 3
      resources/library/interactivities/ordonner_des_letters.wgt/js/script.js
  7. 1
      resources/library/interactivities/selectionner.wgt/js/script.js
  8. 4
      src/api/UBWidgetUniboardAPI.cpp

@ -632,7 +632,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(){

@ -717,7 +717,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(){
@ -782,4 +781,4 @@ if (window.widget) {
$(this).parent().find(":first-child").removeClass("stop").addClass("play"); $(this).parent().find(":first-child").removeClass("stop").addClass("play");
}); });
} }
} }

@ -623,7 +623,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);
@ -668,4 +667,4 @@ function onDropTarget(obj, event) {
event.cancelBubble = true; event.cancelBubble = true;
} }
return false; return false;
} }

@ -472,7 +472,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);
@ -530,4 +529,4 @@ $(window).resize(function(){
$(this).width(slider.width()).height(slider.height()); $(this).width(slider.width()).height(slider.height());
}); });
slider.setSize(slider.width(), slider.height()); slider.setSize(slider.width(), slider.height());
}) })

@ -399,7 +399,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);
//alert(textData.getElementsByTagName("type")[0].firstChild.textContent + " | " + textData.getElementsByTagName("path")[0].firstChild.textContent); //alert(textData.getElementsByTagName("type")[0].firstChild.textContent + " | " + textData.getElementsByTagName("path")[0].firstChild.textContent);
var tmp_img = $("<img/>").attr("src", tmp); var tmp_img = $("<img/>").attr("src", tmp);
//alert(1) //alert(1)

@ -381,7 +381,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);
@ -409,4 +408,4 @@ if (window.widget) {
$(this).parent().find(":first-child").removeClass("stop").addClass("play"); $(this).parent().find(":first-child").removeClass("stop").addClass("play");
}); });
} }
} }

@ -359,7 +359,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)

@ -534,7 +534,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event)
} }
} }
} }
qDebug() << destFileName;
QString mimeText = createMimeText(downloaded, contentType, destFileName); QString mimeText = createMimeText(downloaded, contentType, destFileName);
dropMimeData.setData(tMimeText, mimeText.toAscii()); dropMimeData.setData(tMimeText, mimeText.toAscii());
@ -623,7 +623,7 @@ QString UBWidgetUniboardAPI::createMimeText(bool downloaded, const QString &mime
} }
QString relatedFileName = fileName; QString relatedFileName = fileName;
relatedFileName = relatedFileName.remove(mGraphicsWidget->getOwnFolder().toLocalFile()); relatedFileName = relatedFileName.remove(mGraphicsWidget->getOwnFolder().toLocalFile() + "/");
writer.writeTextElement(tPath, relatedFileName); //writing path to created object writer.writeTextElement(tPath, relatedFileName); //writing path to created object
} }

Loading…
Cancel
Save