├── .gitignore ├── README.md ├── advanced_search.js ├── advanced_search.php ├── composer.json ├── config.inc.php.dist ├── localization ├── ar.inc ├── de_DE.inc ├── en_US.inc ├── es_ES.inc ├── fr_FR.inc ├── it_IT.inc ├── nl_NL.inc ├── pl_PL.inc └── ru_RU.inc └── skins ├── autumn-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── black-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── blue-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── classic └── advanced_search.css ├── elastic ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── green-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── grey-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── pink-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── plata-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── summer-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg ├── teal-larry ├── advanced_search.css └── images │ ├── icon-loupe.png │ ├── menu_location_a.jpg │ ├── menu_location_b.jpg │ ├── show_mbox_col.jpg │ └── show_mbox_row.jpg └── violet-larry ├── advanced_search.css └── images ├── icon-loupe.png ├── menu_location_a.jpg ├── menu_location_b.jpg ├── show_mbox_col.jpg └── show_mbox_row.jpg /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | config.inc.php 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Advanced Search Plugin for Roundcube 2 | 3 | ## Installation Instructions 4 | 5 | ### Composer 6 | In the root of your Roundcube root directory using a terminal, type `composer require texxasrulez/advanced_searh` and it will automatically install. 7 | 8 | ### FTP 9 | Download latest release from Github and upload via FTP to /roundcube_root/plugins/advanced_search. 10 | Add to Roundcube main config.inc.php in plugin array 11 | 12 | ### GIT 13 | * Clone the GitHub repository to 'advanced_search': 14 | 15 | > git clone git://github.com/texxasrulez/roundcube-advanced-search.git advanced_search 16 | 17 | * Change to the 'stable' branch: 18 | 19 | > cd advanced_search 20 | > git checkout -b stable origin/stable 21 | 22 | ## Install 23 | 24 | * Place the 'advanced_search' plugin folder into the plugins directory of Roundcube. 25 | * If using git and not wanting all the '.git' repository data in your live webmail: 26 | 27 | > cd advanced_search 28 | > git archive --format=tar --prefix=advanced_search/ stable | tar -x -C /path/to/roundcube/plugins/ 29 | 30 | This will give you a git-free copy of the stable branch. 31 | * Add advanced_search to $rcmail_config['plugins'] in your Roundcube config 32 | 33 | * To override defaults, copy the config-default.inc.php file to config.inc.php and modify 34 | 35 | ## Configuration 36 | 37 | * Available search criterias 38 | * Targeted roundcube menu for the advanced search 39 | 40 | :moneybag: **Donations** :moneybag: 41 | 42 | If you use this plugin and would like to show your appreciation by buying me a cup of coffee, I surely would appreciate it. A regular cup of Joe is sufficient, but a Starbucks Coffee would be better ... \ 43 | Zelle (Zelle is integrated within many major banks Mobile Apps by default) - Just send to texxasrulez at yahoo dot com \ 44 | No Zelle in your banks mobile app, no problem, just click [Paypal](https://paypal.me/texxasrulez?locale.x=en_US) and I can make a Starbucks run ... 45 | 46 | I forked this long since updated plugin that I personally love and will try to keep it alive. 47 | 48 | Thanks and enjoy! 49 | 50 | ## Credits 51 | 52 | * Wilwert Claude 53 | * Ludovicy Steve 54 | * Moules Chris 55 | * [Global Media Systems](http://www.gms.lu) 56 | * Gene Hawkins 57 | -------------------------------------------------------------------------------- /advanced_search.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | /** 3 | * The fontend scripts for an advanced search. 4 | * 5 | * @version 2.1.7 6 | * @licence GNU GPLv3+ 7 | * @author Wilwert Claude 8 | * @author Ludovicy Steve 9 | * @author Chris Moules 10 | * @website http://www.gms.lu 11 | * @author Gene Hawkins 12 | * @website https://www.genesworld.net 13 | */ 14 | 15 | $.stack = { 16 | /** 17 | * This object is used to buffer all the server side information which doesn't change. So the script 18 | * doesn't have to send an ajax-request for every new added row. 19 | * 20 | * @name stack 21 | * @namespace 22 | */ 23 | date_criteria: {}, 24 | flag_criteria: {}, 25 | email_criteria: {}, 26 | row: null, 27 | messages: null 28 | }; 29 | 30 | var search_loading = ''; 31 | 32 | $(document).on("change", "#button_display_option", function(e) { 33 | var img = $('img', $(this).closest('p')); 34 | var src = img.attr('src'); 35 | if(this.value == 'messagemenu') { 36 | src = src.replace('menu_location_b.jpg', 'menu_location_a.jpg'); 37 | } else { 38 | src = src.replace('menu_location_a.jpg', 'menu_location_b.jpg'); 39 | } 40 | img.attr('src', src); 41 | }); 42 | 43 | $(document).on("change", "#_show_message_mbox_info, #_show_message_label_header", function(e) { 44 | var img = $('img', $(this).closest('p')); 45 | if($(this).is(':checked')) { 46 | img.removeClass('disabled'); 47 | } else { 48 | img.addClass('disabled'); 49 | } 50 | }); 51 | 52 | /** 53 | * The callback function of the initial dialog call. It creates the dialog and buffers the serverside 54 | * informations into an object. 55 | * 56 | * @param {object} r The serverside informations 57 | */ 58 | rcmail.addEventListener('plugin.show', function(r) { 59 | $.stack.date_criteria = r.date_criteria; 60 | $.stack.flag_criteria = r.flag_criteria; 61 | $.stack.email_criteria = r.email_criteria; 62 | $.stack.row = r.row; 63 | $.stack.html = r.html; 64 | 65 | var saved_searches_label = rcmail.gettext('saved_searches', 'advanced_search'); 66 | var saved_searches = ' '; 76 | $.stack.saved_searches = saved_searches; 77 | var $html = $("
" + saved_searches + r.html + "
"); 78 | saved_searches_select = $('[name=select_saved_search]', $html); 79 | $html.dialog({ 80 | width: 640, 81 | resizable: true, 82 | draggable: true, 83 | title: title, 84 | dialogClass: "advanced_search_dialog", 85 | close: function() { 86 | $('body').css('overflow', 'auto'); 87 | }, 88 | create: function() { 89 | $('body').css('overflow', 'hidden'); 90 | } 91 | }); 92 | 93 | saved_searches_select.bind("blur click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select", function(e) { 94 | e.stopPropagation(); 95 | }); 96 | 97 | saved_searches_select.bind("mouseenter", function(e) { 98 | saved_searches_select.focus(); 99 | }); 100 | 101 | saved_searches_select.bind('change', function(e) { 102 | var search_name = $(this).val(); 103 | if (search_name == "") { 104 | $('#adsearch-popup').html($.stack.html); 105 | } else { 106 | rcmail.http_request('plugin.get_saved_search', { search_name : search_name }); 107 | $('[name=delete]', '#adsearch-popup').show(); 108 | } 109 | }); 110 | 111 | }); 112 | 113 | rcmail.addEventListener('plugin.load_saved_search', function(search) { 114 | var $form = $("#adsearch-popup form"), 115 | $tr = $('tr', $('tbody', $form)).not(':first').not(':last'), 116 | $last = $('tr:last', $('tbody', $form)); 117 | saved_search = search.search, 118 | data = []; 119 | $tr.remove(); 120 | $("[name=folder]", $form).val(search.folder); 121 | $("[name=subfolder]", $form).prop('checked', search.sub_folders == "true"); 122 | $('span.sub-folders', $form).css('display', search.folder == 'all' ? 'none' : 'inline'); 123 | 124 | var i = 0; 125 | for (i; i < saved_search.length; i++) { 126 | var row; 127 | if (i == 0) { 128 | row = $('' + $("tr:eq(1)", $.stack.html).html() + ''); 129 | } else { 130 | row = $($.stack.row); 131 | } 132 | $("[name=method]", row).val(saved_search[i].method); 133 | $("[name=filter]", row).val(saved_search[i].filter); 134 | $("[name=not]", row).prop('checked', saved_search[i]['not'] == "true"); 135 | $("[name=filter-exclude]", row).prop('checked', saved_search[i]['excluded'] == "true"); 136 | $last.before(row); 137 | $("[name=filter]", row).trigger("change"); 138 | $("[name=filter-val]", row).val(saved_search[i]['filter-val']); 139 | } 140 | }); 141 | //messagelistcontainer table thead 142 | rcmail.addEventListener('plugin.advanced_search_add_header', function(evt) { 143 | if($("#messagelistcontainer #rcavbox1").length == 0) { 144 | var Mbox = rcmail.gettext('mbox', 'advanced_search'); 145 | $("#messagelistcontainer table.fixedcopy thead tr:first").append('' + Mbox + ''); 146 | $("#messagelistcontainer table#messagelist thead tr:first").append('' + Mbox + ''); 147 | } 148 | }); 149 | 150 | rcmail.addEventListener('plugin.advanced_search_del_header', function(evt) { 151 | $("#messagelistcontainer #rcavbox1").remove(); 152 | $("#messagelistcontainer #rcavbox2").remove(); 153 | }); 154 | 155 | rcube_webmail.prototype.advanced_search_add_mbox = function (mbox, count, showMbox) { 156 | if (!this.gui_objects.messagelist || !this.message_list) { 157 | return false; 158 | } 159 | 160 | var colspan = showMbox == true ? 9 : 8; 161 | $(rcmail.message_list.list).append('' + count + '' + mbox + ''); 162 | } 163 | 164 | rcube_webmail.prototype.advanced_search_active = function(param) { 165 | var page = param.replace('_page=', ''); 166 | rcmail.http_request('plugin.trigger_search_pagination', { _page : page }); 167 | } 168 | 169 | /** 170 | * Builds the search to send to the server 171 | */ 172 | var get_search_data = function() 173 | { 174 | var $form = $("#adsearch-popup form"), 175 | $tr = $('tr', $('tbody', $form)).not(':first').not(':last'), 176 | data = []; 177 | 178 | if ($tr.length) { 179 | $tr.each(function() { 180 | var item = {not: $('input[name=not]', $(this)).prop('checked'), 181 | excluded: $('input[name=filter-exclude]', $(this)).prop('checked'), 182 | filter: $('option:selected', $('select[name=filter]', $(this))).val(), 183 | 'filter-val': $('input[name=filter-val]', $(this)).val()}; 184 | 185 | if ($('select[name=method]', $(this)).length) { 186 | item.method = $('option:selected', $('select[name=method]', $(this))).val(); 187 | } 188 | 189 | data.push(item); 190 | }); 191 | } 192 | 193 | return data; 194 | } 195 | 196 | /** 197 | * The onclick event handler for the search button. This generates the search query and sends them 198 | * to the server. It also stores the wrapped set of the old rows into an object for later cleanup. 199 | * 200 | * @param {object} e The event element 201 | */ 202 | $(document).on("click", 'input[name=search]', function(e) { 203 | e.preventDefault(); 204 | 205 | rcmail.clear_message_list(); 206 | 207 | $.stack.messages = $('tr', $('tbody', '#messagelist')); 208 | 209 | var $form = $("#adsearch-popup form"); 210 | search_loading = rcmail.set_busy(true, 'loading'); 211 | rcmail.http_request('plugin.trigger_search', 212 | {search: get_search_data(), 213 | current_folder: rcmail.env.mailbox, 214 | folder: $('select[name=folder]', $form).val(), 215 | sub_folders: $('input[name=subfolder]', $form).prop('checked')}); 216 | 217 | $("#adsearch-popup").closest('div.ui-dialog-content').dialog('close'); 218 | }); 219 | 220 | /** 221 | * The onclick event handler of the "reset search" button, which resets the advanced search 222 | * back to its initial state. 223 | * 224 | * @param {object} e The event element 225 | */ 226 | $(document).on("click", 'input[name=reset]', function(e) { 227 | e.preventDefault(); 228 | $('#adsearch-popup').html($.stack.html); 229 | $('[name=select_saved_search]').val(""); 230 | }); 231 | 232 | /** 233 | * The onclick event handler for the "add" button. This adds one new row to the query dialog 234 | * 235 | * @param {object} e The event element 236 | */ 237 | $(document).on("click", 'button[name=add]', function(e) { 238 | e.preventDefault(); 239 | 240 | $(this).closest('tr').after($.stack.row); 241 | }); 242 | 243 | /** 244 | * The onclick event handler for the "delete" button. This removes the containing row from 245 | * the query dialog 246 | * 247 | * @param {object} e The event element 248 | */ 249 | $(document).on("click", 'button[name=delete]', function(e) { 250 | e.preventDefault(); 251 | 252 | $(this).closest('tr').remove(); 253 | }); 254 | 255 | /** 256 | * The change event handler for the filter selector. 257 | * Make the input field context relevent. 258 | * 259 | * @param {object} e The event element 260 | */ 261 | $(document).on("click", 'select[name=filter]', function(e) { 262 | var $row_input = $(this).nextUntil('tr', 'input[name=filter-val]'), 263 | old_avs_type = $row_input.data("avs_type"); 264 | 265 | if ($.inArray($(this).val(), $.stack.date_criteria) >= 0) { 266 | if(old_avs_type !== "date") { 267 | $row_input.val(''); 268 | $row_input.datepicker({dateFormat: rcmail.env.date_format}); 269 | } 270 | 271 | $row_input.data("avs_type", "date"); 272 | } else if ($.inArray($(this).val(), $.stack.email_criteria) >= 0) { 273 | if(old_avs_type !== "email") { 274 | rcmail.init_address_input_events($row_input, ""); 275 | rcmail.addEventListener('autocomplete_insert', function(e){ 276 | e.field.value = e.insert.replace(/.*<(\S*?@\S*?)>.*/, "$1"); 277 | }); 278 | } 279 | 280 | $row_input.data("avs_type", "email"); 281 | } else if ($.inArray($(this).val(), $.stack.flag_criteria) >= 0) { 282 | if (old_avs_type !== "flag_criteria") { 283 | $row_input.val(''); 284 | $row_input.hide(); 285 | } 286 | 287 | $row_input.data("avs_type", "flag_criteria"); 288 | } else { 289 | $row_input.data("avs_type", "none"); 290 | } 291 | 292 | switch (old_avs_type) { 293 | case "date": 294 | if (($row_input.data("avs_type") !== "date") && $row_input.hasClass("hasDatepicker")) { 295 | $row_input.datepicker("destroy"); 296 | } 297 | break; 298 | case "email": 299 | if (($row_input.data("avs_type") !== "email")) { 300 | $row_input.removeAttr("autocomplete"); 301 | $row_input.unbind('keydown'); 302 | $row_input.unbind('keypress'); 303 | } 304 | break; 305 | case "flag_criteria": 306 | if (($row_input.data("avs_type") !== "flag_criteria") && !$row_input.is(":visible")) { 307 | $row_input.show(); 308 | } 309 | break; 310 | } 311 | }); 312 | 313 | /** 314 | * The change event handler for the folder select box. It makes the subfolder checkbox invisible 315 | * when selecting the "all folders" option 316 | * 317 | * @param {object} e The event element 318 | */ 319 | $(document).on("click", 'select[name=folder]', function(e) { 320 | $('span.sub-folders', $(this).closest('form')).css('display', $(this).val() == 'all' ? 'none' : 'inline'); 321 | }); 322 | 323 | /** 324 | * The onclick event handler for the menu entry of the advanced search. This makes the initial call 325 | * of the advanced search and fires a query to the server to get every important information. 326 | * 327 | * @param {object} e The event element 328 | */ 329 | $(document).on("click", 'a.icon.advanced_search, a.button.advanced_search', function(e) { 330 | e.preventDefault(); 331 | 332 | if (!$('#adsearch-popup').length) { 333 | rcmail.http_request('plugin.display_advanced_search'); 334 | } else { 335 | $("#adsearch-popup").closest('div.ui-dialog-content').dialog('open'); 336 | } 337 | }); 338 | 339 | /** 340 | * Stop propagation of keydown and keypress events. 341 | * This should stop these events being processed by other listeners in the mailbox. 342 | * 343 | * @param {object} e The event element 344 | */ 345 | $(document).on("keydown keypress", "#adsearch-popup", function(e) { 346 | e.stopPropagation(); 347 | }); 348 | 349 | $(document).on("click", "#adsearch-popup input.delete_search", function(e) { 350 | e.stopPropagation(); 351 | e.preventDefault(); 352 | var search_name = $("[name=select_saved_search]").val(); 353 | var txt = {}; 354 | txt['cancel'] = rcmail.get_label('advanced_search.cancel'); 355 | txt['delete'] = rcmail.get_label('advanced_search.delete'); 356 | $( "

" + search_name + "

" ).dialog({ 357 | resizable: true, 358 | modal: true, 359 | title: rcmail.gettext('advanced_search.deletesearch'), 360 | buttons: [ 361 | { 362 | text: txt['delete'], 363 | click: function() { 364 | rcmail.http_request('plugin.delete_search', {search_name: search_name}); 365 | $("[value=" + search_name + "]", "[name=select_saved_search]").remove(); 366 | $("[name=select_saved_search]").val("").trigger("change"); 367 | $( this ).dialog( "close" ); 368 | }, 369 | }, 370 | { 371 | text: txt['cancel'], 372 | click: function() { 373 | $( this ).dialog( "close" ); 374 | } 375 | }] 376 | 377 | }); 378 | }); 379 | 380 | $(document).on("click", "#save_the_search", function(e) { 381 | e.stopPropagation(); 382 | e.preventDefault(); 383 | var labelName = rcmail.gettext('name', 'advanced_search'); 384 | var labelSave = rcmail.gettext('save', 'advanced_search'); 385 | var labelCancel = rcmail.gettext('cancel', 'advanced_search'); 386 | var save_search = '' 387 | + ' ' 388 | + ' ' 389 | + '
' + labelName + '
'; 390 | save_search = $(save_search); 391 | $("[name=search_name]", save_search).val($("[name=select_saved_search]").val()); 392 | 393 | save_search.dialog({ 394 | title: rcmail.gettext('advanced_search.save_the_search'), 395 | dialogClass: 'saveTheSearch', 396 | close: function() { 397 | $(this).remove(); 398 | }, 399 | width: $("#adsearch-popup").width(), 400 | height: $("#adsearch-popup").height(), 401 | modal: true 402 | }); 403 | $(".mainaction", save_search).bind('click', function(e) { 404 | e.preventDefault(); 405 | e.stopPropagation(); 406 | var search_name = $("[name=search_name]", save_search).val(); 407 | var $form = $("#adsearch-popup form"); 408 | rcmail.http_request('plugin.save_search', 409 | {search: get_search_data(), 410 | search_name: search_name, 411 | folder: $('select[name=folder]', $form).val(), 412 | sub_folders: $('input[name=subfolder]', $form).prop('checked')}); 413 | var isNewSearch = true; 414 | $("[name=select_saved_search] option").each(function(e) { 415 | if ($(this).attr("value") == search_name) { 416 | isNewSearch = false; 417 | } 418 | }); 419 | if (isNewSearch) { 420 | $("[name=select_saved_search]").append(''); 421 | $("[name=select_saved_search]").val(search_name); 422 | } 423 | save_search.dialog('close'); 424 | }); 425 | 426 | $(".reset", save_search).bind('click', function(e) { 427 | e.preventDefault(); 428 | e.stopPropagation(); 429 | save_search.dialog('close'); 430 | }); 431 | 432 | }); 433 | 434 | var advanced_search_redirect_draft_messages = function(check) { 435 | if (rcmail.env.search_request == "advanced_search_active") { 436 | if (rcmail.task == 'mail') { 437 | uid = rcmail.get_single_uid(); 438 | if (uid && (!rcmail.env.uid || uid != rcmail.env.uid || check)) { 439 | if ((rcmail.env.mailbox == rcmail.env.drafts_mailbox) || check) { 440 | url = { 441 | _mbox: this.env.mailbox, 442 | _search: 'advanced_search_active' 443 | }; 444 | url[this.env.mailbox == this.env.drafts_mailbox ? '_draft_uid' : '_uid'] = uid; 445 | this.goto_url('compose', url, true); 446 | } 447 | } 448 | } 449 | return true; 450 | } 451 | return false; 452 | } 453 | 454 | var advanced_search_perform_action = function(props, action) { 455 | 456 | var raw_selection = rcmail.message_list.get_selection(); 457 | var md5_folders = rcmail.env.as_md5_folders; 458 | var i; 459 | var selections = {}; 460 | for (i in raw_selection) { 461 | raw_selection[i]; 462 | var parts = raw_selection[i].split('__MB__'); 463 | var mid = parts[0]; 464 | var md5Mbox = parts[1]; 465 | var mbox = md5_folders[md5Mbox]; 466 | if (!selections[mbox]) { 467 | selections[mbox] = []; 468 | } 469 | selections[mbox].push(mid); 470 | } 471 | 472 | if (i != undefined) { 473 | // show wait message 474 | if (rcmail.env.action == 'show') { 475 | lock = rcmail.set_busy(true, 'movingmessage'); 476 | } else { 477 | rcmail.show_contentframe(false); 478 | } 479 | // Hide message command buttons until a message is selected 480 | rcmail.enable_command(rcmail.env.message_commands, false); 481 | var j; 482 | for (j in selections) { 483 | rcmail.select_folder(j, '', true); 484 | rcmail.env.mailbox = j; 485 | var uids = selections[j].join(','); 486 | var lock = false, 487 | post_data = rcmail.selection_post_data({ 488 | _target_mbox: props.id, 489 | _uid: uids 490 | }); 491 | rcmail._with_selected_messages(action, post_data, lock); 492 | } 493 | // Make sure we have no selection 494 | rcmail.env.uid = undefined; 495 | rcmail.message_list.selection = []; 496 | } 497 | 498 | } 499 | 500 | var advanced_search_check_multi_mbox = function () { 501 | var raw_selection = rcmail.message_list.get_selection(); 502 | var md5_folders = rcmail.env.as_md5_folders; 503 | var i; 504 | var mcount = 0; 505 | var selections = {}; 506 | for (i in raw_selection) { 507 | raw_selection[i]; 508 | var parts = raw_selection[i].split('__MB__'); 509 | var mid = parts[0]; 510 | var md5Mbox = parts[1]; 511 | var mbox = md5_folders[md5Mbox]; 512 | if (!selections[mbox]) { 513 | selections[mbox] = []; 514 | mcount++; 515 | } 516 | selections[mbox].push(mid); 517 | } 518 | 519 | return { 520 | isMulti: mcount > 1, 521 | selections: selections 522 | }; 523 | } 524 | 525 | /** 526 | * The roundcube init funtion, which registers and enables the advanced search command. 527 | */ 528 | rcmail.addEventListener('init', function() { 529 | rcmail.register_command('plugin.advanced_search', true, true); 530 | rcmail.enable_command('plugin.advanced_search', true); 531 | 532 | rcmail.addEventListener('plugin.search_complete', function(r) { 533 | rcmail.set_busy(false, 'loading', search_loading); 534 | /* Start registering event listeners for handling drag/drop, marking, flagging etc... */ 535 | rcmail.addEventListener('beforeedit', function (command) { 536 | rcmail.env.framed = true; 537 | if (advanced_search_redirect_draft_messages(true)) { 538 | return false; 539 | } 540 | }); 541 | 542 | rcmail.message_list.addEventListener('dblclick', function (o) { 543 | advanced_search_redirect_draft_messages(); 544 | }); 545 | 546 | rcmail.message_list.addEventListener('select', function (list) { 547 | if (rcmail.env.search_request == "advanced_search_active") { 548 | if (list.selection.length == 1) { 549 | var parts = list.selection[0].split('__MB__'); 550 | var mid = parts[0]; 551 | var md5Mbox = parts[1]; 552 | var mbox = rcmail.env.as_md5_folders[md5Mbox]; 553 | rcmail.env.uid = mid; 554 | if (rcmail.env.mailbox != mbox) { 555 | var ex = []; 556 | li = rcmail.get_folder_li(mbox, '', true); 557 | parent = $(li).parents(".mailbox"); 558 | parent.each(function () { 559 | div = $(this.getElementsByTagName('div')[0]); 560 | a = $(this.getElementsByTagName('a')[0]); 561 | if (div.hasClass('collapsed')) { 562 | ex.push($(a).attr("rel")); 563 | } 564 | }); 565 | for (var i = ex.length - 1; i >= 0; i--) { 566 | rcmail.command('collapse-folder', ex[i]); 567 | } 568 | rcmail.select_folder(mbox, '', true); 569 | rcmail.env.mailbox = mbox; 570 | } 571 | return false; 572 | } 573 | } 574 | }); 575 | 576 | rcmail.addEventListener('beforemoveto', function (props) { 577 | if (rcmail.env.search_request == 'advanced_search_active') { 578 | advanced_search_perform_action(props, 'moveto'); 579 | 580 | return false; 581 | } 582 | }); 583 | 584 | rcmail.addEventListener('beforedelete', function (props) { 585 | if (rcmail.env.search_request == 'advanced_search_active') { 586 | advanced_search_perform_action(props, 'delete'); 587 | 588 | return false; 589 | } 590 | }); 591 | 592 | rcmail.addEventListener('beforemark', function (flag) { 593 | if (rcmail.env.search_request == 'advanced_search_active') { 594 | var res = advanced_search_check_multi_mbox(); 595 | //Update on server 596 | var i; 597 | var sel = res.selections; 598 | for (i in sel) { 599 | var uids = sel[i].join(','); 600 | var lock = false; 601 | var post_data = { 602 | _uid: uids, 603 | _flag: flag, 604 | _mbox: i, 605 | _remote: 1 606 | }; 607 | rcmail.http_post('mark', post_data, lock); 608 | } 609 | var raw_selection = rcmail.message_list.get_selection(); 610 | for(i in raw_selection) { 611 | var key = raw_selection[i]; 612 | switch (flag) { 613 | case 'read': 614 | rcmail.message_list.rows[key].unread = 0; 615 | break; 616 | case 'unread': 617 | rcmail.message_list.rows[key].unread = 1; 618 | break; 619 | case 'flagged': 620 | rcmail.message_list.rows[key].flagged = 1; 621 | break; 622 | case 'unflagged': 623 | rcmail.message_list.rows[key].flagged = 0; 624 | break; 625 | } 626 | } 627 | //Refresh ui 628 | var messages = []; 629 | var selections = rcmail.message_list.get_selection(); 630 | var j; 631 | for (j in selections) { 632 | messages.push('#rcmrow' + selections[j]); 633 | } 634 | var selector = messages.join(', '); 635 | var selection = $(selector); 636 | switch (flag) { 637 | case 'read': 638 | selection.removeClass('unread'); 639 | break; 640 | case 'unread': 641 | selection.addClass('unread'); 642 | break; 643 | case 'flagged': 644 | selection.addClass('flagged'); 645 | $("td.flag span", selection).removeClass('unflagged').addClass('flagged'); 646 | break; 647 | case 'unflagged': 648 | selection.removeClass('flagged'); 649 | $("td.flag span", selection).removeClass('flagged').addClass('unflagged'); 650 | break; 651 | default: 652 | break; 653 | } 654 | return false; 655 | } 656 | }); 657 | 658 | rcmail.addEventListener('beforeforward', function (props) { 659 | if (rcmail.env.search_request == 'advanced_search_active' && rcmail.message_list.selection.length > 1) { 660 | var res = advanced_search_check_multi_mbox(); 661 | if (res.isMulti == true) { 662 | //Selections from more then one folder 663 | return false; 664 | } else { 665 | //Only one folder, redirecting 666 | var i, url, sel = res.selections; 667 | for (i in sel) { 668 | url = '&_forward_uid=' + sel[i].join(',') + '&_mbox=' + i; 669 | } 670 | url += '&_attachment=1&_action=compose'; 671 | window.location = location.pathname + rcmail.env.comm_path + url; 672 | 673 | return false; 674 | } 675 | } 676 | }); 677 | 678 | rcmail.addEventListener('beforeforward-attachment', function (props) { 679 | if (rcmail.env.search_request == 'advanced_search_active' && rcmail.message_list.selection.length > 1) { 680 | var res = advanced_search_check_multi_mbox(); 681 | if (res.isMulti == true) { 682 | //Selections from more then one folder 683 | return false; 684 | } else { 685 | //Only one folder, redirecting 686 | var i, url, sel = res.selections; 687 | for (i in sel) { 688 | url = '&_forward_uid=' + sel[i].join(',') + '&_mbox=' + i; 689 | } 690 | url += '&_attachment=1&_action=compose'; 691 | window.location = location.pathname + rcmail.env.comm_path + url; 692 | 693 | return false; 694 | } 695 | } 696 | }); 697 | 698 | rcmail.addEventListener('beforetoggle_flag', function (props) { 699 | if (rcmail.env.search_request == 'advanced_search_active') { 700 | var flag = $(props).hasClass('unflagged') ? 'flagged' : 'unflagged'; 701 | var tr = $(props).closest('tr'); 702 | var id = tr.attr('id').replace('rcmrow', ''); 703 | var parts = id.split('__MB__'); 704 | var lock = false; 705 | var mbox = rcmail.env.as_md5_folders[parts[1]]; 706 | var post_data = { 707 | _uid: parts[0], 708 | _flag: flag, 709 | _mbox: mbox, 710 | _remote: 1 711 | }; 712 | rcmail.http_post('mark', post_data, lock); 713 | if (flag == 'flagged') { 714 | tr.addClass('flagged'); 715 | $("td.flag span", tr).removeClass('unflagged').addClass('flagged'); 716 | rcmail.message_list.rows[id].flagged = 1; 717 | } else { 718 | tr.removeClass('flagged'); 719 | $("td.flag span", tr).removeClass('flagged').addClass('unflagged'); 720 | rcmail.message_list.rows[id].flagged = 0; 721 | } 722 | return false; 723 | } 724 | }); 725 | /* End registering event listeners */ 726 | }); 727 | 728 | }); 729 | })(jQuery); 730 | -------------------------------------------------------------------------------- /advanced_search.php: -------------------------------------------------------------------------------- 1 | rc = rcmail::get_instance(); 51 | $this->load_config("config.inc.php"); 52 | $this->load_config(); 53 | $this->config = $this->rc->config->get('advanced_search_plugin'); 54 | $this->register_action('plugin.display_advanced_search', array($this, 'display_advanced_search')); 55 | $this->register_action('plugin.trigger_search', array($this, 'trigger_search')); 56 | $this->register_action('plugin.trigger_search_pagination', array($this, 'trigger_search_pagination')); 57 | $this->register_action('plugin.save_search', array($this, 'save_search')); 58 | $this->register_action('plugin.delete_search', array($this, 'delete_search')); 59 | $this->register_action('plugin.get_saved_search', array($this, 'get_saved_search')); 60 | 61 | $this->skin = $this->rc->config->get('skin'); 62 | $this->add_texts('localization', true); 63 | $this->populate_i18n(); 64 | if(isset($this->config['criteria'])) { 65 | foreach($this->config['criteria'] as $key => $translation) { 66 | $this->config['criteria'][$key] = $this->gettext($key); 67 | } 68 | } 69 | $this->include_script('advanced_search.js'); 70 | 71 | if ($this->rc->task == 'mail') { 72 | $file = 'skins/' . $this->skin . '/advanced_search.css'; 73 | 74 | if (file_exists($this->home . '/' . $file)) { 75 | $this->include_stylesheet($file); 76 | } 77 | 78 | if (empty($this->rc->action)) { 79 | $this->add_menu_entry(); 80 | } 81 | } elseif ($this->rc->task == 'settings') { 82 | $this->add_hook('preferences_list', array($this, 'preferences_list')); 83 | $this->add_hook('preferences_save', array($this, 'preferences_save')); 84 | $this->add_hook('preferences_sections_list', array($this, 'preferences_section')); 85 | $file = 'skins/' . $this->skin . '/advanced_search.css'; 86 | if (file_exists($this->home . '/' . $file)) { 87 | $this->include_stylesheet($file); 88 | } 89 | } 90 | 91 | $this->add_hook('startup', array($this, 'startup')); 92 | } 93 | 94 | public function startup($args) 95 | { 96 | $search = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GET); 97 | if (!isset($search)) { 98 | $search = rcube_utils::get_input_value('_search', rcube_utils::INPUT_POST); 99 | } 100 | $rsearch = $search == 'advanced_search_active'; 101 | $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_GET); 102 | $draft_uid = rcube_utils::get_input_value('_draft_uid', rcube_utils::INPUT_GET); 103 | $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GET); 104 | $page = rcube_utils::get_input_value('_page', rcube_utils::INPUT_GET); 105 | $sort = rcube_utils::get_input_value('_sort', rcube_utils::INPUT_GET); 106 | 107 | if (!empty($uid)) { 108 | $parts = explode('__MB__', $uid); 109 | if (count($parts) == 2) { 110 | $search = 'advanced_search_active'; 111 | } 112 | } 113 | 114 | if (!empty($draft_uid)) { 115 | $parts = explode('__MB__', $draft_uid); 116 | if (count($parts) == 2) { 117 | $search = 'advanced_search_active'; 118 | } 119 | } 120 | 121 | if ($search == 'advanced_search_active') { 122 | if ($args['action'] == 'show' && !empty($uid)) { 123 | $parts = explode('__MB__', $uid); 124 | $uid = $parts[0]; 125 | $this->rc->output->redirect(array('_task' => 'mail', '_action' => $args['action'], '_mbox' => $mbox, '_uid' => $uid)); 126 | } 127 | if ($args['action'] == 'compose') { 128 | $draft_uid = rcube_utils::get_input_value('_draft_uid', rcube_utils::INPUT_GET); 129 | $parts = explode('__MB__', $draft_uid); 130 | $draft_uid = $parts[0]; 131 | if (!empty($draft_uid)) { 132 | $this->rc->output->redirect(array('_task' => 'mail', '_action' => $args['action'], '_mbox' => $mbox, '_draft_uid' => $draft_uid)); 133 | } 134 | } 135 | if ($args['action'] == 'list' && $rsearch) { 136 | $this->rc->output->command('advanced_search_active', '_page=' . $page . '&_sort=' . $sort); 137 | $this->rc->output->send(); 138 | $args['abort'] = true; 139 | } 140 | if ($args['action'] == 'mark') { 141 | $flag = rcube_utils::get_input_value('_flag', rcube_utils::INPUT_POST); 142 | $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST); 143 | 144 | $post_str = '_flag=' . $flag . '&_uid=' . $uid; 145 | if ($quiet = rcube_utils::get_input_value('_quiet', rcube_utils::INPUT_POST)) { 146 | $post_str .= '&_quiet=' . $quiet; 147 | } 148 | if ($from = rcube_utils::get_input_value('_from', rcube_utils::INPUT_POST)) { 149 | $post_str .= '&_from=' . $from; 150 | } 151 | if ($count = rcube_utils::get_input_value('_count', rcube_utils::INPUT_POST)) { 152 | $post_str .= '&_count=' . $count; 153 | } 154 | if ($ruid = rcube_utils::get_input_value('_ruid', rcube_utils::INPUT_POST)) { 155 | $post_str .= '&_ruid=' . $ruid; 156 | } 157 | $this->rc->output->command('label_mark', $post_str); 158 | $this->rc->output->send(); 159 | $args['abort'] = true; 160 | } 161 | 162 | } else { 163 | if ($args['action'] != 'plugin.get_saved_search' && $args['action'] != 'plugin.save_search' && $args['action'] != 'plugin.delete_search') { 164 | $this->rc->output->command('plugin.advanced_search_del_header', array()); 165 | } 166 | } 167 | } 168 | 169 | /** 170 | * This function populates an array with localization texts. 171 | * This is needed as ew are using a lot of localizations from core. 172 | * The core localizations are not avalable directly in JS 173 | * 174 | * @access private 175 | * @return null 176 | */ 177 | private function populate_i18n() 178 | { 179 | $core = array('advsearch', 'search', 'resetsearch', 'addfield', 'delete', 'cancel'); 180 | 181 | foreach ($core as $label) { 182 | $this->i18n_strings[$label] = $this->rc->gettext($label); 183 | } 184 | 185 | $local = array('in', 'and', 'or', 'not', 'where', 'exclude', 'andsubfolders', 'allfolders', 'save_the_search', 'has_been_saved', 'deletesearch', 'has_been_deleted'); 186 | 187 | foreach ($local as $label) { 188 | $this->i18n_strings[$label] = $this->gettext($label); 189 | } 190 | } 191 | 192 | /** 193 | * This adds a button into the configured menu to use the advanced search 194 | * 195 | * @access public 196 | * @return null 197 | */ 198 | public function add_menu_entry() 199 | { 200 | $displayOptions = $this->rc->config->get('advanced_search_display_options', array()); 201 | $target_menu = (isset($displayOptions['target_menu']) && !empty($displayOptions['target_menu'])) ? $displayOptions['target_menu'] : $this->config['target_menu']; 202 | if ($target_menu != 'toolbar') { 203 | $this->api->add_content( 204 | html::tag( 205 | 'li', 206 | null, 207 | $this->api->output->button( 208 | array( 209 | 'command' => 'plugin.advanced_search', 210 | 'label' => 'advsearch', 211 | 'type' => 'link', 212 | 'classact' => 'icon advanced_search active', 213 | 'class' => 'icon advanced_search', 214 | 'innerclass' => 'icon advanced_search' 215 | ) 216 | ) 217 | ), 218 | $target_menu 219 | ); 220 | } else { 221 | $this->api->add_content( 222 | $this->api->output->button( 223 | array( 224 | 'command' => 'plugin.advanced_search', 225 | 'label' => 'search', 226 | 'type' => 'link', 227 | 'class' => 'button advanced_search', 228 | 'classact' => 'button advanced_search', 229 | 'classsel' => 'button advanced_search pressed', 230 | 'title' => 'advsearch', 231 | 'innerclass' => 'inner', 232 | ) 233 | ), 234 | $target_menu 235 | ); 236 | } 237 | } 238 | 239 | /** 240 | * This function quotes some specific values based on their data type 241 | * 242 | * @param mixed $input The value to get quoted 243 | * @access public 244 | * @return The quoted value 245 | */ 246 | public function quote($value) 247 | { 248 | if (getType($value) == 'string') { 249 | if (!preg_match('/"/', $value)) { 250 | $value = preg_replace('/^"/', '', $value); 251 | $value = preg_replace('/"$/', '', $value); 252 | $value = preg_replace('/"/', '\\"', $value); 253 | } 254 | 255 | $value = '"' . $value . '"'; 256 | } 257 | 258 | return $value; 259 | } 260 | 261 | /** 262 | * This function generates the IMAP compatible search query based on the request data (by javascript) 263 | * 264 | * @param array $input The raw criteria data sent by javascript 265 | * @access private 266 | * @return string or int 267 | */ 268 | private function process_search_part($search_part) 269 | { 270 | $command_str = ''; 271 | $flag = false; 272 | 273 | // Check for valid input 274 | if (!array_key_exists($search_part['filter'], $this->config['criteria'])) { 275 | $this->rc->output->show_message($this->gettext('internalerror'), 'error'); 276 | 277 | return 0; 278 | } 279 | if (in_array($search_part['filter'], $this->config['flag_criteria'])) { 280 | $flag = true; 281 | } 282 | if (!$flag && !(isset($search_part['filter-val']) && $search_part['filter-val'] != '')) { 283 | return 1; 284 | } 285 | 286 | // Negate part 287 | if ($search_part['not'] == 'true') { 288 | $command_str .= 'NOT '; 289 | } 290 | 291 | $command_str .= $search_part['filter']; 292 | 293 | if (!$flag) { 294 | if (in_array($search_part['filter'], $this->config['date_criteria'])) { 295 | // Take date format from user environment 296 | $date_format = $this->rc->config->get('date_format', 'Y-m-d'); 297 | // Try to use PHP5.2+ DateTime but fallback to ugly old method 298 | if (class_exists('DateTime')) { 299 | $date = DateTime::createFromFormat($date_format, $search_part['filter-val']); 300 | $command_str .= ' ' . $this->quote($date->format("d-M-Y")); 301 | } else { 302 | $date_format = preg_replace('/(\w)/', '%$1', $date_format); 303 | $date_array = strptime($search_part['filter-val'], $date_format); 304 | $unix_ts = mktime($date_array['tm_hour'], $date_array['tm_min'], $date_array['tm_sec'], $date_array['tm_mon']+1, $date_array['tm_mday'], $date_array['tm_year']+1900); 305 | $command_str .= ' ' . $this->quote(date("d-M-Y", $unix_ts)); 306 | } 307 | } elseif (in_array($search_part['filter'], $this->config['email_criteria'])) { 308 | // Strip possible ',' added by autocomplete 309 | $command_str .= ' ' . $this->quote(trim($search_part['filter-val'], " \t,")); 310 | } else { 311 | // Don't try to use a value for a binary flag object 312 | $command_str .= ' ' . $this->quote($search_part['filter-val']); 313 | } 314 | } 315 | 316 | return $command_str; 317 | } 318 | 319 | /** 320 | * This function generates the IMAP compatible search query based on the request data (by javascript) 321 | * 322 | * @param array $input The raw criteria data sent by javascript 323 | * @access public 324 | * @return The final search command 325 | */ 326 | public function get_search_query($input) 327 | { 328 | $command = array(); 329 | 330 | foreach ($input as $search_part) { 331 | // Skip excluded parts 332 | if ($search_part['excluded'] == 'true') { 333 | continue; 334 | } 335 | if (! $part_command = $this->process_search_part($search_part)) { 336 | return 0; 337 | } 338 | // Skip invalid parts 339 | if ($part_command === 1) { 340 | continue; 341 | } 342 | 343 | $command[] = array('method' => isset($search_part['method']) ? $search_part['method'] : 'and', 344 | 'command' => $part_command); 345 | } 346 | 347 | $command_string = $this->build_search_string($command); 348 | 349 | return $command_string; 350 | } 351 | 352 | /** 353 | * This function converts the preconfigured query parts (as array) into an IMAP compatible string 354 | * 355 | * @param array $command_array An array containing the advanced search criteria 356 | * @access public 357 | * @return The command string 358 | */ 359 | private function build_search_string($command_array) 360 | { 361 | $command = array(); 362 | $paranthesis = 0; 363 | $prev_method = null; 364 | $next_method = null; 365 | $cnt = count($command_array); 366 | 367 | foreach ($command_array as $k => $v) { 368 | $part = ''; 369 | $next_method = 'unknown'; 370 | 371 | // Lookup next method 372 | if ($k < $cnt-1) { 373 | $next_method = $command_array[$k+1]['method']; 374 | } 375 | 376 | // If previous option was OR, close any open brakets 377 | if ($paranthesis > 0 && $prev_method == 'or' && $v['method'] != 'or') { 378 | for (; $paranthesis > 0; $paranthesis--) { 379 | $part .= ')'; 380 | } 381 | } 382 | 383 | // If there are two consecutive ORs, add brakets 384 | // If the next option is a new OR, add the prefix here 385 | // If the next option is _not_ an OR, and the current option is AND, prefix ALL 386 | if ($next_method == 'or') { 387 | if ($v['method'] == 'or') { 388 | $part .= ' ('; 389 | $paranthesis++; 390 | } 391 | $part .= 'OR '; 392 | } elseif ($v['method'] == 'and') { 393 | $part .= 'ALL '; 394 | } 395 | 396 | $part .= $v['command']; 397 | 398 | // If this is the end of the query, and we have open brakets, close them 399 | if ($k == $cnt-1 && $paranthesis > 0) { 400 | for (; $paranthesis > 0; $paranthesis--) { 401 | $part .= ')'; 402 | } 403 | } 404 | 405 | $prev_method = $v['method']; 406 | $command[] = $part; 407 | } 408 | 409 | $command = implode(' ', $command); 410 | 411 | return $command; 412 | } 413 | 414 | /** 415 | * This functions sends the initial data to the client side where a form (in dialog) is built for the advanced search 416 | * 417 | * @access public 418 | * @return null 419 | */ 420 | public function display_advanced_search() 421 | { 422 | $ret = array('html' => $this->generate_searchbox(), 423 | 'row' => $this->add_row(), 424 | 'saved_searches' => $this->get_saved_search_names(), 425 | 'title' => $this->i18n_strings['advsearch'], 426 | 'date_criteria' => $this->config['date_criteria'], 427 | 'flag_criteria' => $this->config['flag_criteria'], 428 | 'email_criteria' => $this->config['email_criteria']); 429 | 430 | $this->rc->output->command('plugin.show', $ret); 431 | } 432 | 433 | public function generate_searchbox() 434 | { 435 | $search_button = new html_inputfield(array('type' => 'submit', 'name' => 'search', 'class' => 'button mainaction', 'value' => $this->i18n_strings['search'])); 436 | $reset_button = new html_inputfield(array('type' => 'reset', 'name' => 'reset', 'class' => 'button reset', 'value' => $this->i18n_strings['resetsearch'])); 437 | $save_button = html::tag('input', array('type' => 'submit', 'name' => 'save_the_search', 'id'=> 'save_the_search', 'class' => 'button save_search', 'value' => $this->i18n_strings['save_the_search'])); 438 | $delete_button = new html_inputfield(array('type' => 'submit', 'name' => 'delete', 'style' => 'display: none;', 'class' => 'button delete_search', 'value' => $this->i18n_strings['deletesearch'])); 439 | $layout_table = new html_table(); 440 | $layout_table->add(null, $search_button->show()); 441 | $folderConfig = array('name' => 'folder'); 442 | $layout_table->add( 443 | null, 444 | $this->i18n_strings['in'] . ': ' . 445 | $this->folder_selector($folderConfig)->show($this->rc->storage->get_folder()) . 446 | html::span( 447 | array('class' => 'sub-folders'), 448 | $this->i18n_strings['andsubfolders'] . ': ' . 449 | html::tag( 450 | 'input', 451 | array('type' => 'checkbox', 'name' => 'subfolder'), 452 | null 453 | ) 454 | ) . 455 | $this->i19n_strings['where'] 456 | ); 457 | $first_row = $this->add_row(true); 458 | $layout_table->add_row(); 459 | $layout_table->add(array('class' => 'adv-search-and-or'), null); 460 | $layout_table->add(null, $first_row); 461 | $layout_table->add_row(); 462 | $layout_table->add(null, $search_button->show()); 463 | $layout_table->add(null, $save_button . ' ' . $reset_button->show() . ' ' . $delete_button->show()); 464 | 465 | return html::tag( 466 | 'div', 467 | array('id' => 'adsearch-popup'), 468 | html::tag( 469 | 'form', 470 | array('method' => 'post', 'action' => '#'), 471 | $layout_table->show() 472 | ) 473 | ); 474 | } 475 | 476 | /** 477 | * This function is used to render the html of the advanced search form and also 478 | * the later following rows are created by this function 479 | * 480 | * @param array $folders Array of folders 481 | * @param boolean $first True if form gets created, False to create a new row 482 | * @access public 483 | * @return string The final html 484 | */ 485 | public function add_row($first = false) 486 | { 487 | $row_html = ''; 488 | $optgroups = ''; 489 | 490 | $criteria = $this->config['criteria']; 491 | $all_criteria = array( 492 | $this->gettext('Common') => $this->config['prefered_criteria'], 493 | $this->gettext('Addresses') => $this->config['email_criteria'], 494 | $this->gettext('Dates') => $this->config['date_criteria'], 495 | $this->gettext('Flags') => $this->config['flag_criteria'], 496 | $this->gettext('Other') => $this->config['other_criteria'], 497 | ); 498 | 499 | foreach ($all_criteria as $label => $specific_criteria) { 500 | $options = ''; 501 | 502 | foreach ($specific_criteria as $value) { 503 | $options .= html::tag('option', array('value' => $value), $criteria[$value]); 504 | } 505 | 506 | $optgroups .= html::tag('optgroup', array('label' => $label), $options); 507 | } 508 | 509 | $tmp = html::tag('select', array('name' => 'filter'), $optgroups); 510 | $tmp .= $this->i18n_strings['not'] . ':' . html::tag('input', array('type' => 'checkbox', 'name' => 'not'), null); 511 | $tmp .= html::tag('input', array('type' => 'text', 'name' => 'filter-val')); 512 | $tmp .= $this->i18n_strings['exclude'] . ':' . html::tag('input', array('type' => 'checkbox', 'name' => 'filter-exclude'), null); 513 | $tmp .= html::tag('button', array('name' => 'add', 'class' => 'add'), $this->i18n_strings['addfield']); 514 | 515 | if ($first) { 516 | $row_html = $tmp; 517 | } else { 518 | $and_or_select = new html_select(array('name' => 'method')); 519 | $and_or_select->add($this->i18n_strings['and'], 'and'); 520 | $and_or_select->add($this->i18n_strings['or'], 'or'); 521 | $tmp .= html::tag('button', array('name' => 'delete', 'class' => 'delete'), $this->i18n_strings['delete']); 522 | $row_html = html::tag( 523 | 'tr', 524 | null, 525 | html::tag( 526 | 'td', 527 | array('class' => 'adv-search-and-or'), 528 | $and_or_select->show() 529 | ) . 530 | html::tag( 531 | 'td', 532 | null, 533 | $tmp 534 | ) 535 | ); 536 | } 537 | 538 | return $row_html; 539 | } 540 | 541 | /** 542 | * Return folders list as html_select object 543 | * 544 | * This is a copy of the core function and adapted to fit 545 | * the needs of the advanced_search function 546 | * 547 | * @param array $p Named parameters 548 | * 549 | * @return html_select HTML drop-down object 550 | */ 551 | public function folder_selector($p = array()) 552 | { 553 | $p += array('maxlength' => 100, 'realnames' => false, 'is_escaped' => true); 554 | $a_mailboxes = array(); 555 | $storage = $this->rc->get_storage(); 556 | 557 | $list = $storage->list_folders_subscribed(); 558 | $delimiter = $storage->get_hierarchy_delimiter(); 559 | 560 | foreach ($list as $folder) { 561 | $this->rc->build_folder_tree($a_mailboxes, $folder, $delimiter); 562 | } 563 | 564 | $select = new html_select($p); 565 | $select->add($this->i18n_strings['allfolders'], "all"); 566 | 567 | $this->rc->render_folder_tree_select($a_mailboxes, $mbox, $p['maxlength'], $select, $p['realnames'], 0, $p); 568 | 569 | return $select; 570 | } 571 | 572 | public function trigger_search_pagination() 573 | { 574 | $_GET['search'] = $_SESSION['av_search']; 575 | $_GET['folder'] = $_SESSION['av_folder']; 576 | $_GET['sub_folders'] = $_SESSION['av_sub_folders']; 577 | $this->trigger_search(true); 578 | } 579 | 580 | /** 581 | * Here is where the actual query is fired to the imap server and the result is evaluated and sent back to the client side 582 | * 583 | * @access public 584 | * @return null 585 | */ 586 | public function trigger_search($inPagination = false) 587 | { 588 | $search = rcube_utils::get_input_value('search', rcube_utils::INPUT_GPC); 589 | // reset list_page and old search results 590 | $this->rc->storage->set_page(1); 591 | $this->rc->storage->set_search_set(null); 592 | $page = rcube_utils::get_input_value('_page', rcube_utils::INPUT_GPC); 593 | $page = $page ? $page : 1; 594 | $pagesize = $this->rc->storage->get_pagesize(); 595 | 596 | if (!empty($search)) { 597 | $mbox = rcube_utils::get_input_value('folder', rcube_utils::INPUT_GPC); 598 | $imap_charset = RCUBE_CHARSET; 599 | $sort_column = rcmail_sort_column(); 600 | $search_str = $this->get_search_query($search); 601 | $sub_folders = rcube_utils::get_input_value('sub_folders', rcube_utils::INPUT_GPC) == 'true'; 602 | $folders = array(); 603 | $result_h = array(); 604 | $count = 0; 605 | $new_id = 1; 606 | $current_mbox = $this->rc->storage->get_folder(); 607 | $uid_list = array(); 608 | //Store information in session for pagination 609 | $_SESSION['av_search'] = $search; 610 | $_SESSION['av_folder'] = $mbox; 611 | $_SESSION['av_sub_folders'] = rcube_utils::get_input_value('sub_folders', rcube_utils::INPUT_GPC); 612 | $nosub = $sub_folders; 613 | $folders = $this->rc->get_storage()->list_folders_subscribed(); 614 | if (empty($folders) || ($sub_folders === false && $mbox !== 'all')) { 615 | $folders = array($mbox); 616 | } elseif ($mbox !== 'all') { 617 | if ($sub_folders === false) { 618 | $folders = array($mbox); 619 | } else { 620 | $folders = $this->rc->get_storage()->list_folders_subscribed_direct($mbox); 621 | } 622 | } 623 | $md5folders = array(); 624 | foreach ($folders as $folder) { 625 | $md5folders[md5($folder)] = $folder; 626 | } 627 | $this->rc->output->set_env('as_md5_folders', $md5folders); 628 | 629 | if ($search_str) { 630 | $res = $this->perform_search($search_str, $folders, $page); 631 | $count = $res['count']; 632 | } 633 | 634 | 635 | if ($count > 0) { 636 | $_SESSION['advanced_search']['uid_list'] = $uid_list; 637 | if ($search_str && $inPagination == false) { 638 | $this->rc->output->show_message('searchsuccessful', 'confirmation', array('nr' => $count)); 639 | } 640 | } elseif ($err_code = $this->rc->storage->get_error_code()) { 641 | rcmail_display_server_error(); 642 | } else { 643 | $this->rc->output->show_message('searchnomatch', 'notice'); 644 | } 645 | 646 | $current_folder = rcube_utils::get_input_value('current_folder', rcube_utils::INPUT_GPC); 647 | 648 | $this->rc->output->set_env('search_request', 'advanced_search_active'); 649 | $this->rc->output->set_env('messagecount', $count); 650 | $this->rc->output->set_env('pagecount', ceil($count / $pagesize)); 651 | $this->rc->output->set_env('exists', $this->rc->storage->count($current_folder, 'EXISTS')); 652 | $this->rc->output->command('set_rowcount', rcmail_get_messagecount_text($count, $page)); 653 | $this->rc->output->command('plugin.search_complete'); 654 | $this->rc->output->send(); 655 | } 656 | } 657 | 658 | /** 659 | * return javascript commands to add rows to the message list 660 | */ 661 | public function rcmail_js_message_list($a_headers, $insert_top = false, $a_show_cols = null, $avmbox = false, $avcols = array(), $showMboxColumn = false) 662 | { 663 | global $CONFIG, $RCMAIL, $OUTPUT; 664 | $uid_mboxes = array(); 665 | 666 | if (empty($a_show_cols)) { 667 | if (!empty($_SESSION['list_attrib']['columns'])) { 668 | $a_show_cols = $_SESSION['list_attrib']['columns']; 669 | } else { 670 | $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject'); 671 | } 672 | } else { 673 | if (!is_array($a_show_cols)) { 674 | $a_show_cols = preg_split('/[\s,;]+/', strip_quotes($a_show_cols)); 675 | } 676 | $head_replace = true; 677 | } 678 | 679 | $mbox = $RCMAIL->storage->get_folder(); 680 | 681 | // make sure 'threads' and 'subject' columns are present 682 | if (!in_array('subject', $a_show_cols)) { 683 | array_unshift($a_show_cols, 'subject'); 684 | } 685 | if (!in_array('threads', $a_show_cols)) { 686 | array_unshift($a_show_cols, 'threads'); 687 | } 688 | $_SESSION['list_attrib']['columns'] = $a_show_cols; 689 | 690 | // Make sure there are no duplicated columns (#1486999) 691 | $a_show_cols = array_merge($a_show_cols, $avcols); 692 | $a_show_cols = array_unique($a_show_cols); 693 | 694 | // Plugins may set header's list_cols/list_flags and other rcube_message_header variables 695 | // and list columns 696 | $plugin = $RCMAIL->plugins->exec_hook( 697 | 'messages_list', 698 | array('messages' => $a_headers, 'cols' => $a_show_cols) 699 | ); 700 | $a_show_cols = $plugin['cols']; 701 | $a_headers = $plugin['messages']; 702 | $thead = $head_replace ? rcmail_message_list_head($_SESSION['list_attrib'], $a_show_cols) : null; 703 | 704 | // get name of smart From/To column in folder context 705 | if (($f = array_search('fromto', $a_show_cols)) !== false) { 706 | $smart_col = rcmail_message_list_smart_column_name(); 707 | } 708 | if ($this->coltypesSet == false) { 709 | $OUTPUT->command('set_message_coltypes', $a_show_cols, $thead, $smart_col); 710 | if ($showMboxColumn === true) { 711 | $OUTPUT->command('plugin.advanced_search_add_header', array()); 712 | } 713 | $this->coltypesSet = true; 714 | } 715 | 716 | if (empty($a_headers)) { 717 | return; 718 | } 719 | 720 | // remove 'threads', 'attachment', 'flag', 'status' columns, we don't need them here 721 | foreach (array('threads', 'attachment', 'flag', 'status', 'priority') as $col) { 722 | if (($key = array_search($col, $a_show_cols)) !== false) { 723 | unset($a_show_cols[$key]); 724 | } 725 | } 726 | 727 | // loop through message headers 728 | foreach ($a_headers as $n => $header) { 729 | if (empty($header)) { 730 | continue; 731 | } 732 | $a_msg_cols = array(); 733 | $a_msg_flags = array(); 734 | // format each col; similar as in rcmail_message_list() 735 | foreach ($a_show_cols as $col) { 736 | $col_name = $col == 'fromto' ? $smart_col : $col; 737 | 738 | if (in_array($col_name, array('from', 'to', 'cc', 'replyto'))) { 739 | $cont = rcmail_address_string($header->$col_name, 3, false, null, $header->charset); 740 | } elseif ($col == 'subject') { 741 | $cont = trim(rcube_mime::decode_header($header->$col, $header->charset)); 742 | if (!$cont) { 743 | $cont = rcube_label('nosubject'); 744 | } 745 | $cont = rcube_utils::rep_specialchars_output($cont); 746 | } elseif ($col == 'size') { 747 | $cont = rcmail::get_instance()->show_bytes($header->$col); 748 | } elseif ($col == 'date') { 749 | $cont = rcmail::get_instance()->format_date($header->date); 750 | } else { 751 | $cont = rcube_utils::rep_specialchars_output($header->$col); 752 | } 753 | $a_msg_cols[$col] = $cont; 754 | } 755 | 756 | $a_msg_flags = array_change_key_case(array_map('intval', (array) $header->flags)); 757 | if ($header->depth) { 758 | $a_msg_flags['depth'] = $header->depth; 759 | } elseif ($header->has_children) { 760 | $roots[] = $header->uid; 761 | } 762 | if ($header->parent_uid) { 763 | $a_msg_flags['parent_uid'] = $header->parent_uid; 764 | } 765 | if ($header->has_children) { 766 | $a_msg_flags['has_children'] = $header->has_children; 767 | } 768 | if ($header->unread_children) { 769 | $a_msg_flags['unread_children'] = $header->unread_children; 770 | } 771 | if ($header->others['list-post']) { 772 | $a_msg_flags['ml'] = 1; 773 | } 774 | if ($header->priority) { 775 | $a_msg_flags['prio'] = (int) $header->priority; 776 | } 777 | $a_msg_flags['ctype'] = rcube_utils::rep_specialchars_output($header->ctype); 778 | $a_msg_flags['mbox'] = $mbox; 779 | if (!empty($header->list_flags) && is_array($header->list_flags)) { 780 | $a_msg_flags = array_merge($a_msg_flags, $header->list_flags); 781 | } 782 | if (!empty($header->list_cols) && is_array($header->list_cols)) { 783 | $a_msg_cols = array_merge($a_msg_cols, $header->list_cols); 784 | } 785 | if ($showMboxColumn === true) { 786 | $a_msg_flags['avmbox'] = $avmbox; 787 | } 788 | 789 | $OUTPUT->command( 790 | 'add_message_row', 791 | $header->uid . '__MB__' . md5($mbox), 792 | $a_msg_cols, 793 | $a_msg_flags, 794 | $insert_top 795 | ); 796 | $id = $header->uid . '__MB__' . md5($mbox); 797 | $uid_mboxes[$id] = array('uid' => $header->uid, 'mbox' => $mbox, 'md5mbox' => md5($mbox)); 798 | } 799 | 800 | if ($RCMAIL->storage->get_threading()) { 801 | $OUTPUT->command('init_threads', (array) $roots, $mbox); 802 | } 803 | 804 | return $uid_mboxes; 805 | } 806 | 807 | private function do_pagination($folders, $onPage) 808 | { 809 | $perPage = $this->rc->storage->get_pagesize(); 810 | $from = $perPage * $onPage - $perPage + 1; 811 | $to = $from + $perPage - 1; 812 | $got = 0; 813 | $pos = 0; 814 | $cbox = ""; 815 | $boxStart = 0; 816 | $boxStop = 0; 817 | $fetch = array(); 818 | foreach ($folders as $box => $num) { 819 | $i = $num; 820 | if ($box != $cbox) { 821 | $boxStart = 0; 822 | $boxStop = 0; 823 | $cbox = $box; 824 | } 825 | while ($i--) { 826 | $pos++; 827 | $boxStart++; 828 | if ($pos >= $from && $pos <= $to) { 829 | if (!isset($fetch[$box])) { 830 | $fetch[$box] = array("from" => $boxStart); 831 | } 832 | $fetch[$box]['to'] = $boxStart; 833 | $got++; 834 | } 835 | } 836 | if ($got >= $perPage) { 837 | break; 838 | } 839 | } 840 | 841 | return $fetch; 842 | } 843 | 844 | /** 845 | * Save advanced search preferences 846 | * 847 | * @access public 848 | */ 849 | public function preferences_save($args) 850 | { 851 | if ($args['section'] != 'advancedsearch') { 852 | return; 853 | } 854 | $RCMAIL = rcmail::get_instance(); 855 | 856 | $displayOptions = array(); 857 | $displayOptions['_show_message_label_header'] = rcube_utils::get_input_value('_show_message_label_header', rcube_utils::INPUT_POST) == 1 ? true : false; 858 | $displayOptions['_show_message_mbox_info'] = rcube_utils::get_input_value('_show_message_mbox_info', rcube_utils::INPUT_POST) == 1 ? true : false; 859 | $displayOptions['target_menu'] = rcube_utils::get_input_value('button_display_option', rcube_utils::INPUT_POST); 860 | 861 | $args['prefs']['advanced_search_display_options'] = $displayOptions; 862 | 863 | return($args); 864 | } 865 | 866 | /** 867 | * Add a section advanced search to the preferences section list 868 | * 869 | * @access public 870 | */ 871 | public function preferences_section($args) 872 | { 873 | $args['list']['advancedsearch'] = array( 874 | 'id' => 'advancedsearch', 875 | 'section' => rcube_utils::rep_specialchars_output($this->gettext('advancedsearch')) 876 | ); 877 | 878 | return($args); 879 | } 880 | 881 | /** 882 | * Display advanced search configuration in user preferences tab 883 | * 884 | * @access public 885 | */ 886 | public function preferences_list($args) 887 | { 888 | if ($args['section'] == 'advancedsearch') { 889 | 890 | $this->rc = rcmail::get_instance(); 891 | $args['blocks']['label_display_options'] = array( 892 | 'options' => array(), 893 | 'name' => rcube_utils::rep_specialchars_output($this->gettext('label_display_options'))); 894 | 895 | $displayOptions = $this->rc->config->get('advanced_search_display_options', array()); 896 | $target_menu = (isset($displayOptions['target_menu']) && !empty($displayOptions['target_menu'])) ? $displayOptions['target_menu'] : $this->config['target_menu']; 897 | $options = ''; 898 | $optarg = array('value' => 'messagemenu'); 899 | if ($target_menu == 'messagemenu') { 900 | $optarg['selected'] = 'selected'; 901 | $target_image = 'menu_location_a.jpg'; 902 | } 903 | 904 | $options .= html::tag('option', $optarg, rcube_utils::rep_specialchars_output($this->gettext('display_in_messagemenu'))); 905 | $optarg = array('value' => 'toolbar'); 906 | if ($target_menu == 'toolbar') { 907 | $optarg['selected'] = 'selected'; 908 | $target_image = 'menu_location_b.jpg'; 909 | } 910 | 911 | $options .= html::tag('option', $optarg, rcube_utils::rep_specialchars_output($this->gettext('display_in_toolbar'))); 912 | $select = html::tag('select', array('name' => 'button_display_option', 'id' => 'button_display_option'), $options); 913 | $label1 = html::label('_show_message_label_header', rcube_utils::rep_specialchars_output($this->gettext('mailbox_headers_in_results'))); 914 | $label2 = html::label('_show_message_mbox_info', rcube_utils::rep_specialchars_output($this->gettext('mailbox_info_in_results'))); 915 | $label3 = html::label('button_display_option', rcube_utils::rep_specialchars_output($this->gettext('show_advanced_search'))); 916 | 917 | $arg1 = array('name' => '_show_message_label_header', 'id' => '_show_message_label_header', 'type' => 'checkbox', 'title' => "", 'class' => 'watermark linput', 'value' => 1); 918 | if (isset($displayOptions['_show_message_label_header']) && $displayOptions['_show_message_label_header'] === true) { 919 | $arg1['checked'] = 'checked'; 920 | $img1class = 'enabled'; 921 | } else { 922 | $img1class = 'disabled'; 923 | } 924 | 925 | $check1 = html::tag('input', $arg1); 926 | $arg2 = array('name' => '_show_message_mbox_info', 'id' => '_show_message_mbox_info', 'type' => 'checkbox', 'title' => "", 'class' => 'watermark linput', 'value' => 1); 927 | if (isset($displayOptions['_show_message_mbox_info']) && $displayOptions['_show_message_mbox_info'] === true) { 928 | $arg2['checked'] = 'checked'; 929 | $img2class = 'enabled'; 930 | } else { 931 | $img2class = 'disabled'; 932 | } 933 | 934 | $img1 = html::img(array('src' => $this->url('skins/' . $this->skin . '/images/show_mbox_row.jpg'), 'class' => $img1class)); 935 | $img2 = html::img(array('src' => $this->url('skins/' . $this->skin . '/images/show_mbox_col.jpg'), 'class' => $img2class)); 936 | $img3 = html::img(array('src' => $this->url('skins/' . $this->skin . '/images/' . $target_image))); 937 | 938 | $check2 = html::tag('input', $arg2); 939 | $args['blocks']['label_display_options']['options'][0] = array('title' => '', 'content' => '

' . $check1 . ' ' . $label1 . ' ' . $img1 . '

'); 940 | $args['blocks']['label_display_options']['options'][1] = array('title' => '', 'content' => '

' . $check2 . ' ' . $label2 . ' ' . $img2 . '

'); 941 | $args['blocks']['label_display_options']['options'][2] = array('title' => '', 'content' => '

' . $label3 . ' ' . $select . ' ' . $img3 . '

'); 942 | } 943 | 944 | return($args); 945 | } 946 | 947 | private function perform_search($search_string, $folders, $page = 1) 948 | { 949 | // Search all folders and build a final set 950 | if ($folders[0] == 'all' || empty($folders)) { 951 | $folders_search = $this->rc->imap->list_folders_subscribed(); 952 | } else { 953 | $folders_search = $folders; 954 | } 955 | $count = 0; 956 | $folder_count = array(); 957 | foreach ($folders_search as $mbox) { 958 | $this->rc->storage->set_folder($mbox); 959 | $this->rc->storage->search($mbox, $search_string, RCUBE_CHARSET, $_SESSION['sort_col']); 960 | $result = array(); 961 | $fcount = $this->rc->storage->count($mbox, 'ALL', !empty($_REQUEST['_refresh'])); 962 | $count += $fcount; 963 | $folder_count[$mbox] = $fcount; 964 | } 965 | foreach ($folder_count as $k => $v) { 966 | if ($v == 0) { 967 | unset($folder_count[$k]); 968 | } 969 | } 970 | 971 | $fetch = $this->do_pagination($folder_count, $page); 972 | $mails = array(); 973 | $currentMailbox = ""; 974 | $displayOptions = $this->rc->config->get('advanced_search_display_options', array()); 975 | $showMboxColumn = isset($displayOptions['_show_message_mbox_info']) && $displayOptions['_show_message_mbox_info'] ? true : false; 976 | $uid_mboxes = array(); 977 | foreach ($fetch as $mailbox => $data) { 978 | if ($currentMailbox != $mailbox) { 979 | $currentMailbox = $mailbox; 980 | if (isset($displayOptions['_show_message_label_header']) && $displayOptions['_show_message_label_header'] === true) { 981 | $this->rc->output->command('advanced_search_add_mbox', $mailbox, $folder_count[$mailbox], $showMboxColumn); 982 | } 983 | } 984 | $uid_mboxes = array_merge($uid_mboxes, $this->getMails($mailbox, $data, $search_string, $showMboxColumn)); 985 | } 986 | 987 | return array('result' => array(), 'count' => $count, 'uid_mboxes' => $uid_mboxes); 988 | } 989 | 990 | private function getMails($mailbox, $data, $search_string, $showMboxColumn) 991 | { 992 | $pageSize = $this->rc->storage->get_pagesize(); 993 | $msgNum = $data['from']; 994 | $startPage = ceil($msgNum/$pageSize); 995 | $msgMod = $msgNum % $pageSize; 996 | $multiPage = "false"; 997 | $firstArrayElement = $msgMod == 0 ? ($pageSize-1) : ($msgMod-1); 998 | $quantity = $data['to'] - $data['from']; 999 | if ($data['from'] + $quantity > $pageSize) { 1000 | $multiPage = "true"; 1001 | } 1002 | $this->rc->storage->set_folder($mailbox); 1003 | $this->rc->storage->search($mailbox, $search_string, RCUBE_CHARSET, $_SESSION['sort_col']); 1004 | $messages = $this->rc->storage->list_messages('', $startPage); 1005 | if ($multiPage) { 1006 | $messages = array_merge($messages, $this->rc->storage->list_messages('', $startPage+1)); 1007 | } 1008 | //FIRST: 0 QUANTITY: 2 1009 | $sliceTo = $quantity + 1; 1010 | $mslice = array_slice($messages, $firstArrayElement, $sliceTo, true); 1011 | $messages = $mslice; 1012 | $avbox = array(); 1013 | $showAvmbox = false; 1014 | foreach ($messages as $set_flag) { 1015 | $set_flag->flags['skip_mbox_check'] = true; 1016 | if ($showMboxColumn === true) { 1017 | $set_flag->avmbox = $mailbox; 1018 | $avbox[] = 'avmbox'; 1019 | $showAvmbox = true; 1020 | } 1021 | } 1022 | 1023 | $uid_mboxes = $this->rcmail_js_message_list($messages, false, null, $showAvmbox, $avbox, $showMboxColumn); 1024 | 1025 | return $uid_mboxes; 1026 | } 1027 | 1028 | public function save_search() 1029 | { 1030 | $search_name = rcube_utils::get_input_value('search_name', rcube_utils::INPUT_GPC); 1031 | if ($search_name) { 1032 | $search = array(); 1033 | $search['search'] = rcube_utils::get_input_value('search', rcube_utils::INPUT_GPC); 1034 | $search['search_name'] = $search_name; 1035 | $search['folder'] = rcube_utils::get_input_value('folder', rcube_utils::INPUT_GPC); 1036 | $search['sub_folders'] = rcube_utils::get_input_value('sub_folders', rcube_utils::INPUT_GPC); 1037 | $prefs = (array)$this->rc->user->get_prefs(); 1038 | if (!isset($prefs['advanced_search'])) { 1039 | $prefs['advanced_search'] = array(); 1040 | } 1041 | $prefs['advanced_search'][$search_name] = $search; 1042 | $this->rc->user->save_prefs(array('advanced_search' => $prefs['advanced_search'])); 1043 | $this->rc->output->show_message('"' . $search_name . '" ' . $this->i18n_strings['has_been_saved'], 'confirmation'); 1044 | } 1045 | } 1046 | 1047 | public function delete_search() 1048 | { 1049 | $search_name = rcube_utils::get_input_value('search_name', rcube_utils::INPUT_GPC); 1050 | if ($search_name) { 1051 | $prefs = (array)$this->rc->user->get_prefs(); 1052 | unset($prefs['advanced_search'][$search_name]); 1053 | $this->rc->user->save_prefs(array('advanced_search' => $prefs['advanced_search'])); 1054 | $this->rc->output->show_message('"' . $search_name . '" ' . $this->i18n_strings['has_been_deleted'], 'notice'); 1055 | } 1056 | } 1057 | 1058 | public function get_saved_search() 1059 | { 1060 | $search_name = rcube_utils::get_input_value('search_name', rcube_utils::INPUT_GPC); 1061 | $prefs = (array)$this->rc->user->get_prefs(); 1062 | if (!isset($prefs['advanced_search'])) { 1063 | $prefs['advanced_search'] = array(); 1064 | } 1065 | 1066 | $search = isset($prefs['advanced_search'][$search_name]) ? $prefs['advanced_search'][$search_name] : false; 1067 | $this->rc->output->command('plugin.load_saved_search', $search); 1068 | $this->rc->output->send(); 1069 | } 1070 | 1071 | private function get_saved_search_names() 1072 | { 1073 | $prefs = (array)$this->rc->user->get_prefs(); 1074 | if (!isset($prefs['advanced_search'])) { 1075 | $prefs['advanced_search'] = array(); 1076 | } 1077 | $names = array(); 1078 | foreach($prefs['advanced_search'] as $name => $search) { 1079 | $names[] = $name; 1080 | } 1081 | 1082 | return $names; 1083 | } 1084 | } 1085 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "texxasrulez/advanced_search", 3 | "description": "Add Advanced Search Capabilities", 4 | "keywords": ["search","mail","advanced"], 5 | "homepage": "https://github.com/texxasrulez/advanced_search", 6 | "license": "GPL-3.0", 7 | "type": "roundcube-plugin", 8 | "version": "3.4", 9 | "authors": [ 10 | { 11 | "name": "Gene Hawkins", 12 | "email": "texxasrulez@yahoo.com", 13 | "role": "Developer" 14 | } 15 | ], 16 | "repositories": [ 17 | { 18 | "type": "composer", 19 | "url": "https://plugins.roundcube.net" 20 | } 21 | ], 22 | "require": { 23 | "php": ">=5.2.1", 24 | "roundcube/plugin-installer": ">=0.1.2" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /config.inc.php.dist: -------------------------------------------------------------------------------- 1 | 'messagemenu', 6 | 7 | // Every criteria which takes a email as argument 8 | 'email_criteria' => array('HEADER FROM', 'HEADER TO', 'CC', 'BCC'), 9 | 10 | // Every criteria which takes a date as argument 11 | 'date_criteria' => array('BEFORE', 'ON', 'SINCE', 'SENTBEFORE', 'SENTON', 'SENTSINCE'), 12 | 13 | // Every criteria which doesn't take an argument 14 | 'flag_criteria' => array('ANSWERED', 'DELETED', 'DRAFT', 'FLAGGED', 'SEEN'), 15 | 16 | // Prefered criteria to show on the top of lists 17 | 'prefered_criteria' => array('SUBJECT', 'BODY', 'HEADER FROM', 'HEADER TO', 'SENTSINCE', 'LARGER'), 18 | 19 | // Other criteria, anything not in the above lists, except 'prefered_criteria' 20 | 'other_criteria' => array('SUBJECT', 'BODY', 'KEYWORD', 'LARGER', 'SMALLER'), 21 | 22 | // All filter criteria 23 | 'criteria' => array( 24 | 'ANSWERED' => 'Answered', 25 | 'BCC' => 'Bcc', 26 | 'BEFORE' => 'Before', 27 | 'CC' => 'Cc', 28 | 'DELETED' => 'Deleted', 29 | 'DRAFT' => 'Draft', 30 | 'FLAGGED' => 'Flagged', 31 | 'KEYWORD' => 'Keyword', 32 | 'LARGER' => 'Larger Than', 33 | 'BODY' => 'Message Body', 34 | 'ON' => 'On', 35 | 'SEEN' => 'Read', 36 | 'SENTBEFORE' => 'Sent Before', 37 | 'HEADER FROM' => 'From', 38 | 'SENTON' => 'Sent On', 39 | 'SENTSINCE' => 'Sent Since', 40 | 'HEADER TO' => 'To', 41 | 'SINCE' => 'Since', 42 | 'SMALLER' => 'Smaller Than', 43 | 'SUBJECT' => 'Subject Contains' 44 | ) 45 | ); -------------------------------------------------------------------------------- /localization/ar.inc: -------------------------------------------------------------------------------- 1 | a.advanced_search span.advanced_search { 4 | display: none; 5 | } 6 | 7 | .advanced_search_dialog .ui-dialog-title { 8 | width: 100%; 9 | } 10 | 11 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 12 | border: 1px solid lightgray; 13 | float: right; 14 | display: block; 15 | padding-right: 10px; 16 | padding-left: 10px; 17 | padding-bottom: 3px; 18 | padding-top: 3px; 19 | border-radius: 4px; 20 | margin-right: 20px; 21 | } 22 | 23 | #rcavbox1, #rcavbox2 { 24 | width: 30%; 25 | } 26 | 27 | #messagetoolbar a.advanced_search { 28 | text-indent: -5000px; 29 | background: url(../../../../skins/classic/images/abook_toolbar.png) 0 0 no-repeat transparent; 30 | background-position: -168px 0px; 31 | } 32 | 33 | #messagemenu a.advanced_search { 34 | color: #333; 35 | text-decoration: none; 36 | background: url(../../../../skins/classic/images/icons/glass.png) no-repeat 7px 0; 37 | } 38 | -------------------------------------------------------------------------------- /skins/elastic/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Elastic" */ 2 | 3 | .listing.iconized tr.advancedsearch>td.section:before { 4 | content: "\f00e"; 5 | } 6 | 7 | .menu a.advanced_search:before { 8 | content: "\f00e"; 9 | } 10 | -------------------------------------------------------------------------------- /skins/elastic/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/elastic/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/elastic/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/elastic/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/elastic/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/elastic/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/elastic/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/elastic/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/elastic/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/elastic/images/show_mbox_row.jpg -------------------------------------------------------------------------------- /skins/green-larry/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Green-Larry" */ 2 | 3 | a.icon.advanced_search span.advanced_search { 4 | background-image: url(images/icon-loupe.png) !important; 5 | background-position: 0 !important; 6 | } 7 | 8 | a.button.advanced_search { 9 | text-align: center; 10 | font-size: 10px; 11 | color: #fff; 12 | min-width: 50px; 13 | max-width: 75px; 14 | height: 13px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | padding: 28px 2px 0 2px; 19 | text-shadow: none; 20 | box-shadow: none; 21 | -moz-box-shadow: none; 22 | -webkit-box-shadow: none; 23 | -o-box-shadow: none; 24 | background: url(../../../../skins/green-larry/images/buttons.png?v=abf1.36693) -100px 0 no-repeat transparent; 25 | border: 0; 26 | border-radius: 0; 27 | background-position: center -970px; 28 | } 29 | 30 | .records-table tbody .aslabel_mbox td { 31 | border-top: 1px solid inherit; 32 | border-bottom: 1px solid inherit; 33 | cursor: default; 34 | font-weight: normal; 35 | background-color: inherit; 36 | color: inherit; 37 | text-shadow: none; 38 | text-decoration: none; 39 | font-weight: bold; 40 | } 41 | 42 | .records-table tbody .aslabel_mbox .aslabel_found { 43 | top: 3px; 44 | right: 6px; 45 | min-width: 1.8em; 46 | padding: 2px 4px; 47 | background: inherit; 48 | background: -moz-linear-gradient(top, inherit5 0%, inherit 100%); 49 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 50 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 51 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 52 | background: linear-gradient(top, inherit 0%, inherit 100%); 53 | box-shadow: inset 0 1px 1px 0 inherit; 54 | -o-box-shadow: inset 0 1px 1px 0 inherit; 55 | -webkit-box-shadow: inset 0 1px 1px 0 inherit; 56 | -moz-box-shadow: inset 0 1px 1px 0 inherit; 57 | border-radius: 9px; 58 | color: inherit; 59 | text-align: center; 60 | font-weight: bold; 61 | text-shadow: none; 62 | display: block; 63 | } 64 | 65 | #adsearch-popup button.add, #adsearch-popup button.delete{ 66 | display: inline-block; 67 | margin: 0 2px; 68 | padding: 2px 5px; 69 | color: inherit; 70 | text-shadow: none; 71 | border: 1px solid inherit; 72 | border-radius: 4px; 73 | background: #inherit; 74 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 75 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 76 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 77 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 78 | background: linear-gradient(top, inherit 0%, inherit 100%); 79 | box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 80 | -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 81 | -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 82 | -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 83 | text-decoration: none; 84 | outline: none; 85 | } 86 | 87 | #adv-search tbody tr { 88 | padding: 4px 10px; 89 | background: #eee; 90 | border-bottom: 2px solid inherit; 91 | } 92 | 93 | #adv-search, #adv-search tr { 94 | width: 100%; 95 | } 96 | 97 | td.adv-search-and-or { 98 | width: 80px; 99 | text-align: center; 100 | } 101 | 102 | #adsearch-popup .mainaction { 103 | height: 24px; 104 | padding-left: 10px; 105 | padding-right: 10px; 106 | margin-right: 10px; 107 | } 108 | 109 | #rcavbox1, #rcavbox2 { 110 | width: 30%; 111 | } 112 | 113 | #rcmrowadvancedsearch td.section { 114 | background-position: 6px -1674px !important; 115 | } 116 | 117 | #rcmrowadvancedsearch.selected td.section { 118 | background-position: 6px -1650px !important; 119 | } 120 | 121 | p.avsearchpref span { 122 | min-width: 280px; 123 | display: block; 124 | max-width: 280px; 125 | float: left; 126 | vertical-align: middle; 127 | } 128 | 129 | p.avsearchpref img { 130 | border-radius: 10px; 131 | } 132 | 133 | p.avsearchpref img.disabled { 134 | -webkit-filter: grayscale(100%); 135 | -moz-filter: grayscale(100%); 136 | filter: grayscale(100%); 137 | } 138 | 139 | button.save_search { 140 | color: inherit; 141 | background-color: inherit; 142 | border-radius: 4px; 143 | height: 20px; 144 | padding-left: 10px; 145 | padding-right: 10px; 146 | margin-right: 10px; 147 | } 148 | 149 | input.save_search { 150 | padding: 0 10px 0 10px; 151 | height: 20px; 152 | background: inherit; 153 | border: none; 154 | font-weight: bold; 155 | color: inherit; 156 | text-shadow: none; 157 | background: inherit; 158 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 160 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 161 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 162 | background: linear-gradient(top, inherit 0%, inherit 100%); 163 | } 164 | 165 | input.save_search:active { 166 | background: inherit; 167 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 168 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 169 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 170 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 171 | background: linear-gradient(top, inherit 0%, inherit 100%); 172 | } 173 | 174 | input.delete_search { 175 | padding: 0 10px 0 10px; 176 | height: 19px; 177 | background: inherit; 178 | border: none; 179 | font-weight: bold; 180 | color: inherit; 181 | text-shadow: none; 182 | background: inherit; 183 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 184 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 185 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 186 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 187 | background: linear-gradient(top, inherit 0%, inherit 100%); 188 | } 189 | 190 | input.delete_search:active { 191 | background: inherit; 192 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 194 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 195 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 196 | background: linear-gradient(top, inherit 0%, inherit 100%); 197 | } 198 | 199 | 200 | .advanced_search_dialog .ui-dialog-title { 201 | width: 100%; 202 | } 203 | 204 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 205 | border: 1px solid lightgray; 206 | float: right; 207 | display: block; 208 | padding-right: 10px; 209 | -moz-box-shadow: inset 0 0 5px inherit; 210 | -webkit-box-shadow: inset 0 0 5px inherit; 211 | box-shadow: inner 0 0 5px inherit; 212 | padding-left: 10px; 213 | padding-bottom: 3px; 214 | padding-top: 3px; 215 | border-radius: 4px; 216 | } 217 | 218 | #adsearch-popup input[name="filter-val"] { 219 | margin-right: 4px; 220 | } 221 | -------------------------------------------------------------------------------- /skins/green-larry/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/green-larry/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/green-larry/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/green-larry/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/green-larry/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/green-larry/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/green-larry/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/green-larry/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/green-larry/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/green-larry/images/show_mbox_row.jpg -------------------------------------------------------------------------------- /skins/grey-larry/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Grey-Larry" */ 2 | 3 | a.icon.advanced_search span.advanced_search { 4 | background-image: url(images/icon-loupe.png) !important; 5 | background-position: 0 !important; 6 | } 7 | 8 | a.button.advanced_search { 9 | text-align: center; 10 | font-size: 10px; 11 | color: #fff; 12 | min-width: 50px; 13 | max-width: 75px; 14 | height: 13px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | padding: 28px 2px 0 2px; 19 | text-shadow: none; 20 | box-shadow: none; 21 | -moz-box-shadow: none; 22 | -webkit-box-shadow: none; 23 | -o-box-shadow: none; 24 | background: url(../../../../skins/grey-larry/images/buttons.png?v=abf1.36693) -100px 0 no-repeat transparent; 25 | border: 0; 26 | border-radius: 0; 27 | background-position: center -970px; 28 | } 29 | 30 | .records-table tbody .aslabel_mbox td { 31 | border-top: 1px solid inherit; 32 | border-bottom: 1px solid inherit; 33 | cursor: default; 34 | font-weight: normal; 35 | background-color: inherit; 36 | color: inherit; 37 | text-shadow: none; 38 | text-decoration: none; 39 | font-weight: bold; 40 | } 41 | 42 | .records-table tbody .aslabel_mbox .aslabel_found { 43 | top: 3px; 44 | right: 6px; 45 | min-width: 1.8em; 46 | padding: 2px 4px; 47 | background: inherit; 48 | background: -moz-linear-gradient(top, inherit5 0%, inherit 100%); 49 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 50 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 51 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 52 | background: linear-gradient(top, inherit 0%, inherit 100%); 53 | box-shadow: inset 0 1px 1px 0 inherit; 54 | -o-box-shadow: inset 0 1px 1px 0 inherit; 55 | -webkit-box-shadow: inset 0 1px 1px 0 inherit; 56 | -moz-box-shadow: inset 0 1px 1px 0 inherit; 57 | border-radius: 9px; 58 | color: inherit; 59 | text-align: center; 60 | font-weight: bold; 61 | text-shadow: none; 62 | display: block; 63 | } 64 | 65 | #adsearch-popup button.add, #adsearch-popup button.delete{ 66 | display: inline-block; 67 | margin: 0 2px; 68 | padding: 2px 5px; 69 | color: inherit; 70 | text-shadow: none; 71 | border: 1px solid inherit; 72 | border-radius: 4px; 73 | background: #inherit; 74 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 75 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 76 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 77 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 78 | background: linear-gradient(top, inherit 0%, inherit 100%); 79 | box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 80 | -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 81 | -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 82 | -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 83 | text-decoration: none; 84 | outline: none; 85 | } 86 | 87 | #adv-search tbody tr { 88 | padding: 4px 10px; 89 | background: #eee; 90 | border-bottom: 2px solid inherit; 91 | } 92 | 93 | #adv-search, #adv-search tr { 94 | width: 100%; 95 | } 96 | 97 | td.adv-search-and-or { 98 | width: 80px; 99 | text-align: center; 100 | } 101 | 102 | #adsearch-popup .mainaction { 103 | height: 24px; 104 | padding-left: 10px; 105 | padding-right: 10px; 106 | margin-right: 10px; 107 | } 108 | 109 | #rcavbox1, #rcavbox2 { 110 | width: 30%; 111 | } 112 | 113 | #rcmrowadvancedsearch td.section { 114 | background-position: 6px -1650px !important; 115 | } 116 | 117 | #rcmrowadvancedsearch.selected td.section { 118 | background-position: 6px -1674px !important; 119 | } 120 | 121 | p.avsearchpref span { 122 | min-width: 280px; 123 | display: block; 124 | max-width: 280px; 125 | float: left; 126 | vertical-align: middle; 127 | } 128 | 129 | p.avsearchpref img { 130 | border-radius: 10px; 131 | } 132 | 133 | p.avsearchpref img.disabled { 134 | -webkit-filter: grayscale(100%); 135 | -moz-filter: grayscale(100%); 136 | filter: grayscale(100%); 137 | } 138 | 139 | button.save_search { 140 | color: inherit; 141 | background-color: inherit; 142 | border-radius: 4px; 143 | height: 20px; 144 | padding-left: 10px; 145 | padding-right: 10px; 146 | margin-right: 10px; 147 | } 148 | 149 | input.save_search { 150 | padding: 0 10px 0 10px; 151 | height: 20px; 152 | background: inherit; 153 | border: none; 154 | font-weight: bold; 155 | color: inherit; 156 | text-shadow: none; 157 | background: inherit; 158 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 160 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 161 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 162 | background: linear-gradient(top, inherit 0%, inherit 100%); 163 | } 164 | 165 | input.save_search:active { 166 | background: inherit; 167 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 168 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 169 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 170 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 171 | background: linear-gradient(top, inherit 0%, inherit 100%); 172 | } 173 | 174 | input.delete_search { 175 | padding: 0 10px 0 10px; 176 | height: 19px; 177 | background: inherit; 178 | border: none; 179 | font-weight: bold; 180 | color: inherit; 181 | text-shadow: none; 182 | background: inherit; 183 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 184 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 185 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 186 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 187 | background: linear-gradient(top, inherit 0%, inherit 100%); 188 | } 189 | 190 | input.delete_search:active { 191 | background: inherit; 192 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 194 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 195 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 196 | background: linear-gradient(top, inherit 0%, inherit 100%); 197 | } 198 | 199 | 200 | .advanced_search_dialog .ui-dialog-title { 201 | width: 100%; 202 | } 203 | 204 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 205 | border: 1px solid lightgray; 206 | float: right; 207 | display: block; 208 | padding-right: 10px; 209 | -moz-box-shadow: inset 0 0 5px inherit; 210 | -webkit-box-shadow: inset 0 0 5px inherit; 211 | box-shadow: inner 0 0 5px inherit; 212 | padding-left: 10px; 213 | padding-bottom: 3px; 214 | padding-top: 3px; 215 | border-radius: 4px; 216 | } 217 | 218 | #adsearch-popup input[name="filter-val"] { 219 | margin-right: 4px; 220 | } 221 | -------------------------------------------------------------------------------- /skins/grey-larry/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/grey-larry/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/grey-larry/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/grey-larry/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/grey-larry/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/grey-larry/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/grey-larry/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/grey-larry/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/grey-larry/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/grey-larry/images/show_mbox_row.jpg -------------------------------------------------------------------------------- /skins/larry/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Larry" */ 2 | 3 | a.icon.advanced_search span.advanced_search { 4 | background-image: url(images/icon-loupe.png) !important; 5 | background-position: 0 !important; 6 | } 7 | 8 | a.button.advanced_search { 9 | text-align: center; 10 | font-size: 10px; 11 | color: #555; 12 | min-width: 50px; 13 | max-width: 75px; 14 | height: 13px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | padding: 28px 2px 0 2px; 19 | text-shadow: 0px 1px 1px #eee; 20 | box-shadow: none; 21 | -moz-box-shadow: none; 22 | -webkit-box-shadow: none; 23 | -o-box-shadow: none; 24 | background: url(../../../../skins/larry/images/buttons.png?v=abf1.36693) -100px 0 no-repeat transparent; 25 | border: 0; 26 | border-radius: 0; 27 | background-position: center -970px; 28 | } 29 | 30 | .records-table tbody .aslabel_mbox td { 31 | border-top: 1px solid #fff; 32 | border-bottom: 1px solid #bbd3da; 33 | cursor: default; 34 | font-weight: normal; 35 | background-color: #d9ecf4; 36 | color: #376572; 37 | text-shadow: 0px 1px 1px #fff; 38 | text-decoration: none; 39 | font-weight: bold; 40 | } 41 | 42 | .records-table tbody .aslabel_mbox .aslabel_found { 43 | top: 3px; 44 | right: 6px; 45 | min-width: 1.8em; 46 | padding: 2px 4px; 47 | background: #82acb5; 48 | background: -moz-linear-gradient(top, #82acb5 0%, #6a939f 100%); 49 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#82acb5), color-stop(100%,#6a939f)); 50 | background: -o-linear-gradient(top, #82acb5 0%, #6a939f 100%); 51 | background: -ms-linear-gradient(top, #82acb5 0%, #6a939f 100%); 52 | background: linear-gradient(top, #82acb5 0%, #6a939f 100%); 53 | box-shadow: inset 0 1px 1px 0 #536d72; 54 | -o-box-shadow: inset 0 1px 1px 0 #536d72; 55 | -webkit-box-shadow: inset 0 1px 1px 0 #536d72; 56 | -moz-box-shadow: inset 0 1px 1px 0 #536d72; 57 | border-radius: 9px; 58 | color: #fff; 59 | text-align: center; 60 | font-weight: bold; 61 | text-shadow: none; 62 | display: block; 63 | } 64 | 65 | #adsearch-popup button.add, #adsearch-popup button.delete{ 66 | display: inline-block; 67 | margin: 0 2px; 68 | padding: 2px 5px; 69 | color: #525252; 70 | text-shadow: 0px 1px 1px #fff; 71 | border: 1px solid #c0c0c0; 72 | border-radius: 4px; 73 | background: #f7f7f7; 74 | background: -moz-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%); 75 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f9f9f9), color-stop(100%,#e6e6e6)); 76 | background: -o-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%); 77 | background: -ms-linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%); 78 | background: linear-gradient(top, #f9f9f9 0%, #e6e6e6 100%); 79 | box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 80 | -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 81 | -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 82 | -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 83 | text-decoration: none; 84 | outline: none; 85 | } 86 | 87 | #adv-search tbody tr { 88 | padding: 4px 10px; 89 | background: #eee; 90 | border-bottom: 2px solid #fff; 91 | } 92 | 93 | #adv-search, #adv-search tr { 94 | width: 100%; 95 | } 96 | 97 | td.adv-search-and-or { 98 | width: 80px; 99 | text-align: center; 100 | } 101 | 102 | #adsearch-popup .mainaction { 103 | height: 24px; 104 | padding-left: 10px; 105 | padding-right: 10px; 106 | margin-right: 10px; 107 | } 108 | 109 | #rcavbox1, #rcavbox2 { 110 | width: 30%; 111 | } 112 | 113 | #rcmrowadvancedsearch td.section { 114 | background-position: 6px -1650px !important; 115 | } 116 | 117 | #rcmrowadvancedsearch.selected td.section { 118 | background-position: 6px -1674px !important; 119 | } 120 | 121 | p.avsearchpref span { 122 | min-width: 280px; 123 | display: block; 124 | max-width: 280px; 125 | float: left; 126 | vertical-align: middle; 127 | } 128 | 129 | p.avsearchpref img { 130 | border-radius: 10px; 131 | } 132 | 133 | p.avsearchpref img.disabled { 134 | -webkit-filter: grayscale(100%); 135 | -moz-filter: grayscale(100%); 136 | filter: grayscale(100%); 137 | } 138 | 139 | button.save_search { 140 | color: #ffffff; 141 | background-color: #2f96b4; 142 | border-radius: 4px; 143 | height: 20px; 144 | padding-left: 10px; 145 | padding-right: 10px; 146 | margin-right: 10px; 147 | } 148 | 149 | input.save_search { 150 | padding: 0 10px 0 10px; 151 | height: 20px; 152 | background: #20b8fb; 153 | border: none; 154 | font-weight: bold; 155 | color: #fff; 156 | text-shadow: none; 157 | background: #6193DF; 158 | background: -moz-linear-gradient(top, #6193DF 0%, #2B84C0 100%); 159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6193DF), color-stop(100%,#2B84C0)); 160 | background: -o-linear-gradient(top, #6193DF 0%, #2B84C0 100%); 161 | background: -ms-linear-gradient(top, #6193DF 0%, #2B84C0 100%); 162 | background: linear-gradient(top, #6193DF 0%, #2B84C0 100%); 163 | } 164 | 165 | input.save_search:active { 166 | background: #81C0EB; 167 | background: -moz-linear-gradient(top, #6193DF 0%, #81C0EB 100%); 168 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6193DF), color-stop(100%,#81C0EB)); 169 | background: -o-linear-gradient(top, #6193DF 0%, #81C0EB 100%); 170 | background: -ms-linear-gradient(top, #6193DF 0%, #81C0EB 100%); 171 | background: linear-gradient(top, #6193DF 0%, #81C0EB 100%); 172 | } 173 | 174 | input.delete_search { 175 | padding: 0 10px 0 10px; 176 | height: 19px; 177 | background: #20b8fb; 178 | border: none; 179 | font-weight: bold; 180 | color: #fff; 181 | text-shadow: none; 182 | background: #85190A; 183 | background: -moz-linear-gradient(top, #85190A 0%, #CA361A 100%); 184 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#85190A), color-stop(100%,#CA361A)); 185 | background: -o-linear-gradient(top, #85190A 0%, #CA361A 100%); 186 | background: -ms-linear-gradient(top, #85190A 0%, #CA361A 100%); 187 | background: linear-gradient(top, #85190A 0%, #CA361A 100%); 188 | } 189 | 190 | input.delete_search:active { 191 | background: #85190A; 192 | background: -moz-linear-gradient(top, #85190A 0%, #F09F98 100%); 193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#85190A), color-stop(100%,#F09F98)); 194 | background: -o-linear-gradient(top, #85190A 0%, #F09F98 100%); 195 | background: -ms-linear-gradient(top, #85190A 0%, #F09F98 100%); 196 | background: linear-gradient(top, #85190A 0%, #F09F98 100%); 197 | } 198 | 199 | 200 | .advanced_search_dialog .ui-dialog-title { 201 | width: 100%; 202 | } 203 | 204 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 205 | border: 1px solid lightgray; 206 | float: right; 207 | display: block; 208 | padding-right: 10px; 209 | -moz-box-shadow: inset 0 0 5px #888; 210 | -webkit-box-shadow: inset 0 0 5px#888; 211 | box-shadow: inner 0 0 5px #888; 212 | padding-left: 10px; 213 | padding-bottom: 3px; 214 | padding-top: 3px; 215 | border-radius: 4px; 216 | } 217 | 218 | #adsearch-popup input[name="filter-val"] { 219 | margin-right: 4px; 220 | } 221 | -------------------------------------------------------------------------------- /skins/larry/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/larry/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/larry/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/larry/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/larry/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/larry/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/larry/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/larry/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/larry/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/larry/images/show_mbox_row.jpg -------------------------------------------------------------------------------- /skins/pink-larry/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Pink-Larry" */ 2 | 3 | a.icon.advanced_search span.advanced_search { 4 | background-image: url(images/icon-loupe.png) !important; 5 | background-position: 0 !important; 6 | } 7 | 8 | a.button.advanced_search { 9 | text-align: center; 10 | font-size: 10px; 11 | color: #fff; 12 | min-width: 50px; 13 | max-width: 75px; 14 | height: 13px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | padding: 28px 2px 0 2px; 19 | text-shadow: none; 20 | box-shadow: none; 21 | -moz-box-shadow: none; 22 | -webkit-box-shadow: none; 23 | -o-box-shadow: none; 24 | background: url(../../../../skins/pink-larry/images/buttons.png?v=abf1.36693) -100px 0 no-repeat transparent; 25 | border: 0; 26 | border-radius: 0; 27 | background-position: center -970px; 28 | } 29 | 30 | .records-table tbody .aslabel_mbox td { 31 | border-top: 1px solid inherit; 32 | border-bottom: 1px solid inherit; 33 | cursor: default; 34 | font-weight: normal; 35 | background-color: inherit; 36 | color: inherit; 37 | text-shadow: none; 38 | text-decoration: none; 39 | font-weight: bold; 40 | } 41 | 42 | .records-table tbody .aslabel_mbox .aslabel_found { 43 | top: 3px; 44 | right: 6px; 45 | min-width: 1.8em; 46 | padding: 2px 4px; 47 | background: inherit; 48 | background: -moz-linear-gradient(top, inherit5 0%, inherit 100%); 49 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 50 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 51 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 52 | background: linear-gradient(top, inherit 0%, inherit 100%); 53 | box-shadow: inset 0 1px 1px 0 inherit; 54 | -o-box-shadow: inset 0 1px 1px 0 inherit; 55 | -webkit-box-shadow: inset 0 1px 1px 0 inherit; 56 | -moz-box-shadow: inset 0 1px 1px 0 inherit; 57 | border-radius: 9px; 58 | color: inherit; 59 | text-align: center; 60 | font-weight: bold; 61 | text-shadow: none; 62 | display: block; 63 | } 64 | 65 | #adsearch-popup button.add, #adsearch-popup button.delete{ 66 | display: inline-block; 67 | margin: 0 2px; 68 | padding: 2px 5px; 69 | color: inherit; 70 | text-shadow: none; 71 | border: 1px solid inherit; 72 | border-radius: 4px; 73 | background: #inherit; 74 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 75 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 76 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 77 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 78 | background: linear-gradient(top, inherit 0%, inherit 100%); 79 | box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 80 | -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 81 | -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 82 | -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 83 | text-decoration: none; 84 | outline: none; 85 | } 86 | 87 | #adv-search tbody tr { 88 | padding: 4px 10px; 89 | background: #eee; 90 | border-bottom: 2px solid inherit; 91 | } 92 | 93 | #adv-search, #adv-search tr { 94 | width: 100%; 95 | } 96 | 97 | td.adv-search-and-or { 98 | width: 80px; 99 | text-align: center; 100 | } 101 | 102 | #adsearch-popup .mainaction { 103 | height: 24px; 104 | padding-left: 10px; 105 | padding-right: 10px; 106 | margin-right: 10px; 107 | } 108 | 109 | #rcavbox1, #rcavbox2 { 110 | width: 30%; 111 | } 112 | 113 | #rcmrowadvancedsearch td.section { 114 | background-position: 6px -1674px !important; 115 | } 116 | 117 | #rcmrowadvancedsearch.selected td.section { 118 | background-position: 6px -1650px !important; 119 | } 120 | 121 | p.avsearchpref span { 122 | min-width: 280px; 123 | display: block; 124 | max-width: 280px; 125 | float: left; 126 | vertical-align: middle; 127 | } 128 | 129 | p.avsearchpref img { 130 | border-radius: 10px; 131 | } 132 | 133 | p.avsearchpref img.disabled { 134 | -webkit-filter: grayscale(100%); 135 | -moz-filter: grayscale(100%); 136 | filter: grayscale(100%); 137 | } 138 | 139 | button.save_search { 140 | color: inherit; 141 | background-color: inherit; 142 | border-radius: 4px; 143 | height: 20px; 144 | padding-left: 10px; 145 | padding-right: 10px; 146 | margin-right: 10px; 147 | } 148 | 149 | input.save_search { 150 | padding: 0 10px 0 10px; 151 | height: 20px; 152 | background: inherit; 153 | border: none; 154 | font-weight: bold; 155 | color: inherit; 156 | text-shadow: none; 157 | background: inherit; 158 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 160 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 161 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 162 | background: linear-gradient(top, inherit 0%, inherit 100%); 163 | } 164 | 165 | input.save_search:active { 166 | background: inherit; 167 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 168 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 169 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 170 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 171 | background: linear-gradient(top, inherit 0%, inherit 100%); 172 | } 173 | 174 | input.delete_search { 175 | padding: 0 10px 0 10px; 176 | height: 19px; 177 | background: inherit; 178 | border: none; 179 | font-weight: bold; 180 | color: inherit; 181 | text-shadow: none; 182 | background: inherit; 183 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 184 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 185 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 186 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 187 | background: linear-gradient(top, inherit 0%, inherit 100%); 188 | } 189 | 190 | input.delete_search:active { 191 | background: inherit; 192 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 194 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 195 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 196 | background: linear-gradient(top, inherit 0%, inherit 100%); 197 | } 198 | 199 | 200 | .advanced_search_dialog .ui-dialog-title { 201 | width: 100%; 202 | } 203 | 204 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 205 | border: 1px solid lightgray; 206 | float: right; 207 | display: block; 208 | padding-right: 10px; 209 | -moz-box-shadow: inset 0 0 5px inherit; 210 | -webkit-box-shadow: inset 0 0 5px inherit; 211 | box-shadow: inner 0 0 5px inherit; 212 | padding-left: 10px; 213 | padding-bottom: 3px; 214 | padding-top: 3px; 215 | border-radius: 4px; 216 | } 217 | 218 | #adsearch-popup input[name="filter-val"] { 219 | margin-right: 4px; 220 | } 221 | -------------------------------------------------------------------------------- /skins/pink-larry/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/pink-larry/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/pink-larry/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/pink-larry/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/pink-larry/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/pink-larry/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/pink-larry/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/pink-larry/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/pink-larry/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/pink-larry/images/show_mbox_row.jpg -------------------------------------------------------------------------------- /skins/plata-larry/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Plata-Larry" */ 2 | 3 | a.icon.advanced_search span.advanced_search { 4 | background-image: url(images/icon-loupe.png) !important; 5 | background-position: 0 !important; 6 | } 7 | 8 | a.button.advanced_search { 9 | text-align: center; 10 | font-size: 10px; 11 | color: #fff; 12 | min-width: 50px; 13 | max-width: 75px; 14 | height: 13px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | padding: 28px 2px 0 2px; 19 | text-shadow: none; 20 | box-shadow: none; 21 | -moz-box-shadow: none; 22 | -webkit-box-shadow: none; 23 | -o-box-shadow: none; 24 | background: url(../../../../skins/blue-larry/images/buttons.png?v=abf1.36693) -100px 0 no-repeat transparent; 25 | border: 0; 26 | border-radius: 0; 27 | background-position: center -970px; 28 | } 29 | 30 | .records-table tbody .aslabel_mbox td { 31 | border-top: 1px solid inherit; 32 | border-bottom: 1px solid inherit; 33 | cursor: default; 34 | font-weight: normal; 35 | background-color: inherit; 36 | color: inherit; 37 | text-shadow: none; 38 | text-decoration: none; 39 | font-weight: bold; 40 | } 41 | 42 | .records-table tbody .aslabel_mbox .aslabel_found { 43 | top: 3px; 44 | right: 6px; 45 | min-width: 1.8em; 46 | padding: 2px 4px; 47 | background: inherit; 48 | background: -moz-linear-gradient(top, inherit5 0%, inherit 100%); 49 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 50 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 51 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 52 | background: linear-gradient(top, inherit 0%, inherit 100%); 53 | box-shadow: inset 0 1px 1px 0 inherit; 54 | -o-box-shadow: inset 0 1px 1px 0 inherit; 55 | -webkit-box-shadow: inset 0 1px 1px 0 inherit; 56 | -moz-box-shadow: inset 0 1px 1px 0 inherit; 57 | border-radius: 9px; 58 | color: inherit; 59 | text-align: center; 60 | font-weight: bold; 61 | text-shadow: none; 62 | display: block; 63 | } 64 | 65 | #adsearch-popup button.add, #adsearch-popup button.delete{ 66 | display: inline-block; 67 | margin: 0 2px; 68 | padding: 2px 5px; 69 | color: inherit; 70 | text-shadow: none; 71 | border: 1px solid inherit; 72 | border-radius: 4px; 73 | background: #inherit; 74 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 75 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 76 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 77 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 78 | background: linear-gradient(top, inherit 0%, inherit 100%); 79 | box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 80 | -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 81 | -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 82 | -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 83 | text-decoration: none; 84 | outline: none; 85 | } 86 | 87 | #adv-search tbody tr { 88 | padding: 4px 10px; 89 | background: #eee; 90 | border-bottom: 2px solid inherit; 91 | } 92 | 93 | #adv-search, #adv-search tr { 94 | width: 100%; 95 | } 96 | 97 | td.adv-search-and-or { 98 | width: 80px; 99 | text-align: center; 100 | } 101 | 102 | #adsearch-popup .mainaction { 103 | height: 24px; 104 | padding-left: 10px; 105 | padding-right: 10px; 106 | margin-right: 10px; 107 | } 108 | 109 | #rcavbox1, #rcavbox2 { 110 | width: 30%; 111 | } 112 | 113 | #rcmrowadvancedsearch td.section { 114 | background-position: 6px -1650px !important; 115 | } 116 | 117 | #rcmrowadvancedsearch.selected td.section { 118 | background-position: 6px -1674px !important; 119 | } 120 | 121 | p.avsearchpref span { 122 | min-width: 280px; 123 | display: block; 124 | max-width: 280px; 125 | float: left; 126 | vertical-align: middle; 127 | } 128 | 129 | p.avsearchpref img { 130 | border-radius: 10px; 131 | } 132 | 133 | p.avsearchpref img.disabled { 134 | -webkit-filter: grayscale(100%); 135 | -moz-filter: grayscale(100%); 136 | filter: grayscale(100%); 137 | } 138 | 139 | button.save_search { 140 | color: inherit; 141 | background-color: inherit; 142 | border-radius: 4px; 143 | height: 20px; 144 | padding-left: 10px; 145 | padding-right: 10px; 146 | margin-right: 10px; 147 | } 148 | 149 | input.save_search { 150 | padding: 0 10px 0 10px; 151 | height: 20px; 152 | background: inherit; 153 | border: none; 154 | font-weight: bold; 155 | color: inherit; 156 | text-shadow: none; 157 | background: inherit; 158 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 160 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 161 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 162 | background: linear-gradient(top, inherit 0%, inherit 100%); 163 | } 164 | 165 | input.save_search:active { 166 | background: inherit; 167 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 168 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 169 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 170 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 171 | background: linear-gradient(top, inherit 0%, inherit 100%); 172 | } 173 | 174 | input.delete_search { 175 | padding: 0 10px 0 10px; 176 | height: 19px; 177 | background: inherit; 178 | border: none; 179 | font-weight: bold; 180 | color: inherit; 181 | text-shadow: none; 182 | background: inherit; 183 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 184 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 185 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 186 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 187 | background: linear-gradient(top, inherit 0%, inherit 100%); 188 | } 189 | 190 | input.delete_search:active { 191 | background: inherit; 192 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 194 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 195 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 196 | background: linear-gradient(top, inherit 0%, inherit 100%); 197 | } 198 | 199 | 200 | .advanced_search_dialog .ui-dialog-title { 201 | width: 100%; 202 | } 203 | 204 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 205 | border: 1px solid lightgray; 206 | float: right; 207 | display: block; 208 | padding-right: 10px; 209 | -moz-box-shadow: inset 0 0 5px inherit; 210 | -webkit-box-shadow: inset 0 0 5px inherit; 211 | box-shadow: inner 0 0 5px inherit; 212 | padding-left: 10px; 213 | padding-bottom: 3px; 214 | padding-top: 3px; 215 | border-radius: 4px; 216 | } 217 | 218 | #adsearch-popup input[name="filter-val"] { 219 | margin-right: 4px; 220 | } 221 | -------------------------------------------------------------------------------- /skins/plata-larry/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/plata-larry/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/plata-larry/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/plata-larry/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/plata-larry/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/plata-larry/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/plata-larry/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/plata-larry/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/plata-larry/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/plata-larry/images/show_mbox_row.jpg -------------------------------------------------------------------------------- /skins/summer-larry/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Summer-Larry" */ 2 | 3 | a.icon.advanced_search span.advanced_search { 4 | background-image: url(images/icon-loupe.png) !important; 5 | background-position: 0 !important; 6 | } 7 | 8 | a.button.advanced_search { 9 | text-align: center; 10 | font-size: 10px; 11 | color: #fff; 12 | min-width: 50px; 13 | max-width: 75px; 14 | height: 13px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | padding: 28px 2px 0 2px; 19 | text-shadow: none; 20 | box-shadow: none; 21 | -moz-box-shadow: none; 22 | -webkit-box-shadow: none; 23 | -o-box-shadow: none; 24 | background: url(../../../../skins/autumn-larry/images/buttons.png?v=abf1.36693) -100px 0 no-repeat transparent; 25 | border: 0; 26 | border-radius: 0; 27 | background-position: center -970px; 28 | } 29 | 30 | .records-table tbody .aslabel_mbox td { 31 | border-top: 1px solid inherit; 32 | border-bottom: 1px solid inherit; 33 | cursor: default; 34 | font-weight: normal; 35 | background-color: inherit; 36 | color: inherit; 37 | text-shadow: none; 38 | text-decoration: none; 39 | font-weight: bold; 40 | } 41 | 42 | .records-table tbody .aslabel_mbox .aslabel_found { 43 | top: 3px; 44 | right: 6px; 45 | min-width: 1.8em; 46 | padding: 2px 4px; 47 | background: inherit; 48 | background: -moz-linear-gradient(top, inherit5 0%, inherit 100%); 49 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 50 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 51 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 52 | background: linear-gradient(top, inherit 0%, inherit 100%); 53 | box-shadow: inset 0 1px 1px 0 inherit; 54 | -o-box-shadow: inset 0 1px 1px 0 inherit; 55 | -webkit-box-shadow: inset 0 1px 1px 0 inherit; 56 | -moz-box-shadow: inset 0 1px 1px 0 inherit; 57 | border-radius: 9px; 58 | color: inherit; 59 | text-align: center; 60 | font-weight: bold; 61 | text-shadow: none; 62 | display: block; 63 | } 64 | 65 | #adsearch-popup button.add, #adsearch-popup button.delete{ 66 | display: inline-block; 67 | margin: 0 2px; 68 | padding: 2px 5px; 69 | color: inherit; 70 | text-shadow: none; 71 | border: 1px solid inherit; 72 | border-radius: 4px; 73 | background: #inherit; 74 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 75 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 76 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 77 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 78 | background: linear-gradient(top, inherit 0%, inherit 100%); 79 | box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 80 | -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 81 | -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 82 | -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 83 | text-decoration: none; 84 | outline: none; 85 | } 86 | 87 | #adv-search tbody tr { 88 | padding: 4px 10px; 89 | background: #eee; 90 | border-bottom: 2px solid inherit; 91 | } 92 | 93 | #adv-search, #adv-search tr { 94 | width: 100%; 95 | } 96 | 97 | td.adv-search-and-or { 98 | width: 80px; 99 | text-align: center; 100 | } 101 | 102 | #adsearch-popup .mainaction { 103 | height: 24px; 104 | padding-left: 10px; 105 | padding-right: 10px; 106 | margin-right: 10px; 107 | } 108 | 109 | #rcavbox1, #rcavbox2 { 110 | width: 30%; 111 | } 112 | 113 | #rcmrowadvancedsearch td.section { 114 | background-position: 6px -1674px !important; 115 | } 116 | 117 | #rcmrowadvancedsearch.selected td.section { 118 | background-position: 6px -1650px !important; 119 | } 120 | 121 | p.avsearchpref span { 122 | min-width: 280px; 123 | display: block; 124 | max-width: 280px; 125 | float: left; 126 | vertical-align: middle; 127 | } 128 | 129 | p.avsearchpref img { 130 | border-radius: 10px; 131 | } 132 | 133 | p.avsearchpref img.disabled { 134 | -webkit-filter: grayscale(100%); 135 | -moz-filter: grayscale(100%); 136 | filter: grayscale(100%); 137 | } 138 | 139 | button.save_search { 140 | color: inherit; 141 | background-color: inherit; 142 | border-radius: 4px; 143 | height: 20px; 144 | padding-left: 10px; 145 | padding-right: 10px; 146 | margin-right: 10px; 147 | } 148 | 149 | input.save_search { 150 | padding: 0 10px 0 10px; 151 | height: 20px; 152 | background: inherit; 153 | border: none; 154 | font-weight: bold; 155 | color: inherit; 156 | text-shadow: none; 157 | background: inherit; 158 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 160 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 161 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 162 | background: linear-gradient(top, inherit 0%, inherit 100%); 163 | } 164 | 165 | input.save_search:active { 166 | background: inherit; 167 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 168 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 169 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 170 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 171 | background: linear-gradient(top, inherit 0%, inherit 100%); 172 | } 173 | 174 | input.delete_search { 175 | padding: 0 10px 0 10px; 176 | height: 19px; 177 | background: inherit; 178 | border: none; 179 | font-weight: bold; 180 | color: inherit; 181 | text-shadow: none; 182 | background: inherit; 183 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 184 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 185 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 186 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 187 | background: linear-gradient(top, inherit 0%, inherit 100%); 188 | } 189 | 190 | input.delete_search:active { 191 | background: inherit; 192 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 194 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 195 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 196 | background: linear-gradient(top, inherit 0%, inherit 100%); 197 | } 198 | 199 | 200 | .advanced_search_dialog .ui-dialog-title { 201 | width: 100%; 202 | } 203 | 204 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 205 | border: 1px solid lightgray; 206 | float: right; 207 | display: block; 208 | padding-right: 10px; 209 | -moz-box-shadow: inset 0 0 5px inherit; 210 | -webkit-box-shadow: inset 0 0 5px inherit; 211 | box-shadow: inner 0 0 5px inherit; 212 | padding-left: 10px; 213 | padding-bottom: 3px; 214 | padding-top: 3px; 215 | border-radius: 4px; 216 | } 217 | 218 | #adsearch-popup input[name="filter-val"] { 219 | margin-right: 4px; 220 | } 221 | -------------------------------------------------------------------------------- /skins/summer-larry/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/summer-larry/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/summer-larry/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/summer-larry/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/summer-larry/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/summer-larry/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/summer-larry/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/summer-larry/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/summer-larry/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/summer-larry/images/show_mbox_row.jpg -------------------------------------------------------------------------------- /skins/teal-larry/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Teal-Larry" */ 2 | 3 | a.icon.advanced_search span.advanced_search { 4 | background-image: url(images/icon-loupe.png) !important; 5 | background-position: 0 !important; 6 | } 7 | 8 | a.button.advanced_search { 9 | text-align: center; 10 | font-size: 10px; 11 | color: #fff; 12 | min-width: 50px; 13 | max-width: 75px; 14 | height: 13px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | padding: 28px 2px 0 2px; 19 | text-shadow: none; 20 | box-shadow: none; 21 | -moz-box-shadow: none; 22 | -webkit-box-shadow: none; 23 | -o-box-shadow: none; 24 | background: url(../../../../skins/teal-larry/images/buttons.png?v=abf1.36693) -100px 0 no-repeat transparent; 25 | border: 0; 26 | border-radius: 0; 27 | background-position: center -970px; 28 | } 29 | 30 | .records-table tbody .aslabel_mbox td { 31 | border-top: 1px solid inherit; 32 | border-bottom: 1px solid inherit; 33 | cursor: default; 34 | font-weight: normal; 35 | background-color: inherit; 36 | color: inherit; 37 | text-shadow: none; 38 | text-decoration: none; 39 | font-weight: bold; 40 | } 41 | 42 | .records-table tbody .aslabel_mbox .aslabel_found { 43 | top: 3px; 44 | right: 6px; 45 | min-width: 1.8em; 46 | padding: 2px 4px; 47 | background: inherit; 48 | background: -moz-linear-gradient(top, inherit5 0%, inherit 100%); 49 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 50 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 51 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 52 | background: linear-gradient(top, inherit 0%, inherit 100%); 53 | box-shadow: inset 0 1px 1px 0 inherit; 54 | -o-box-shadow: inset 0 1px 1px 0 inherit; 55 | -webkit-box-shadow: inset 0 1px 1px 0 inherit; 56 | -moz-box-shadow: inset 0 1px 1px 0 inherit; 57 | border-radius: 9px; 58 | color: inherit; 59 | text-align: center; 60 | font-weight: bold; 61 | text-shadow: none; 62 | display: block; 63 | } 64 | 65 | #adsearch-popup button.add, #adsearch-popup button.delete{ 66 | display: inline-block; 67 | margin: 0 2px; 68 | padding: 2px 5px; 69 | color: inherit; 70 | text-shadow: none; 71 | border: 1px solid inherit; 72 | border-radius: 4px; 73 | background: #inherit; 74 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 75 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 76 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 77 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 78 | background: linear-gradient(top, inherit 0%, inherit 100%); 79 | box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 80 | -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 81 | -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 82 | -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 83 | text-decoration: none; 84 | outline: none; 85 | } 86 | 87 | #adv-search tbody tr { 88 | padding: 4px 10px; 89 | background: #eee; 90 | border-bottom: 2px solid inherit; 91 | } 92 | 93 | #adv-search, #adv-search tr { 94 | width: 100%; 95 | } 96 | 97 | td.adv-search-and-or { 98 | width: 80px; 99 | text-align: center; 100 | } 101 | 102 | #adsearch-popup .mainaction { 103 | height: 24px; 104 | padding-left: 10px; 105 | padding-right: 10px; 106 | margin-right: 10px; 107 | } 108 | 109 | #rcavbox1, #rcavbox2 { 110 | width: 30%; 111 | } 112 | 113 | #rcmrowadvancedsearch td.section { 114 | background-position: 6px -1650px !important; 115 | } 116 | 117 | #rcmrowadvancedsearch.selected td.section { 118 | background-position: 6px -1674px !important; 119 | } 120 | 121 | p.avsearchpref span { 122 | min-width: 280px; 123 | display: block; 124 | max-width: 280px; 125 | float: left; 126 | vertical-align: middle; 127 | } 128 | 129 | p.avsearchpref img { 130 | border-radius: 10px; 131 | } 132 | 133 | p.avsearchpref img.disabled { 134 | -webkit-filter: grayscale(100%); 135 | -moz-filter: grayscale(100%); 136 | filter: grayscale(100%); 137 | } 138 | 139 | button.save_search { 140 | color: inherit; 141 | background-color: inherit; 142 | border-radius: 4px; 143 | height: 20px; 144 | padding-left: 10px; 145 | padding-right: 10px; 146 | margin-right: 10px; 147 | } 148 | 149 | input.save_search { 150 | padding: 0 10px 0 10px; 151 | height: 20px; 152 | background: inherit; 153 | border: none; 154 | font-weight: bold; 155 | color: inherit; 156 | text-shadow: none; 157 | background: inherit; 158 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 160 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 161 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 162 | background: linear-gradient(top, inherit 0%, inherit 100%); 163 | } 164 | 165 | input.save_search:active { 166 | background: inherit; 167 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 168 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 169 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 170 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 171 | background: linear-gradient(top, inherit 0%, inherit 100%); 172 | } 173 | 174 | input.delete_search { 175 | padding: 0 10px 0 10px; 176 | height: 19px; 177 | background: inherit; 178 | border: none; 179 | font-weight: bold; 180 | color: inherit; 181 | text-shadow: none; 182 | background: inherit; 183 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 184 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 185 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 186 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 187 | background: linear-gradient(top, inherit 0%, inherit 100%); 188 | } 189 | 190 | input.delete_search:active { 191 | background: inherit; 192 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 194 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 195 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 196 | background: linear-gradient(top, inherit 0%, inherit 100%); 197 | } 198 | 199 | 200 | .advanced_search_dialog .ui-dialog-title { 201 | width: 100%; 202 | } 203 | 204 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 205 | border: 1px solid lightgray; 206 | float: right; 207 | display: block; 208 | padding-right: 10px; 209 | -moz-box-shadow: inset 0 0 5px inherit; 210 | -webkit-box-shadow: inset 0 0 5px inherit; 211 | box-shadow: inner 0 0 5px inherit; 212 | padding-left: 10px; 213 | padding-bottom: 3px; 214 | padding-top: 3px; 215 | border-radius: 4px; 216 | } 217 | 218 | #adsearch-popup input[name="filter-val"] { 219 | margin-right: 4px; 220 | } 221 | -------------------------------------------------------------------------------- /skins/teal-larry/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/teal-larry/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/teal-larry/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/teal-larry/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/teal-larry/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/teal-larry/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/teal-larry/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/teal-larry/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/teal-larry/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/teal-larry/images/show_mbox_row.jpg -------------------------------------------------------------------------------- /skins/violet-larry/advanced_search.css: -------------------------------------------------------------------------------- 1 | /* Advanced Search "Violet-Larry" */ 2 | 3 | a.icon.advanced_search span.advanced_search { 4 | background-image: url(images/icon-loupe.png) !important; 5 | background-position: 0 !important; 6 | } 7 | 8 | a.button.advanced_search { 9 | text-align: center; 10 | font-size: 10px; 11 | color: #fff; 12 | min-width: 50px; 13 | max-width: 75px; 14 | height: 13px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | padding: 28px 2px 0 2px; 19 | text-shadow: none; 20 | box-shadow: none; 21 | -moz-box-shadow: none; 22 | -webkit-box-shadow: none; 23 | -o-box-shadow: none; 24 | background: url(../../../../skins/violet-larry/images/buttons.png?v=abf1.36693) -100px 0 no-repeat transparent; 25 | border: 0; 26 | border-radius: 0; 27 | background-position: center -970px; 28 | } 29 | 30 | .records-table tbody .aslabel_mbox td { 31 | border-top: 1px solid inherit; 32 | border-bottom: 1px solid inherit; 33 | cursor: default; 34 | font-weight: normal; 35 | background-color: inherit; 36 | color: inherit; 37 | text-shadow: none; 38 | text-decoration: none; 39 | font-weight: bold; 40 | } 41 | 42 | .records-table tbody .aslabel_mbox .aslabel_found { 43 | top: 3px; 44 | right: 6px; 45 | min-width: 1.8em; 46 | padding: 2px 4px; 47 | background: inherit; 48 | background: -moz-linear-gradient(top, inherit5 0%, inherit 100%); 49 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 50 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 51 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 52 | background: linear-gradient(top, inherit 0%, inherit 100%); 53 | box-shadow: inset 0 1px 1px 0 inherit; 54 | -o-box-shadow: inset 0 1px 1px 0 inherit; 55 | -webkit-box-shadow: inset 0 1px 1px 0 inherit; 56 | -moz-box-shadow: inset 0 1px 1px 0 inherit; 57 | border-radius: 9px; 58 | color: inherit; 59 | text-align: center; 60 | font-weight: bold; 61 | text-shadow: none; 62 | display: block; 63 | } 64 | 65 | #adsearch-popup button.add, #adsearch-popup button.delete{ 66 | display: inline-block; 67 | margin: 0 2px; 68 | padding: 2px 5px; 69 | color: inherit; 70 | text-shadow: none; 71 | border: 1px solid inherit; 72 | border-radius: 4px; 73 | background: #inherit; 74 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 75 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 76 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 77 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 78 | background: linear-gradient(top, inherit 0%, inherit 100%); 79 | box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 80 | -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 81 | -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 82 | -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3); 83 | text-decoration: none; 84 | outline: none; 85 | } 86 | 87 | #adv-search tbody tr { 88 | padding: 4px 10px; 89 | background: #eee; 90 | border-bottom: 2px solid inherit; 91 | } 92 | 93 | #adv-search, #adv-search tr { 94 | width: 100%; 95 | } 96 | 97 | td.adv-search-and-or { 98 | width: 80px; 99 | text-align: center; 100 | } 101 | 102 | #adsearch-popup .mainaction { 103 | height: 24px; 104 | padding-left: 10px; 105 | padding-right: 10px; 106 | margin-right: 10px; 107 | } 108 | 109 | #rcavbox1, #rcavbox2 { 110 | width: 30%; 111 | } 112 | 113 | #rcmrowadvancedsearch td.section { 114 | background-position: 6px -1674px !important; 115 | } 116 | 117 | #rcmrowadvancedsearch.selected td.section { 118 | background-position: 6px -1650px !important; 119 | } 120 | 121 | p.avsearchpref span { 122 | min-width: 280px; 123 | display: block; 124 | max-width: 280px; 125 | float: left; 126 | vertical-align: middle; 127 | } 128 | 129 | p.avsearchpref img { 130 | border-radius: 10px; 131 | } 132 | 133 | p.avsearchpref img.disabled { 134 | -webkit-filter: grayscale(100%); 135 | -moz-filter: grayscale(100%); 136 | filter: grayscale(100%); 137 | } 138 | 139 | button.save_search { 140 | color: inherit; 141 | background-color: inherit; 142 | border-radius: 4px; 143 | height: 20px; 144 | padding-left: 10px; 145 | padding-right: 10px; 146 | margin-right: 10px; 147 | } 148 | 149 | input.save_search { 150 | padding: 0 10px 0 10px; 151 | height: 20px; 152 | background: inherit; 153 | border: none; 154 | font-weight: bold; 155 | color: inherit; 156 | text-shadow: none; 157 | background: inherit; 158 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 160 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 161 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 162 | background: linear-gradient(top, inherit 0%, inherit 100%); 163 | } 164 | 165 | input.save_search:active { 166 | background: inherit; 167 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 168 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 169 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 170 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 171 | background: linear-gradient(top, inherit 0%, inherit 100%); 172 | } 173 | 174 | input.delete_search { 175 | padding: 0 10px 0 10px; 176 | height: 19px; 177 | background: inherit; 178 | border: none; 179 | font-weight: bold; 180 | color: inherit; 181 | text-shadow: none; 182 | background: inherit; 183 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 184 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 185 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 186 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 187 | background: linear-gradient(top, inherit 0%, inherit 100%); 188 | } 189 | 190 | input.delete_search:active { 191 | background: inherit; 192 | background: -moz-linear-gradient(top, inherit 0%, inherit 100%); 193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,inherit), color-stop(100%,inherit)); 194 | background: -o-linear-gradient(top, inherit 0%, inherit 100%); 195 | background: -ms-linear-gradient(top, inherit 0%, inherit 100%); 196 | background: linear-gradient(top, inherit 0%, inherit 100%); 197 | } 198 | 199 | 200 | .advanced_search_dialog .ui-dialog-title { 201 | width: 100%; 202 | } 203 | 204 | .advanced_search_dialog .ui-dialog-title span.saved_searches { 205 | border: 1px solid lightgray; 206 | float: right; 207 | display: block; 208 | padding-right: 10px; 209 | -moz-box-shadow: inset 0 0 5px inherit; 210 | -webkit-box-shadow: inset 0 0 5px inherit; 211 | box-shadow: inner 0 0 5px inherit; 212 | padding-left: 10px; 213 | padding-bottom: 3px; 214 | padding-top: 3px; 215 | border-radius: 4px; 216 | } 217 | 218 | #adsearch-popup input[name="filter-val"] { 219 | margin-right: 4px; 220 | } 221 | -------------------------------------------------------------------------------- /skins/violet-larry/images/icon-loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/violet-larry/images/icon-loupe.png -------------------------------------------------------------------------------- /skins/violet-larry/images/menu_location_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/violet-larry/images/menu_location_a.jpg -------------------------------------------------------------------------------- /skins/violet-larry/images/menu_location_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/violet-larry/images/menu_location_b.jpg -------------------------------------------------------------------------------- /skins/violet-larry/images/show_mbox_col.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/violet-larry/images/show_mbox_col.jpg -------------------------------------------------------------------------------- /skins/violet-larry/images/show_mbox_row.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/texxasrulez/advanced_search/0b13c962f93adad18fce656a39d885c6fda8d90b/skins/violet-larry/images/show_mbox_row.jpg --------------------------------------------------------------------------------