Opened 7 years ago

Closed 6 years ago

#1483965 closed Bugs (fixed)

Delete button tooltip wrong when in Trash folder

Reported by: mtu Owned by:
Priority: 5 Milestone: 0.1-rc2
Component: Interface Version: 0.1-beta
Severity: trivial Keywords: tooltip
Cc:

Description

When inside the trash folder, deleting a message permanently removes it. However, the tooltip of the delete button still says "Move messages to trash".

Change History (4)

comment:1 Changed 7 years ago by seansan

We can alter this message - although I dont think this is hig prio - by something like:

problem 1 - fix somewhere in beginning of func.inc
. Checking the GET var _mbox or $_SESSIONmbox? for a match with $CONFIGtrash_mbox? (and maybe unencode)
.. i true we alter the ALT text of the delete button through JS to deletetxt2
.. if false we reset to the ALT text of the delete button through JS to deletetxt1

added to list.inc

// alter delete tooltip according to folder
if ($CONFIG['trash_mbox'] && ($_SESSION['mbox'] == $CONFIG['trash_mbox'])) 
	{
	$commands .= sprintf("rcube_set_alt('rcmbtn110', '%s');\n", $labels['deletemessage']);
	}
	else 
	{
	$commands .= sprintf("rcube_set_alt('rcmbtn110', '%s');\n", $labels['addtoaddressbook']);
	}

added to common.js

// alter the alt value of images (and maybe added later - links)
function rcube_set_alt(img_id, new_value) {
	if (document.getElementById)
		var x = document.getElementById(img_id).getElementsByTagName('IMG');
	else if (document.all)
		var x = document.all[img_id].all.tags('IMG');
	else return;
	x.setattribute(’alt’,new_value)
}

There is only something wrong with the javascript, as th alt text does not change. Haven't figured that out yet. Anyone?
Furthermore we need to add a new label for the second message. Used addressbook now.
Don't know if we can access the image directly through an object. I saw the buttons beeing defined somewhere in func.php I think. Maybe there is an easier way

comment:2 Changed 6 years ago by robin

Personally I think that $labelsdeletemessage? should say 'Delete message' instead of 'Move message to trash'. The definition in the skin or the language file has no knowledge of wether a Trash box is going to be used or not.

comment:3 Changed 6 years ago by thomasb

  • Milestone changed from 0.1-rc1 to 0.1-rc2

comment:4 Changed 6 years ago by thomasb

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in trunk [eb684206]. Changed the label 'deletemessage' and added new label 'movemessagetotrash'

Note: See TracTickets for help on using tickets.