Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
gem
capsuledb
Commits
8340582b
Commit
8340582b
authored
Feb 22, 2012
by
Bertrand NÉRON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add widget to search secreton db for strain
I use Jquery-ui autocompleter with jquery-ui smootheness style
parent
5978cc0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
6 deletions
+31
-6
src/couchapp/secreton/_attachments/index.html
src/couchapp/secreton/_attachments/index.html
+31
-6
No files found.
src/couchapp/secreton/_attachments/index.html
View file @
8340582b
...
...
@@ -4,8 +4,10 @@
<title>
Secreton
</title>
<link
rel=
"stylesheet"
href=
"style/main.css"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"style/tooltip.css"
type=
"text/css"
>
<link
rel=
"stylesheet"
href=
"style/smoothness/jquery-ui-1.8.17.custom.css"
type=
"text/css"
>
<script
src=
"/_utils/script/jquery.js"
></script>
<script
src=
"/_utils/script/jquery.couch.js"
></script>
<script
src=
"/_utils/script/jquery-ui-1.8.11.custom.min.js"
></script>
</head>
<body>
<div
id=
"request"
>
...
...
@@ -24,15 +26,15 @@
<input
type=
"text"
name=
"taxidSearch"
id=
"taxidInput"
/>
<button
type=
"button"
id=
"taxidButton"
>
search by taxid
</button>
</fieldset>
<fieldset>
<label
for=
"famillySearch"
>
by T3SS family
(ex:Hrp2)
</label>
<
input
type=
"text"
name=
"familySearch"
id=
"family
Inpu
t"
/
>
<
button
type=
"button"
id=
"familyButton"
>
search by family
</button
>
<label
for=
"famillySearch"
>
by T3SS family
</label>
<
select
name=
"familySearch"
id=
"family
Lis
t"
>
<
/select
>
</fieldset>
<fieldset>
<label
for=
"famillySearch2"
>
by T3SS family (ex:Hrp2)
</label>
<select
name=
"familySearch2"
id=
"familyList"
>
</select>
<label
for=
"strainSearch"
>
by strain
</label>
<input
type
text=
"text"
name=
"strainSearch"
id=
"strainInput"
size=
"100"
/>
</fieldset>
</form>
</div>
...
...
@@ -105,6 +107,29 @@ $(".tooltip" , "#results").live('mouseenter', function(){
});
});
$
(
"
#strainInput
"
).
autocomplete
({
source
:
function
(
req
,
response
){
var
term
=
'
"
'
+
$
.
trim
(
req
.
term
).
toLowerCase
()
+
'
"
'
;
var
suggestions
=
[];
$
.
getJSON
(
"
_view/strain
"
,
{
key
:
term
}
,
function
(
suggested_strain
){
var
cur_value
;
for
(
var
i
=
0
;
i
<
suggested_strain
.
rows
.
length
;
i
++
){
if
(
cur_value
!=
suggested_strain
.
rows
[
i
].
value
){
suggestions
.
push
(
suggested_strain
.
rows
[
i
].
value
);
cur_value
=
suggested_strain
.
rows
[
i
].
value
;
}
}
response
(
suggestions
);
});
},
select
:
function
(
evt
,
ui
){
strain
=
ui
.
item
.
value
;
params
=
{
key
:
'
"
'
+
strain
+
'
"
'
};
get_results
(
'
by_replicon_strain
'
,
params
);
},
minLength
:
3
});
$
(
"
#paginate .nav_page
"
).
live
(
'
click
'
,
function
(){
var
url
=
$
(
this
).
attr
(
'
data-href
'
);
$
(
"
#results
"
).
load
(
url
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment