Move jquery-minicolors to npm/webpack (#12305)
* Move jquery-minicolors to npm/webpack - Unvendor and add as npm dependency - Removed unneeded backend variable - Fixed existing bug where picker would previously initizalize to the same green color when editing a label. There was probably a version bump because the previous version was over 3 years old but it seems to be compatible. * use file-loader * trailing comma and comment update * misc tweaks Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>tokarchuk/v1.17
parent
2f6aadffa8
commit
2fd78c151e
@ -1,18 +0,0 @@ |
||||
Copyright 2017 A Beautiful Site, LLC |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of |
||||
this software and associated documentation files (the "Software"), to deal in |
||||
the Software without restriction, including without limitation the rights to use, |
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the |
||||
Software, and to permit persons to whom the Software is furnished to do so, |
||||
subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A |
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 67 KiB |
@ -0,0 +1,10 @@ |
||||
export default async function createColorPicker($els) { |
||||
if (!$els || !$els.length) return; |
||||
|
||||
await Promise.all([ |
||||
import(/* webpackChunkName: "minicolors" */'@claviska/jquery-minicolors'), |
||||
import(/* webpackChunkName: "minicolors" */'@claviska/jquery-minicolors/jquery.minicolors.css'), |
||||
]); |
||||
|
||||
$els.minicolors(); |
||||
} |
Loading…
Reference in new issue