Commit e6b7b850 authored by Tommy Chan's avatar Tommy Chan

mp3 draft3

parent 06aad00d
......@@ -224,5 +224,5 @@ body::after {
}
#mp3file {
display:block;
display:none;
}
......@@ -9,7 +9,7 @@ function createWindow() {
win = new BrowserWindow({
titleBarStyle: 'hidden',
width: 900,
height: 600,
height: 700,
icon: path.join(__dirname, '/favicon/android-chrome-192x192.png')
});
win.loadFile('index.html');
......
......@@ -205,7 +205,7 @@
<input id="mp3Input" type="file">
<span class="css3-selectbox">
<select id="mp3_selector">
<option value="121">01.mp3</option>
<option value="121" selected>01.mp3</option>
<option value="120">02.mp3</option>
<option value="119">03.mp3</option>
<option value="118">04.mp3</option>
......@@ -215,6 +215,9 @@
<option value="113">08.mp3</option>
<option value="117">09.mp3</option>
<option value="125">10.mp3</option>
<option value="124">11.mp3</option>
<option value="123">12.mp3</option>
<option value="122">13.mp3</option>
</select>
</span>
</div>
......
......@@ -90,6 +90,17 @@ class File {
return true;
}
static openmp3() {
let file_tmp = file;
file = $("#mp3Input").prop('files')[0];
let fileName = escape(file.name);
document.getElementById('mp3file').innerHTML = fileName;
return true;
}
static getDataFromFile() {
let reader = new FileReader();
......@@ -117,8 +128,8 @@ class File {
let reader = new FileReader();
reader.onload = function() {
let data = reader.result;
$("#mp3file").html = data;
let mp3 = reader.result;
document.getElementById("mp3file").innerHTML = mp3;
};
}
......
......@@ -246,6 +246,12 @@ function compileExe() {
swf2exe(swf_filename, exe_filename);
var mp3file = document.getElementById("mp3file").innerHTML;
if (mp3file != "" || mp3file != null) {
// change mp3
}
});
});
});
......@@ -283,7 +289,7 @@ function swf2exe(swfFile, outputFile) {
dialog.err(window.lang.unlink_error, window.lang.error);
return;
}
dialog.info(window.lang.exe_success, window.lang.success);
$('body').removeClass("loading");
......
......@@ -26,7 +26,7 @@ $(document).ready(function() {
$(this).val(''); // Sets the value to '' so the 'change' event is triggered even if the same file is opened again. Might be problematic if val needs to be used later again.
});
$('#mp3Input').change(function(e) {
if (File.openFile()) {
if (File.openmp3()) {
File.getmp3FromFile();
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment