summaryrefslogtreecommitdiffstats
path: root/idrop-web
diff options
context:
space:
mode:
authorMike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-04-01 18:23:18 (GMT)
committer Mike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-04-01 18:23:18 (GMT)
commita5f9a49bb67d83c604138e9c17f1205e93f97965 (patch)
tree4ad71e37b5a32e440f7c83534787657641a5efc2 /idrop-web
parent2b734a9d1f15da67ab16ebb146c94788be693188 (diff)
downloadQCG-Data-a5f9a49bb67d83c604138e9c17f1205e93f97965.zip
QCG-Data-a5f9a49bb67d83c604138e9c17f1205e93f97965.tar.gz
QCG-Data-a5f9a49bb67d83c604138e9c17f1205e93f97965.tar.bz2
synch test code in idrop, mods to web app
Diffstat (limited to 'idrop-web')
-rw-r--r--idrop-web/grails-app/conf/spring/resources.xml2
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy2
-rw-r--r--idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy2
-rw-r--r--idrop-web/grails-app/views/common/_secondarymain.gsp12
-rw-r--r--idrop-web/grails-app/views/common/_topbar.gsp43
-rw-r--r--idrop-web/grails-app/views/index.gsp100
-rw-r--r--idrop-web/grails-app/views/layouts/main.gsp2
-rw-r--r--idrop-web/grails-app/views/tags/tagCloud.gsp2
-rw-r--r--idrop-web/web-app/css/main.css101
-rw-r--r--idrop-web/web-app/js/jqcloud-0.1.6.js104
-rw-r--r--idrop-web/web-app/js/mydrop/home.js25
-rw-r--r--idrop-web/web-app/js/mydrop/lingo_common.js12
-rw-r--r--idrop-web/web-app/js/mydrop/main.js46
-rw-r--r--idrop-web/web-app/js/mydrop/search.js62
14 files changed, 255 insertions, 260 deletions
diff --git a/idrop-web/grails-app/conf/spring/resources.xml b/idrop-web/grails-app/conf/spring/resources.xml
index 93b3490..e370ca6 100644
--- a/idrop-web/grails-app/conf/spring/resources.xml
+++ b/idrop-web/grails-app/conf/spring/resources.xml
@@ -66,7 +66,7 @@
<beans:bean id="logoutFilter"
class="org.springframework.security.web.authentication.logout.LogoutFilter">
- <beans:constructor-arg value="/login/login" />
+ <beans:constructor-arg value="/login/logout" />
<beans:constructor-arg>
<beans:list>
<beans:bean
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
index c14d81d..ea58cf7 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/LoginController.groovy
@@ -9,5 +9,5 @@ class LoginController {
def index ={ redirect(action: "login") }
- def logout = {}
+ def logout = {redirect(action: "login")}
}
diff --git a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
index 70d82e3..1ff7cef 100644
--- a/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
+++ b/idrop-web/grails-app/controllers/org/irods/mydrop/controller/TagsController.groovy
@@ -71,8 +71,6 @@ class TagsController {
entries.each {
-
-
jsonBuff.add(
["text": it.irodsTagValue.tagData,"weight":2 + it.countOfFiles])
diff --git a/idrop-web/grails-app/views/common/_secondarymain.gsp b/idrop-web/grails-app/views/common/_secondarymain.gsp
index 179458f..febe418 100644
--- a/idrop-web/grails-app/views/common/_secondarymain.gsp
+++ b/idrop-web/grails-app/views/common/_secondarymain.gsp
@@ -1,19 +1,9 @@
<script>
$(function() {
$("#secondaryTabs").tabs();
- //lcSendValueAndCallbackHtmlAfterErrorCheck("/tags/tagCloud", "#tagCloudDiv",
- // "#tagCloudDiv", null);
-
- lcSendValueAndCallbackWithJsonAfterErrorCheck("/tags/tagCloudFormatted", null,
- "#tagCloudDiv", function(data){haveTagCloudData(data);});//function(data){haveTagCloudData(data);});
-
-
+ refreshTagCloud();
});
- function haveTagCloudData(data) {
- $("#tagCloudDiv").jQCloud(data, new function(){});
- }
-
</script>
<div id="secondaryTabs">
<ul>
diff --git a/idrop-web/grails-app/views/common/_topbar.gsp b/idrop-web/grails-app/views/common/_topbar.gsp
index 4448a22..a7d9d7a 100644
--- a/idrop-web/grails-app/views/common/_topbar.gsp
+++ b/idrop-web/grails-app/views/common/_topbar.gsp
@@ -1,28 +1,34 @@
-<div id="bannercontainer"><!-- image banner --></div>
-<div id="headerSearchBox">
+<div id="bannercontainer">
+ <!-- image banner -->
+</div>
<g:ifAuthenticated>
-<fieldset class=""><label for="">Search Term:</label> <input
- id="searchTerm" type="text" name="searchTerm" />
+ <div id="headerSearchBox" class="ui-widget-header fg-toolbar">
-<button type="button" id="search" value="search" onclick="search()")>Search</button> as a
+ <div id="searchMenu" class="fg-buttonset fg-buttonset-multi" style="float:left">
+ <label for="">Search Term:</label> <input id="searchTerm" type="text"
+ name="searchTerm" />
-<g:select name="searchType" id="searchType" from="${['file', 'tag']}" />
+ <button type="button" id="search"
+ class="ui-state-default ui-corner-all" value="search"
+ onclick="search()")>Search</button><span>as a<g:select name="searchType" id="searchType" from="${['file', 'tag']}" /></span>
+ </div>
-</fieldset>
+ <div id="toggleMenu" class="fg-buttonset fg-buttonset-single" style="float:right">
-<div id="toggleMenu">
+ <button type="button" id="toggleMenuButton"
+ class="ui-state-default ui-corner-all" value="showMenu"
+ onclick="showMenu()")>Show/Hide Menu</button>
-<button type="button" id="toggleMenuButton" value="showMenu" onclick="showMenu()")>Show/Hide Menu</button>
-</div>
+ <button type="button" id="logoutButton"
+ class="ui-state-default ui-corner-all" value="logout"
+ onclick="logout()")>Logout</button>
+ </div>
+ </div>
</g:ifAuthenticated>
-</div>
-
-<script type="text/javascript">
-<!--
-var menuShown = true;
+<script type="text/javascript">var menuShown = true;
function showMenu() {
if (menuShown) {
@@ -43,13 +49,6 @@ function showMenu() {
}
}
-
-
-function search() {
- prosecuteSearch($("#searchTerm").val(), $("#searchType").val());
-}
-
-//-->
</script>
diff --git a/idrop-web/grails-app/views/index.gsp b/idrop-web/grails-app/views/index.gsp
deleted file mode 100644
index 63ca382..0000000
--- a/idrop-web/grails-app/views/index.gsp
+++ /dev/null
@@ -1,100 +0,0 @@
-<html>
- <head>
- <title>Welcome to Grails</title>
- <meta name="layout" content="main" />
- <style type="text/css" media="screen">
-
- #nav {
- margin-top:20px;
- margin-left:30px;
- width:228px;
- float:left;
-
- }
- .homePagePanel * {
- margin:0px;
- }
- .homePagePanel .panelBody ul {
- list-style-type:none;
- margin-bottom:10px;
- }
- .homePagePanel .panelBody h1 {
- text-transform:uppercase;
- font-size:1.1em;
- margin-bottom:10px;
- }
- .homePagePanel .panelBody {
- background: url(images/leftnav_midstretch.png) repeat-y top;
- margin:0px;
- padding:15px;
- }
- .homePagePanel .panelBtm {
- background: url(images/leftnav_btm.png) no-repeat top;
- height:20px;
- margin:0px;
- }
-
- .homePagePanel .panelTop {
- background: url(images/leftnav_top.png) no-repeat top;
- height:11px;
- margin:0px;
- }
- h2 {
- margin-top:15px;
- margin-bottom:15px;
- font-size:1.2em;
- }
- #pageBody {
- margin-left:280px;
- margin-right:20px;
- }
- </style>
- </head>
- <body>
- <div id="nav">
- <div class="homePagePanel">
- <div class="panelTop"></div>
- <div class="panelBody">
- <h1>Application Status</h1>
- <ul>
- <li>App version: <g:meta name="app.version"></g:meta></li>
- <li>Grails version: <g:meta name="app.grails.version"></g:meta></li>
- <li>Groovy version: ${org.codehaus.groovy.runtime.InvokerHelper.getVersion()}</li>
- <li>JVM version: ${System.getProperty('java.version')}</li>
- <li>Controllers: ${grailsApplication.controllerClasses.size()}</li>
- <li>Domains: ${grailsApplication.domainClasses.size()}</li>
- <li>Services: ${grailsApplication.serviceClasses.size()}</li>
- <li>Tag Libraries: ${grailsApplication.tagLibClasses.size()}</li>
- </ul>
- <h1>Installed Plugins</h1>
- <ul>
- <g:set var="pluginManager"
- value="${applicationContext.getBean('pluginManager')}"></g:set>
-
- <g:each var="plugin" in="${pluginManager.allPlugins}">
- <li>${plugin.name} - ${plugin.version}</li>
- </g:each>
-
- </ul>
- </div>
- <div class="panelBtm"></div>
- </div>
- </div>
- <div id="pageBody">
- <h1>Welcome to Grails</h1>
- <p>Congratulations, you have successfully started your first Grails application! At the moment
- this is the default page, feel free to modify it to either redirect to a controller or display whatever
- content you may choose. Below is a list of controllers that are currently deployed in this application,
- click on each to execute its default action:</p>
-
- <div id="controllerList" class="dialog">
- <h2>Available Controllers:</h2>
- <ul>
- <g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">
- <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li>
- </g:each>
- </ul>
- </div>
- </div>
- </body>
-</html>
diff --git a/idrop-web/grails-app/views/layouts/main.gsp b/idrop-web/grails-app/views/layouts/main.gsp
index a0bf7c1..b9c5b0d 100644
--- a/idrop-web/grails-app/views/layouts/main.gsp
+++ b/idrop-web/grails-app/views/layouts/main.gsp
@@ -16,7 +16,7 @@
<g:javascript library="jquery-ui-1.8.7.custom.min" />
<g:javascript library="jquery.jstree.min" />
<g:javascript library="jquery.dataTables.min" />
-<g:javascript library="jqcloud-0.1.5.min" />
+<g:javascript library="jqcloud-0.1.6" />
<g:javascript library="mydrop/lingo_common" />
<g:javascript library="mydrop/main" />
<g:javascript library="jquery-ui-13" />
diff --git a/idrop-web/grails-app/views/tags/tagCloud.gsp b/idrop-web/grails-app/views/tags/tagCloud.gsp
index 9bc96d5..9746987 100644
--- a/idrop-web/grails-app/views/tags/tagCloud.gsp
+++ b/idrop-web/grails-app/views/tags/tagCloud.gsp
@@ -1,5 +1,5 @@
<ul>
<g:each in="${tagCloud}" var="tagVal">
- <li>${tagVal.irodsTagValue.tagData}</li>
+ <li class="tagCouldEntry">${tagVal.irodsTagValue.tagData}</li>
</g:each>
</ul> \ No newline at end of file
diff --git a/idrop-web/web-app/css/main.css b/idrop-web/web-app/css/main.css
index 29c16da..682730f 100644
--- a/idrop-web/web-app/css/main.css
+++ b/idrop-web/web-app/css/main.css
@@ -67,7 +67,7 @@ div#tabs {
overflow: auto;
width: 100%;
display: inline-block;
- }
+}
.wrapper {
text-align: left;
@@ -76,7 +76,6 @@ div#tabs {
border: 0;
display: inline-block;
overflow: auto;
-
}
.colRight {
@@ -111,7 +110,6 @@ div#tabs {
display: block;
}
-
.body {
float: left;
margin: 0 15px 10px 15px;
@@ -130,25 +128,37 @@ div#tabs {
}
#headerSearchBox {
- width: 800px;
- height: 40px;
- padding: 0;
- margin-left: auto;
- margin-right: auto;
- display: inline-block;
- position:relative;
- float:right;
+ width: 100%;
+ height: auto;
+ margin: 5px;
+ display: block;
+ position: relative;
+ float: left;
}
/* NAVIGATION MENU */
.nav {
- background: #244857 bottom repeat-x;
+ background: #aabbc2 bottom repeat-x;
border: 1px solid #ccc;
border-style: solid none solid none;
margin-top: 5px;
padding: 7px 12px;
}
+.fg-toolbar {
+ padding: .5em;
+ margin: 0;
+}
+
+.fg-toolbar .fg-buttonset {
+ margin-right: 1.5em;
+ padding-left: 1px;
+}
+
+.fg-toolbar .fg-button {
+ font-size: 1em;
+}
+
.menuButton {
font-size: 10px;
padding: 0 5px;
@@ -226,7 +236,7 @@ table {
tr {
border: 0;
- padding:8px;
+ padding: 8px;
}
td,th {
@@ -312,12 +322,9 @@ th.desc a {
}
/* object container */
.objectContainer {
-
color: #333333;
-
dislay: inline-block;
clear: both;
-
-moz-background-clip: border;
-moz-background-inline-policy: continuous;
-moz-background-origin: padding;
@@ -331,9 +338,6 @@ th.desc a {
padding: 3px;
margin: 3px;
display: inline-block;
-
-
-
}
.objectContainerGrouping {
@@ -350,7 +354,7 @@ th.desc a {
.objectContainerDetails {
float: right;
text-align: left;
- display:inline-block;
+ display: inline-block;
}
.objectHeader {
@@ -359,7 +363,6 @@ th.desc a {
margin-bottom: 10px;
color: #555555;
margin-bottom: 10px;
-
}
.objectDescription {
@@ -381,7 +384,6 @@ th.desc a {
padding: 10px;
}
-
/* standard form layouts */
#columnarForm fieldset {
float: left;
@@ -585,42 +587,43 @@ th.desc a {
}
#browse {
-height:95%;width:100%;margin:0;padding:0;
+ height: 95%;
+ width: 100%;
+ margin: 0;
+ padding: 0;
}
#secondaryDiv {
- height:400px;
- display:inline-block;
- //overflow:auto;
+ height: 400px;
+ display: inline-block; //
+ overflow: auto;
}
-
#tagCloudDiv {
- height:400px;
- display:inline-block;
- width:100%;
- overflow:auto;
+ height: 400px;
+ display: inline-block;
+ width: 100%;
+ overflow: auto;
}
-
-#dataTreeDiv{
-float:left;
-height:auto;
-width:auto;
-border-top:solid 1px #9cbdff;
-background:#ffffff;
-overflow: auto;
+#dataTreeDiv {
+ float: left;
+ height: auto;
+ width: auto;
+ border-top: solid 1px #9cbdff;
+ background: #ffffff;
+ overflow: auto;
}
-
-#dataTreeView{
-height:100%;
-width:100%;
-background:#ffffff;
-overflow: auto;
+#dataTreeView {
+ height: 100%;
+ width: 100%;
+ background: #ffffff;
+ overflow: auto;
}
-#infoDiv{
-float:right;height:100%;
-background:#f4f4f4;
-}
+#infoDiv {
+ float: right;
+ height: 100%;
+ background: #f4f4f4;
+} \ No newline at end of file
diff --git a/idrop-web/web-app/js/jqcloud-0.1.6.js b/idrop-web/web-app/js/jqcloud-0.1.6.js
new file mode 100644
index 0000000..8f5a9fe
--- /dev/null
+++ b/idrop-web/web-app/js/jqcloud-0.1.6.js
@@ -0,0 +1,104 @@
+/*!
+ * jQCloud Plugin for jQuery
+ *
+ * Version 0.1.6
+ *
+ * Copyright 2011, Luca Ongaro
+ * Licensed under the MIT license.
+ *
+ * Date: Thu Mar 31 18:27:22 +0100 2011
+ */
+
+(function( $ ){
+ $.fn.jQCloud = function(word_array, callback_function) {
+ // Reference to the container element
+ var $this = this;
+ // Reference to the ID of the container element
+ var container_id = $this.attr('id');
+
+ // Add the "jqcloud" class to the container for easy CSS styling
+ $this.addClass("jqcloud");
+
+ var drawWordCloud = function() {
+ // Helper function to test if an element overlaps others
+ var hitTest = function(elem, other_elems){
+ // Pairwise overlap detection
+ var overlapping = function(a, b){
+ if (Math.abs(2.0*a.offsetLeft + a.offsetWidth - 2.0*b.offsetLeft - b.offsetWidth) < a.offsetWidth + b.offsetWidth) {
+ if (Math.abs(2.0*a.offsetTop + a.offsetHeight - 2.0*b.offsetTop - b.offsetHeight) < a.offsetHeight + b.offsetHeight) {
+ return true;
+ }
+ }
+ return false;
+ };
+ var i = 0;
+ // Check elements for overlap one by one, stop and return false as soon as an overlap is found
+ for(i = 0; i < other_elems.length; i++) {
+ if (overlapping(elem, other_elems[i])) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ // Make sure every weight is a number before sorting
+ for (i = 0; i < word_array.length; i++) {
+ word_array[i].weight = parseFloat(word_array[i].weight, 10);
+ }
+
+ // Sort word_array from the word with the highest weight to the one with the lowest
+ word_array.sort(function(a, b) { if (a.weight < b.weight) {return 1;} else if (a.weight > b.weight) {return -1;} else {return 0;} });
+
+ var step = 2.0;
+ var already_placed_words = [];
+ var aspect_ratio = $this.width() / $this.height();
+ var origin_x = $this.width() / 2.0;
+ var origin_y = $this.height() / 2.0;
+
+ // Move each word in spiral until it finds a suitable empty place
+ $.each(word_array, function(index, word) {
+
+ // Define the ID attribute of the span that will wrap the word, and the associated jQuery selector string
+ var word_id = container_id + "_word_" + index;
+ var word_selector = "#" + word_id;
+
+ var angle = 6.28 * Math.random();
+ var radius = 0.0;
+
+ // Linearly map the original weight to a discrete scale from 1 to 10
+ var weight = Math.round((word.weight - word_array[word_array.length - 1].weight)/(word_array[0].weight - word_array[word_array.length - 1].weight) * 9.0) + 1;
+
+ var inner_html = word.url !== undefined ? "<a href='" + encodeURI(word.url).replace(/'/g, "%27") + "'>" + word.text + "</a></span>" : word.text;
+ $this.append("<span id='" + word_id + "' onclick='clickInTagCloud(\"" + word.text + "\")' class='w" + weight + "' title='" + (word.title || "") + "'>" + inner_html + "</span>");
+
+ var width = $(word_selector).width();
+ var height = $(word_selector).height();
+ var left = origin_x - width / 2.0;
+ var top = origin_y - height / 2.0;
+ $(word_selector).css("position", "absolute");
+ $(word_selector).css("left", left + "px");
+ $(word_selector).css("top", top + "px");
+
+ while(hitTest(document.getElementById(word_id), already_placed_words)) {
+ radius += step;
+ angle += (index % 2 === 0 ? 1 : -1)*step;
+
+ left = origin_x + (radius*Math.cos(angle) - (width / 2.0)) * aspect_ratio;
+ top = origin_y + radius*Math.sin(angle) - (height / 2.0);
+
+ $(word_selector).css('left', left + "px");
+ $(word_selector).css('top', top + "px");
+ }
+ already_placed_words.push(document.getElementById(word_id));
+ });
+
+ if (typeof callback_function === 'function') {
+ callback_function.call(this);
+ }
+ };
+
+ // Delay execution so that the browser can render the page before the computatively intensive word cloud drawing
+ setTimeout(function(){drawWordCloud();}, 100);
+ return this;
+ };
+})(jQuery); \ No newline at end of file
diff --git a/idrop-web/web-app/js/mydrop/home.js b/idrop-web/web-app/js/mydrop/home.js
index a3a9f3d..fa6a706 100644
--- a/idrop-web/web-app/js/mydrop/home.js
+++ b/idrop-web/web-app/js/mydrop/home.js
@@ -9,6 +9,7 @@
*/
var dataTree;
var browseOptionVal = "info";
+var selectedPath = null;
/**
* Initialize the tree control for the first view by issuing an ajax directory
@@ -110,36 +111,19 @@ function nodeSelected(event, data) {
// given the path, put in the node data
var id = data[0].id;
+ selectedPath = id;
updateBrowseDetailsForPathBasedOnCurrentModel(id);
}
-
-/**
- * Linked to update tags button on info view, update the tags in iRODS
- */
-function updateTags() {
- var infoTagsVal = $("#infoTags").val();
- var absPathVal = $("#infoAbsPath").val();
-
- var params = {
- absPath : absPathVal,
- tags : infoTagsVal
- }
-
- lcSendValueViaPostAndCallbackHtmlAfterErrorCheck("/tags/updateTags",
- params, "#infoUpdateArea", "#infoUpdateArea", function() {
- $("#infoUpdateArea").html("Tags updated");
- });
-}
-
/**
* On selection of a browser mode (from the top bar of the browse view), set the option such that selected directories in the
* tree result in the given view in the right hand pane
*/
function setBrowseMode() {
browseOptionVal = $("#browseDisplayOption").val();
+ updateBrowseDetailsForPathBasedOnCurrentModel(selectedPath);
}
/**
@@ -148,6 +132,9 @@ function setBrowseMode() {
*/
function updateBrowseDetailsForPathBasedOnCurrentModel(absPath) {
+ if (absPath == null) {
+ return;
+ }
if (browseOptionVal === null) {
browseOptionVal = "info";
diff --git a/idrop-web/web-app/js/mydrop/lingo_common.js b/idrop-web/web-app/js/mydrop/lingo_common.js
index d84b24c..ae6c613 100644
--- a/idrop-web/web-app/js/mydrop/lingo_common.js
+++ b/idrop-web/web-app/js/mydrop/lingo_common.js
@@ -465,3 +465,15 @@ function lcFillInDivWithHtml(data, resultDiv, postLoadFunction) {
}
}
+
+
+/**
+ * Handy method to show a loading icon in the div specified by the given JQuery selector
+ * @param divSelector
+ */
+function lcShowBusyIconInDiv(divSelector) {
+ var img = document.createElement('IMG');
+ img.setAttribute("src", context + "/images/ajax-loader.gif");
+
+ $(divSelector).html(img);
+}
diff --git a/idrop-web/web-app/js/mydrop/main.js b/idrop-web/web-app/js/mydrop/main.js
index 26c9a16..cf16515 100644
--- a/idrop-web/web-app/js/mydrop/main.js
+++ b/idrop-web/web-app/js/mydrop/main.js
@@ -12,3 +12,49 @@ function search() {
prosecuteSearch(searchTerm, searchType);
}
+/**
+ * Linked to update tags button on info view, update the tags in iRODS
+ */
+function updateTags() {
+ var infoTagsVal = $("#infoTags").val();
+ var absPathVal = $("#infoAbsPath").val();
+
+ var params = {
+ absPath : absPathVal,
+ tags : infoTagsVal
+ }
+
+ lcSendValueViaPostAndCallbackHtmlAfterErrorCheck("/tags/updateTags",
+ params, "#infoUpdateArea", "#infoUpdateArea", function() {
+ $("#infoUpdateArea").html("Tags updated");
+ refreshTagCloud();
+ });
+}
+
+/*
+ * Update the information in the tag cloud
+ */
+function haveTagCloudData(data) {
+ $("#tagCloudDiv").empty();
+ //$("#tagCloudDiv").jQCloud(data, new function(){ $(".w1").each(function(index, value) { value.bind("click", function(data) { alert("clicked for data " + data);});});});
+ $("#tagCloudDiv").jQCloud(data, new function(){});
+
+}
+
+function clickInTagCloud(data) {
+ $('#tabs').tabs({ selected: 1 }); // activate search results tab
+ prosecuteSearch(data, "tag");
+}
+
+function refreshTagCloud() {
+ lcShowBusyIconInDiv("#tagCloudDiv");
+ lcSendValueAndCallbackWithJsonAfterErrorCheck("/tags/tagCloudFormatted", null,
+ "#tagCloudDiv", function(data){haveTagCloudData(data);});
+
+}
+
+function logout() {
+ window.location = context + "/j_spring_security_logout";
+}
+
+
diff --git a/idrop-web/web-app/js/mydrop/search.js b/idrop-web/web-app/js/mydrop/search.js
index cd977ae..6c39d13 100644
--- a/idrop-web/web-app/js/mydrop/search.js
+++ b/idrop-web/web-app/js/mydrop/search.js
@@ -15,64 +15,20 @@ var dataTable;
* @return
*/
function prosecuteSearch(searchTerm, searchType) {
- if (dataTable == null) {
- var url = "/search/search";
-
- var params = {
- searchTerm : searchTerm,
- searchType : searchType
- }
-
- lcSendValueAndBuildTable(url, params,
- "#searchTableDiv", "#searchResultTable", null);
- } else {
-
- }
-}
-
-
-function searchTableClickAction() {
-
-}
-/*
-function detailsClick(minMaxIcon) {
- var nTr = minMaxIcon.parentNode.parentNode;
-
- if (minMaxIcon.parentNode.innerHTML.match('circle-minus')) {
- closeDetails(minMaxIcon, nTr);
- } else {
- try {
- openDetails(minMaxIcon, nTr);
- } catch (err) {
- console.log("error in getMetaData():" + err);
- }
+ var url = "/search/search";
+ var params = {
+ searchTerm : searchTerm,
+ searchType : searchType
}
-}
-function closeDetails(minMaxIcon, rowActionIsOn) {
- // This row is already open - close it
- minMaxIcon.setAttribute("class", "ui-icon ui-icon-circle-plus");
- dataTable.fnClose(rowActionIsOn);
-}
+ lcSendValueAndBuildTable(url, params, "#searchTableDiv",
+ "#searchResultTable", null);
-function openDetails(minMaxIcon, rowActionIsOn) {
- prepareForCall();
- closeTableNodes();
- // nTr points to row and has id user_id in id
- var userId = $(rowActionIsOn).attr('id');
- var detailsId = "details_" + userId;
- var detailsHtmlDiv = "details_html_" + userId;
- var userDetailsId = "userDetailsForm_" + userId;
+}
- // close other rows
- minMaxIcon.setAttribute("class", "ui-icon ui-icon-circle-minus");
- newRowNode = dataTable.fnOpen(rowActionIsOn,
- buildDetailsLayout(userDetailsId), 'details');
- // newRowNode.setAttribute("class", "details");
- newRowNode.setAttribute("id", detailsId);
- askForUserDetailsForm(userDetailsId, userId);
+function searchTableClickAction() {
}
- */
+