diff options
Diffstat (limited to 'trunk')
-rw-r--r-- | trunk/etherpad/src/etherpad/control/tag/tag_control.js | 3 | ||||
-rw-r--r-- | trunk/etherpad/src/templates/tag/tag_search.ejs | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/trunk/etherpad/src/etherpad/control/tag/tag_control.js b/trunk/etherpad/src/etherpad/control/tag/tag_control.js index d902b56..56dd50b 100644 --- a/trunk/etherpad/src/etherpad/control/tag/tag_control.js +++ b/trunk/etherpad/src/etherpad/control/tag/tag_control.js @@ -180,7 +180,7 @@ function onRequest() { var tags = new Array(); var antiTags = new Array(); - if (request.params.query != undefined) { + if (request.params.query != undefined && request.params.query != '') { var query = request.params.query.split(','); for (i = 0; i < query.length; i++) if (query[i][0] == '!') @@ -206,7 +206,6 @@ function onRequest() { for (i = 0; i < matchingPads.length; i++) { matchingPads[i].TAGS = matchingPads[i].TAGS.split('#'); } -log.info({pads:matchingPads}); var isPro = pro_utils.isProDomainRequest(); var userId = padusers.getUserId(); diff --git a/trunk/etherpad/src/templates/tag/tag_search.ejs b/trunk/etherpad/src/templates/tag/tag_search.ejs index 18e88e1..c7a1d4e 100644 --- a/trunk/etherpad/src/templates/tag/tag_search.ejs +++ b/trunk/etherpad/src/templates/tag/tag_search.ejs @@ -87,6 +87,17 @@ limitations under the License. */ %> </div> <div style="height: 268px;" id="editorcontainerbox"> <div id="editorcontainer" style="padding:5pt; height: 600pt;"> + <h1>Current query</h1> + <% if (tags.length == 0 && antiTags.length == 0) { %> + < No current query; please select some tags below to search for pads > + <% } else { %> + <% for (i = 0; i < tags.length; i++) { %> + <a href="/ep/tag/?query=<%= tagsToQuery(tags.filter(function (tag) { return tag != tags[i]}), antiTags) %>" class="tag" title="<%= tags[i] %> matches"><%= tags[i] %></a> + <% } %> + <% for (i = 0; i < antiTags.length; i++) { %> + <a href="/ep/tag/?query=<%= tagsToQuery(tags, antiTags.filter(function (tag) { return tag != antiTags[i]})) %>" class="tag" title="<%= antiTags[i] %> matches">!<%= antiTags[i] %></a> + <% } %> + <% } %> <h1>Refine your query</h1> <h2>Search for pads that have a tag</h2> <% for (i = 0; i < newTags.length; i++) { %> |