diff options
author | thlo <t.lohmar@gmx.de> | 2013-01-19 14:19:49 +0100 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2013-01-19 14:19:49 +0100 |
commit | beeda32876a89e43f29b8fa8fc2c43bad0544f8b (patch) | |
tree | 320c100863128955acb1b394fb093ba354cec7b9 /smarttv-client/Javascript/Spinner.js | |
parent | fb4fde7ef4f0297790dae8c430246bba3d08e368 (diff) | |
parent | f92e97207c9f6fc740bf4960049758a5a36d6898 (diff) | |
download | vdr-plugin-smarttvweb-beeda32876a89e43f29b8fa8fc2c43bad0544f8b.tar.gz vdr-plugin-smarttvweb-beeda32876a89e43f29b8fa8fc2c43bad0544f8b.tar.bz2 |
Merge branch 'master' of projects.vdr-developer.org:vdr-plugin-smarttvweb
Diffstat (limited to 'smarttv-client/Javascript/Spinner.js')
-rw-r--r-- | smarttv-client/Javascript/Spinner.js | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/smarttv-client/Javascript/Spinner.js b/smarttv-client/Javascript/Spinner.js new file mode 100644 index 0000000..4a9b8ea --- /dev/null +++ b/smarttv-client/Javascript/Spinner.js @@ -0,0 +1,51 @@ +var Spinner =
+{
+ index : 1,
+ run: 0,
+ timeout : 0
+};
+
+Spinner.init = function () {
+// var sp_width = $("#Spinning").width();
+// var sp_height = $("#Spinning").height();
+
+ // TODO: No Abs Number please
+ $("#Spinning").children().eq(0).css({"margin-left": "43px", "margin-top": "37px"});
+};
+
+Spinner.show= function() {
+ if (this.run == 1)
+ return;
+
+ if (this.timeout > 0) {
+ clearTimeout(this.timeout);
+ this.timeout = 0;
+ }
+
+ this.index=1;
+
+ if (this.run==0) {
+ this.run=1;
+ $("#Spinning").show();
+ Spinner.step();
+ }
+};
+
+Spinner.hide= function() {
+ $("#Spinning").hide();
+ this.run=0;
+};
+
+ Spinner.step=function() {
+ $("#Spinning").children().eq(0).attr("src", "Images/spinner/loading_"+this.index+".png");
+
+ this.index++;
+
+ if (this.index > 12) {
+ this.index=1;
+ }
+
+ if (this.run) {
+ this.timeout = setTimeout("Spinner.step();", 200);
+ }
+};
|