Spectrum colorpicker v2 (#8784)

This commit is contained in:
Bjarne Fyrstenborg
2020-09-02 19:10:22 +02:00
committed by GitHub
parent 124415e413
commit e1d6357806
4 changed files with 18 additions and 6 deletions

View File

@@ -217,10 +217,10 @@ function dependencies() {
{
"name": "spectrum",
"src": [
"./node_modules/spectrum-colorpicker/spectrum.js",
"./node_modules/spectrum-colorpicker/spectrum.css"
"./node_modules/spectrum-colorpicker2/dist/spectrum.js",
"./node_modules/spectrum-colorpicker2/dist/spectrum.css"
],
"base": "./node_modules/spectrum-colorpicker"
"base": "./node_modules/spectrum-colorpicker2/dist"
},
{
"name": "tinymce",

View File

@@ -41,7 +41,7 @@
"nouislider": "14.6.1",
"npm": "^6.14.7",
"signalr": "2.4.0",
"spectrum-colorpicker": "1.8.0",
"spectrum-colorpicker2": "2.0.3",
"tinymce": "4.9.11",
"typeahead.js": "0.11.1",
"underscore": "1.9.1",

View File

@@ -163,6 +163,16 @@
.sp-replacer {
display: inline-flex;
margin-right: 18px;
height: auto;
.sp-preview {
margin: 5px;
height: auto;
}
.sp-dd {
line-height: 2rem;
}
}
label {

View File

@@ -32,12 +32,14 @@
], $scope).then(function () {
var elem = $element.find("input[name='newColor']");
elem.spectrum({
color: null,
type: "color",
color: defaultColor,
showAlpha: false,
showInitial: false,
showInput: true,
chooseText: $scope.labels.choose,
cancelText: $scope.labels.cancel,
preferredFormat: "hex",
showInput: true,
clickoutFiresChange: true,
hide: function (color) {
//show the add butotn