Permalink
Browse files

event="..." --> data-dojo-event="...", args="..." --> data-dojo-args=…

…"...", refs #16585
  • Loading branch information...
wkeese committed Jan 21, 2013
1 parent da49f08 commit 7b51ffd9aca4448261ac54b29905c4630d8b0237
@@ -91,21 +91,21 @@ <h2>Non-dojo select (for comparison)</h2>
</td>
<td>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
ms1.invertSelection(true);
return false;
</script>
Invert Selection
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
ms1.set("disabled", !ms1.disabled);
return false;
</script>
Toggle Disabled
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
console.log(ms1.get("displayedValue"));
return false;
</script>
@@ -126,7 +126,7 @@ <h2>Non-dojo select (for comparison)</h2>
</td>
<td>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
ms2.set("readOnly", !ms2.readOnly);
return false;
</script>
@@ -141,15 +141,15 @@ <h2>Non-dojo select (for comparison)</h2>
</td>
<td>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
checkOptions++;
ms3.addOption({value: checkOptions + "", label: "Option " + (checkOptions)});
return false;
</script>
Add Check Option
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
if(checkOptions > 0){
checkOptions--;
ms3.removeOption(checkOptions);
@@ -175,7 +175,7 @@ <h2>Non-dojo select (for comparison)</h2>
</select>
<button dojoType="dijit.form.Button">
Validate
- <script type='dojo/method' event='onClick'>
+ <script type='dojo/method' data-dojo-event='onClick'>
var isvalid = rq1.isValid();
console.warn("isvalid?", isvalid, form, form.validate);
try{
@@ -189,7 +189,7 @@ <h2>Non-dojo select (for comparison)</h2>
</button>
<hr><h2>Output values in console</h2>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
console.dir(form.get("value"));
return false;
</script>
@@ -96,21 +96,21 @@ <h2>Non-dojo select (for comparison)</h2>
</td>
<td>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
ms1.invertSelection(true);
return false;
</script>
Invert Selection
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
ms1.set("disabled", !ms1.disabled);
return false;
</script>
Toggle Disabled
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
console.log(ms1.get("displayedValue"));
return false;
</script>
@@ -131,7 +131,7 @@ <h2>Non-dojo select (for comparison)</h2>
</td>
<td>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
ms2.set("readOnly", !ms2.readOnly);
return false;
</script>
@@ -146,15 +146,15 @@ <h2>Non-dojo select (for comparison)</h2>
</td>
<td>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
checkOptions++;
ms3.addOption({value: checkOptions + "", label: "Option " + (checkOptions)});
return false;
</script>
Add Check Option
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
if(checkOptions > 0){
checkOptions--;
ms3.removeOption(checkOptions);
@@ -180,7 +180,7 @@ <h2>Non-dojo select (for comparison)</h2>
</select>
<button dojoType="dijit.form.Button">
Validate
- <script type='dojo/method' event='onClick'>
+ <script type='dojo/method' data-dojo-event='onClick'>
var isvalid = rq1.isValid();
console.warn("isvalid?", isvalid, form, form.validate);
try{
@@ -194,7 +194,7 @@ <h2>Non-dojo select (for comparison)</h2>
</button>
<hr><h2>Output values in console</h2>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
console.dir(form.get("value"));
return false;
</script>
@@ -147,16 +147,16 @@
<button type="submit" dojoType="dijit.form.Button" name="w11" observer="showValues">w11 typesubmit</button>
</div>
</fieldset>
- <script type="dojo/method" event="onSubmit">
+ <script type="dojo/method" data-dojo-event="onSubmit">
// do not submit this form
return false;
</script>
- <script type="dojo/method" event="logRadio">
+ <script type="dojo/method" data-dojo-event="logRadio">
// sample observer: logs radio buttons by name
var values = this.gatherFormValues(["e02", "w02"]);
console.log("e02: " + values.e02 + ", w02: " + values.w02);
</script>
- <script type="dojo/method" event="showValues" args="value,name">
+ <script type="dojo/method" data-dojo-event="showValues" data-dojo-args="value,name">
if(name){
// first time this method is called with no parameters
// show the name and the value otherwise
@@ -53,7 +53,7 @@ <h3>Alternate delimiter (:)</h3>
<h3>From code:</h3>
<button dojoType="dijit.form.Button">
Make it.
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
var widget = new dojox.form.MultiComboBox({
store:memberTagStore,
searchAttr:"tag"
@@ -115,7 +115,7 @@ <h4 class="testSubtitle">No old password</h4>
<h4 class="testSubtitle">Old password (hard-coded to "oldpw2") - not passed to getValues</h4>
<form dojoType="dijit.form.Form" data-dojo-id="form2" action="" method="GET">
<div dojoType="dojox.form.PasswordValidator" data-dojo-id="valid2" name="password">
- <script type="dojo/method" event="pwCheck" args="password">
+ <script type="dojo/method" data-dojo-event="pwCheck" data-dojo-args="password">
/*
NOTE: Do NOT EVER EVER EVER do this sort of a check!!!
@@ -146,7 +146,7 @@ <h4 class="testSubtitle">Old password (hard-coded to "oldpw2") - not passed to g
<h4 class="testSubtitle">Old password (hard-coded to "oldpw3") - passed to getValues</h4>
<form dojoType="dijit.form.Form" data-dojo-id="form3" action="" method="GET">
<div dojoType="dojox.form.PasswordValidator" data-dojo-id="valid3" name="password" oldName="oldPassword">
- <script type="dojo/method" event="pwCheck" args="password">
+ <script type="dojo/method" data-dojo-event="pwCheck" data-dojo-args="password">
console.log("Checking " + password);
return password === "oldpw3";
</script>
@@ -159,7 +159,7 @@ <h4 class="testSubtitle">Old password (hard-coded to "oldpw3") - passed to getVa
<h4 class="testSubtitle">In Table, Old password (hard-coded to "oldpw4") - not passed to getValues</h4>
<form dojoType="dijit.form.Form" data-dojo-id="form4">
<div dojoType="dojox.form.PasswordValidator" data-dojo-id="valid4" name="password">
- <script type="dojo/method" event="pwCheck" args="password">
+ <script type="dojo/method" data-dojo-event="pwCheck" data-dojo-args="password">
return password === "oldpw4";
</script>
<table>
@@ -182,7 +182,7 @@ <h4 class="testSubtitle">In Table, Old password (hard-coded to "oldpw4") - not p
<h4 class="testSubtitle">In Table, Old password (hard-coded to "oldpw5") - passed to getValues</h4>
<form dojoType="dijit.form.Form" data-dojo-id="form5">
<div dojoType="dojox.form.PasswordValidator" data-dojo-id="valid5" name="password" oldName="oldPassword">
- <script type="dojo/method" event="pwCheck" args="password">
+ <script type="dojo/method" data-dojo-event="pwCheck" data-dojo-args="password">
return password === "oldpw5";
</script>
<table>
@@ -211,33 +211,33 @@ <h4 class="testSubtitle">No old password, not required</h4>
</form>
<hr>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.forEach([form1, form2, form3, form4, form5, form6], function(i){
console.dir(i.get("value"));
});
</script>
Get Values
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
valid5.set("disabled", !valid5.disabled);
</script>
Toggle Disabled
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
form1.submit();
</script>
Submit Form 1
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
form2.submit();
</script>
Submit Form 2
</button>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
form3.submit();
</script>
Submit Form 3
@@ -59,10 +59,10 @@ <h3>Customized, "my big stars":</h3>
The attribute "numStars" is set to 10, so we see ten stars.
<div id="rating1Box">
<span id="rating1" dojoType="dojox.form.Rating" numStars="10">
- <script type="dojo/event" event="onChange">
+ <script type="dojo/event" data-dojo-event="onChange">
dojo.query('#rating1Value')[0].innerHTML = this.value;
</script>
- <script type="dojo/event" event="onMouseOver" args="evt,value">
+ <script type="dojo/event" data-dojo-event="onMouseOver" data-dojo-args="evt,value">
dojo.query('#rating1HoverValue')[0].innerHTML = value;
</script>
</span>
@@ -119,7 +119,7 @@ <h4 class="testSubtitle">*Two* controllers</h4>
<select dojoType="dojox.form.DropDownStack" name="dual" stackId="dualStack" stackPrefix="dual_"></select><br>
<hr>
<button dojoType="dijit.form.Button">
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
console.dir(form.get("value"));
</script>
Get Values
@@ -112,7 +112,7 @@ <h2>Dojo FX: base animations</h2>
<button dojoType="dijit.form.Button">
Fade In/Out
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.fadeOut({ node:"testSlide",
onEnd:function(){
dojo.fadeIn({ node:"testSlide", delay:300 }).play();
@@ -123,7 +123,7 @@ <h2>Dojo FX: base animations</h2>
<button dojoType="dijit.form.Button">
animateProperty: height
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.animateProperty({
node:"testSlide",
properties:{ height:{ end:1 } },
@@ -140,7 +140,7 @@ <h2>Dojo FX: base animations</h2>
<button dojoType="dijit.form.Button">
animateProperty: width
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.animateProperty({
node:"testSlide",
properties:{ width:1 },
@@ -166,7 +166,7 @@ <h2>Animate CSS Properties:</h2>
<button dojoType="dijit.form.Button">
marginLeft
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.animateProperty({
node:"lorem",
properties:{
@@ -187,7 +187,7 @@ <h2>Animate CSS Properties:</h2>
<button dojoType="dijit.form.Button">
left / paddingTop
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.animateProperty({
node:"lorem",
properties:{
@@ -213,7 +213,7 @@ <h2>Animate CSS Properties:</h2>
<button dojoType="dijit.form.Button">
fontSize / width
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.animateProperty({
node:"lorem",
properties:{
@@ -250,7 +250,7 @@ <h2>dojo.fx - Core animations</h2>
<button dojoType="dijit.form.Button">
Slide
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
// we're 175px, slide to containerWidth - 195
var left = dojo.marginBox("testSlideWrapper").w - 195;
// make and play the animation
@@ -268,7 +268,7 @@ <h2>dojo.fx - Core animations</h2>
<button dojoType="dijit.form.Button">
Combine Slide / Fade
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
var anim1 = dojo.fx.slideTo({
top: 10,
left: dojo.marginBox("testSlideWrapper").w - 195,
@@ -292,7 +292,7 @@ <h2>dojo.fx - Core animations</h2>
<button dojoType="dijit.form.Button">
Chain (4)
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
var anim1 = dojo.fadeOut({ node:"testSlideToo",
// so anim1 is over, making this onEnd and anim2 basically
// a combine() (depending on the duration: )
@@ -325,7 +325,7 @@ <h2>dojo.query FX</h2>
<button dojoType="dijit.form.Button">
fade .even
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.query(".even","queryUl").fadeOut({
onEnd:function(){
dojo.query(".even","queryUl").fadeIn({ delay: 300 }).play();
@@ -336,7 +336,7 @@ <h2>dojo.query FX</h2>
<button dojoType="dijit.form.Button">
fade .odd
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.query(".odd","queryUl").fadeOut({
onEnd:function(){
dojo.query(".odd","queryUl").fadeIn({ delay: 300 }).play();
@@ -347,7 +347,7 @@ <h2>dojo.query FX</h2>
<button dojoType="dijit.form.Button">
shift .odd
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.query(".odd","queryUl").animateProperty({
properties:{
marginLeft:34
@@ -367,7 +367,7 @@ <h2>dojo.query FX</h2>
<button dojoType="dijit.form.Button">
mmm, easing
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
dojo.query(".odd","queryUl").animateProperty({
easing:dojo.fx.easing.backOut,
properties:{
@@ -390,7 +390,7 @@ <h2>dojo.query FX</h2>
<button dojoType="dijit.form.Button">
Setup FisheyeList
- <script type="dojo/method" event="onClick">
+ <script type="dojo/method" data-dojo-event="onClick">
this.setAttribute("disabled",true);
dojo.query("li","fisheyeList").forEach(function(n){
new dojox.widget.FisheyeLite({
Oops, something went wrong.

0 comments on commit 7b51ffd

Please sign in to comment.