jQuery UI Functional Test Suite

Say it in Smalltalk, Do it with jQuery

Dialog Widget

For additional documentation and examples please visit the official web-site.

Demo

  • Alfalfa
  • Clover
  • Peas
  • Beans
  • Lentils
  • Lupins
  • Peanuts

Smalltalk

JQDialogFunctionalTest>>renderWindowOn: html
   | id |
   html div
      id: (id := html nextId);
      script: (html jQuery new dialog
         title: 'Vegetables';
         autoOpen: false;
         addButton: 'Close' do: html jQuery new dialog close);
      with: [ html unorderedList list: self vegetables ].
   html submitButton
      onClick: (html jQuery id: id) dialog open;
      with: 'Open Window'.
   html submitButton
      onClick: (html jQuery id: id) dialog close;
      with: 'Close Window'

JQDialogFunctionalTest>>renderLightboxOn: html
   | id |
   html div
      id: (id := html nextId);
      script: (html jQuery new dialog
         html: JQCounterFunctionalTest new;
         title: 'Lightbox Dialog';
         resizable: false;
         modal: true).
   html submitButton
      onClick: (html jQuery id: id) dialog open;
      with: 'Open Lightbox'

Source

< =>
  <>
    <>Alfalfa</>
    <>Clover</>
    <>Peas</>
    <>Beans</>
    <>Lentils</>
    <>Lupins</>
    <>Peanuts</>
  </>
</>
< = = = =/>
< = = = =/>
< =></>
< = = = =/>
< =>/*<![CDATA[*/$("#id29").dialog({"title":"Vegetables","autoOpen":false,"buttons":{"Close":function(){$(this).dialog("close")}}});$("#id30").bind("click",function(){$("#id29").dialog("open")});$("#id31").bind("click",function(){$("#id29").dialog("close")});$("#id32").dialog({"autoOpen":false,"open":function(){$("#id32").load("/javascript/jquery-ui/dialogwidget",["_s=zpchl7Kihg8baebK","_k=eevGbIubduSy8APQ","33"].join("&"))},"title":"Lightbox Dialog","resizable":false,"modal":true});$("#id34").bind("click",function(){$("#id32").dialog("open")});/*]]>*/</>