summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Data.js
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-08-27 22:08:08 +0200
committerthlo <t.lohmar@gmx.de>2013-08-27 22:08:08 +0200
commit611fd0079284be330812e9eb44a43304c42387fe (patch)
tree7884c091d5b94731781b1ff9be587b26c5131f0c /smarttv-client/Javascript/Data.js
parent616c3e41b03f39799abe0c9e27922a196fadf70d (diff)
downloadvdr-plugin-smarttvweb-611fd0079284be330812e9eb44a43304c42387fe.tar.gz
vdr-plugin-smarttvweb-611fd0079284be330812e9eb44a43304c42387fe.tar.bz2
New Overlay Menu for RecCmd Handling
Make YouTube entry optional (Select Screen option is configurable through widget.conf) First 3D iter function for 3D TVs and 3D BDs.
Diffstat (limited to 'smarttv-client/Javascript/Data.js')
-rwxr-xr-xsmarttv-client/Javascript/Data.js60
1 files changed, 60 insertions, 0 deletions
diff --git a/smarttv-client/Javascript/Data.js b/smarttv-client/Javascript/Data.js
index d2673fe..7933de6 100755
--- a/smarttv-client/Javascript/Data.js
+++ b/smarttv-client/Javascript/Data.js
@@ -112,6 +112,66 @@ Data.getVideoCount = function() {
Data.deleteElm = function (pos) {
Data.getCurrentItem().childs.remove(pos);
};
+
+//--------------------------------------------------
+//--------------------- RecCmds --------------------
+//--------------------------------------------------
+
+var RecCmds = {
+ cmds : new Item,
+ folderList : [],
+};
+
+RecCmds.reset = function() {
+ this.cmds = null;
+ this.cmds = new Item;
+ this.folderList = [];
+ Main.log("RecCmds.reset: folderList.push. this.folderList.length= " + this.folderList.length);
+};
+
+RecCmds.completed= function() {
+ this.folderList.push({item : this.cmds, id: 0});
+ Main.log("---------- completed ------------");
+ Main.log("RecCmds.completed: Data.folderList.length= " + this.folderList.length);
+};
+
+RecCmds.selectFolder = function (idx, first_idx) {
+ this.folderList.push({item : this.getCurrentItem().childs[idx], id: idx, first:first_idx});
+ Main.log("RecCmds.selectFolder: folderList.push. this.folderList.length= " + this.folderList.length);
+};
+
+RecCmds.folderUp = function () {
+ itm = this.folderList.pop();
+ Main.log("RecCmds.folderUp: folderList.pop. this.folderList.length= " + this.folderList.length);
+ return itm;
+};
+
+RecCmds.isRootFolder = function() {
+ Main.log("RecCmds.isRootFolder: this.folderList.length= " + this.folderList.length);
+ if (this.folderList.length == 1)
+ return true;
+ else
+ return false;
+};
+
+RecCmds.addItem = function(t_list, pyld) {
+ this.cmds.addChild(t_list, pyld, 0);
+};
+
+RecCmds.dumpFolderStruct = function(){
+ Main.log("---------- RecCmds.dumpFolderStruct ------------");
+ this.cmds.print(0);
+ Main.log("---------- RecCmds.dumpFolderStruct Done -------");
+};
+
+RecCmds.getCurrentItem = function () {
+ return this.folderList[this.folderList.length-1].item;
+};
+
+RecCmds.getVideoCount = function() {
+ return this.folderList[this.folderList.length-1].item.childs.length;
+};
+
//-----------------------------------------
function Item() {
this.title = "root";