fixed relativePath

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 833bead797
commit 0e7ba26796
  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/selectionner.wgt/js/script.js
  8. 4
      src/api/UBWidgetUniboardAPI.cpp

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

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

@ -623,7 +623,6 @@ function onDropTarget(obj, event) {
textData = stringToXML(textData);
if(textData.getElementsByTagName("ready")[0].firstChild.textContent == "true"){
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;'>");
$("<div class='close_img'>").appendTo(img_block);
$("<input type='hidden' value='" + $(obj).find("input[name='mask']").val() + "'/>").appendTo(img_block);

@ -472,7 +472,6 @@ function onDropTarget(obj, event) {
textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[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"){
var audio_block = $("<div class='audio_block'>").draggable().appendTo($(obj));
audio_block.css("position","absolute").css("top",event.clientY).css("left",event.clientX);

@ -399,7 +399,6 @@ function onDropTarget(obj, event) {
}
textData = stringToXML(textData);
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);
var tmp_img = $("<img/>").attr("src", tmp);
//alert(1)

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

@ -359,7 +359,6 @@ function onDropTarget(obj, event) {
textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[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"){
var img_tmp = $("<div class='img_block'>").insertBefore($(obj).find(".add_img"));
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);
dropMimeData.setData(tMimeText, mimeText.toAscii());
@ -623,7 +623,7 @@ QString UBWidgetUniboardAPI::createMimeText(bool downloaded, const QString &mime
}
QString relatedFileName = fileName;
relatedFileName = relatedFileName.remove(mGraphicsWidget->getOwnFolder().toLocalFile());
relatedFileName = relatedFileName.remove(mGraphicsWidget->getOwnFolder().toLocalFile() + "/");
writer.writeTextElement(tPath, relatedFileName); //writing path to created object
}

Loading…
Cancel
Save