data-close-btn-text
@@ -407,7 +432,6 @@
Configuring defaults
Events
Methods & Utilities
- Responsive layout
Data attribute reference
Theme framework
diff --git a/docs/forms/selects/index.html b/docs/forms/selects/index.html
index 7ae82e53..894bd61a 100644
--- a/docs/forms/selects/index.html
+++ b/docs/forms/selects/index.html
@@ -583,18 +583,85 @@ $.mobile.selectmenu.prototype.options.hidePlaceholderMenuItems = false;
- Styling with data attributes
+ Theming selects
You can specify any jQuery Mobile button data- attribute on a select element, too. In this example, we're setting the theme, icon and inline properties:
Actions
-
+
Edit user
Delete user
-
+ The data-overlay-theme attribute can be added a select element to set the color of the overlay layer that the dialog-based custom select menus and the outer border of the smaller custom menus. By default, the content block colors for swatch A will be used for the overlays.
+
+
+ Size
+
+ Tall
+ Grande
+ Vente
+
+
+
+
+ Choose state(s):
+
+ Choose options
+ Alabama
+ Alaska
+ Arizona
+ Arkansas
+ California
+ Colorado
+ Connecticut
+ Delaware
+ Florida
+ Georgia
+ Hawaii
+ Idaho
+ Illinois
+ Indiana
+ Iowa
+ Kansas
+ Kentucky
+ Louisiana
+ Maine
+ Maryland
+ Massachusetts
+ Michigan
+ Minnesota
+ Mississippi
+ Missouri
+ Montana
+ Nebraska
+ Nevada
+ New Hampshire
+ New Jersey
+ New Mexico
+ New York
+ North Carolina
+ North Dakota
+ Ohio
+ Oklahoma
+ Oregon
+ Pennsylvania
+ Rhode Island
+ South Carolina
+ South Dakota
+ Tennessee
+ Texas
+ Utah
+ Vermont
+ Virginia
+ Washington
+ West Virginia
+ Wisconsin
+ Wyoming
+
+
+
Calling the select menu plugin
The select menu plugin will auto initialize on any page that contains a select menu, no need for a data-role attribute in the markup. However, you can directly call the select menu plugin on any selector, just like any normal jQuery plugin:
diff --git a/docs/pages/dialog-overlay.html b/docs/pages/dialog-overlay.html
new file mode 100644
index 00000000..41bff2f9
--- /dev/null
+++ b/docs/pages/dialog-overlay.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+ jQuery Mobile Framework - Dialog Example
+
+
+
+
+
+
+
+
+
+
+
+
Dialog
+
+
+
+
Custom overlay
+
This dialog adds data-overlay-theme="e" to the page container to set the overlay swatch color.
+
I like it
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/pages/page-dialogs.html b/docs/pages/page-dialogs.html
index 4a5118b1..e3dfc396 100755
--- a/docs/pages/page-dialogs.html
+++ b/docs/pages/page-dialogs.html
@@ -60,21 +60,29 @@
Since dialogs are typically used to support actions within a page, the framework does not include dialogs in the hash state history tracking. This means that dialogs will not appear in your browsing history chronology when the Back button is clicked. For example, if you are on a page, click a link to open a dialog, close the dialog, then navigate to another page, if you were to click the browser's Back button at that point you will navigate back to the first page, not the dialog.
Styling & theming
- Dialogs can be styled with different themes, just like any page. Here is a different dialog design:
+ Dialogs can be styled with different theme swatches, just like any page by adding data-theme attributes to the header, content, or footer containers. Here is an example of a different dialog design:
An alternate color scheme
+
+ Dialogs appear float above an overlay layer. This overlay adopts the swatch A content color by default, but the data-overlay-theme attribute can be added to the page wrapper to set the overlay to any swatch letter. Here is an example of a dialog with the overlay set to swatch e:
+ Custom overlay swatch
And dialogs can be can used more like a control sheet to offer multiple buttons by removing the header:
Share photos...
- For the sake of readability, dialogs have a default max-width of 500 pixels (plus 15px padding on each side). To override this, use the following CSS in your theme:
+ Dialog width and margins
+ For the sake of readability, dialogs have a default max-width of 500 pixels (plus 15px padding on each side). There is also a 10% top margin to give dialogs larger top margin on larger screens, but collapse to a small margin on smartphones. To override these styles, add the following CSS override rule to your stylesheet and tweak as needed:
-
-.ui-dialog .ui-header,
-.ui-dialog .ui-content,
-.ui-dialog .ui-footer { max-width: 100%; }
-
+
+.ui-dialog .ui-header,
+.ui-dialog .ui-content,
+.ui-dialog .ui-footer {
+ max-width: 500px;
+ margin: 10% auto 15px auto;
+}
+
+
diff --git a/docs/toolbars/docs-headers.html b/docs/toolbars/docs-headers.html
index b20eebb3..c9ef4764 100644
--- a/docs/toolbars/docs-headers.html
+++ b/docs/toolbars/docs-headers.html
@@ -169,7 +169,7 @@
Navbars
Fixed positioning
Fullscreen positioning
- Persistent footer nav bar
+ Persistent footer navbar
Theming toolbars
diff --git a/experiments/scrollview/scrollview.js b/experiments/scrollview/scrollview.js
index f033c784..cac968ed 100644
--- a/experiments/scrollview/scrollview.js
+++ b/experiments/scrollview/scrollview.js
@@ -1,8 +1,8 @@
function ResizePageContentHeight(page) {
var $page = $(page),
$content = $page.children( ".ui-content" ),
- hh = $page.children( ".ui-header" ).outerHeight() : 0,
- fh = $page.children( ".ui-footer" ).outerHeight() : 0,
+ hh = $page.children( ".ui-header" ).outerHeight() || 0,
+ fh = $page.children( ".ui-footer" ).outerHeight() || 0,
pt = parseFloat($content.css( "padding-top" )),
pb = parseFloat($content.css( "padding-bottom" )),
wh = window.innerHeight;
diff --git a/js/jquery.mobile.forms.select.custom.js b/js/jquery.mobile.forms.select.custom.js
index 2bccb6ab..7ca8ed14 100644
--- a/js/jquery.mobile.forms.select.custom.js
+++ b/js/jquery.mobile.forms.select.custom.js
@@ -24,7 +24,7 @@
"
"+
"" ).appendTo( $.mobile.pageContainer ).page(),
- listbox = $("", { "class": "ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-overlay-" + widget.options.overlayTheme + " " + $.mobile.defaultDialogTransition } ).insertAfter(screen),
+ listbox = $("
", { "class": "ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-" + widget.options.overlayTheme + " " + $.mobile.defaultDialogTransition } ).insertAfter(screen),
list = $( "
", {
"class": "ui-selectmenu-list",
diff --git a/tests/speed/stats/index.php b/tests/speed/stats/index.php
index 9f912a17..5922f256 100644
--- a/tests/speed/stats/index.php
+++ b/tests/speed/stats/index.php
@@ -1,23 +1,24 @@
query('CREATE TABLE IF NOT EXISTS stats (id INTEGER, agent TEXT, point TEXT, value REAL, time TIMESTAMP, PRIMARY KEY (id))');
+ $db->query('CREATE TABLE IF NOT EXISTS stats (id INTEGER, agent TEXT, point TEXT, value REAL, time TIMESTAMP, pathname TEXT, PRIMARY KEY (id))');
// making a sad attempt here to provide a clean REST-respecting url scheme.
// stats with a GET returns - wait for it - the stats, and a post with the
// the right params will create a new entry
if ( $_SERVER['REQUEST_METHOD'] == "GET" ) {
$json = Array();
- $st = $db->prepare( 'SELECT agent, point, value, time FROM stats' );
+ $st = $db->prepare( 'SELECT point, avg(value) as avg_value, pathname, strftime(\'%Y-%m-%d\', time) as day FROM stats GROUP BY pathname, point, strftime(\'%Y-%m-%d\', time) ORDER BY time;' );
$st->execute();
$result = $st->fetchAll(PDO::FETCH_ASSOC);
header("Content-Type: application/json");
echo json_encode($result);
- } elseif ( $_POST['datapoint'] && $_POST['value'] && $_POST['agent'] ) {
- $st = $db->prepare('INSERT INTO stats (agent, point, value, time) VALUES (:agent, :data_point, :value, DATETIME(\'now\'))');
+ } elseif ( $_POST['datapoint'] && $_POST['value'] && $_POST['agent'] && $_POST['pathname']) {
+ $st = $db->prepare('INSERT INTO stats (agent, point, value, pathname, time) VALUES (:agent, :data_point, :value, :pathname, DATETIME(\'now\'))');
$st->execute(array(
':agent' => $_POST['agent'],
':data_point' => $_POST['datapoint'],
- ':value' => $_POST['value']
+ ':value' => $_POST['value'],
+ ':pathname' => $_POST['pathname']
));
echo "success";
diff --git a/tests/speed/stats/perf.js b/tests/speed/stats/perf.js
index 343c0be6..06873378 100644
--- a/tests/speed/stats/perf.js
+++ b/tests/speed/stats/perf.js
@@ -9,6 +9,8 @@ window.Perf = (function($, Perf) {
report: function( data, after ) {
var self = this;
+ data.pathname = location.pathname;
+
$.post( self.reportUrl, data, after );
},
diff --git a/tests/speed/stats/visualize/index.html b/tests/speed/stats/visualize/index.html
new file mode 100644
index 00000000..0a8c6afb
--- /dev/null
+++ b/tests/speed/stats/visualize/index.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/speed/stats/visualize/visualize.css b/tests/speed/stats/visualize/visualize.css
new file mode 100644
index 00000000..2999fe1d
--- /dev/null
+++ b/tests/speed/stats/visualize/visualize.css
@@ -0,0 +1,46 @@
+/*plugin styles*/
+.visualize { border: 1px solid #888; position: relative; background: #fafafa; }
+.visualize canvas { position: absolute; }
+.visualize ul,.visualize li { margin: 0; padding: 0;}
+
+/*table title, key elements*/
+.visualize .visualize-info { padding: 3px 5px; background: #fafafa; border: 1px solid #888; position: absolute; top: -20px; right: 10px; opacity: .8; }
+.visualize .visualize-title { display: block; color: #333; margin-bottom: 3px; font-size: 1.1em; }
+.visualize ul.visualize-key { list-style: none; }
+.visualize ul.visualize-key li { list-style: none; float: left; margin-right: 10px; padding-left: 10px; position: relative;}
+.visualize ul.visualize-key .visualize-key-color { width: 6px; height: 6px; left: 0; position: absolute; top: 50%; margin-top: -3px; }
+.visualize ul.visualize-key .visualize-key-label { color: #000; }
+
+/*pie labels*/
+.visualize-pie .visualize-labels { list-style: none; }
+.visualize-pie .visualize-label-pos, .visualize-pie .visualize-label { position: absolute; margin: 0; padding:0; }
+.visualize-pie .visualize-label { display: block; color: #fff; font-weight: bold; font-size: 1em; }
+.visualize-pie-outside .visualize-label { color: #000; font-weight: normal; }
+
+/*line,bar, area labels*/
+.visualize-labels-x,.visualize-labels-y { position: absolute; left: 0; top: 0; list-style: none; }
+.visualize-labels-x li, .visualize-labels-y li { position: absolute; bottom: 0; }
+.visualize-labels-x li span.label, .visualize-labels-y li span.label { position: absolute; color: #555; }
+.visualize-labels-x li span.line, .visualize-labels-y li span.line { position: absolute; border: 0 solid #ccc; }
+.visualize-labels-x li { height: 100%; }
+.visualize-labels-x li span.label { top: 100%; margin-top: 5px; }
+.visualize-labels-x li span.line { border-left-width: 1px; height: 100%; display: block; }
+.visualize-labels-x li span.line { border: 0;} /*hide vertical lines on area, line, bar*/
+.visualize-labels-y li { width: 100%; }
+.visualize-labels-y li span.label { right: 100%; margin-right: 5px; display: block; width: 100px; text-align: right; }
+.visualize-labels-y li span.line { border-top-width: 1px; width: 100%; }
+.visualize-bar .visualize-labels-x li span.label { width: 100%; text-align: center; }
+
+body {
+ margin-top: 50px;
+}
+
+table {
+ display: none;
+}
+
+div.visualize {
+ float: left;
+ margin-left: 50px;
+ margin-right: 50px;
+}
\ No newline at end of file
diff --git a/tests/speed/stats/visualize/visualize.js b/tests/speed/stats/visualize/visualize.js
new file mode 100644
index 00000000..32de8c8d
--- /dev/null
+++ b/tests/speed/stats/visualize/visualize.js
@@ -0,0 +1,50 @@
+(function($) {
+ $(function() {
+ $.get("../", function(data) {
+ $.each(data, function( i, avg ) {
+ var $table = $( "#" + avg.point + "[data-pathname='" + avg.pathname + "']");
+
+ if( !$table.length ) {
+ $table = $( "", {
+ id: avg.point,
+ "data-pathname": avg.pathname
+ });
+
+ $table.append( "" + avg.point + " " + avg.pathname + " ");
+ $table.append( " " );
+ $table.append( " " );
+ }
+
+ // TODO assume time ordering in the data set
+ var $heading = $table.find("thead > tr > th:contains(" + avg.day + ")");
+
+ if( !$heading.length ) {
+ $heading = $("", {
+ text: avg.day,
+ scope: "column"
+ });
+
+ $table.find("thead > tr").append($heading);
+ }
+
+ var $rowHeading = $table.find("tbody > tr > th:contains(" + avg.point + ")" ),
+ $row = $table.find( "tbody > tr" );
+
+ if( !$rowHeading.length ) {
+ $rowHeading = $(" ", {
+ text: avg.point,
+ scope: "row"
+ });
+
+ $row.append( $rowHeading );
+ }
+
+ $row.append( " " + avg.avg_value + " " );
+
+ $("#tables").append($table);
+ });
+
+ $("#tables table").visualize({ type: "line", width: 400, height: 400 }).appendTo("#graphs");
+ });
+ });
+})(jQuery);
\ No newline at end of file