can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[ljcom] r11849: LJSUP-11969: Add an api to insert transl...

Committer: dpetrov
LJSUP-11969: Add an api to insert translated template into page
U   trunk/htdocs/js/jquery/jquery.lj.basicWidget.js
Modified: trunk/htdocs/js/jquery/jquery.lj.basicWidget.js
===================================================================
--- trunk/htdocs/js/jquery/jquery.lj.basicWidget.js	2012-04-27 12:28:48 UTC (rev 11848)
+++ trunk/htdocs/js/jquery/jquery.lj.basicWidget.js	2012-04-27 12:31:55 UTC (rev 11849)
@@ -208,6 +208,18 @@
 		 */
 		_s: function(name) {
 				return this.options.selectors[name];
+		},
+
+		/**
+		 * Apply template specified by name with data.
+		 *
+		 * @param {string} name The key name of the template in this.options.templates.
+		 * @param {Object} data The data object which should be applied to the template.
+		 *
+		 * @return {jQuery} jQuery object with generated markup.
+		 */
+		_tmpl: function(name, data) {
+			return LJ.UI.template(this.options.templates[name], data);
 		}
 	} );
 } )( jQuery );

Tags: can3p, dpetrov, js, ljcom
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments