diff --git a/js/panelAPI.js b/js/panelAPI.js index 24ef024f03137bfd19ec304327f55cb81787972f..056d24d851b5700c35bec08879da4891ab49785a 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 c4b7f05837cf4d1f9bb5e72f0bcb9879ea30c46f..23361c1edbccabd04848e62a28f73037eb9edf1d 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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391