X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=blobdiff_plain;f=plugins%2Flists%2Fstatic%2Fjs%2Fsimplelist.js;h=6df47cfc2d159db25ef8d2266fe8c251e451d7c1;hp=f3476c07ac81c995b80af29233fdd46ebc01ab82;hb=df37189ffd08ea92ba19d6ecbfd9f14bf46c0550;hpb=1afacfe6585d82ff1f6b8d5c37b00ff977f11d36 diff --git a/plugins/lists/static/js/simplelist.js b/plugins/lists/static/js/simplelist.js index f3476c07..6df47cfc 100644 --- a/plugins/lists/static/js/simplelist.js +++ b/plugins/lists/static/js/simplelist.js @@ -12,10 +12,16 @@ var SimpleList = Plugin.extend ({ init: function (options, element) { - this.classname=options.classname; + this.classname = options.classname; this._super (options, element); - this.buffered_records=[]; - this.listen_query(options.query_uuid); + this.buffered_records = []; + this.listen_query(options.query_uuid); + /* Optional parameter warning_msg */ + if(options.warning_msg != "unknown-setting-warning_msg"){ + this.warning_msg = options.warning_msg; + }else{ + this.warning_msg = "No Result"; + } }, on_query_in_progress: function() { @@ -56,9 +62,9 @@ object_key = this.options.key.split('.'); if (rows.length == 0 || rows[0][object_key[0]].length == 0) { if (use_datatables){ - this._datatables_set_message ($table, $tbody, unfold.warning("No result")); + this._datatables_set_message ($table, $tbody, unfold.warning(self.warning_msg)); }else{ - this._regular_set_message ($table, $tbody, unfold.warning("No result")); + this._regular_set_message ($table, $tbody, unfold.warning(self.warning_msg)); } return; }