Просмотр исходного кода

Tweak the sidebar size and position

Zachary Kotlarek 13 лет назад
Родитель
Сommit
a6839a0d14
2 измененных файлов с 4 добавлено и 3 удалено
  1. 1 1
      web/autodividers-linkbar.css
  2. 3 2
      web/autodividers-linkbar.js

+ 1 - 1
web/autodividers-linkbar.css

@@ -1,5 +1,5 @@
 #sorter .ui-li.ui-li-static.ui-btn-up-c {
-	height: 3.8%;
+	height: 3.60%;
 	padding: 0;
 	font-size: 8px;
 	padding-left: 5px;

+ 3 - 2
web/autodividers-linkbar.js

@@ -1,7 +1,8 @@
 $.mobile.document.on( "pageshow", "#linkbar-page", function() {
 	var head = $( ".ui-page-active [data-role='header']" ),
 		foot = $( ".ui-page-active [data-role='footer']" ),
-		headerheight = head.outerHeight();
+		filter = $( ".ui-page-active [role='search']" ),
+		headerheight = head.outerHeight() + filter.outerHeight();
 		
 	$.mobile.window.on( "throttledresize", function() {
 		$( "#sorter" ).height( $.mobile.window.height() - headerheight - 20 ).css( "top", headerheight + 18 );
@@ -22,7 +23,7 @@ $.mobile.document.on( "pageshow", "#linkbar-page", function() {
 				"top": "15px",
 				"height": $.mobile.window.height()
 			});
-			$("#sorter li").height( "3.7%" );
+			$("#sorter li").height( "3.60%" );
 		} else if ( parseInt( headTop + $.mobile.window.height() ) >= parseInt( foot.offset().top ) && parseInt( headTop + $.mobile.window.height() ) <= parseInt( foot.offset().top ) + foot.height() ) {
 			$( "#sorter" ).css({
 				"top": "15px",