Browse files

Panel: updates from @zachleat PR #5422 Add css back in for overflow-x…

…, fixes issue with firefox open, removes unneeded class. Update docs to reflect changes
  • Loading branch information...
1 parent da342b1 commit 68f245d38fb2a84b1588bd7ce26730e51f14732a @arschmitz arschmitz committed Jan 7, 2013
Showing with 6 additions and 8 deletions.
  1. +4 −0 css/structure/jquery.mobile.panel.css
  2. +0 −3 docs/panels/options.html
  3. +2 −5 js/widgets/panel.js
View
4 css/structure/jquery.mobile.panel.css
@@ -195,6 +195,10 @@
transform: translateX(-17em);
left: 0;
}
+/* while open, page x overflow is disabled */
+.ui-page-active.ui-panel-page-block {
+ overflow-x:hidden;
+}
/* wrap push on wide viewports once open */
@media (min-width:55em){
View
3 docs/panels/options.html
@@ -107,9 +107,6 @@
<dt><code>classes.pagePanel</code> default: "ui-page-panel"</dt>
<dd>Class added to the page container when a panel widget is present.</dd>
- <dt><code>classes.pageChildAnimations</code> default: "ui-page-panel-animate"</dt>
- <dd>Class added to the page container when panel animations are on.</dd>
-
<dt><code>classes.cssTransform3d</code> default: "ui-panel-3dtransforms"</dt>
<dd>Class added to the page container when the 3D transform feature test is true.</dd>
</dl>
View
7 js/widgets/panel.js
@@ -25,7 +25,6 @@ $.widget( "mobile.panel", $.mobile.widget, {
contentWrapOpenComplete: "ui-panel-content-wrap-open-complete",
pageBlock: "ui-panel-page-block",
pagePanel: "ui-page-panel",
- pageChildAnimations: "ui-page-panel-animate",
cssTransform3d: "ui-panel-3dtransforms"
},
animate: true,
@@ -66,7 +65,6 @@ $.widget( "mobile.panel", $.mobile.widget, {
// if animating, add the class to do so
if ( $.support.cssTransform3d && self.options.animate ) {
this.element.add( self._wrapper ).addClass( "ui-panel-animate" );
- self._page.addClass( this.options.classes.pageChildAnimations );
}
self._bindCloseEvents();
@@ -213,6 +211,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
self.element.add( self._wrapper ).unbind( self._transitionEndEvents, complete );
self.element.addClass( o.classes.openComplete );
self._wrapper.addClass( o.classes.contentWrapOpenComplete );
+ self._page.addClass( o.classes.pageBlock );
self._positionPanel();
self._bindFixListener();
self._trigger( "open" );
@@ -228,7 +227,6 @@ $.widget( "mobile.panel", $.mobile.widget, {
} else{
setTimeout( complete , 0 );
}
- self._page.addClass( o.classes.pageBlock );
self.element.removeClass( o.classes.panelClosed );
self.element.addClass( o.classes.panelOpen );
self._contentWrapOpenClasses = self._getPosDisplayClasses( o.classes.contentWrap );
@@ -290,8 +288,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
// create
if( !hasOtherSiblingPanels ) {
this._wrapper.children().unwrap();
- this._page.removeClass( classes.pageChildAnimations )
- .find( "a" ).unbind( "panelopen panelclose" );
+ this._page.find( "a" ).unbind( "panelopen panelclose" );
} else if( this._open ) {
this._wrapper.removeClass( [ classes.contentWrapOpen, classes.contentWrapOpenComplete ].join( " " ) );
}

0 comments on commit 68f245d

Please sign in to comment.