Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 554f5d7

Browse files
Update popup examples.
1 parent bafd067 commit 554f5d7

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

docs/_assets/css/jqm-docs.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ dd h4 { margin:15px 0 0 0; }
169169
max-width:100%;
170170
text-shadow: none !important;
171171
}
172+
/* popup Video example */
173+
.type-interior .ui-popup-container .ui-content { padding: 15px !important; }
172174

173175
/* F bar theme - just for the docs overview headers */
174176
.ui-bar-f {

docs/pages/popup/index.html

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h2>Popup</h2>
5353
<p>This is a completely basic popup, no options set.</p>
5454
</div>
5555

56-
<p>This example isn't too pretty because a default popup container doesn't have padding. It's really just a container with rounded corners and a shadow which serves as a blank slate for your designs (even these features can be disabled via <a href="options.html">options</a>). This simple styling makes it easy to add in widgets like a listview to make a <a href="#popupMenu" data-rel="popup">menu</a> or photo to make a <a href="#popupPhoto" data-rel="popup">lightbox</a> that go right up to the edge of the popup.</p>
56+
<p>The framework sets a small margin on text elements, but basically it's really just a container with rounded corners and a shadow which serves as a blank slate for your designs (even these features can be disabled via <a href="options.html">options</a>). This simple styling makes it easy to add in widgets like a listview to make a <a href="#popupMenu" data-rel="popup">menu</a> or photo to make a <a href="#popupMap" data-rel="popup">lightbox</a> that go right up to the edge of the popup.</p>
5757

5858

5959
<h2>Calling the popup plugin</h2>
@@ -89,12 +89,19 @@ <h2>Closing popups</h2>
8989
&lt;/div&gt;
9090
</code></pre>
9191

92-
<a href="#popupMap" data-rel="popup" data-role="button" data-inline="true">Popup with close button</a>
93-
<div data-role="popup" id="popupMap" data-overlay-theme="a" data-theme="a" data-corners="false">
92+
<a href="#popupCloseRight" data-rel="popup" data-role="button" data-inline="true">Popup with close button right</a>
93+
<a href="#popupCloseLeft" data-rel="popup" data-role="button" data-inline="true">Popup with close button left</a>
94+
95+
<div data-role="popup" id="popupCloseRight" class="ui-content">
9496
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
95-
<div id="map_canvas"></div>
97+
<p>I have a close button at the top right corner.</p>
9698
</div>
97-
99+
100+
<div data-role="popup" id="popupCloseLeft" class="ui-content">
101+
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-left">Close</a>
102+
<p>I have a close button at the top left corner.</p>
103+
</div>
104+
98105
<h2>Adding padding</h2>
99106
<p>For popups with formatted text, padding is needed. We recommend adding the <code>ui-content</code> class to the popup container which adds the standard 15px of padding, just like the page content container. Write your own styles to create a more customized design if needed.</p>
100107

@@ -193,7 +200,7 @@ <h2>Popup examples</h2>
193200
<a href="#popupMap" data-rel="popup" data-role="button" data-inline="true" data-transition="fade">Map</a>
194201
<a href="#popupVideo" data-rel="popup" data-role="button" data-inline="true" data-transition="none">Video</a>
195202

196-
<div data-role="popup" id="popupInfo" class="ui-content" data-theme="e">
203+
<div data-role="popup" id="popupInfo" class="ui-content" data-theme="e" style="max-width:350px;">
197204
<p>Here is a <strong>tiny popup</strong> being used like a tooltip. The text will wrap to multiple lines as needed.</p>
198205
</div>
199206

@@ -259,9 +266,14 @@ <h3>Steve Jobs</h3>
259266
</div>
260267
</div>
261268
</div>
262-
263-
<div data-role="popup" id="popupVideo" data-overlay-theme="a" data-theme="c" data-inset="true" style="width:537px; height: 338px;">
264-
<iframe src="http://player.vimeo.com/video/41135183?autoplay=1" width="497" height="298" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen style="padding:20px 20px;"></iframe>
269+
270+
<div data-role="popup" id="popupMap" data-overlay-theme="a" data-theme="a" data-corners="false">
271+
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
272+
<div id="map_canvas"></div>
273+
</div>
274+
275+
<div data-role="popup" id="popupVideo" data-overlay-theme="a" data-theme="c" class="ui-content">
276+
<iframe src="http://player.vimeo.com/video/41135183?autoplay=1" width="497" height="298" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
265277
</div>
266278

267279
<h2>Note: Chaining of popups not allowed</h2>

0 commit comments

Comments
 (0)