EasyUI Forum
May 02, 2024, 10:02:08 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Adding textbox cls to Version 1.4.4  (Read 2765 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« on: July 28, 2020, 03:35:53 AM »

Hi;

It's impossible for me to upgrade EUI due to the huge amount of customisation that's been added.

Can you let me have the code to add a 'cls' attribute to textbox in version 1.4.4 which was later added in V1.5.1 ?

Thanks
« Last Edit: July 28, 2020, 07:35:19 PM by devnull » Logged

-- Licensed User --
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: July 29, 2020, 05:10:26 PM »

Please refer to this code to override a component definition.
Code:
<script type="text/javascript">
(function($){
var plugin = $.fn.textbox;
$.fn.textbox = function(options, param){
if (typeof options == 'string'){
return plugin.call($(this), options, param)
}
return this.each(function(){
plugin.call($(this), options, param);
var opts = $(this).textbox('options');
$(this).next().addClass(opts.cls)
})
}
$.fn.textbox.defaults = plugin.defaults;
$.fn.textbox.methods = plugin.methods;
$.fn.textbox.parseOptions = plugin.parseOptions;
})(jQuery)
</script>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!