Created
June 9, 2011 14:35
Revisions
-
hojberg revised this gist
Jun 9, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,7 +37,7 @@ YUI.add("presenters:your_cash", function (Y) { initializer: function (options) { var P = this; Y.YourCash.getBalance({ succes: function (yourCash) { P.yourCash = yourCash; P.fire("balance loaded"); -
hojberg revised this gist
Jun 9, 2011 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,11 +37,13 @@ YUI.add("presenters:your_cash", function (Y) { initializer: function (options) { var P = this; new Y.YourCash.getBalance({ succes: function (yourCash) { P.yourCash = yourCash; P.fire("balance loaded"); }, error: function () {} }); }, render: function () { -
hojberg revised this gist
Jun 9, 2011 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,3 +36,19 @@ YUI.add("presenters:your_cash", function (Y) { initializer: function (options) { var P = this; P.yourCash = new Y.YourCash({}); P.yourCash.on("balance loaded", function () { P.fire("balance loaded"); }); P.yourCash.getBalance(); }, render: function () { // set up dom stuff and show the right template.. } }, { ATTRS: {} }); }, "1.0.0", {requires: []}); -
hojberg revised this gist
Jun 9, 2011 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ YUI.add("presenters:your_rewards", function (Y) { this.yourPlacesPresenter = new Y.YourPlacesPresenter({}); this.yourCashPresenter = new Y.YourCashPresenter({}); this.yourCashPresenter.on("balance loaded", this.renderYourCashTabCount, this); this.yourPlacesPresenter.render(); @@ -28,3 +28,11 @@ YUI.add("presenters:your_rewards", function (Y) { }, "1.0.0", {requires: []}); YUI.add("presenters:your_cash", function (Y) { Y.YourCashPresenter = Y.Base.create("YourCashPresenter", Y.Presenter, [], { initializer: function (options) { var P = this; -
hojberg revised this gist
Jun 9, 2011 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ // THIS IS A SUPER PRESENTER?! YUI.add("presenters:your_rewards", function (Y) { Y.YourRewardsPresenter = Y.Base.create("YourRewardsPresenter", Y.Presenter, [], { @@ -8,6 +9,15 @@ YUI.add("presenters:your_rewards", function (Y) { this.yourCashPresenter = new Y.YourCashPresenter({}); this.yourCashPresenter.on("loaded", this.renderYourCashTabCount, this); this.yourPlacesPresenter.render(); var P = this; Y.one("#sidebar .your_cash_tab").on("click", function (ev) { ev.preventDefault(); P.yourCashPresenter.render(); }); }, renderYourCashTabCount: function (count) { -
hojberg created this gist
Jun 9, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ YUI.add("presenters:your_rewards", function (Y) { Y.YourRewardsPresenter = Y.Base.create("YourRewardsPresenter", Y.Presenter, [], { initializer: function (options) { this.yourPlacesPresenter = new Y.YourPlacesPresenter({}); this.yourCashPresenter = new Y.YourCashPresenter({}); this.yourCashPresenter.on("loaded", this.renderYourCashTabCount, this); }, renderYourCashTabCount: function (count) { Y.one(".sometab").append(Y.Node.create("<span class='coun'>" + count + "</span>")); } }, { ATTRS: {} }); }, "1.0.0", {requires: []});