Skip to content

Commit

Permalink
Renamed dropdown css class to not interfere with framework class when…
Browse files Browse the repository at this point in the history
… cypht is embedded
  • Loading branch information
josaphatim committed Aug 12, 2023
1 parent d406654 commit faa6ded
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modules/imap/output_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ protected function output() {
$blocked_senders = get_blocked_senders_array($imap_server, $this->get('site_config'), $this->get('user_config'));
$sender_blocked = in_array($sender, $blocked_senders);
$domain_blocked = in_array($domain, $blocked_senders);
$txt .= ' | <div style="display: inline-block;"><a class="block_sender_link hlink'.($domain_blocked || $sender_blocked ? '" id="unblock_sender" data-target="'.($domain_blocked? 'domain':'sender').'"' : ' dropdown-toggle"').' href="#"><img src="'.Hm_Image_Sources::$lock.'" width="10px"></img> <span id="filter_block_txt">'.$this->trans($domain_blocked ? 'Unblock Domain' : ($sender_blocked ? 'Unblock Sender' : 'Block Sender')).'</span></a>
<div class="dropdown">'
$txt .= ' | <div style="display: inline-block;"><a class="block_sender_link hlink'.($domain_blocked || $sender_blocked ? '" id="unblock_sender" data-target="'.($domain_blocked? 'domain':'sender').'"' : ' cypht-dropdown-toggle"').' href="#"><img src="'.Hm_Image_Sources::$lock.'" width="10px"></img> <span id="filter_block_txt">'.$this->trans($domain_blocked ? 'Unblock Domain' : ($sender_blocked ? 'Unblock Sender' : 'Block Sender')).'</span></a>
<div class="cypht-dropdown">'
.'<form id="block_sender_form"><div><label>'.$this->trans('Who Is Blocked').'</label>'
.'<select name="scope">'
.'<option value="sender">'.$this->trans('This Sender').'</option>'
Expand Down
6 changes: 3 additions & 3 deletions modules/imap/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,15 +644,15 @@ var block_unblock_sender = function(msg_uid, detail, scope, action, sender = '',
$("#filter_block_txt").html(title);
$("#filter_block_txt")
.parent()
.removeClass('dropdown-toggle')
.removeClass('cypht-dropdown-toggle')
.attr('id', 'unblock_sender')
.data('target', scope);
}
if (/^(Sender|Domain) Unblocked$/.test(res.router_user_msgs[0])) {
$("#filter_block_txt").html('BLOCK SENDER');
$("#filter_block_txt")
.parent()
.addClass('dropdown-toggle')
.addClass('cypht-dropdown-toggle')
.removeAttr('id');
}
},
Expand Down Expand Up @@ -1138,7 +1138,7 @@ $(function() {
Hm_Timer.add_job(imap_prefetch_msgs, prefetch_interval, true);
setTimeout(prefetch_imap_folders, 2);

$(document).on('click', '.dropdown-toggle', function(e) {
$(document).on('click', '.cypht-dropdown-toggle', function(e) {
e.preventDefault();
$(this).next().toggle();
});
Expand Down

0 comments on commit faa6ded

Please sign in to comment.