{"size": 1097, "ext": "js", "max_stars_repo_path": "app/controllers/rowCompartir.js", "max_stars_repo_name": "eduarroyo/pushnews_app", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/controllers/rowCompartir.js", "max_issues_repo_name": "eduarroyo/pushnews_app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/controllers/rowCompartir.js", "max_forks_repo_name": "eduarroyo/pushnews_app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.511627907, "max_line_length": 96, "alphanum_fraction": 0.6882406563}
// Arguments passed into this controller can be accessed off of the `$.args` object directly or:
var args = $.args;

var Comunicacion = args.Comunicacion;

if (OS_ANDROID)
{
	$.lblCompartir.addEventListener('click', function() {
		//alert("Comunicacion: " + Comunicacion.Titulo);
		
		var activity = Ti.Android.currentActivity;
		var intent = Ti.Android.createIntent({
	        action: Ti.Android.ACTION_SEND,
	        type: 'text/plain'
	    });
		
		// twitter --> Extra_Text
		
		// mail: asunto --> extra subject --- texto --> extra_text
		
		var url = Alloy.Globals.APIURL_Documentos + Comunicacion.ComunicacionID;
		
		intent.putExtra(Ti.Android.EXTRA_TEXT, url);
		intent.putExtra(Ti.Android.EXTRA_SUBJECT, Comunicacion.Titulo);
		activity.startActivity(Ti.Android.createIntentChooser(intent,'Share'));  
	
	});	
}
else
{
	$.lblFacebook.addEventListener('click', function() {
		alert("Compartir Facebook");
	});
	
	$.lblTwitter.addEventListener('click', function() {
		alert("Compartir Twitter");
	});
	
	$.lblEmail.addEventListener('click', function() {
		alert("Compartir EMail");
	});
}
