function buildMessageButtons(content){ var data = getTabData(); //FLAGS BUTTON SET content.find(".message-flags").find(".message-important-flag").button({ icons: { primary: "ui-icon-notice" }, text: false }).click(function(){ var checked = $(this).attr("checked") == "checked" ? true : false; set_message_flag(data.id, checked ? "flagged" : "unflagged", undefined, data.folder); write_msg(get_lang('Message marked as ') + get_lang( checked ? "Important" : "Normal")); refresh(); }).end().find(".message-unread-flag").button({ icons: { primary: "ui-icon-mail-closed" }, text: false }).click(function(){ var checked = $(this).attr("checked") == "checked" ? true : false; set_message_flag(data.id, checked ? "unseen" : "seen", undefined, data.folder); write_msg(get_lang('Message marked as ') + get_lang( checked ? "Unseen" : "Seen")); refresh(); }).end().find(".message-spam-flag").button({ icons: { primary: "ui-icon-alert" }, text: false }).click(function(){ var checked = $(this).attr("checked") == "checked" ? true : false; checked ? spam(data.folder, data.id,'null') : nospam(data.id,'null', data.folder); removeTab(); refresh(); }).end().find(".message-followup-flag").button({ icons: { primary: "ui-icon-flag" }, text: false }); content.find(".message-flags").buttonset(); //MESSAGES ACTION NEXT PREV BUTTON SET content.find(".messages-controll").find(".message-prev").button({ icons: { primary: "ui-icon-carat-1-w" }, text: false }).click(function(){ }).next().button({ icons: { primary: "ui-icon-carat-1-e" }, text: false }); content.find(".messages-controll").buttonset(); // content.find(".message-forward").button({ icons:{ primary: "ui-icon-arrowreturnthick-1-e" }, text : false }); var teste = content.find(".message-reply-menu-content").clone(); content.find(".message-reply-menu-content").remove(); content.find(".button.message-reply").button({ icons:{ primary: "ui-icon-arrowreturnthick-1-w" }, text : false }).next().button({ icons:{ primary: "ui-icon-triangle-1-s" }, text : false }).parent().buttonset(); content.find("span.message-reply").append(teste); content.find(".message-reply").next().menuPlugin({ content : content.find(".message-reply-menu-content").html(), positionOpts: { posX: 'left', posY: 'bottom', offsetX: -140, offsetY: 0, directionH: 'right', directionV: 'down', detectH: true, // do horizontal collision detection detectV: true, // do vertical collision detection linkToFront: false }, flyOut: true, showSpeed: 100, crumbDefaultText: '>' }); content.find(".button.message-edit").button({ icons:{ primary: "ui-icon-pencil" }, text : false }); //BUTTON MORE AND TAGS content.find(".message-tags").button({ icons: { primary: "ui-icon-tag", secondary: "ui-icon-triangle-1-s" }, text: false }).next().next().button({ icons: { secondary: "ui-icon-triangle-1-s" }, text: true }); content.find(".message-more").menuPlugin({ content : content.find(".message-more-menu-content").html(), flyOut: true, positionOpts: { posX: 'left', posY: 'bottom', offsetX: -140, offsetY: 0, directionH: 'right', directionV: 'down', detectH: true, // do horizontal collision detection detectV: true, // do vertical collision detection linkToFront: false }, showSpeed: 100, crumbDefaultText: '>' }); content.find(".message-tags-menu-content ul li").remove(); $.each(getLabels(), function(key,value){ content.find(".message-tags-menu-content ul") .append("
  • "+value.name+"
  • ").find("li:last"); }); content.find(".message-tags").menuPlugin({ content : content.find(".message-tags-menu-content").html(), flyOut: true, positionOpts: { posX: 'left', posY: 'bottom', offsetX: -140, offsetY: 0, directionH: 'right', directionV: 'down', detectH: true, // do horizontal collision detection detectV: true, // do vertical collision detection linkToFront: false }, showSpeed: 100, crumbDefaultText: '>' }); //REMOVE MESSAGE BUTTON content.find(".message-remove").button({ icons: { primary: "ui-icon-trash" }, text: false }).click(function(){ proxy_mensagens.delete_msgs(data.folder,data.id,'null'); removeTab(); refresh(); }); //PREFERENCES BUTTON content.find(".messages-preferences").button({ icons: { primary: "ui-icon-gear", secondary: "ui-icon-triangle-1-s" }, text: false }).css("width", "45px"); //MESSAGE DETAILS content.find(".message-hide-show-details").click(function(){ $(this).find("span").toggle(); content.find(".message-details").toggle("blind"); }).hover( function(){ $(this).addClass("message-detail-hover"); }, function(){ $(this).removeClass("message-detail-hover"); } ); } var Message = { open : function(id){ }, remove : function(ids){ }, flag : function(id, flag){ }, move : function(id){ }, print : function (){ }, report : function(id){ }, reply : function(id, type){ }, forward : function(id){ }, export : function(id){ }, create : function(id){ } }