summaryrefslogtreecommitdiffstats
path: root/idrop-web
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-02-22 17:36:02 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-02-22 17:36:02 (GMT)
commitbf159ca0bd0689123bb0fd0e403c1c558e3b788e (patch)
treefa14df32b5421dfdd60dceb3fdd5c5bf4eeee9b4 /idrop-web
parent01b6276a5adb81727775f809fe2959291b2af81d (diff)
downloadQCG-Data-bf159ca0bd0689123bb0fd0e403c1c558e3b788e.zip
QCG-Data-bf159ca0bd0689123bb0fd0e403c1c558e3b788e.tar.gz
QCG-Data-bf159ca0bd0689123bb0fd0e403c1c558e3b788e.tar.bz2
[#1001] add case-insensitive tag queries
Diffstat (limited to 'idrop-web')
-rw-r--r--idrop-web/application.properties3
-rwxr-xr-xidrop-web/grails-app/conf/Config.groovy2
-rwxr-xr-xidrop-web/grails-app/views/search/searchResult.gsp130
-rwxr-xr-xidrop-web/grails-app/views/tags/index.gsp4
-rwxr-xr-xidrop-web/web-app/js/mydrop/lingo_common.js15
-rwxr-xr-xidrop-web/web-app/js/mydrop/main.js43
-rwxr-xr-xidrop-web/web-app/js/mydrop/search.js2
-rw-r--r--idrop-web/web-app/js/mydrop/tag.js56
8 files changed, 93 insertions, 162 deletions
diff --git a/idrop-web/application.properties b/idrop-web/application.properties
index 33892dc..a2ea9cd 100644
--- a/idrop-web/application.properties
+++ b/idrop-web/application.properties
@@ -1,6 +1,7 @@
#Grails Metadata file
-#Wed Feb 20 15:00:51 EST 2013
+#Thu Feb 21 09:16:21 EST 2013
app.grails.version=2.1.1
app.name=idrop-web2
app.servlet.version=2.5
app.version=2.0.0
+plugins.tomcat=2.1.1
diff --git a/idrop-web/grails-app/conf/Config.groovy b/idrop-web/grails-app/conf/Config.groovy
index cc67fdf..8922ce4 100755
--- a/idrop-web/grails-app/conf/Config.groovy
+++ b/idrop-web/grails-app/conf/Config.groovy
@@ -183,7 +183,7 @@ log4j = {
'net.sf.ehcache.hibernate'
//info 'org.irods.mydrop'
- warn 'org.irods.jargon'
+ debug 'org.irods.jargon'
warn 'org.irods.jargon.spring.security'
warn 'org.springframework'
diff --git a/idrop-web/grails-app/views/search/searchResult.gsp b/idrop-web/grails-app/views/search/searchResult.gsp
index 7c69443..3f27c2c 100755
--- a/idrop-web/grails-app/views/search/searchResult.gsp
+++ b/idrop-web/grails-app/views/search/searchResult.gsp
@@ -1,79 +1,67 @@
-<table class="table table-striped table-hover" cellspacing="0"
- cellpadding="0" border="0">
- <tr>
- <th></th>
- <th>
+<div>
+ <table id="searchResultTable" class="table table-striped table-hover"
+ cellspacing="0" cellpadding="0" border="0">
+ <thead>
+ <tr>
+ <th></th>
+ <th>
- <div class="btn-group">
- <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Action<span
- class="caret"></span></a>
- <ul class="dropdown-menu">
- <li id="menuAddToCartDetails"><a href="#addAllToCartDetails"
- onclick="addSelectedToCart()"><g:message
- code="text.add.all.to.cart" /></a></li>
- <li id="menuDeleteDetails"><a href="#deleteAllDetails"
- onclick="deleteSelected()"><g:message code="text.delete.all" /></a></li>
- <!-- dropdown menu links -->
- </ul>
- </div>
+ <div class="btn-group">
+ <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Action<span
+ class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li id="menuAddToCartDetails"><a href="#addAllToCartDetails"
+ onclick="addSelectedToCart()"><g:message
+ code="text.add.all.to.cart" /></a></li>
+ <li id="menuDeleteDetails"><a href="#deleteAllDetails"
+ onclick="deleteSelected()"><g:message code="text.delete.all" /></a></li>
+ <!-- dropdown menu links -->
+ </ul>
+ </div>
- </th>
- <th><g:message code="text.name" /></th>
- <th><g:message code="text.type" /></th>
- <th><g:message code="text.modified" /></th>
- <th><g:message code="text.length" /></th>
- </tr>
- </thead>
- <tbody>
- <g:each in="${results}" var="entry">
+ </th>
+ <th><g:message code="text.name" /></th>
+ <th><g:message code="text.type" /></th>
+ <th><g:message code="text.length" /></th>
- <tr id="${entry.formattedAbsolutePath}">
-
- <td><span
- class="ui-icon-circle-plus search-detail-icon ui-icon"></span></td>
- <td><g:checkBox name="selectDetail"
- value="${entry.formattedAbsolutePath}" checked="false" /> <span
- class="setPaddingLeftAndRight"><g:link target="_blank"
- controller="browse" action="index"
- params="[mode: 'path', absPath: entry.formattedAbsolutePath]">
- <i class="icon-folder-open "></i>
- </g:link></span></td>
- <td>
- ${entry.nodeLabelDisplayValue}
- </td>
- <td>
- ${entry.objectType}
- </td>
- <td>
- ${entry.modifiedAt}
- </td>
- <td>
- ${entry.displayDataSize}
- </td>
</tr>
- </g:each>
-
- </tbody>
+ </thead>
+ <tbody>
+ <g:each in="${results}" var="entry">
- <tfoot>
- <tr>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- </tfoot>
-</table>
+ <tr id="${entry.formattedAbsolutePath}">
-<script type="text/javascript">
- function clickOnPathInSearchResult(data) {
+ <td><span
+ class="ui-icon-circle-plus search-detail-icon ui-icon"></span></td>
+ <td><g:checkBox name="selectDetail"
+ value="${entry.formattedAbsolutePath}" checked="false" /> <span
+ class="setPaddingLeftAndRight"><g:link target="_blank"
+ controller="browse" action="index"
+ params="[mode: 'path', absPath: entry.formattedAbsolutePath]">
+ <i class="icon-folder-open "></i>
+ </g:link></span></td>
+ <td>
+ ${entry.nodeLabelDisplayValue}
+ </td>
+ <td>
+ ${entry.objectType}
+ </td>
+ <td>
+ ${entry.displayDataSize}
+ </td>
+ </tr>
+ </g:each>
- }
+ </tbody>
- function infoHere(path) {
- setDefaultView("info");
- selectTreePathFromIrodsPath(path);
- }
-</script> \ No newline at end of file
+ <tfoot>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ </tfoot>
+ </table>
+</div> \ No newline at end of file
diff --git a/idrop-web/grails-app/views/tags/index.gsp b/idrop-web/grails-app/views/tags/index.gsp
index ec43205..98e4245 100755
--- a/idrop-web/grails-app/views/tags/index.gsp
+++ b/idrop-web/grails-app/views/tags/index.gsp
@@ -1,6 +1,10 @@
<head>
<meta name="layout" content="mainNoSidebar" />
<g:javascript library="mydrop/tag" />
+<g:javascript library="mydrop/search" />
+<g:javascript library="mydrop/home" />
+
+
</head>
<button type="button" id="refreshTags" name="refreshTags"
onclick="refreshTagCloudButtonClicked()">
diff --git a/idrop-web/web-app/js/mydrop/lingo_common.js b/idrop-web/web-app/js/mydrop/lingo_common.js
index 3f353a4..00140c4 100755
--- a/idrop-web/web-app/js/mydrop/lingo_common.js
+++ b/idrop-web/web-app/js/mydrop/lingo_common.js
@@ -222,7 +222,7 @@ function checkAjaxResultForError(resultHtml) {
* jquery selector for detail icon, or null
*/
function lcSendValueAndBuildTable(getUrl, params, tableDiv, newTableId,
- detailsFunction, detailsIconSelector) {
+ detailsFunction, detailsIconSelector, tableParams) {
if (getUrl.length == 0) {
throw ("no get url for call");
@@ -238,7 +238,7 @@ function lcSendValueAndBuildTable(getUrl, params, tableDiv, newTableId,
$.get(context + getUrl, params, function(data, status, xhr) {
var continueReq = checkForSessionTimeout(data, xhr);
if (continueReq) {
- lcBuildTable(data, tableDiv, newTableId, detailsFunction, detailsIconSelector);
+ lcBuildTable(data, tableDiv, newTableId, detailsFunction, detailsIconSelector, tableParams);
}
}, "html");
@@ -267,11 +267,14 @@ function lcSendValueAndBuildTable(getUrl, params, tableDiv, newTableId,
* @return - DataTable that was created
*/
function lcBuildTable(data, tableDiv, newTableId, detailsFunction,
- dataIconSelector) {
+ dataIconSelector, tableParams) {
$(tableDiv).html(data);
- var dataTableCreated = $(newTableId).dataTable({
- "bJQueryUI" : true
- });
+
+ if (tableParams == null) {
+ tableParams = {"bJQueryUI" : false}
+ }
+
+ var dataTableCreated = $(newTableId).dataTable(tableParams);
dataTableCreated.fnAdjustColumnSizing();
diff --git a/idrop-web/web-app/js/mydrop/main.js b/idrop-web/web-app/js/mydrop/main.js
index 42c0135..6807d91 100755
--- a/idrop-web/web-app/js/mydrop/main.js
+++ b/idrop-web/web-app/js/mydrop/main.js
@@ -32,49 +32,6 @@ var displayIndex = 0;
var splitMode = 'n';
/**
- * Linked to update tags button on info view, update the tags in iRODS
- */
-function updateTags() {
- var infoTagsVal = $("#infoTags").val();
- var infoCommentVal = $("#infoComment").val();
- var absPathVal = $("#infoAbsPath").val();
-
- var params = {
- absPath : absPathVal,
- tags : infoTagsVal,
- comment : infoCommentVal
- }
-
- showBlockingPanel();
- lcSendValueViaPostAndCallbackHtmlAfterErrorCheck("/tags/updateTags",
- params, null, "#infoUpdateArea", function() {
- setMessage("Tags and comments updated successfully");
- refreshTagCloud();
- });
- unblockPanel();
-}
-
-/**
- * Linked to update tags button on info view, update the tags in iRODS
- */
-function updateTagsAtPath(path, tags, comment) {
-
- var params = {
- absPath : path,
- tags : tags,
- comment : comment
- }
-
- showBlockingPanel();
- lcSendValueViaPostAndCallbackHtmlAfterErrorCheck("/tags/updateTags",
- params, null, null, function() {
- setMessage("Tags and comments updated successfully");
- refreshTagCloud();
- });
- unblockPanel();
-}
-
-/**
* Code to format a 'crumb trail' header
*
* @param irodsAbsolutePath
diff --git a/idrop-web/web-app/js/mydrop/search.js b/idrop-web/web-app/js/mydrop/search.js
index d118311..c0b0aae 100755
--- a/idrop-web/web-app/js/mydrop/search.js
+++ b/idrop-web/web-app/js/mydrop/search.js
@@ -1,6 +1,6 @@
/**
- * Javascript for search page, processing the search table
+= * Javascript for search page, processing the search table
*
* author: Mike Conway - DICE
*/
diff --git a/idrop-web/web-app/js/mydrop/tag.js b/idrop-web/web-app/js/mydrop/tag.js
index 8f06f9d..f9aae8e 100644
--- a/idrop-web/web-app/js/mydrop/tag.js
+++ b/idrop-web/web-app/js/mydrop/tag.js
@@ -1,20 +1,20 @@
-
/**
- * Process hashChange events through the bbq plug in for back button support for the browser
+ * Process hashChange events through the bbq plug in for back button support for
+ * the browser
+ *
* @param state
* @returns {Boolean}
*/
function processTagSearchStateChange(state) {
var tab = state["tab"];
var tag = state["tag"];
-
- if (tab) {
- var selector = '#searchTabs a[href="' + tab + '"]';
+
+ if (tab) {
+ var selector = '#searchTabs a[href="' + tab + '"]';
$(selector).tab('show');
}
}
-
function clickInTagCloud(data) {
$('#tabs').tabs({
selected : 1
@@ -40,45 +40,21 @@ function searchWithTag(data) {
setErrorMessage(jQuery.i18n.prop('msg_search_missing'));
return false;
}
-
- var params = {
- searchTerm : data,
- searchType : "tag"
- }
+ var params = {
+ searchTerm : data,
+ searchType : "tag"
+ }
- showBlockingPanel();
-
- // do search
-
- var jqxhr = $.post(context + "/search/search", params,
- function(data, status, xhr) {
- }, "html").success(function(returnedData, status, xhr) {
- var continueReq = checkForSessionTimeout(returnedData, xhr);
- if (!continueReq) {
- return false;
- }
-
- // populate search results
-
- // show result tab
- $('#searchTabs a[href="#resultsTab"]').tab('show');
-
-
- $("#resultsTabInner").html(returnedData);
-
-
- unblockPanel();
+ var tableParams = {"bJQueryUI" : false, "bFilter" : false, "iDisplayLength":"5000"}
- }).error(function(xhr, status, error) {
-
- setErrorMessage(xhr.responseText);
- unblockPanel();
- });
+ // show result tab
+ $('#searchTabs a[href="#resultsTab"]').tab('show');
+ lcSendValueAndBuildTable("/search/search", params, "#resultsTabInner",
+ "#searchResultTable", searchDetailsClick, ".search-detail-icon", tableParams);
}
-
/*
* Update the information in the tag cloud
*/
@@ -88,5 +64,7 @@ function haveTagCloudData(data) {
width : 800,
height : 600
});
+
+
} \ No newline at end of file