|
@@ -146,6 +146,7 @@
|
|
|
var size;
|
|
var size;
|
|
|
var swatches;
|
|
var swatches;
|
|
|
var swatch;
|
|
var swatch;
|
|
|
|
|
+ var swatchString;
|
|
|
var panel;
|
|
var panel;
|
|
|
var i;
|
|
var i;
|
|
|
|
|
|
|
@@ -223,10 +224,11 @@
|
|
|
name = '';
|
|
name = '';
|
|
|
swatch = settings.swatches[i];
|
|
swatch = settings.swatches[i];
|
|
|
}
|
|
}
|
|
|
|
|
+ swatchString = swatch;
|
|
|
swatch = isRgb(swatch) ? parseRgb(swatch, true) : hex2rgb(parseHex(swatch, true));
|
|
swatch = isRgb(swatch) ? parseRgb(swatch, true) : hex2rgb(parseHex(swatch, true));
|
|
|
$('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" title="' + name + '"></span></li>')
|
|
$('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color" title="' + name + '"></span></li>')
|
|
|
.appendTo(swatches)
|
|
.appendTo(swatches)
|
|
|
- .data('swatch-color', settings.swatches[i])
|
|
|
|
|
|
|
+ .data('swatch-color', swatchString)
|
|
|
.find('.minicolors-swatch-color')
|
|
.find('.minicolors-swatch-color')
|
|
|
.css({
|
|
.css({
|
|
|
backgroundColor: rgb2hex(swatch),
|
|
backgroundColor: rgb2hex(swatch),
|
|
@@ -283,7 +285,7 @@
|
|
|
if (settings.show) settings.show.call(input.get(0));
|
|
if (settings.show) settings.show.call(input.get(0));
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- panel.css('opacity', 1);
|
|
|
|
|
|
|
+ panel.show();
|
|
|
if (settings.show) settings.show.call(input.get(0));
|
|
if (settings.show) settings.show.call(input.get(0));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -302,7 +304,7 @@
|
|
|
minicolors.removeClass('minicolors-focus');
|
|
minicolors.removeClass('minicolors-focus');
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- panel.css('opacity', 0);
|
|
|
|
|
|
|
+ panel.hide();
|
|
|
if (settings.hide) settings.hide.call(input.get(0));
|
|
if (settings.hide) settings.hide.call(input.get(0));
|
|
|
minicolors.removeClass('minicolors-focus');
|
|
minicolors.removeClass('minicolors-focus');
|
|
|
}
|
|
}
|