Index: sandbox/newExpressoMail/prototype/modules/newMail/js/message.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail/js/message.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail/js/message.js	(revision 7265)
@@ -1,108 +1,108 @@
 function buildMessageButtons(content){
-	var data = getTabData();
-	//FLAGS BUTTON SET 
+    var data = getTabData();
+    //FLAGS BUTTON SET
     content.find(".message-flags").find(".message-important-flag").button({
-    	icons: {
-    		primary: "ui-icon-notice"
-    	},
+        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
-    });
+            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"
-    	},
+        icons: {
+            primary: "ui-icon-carat-1-w"
+        },
         text: false
     }).click(function(){
 
-    }).next().button({
-    	icons: {
-    		primary: "ui-icon-carat-1-e"
-    	},
-        text: false
-    });
+        }).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();
+        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
+        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: '>'
-	});
+            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
+        icons:{
+            primary: "ui-icon-pencil"
+        },
+        text : false
     });
     //BUTTON MORE AND TAGS
@@ -114,53 +114,53 @@
         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("<li id='"+key+"'><a onclick='labeledMessages("+
-			(key.match(/label(.*)/) ? key.match(/label(.*)/)[1] : 'configureLabels({applyToSelectedMessages:true})')
-		+");' href='#'>"+value.name+"</a></li>").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: '>'
-	});
+            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("<li id='"+key+"'><a onclick='labeledMessages("+
+            (key.match(/label(.*)/) ? key.match(/label(.*)/)[1] : 'configureLabels({applyToSelectedMessages:true})')
+            +");' href='#'>"+value.name+"</a></li>").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({
@@ -170,8 +170,8 @@
         text: false
     }).click(function(){
-    	proxy_mensagens.delete_msgs(data.folder,data.id,'null');
-    	removeTab();
-    	refresh();
-    });
+            proxy_mensagens.delete_msgs(data.folder,data.id,'null');
+            removeTab();
+            refresh();
+        });
 
     //PREFERENCES BUTTON
@@ -186,14 +186,56 @@
     //MESSAGE DETAILS 
     content.find(".message-hide-show-details").click(function(){
-    	$(this).find("span").toggle();
-    	content.find(".message-details").toggle("blind");
+        $(this).find("span").toggle();
+        content.find(".message-details").toggle("blind");
     }).hover(
-		function(){
-			$(this).addClass("message-detail-hover");
-		},
-		function(){
-			$(this).removeClass("message-detail-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){
+
+    }
+}
