[pLog-svn] r5843 - plog/trunk/js/ui

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sun Aug 19 13:21:14 EDT 2007


Author: oscar
Date: 2007-08-19 13:21:13 -0400 (Sun, 19 Aug 2007)
New Revision: 5843

Modified:
   plog/trunk/js/ui/ui.js
Log:
Javascript method that modifies a link so that it opens in a new window.


Modified: plog/trunk/js/ui/ui.js
===================================================================
--- plog/trunk/js/ui/ui.js	2007-08-19 17:20:12 UTC (rev 5842)
+++ plog/trunk/js/ui/ui.js	2007-08-19 17:21:13 UTC (rev 5843)
@@ -298,4 +298,21 @@
 {
 	var p = new Lifetype.UI.Prompt.OkCancelPrompt( txt, props );
 	p.show();
+}
+
+/**
+ * Miscellaneous UI functions
+ */
+Lifetype.UI.Misc = function() {}
+
+/**
+ * This should be used in the onClick event for a link, and it will trigger
+ * it to open in a new window if Javascript is enabled. 
+ * 
+ * @param anchor The A object
+ */
+Lifetype.UI.Misc.openInNewWindow = function( anchor )
+{
+	anchor.target = "_blank";
+	return( true );
 }
\ No newline at end of file



More information about the pLog-svn mailing list