[ create a new paste ] login | about

Link: http://codepad.org/aagrAjNs    [ raw code | fork ]

Plain Text, pasted on Jan 26:
// Output Config
for (var element in presenter.config)
	if (!(presenter.config[element] instanceof Function) && element.substring(0, 1) != "_")	{
	$("#config").append("<dt>" + element + "</dt><dd>" + presenter.config[element]+ "</dd>");
}

function status(success, error, data) {
	var dataList = "";
	for (var item in data)
			dataList += "<dt>" + item + "</dt><dd>" + data[item] + "</dd>";
	$("#status").prepend("<dl><dt>success</dt><dd>" + success + "</dd><dt>error</dt><dd>" + error + "</dd><dt>data</dt><dd><dl>" + dataList + "</dl></dd></dl>");
}






document.counter = 0;
$("#trackPage").click(function() {
	presenter.tracking.page("/test/page/" + (document.counter++ % 10), status);
	return false;
});
$("#trackAction10").click(function() {
	for (var i=0; i<10; i++) {
		presenter.tracking.action("/test/action/10", ""+i, status);
	}
	return false;
});
$("#trackAction li").each(function() {
	$(this).html('<input type="button" value="'+$(this).html()+'">');
	$('input', this).click(function() {
		presenter.tracking.action("/test/action/", event.target.value, status);
		return false;
	});
});
$("#documentExists1").click(function() {
	presenter.document.exists("com.orchard.test", status);
	return false;
});
$("#documentOpen1").click(function() {
	presenter.document.open("com.orchard.test", "?test", status);
	return false;
});
$("#documentExists2").click(function() {
	presenter.document.exists("com.orchard.null", status);
	return false;
});
$("#documentOpen2").click(function() {
	presenter.document.open("com.orchard.null", "?test", status);
	return false;
});
$("#commandExit").click(function() {
	presenter.command("close", status);
	return false;
});
$("#commandEmail1").click(function() {
    
    
	presenter.command("emailSend",{
		"toEmail": "jani_06sw@yahoo.com",
		"toName": "Jani",
		"subject": "email test",
		"body": "Single Attachment",
		"bodyHtml":" Addition of both Values is: ",
		"attachments": [""]
	}, status);
	return false;
});


$("#commandEmail2").click(function() {
	presenter.command("emailSend",{
		"toEmail": "debug@orchard.net.au",
		"toName": "Debug",
		"subject": "Presenter Library Test",
		"body": "Dual Attachment",
		"bodyHtml": "<h1>Dual Attachment</h1>",
		"attachments": ["/pdf/ip6.pdf","/pdf/docs.pdf"]
	}, status);
	return false;
});$("#commandPdf1").click(function() {
	presenter.command("viewPdf",{
		"path": "/pdf/ip6.pdf",
		"titleText": "IPv6 Essentials",
		"titleColour": "80ff80",
		"presentation": "formsheet"
	}, status);
	return false;
});
$("#commandPdf2").click(function() {
	presenter.command("viewPdf",{
		"path": "/pdf/ip6.pdf"
	}, status);
	return false;
});



Create a new paste based on this one


Comments: