").appendTo(sub_container);
- text.attr("ondragenter", "return false;")
- .attr("ondragleave", "$(this).removeClass('gray'); return false;")
- .attr("ondragover", "$(this).addClass('gray'); return false;")
- .attr("ondrop", "$(this).removeClass('gray'); return onDropAudio(this,event);");
var audio_block = $("
").appendTo(text);
+ audio_block.attr("ondragenter", "return false;")
+ .attr("ondragleave", "$(this).removeClass('audio_gray'); return false;")
+ .attr("ondragover", "$(this).addClass('audio_gray'); return false;")
+ .attr("ondrop", "$(this).removeClass('audio_gray'); return onDropAudio(this,event);");
$("
").appendTo(audio_block);
$("
").appendTo(audio_block);
var source = $("
").attr("src", "");
@@ -527,13 +528,12 @@ function onDropAudio(obj, event) {
textData = stringToXML(textData);
var tmp = textData.getElementsByTagName("path")[0].firstChild.textContent;
var tmp_type = textData.getElementsByTagName("type")[0].firstChild.textContent;
- if(tmp_type.substr(0, 5) == "audio"){
- var audio_block = $(obj).find(".audio_block");
+ if(tmp_type.substr(0, 5) == "audio"){
$(obj).find("audio").remove();
- audio_block.find(":first-child").removeClass("stop").addClass("play");
+ $(obj).find(":first-child").removeClass("stop").addClass("play");
var source = $("
").attr("src", "../../" + tmp);
- var audio = $("