projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
359c69c
)
Function to handle iPhone Go. Prepare for limit parameter on search
author
Dennis Schafroth
<dennis@indexdata.com>
Mon, 7 Nov 2011 10:14:17 +0000
(11:14 +0100)
committer
Dennis Schafroth
<dennis@indexdata.com>
Mon, 7 Nov 2011 10:14:17 +0000
(11:14 +0100)
www/iphone/example_client.js
patch
|
blob
|
history
diff --git
a/www/iphone/example_client.js
b/www/iphone/example_client.js
index
e6af70c
..
4fe0836
100644
(file)
--- a/
www/iphone/example_client.js
+++ b/
www/iphone/example_client.js
@@
-52,6
+52,26
@@
function loginFormSubmit() {
authCb, authCb);
}
authCb, authCb);
}
+function handleKeyPress(e, formId, focusId)
+{
+ var key;
+ if(window.event)
+ key = window.event.keyCode;
+ else
+ key = e.which;
+
+ if(key == 13 || key == 10)
+ {
+ document.getElementById(formId).submit();
+ focusElement = document.getElementById(focusId);
+ if (focusElement)
+ focusElement.focus();
+ return false;
+ }
+ else
+ return true;
+}
+
function authCb(authData) {
if (!authData.loginFailed) {
triedUser = "";
function authCb(authData) {
if (!authData.loginFailed) {
triedUser = "";
@@
-383,6
+403,13
@@
function resetPage()
function triggerSearch ()
{
my_paz.search(document.search.query.value, recPerPage, curSort, curFilter);
function triggerSearch ()
{
my_paz.search(document.search.query.value, recPerPage, curSort, curFilter);
+/*
+ , startWith,
+ {
+ "limit" : getFacets()
+ }
+ );
+*/
}
function loadSelect ()
}
function loadSelect ()
@@
-394,11
+421,11
@@
function loadSelect ()
// limit the query after clicking the facet
function limitQuery(field, value)
{
// limit the query after clicking the facet
function limitQuery(field, value)
{
- var newQuery = ' and ' + field + '="' + value + '"';
- querys[field] += newQuery;
- document.search.query.value += newQuery;
- onFormSubmitEventHandler();
- showhide("recordview");
+ var newQuery = ' and ' + field + '="' + value + '"';
+ querys[field] += newQuery;
+ document.search.query.value += newQuery;
+ onFormSubmitEventHandler();
+ showhide("recordview");
}
// limit the query after clicking the facet
}
// limit the query after clicking the facet