- Timestamp:
- 09/21/12 10:11:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/newExpressoMail/prototype/modules/newMail/js/message.js
r7210 r7265 1 1 function buildMessageButtons(content){ 2 3 //FLAGS BUTTON SET 2 var data = getTabData(); 3 //FLAGS BUTTON SET 4 4 content.find(".message-flags").find(".message-important-flag").button({ 5 6 7 5 icons: { 6 primary: "ui-icon-notice" 7 }, 8 8 text: false 9 9 }).click(function(){ 10 11 12 13 14 }).end().find(".message-unread-flag").button({15 16 17 18 text: false19 }).click(function(){20 21 22 23 24 }).end().find(".message-spam-flag").button({25 26 27 28 text: false29 }).click(function(){30 31 32 33 34 }).end().find(".message-followup-flag").button({35 36 37 38 text: false39 });10 var checked = $(this).attr("checked") == "checked" ? true : false; 11 set_message_flag(data.id, checked ? "flagged" : "unflagged", undefined, data.folder); 12 write_msg(get_lang('Message marked as ') + get_lang( checked ? "Important" : "Normal")); 13 refresh(); 14 }).end().find(".message-unread-flag").button({ 15 icons: { 16 primary: "ui-icon-mail-closed" 17 }, 18 text: false 19 }).click(function(){ 20 var checked = $(this).attr("checked") == "checked" ? true : false; 21 set_message_flag(data.id, checked ? "unseen" : "seen", undefined, data.folder); 22 write_msg(get_lang('Message marked as ') + get_lang( checked ? "Unseen" : "Seen")); 23 refresh(); 24 }).end().find(".message-spam-flag").button({ 25 icons: { 26 primary: "ui-icon-alert" 27 }, 28 text: false 29 }).click(function(){ 30 var checked = $(this).attr("checked") == "checked" ? true : false; 31 checked ? spam(data.folder, data.id,'null') : nospam(data.id,'null', data.folder); 32 removeTab(); 33 refresh(); 34 }).end().find(".message-followup-flag").button({ 35 icons: { 36 primary: "ui-icon-flag" 37 }, 38 text: false 39 }); 40 40 content.find(".message-flags").buttonset(); 41 41 42 42 //MESSAGES ACTION NEXT PREV BUTTON SET 43 43 content.find(".messages-controll").find(".message-prev").button({ 44 45 46 44 icons: { 45 primary: "ui-icon-carat-1-w" 46 }, 47 47 text: false 48 48 }).click(function(){ 49 49 50 }).next().button({51 52 53 54 text: false55 });50 }).next().button({ 51 icons: { 52 primary: "ui-icon-carat-1-e" 53 }, 54 text: false 55 }); 56 56 content.find(".messages-controll").buttonset(); 57 57 58 58 // 59 59 content.find(".message-forward").button({ 60 61 62 63 64 }); 65 66 67 60 icons:{ 61 primary: "ui-icon-arrowreturnthick-1-e" 62 }, 63 text : false 64 }); 65 66 var teste = content.find(".message-reply-menu-content").clone(); 67 content.find(".message-reply-menu-content").remove(); 68 68 69 69 content.find(".button.message-reply").button({ 70 71 72 73 70 icons:{ 71 primary: "ui-icon-arrowreturnthick-1-w" 72 }, 73 text : false 74 74 }).next().button({ 75 76 77 78 79 }).parent().buttonset();80 81 82 83 84 85 86 posX: 'left', 87 88 89 90 91 directionV: 'down', 92 detectH: true, // do horizontal collision detection 93 94 95 96 97 98 99 75 icons:{ 76 primary: "ui-icon-triangle-1-s" 77 }, 78 text : false 79 }).parent().buttonset(); 80 81 content.find("span.message-reply").append(teste); 82 83 content.find(".message-reply").next().menuPlugin({ 84 content : content.find(".message-reply-menu-content").html(), 85 positionOpts: { 86 posX: 'left', 87 posY: 'bottom', 88 offsetX: -140, 89 offsetY: 0, 90 directionH: 'right', 91 directionV: 'down', 92 detectH: true, // do horizontal collision detection 93 detectV: true, // do vertical collision detection 94 linkToFront: false 95 }, 96 flyOut: true, 97 showSpeed: 100, 98 crumbDefaultText: '>' 99 }); 100 100 101 101 102 102 content.find(".button.message-edit").button({ 103 104 105 106 103 icons:{ 104 primary: "ui-icon-pencil" 105 }, 106 text : false 107 107 }); 108 108 //BUTTON MORE AND TAGS … … 114 114 text: false 115 115 }).next().next().button({ 116 icons: {117 secondary: "ui-icon-triangle-1-s"118 },119 text: true120 121 122 123 124 125 126 posX: 'left', 127 128 129 130 131 directionV: 'down', 132 detectH: true, // do horizontal collision detection 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 posX: 'left', 153 154 155 156 157 directionV: 'down', 158 detectH: true, // do horizontal collision detection 159 160 161 162 163 164 116 icons: { 117 secondary: "ui-icon-triangle-1-s" 118 }, 119 text: true 120 }); 121 122 content.find(".message-more").menuPlugin({ 123 content : content.find(".message-more-menu-content").html(), 124 flyOut: true, 125 positionOpts: { 126 posX: 'left', 127 posY: 'bottom', 128 offsetX: -140, 129 offsetY: 0, 130 directionH: 'right', 131 directionV: 'down', 132 detectH: true, // do horizontal collision detection 133 detectV: true, // do vertical collision detection 134 linkToFront: false 135 }, 136 showSpeed: 100, 137 crumbDefaultText: '>' 138 }); 139 140 content.find(".message-tags-menu-content ul li").remove(); 141 $.each(getLabels(), function(key,value){ 142 content.find(".message-tags-menu-content ul") 143 .append("<li id='"+key+"'><a onclick='labeledMessages("+ 144 (key.match(/label(.*)/) ? key.match(/label(.*)/)[1] : 'configureLabels({applyToSelectedMessages:true})') 145 +");' href='#'>"+value.name+"</a></li>").find("li:last"); 146 }); 147 148 content.find(".message-tags").menuPlugin({ 149 content : content.find(".message-tags-menu-content").html(), 150 flyOut: true, 151 positionOpts: { 152 posX: 'left', 153 posY: 'bottom', 154 offsetX: -140, 155 offsetY: 0, 156 directionH: 'right', 157 directionV: 'down', 158 detectH: true, // do horizontal collision detection 159 detectV: true, // do vertical collision detection 160 linkToFront: false 161 }, 162 showSpeed: 100, 163 crumbDefaultText: '>' 164 }); 165 165 //REMOVE MESSAGE BUTTON 166 166 content.find(".message-remove").button({ … … 170 170 text: false 171 171 }).click(function(){ 172 173 174 175 });172 proxy_mensagens.delete_msgs(data.folder,data.id,'null'); 173 removeTab(); 174 refresh(); 175 }); 176 176 177 177 //PREFERENCES BUTTON … … 186 186 //MESSAGE DETAILS 187 187 content.find(".message-hide-show-details").click(function(){ 188 189 188 $(this).find("span").toggle(); 189 content.find(".message-details").toggle("blind"); 190 190 }).hover( 191 192 193 194 195 196 197 191 function(){ 192 $(this).addClass("message-detail-hover"); 193 }, 194 function(){ 195 $(this).removeClass("message-detail-hover"); 196 } 197 ); 198 198 199 199 } 200 201 var Message = { 202 open : function(id){ 203 204 }, 205 206 remove : function(ids){ 207 208 }, 209 210 flag : function(id, flag){ 211 212 }, 213 214 move : function(id){ 215 216 }, 217 218 print : function (){ 219 220 }, 221 222 report : function(id){ 223 224 }, 225 226 reply : function(id, type){ 227 228 }, 229 230 forward : function(id){ 231 232 }, 233 234 export : function(id){ 235 236 }, 237 238 create : function(id){ 239 240 } 241 }
Note: See TracChangeset
for help on using the changeset viewer.