Changeset 13737
- Timestamp:
- 05/15/08 04:24:57 (3 months ago)
- Files:
-
- 1 modified
-
dijit/trunk/tests/form/test_Button.html (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/tests/form/test_Button.html
r13735 r13737 20 20 21 21 <!-- required: the default dijit theme: --> 22 <link id="themeStyles" rel="stylesheet" href="../../../dijit/themes/tundra/tundra.css" />22 <link id="themeStyles" rel="stylesheet" href="../../../dijit/themes/tundra/tundra.css"> 23 23 24 24 <!-- required: dojo.js --> … … 117 117 onClick="console.log('not actually saving anything, just a test!')">Save As</div> 118 118 </div> 119 </div> 120 </div> 121 <br clear=both> 119 </div> 120 </div> 121 <br clear=both> 122 122 <h2>Toggle buttons</h2> 123 123 <p>The button CSS as well as the icon CSS can change on toggle </p> … … 155 155 <h2>Customized buttons</h2> 156 156 <p>Dojo users can customize styles. Here's an example:</p> 157 <style >157 <style type="text/css"> 158 158 .acmeButton .dijitButtonNode { 159 159 background: rgb(96,96,96) !important; … … 215 215 dijit.registry.filter(function(widget){ return widget instanceof dijit.form.Button; }).forEach(func); 216 216 } 217 var disabled=false;218 function toggleDisabled(){ 219 disabled =!disabled;217 var disabled = false; 218 function toggleDisabled(){ 219 disabled =! disabled; 220 220 forEachButton(function(widget){ widget.setAttribute('disabled',disabled); }); 221 221 dojo.byId("toggle").innerHTML= disabled ? "Enable all" : "Disable all"; … … 224 224 "<span style='color: red'>makes</span>", "Jack", "<h3>a</h3>", "dull", 225 225 "<img src='../images/plus.gif' width='16' height='16'>boy"]; 226 var idx =0;226 var idx = 0; 227 227 function changeLabels(){ 228 228 forEachButton(function(widget){ … … 239 239 <div id="buttonContainer"></div> 240 240 <script type="text/javascript"> 241 // See if we can make a button in script and attach it to the DOM ourselves.242 dojo.addOnLoad(function(){243 var params = {244 label: "hello!",245 name: "programmatic"246 };247 var widget = new dijit.form.Button(params, document.getElementById("buttonContainer"));248 });241 // See if we can make a button in script and attach it to the DOM ourselves. 242 dojo.addOnLoad(function(){ 243 var params = { 244 label: "hello!", 245 name: "programmatic" 246 }; 247 var widget = new dijit.form.Button(params, "buttonContainer"); 248 }); 249 249 </script> 250 250 <h3>DropDownButton instantiated via javacript:</h3>