Skip to content

Commit

Permalink
some mods to the docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
asyraf9 committed Sep 24, 2012
1 parent 1d67dad commit e72c25a
Show file tree
Hide file tree
Showing 3 changed files with 9,290 additions and 14 deletions.
12 changes: 6 additions & 6 deletions docs/index.html
Expand Up @@ -3,12 +3,12 @@
<head>
<title>Jquery Mobile Splitview</title>
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../compiled/jquery.mobile.css" />
<link rel="stylesheet" href="jquery.mobile.splitview.css" />
<link rel="stylesheet" href="jquery.mobile.grids.collapsible.css" />
<script type="text/javascript" src="jquery-1.7.1.js"></script>
<script type="text/javascript" src="jquery.mobile.splitview.js"></script>
<script type="text/javascript" src="../../compiled/jquery.mobile.js"></script>
<link rel="stylesheet" href="../jquery-mobile/jquery.mobile.css" />
<link rel="stylesheet" href="../src/jquery.mobile.splitview.css" />
<link rel="stylesheet" href="../src/jquery.mobile.grids.collapsible.css" />
<script type="text/javascript" src="../vendor/jquery-1.7.1.js"></script>
<script type="text/javascript" src="../src/jquery.mobile.splitview.js"></script>
<script type="text/javascript" src="../jquery-mobile/jquery.mobile.js"></script>
</head>

<body>
Expand Down
26 changes: 18 additions & 8 deletions src/jquery.mobile.splitview.js
Expand Up @@ -54,12 +54,12 @@
getScreenHeight = $.mobile.getScreenHeight;

//remove active classes after page transition or error
// function removeActiveLinkClass( forceRemoval ) {
// if ( !!$activeClickedLink && ( !$activeClickedLink.closest( "." + $.mobile.activePageClass ).length || forceRemoval ) ) {
// $activeClickedLink.removeClass( $.mobile.activeBtnClass );
// }
// $activeClickedLink = null;
// }
function removeActiveLinkClass( forceRemoval ) {
if ( !!$activeClickedLink && ( !$activeClickedLink.closest( "." + $.mobile.activePageClass ).length || forceRemoval ) ) {
$activeClickedLink.removeClass( $.mobile.activeBtnClass );
}
$activeClickedLink = null;
}

function findClosestLink(ele)
{
Expand Down Expand Up @@ -356,13 +356,24 @@
pageContainer: $mainPanel
};

if ( 0 === urlHistory.stack.length ) {
urlHistory.initialDst = to;
}

// We should probably fire the "navigate" event from those places that make calls to _handleHashChange,
// and have _handleHashChange hook into the "navigate" event instead of triggering it here
$.mobile.pageContainer.trigger( navEvent );
if ( navEvent.isDefaultPrevented() ) {
return;
}

if( !$.mobile.hashListeningEnabled || $.mobile.urlHistory.ignoreNextHashChange ){
$.mobile.urlHistory.ignoreNextHashChange = false;
return;
}

// special case for dialogs
if( $.mobile.urlHistory.stack.length > 1 && to.indexOf( dialogHashKey ) > -1 ) {
if( $.mobile.urlHistory.stack.length > 1 && to.indexOf( dialogHashKey ) > -1 && urlHistory.initialDst !== to ) {

// If current active page is not a dialog skip the dialog and continue
// in the same direction
Expand Down Expand Up @@ -432,7 +443,6 @@
$( window ).bind( "throttledresize.resetPageHeight", ResetActivePageHeight );

}; //end _registerInternalEvents
$.mobile.navreadyDeferred.done($.mobile._registerInternalEvents());

//DONE: bind orientationchange and resize - the popover
_orientationHandler = function(event){
Expand Down

0 comments on commit e72c25a

Please sign in to comment.