mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:57:03 +02:00
added tagging the search results
This commit is contained in:
@ -355,6 +355,37 @@ function removeme(id) {
|
||||
}
|
||||
|
||||
|
||||
function tag_search_results(url){
|
||||
var idlist = '';
|
||||
|
||||
var tag_keys = document.getElementById('tag_keys').value;
|
||||
var tag_value = document.getElementById('tag_value').value;
|
||||
|
||||
if(tag_keys) {
|
||||
params = "idlist=" + tag_keys + "&tag=" + encodeURI(tag_value);
|
||||
|
||||
var http = getXMLHttp();
|
||||
|
||||
if(http == null) { alert("Error creating XMLHttpRequest"); return; }
|
||||
|
||||
http.onreadystatechange = function() {
|
||||
if(http.readyState == 4) {
|
||||
if(http.status != 200) alert("Problem retrieving XML data:" + http.statusText);
|
||||
}
|
||||
}
|
||||
|
||||
http.open("POST", url, true);
|
||||
|
||||
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
http.setRequestHeader("Content-length", params.length);
|
||||
http.setRequestHeader("Connection", "close");
|
||||
|
||||
http.send(params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$.datepicker.setDefaults($.datepicker.regional[piler_ui_lang]);
|
||||
$("#date1").datepicker( { dateFormat: 'yy-mm-dd' } );
|
||||
|
@ -64,6 +64,7 @@
|
||||
.text { font: normal 12px Arial, sans-serif; font-weight: bold; text-align:left; width: 408px; }
|
||||
.ruletext { font: normal 12px Arial, sans-serif; font-weight: bold; text-align:left; width: 365px; }
|
||||
.advtext { font: bold 12px Arial, sans-serif; font-weight: bold; text-align:left; width: 280px; }
|
||||
.tagtext { font: normal 10px Arial, sans-serif; font-weight: bold; text-align:left; width: 280px; }
|
||||
.advtextgrey { font: bold 12px Arial, sans-serif; color: #999; font-weight: bold; text-align:left; width: 280px; }
|
||||
.textregular { font: normal 12px Arial, sans-serif; font-weight: bold; text-align:left; }
|
||||
|
||||
@ -108,13 +109,14 @@
|
||||
#health1 .error { color: red; font-weight: bold; }
|
||||
|
||||
#pagenav { float: left; margin-top: 0px; margin-bottom: 0px; text-align: left; width: 990px; border: 0px solid red; }
|
||||
.navrow { display: table-row; width: 282px; border: 1px solid red; }
|
||||
.navrow { display: table-row; }
|
||||
.navlink { color: #bbb; font: bold 12px Arial, sans-serif; }
|
||||
#pagenav a.navlink { color: #850505; font: bold 12px Arial, sans-serif; }
|
||||
|
||||
#pagingleft { display: table-cell; float: left; text-align: left; width: 60px; border: 0px solid red; }
|
||||
#pagingcenter { display: table-cell; float: left; text-align: center; width: 145px; border: 0px solid red; }
|
||||
#pagingright { display: table-cell; float: right; text-align: right; width: 60px; border: 0px solid red; }
|
||||
#pagingright { display: table-cell; float: left; text-align: right; width: 60px; border: 0px solid red; }
|
||||
#tagbox { display: table-cell; float: left; text-align: right; vertical-align: top; width: 725px; border: 0px solid red; }
|
||||
|
||||
.messagelink { border-bottom: 1px solid gray; color: #850505; }
|
||||
.messagelink.spam { border-bottom: 1px solid gray; color: #aaa; }
|
||||
@ -125,7 +127,6 @@
|
||||
.advselect2 { width: 205px; font: bold 12px Arial, sans-serif; padding: 0; margin:0;}
|
||||
.ruleselect { width: 40px; font: bold 12px Arial, sans-serif; padding: 0; margin:0;}
|
||||
|
||||
/*button { margin-left: 0px; background-color:gray; border-top:1px solid gray; border-left:1px solid gray; font: bold 12px Arial, sans-serif; border-left: yellow; border-right: black; width:50%;}*/
|
||||
button { margin: 0; background-color:gray; font: bold 12px Arial, sans-serif; width:40%; height: 40px; margin-left: 5%; margin-right: 5%; }
|
||||
button.active { background-color: #850505; color:white; }
|
||||
|
||||
@ -136,6 +137,8 @@
|
||||
input[type=button].load { margin: 0; background-color:#eee; color: black; font: bold 12px Arial, sans-serif; width: 17%;}
|
||||
|
||||
input[type=button].short { margin: 0; background-color:#eee; color: gray; font: bold 12px Arial, sans-serif; width: 50px;}
|
||||
input[type=button].tag { margin: 0; background-color:#eee; color: gray; font: normal 10px Arial, sans-serif; }
|
||||
|
||||
input[type=checkbox].attachmenttype { margin: 0; vertical-align: middle; }
|
||||
|
||||
#messagepopup { margin: 10px 20px 10px 20px; padding: 0; background-color: white; text-align: left; }
|
||||
@ -158,8 +161,8 @@
|
||||
ul.dropdown { position: relative; }
|
||||
ul.dropdown li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding-right: 40px; padding-left: 40px; border: 0px solid red; }
|
||||
ul.dropdown li.first_li { font-weight: bold; float: left; background: #ffffff; text-align: left; padding-left:80px; padding-right: 5px; }
|
||||
ul.dropdown li.search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; }
|
||||
ul.dropdown li.no_search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 5px; }
|
||||
ul.dropdown li.search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 0px; }
|
||||
ul.dropdown li.no_search_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; padding-right: 0px; }
|
||||
ul.dropdown li.center_li { font-weight: bold; float: left; background: #ffffff; text-align: center; padding: 0; width: 190px; }
|
||||
ul.dropdown li.last_li { font-weight: bold; float: left; background: #ffffff; text-align: right; padding: 0; }
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<div class="mcell" style="width: 315px;">
|
||||
|
||||
<ul class="dropdown">
|
||||
<li class="search_li"><a href="search.php"<?php if($_SERVER['REQUEST_URI'] == '/' || strstr($_SERVER['REQUEST_URI'], "search.php")){ ?> id="active"<?php } ?>><?php print $text_simple_search; ?></a></li>
|
||||
<li class="search_li"><a href="search.php"<?php if($_SERVER['REQUEST_URI'] == '/' || strstr($_SERVER['REQUEST_URI'], "search.php")){ ?> id="active"<?php } ?>><?php print $text_simple_search; ?></a> | </li>
|
||||
<li class="search_li"><a href="advanced.php"<?php if(strstr($_SERVER['REQUEST_URI'], "advanced.php")){ ?> id="active"<?php } ?>><?php print $text_advanced_search; ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -15,14 +15,20 @@
|
||||
<?php if($next_page <= $total_pages){ ?><a href="#" class="navlink" onclick="script:load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), <?php print $next_page; ?>); return false;">> </a> <?php } else { ?><span class="navlink">> </span><?php } ?>
|
||||
<?php if($page < $total_pages) { ?> <a href="#" class="navlink" onclick="script:load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), <?php print $total_pages; ?>); return false;"> >> </a><?php } else { ?> <span class="navlink"> >></span><?php } ?>
|
||||
</div>
|
||||
<?php } if($n > 0){ ?>
|
||||
<div id="tagbox"<?php if($n < $page_len) { ?> style="margin-left: 265px;"<?php } ?>>
|
||||
<input type="hidden" id="tag_keys" name="tag_keys" value="<?php print $all_ids; ?>" />
|
||||
<input type="hidden" id="_ref" name="_ref" value="<?php print $_ref; ?>" />
|
||||
|
||||
Tag search results: <input type="text" id="tag_value" name="tag_value" class="tagtext" /> <input type="button" class="tag" onclick="javascript: tag_search_results('<?php print SEARCH_TAG_URL; ?>'); var __ref = document.getElementById('_ref').value; if(__ref) { add_message_reference_to_form(__ref); } load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), 0); return false;" value="OK" />
|
||||
</div>
|
||||
|
||||
<?php } else { ?> <?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="resultscontainer"<?php if($n <= 0) { ?> class="empty"<?php } ?>>
|
||||
|
||||
<div id="results">
|
||||
@ -65,14 +71,14 @@
|
||||
|
||||
<?php $i=0; foreach ($messages as $message) { $i++; ?>
|
||||
|
||||
<div class="resultrow<?php if($i % 2) { ?> odd<?php } ?><?php if($message['spam'] == 1) { ?> spam<?php } ?>">
|
||||
<div id="e_<?php print $message['id']; ?>" class="resultrow<?php if($i % 2) { ?> odd<?php } ?><?php if($message['spam'] == 1) { ?> spam<?php } ?>">
|
||||
<div class="cell5 id"><?php print ($page*$page_len) + $i; ?>.</div>
|
||||
<div class="cell5 date"><?php print $message['date']; ?></div>
|
||||
<div class="cell5 from"><?php if($message['from'] != $message['shortfrom']) { ?><span onmouseover="Tip('<?php print preg_replace("/&/", "&", $message['from']); ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()"><?php print $message['shortfrom']; ?></span><?php } else { print $message['from']; } ?></div>
|
||||
<div class="cell5 subject"><a class="messagelink<?php if($message['spam'] == 1) { ?> spam<?php } ?>" href="<?php print SITE_URL; ?>message.php/<?php print $message['piler_id']; ?>"><?php if($message['subject'] != $message['shortsubject']) { ?><span onmouseover="Tip('<?php print preg_replace("/&/", "&", $message['subject']); ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()"><?php print $message['shortsubject']; ?></span><?php } else { print $message['subject']; } ?></a><?php if($message['reference']) { ?> <a href="#" onclick="script:add_message_reference_to_form('<?php print $message['reference']; ?>'); load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), 0); a = document.getElementById('ref'); a.value=''; return false;"><span onmouseover="Tip('<?php print $text_conversation_available; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()">[+]</span></a><?php } ?></div>
|
||||
<div class="cell5 from"><?php if($message['from'] != $message['shortfrom']) { ?><span onmouseover="Tip('<?php print preg_replace("/&/", "&", $message['from']); ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip();"><?php print $message['shortfrom']; ?></span><?php } else { print $message['from']; } ?></div>
|
||||
<div class="cell5 subject"><a class="messagelink<?php if($message['spam'] == 1) { ?> spam<?php } ?>" href="<?php print SITE_URL; ?>message.php/<?php print $message['piler_id']; ?>"><?php if($message['subject'] != $message['shortsubject']) { ?><span onmouseover="Tip('<?php print preg_replace("/&/", "&", $message['subject']); ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip();"><?php print $message['shortsubject']; ?></span><?php } else { print $message['subject']; } ?></a><?php if($message['reference']) { ?> <a href="#" onclick="script:add_message_reference_to_form('<?php print $message['reference']; ?>'); load_search_results('<?php print SEARCH_HELPER_URL; ?>', assemble_search_term(count), 0); a = document.getElementById('ref'); a.value=''; return false;"><span onmouseover="Tip('<?php print $text_conversation_available; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip();">[+]</span></a><?php } ?></div>
|
||||
<div class="cell5 size"><?php print $message['size']; ?></div>
|
||||
<div class="cell5"><?php if($message['attachments'] > 0) { ?><img src="<?php print ICON_ATTACHMENT; ?>" alt="" width="16" height="18" /><?php } else { ?> <?php } ?></div>
|
||||
<div class="cell5"><?php if($message['tag']) { ?><span onmouseover="Tip('<?php print $message['tag']; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip()"><img src="<?php print ICON_TAG; ?>" alt="" /></span><?php } else { ?> <?php } ?></div>
|
||||
<div class="cell5"><?php if($message['tag']) { ?><span onmouseover="Tip('<?php print $message['tag']; ?>', BALLOON, true, ABOVE, true)" onmouseout="UnTip();"><img src="<?php print ICON_TAG; ?>" alt="" /></span><?php } else { ?> <?php } ?></div>
|
||||
<?php if(ENABLE_ON_THE_FLY_VERIFICATION == 1) { ?>
|
||||
<div class="cell5 verification"><img src="<?php if($message['verification'] == 1){ print ICON_GREEN_OK; } else { print ICON_RED_X; } ?>" alt="verification status" /></div>
|
||||
<?php } ?>
|
||||
|
1
webui/view/theme/default/templates/search/tag.tpl
Normal file
1
webui/view/theme/default/templates/search/tag.tpl
Normal file
@ -0,0 +1 @@
|
||||
<p><?php print $message; ?></p>
|
Reference in New Issue
Block a user