Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Config: Document urlConfig options #42

Closed
wants to merge 1 commit into from

2 participants

@gibson042 gibson042 referenced this pull request in jquery/qunit
Closed

Issue #385: urlConfig select-one lists #443

@jzaefferer
Owner

Thanks. I've made some updates to this and pushed the pr/42 for now. Will land this in master and deploy once the underlying feature is released.

@jzaefferer
Owner

Feature is in master, I intend to release 1.14 soon to finish this.

@jzaefferer
Owner

Thanks! This is now live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 24, 2014
  1. @gibson042

    Config: Document urlConfig options

    gibson042 authored
    Ref QUnit #385
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 2 deletions.
  1. +6 −2 entries/QUnit.config.xml
View
8 entries/QUnit.config.xml
@@ -48,8 +48,12 @@
</property>
<property name="urlConfig" type="Array">
<desc>
- This property controls which checkboxes to put into the QUnit toolbar element (below the header). By default, the "noglobals" and "notrycatch" checkboxes are there. By extending this array, you can add your own checkboxes.
- <p>Each element should have three properties: <code>id</code> will be used as the config and query-string key, <code>label</code> will be used as the display propery (text in the UI), <code>tooltip</code> will be used as the title attribute, and should explain what the checkbox does.</p>
+ This property controls which form controls to put into the QUnit toolbar element (below the header). By default, the "noglobals" and "notrycatch" checkboxes are there. By extending this array, you can add your own checkboxes and select lists.
+ <p>Each element should be an object with a <code>id</code> property (used as the config and query-string key) and a <code>label</code> property (used as text in the UI), and optionally a <code>tooltip</code> property (used as the title attribute to explain what the control does). Each element should also have a <code>value</code> property controlling available options and rendering.</p>
+ <p>If <code>value</code> is undefined, the option will render as a checkbox. The corresponding URL parameter will be set to "true" when the checkbox is checked, and otherwise will be absent.</p>
+ <p>If <code>value</code> is a string, the option will render as a checkbox. The corresponding URL parameter will be set to the string when the checkbox is checked, and otherwise will be absent.</p>
+ <p>If <code>value</code> is an array, the option will render as a select-one with an empty first option, followed by an option for each element of the array, with text and value matching the element. The corresponding URL parameter will be absent when the empty option is selected, and otherwise will be set to the value of the selected array element.</p>
+ <p>If <code>value</code> is an object, the option will render as a select-one with an empty first option, followed by an option for each property of the object, with text and value matching the name and value (respectively) of the property. The corresponding URL parameter will be absent when the empty option is selected, and otherwise will be set to the value of the selected object property.</p>
</desc>
</property>
</signature>
Something went wrong with that request. Please try again.