Skip to content

Instantly share code, notes, and snippets.

@benouat
Last active May 23, 2018 07:00
Show Gist options
  • Select an option

  • Save benouat/865d3f57e2fc04f70c0d5a4813b824f0 to your computer and use it in GitHub Desktop.

Select an option

Save benouat/865d3f57e2fc04f70c0d5a4813b824f0 to your computer and use it in GitHub Desktop.

Revisions

  1. Benoit Charbonnier revised this gist May 23, 2018. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions InstantTemplate.tpl
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,8 @@
    {macro main()}
    {@aria:TextField {
    block: true
    }/}
    <hr/>
    {@aria:Button {
    id: "first",
    label: "First",
  2. Benoit Charbonnier revised this gist May 23, 2018. 2 changed files with 21 additions and 3 deletions.
    19 changes: 18 additions & 1 deletion InstantTemplate.tpl
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,20 @@
    {macro main()}
    <h1>Hello Instant Aria Templates</h1>
    {@aria:Button {
    id: "first",
    label: "First",
    width: 100,
    onclick: {
    fn: "onUpdateButtonClick",
    scope: this
    }
    }/}
    {@aria:Button {
    id: "second",
    label: "Second",
    width: 100,
    onclick: {
    fn: "onUpdateButtonClick",
    scope: this
    }
    }/}
    {/macro}
    5 changes: 3 additions & 2 deletions InstantTemplateScript.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    ({
    $classpath:'InstantTemplateScript',
    $prototype : {
    myMethod: function() {
    }
    onUpdateButtonClick: function() {
    alert("Button clicked!");
    }
    }
    })
  3. Benoit Charbonnier created this gist May 23, 2018.
    3 changes: 3 additions & 0 deletions InstantTemplate.tpl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    {macro main()}
    <h1>Hello Instant Aria Templates</h1>
    {/macro}
    7 changes: 7 additions & 0 deletions InstantTemplateScript.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    ({
    $classpath:'InstantTemplateScript',
    $prototype : {
    myMethod: function() {
    }
    }
    })
    2 changes: 2 additions & 0 deletions InstantTemplateStyle.tpl.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    {macro main()}
    {/macro}
    5 changes: 5 additions & 0 deletions instant.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    {
    "name": "Focused Button with Enter & Space",
    "description": "",
    "data": {}
    }