Yurik has submitted this change and it was merged.
Change subject: T95623 - Load first search result on submit
......................................................................
T95623 - Load first search result on submit
Fix for T95623 in order to match cross-platform behavior.
Change-Id: I00fc7109eb4e976b025bb085e3bddda3d67c3bf2
---
M app.appcache
M css/app.css
M css/wikiapp.css
M js/lib/chrome.js
M js/lib/menu.js
M js/lib/search.js
M manifest.webapp
7 files changed, 16 insertions(+), 10 deletions(-)
Approvals:
Yurik: Verified; Looks good to me, approved
diff --git a/app.appcache b/app.appcache
index 93f2b7b..8244d3d 100644
--- a/app.appcache
+++ b/app.appcache
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# Tue Jul 1 17:25:55 UTC 2014
+# Fri Jun 12 16:54:14 UTC 2015
index.html
404.html
AUTHORS
diff --git a/css/app.css b/css/app.css
index 15c73fe..7a64990 100644
--- a/css/app.css
+++ b/css/app.css
@@ -1,12 +1,6 @@
@import "defaults.css";
-/* Uncomment these to use Twitter Bootstrap */
-/* @import "bootstrap.css"; */
-/* @import "bootstrap-responsive.css"; */
-
-/* Your styles here */
-
@import "wikiapp.css";
@import "../js/lib/leaflet/leaflet.css";
@import "../js/lib/MobileFrontend/stylesheets/hacks.css";
diff --git a/css/wikiapp.css b/css/wikiapp.css
index eefd633..67ec3b6 100644
--- a/css/wikiapp.css
+++ b/css/wikiapp.css
@@ -272,6 +272,10 @@
box-sizing: content-box;
}
+.search-hover {
+ background-color: #347BFF; /* mediawiki-progressive */
+}
+
#clearSearch {
position:absolute;
top:12px;
@@ -786,4 +790,4 @@
.leaflet-overlay-pane {
/* hack to work around https://github.com/CloudMade/Leaflet/issues/335
*/
-webkit-transform: translateZ(0px);
-}
\ No newline at end of file
+}
diff --git a/js/lib/chrome.js b/js/lib/chrome.js
index b16ecff..ee08cb4 100644
--- a/js/lib/chrome.js
+++ b/js/lib/chrome.js
@@ -153,6 +153,13 @@
chrome.hideSpinner();
}
} else {
+ // Select first result if it exists
+ if($("#resultList .searchItem").length
> 0) {
+ var parent = $("#resultList
.searchItem:first").parents(".listItemContainer");
+ var url =
parent.data("page-url");
+ $("#search").focus(); // Hides
the keyboard
+ app.navigateToPage(url);
+ }
search.performSearch($("#searchParam").val(), false);
}
return false;
diff --git a/js/lib/menu.js b/js/lib/menu.js
index f945a2d..911f75c 100644
--- a/js/lib/menu.js
+++ b/js/lib/menu.js
@@ -15,7 +15,7 @@
function getAboutVersionString() {
/* window.navigator.mozApps.getSelf() turned out to be problematic here
*/
- return "3.3.0";
+ return "3.3.1";
}
var menu_items = [
diff --git a/js/lib/search.js b/js/lib/search.js
index 320867c..2934f8d 100644
--- a/js/lib/search.js
+++ b/js/lib/search.js
@@ -151,6 +151,7 @@
$("#resultList").html(template.render({'pages':
searchResults}));
}
$("#resultList
.searchItem").click(onSearchResultClicked);
+ $("#resultList
.searchItem:first").addClass('search-hover');
}
$("#doFullSearch").click(onDoFullSearch);
$("#resultList .searchItem").bind('touchstart', function() {
diff --git a/manifest.webapp b/manifest.webapp
index fecf08c..96879eb 100644
--- a/manifest.webapp
+++ b/manifest.webapp
@@ -1,5 +1,5 @@
{
- "version": "3.3.0",
+ "version": "3.3.1",
"name": "Wikipedia",
"description": "Wikipedia Mobile for Firefox OS",
"launch_path": "/WikipediaMobileFirefoxOS/",
--
To view, visit https://gerrit.wikimedia.org/r/217863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I00fc7109eb4e976b025bb085e3bddda3d67c3bf2
Gerrit-PatchSet: 2
Gerrit-Project: apps/firefox/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Jhobs <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Jhobs <[email protected]>
Gerrit-Reviewer: Yurik <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits