Permalink
Browse files

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

…workaround is in the fixedtoolbar css
  • Loading branch information...
1 parent e72d2c1 commit 292b1f8ba453a774f71e74285b1f431488d3b4e8 Scott Jehl committed Dec 18, 2012
Showing with 12 additions and 1 deletion.
  1. +7 −0 css/structure/jquery.mobile.fixedToolbar.css
  2. +1 −1 docs/panels/index.html
  3. +4 −0 js/widgets/panel.js
@@ -49,6 +49,13 @@
.ui-footer-fixed .ui-btn {
z-index: 10;
}
+/* workarounds for other widgets */
.ui-android-2x-fixed .ui-li-has-thumb {
-webkit-transform: translate3d(0,0,0);
+}
+.ui-panel-content-wrap .ui-header-fixed {
+ -webkit-transform: translateY(-100%);
+}
+.ui-panel-content-wrap-closed .ui-header-fixed {
+ -webkit-transform: none;
}
@@ -34,7 +34,7 @@
- <div data-role="header" data-theme="f">
+ <div data-role="header" data-theme="f" data-position="fixed">
<h1>Panels</h1>
<a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
<a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
View
@@ -20,6 +20,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
openComplete: "ui-panel-open-complete",
contentWrap: "ui-panel-content-wrap",
contentWrapOpen: "ui-panel-content-wrap-open",
+ contentWrapClosed: "ui-panel-content-wrap-closed",
panelUnfixed: "ui-panel-unfixed",
contentWrapOpenComplete: "ui-panel-content-wrap-open-complete",
pageBlock: "ui-panel-page-block",
@@ -57,6 +58,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
self._page = $el.closest( ":jqmData(role='page')" );
self._wrapper = _getWrapper();
self._addPanelClasses();
+ self._wrapper.addClass( this.options.classes.contentWrapClosed );
// if animating, add the class to do so
if ( $.support.cssTransitions && self.options.animate ) {
@@ -217,6 +219,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
self.element.removeClass( o.classes.panelClosed );
self.element.addClass( o.classes.panelOpen );
self._contentWrapOpenClasses = self._getPosDisplayClasses( o.classes.contentWrap );
+ self._wrapper.removeClass( o.classes.contentWrapClosed );
self._wrapper.addClass( self._contentWrapOpenClasses + " " + o.classes.contentWrapOpen );
self._modalOpenClasses = self._getPosDisplayClasses( o.classes.modal ) + " " + o.classes.modalOpen;
self._modal.addClass( self._modalOpenClasses );
@@ -232,6 +235,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
self.element.add( self._wrapper ).unbind( self._transitionEndEvents , complete );
self.element.addClass( o.classes.panelClosed );
self._wrapper.removeClass( self._contentWrapOpenClasses );
+ self._wrapper.addClass( o.classes.contentWrapClosed );
self._page.removeClass( self.options.classes.pageBlock );
self._fixPanel();
self._unbindFixListener();

0 comments on commit 292b1f8

Please sign in to comment.