Commit 82b9dd8f authored by Tommy Chan's avatar Tommy Chan

mp3 draft2

parents 95fefa71 c67babb0
......@@ -199,6 +199,26 @@
<span id="storyname_chi_text">Story name(Chinese): </span><input type="text" id="storynameb5" />
</div>
<div id="mp3Div">
<label for="mp3Input" id="mp3open">Open mp3 file:</label>
<br>
<input id="mp3Input" type="file">
<span class="css3-selectbox">
<select id="mp3_selector">
<option value="121">01.mp3</option>
<option value="120">02.mp3</option>
<option value="119">03.mp3</option>
<option value="118">04.mp3</option>
<option value="116">05.mp3</option>
<option value="115">06.mp3</option>
<option value="114">07.mp3</option>
<option value="113">08.mp3</option>
<option value="117">09.mp3</option>
<option value="125">10.mp3</option>
</select>
</span>
</div>
<!-- Place at bottom of page -->
<div class="loader_bg">
<div class="loader"></div>
......@@ -206,7 +226,7 @@
</div>
<div id="mp3file">
</div>
</body>
......
......@@ -4,7 +4,7 @@ const $ = require('jquery');
const dialog = require('dialog');
const Languages = require('./js/Languages.js');
$(document).ready(function () {
$(document).ready(function() {
// Check for API support
File.fileSupport();
......@@ -21,30 +21,31 @@ $(document).ready(function () {
//hide loading screen
$('#loader_bg').hide();
$('#loader').hide();
//$('#loader_bg').show();
//$('#loader').show();
// $('#loader_bg').show();
// $('#loader').show();
// Events
$('#fileInput').on('change', function(e) {
if(File.openFile()) {
$('#fileInput').change(function(e) {
if (File.openFile()) {
File.getDataFromFile();
}
$(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').on('change', function(e) {
if(File.openFile()) {
$('#mp3Input').change(function(e) {
if (File.openFile()) {
File.getmp3FromFile();
}
});
$('#save_as').on('click', function(e) {
$('#save_as').click((e) => {
File.saveFile();
});
$('#generate_exe').on('click', function(e) {
if(File.getDataFromEditor()) {
$('#generate_exe').click((e) => {
if (File.getDataFromEditor()) {
generateExe();
}
});
$('#engtochi_text').on('click', function(e) {
$('#engtochi_text').click((e) => {
engtochi();
});
$('#showloading').on('click', function(e) {
......
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