various tweaks and bug fixes
This commit is contained in:
parent
1ab501ca87
commit
8275d00eaa
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
//Setup the ViewNavigator
|
//Setup the ViewNavigator
|
||||||
new SlidingView( 'sidebar', 'body' );
|
new SlidingView( 'sidebar', 'body' );
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
|
|
||||||
//Setup the ViewNavigator
|
//Setup the ViewNavigator
|
||||||
new SplitViewNavigator( 'body' );
|
new SplitViewNavigator( 'body', "Menu" );
|
||||||
window.splitViewNavigator.pushSidebarView( sidebarViewDescriptor );
|
window.splitViewNavigator.pushSidebarView( sidebarViewDescriptor );
|
||||||
window.splitViewNavigator.pushBodyView( bodyViewDescriptor );
|
window.splitViewNavigator.pushBodyView( bodyViewDescriptor );
|
||||||
|
|
||||||
|
|
|
@ -164,11 +164,13 @@
|
||||||
var actor = movie.abridged_cast[i];
|
var actor = movie.abridged_cast[i];
|
||||||
html += "<li><strong>" + actor.name + ":</strong> ";
|
html += "<li><strong>" + actor.name + ":</strong> ";
|
||||||
|
|
||||||
|
if ( actor.characters ) {
|
||||||
for ( var j = 0; j < actor.characters.length; j ++ )
|
for ( var j = 0; j < actor.characters.length; j ++ )
|
||||||
{
|
{
|
||||||
if ( j > 0 ) { html += ", " };
|
if ( j > 0 ) { html += ", " };
|
||||||
html += actor.characters[j];
|
html += actor.characters[j];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
html += "</li>";
|
html += "</li>";
|
||||||
}
|
}
|
||||||
|
@ -196,7 +198,7 @@
|
||||||
|
|
||||||
|
|
||||||
//Setup the ViewNavigator
|
//Setup the ViewNavigator
|
||||||
new SplitViewNavigator( 'body' );
|
new SplitViewNavigator( 'body', "Movies" );
|
||||||
window.splitViewNavigator.pushSidebarView( controller.rootView );
|
window.splitViewNavigator.pushSidebarView( controller.rootView );
|
||||||
window.splitViewNavigator.pushBodyView( defaultView );
|
window.splitViewNavigator.pushBodyView( defaultView );
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
border:0;
|
border:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
.viewNavigator_content li {
|
||||||
padding:0 10px;
|
padding:0 10px;
|
||||||
border-bottom:1px solid #ccc;
|
border-bottom:1px solid #ccc;
|
||||||
height:40px; line-height:40px;
|
height:40px; line-height:40px;
|
||||||
|
@ -151,11 +151,13 @@
|
||||||
var actor = movie.abridged_cast[i];
|
var actor = movie.abridged_cast[i];
|
||||||
html += "<li><strong>" + actor.name + ":</strong> ";
|
html += "<li><strong>" + actor.name + ":</strong> ";
|
||||||
|
|
||||||
|
if ( actor.characters ) {
|
||||||
for ( var j = 0; j < actor.characters.length; j ++ )
|
for ( var j = 0; j < actor.characters.length; j ++ )
|
||||||
{
|
{
|
||||||
if ( j > 0 ) { html += ", " };
|
if ( j > 0 ) { html += ", " };
|
||||||
html += actor.characters[j];
|
html += actor.characters[j];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
html += "</li>";
|
html += "</li>";
|
||||||
}
|
}
|
||||||
|
@ -175,14 +177,7 @@
|
||||||
view: $(html)
|
view: $(html)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*var listItems = controller.rootView.view.find( "li" );
|
|
||||||
listItems.each(function(index, li) {
|
|
||||||
var item = $(li).get(0);
|
|
||||||
NoClickDelay( item );
|
|
||||||
});*/
|
|
||||||
|
|
||||||
window.viewNavigator.pushView( viewDescriptor);
|
window.viewNavigator.pushView( viewDescriptor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var SplitViewNavigator = function( target ) {
|
var SplitViewNavigator = function( target, toggleButtonLabel ) {
|
||||||
|
|
||||||
this.animating = false;
|
this.animating = false;
|
||||||
this.animationDuration = 350;
|
this.animationDuration = 350;
|
||||||
|
@ -19,20 +19,7 @@ var SplitViewNavigator = function( target ) {
|
||||||
|
|
||||||
this.bodyViewNavigator = new ViewNavigator( this.bodyContainer.get()[0] );
|
this.bodyViewNavigator = new ViewNavigator( this.bodyContainer.get()[0] );
|
||||||
|
|
||||||
/*
|
this.toggleSidebarButton = $('<li class="viewNavigator_header_backlink backLinkButton hidden" id="toggle' + this.uniqueId + '" onclick="window.splitViewNavigator.showSidebar()">'+toggleButtonLabel+'</li>');
|
||||||
this.bodyHeader = $('<div class="viewNavigator_header"></div>');
|
|
||||||
this.bodyContent = $('<div class="viewNavigator_content" id="contentRoot"></div>');
|
|
||||||
this.bodyContainer.append( this.bodyHeader );
|
|
||||||
this.bodyContainer.append( this.bodyContent );
|
|
||||||
|
|
||||||
this.bodyHeaderContent = $('<div class="viewNavigator_headerContent"></div>');
|
|
||||||
this.bodyHeaderTitle = $("<div class='viewNavigator_header_title'></div>");
|
|
||||||
this.bodyHeaderContent.append( this.bodyHeaderTitle );
|
|
||||||
this.bodyHeader.append( this.bodyHeaderContent );
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.toggleSidebarButton = $('<li class="viewNavigator_header_backlink backLinkButton hidden" id="toggle' + this.uniqueId + '" onclick="window.splitViewNavigator.showSidebar()">toggle</li>');
|
|
||||||
|
|
||||||
|
|
||||||
this.rootElement.append( this.bodyContainer );
|
this.rootElement.append( this.bodyContainer );
|
||||||
this.rootElement.append( this.contentOverlay );
|
this.rootElement.append( this.contentOverlay );
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
|
|
||||||
* {
|
* {
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input,
|
||||||
|
textarea {
|
||||||
|
-webkit-touch-callout: auto;
|
||||||
|
-webkit-user-select: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,6 @@ var ViewNavigator = function( target ) {
|
||||||
}
|
}
|
||||||
window.viewNavigators[ this.uniqueId ] = this;
|
window.viewNavigators[ this.uniqueId ] = this;
|
||||||
|
|
||||||
if ( typeof PhoneGap != 'undefined' ) {
|
|
||||||
//backKeyViewNavigators is only used in PhoneGap on Android
|
|
||||||
if ( window.backKeyViewNavigators == null || window.backKeyViewNavigators == undefined ) {
|
|
||||||
window.backKeyViewNavigators = [];
|
|
||||||
}
|
|
||||||
if ( this.supportsBackKey ) {
|
|
||||||
window.backKeyViewNavigators.push( this );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewNavigator.prototype.replaceView = function( viewDescriptor ) {
|
ViewNavigator.prototype.replaceView = function( viewDescriptor ) {
|
||||||
|
@ -278,7 +269,7 @@ ViewNavigator.prototype.guid = function() {
|
||||||
|
|
||||||
|
|
||||||
/* PHONEGAP INTEGRATION */
|
/* PHONEGAP INTEGRATION */
|
||||||
|
/*
|
||||||
//android+phonegap specific back button support - will only work if phonegap is used on android (www.phonegap.com)
|
//android+phonegap specific back button support - will only work if phonegap is used on android (www.phonegap.com)
|
||||||
if ( typeof PhoneGap != 'undefined' ) {
|
if ( typeof PhoneGap != 'undefined' ) {
|
||||||
document.addEventListener("deviceready", onDeviceReady, false);
|
document.addEventListener("deviceready", onDeviceReady, false);
|
||||||
|
@ -295,3 +286,4 @@ function onBackKey( event ) {
|
||||||
window.backKeyViewNavigators[x].popView();
|
window.backKeyViewNavigators[x].popView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
Loading…
Reference in New Issue