Created
July 26, 2013 07:19
-
-
Save leogomes/6086922 to your computer and use it in GitHub Desktop.
Testing class changes
This file contains 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 characters
{ | |
"name": "Testing class changes", | |
"description": "", | |
"data": { | |
"themes": [ | |
{ | |
"value": "theme1", | |
"label": "Black on lime" | |
}, | |
{ | |
"value": "theme2", | |
"label": "Navy on blue" | |
} | |
] | |
} | |
} |
This file contains 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 characters
{macro main()} | |
<div {id "main"/} class="theme2"> | |
<div {id "title"/} class="title"> | |
<h1>Hello Instant Aria Templates</h1> | |
</div> | |
</div> | |
{@aria:SelectBox { | |
label: "New theme: ", | |
labelWidth:220, | |
options : data.themes, | |
onchange: changeColor, | |
bind : { | |
value : { | |
to : "theme", | |
inside : data | |
} | |
} | |
}/} | |
{/macro} |
This file contains 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 characters
({ | |
$classpath:'InstantTemplateScript', | |
$prototype : { | |
changeColor: function() { | |
//alert("New theme:" + this.data.theme); | |
this.$getElementById("main").setProperty('className', this.data.theme); | |
} | |
} | |
}) |
This file contains 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 characters
{macro main()} | |
.theme1 { | |
background-color : #000000; | |
} | |
.title { | |
cursor: pointer; | |
} | |
.theme1 .title { | |
color : #00ff00; | |
} | |
.theme2 { | |
background-color : #E1E6FC; | |
} | |
.theme2 .title { | |
color : #000080; | |
} | |
{/macro} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created by Instant Aria Templates, viewable on http://instant.ariatemplates.com/leogomes/6086922