fix double click issue
This commit is contained in:
parent
6eec8b4228
commit
8e06142f35
|
@ -3,6 +3,7 @@ import json
|
|||
import codecs
|
||||
|
||||
|
||||
|
||||
def JSONtoHTML():
|
||||
data = json.loads(open("radia.json").read())
|
||||
html = ''
|
||||
|
@ -21,7 +22,6 @@ def JSONtoHTML():
|
|||
indexFile.write(footer)
|
||||
indexFile.close()
|
||||
|
||||
|
||||
def do():
|
||||
f = codecs.open("ChronoArr_Srt.txt", mode="r", encoding="utf-8")
|
||||
data = json.loads(open("radia.json").read())
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
$(function() {
|
||||
$('.title').data("loading", false);
|
||||
$('.title').click(function() {
|
||||
var $this = $(this);
|
||||
if ($(this).data("loading")) {
|
||||
return;
|
||||
}
|
||||
$(this).data("loading", true);
|
||||
var $parent = $(this).parent();
|
||||
|
||||
if ($parent.find('.srtContainer').length > 0) {
|
||||
|
@ -12,6 +18,7 @@ $(function() {
|
|||
var srtFilename = "srt/" + name + ".srt";
|
||||
var audioFilename = "wav/" + name + ".wav";
|
||||
$.get(srtFilename, {}, function(srt) {
|
||||
$this.data("loading", false);
|
||||
var txt = srtToTxt(srt, 'tc');
|
||||
var $txtContainer = $('<div />').addClass("srtContainer").data("srt", srt).hide()
|
||||
var $audio = $('<audio />').attr("src", audioFilename).attr("controls", "controls").appendTo($txtContainer);
|
||||
|
|
Loading…
Reference in New Issue
Block a user