/**
 * @copyright  Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
(function() {
	"use strict";

	window.updateTemplateStatus = function updateTemplateStatus(input){
        jQuery.get("index.php?option=com_notifly&task=template.update", function(data, status){
	        /*alert("Data: " + data + "\nStatus: " + status);*/
	        return false;
	    });
	};

	window.convertFromMarkdown = function convertFromMarkdown(){

		jQuery.each(jQuery('.event-message'), function(index, value){
			var text = jQuery(this).html();
			var converter       = new showdown.Converter();
		    var renderedHtml    = converter.makeHtml(text);		
		    jQuery(this).html(renderedHtml);	
		});
		
	}

})();
