jquery.colorpicker: make disable field in options optional

This commit is contained in:
gentoo90
2018-02-04 12:38:31 +02:00
parent 8058968995
commit c86178045e
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ interface JQueryColorpickerOptions {
closeOnOutside?: boolean;
color?: string;
colorFormat?: string;
disabled: boolean;
disabled?: boolean;
draggable?: boolean;
duration?: string;
format?: string;
@@ -70,6 +70,9 @@ colorpicker.colorpicker("destroy");
colorpicker.colorpicker("setColor", "#deadbeef");
colorpicker.colorpicker("option", "disabled", true);
// check if all options are optional
let defaultColorpicker = $("<input type=\"text\"/>").colorpicker({});
// example plugins provided
$.colorpicker.parts["memory"] = function (inst) {