|
@@ -1,187 +0,0 @@
|
|
-define("{%= namespace %}/{%= name %}", ["amber/boot"
|
|
|
|
-
|
|
|
|
-, "amber/jquery/Wrappers-JQuery", "amber/web/Web", "silk/Silk"
|
|
|
|
-
|
|
|
|
-, "amber_core/Kernel-Objects"], function($boot
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-){
|
|
|
|
-if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
|
|
|
|
-var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
|
|
-$core.addPackage('{%= name %}');
|
|
|
|
-($core.packageDescriptors||$core.packages)["{%= name %}"].innerEval = function (expr) { return eval(expr); };
|
|
|
|
-($core.packageDescriptors||$core.packages)["{%= name %}"].imports = ["amber/jquery/Wrappers-JQuery", "amber/web/Web", "silk/Silk"];
|
|
|
|
-($core.packageDescriptors||$core.packages)["{%= name %}"].transport = {"type":"amd","amdNamespace":"{%= namespace %}"};
|
|
|
|
-
|
|
|
|
-$core.addClass('{%= name %}', $globals.Object, [], '{%= name %}');
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "augmentPage",
|
|
|
|
-protocol: 'starting',
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this;
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
|
-
|
|
|
|
-var $1;
|
|
|
|
-$1="#amber-with"._asJQuery();
|
|
|
|
-
|
|
|
|
-$ctx1.sendIdx["asJQuery"]=1;
|
|
|
|
-
|
|
|
|
-$recv($1)._click_((function(){
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-
|
|
|
|
-return self._doAmberWith();
|
|
|
|
-
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
|
-
|
|
|
|
-}));
|
|
|
|
-
|
|
|
|
-$ctx1.sendIdx["click:"]=1;
|
|
|
|
-
|
|
|
|
-$recv("#silk-tag"._asSilk())._on_bind_("click",(function(){
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-
|
|
|
|
-return self._doSilkTAG();
|
|
|
|
-
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
|
|
-
|
|
|
|
-}));
|
|
|
|
-$recv("#jquery-append"._asJQuery())._click_((function(){
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-
|
|
|
|
-return self._doJQueryAppend();
|
|
|
|
-
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
|
|
|
|
-
|
|
|
|
-}));
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"augmentPage",{},$globals.{%= name %})});
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-
|
|
|
|
-args: [],
|
|
|
|
-source: "augmentPage\x0a\x09'#amber-with' asJQuery click: [ self doAmberWith ].\x0a\x09'#silk-tag' asSilk on: #click bind: [ self doSilkTAG ].\x0a\x09'#jquery-append' asJQuery click: [ self doJQueryAppend ]",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-
|
|
|
|
-messageSends: ["click:", "asJQuery", "doAmberWith", "on:bind:", "asSilk", "doSilkTAG", "doJQueryAppend"]
|
|
|
|
-}),
|
|
|
|
-$globals.{%= name %});
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "doAmberWith",
|
|
|
|
-protocol: 'action',
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this;
|
|
|
|
-var tag;
|
|
|
|
-function $HTMLCanvas(){return $globals.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
|
-
|
|
|
|
-tag=$recv($recv($HTMLCanvas())._onJQuery_("#output-list"._asJQuery()))._root();
|
|
|
|
-$recv(tag)._with_((function(html){
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-
|
|
|
|
-return $recv($recv(html)._li())._with_("Amber Web #with: added me!");
|
|
|
|
-
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
|
|
|
|
-
|
|
|
|
-}));
|
|
|
|
-
|
|
|
|
-$ctx1.sendIdx["with:"]=1;
|
|
|
|
-
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"doAmberWith",{tag:tag},$globals.{%= name %})});
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-
|
|
|
|
-args: [],
|
|
|
|
-source: "doAmberWith\x0a\x09| tag |\x0a\x09tag := (HTMLCanvas onJQuery: '#output-list' asJQuery) root.\x0a\x09tag with: [ :html | html li with: 'Amber Web #with: added me!' ]",
|
|
|
|
-referencedClasses: ["HTMLCanvas"],
|
|
|
|
-
|
|
|
|
-messageSends: ["root", "onJQuery:", "asJQuery", "with:", "li"]
|
|
|
|
-}),
|
|
|
|
-$globals.{%= name %});
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "doJQueryAppend",
|
|
|
|
-protocol: 'action',
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this;
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
|
-
|
|
|
|
-$recv("#output-list"._asJQuery())._append_("<li>jQuery append added me!</li>");
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"doJQueryAppend",{},$globals.{%= name %})});
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-
|
|
|
|
-args: [],
|
|
|
|
-source: "doJQueryAppend\x0a\x09'#output-list' asJQuery append: '<li>jQuery append added me!</li>'",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-
|
|
|
|
-messageSends: ["append:", "asJQuery"]
|
|
|
|
-}),
|
|
|
|
-$globals.{%= name %});
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "doSilkTAG",
|
|
|
|
-protocol: 'action',
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this;
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
|
-
|
|
|
|
-$recv("#output-list"._asSilk())._LI_("Silk TAG: added me!");
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"doSilkTAG",{},$globals.{%= name %})});
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-
|
|
|
|
-args: [],
|
|
|
|
-source: "doSilkTAG\x0a\x09'#output-list' asSilk LI: 'Silk TAG: added me!'",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-
|
|
|
|
-messageSends: ["LI:", "asSilk"]
|
|
|
|
-}),
|
|
|
|
-$globals.{%= name %});
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "start",
|
|
|
|
-protocol: 'starting',
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this;
|
|
|
|
-
|
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
|
-
|
|
|
|
-$recv(self._new())._augmentPage();
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"start",{},$globals.{%= name %}.klass)});
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-
|
|
|
|
-args: [],
|
|
|
|
-source: "start\x0a\x09self new augmentPage",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-
|
|
|
|
-messageSends: ["augmentPage", "new"]
|
|
|
|
-}),
|
|
|
|
-$globals.{%= name %}.klass);
|
|
|
|
-
|
|
|
|
-});
|
|
|