mirror of
https://github.com/PitPik/colorPicker.git
synced 2025-08-21 08:02:45 -06:00
readonly support
This commit is contained in:
parent
3fd3a6443d
commit
af2c6cb7cc
@ -7,7 +7,7 @@
|
|||||||
"color",
|
"color",
|
||||||
"colour"
|
"colour"
|
||||||
],
|
],
|
||||||
"version": "1.0",
|
"version": "1.0.0.1",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Peter Dematté",
|
"name": "Peter Dematté",
|
||||||
"email": "colorPicker@dematte.at",
|
"email": "colorPicker@dematte.at",
|
||||||
|
@ -30,7 +30,7 @@ Calling the colorPicker on all inputs with the calssName 'color': <pre>$('input.
|
|||||||
|
|
||||||
<script type="text/javascript" src="jqColor.js"></script>
|
<script type="text/javascript" src="jqColor.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var $colors = $('input.color').colorPicker({customBG: '#222'}).each(function(idx, elm) { // {multipleInstances: true}
|
var $colors = $('input.color').colorPicker({customBG: '#222', readOnly: true}).each(function(idx, elm) { // {multipleInstances: true}
|
||||||
$(elm).css({'background-color': this.value})
|
$(elm).css({'background-color': this.value})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -170,6 +170,9 @@
|
|||||||
var value = elm.value.split('(');
|
var value = elm.value.split('(');
|
||||||
$(elm).data('colorMode', value[1] ? value[0].substr(0, 3) : 'HEX');
|
$(elm).data('colorMode', value[1] ? value[0].substr(0, 3) : 'HEX');
|
||||||
doEventListeners(elm, (config && config.multipleInstances), false);
|
doEventListeners(elm, (config && config.multipleInstances), false);
|
||||||
|
if (config && config.readOnly) {
|
||||||
|
elm.readOnly = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user