From 54b73cc3da04d043ff27ae87f5383ae5caa87139 Mon Sep 17 00:00:00 2001
From: mrdrogdrog <tilman.vatteroth@udo.edu>
Date: Fri, 26 Jun 2015 14:10:11 +0200
Subject: [PATCH] GameOfLife an PanelAPI angepasst panelAPI-GET auf Only-Text
 umgestellt

---
 js/panelAPI.js              | 28 ++++++++++++++++++----------
 panels/GameOfLife/script.js |  2 +-
 tmp/GameOfLife.css          |  0
 3 files changed, 19 insertions(+), 11 deletions(-)
 create mode 100644 tmp/GameOfLife.css

diff --git a/js/panelAPI.js b/js/panelAPI.js
index 24ef024..056d24d 100755
--- a/js/panelAPI.js
+++ b/js/panelAPI.js
@@ -89,26 +89,34 @@ layout.insertTemplate = function(name, panel) {
             });
           }
       	}
-
-      	$.get("panels/" + this.name + "/template.html", function(k) {
+        var n = this.name;
+      	$.get("panels/" + n + "/template.html", function(k) {
+          console.log("get success of template " + n)
       	   e.template=k;
            doMore();
-      	}).fail(function() {
-          layout.error("get fail");
+      	},"text")
+        .fail(function() {
+          layout.error("get fail of template " + n );
         });
 
-      	$.get("style.php?style=" + this.name, function(k) {
+      	$.get("style.php?style=" + n, function(k) {
+          console.log("get success of style " + n)
           e.css=k;
           doMore();
-      	}).fail(function() {
-          layout.error("get fail");
+      	},"text")
+        .fail(function() {
+          layout.error("get fail of style " + n);
         });
 
-        $.get("panels/" + this.name + "/script.js", function(k) {
+
+        $.get("panels/" + n + "/script.js", function(k){
+          console.log("get success of script " + n)
           e.js=k;
       	  doMore();
-        }).fail(function() {
-          layout.error("get fail");
+        },"text")
+        .fail(function(e) {
+          layout.error("get fail of script " + n);
+          console.log(e);
         });
 
       }
diff --git a/panels/GameOfLife/script.js b/panels/GameOfLife/script.js
index c4b7f05..23361c1 100755
--- a/panels/GameOfLife/script.js
+++ b/panels/GameOfLife/script.js
@@ -11,7 +11,7 @@ var GOLData = {
 	grid: 1
 };
 
-binder.loaded = function(panel, config) {
+this.loaded = function(panel, config) {
 	GOLData.panel = panel;
 	GOLData.config = config;
 	GOLinit();
diff --git a/tmp/GameOfLife.css b/tmp/GameOfLife.css
new file mode 100644
index 0000000..e69de29
-- 
GitLab