File size: 452 Bytes
45e5708
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
let ColorInput = { ...ColorInput, ...{

    events: [
        ["change", "onChange", "input"],
	 ],

	setValue: function(value) {
		let color = this.rgb2hex(value);
		$('input', this.element).val();
		$('i', this.element).css('background-color', value);
	},
	
	init: function(data) {
		let colorinput = this.render("bootstrap-color-picker-input", data);
		let colorpicker = $('.input-group', colorinput).colorpicker();
		return colorinput;
	},
  }
);