Skip to content
This repository
Browse code

added a workaround to prevent conflicts with fixedtoolbars - the css …

…workaround is in the fixedtoolbar css
  • Loading branch information...
commit 292b1f8ba453a774f71e74285b1f431488d3b4e8 1 parent e72d2c1
authored December 18, 2012
7  css/structure/jquery.mobile.fixedToolbar.css
@@ -49,6 +49,13 @@
49 49
 .ui-footer-fixed .ui-btn { 
50 50
 	z-index: 10;
51 51
 }
  52
+/* workarounds for other widgets */
52 53
 .ui-android-2x-fixed .ui-li-has-thumb {
53 54
 	-webkit-transform: translate3d(0,0,0);
  55
+}
  56
+.ui-panel-content-wrap .ui-header-fixed {
  57
+	-webkit-transform: translateY(-100%);
  58
+}
  59
+.ui-panel-content-wrap-closed .ui-header-fixed {
  60
+	-webkit-transform: none;
54 61
 }
2  docs/panels/index.html
@@ -34,7 +34,7 @@
34 34
 
35 35
 
36 36
 
37  
-			<div data-role="header" data-theme="f">
  37
+			<div data-role="header" data-theme="f" data-position="fixed">
38 38
 				<h1>Panels</h1>
39 39
 				<a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
40 40
 				<a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
4  js/widgets/panel.js
@@ -20,6 +20,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
20 20
 			openComplete: "ui-panel-open-complete",
21 21
 			contentWrap: "ui-panel-content-wrap",
22 22
 			contentWrapOpen: "ui-panel-content-wrap-open",
  23
+			contentWrapClosed: "ui-panel-content-wrap-closed",
23 24
 			panelUnfixed: "ui-panel-unfixed",
24 25
 			contentWrapOpenComplete: "ui-panel-content-wrap-open-complete",
25 26
 			pageBlock: "ui-panel-page-block",
@@ -57,6 +58,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
57 58
 		self._page = $el.closest( ":jqmData(role='page')" );
58 59
 		self._wrapper = _getWrapper();
59 60
 		self._addPanelClasses();
  61
+		self._wrapper.addClass( this.options.classes.contentWrapClosed );
60 62
 
61 63
 		// if animating, add the class to do so
62 64
 		if ( $.support.cssTransitions && self.options.animate ) {
@@ -217,6 +219,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
217 219
 		self.element.removeClass( o.classes.panelClosed );
218 220
 		self.element.addClass( o.classes.panelOpen );
219 221
 		self._contentWrapOpenClasses = self._getPosDisplayClasses( o.classes.contentWrap );
  222
+		self._wrapper.removeClass( o.classes.contentWrapClosed );
220 223
 		self._wrapper.addClass( self._contentWrapOpenClasses + " " + o.classes.contentWrapOpen );
221 224
 		self._modalOpenClasses = self._getPosDisplayClasses( o.classes.modal ) + " " + o.classes.modalOpen;
222 225
 		self._modal.addClass( self._modalOpenClasses );
@@ -232,6 +235,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
232 235
 				self.element.add( self._wrapper ).unbind( self._transitionEndEvents , complete );
233 236
 				self.element.addClass( o.classes.panelClosed );
234 237
 				self._wrapper.removeClass( self._contentWrapOpenClasses );
  238
+				self._wrapper.addClass( o.classes.contentWrapClosed );
235 239
 				self._page.removeClass( self.options.classes.pageBlock );
236 240
 				self._fixPanel();
237 241
 				self._unbindFixListener();

0 notes on commit 292b1f8

Please sign in to comment.
Something went wrong with that request. Please try again.