diff options
author | thlo <smarttv640@gmail.com> | 2012-12-26 11:08:33 +0100 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2012-12-26 11:08:33 +0100 |
commit | b92b1fc101a5a5ba8bb212e7bebc31ccc94f8dc1 (patch) | |
tree | 714db52457aab0cfa9bff0991a34b1f522b98411 /smarttv-client/Javascript/Options.js | |
parent | 6fa9e29f0b37ebcfc7fdc1c4a096205d328bd0be (diff) | |
download | vdr-plugin-smarttvweb-b92b1fc101a5a5ba8bb212e7bebc31ccc94f8dc1.tar.gz vdr-plugin-smarttvweb-b92b1fc101a5a5ba8bb212e7bebc31ccc94f8dc1.tar.bz2 |
Initial Widget Version
Diffstat (limited to 'smarttv-client/Javascript/Options.js')
-rwxr-xr-x | smarttv-client/Javascript/Options.js | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/smarttv-client/Javascript/Options.js b/smarttv-client/Javascript/Options.js new file mode 100755 index 0000000..d60a9ff --- /dev/null +++ b/smarttv-client/Javascript/Options.js @@ -0,0 +1,66 @@ +var Options = {
+ imeBox : null
+};
+
+Options.init = function() {
+ _g_ime.Recog_use_YN = false;
+ _g_ime.keySet = '12key';
+
+ this.imeBox = new IMEShell("widgetServerAddr", Options.onImeCreated, 'de');
+ alert ("Options Initiated");
+};
+
+Options.onComplete = function () {
+ alert("Colpleted");
+};
+
+Options.onEnter = function () {
+ alert("Enter: " + document.getElementById("widgetServerAddr").value );
+ Config.updateContext(document.getElementById("widgetServerAddr").value);
+
+ document.getElementById('widgetServerAddr').blur();
+
+ document.getElementById("optionsScreen").style.display="none";
+
+ if (Config.firstLaunch == true)
+ Main.state = 1;
+ Main.changeState(0);
+
+ Config.fetchConfig();
+// Main.enableKeys();
+};
+
+Options.onBlue = function () {
+ var val = document.getElementById("widgetServerAddr").value + ".";
+ Options.imeBox.setString(val);
+};
+
+Options.onImeCreated = function(obj) {
+// _g_ime.keySet ("12key");
+// obj.setKeySetFunc('12key');
+
+ obj.setKeyFunc(tvKey.KEY_RETURN, function(keyCode) { widgetAPI.sendReturnEvent(); return false; } );
+ obj.setKeyFunc(tvKey.KEY_EXIT, function(keyCode) { widgetAPI.sendExitEvent(); return false; } );
+
+ obj.setKeypadPos(650, 135);
+ obj.setWordBoxPos(18, 6);
+ obj.setKeyFunc(tvKey.KEY_BLUE, Options.onBlue);
+
+ obj.setString(Config.serverAddr);
+ obj.setEnterFunc(Options.onEnter);
+
+ if (obj.setMode("_num") == false) {
+ Main.log("obj.setMode(\"_num\") returns false");
+ }
+
+ Options.imeBox.setOnCompleteFunc(Options.onComplete);
+
+ Options.onReady ();
+};
+
+Options.onReady = function () {
+ document.getElementById('widgetServerAddr').focus();
+ alert ("KeySet= " + this.imeBox.getKeySet());
+};
+
+
|