r113898 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113897‎ | r113898 | r113899 >
Date:09:44, 15 March 2012
Author:jdlrobson
Status:resolved (Comments)
Tags:
Comment:
restyle header

following design @
http://www.mediawiki.org/wiki/Mobile_design/Full-screen_search
increase margin of content/header
change icons for close search and clear search
Modified paths:
  • /trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/beta_common.css (modified) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/images/arrow-left-beta.png (added) (history)
  • /trunk/extensions/MobileFrontend/stylesheets/images/close-button-beta.png (added) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/javascripts/beta_opensearch.js
@@ -4,7 +4,6 @@
55 var apiUrl = '/api.php', timer = -1, typingDelay = 500,
66 numResults = 15, term,
77 search = document.getElementById( 'search' ),
8 - sq = document.getElementById( 'sq' ),
98 sb = document.getElementById( 'searchbox' ),
109 content = document.getElementById( 'content' ),
1110 footer = document.getElementById( 'footer' ),
@@ -39,7 +38,7 @@
4039 search.onfocus = function() {
4140 var rrd, rrdD;
4241 sb = document.getElementById( 'searchbox' );
43 - sq = document.getElementById( 'sq' );
 42+ header = document.getElementById( 'header' );
4443 content = document.getElementById( 'content' );
4544 footer = document.getElementById( 'footer' );
4645 resetViewPort();
@@ -56,7 +55,7 @@
5756 rrdD = document.createElement( 'div' );
5857 rrdD.setAttribute( 'id', 'left-arrow' );
5958 rrd.appendChild( rrdD );
60 - sq.insertBefore( rrd, sq.firstChild );
 59+ header.insertBefore( rrd, header.firstChild );
6160 }
6261 focused = true;
6362 }
Index: trunk/extensions/MobileFrontend/stylesheets/images/close-button-beta.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MobileFrontend/stylesheets/images/close-button-beta.png
___________________________________________________________________
Added: svn:mime-type
6463 + application/octet-stream
Index: trunk/extensions/MobileFrontend/stylesheets/images/arrow-left-beta.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MobileFrontend/stylesheets/images/arrow-left-beta.png
___________________________________________________________________
Added: svn:mime-type
6564 + application/octet-stream
Index: trunk/extensions/MobileFrontend/stylesheets/beta_common.css
@@ -19,24 +19,21 @@
2020 }
2121
2222 .clearlink {
23 - background: url(images/close-button.png?v=1) no-repeat scroll 0 0 transparent;
24 - background-position: center center;
 23+ top: 9px;
 24+ right: -18px;
 25+ width: 18px;
 26+ height: 20px;
 27+ background: url(images/close-button-beta.png) no-repeat scroll 0 0 transparent;
 28+ margin: 0;
 29+ display: block;
 30+ background-position: right center;
 31+ background-size: auto 12px;
2532 cursor: pointer;
26 - zoom: 1;
2733 position: absolute;
28 - right: 0.25em;
29 - top: 10%;
30 - margin: 1px;
31 - height: 42px;
32 - width: 42px;
33 - margin-top: -6px;
34 - z-index: 99;
35 - border: 0px solid;
36 - display: none;
3734 }
3835
3936 html[dir="rtl"] .clearlink {
40 - left: 0.25em;
 37+ left: 0;
4138 right: auto;
4239 }
4340
@@ -151,7 +148,6 @@
152149 }
153150
154151 .search_bar .search {
155 - width: 90%;
156152 -webkit-appearance: none;
157153 border-top-width: 0px;
158154 border-right-width: 0px;
@@ -161,6 +157,10 @@
162158 outline-width: initial;
163159 outline-color: initial;
164160 padding: 0;
 161+ font-size: 1.2em;
 162+ padding-right: 16px;
 163+ width: 100%;
 164+ vertical-align: middle; /* don't use line height here as placeholder on ripple positions incorrectly */
165165 }
166166
167167 #search::-webkit-search-cancel-button {
@@ -546,13 +546,14 @@
547547 }
548548
549549 #header {
550 - margin: 8px 8px 0 8px;
 550+ margin: 0;
551551 position: relative;
 552+ border-bottom: solid 1px #CCC;
552553 }
553554
554555 #content_wrapper {
555556 clear: both;
556 - margin: 0 8px;
 557+ margin: 22px 22px;
557558 }
558559
559560 #footer {
@@ -562,51 +563,60 @@
563564
564565 #logo {
565566 position: absolute;
566 - top: 4px;
567 - left: 5px;
 567+ height: 22px;
 568+ cursor: pointer;
 569+ left: 22px;
 570+ top: 9px;
 571+ width: 35px;
568572 }
569573
 574+html[dir="rtl"] #searchbox {
 575+ padding: 0px 54px 0px 20px;
 576+}
 577+
570578 #zero-language-search.search_bar,
571579 #searchbox {
572580 width: auto;
573581 position: relative;
574 - padding: 8px 32px 8px 44px;
575 - border: 1px solid #cccccc;
 582+ padding: 0px 40px 0px 73px; /* right = width of #logo (35px) + 22px + 16px
 583+ left = width of close button + 22px */
576584 -webkit-border-radius: 2px;
577585 -moz-border-radius: 2px;
 586+ -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
578587 }
579588
 589+.full-screen-search #searchbox {
 590+ padding: 0px 40px 0px 54px; /* right = width of #logo (18px) + 22px + 16px */
 591+}
 592+
580593 #zero-language-search.search_bar {
581594 padding: 8px 32px 8px 0px;
582595 }
583596
584 -#searchbox #form {
585 - padding-right: 34px;
586 - width: 100%;
587 - margin-bottom: 0;
 597+html[dir="rtl"] #remove-results,
 598+html[dir="rtl"] #logo {
 599+ right: 18px;
 600+ left: auto;
588601 }
589602
590 -html[dir="rtl"] #logo,
591603 .goButton {
592604 position: absolute;
593 - right: 2px;
 605+ right: -18px;
594606 left: auto;
595 -}
596 -
597 -.goButton {
598 - top: 2px;
 607+ top: 0px;
599608 border: 0;
600 - background: url(images/s.gif) no-repeat top left;
 609+ background: url(images/s.gif) no-repeat center left;
601610 background-size: 27px 25px;
602 - height: 25px;
 611+ height: 40px;
603612 width: 27px;
604613 padding-bottom: 0;
605614 text-indent: -999px;
 615+ cursor: pointer;
606616 }
607617
608618 html[dir="rtl"] .goButton {
609619 right: auto;
610 - left: 2px;
 620+ left: 0;
611621 }
612622
613623 #searchbox a,
@@ -725,34 +735,27 @@
726736 display: none;
727737 }
728738
729 -.full-screen-search #search {
730 - height: 30px; /* height of #sq - 2px border */
731 - font-size: 1.2em;
 739+#header,
 740+#search,
 741+#sq,
 742+form,
 743+#searchbox {
 744+ position: relative;
 745+ right: 0;
 746+ top: 0;
 747+ left: 0;
 748+ height: 40px;
732749 }
733750
734 -html[dir="rtl"] .full-screen-search #sq {
735 - padding-left: 0;
736 - padding-right: 44px;
 751+#searchbox {
 752+ margin: 0
737753 }
738754
739755 .full-screen-search #sq {
740 - position: relative;
741 - padding-left: 44px;
742756 margin-right: 0;
743757 font-size: 16px;
744 - border: none;
745 - background-color: transparent;
746758 }
747759
748 -.full-screen-search #searchbox {
749 - position: absolute;
750 - width: 100%;
751 - padding: 0;
752 - top: 0;
753 - left: 0;
754 - border: none;
755 -}
756 -
757760 .full-screen-search #logo,
758761 .full-screen-search .goButton {
759762 display: none;
@@ -798,16 +801,16 @@
799802 #remove-results {
800803 display: none;
801804 position: absolute;
802 - width: 40px;
 805+ width: 18px;
803806 height: 40px;
804807 text-align: center;
805808 line-height: 40px;
806 - background: url(images/arrow-left.png) no-repeat scroll 0 0 transparent;
807 - background-position: center center;
 809+ background: url(images/arrow-left-beta.png) no-repeat scroll 0 0 transparent;
 810+ background-position: left center;
 811+ background-size: auto 18px;
808812 cursor: pointer;
809 - zoom: 1;
810 - left: -3px;
811 - top: 3px;
 813+ left: 24px;
 814+ top: 6px; /* (#header height - background height) / 2 */
812815 margin: 1px;
813816 margin-top: -6px;
814817 z-index: 99;
@@ -816,11 +819,6 @@
817820 overflow: hidden;
818821 }
819822
820 -html[dir="rtl"] #remove-results {
821 - right: 0px;
822 - left: auto;
823 -}
824 -
825823 .full-screen-search #results {
826824 display: block !important;
827825 }
@@ -829,14 +827,6 @@
830828 display: block;
831829 }
832830
833 -.full-screen-search .clearlink {
834 - background: url(images/close-button.png?v=1) no-repeat scroll 0 0 transparent;
835 - top: 0px;
836 - right: 0px;
837 - height: 42px;
838 - width: 42px;
839 -}
840 -
841831 .full-screen-search #nav {
842832 display: none !important;
843833 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r113899follow up to r113898...jdlrobson09:47, 15 March 2012
r114202MFT r113807, r113831, r113832, r113865, r113866, r113870, r113871, r113872, r...awjrichards22:23, 19 March 2012

Comments

#Comment by Preilly (talk | contribs)   18:38, 15 March 2012

Missing a semicolon in trunk/extensions/MobileFrontend/stylesheets/beta_common.css in the #searchbox {... section.

Status & tagging log