Results 1 to 3 of 3

Thread: How to make a folder view like in a Draft folder?

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Posts
    30
    Rep Power
    3

    Default How to make a folder view like in a Draft folder?

    I want to create another folder to hold some draft email other than the Default draft folder.

    The folder can be created easily, and moving of the message can make use of itemactionrequest, the header of the listview can also amend easily by changing the isoutboundfolder function in listview js, but I have some problem about the content of the listview...

    The problem is the To address field can not display, although the list inside of the listview hold the msgs, the to address inside the msg is null...

  2. #2
    Join Date
    Feb 2012
    Posts
    30
    Rep Power
    3

    Default

    The tricks is in the function _executeJson in ZmSeach.js

    Code:
    var folder = appCtxt.getById(this.folderId);
    if (folder &&
    	(folder.isUnder(ZmFolder.ID_SENT) ||
    	folder.isUnder(ZmFolder.ID_DRAFTS) ||
    	folder.isUnder(ZmFolder.ID_OUTBOX)))
    {
    	request.recip = 1;
    }

  3. #3
    Join Date
    Feb 2012
    Posts
    30
    Rep Power
    3

    Default

    There is a strange thing when I analysis the source code of ZmMailListView

    I found that when I move the mouse pointer to the To field in Sent box, the information of the tooltips is not about the To address, it is about From address.

    And in the source code, the tooltips address information is from field, although there is if cause......

    I test it within the free edition, and my colleague test it in paid network version also appear this, is this a bug or just I have wrong understanding?

    Code:
    ZmMailListView.prototype._getToolTip =
    function(params) {
    	var tooltip, field = params.field, item = params.item, matchIndex = params.match.participant;
    	if (!item) { return; }
    	var folder = appCtxt.getById(item.folderId);
    
    	if (field == ZmItem.F_STATUS) {
    		tooltip = item.getStatusTooltip();
    	}
    	else if (appCtxt.get(ZmSetting.CONTACTS_ENABLED) &&
    			(field == ZmItem.F_FROM || field == ZmItem.F_PARTICIPANT))
    	{
    		var addr;
    		if (field == ZmItem.F_FROM) { 
    			addr = item.getAddress(AjxEmailAddress.FROM);
    		} else if (field == ZmItem.F_PARTICIPANT) {
    			var matchIndex = (matchIndex != null) ? parseInt(matchIndex) : 0;
    			addr = item.participants && item.participants.get(matchIndex);
    		}
    		if (!addr) {
    			return;
    		}
    		
    		var ttParams = {
    			address:	item.getAddress(AjxEmailAddress.FROM),
    			ev:			params.ev
    		}
    		var ttCallback = new AjxCallback(this,
    			function(callback) {
    				appCtxt.getToolTipMgr().getToolTip(ZmToolTipMgr.PERSON, ttParams, callback);
    			});
    		tooltip = {callback:ttCallback};
    	}
    	else if (field == ZmItem.F_SUBJECT) {
    		if ((item.type == ZmItem.MSG) && item.isInvite() && item.needsRsvp()) {
    			tooltip = item.invite.getToolTip();
    		} else if (appCtxt.get(ZmSetting.SHOW_FRAGMENTS)) {
    		    tooltip = AjxStringUtil.htmlEncode(item.fragment || ZmMsg.fragmentIsEmpty);
    			var folderTip = null;
    			if (folder && folder.parent) {
    				folderTip = AjxMessageFormat.format(ZmMsg.accountDownloadToFolder, folder.getPath());
    			}
    			tooltip = folderTip ? [tooltip, folderTip].join("<br>") : tooltip;
            }
    	}
    	else if (field == ZmItem.F_FOLDER) {
    		if (folder && folder.parent) {
    			var name = folder.getName();
    			var path = folder.getPath();
    			if (path != name) {
    				tooltip = path;
    			}
    		}
    	}
    	else if (field == ZmItem.F_ACCOUNT) {
    		tooltip = item.getAccount().getDisplayName();
    	}
    	else {
    		tooltip = ZmListView.prototype._getToolTip.apply(this, arguments);
    	}
    	
    	return tooltip;
    };

Similar Threads

  1. Outlook sync client
    By KevinH in forum Zimbra Connector for Outlook
    Replies: 600
    Last Post: 02-28-2011, 08:56 AM
  2. .pst migration issues
    By jimklein in forum Migration
    Replies: 13
    Last Post: 02-16-2009, 01:55 AM
  3. can't you help me
    By iwan siahaan in forum Administrators
    Replies: 6
    Last Post: 12-17-2007, 06:53 PM
  4. Replies: 3
    Last Post: 08-11-2007, 01:40 PM
  5. Replies: 1
    Last Post: 08-22-2006, 11:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •