Valerii Vasin (valerii) wrote in changelog,
Valerii Vasin
valerii
changelog

[ljcom] r12551: LJSUP-13422: Add submit window. ML impro...

Committer: vvasin
LJSUP-13422: Add submit window. ML improvement.
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-08-27 05:59:17 UTC (rev 12550)
+++ trunk/htdocs/js/jquery/jquery.lj.basicWidget.js	2012-08-27 07:19:07 UTC (rev 12551)
@@ -250,6 +250,20 @@
 		},
 
 		/**
+		 * Fetch ml variable from the options and apply LJ.ml function to it
+		 * @param  {String} name Options key for the ml variable
+		 * @return {String}      ml-variable from server
+		 */
+		_ml: function (name) {
+			if (this.options.ml && this.options.ml.hasOwnProperty(name)) {
+				return LJ.ml( this.options.ml[name] );
+			} else {
+				LJ.console.log("Widget text variable ["+ name +"] hasn't been defined");
+				return "["+ name +"]";
+			}
+		},
+
+		/**
 		 * Use a mixin with the widget instance.
 		 *
 		 * @param {string} name Mixin name. A Mixin should be registered with LJ.UI.mixin.

Tags: invis89, js, ljcom, vvasin
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