v5.0-git
--------
+[mms] Added contextmenu support in DIMP for Opera.
[mms] Display HTML parts inline by using IFRAMEs (based on code by
rui.carneiro@portugalmail.net; Request #8592).
[mms] Add ability to search by relative date intervals (Request #3438).
* document, and works only where these are possible to override. It allows
* contextmenus to be created via both a left and right mouse click.
*
+ * On Opera, the context menu is triggered by a left click + SHIFT + CTRL
+ * combination.
+ *
* Requires prototypejs 1.6+ and scriptaculous 1.8+ (effects.js only).
*
* Original code by Havard Eide (http://eide.org/) released under the MIT
this.submenus = $H();
this.triggers = [];
- document.observe('contextmenu', this._rightClickHandler.bindAsEventListener(this));
+ if (!Prototype.Browser.Opera) {
+ document.observe('contextmenu', this._rightClickHandler.bindAsEventListener(this));
+ }
document.observe('click', this._leftClickHandler.bindAsEventListener(this));
document.observe(Prototype.Browser.Gecko ? 'DOMMouseScroll' : 'mousescroll', this.close.bind(this));
},
{
var base, elt, elt_up, trigger;
+ if (this.operaCheck(e)) {
+ this._rightClickHandler(e, false);
+ e.stop();
+ return;
+ }
+
// Check for a right click. FF on Linux triggers an onclick event even
// w/a right click, so disregard.
if (e.isRightClick()) {
},
/**
+ * Checks if the Opera right-click emulation is present.
+ */
+ operaCheck: function(e)
+ {
+ return Prototype.Browser.Opera && e.shiftKey && e.ctrlKey;
+ },
+
+ /**
* Called when a right click event occurs.
*/
_rightClickHandler: function(e, left)
clickHandler: function(parentfunc, e)
{
- if (e.isRightClick()) {
+ if (e.isRightClick() || DimpCore.DMenu.operaCheck(e)) {
return;
}
d.selectIfNoDrag = false;
// Handle selection first.
- if (!args.right && (e.ctrlKey || e.metaKey)) {
+ if (DimpCore.DMenu.operaCheck(e)) {
+ if (!DimpBase.isSelected('domid', id)) {
+ DimpBase.msgSelect(id, { right: true });
+ }
+ } else if (!args.right && (e.ctrlKey || e.metaKey)) {
DimpBase.msgSelect(id, $H({ ctrl: true }).merge(args).toObject());
} else if (e.shiftKey) {
DimpBase.msgSelect(id, $H({ shift: true }).merge(args).toObject());
scroll: 'normalfolders',
threshold: 5,
onStart: function(d, e) {
- $('msgBodyCover').clonePosition('msgBody').show();
+ if (DimpCore.DMenu.operaCheck(e)) {
+ d.opera = true;
+ } else {
+ d.opera = false;
+ $('msgBodyCover').clonePosition('msgBody').show();
+ }
},
onDrag: function(d, e) {
- if (!d.wasDragged) {
+ if (!d.opera && !d.wasDragged) {
$('folderopts').hide();
$('dropbase').show();
d.ghost.removeClassName('on');
}
},
onEnd: function(d, e) {
- if (d.wasDragged) {
- $('folderopts').show();
- $('dropbase').hide();
+ if (!d.opera) {
+ if (d.wasDragged) {
+ $('folderopts').show();
+ $('dropbase').hide();
+ }
+ $('msgBodyCover').hide();
}
- $('msgBodyCover').hide();
}
};
<div id="previewPane" style="display:none">
<span id="msgLoading" class="loadingImg" style="display:none"></span>
<div id="previewInfo" style="display:none">
- <?php echo _("To preview a message, select it from the list above. A right-click on the messages will display available actions.") ?><br />
+ <?php echo _("To preview a message, select it from the list above.") ?>
+ <br />
+<?php if ($browser->isBrowser('opera')): ?>
+ <?php echo _("A left click") ?> + <span class="kbd"><?php echo _("Shift") ?></span> + <span class="kbd"><?php echo _("Ctrl") ?></span> <?php echo _("will display available actions.") ?>
+<?php else: ?>
+ <?php echo _("A right-click on a message or a folder will display available actions.") ?>
+<?php endif; ?>
+ <br />
<?php printf(_("Click on a message while holding down the %s key to select multiple messages. To select a range of messages, click the first message of the range, navigate to the last message of the range, and then click on the last message while holding down the %s key."), '<span class="kbd">' . _("Ctrl") . '</span>', '<span class="kbd">' . _("Shift") . '</span>') ?><br /><br />
<?php echo _("The following keyboard shortcuts are available:") ?><br />
<span class="iconImg keyupImg"></span> / <span class="iconImg keydownImg"></span> : <?php echo _("Move up/down through the message list.") ?><br />