summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/hosting/server/htdocs/search/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/hosting/server/htdocs/search/index.html')
-rw-r--r--sca-cpp/trunk/hosting/server/htdocs/search/index.html17
1 files changed, 14 insertions, 3 deletions
diff --git a/sca-cpp/trunk/hosting/server/htdocs/search/index.html b/sca-cpp/trunk/hosting/server/htdocs/search/index.html
index d46b0528c4..d50b492640 100644
--- a/sca-cpp/trunk/hosting/server/htdocs/search/index.html
+++ b/sca-cpp/trunk/hosting/server/htdocs/search/index.html
@@ -38,8 +38,8 @@
$('viewcontent').className = 'viewcontent flatscrollbars';
$('viewhead').innerHTML = '<form id="searchForm">' +
- '<span style="position: absolute; top: 0px; left: 5px; right: 70px; padding: 0px; background: transparent;"><input type="text" id="searchQuery" value="" class="flatentry" title="Search" autocapitalize="off" placeholder="Search for apps" style="position: absolute; left: 0px; top: 4px; width: 100%;"></span>' +
- '<input type="submit" id="searchButton" title="Search" class="bluebutton search" style="position: absolute; top: 4px; right: 5px; width: 60px; background-position: center center; background-repeat: no-repeat; background-image: url(\'' + ui.b64png(appcache.get('/public/search.b64')) + '\');" value=" "/>' +
+ '<span style="position: absolute; top: 0px; left: 2px; right: 70px; padding: 0px; background: transparent;"><input type="text" id="searchQuery" value="" class="flatentry" title="Search" autocapitalize="off" placeholder="Search for apps" style="position: absolute; left: 0px; top: 4px; width: 100%;"></span>' +
+ '<input type="submit" id="searchButton" title="Search" class="bluebutton search" style="position: absolute; top: 4px; right: 2px; width: 60px; background-position: center center; background-repeat: no-repeat; background-image: url(\'' + ui.b64png(appcache.get('/public/search.b64')) + '\');" value=" "/>' +
'</form>';
$('viewcontent').appendChild(ui.declareCSS(
@@ -50,6 +50,11 @@
})();
/**
+ * Get the requested search query.
+ */
+var query = ui.fragmentParams(location)['q'];
+
+/**
* Initialize service references.
*/
var editorComp = sca.component("Editor");
@@ -186,10 +191,16 @@ $('searchForm').onsubmit = function() {
return false;
if (ui.isMobile())
$('searchQuery').blur();
- getapps($('searchQuery').value.trim());
+ //getapps($('searchQuery').value.trim());
+ ui.navigate('/#view=search&q=' + $('searchQuery').value.trim(), '_view');
return false;
};
+if(query && query != '') {
+ $('searchQuery').value = query;
+ getapps(query);
+}
+
})();
</script>