Revision 4071
Added by berkley over 16 years ago
lib/style/skins/sms/util.js | ||
---|---|---|
107 | 107 |
var url = '/sms/metacat?action=query&anyfield=' + searchval + '&returnfield=dataset/title&qformat=sms&pagesize=10&pagestart=0'; |
108 | 108 |
setCookie("sms-searchval", searchval); |
109 | 109 |
setCookie("sms-pagestart", 0); |
110 |
reloadSearchContent(url); |
|
110 |
reloadSearchContent(url,'#innersearchresultdiv'); |
|
111 |
setCookie('sms-pagestart', 0); |
|
111 | 112 |
} |
112 | 113 |
|
113 | 114 |
//show all of the datasets in metacat |
... | ... | |
121 | 122 |
var page = getCookie('sms-pagestart'); |
122 | 123 |
if(page) |
123 | 124 |
{ |
124 |
reloadSearchContent('/sms/metacat?action=query&anyfield=' + searchval + '&returnfield=dataset/title&qformat=sms&pagesize=10&pagestart=' + page); |
|
125 |
reloadSearchContent('/sms/metacat?action=query&anyfield=' + searchval + '&returnfield=dataset/title&qformat=sms&pagesize=10&pagestart=' + page, '#searchresultdiv');
|
|
125 | 126 |
} |
126 | 127 |
else |
127 | 128 |
{ |
128 |
reloadSearchContent('/sms/metacat?action=query&anyfield=' + searchval + '&returnfield=dataset/title&qformat=sms&pagesize=10&pagestart=0'); |
|
129 |
reloadSearchContent('/sms/metacat?action=query&anyfield=' + searchval + '&returnfield=dataset/title&qformat=sms&pagesize=10&pagestart=0', '#searchresultdiv');
|
|
129 | 130 |
} |
130 | 131 |
} |
131 | 132 |
|
132 | 133 |
//reload the search result table |
133 |
function reloadSearchContent(url) |
|
134 |
function reloadSearchContent(url, div)
|
|
134 | 135 |
{ |
135 | 136 |
var page = url.substring(url.indexOf('pagestart=') + 10, url.length); |
136 | 137 |
setCookie("sms-pagestart", page); |
lib/style/skins/sms/resultset.xsl | ||
---|---|---|
30 | 30 |
<xsl:otherwise> |
31 | 31 |
<a> |
32 | 32 |
<xsl:attribute name="href"> |
33 |
javascript:reloadSearchContent('/sms/metacat?action=query&anytext=%25&qformat=sms&returnfield=dataset/title&pagesize=10&pagestart=<xsl:value-of select="//previouspage"/>');
|
|
33 |
javascript:reloadSearchContent('/sms/metacat?action=query&anyfield=<xsl:value-of select="/resultset/query/pathquery/querygroup/queryterm/value"/>&qformat=sms&returnfield=dataset/title&pagesize=10&pagestart=<xsl:value-of select="//previouspage"/>');
|
|
34 | 34 |
</xsl:attribute> |
35 | 35 |
← previous |
36 | 36 |
</a> |
... | ... | |
47 | 47 |
<xsl:otherwise> |
48 | 48 |
<a> |
49 | 49 |
<xsl:attribute name="href"> |
50 |
javascript:reloadSearchContent('/sms/metacat?action=query&anytext=%25&qformat=sms&returnfield=dataset/title&pagesize=10&pagestart=<xsl:value-of select="//nextpage"/>');
|
|
50 |
javascript:reloadSearchContent('/sms/metacat?action=query&anyfield=<xsl:value-of select="/resultset/query/pathquery/querygroup/queryterm/value"/>&qformat=sms&returnfield=dataset/title&pagesize=10&pagestart=<xsl:value-of select="//nextpage"/>');
|
|
51 | 51 |
</xsl:attribute> |
52 | 52 |
next → |
53 | 53 |
</a> |
lib/style/skins/sms/index.jsp | ||
---|---|---|
57 | 57 |
<a href="javascript:showBrowsePane()"><img id="browsetabimg" src="style/skins/sms/browse-tab.png"/></a><img id="browsetabimgsel" src="style/skins/sms/browse-tab-selected.png"/> |
58 | 58 |
|
59 | 59 |
<!--search panel--> |
60 |
<div id="searchdiv" style="background:grey; border:1px solid; height: 99%; width: 99%;">
|
|
60 |
<div id="searchdiv" style="background:grey; border:1px solid; width: 99%;"> |
|
61 | 61 |
<div style="padding: 5px;"> |
62 | 62 |
<h4 style="text-align:center">Semantic Search</h4> |
63 | 63 |
<form> |
... | ... | |
71 | 71 |
</table> |
72 | 72 |
</form> |
73 | 73 |
</div> |
74 |
|
|
75 |
<div id="innersearchresultdiv" style="position: relative; left: 3px; padding: 10px; width: 595px; "> |
|
76 |
<div id="searchresulttable"> |
|
77 |
<!--this is filled in via an AJAX call. see search()--> |
|
78 |
</div> |
|
79 |
</div> |
|
74 | 80 |
</div> |
75 | 81 |
|
76 | 82 |
|
77 | 83 |
<!--upload panel--> |
78 |
<div id="uploaddiv" style="background:grey; border:1px solid; width: 99%; height: 99%;">
|
|
84 |
<div id="uploaddiv" style="background:grey; border:1px solid; width: 99%;"> |
|
79 | 85 |
<div style="padding:5px;"> |
80 | 86 |
<h4 style="text-align:center">Upload an ontology or data package</h4> |
81 | 87 |
<form action="metacat" name="uploadform" method="POST" enctype="multipart/form-data"> |
Also available in: Unified diff
fixed bug in prev/next buttons