diff --git a/code/geosearch.js b/code/geosearch.js
index 7bd7d1ee..c877564a 100644
--- a/code/geosearch.js
+++ b/code/geosearch.js
@@ -6,24 +6,29 @@ window.setupGeosearch = function() {
if((e.keyCode ? e.keyCode : e.which) != 13) return;
var search = $(this).val();
-
- if (!runHooks('geoSearch', search)) {
- return;
- }
-
- $.getJSON(NOMINATIM + encodeURIComponent(search), function(data) {
- if(!data || !data[0]) return;
- var b = data[0].boundingbox;
- if(!b) return;
- var southWest = new L.LatLng(b[0], b[2]),
- northEast = new L.LatLng(b[1], b[3]),
- bounds = new L.LatLngBounds(southWest, northEast);
- window.map.fitBounds(bounds);
- if(window.isSmartphone()) window.smartphone.mapButton.click();
- });
+
+ if ( window.search(search) ) return;
+
e.preventDefault();
});
$('#geosearchwrapper img').click(function(){
map.locate({setView : true, maxZoom: 13});;
});
}
+
+window.search = function(search) {
+ if (!runHooks('geoSearch', search)) {
+ return true;
+ }
+
+ $.getJSON(NOMINATIM + encodeURIComponent(search), function(data) {
+ if(!data || !data[0]) return true;
+ var b = data[0].boundingbox;
+ if(!b) return true;
+ var southWest = new L.LatLng(b[0], b[2]),
+ northEast = new L.LatLng(b[1], b[3]),
+ bounds = new L.LatLngBounds(southWest, northEast);
+ window.map.fitBounds(bounds);
+ if(window.isSmartphone()) window.smartphone.mapButton.click();
+ });
+}
diff --git a/mobile/AndroidManifest.xml b/mobile/AndroidManifest.xml
index f9fc9e4d..b0fa5c5a 100644
--- a/mobile/AndroidManifest.xml
+++ b/mobile/AndroidManifest.xml
@@ -24,13 +24,23 @@
android:name="com.cradle.iitc_mobile.IITC_Mobile"
android:theme="@style/AppBaseTheme"
android:label="@string/app_name"
+ android:launchMode="singleTop"
android:configChanges="orientation|keyboard|keyboardHidden|screenSize">
+
+
+
+
+
+
+
+
+
@@ -46,6 +56,10 @@
android:scheme="http"
android:pathPrefix="/intel">
+
+
+
+
@@ -74,7 +89,12 @@
+
+
+
diff --git a/mobile/proguard-project.txt b/mobile/proguard-project.txt
index b77c728c..34f9866f 100644
--- a/mobile/proguard-project.txt
+++ b/mobile/proguard-project.txt
@@ -4,7 +4,10 @@
# view AndroidManifest.xml #generated:23
-keep class com.cradle.iitc_mobile.IITC_Mobile { (...); }
-# view AndroidManifest.xml #generated:40
+# view AndroidManifest.xml #generated:56
+-keep class com.cradle.iitc_mobile.IITC_SearchableActivity { (...); }
+
+# view AndroidManifest.xml #generated:50
-keep class com.cradle.iitc_mobile.IITC_Settings { (...); }
# view res/layout/activity_main.xml #generated:6
diff --git a/mobile/res/menu/main.xml b/mobile/res/menu/main.xml
index eba307b5..854cc598 100644
--- a/mobile/res/menu/main.xml
+++ b/mobile/res/menu/main.xml
@@ -1,5 +1,9 @@