further oxjs

This commit is contained in:
sanj 2010-03-03 22:45:37 +05:30
parent ca005e8d5d
commit 96e09019b3
3 changed files with 28 additions and 10 deletions

View File

@ -98,6 +98,19 @@ $(document).ready(function() {
});
});
Ox.Event.bind(null, "click_about", function() {
stDialog("About", "This is about us");
});
Ox.Event.bind(null, "click_help", function() {
var html = "Shortcuts: <br /><br /> \
Esc: Pause / Unpause <br /> \
Insert: Insert time-code<br /> \
PageUp / PageDown: Volume Up / Down<br /> \
Double-click in Textarea: insert time-code <br /> \
Double-click on video: insert time-code<br /> \
Double-click on time-code in textarea: Seek video to time-code. <br />"
stDialog("Help", html);
});
textArea = new TextArea("txt");
$('#saveFile').click(saveFile);
$('#saveSrt').click(saveSrt);
@ -214,3 +227,15 @@ function saveEncore() {
alert("error creating encore compatible subtitle file");
}
}
function stDialog(titleTxt, text) {
var dialog = new Ox.Dialog({
buttons:
[
{ value: "Close", click: function() { dialog.close(); } }
],
title: titleTxt
}).append(text);
dialog.open();
return dialog;
}

View File

@ -1,8 +1,8 @@
//elem = string (elementId to make TextArea)
var TextArea = function(elem) {
// this.elem = $('#' + elem);
this.elem = $('#' + elem);
var that = this;
this.elem = new Ox.Input({'type': 'textarea', 'id': 'textArea'}).attr("id", elem).appendTo('#txtWrapper');
// this.elem = new Ox.Input({'type': 'textarea', 'id': 'textArea'}).attr("id", elem).appendTo('#txtWrapper');
this.hasFocus = false;
this.width = this.elem.width();
this.spans = [];

View File

@ -25,19 +25,12 @@
<div id="timeCode">0:00:00.000</div>
<div id="helpWrapper">
Shortcuts: <br /><br />
Esc: Pause / Unpause <br />
Insert: Insert time-code<br />
PageUp / PageDown: Volume Up / Down<br />
Double-click in Textarea: insert time-code <br />
Double-click on video: insert time-code<br />
Double-click on time-code in textarea: Seek video to time-code. <br />
Ctrl / Alt: Seek back / forward <input id="seekTime" value="1" /> seconds.
</div>
</div>
<div id="txtWrapper">
<textarea id="txt"></textarea><br /> <br />
<!--
<div id="buttonsWrapper">
<button id="fillMeta" class="button">Enter Metadata</button>