From d3d933066c65f32ea52eef5c46472ed97fba974f Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 8 Jan 2009 21:51:13 +0000 Subject: integrating documentation into demo files, first draft; run Ant targets docs-download and docs-process to generate the files --- demos/demos.css | 58 +++++++++ demos/images/icon-docs-info.gif | Bin 0 -> 214 bytes demos/index.html | 22 +++- release/build.xml | 29 ++++- release/build/style.xsl | 274 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 381 insertions(+), 2 deletions(-) create mode 100644 demos/images/icon-docs-info.gif create mode 100644 release/build/style.xsl diff --git a/demos/demos.css b/demos/demos.css index 51c576e36..26bb35282 100644 --- a/demos/demos.css +++ b/demos/demos.css @@ -205,3 +205,61 @@ div.demo-description { #demo-link { font-size:11px; padding-top: 6px; clear: both; overflow: hidden; } #demo-link a span.ui-icon { float:left; margin-right:3px; } + +#widget-docs { margin:20px 0 0; } + +#widget-docs h2, #widget-docs h3, #widget-docs h4, #widget-docs p, #widget-docs ul, #widget-docs code { margin:0; padding:0; } +#widget-docs code { display:block; color:#444; font-size:.9em; margin:0 0 1em; } +#widget-docs code strong { color:#000; } +#widget-docs p { margin:0 3em 1.2em 0; } +#widget-docs p.intro { font-size:13px; color:#666; line-height:1.3; } +#widget-docs ul { list-style-type: none; } + +#widget-docs h2 { font-size:16px; margin:1.2em 0 .5em; } +#widget-docs h3 { font-size:14px; color:#e6820E; margin:1.5em 0 .5em; } +.normal #widget-docs h4 { font-size:12px; color:#000; border:0; margin:0 0 .5em; } + +#docs-overview-main { width:400px; } +#docs-overview-sidebar { float:right; width:200px; } +#docs-overview-sidebar a span { color:#666; } +#widget-docs #docs-overview-main p { margin-right:0; } +#widget-docs #docs-overview-sidebar h4 { padding-left:0; } + +.docs-list-header { float:left; width:100%; margin:10px 0 0; border-bottom:1px solid #eee; } +#widget-docs .docs-list-header h2 { float:left; margin:0; } +#widget-docs .docs-list-header p { float:right; margin:5px 0; font-size:11px; } + +.docs-list { float:left; width:100%; padding:0 0 10px; } +.docs-list .param-header { float:left; clear:left; width:100%; padding:8px 0; border-top:1px solid #eee; } +#widget-docs .param-header h3, #widget-docs .param-header p { margin:0; float:left; } +#widget-docs .param-header h3 { width:50%; } +#widget-docs .param-header h3 span { background: url(images/demo-spindown-closed.gif) no-repeat left; padding-left:13px; } +#widget-docs .param-open .param-header h3 span { background: url(images/demo-spindown-open.gif) no-repeat left; } +#widget-docs .param-header p { width:24%; } +#widget-docs .param-header p.param-type span { background: url(images/icon-docs-info.gif) no-repeat left; cursor:pointer; border-bottom:1px dashed #ccc; padding-left:15px; } + +.param-details { padding-left:13px; } +.param-args { margin:0 0 1.5em; border-top:1px dotted #ccc;} +.param-args td { padding:3px 30px 3px 5px; border-bottom:1px dotted #ccc; } + + +/* overrides for ui-tab styles */ +#widget-docs ul.ui-tabs-nav { padding:0 0 0 8px; } +#widget-docs .ui-tabs-nav li { margin:5px 5px 0 0; } + +#widget-docs .ui-tabs-nav li a:link, +#widget-docs .ui-tabs-nav li a:visited, +#widget-docs .ui-tabs-nav li a:hover, +#widget-docs .ui-tabs-nav li a:active { font-size:14px; padding:4px 1.2em 3px; color:#fff; } + +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:link, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:visited, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:hover, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:active { color:#e6820E; } + +#widget-docs .ui-tabs-panel { padding:20px 9px; font-size:12px; line-height:1.4; color:#000; } + +#widget-docs .ui-widget-content a:link, +#widget-docs .ui-widget-content a:visited { color:#1b75bb; text-decoration:none; } +#widget-docs .ui-widget-content a:hover, +#widget-docs .ui-widget-content a:active { color:#0b559b; } \ No newline at end of file diff --git a/demos/images/icon-docs-info.gif b/demos/images/icon-docs-info.gif new file mode 100644 index 000000000..6b0464e01 Binary files /dev/null and b/demos/images/icon-docs-info.gif differ diff --git a/demos/index.html b/demos/index.html index 8aeabfc15..e7f19ab84 100644 --- a/demos/index.html +++ b/demos/index.html @@ -162,8 +162,28 @@ $('#demo-frame').empty().html(data); $('#demo-link a').attr('href', path); updateDemoNotes(); - }); + if (/default.html$/.test(path)) { + $.get("../documentation/" + path.match(/demos\/(.+)\//)[1] + ".html", function(html) { + $("#demo-notes").after(html); + $("#widget-docs").tabs(); + $(".param-header").click(function() { + $(this).parent().toggleClass("param-open").end().next().toggle(); + }); + $(".docs-list-header").each(function() { + var header = $(this); + var details = header.next().find(".param-details").hide(); + $("a:first", header).click(function() { + details.show().parent().addClass("param-open"); + return false; + }); + $("a:last", header).click(function() { + details.hide().parent().removeClass("param-open"); + return false; + }); + }); + }); + } } function updateDemoNotes() { diff --git a/release/build.xml b/release/build.xml index 050764649..e707217a4 100644 --- a/release/build.xml +++ b/release/build.xml @@ -218,4 +218,31 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/release/build/style.xsl b/release/build/style.xsl new file mode 100644 index 000000000..bc7ef023c --- /dev/null +++ b/release/build/style.xsl @@ -0,0 +1,274 @@ + + + + + + link- + + - + + + + + + + + # + + + + + + + + + + + + + + A jQuery object. + true or false. + A simple Javascript object.. + A string of characters. + A valid numeric. + A string of characters or a number. + The Javascript object representation of a DOM Element. + One or more DOM Elements (a single one or an array). + A Javascript object that contains key/value pairs in the form of properties and values. + An Array of DOM Elements. + An Array of strings. + A reference to a Javascript function. + An XMLHttpRequest object (referencing a HTTP request). + + + + + + + + + A jQuery object. + true or false. + A simple Javascript object.. + A string of characters. + A valid numeric. + A string of characters or a number. + The Javascript object representation of a DOM Element. + One or more DOM Elements (a single one or an array). + A Javascript object that contains key/value pairs in the form of properties and values. + An Array of DOM Elements. + An Array of strings. + A reference to a Javascript function. + An XMLHttpRequest object (referencing a HTTP request). + + + + + + + + + + +

+ + + +
+ + + +
+
+ + +
+
+

+

+

Default:

+
+
+

+ +
+
+
+ + +
+ + + +
+ +
+

+ + + +

+

+ + + +

+
+
+ + +
+

+ +
+

Property options

+

Show details | Hide details

+
+ +
+ + + +
+ +
+

Event options

+

Show details | Hide details

+
+ +
+ + + +
+
+ + +
+

A brief description of methods and their uses goes here so their use is clearly explained and any caveats can be mentioned up front.

+ +
+

Methods

+

Show details | Hide details

+
+ +
+ +
+
+

( + + , + + )

+

Returns:

+
+
+

+

+

Arguments:

+ + + + + + + + + + +
+ +

Code sample:

+ +

+ + + +
+
+
+
+ +
+
+ + +
+

ui.dialog uses the jQuery UI CSS styles framework for all major components, e.g. for the titlebar, the resize handle, etc., some of which are borrowed from ui.resizable.

+ +

Sample code with CSS classes

+ +

Use the classes highlighted in bold to customize the dialog:

+ + + + + <div class="ui-dialog" role="dialog" aria-labelledby="ui-dialog-title-1">
+   <div class="ui-dialog-titlebar">
+     <span class="ui-dialog-title" id="ui-dialog-title-1">Dialog Title</span>
+     <a href="#" class="ui-dialog-titlebar-close" role="button" title="Close">
+     <span class="ui-icon ui-icon-closethick">Close</span></a>
+   </div>
+   <div class="ui-dialog-content" style="height: 13em;">
+     <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt</p>
+   </div>
+   <div class="ui-dialog-buttonpane">
+     <button class="ui-state-default ui-priority-primary ui-corner-all">Primary</button>
+     <button class="ui-state-default ui-priority-secondary ui-corner-all">Secondary</button>
+     <button class="ui-state-default ui-state-disabled ui-corner-all">Disabled</button>
+   </div>
+   <div class="ui-resizable-n ui-resizable-handle"></div>
+   <div class="ui-resizable-s ui-resizable-handle"></div>
+   <div class="ui-resizable-e ui-resizable-handle"></div>
+   <div class="ui-resizable-w ui-resizable-handle"></div>
+   <div class="ui-resizable-ne ui-resizable-handle"></div>
+   <div class="ui-resizable-se ui-resizable-handle ui-icon ui-icon-grip-diagonal-se"></div>
+   <div class="ui-resizable-sw ui-resizable-handle"></div>
+   <div class="ui-resizable-nw ui-resizable-handle"></div>
+ </div> +
+ +

See also

+ + +
+
+
+ +
-- cgit v1.2.3