added local spectrum
This commit is contained in:
2
public/assets/spectrum/.gitignore
vendored
Normal file
2
public/assets/spectrum/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
7
public/assets/spectrum/.travis.yml
Normal file
7
public/assets/spectrum/.travis.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 10
|
||||
before_script:
|
||||
- npm install -g grunt-cli
|
||||
script:
|
||||
- grunt travis --verbose
|
||||
70
public/assets/spectrum/Gruntfile.js
Normal file
70
public/assets/spectrum/Gruntfile.js
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
qunit: {
|
||||
all: {
|
||||
options: {
|
||||
urls: ['test/index.html', 'test/loaders.html'],
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
jshint: {
|
||||
options: {
|
||||
sub: true,
|
||||
strict: true,
|
||||
newcap: false,
|
||||
globals: {
|
||||
jQuery: true
|
||||
}
|
||||
},
|
||||
|
||||
with_overrides: {
|
||||
options: {
|
||||
strict: false
|
||||
},
|
||||
files: {
|
||||
src: ['i18n/*.js', 'test/tests.js']
|
||||
}
|
||||
},
|
||||
|
||||
all: ['spectrum.js']
|
||||
},
|
||||
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
},
|
||||
dist: {
|
||||
files: {
|
||||
'build/spectrum-min.js': ['spectrum.js']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-qunit');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
|
||||
|
||||
// Testing tasks
|
||||
grunt.registerTask('test', ['jshint', 'qunit']);
|
||||
|
||||
// Travis CI task.
|
||||
grunt.registerTask('travis', 'test');
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['test']);
|
||||
|
||||
//Build Task.
|
||||
grunt.registerTask('build', ['test', 'uglify']);
|
||||
|
||||
};
|
||||
20
public/assets/spectrum/LICENSE
Normal file
20
public/assets/spectrum/LICENSE
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) Brian Grinstead
|
||||
|
||||
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.
|
||||
69
public/assets/spectrum/README.md
Normal file
69
public/assets/spectrum/README.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Spectrum
|
||||
## The No Hassle Colorpicker
|
||||
|
||||
See the demo and docs: http://bgrins.github.io/spectrum.
|
||||
|
||||
I wanted a colorpicker that didn't require images, and that had an API that made sense to me as a developer who has worked with color in a number of applications. I had tried a number of existing plugins, but decided to try and make a smaller, simpler one.
|
||||
|
||||
I started using canvas, then switched to CSS gradients, since it turned out to be easier to manage, and provided better cross browser support.
|
||||
|
||||
### Basic Usage
|
||||
|
||||
Head over to the [docs](http://bgrins.github.io/spectrum) for more information. There is a visual demo of the different options hosted at: http://bgrins.github.io/spectrum.
|
||||
|
||||
<script src='spectrum.js'></script>
|
||||
<link rel='stylesheet' href='spectrum.css' />
|
||||
|
||||
<input id='colorpicker' />
|
||||
|
||||
<script>
|
||||
$("#colorpicker").spectrum({
|
||||
color: "#f00"
|
||||
});
|
||||
</script>
|
||||
|
||||
### npm
|
||||
|
||||
Spectrum is registered as package with npm. It can be installed with:
|
||||
|
||||
npm install spectrum-colorpicker
|
||||
|
||||
### Bower
|
||||
|
||||
Spectrum is registered as a package with [Bower](http://bower.io/), so it can be pulled down using:
|
||||
|
||||
bower install spectrum
|
||||
|
||||
### Using spectrum with a CDN
|
||||
|
||||
CDN provided by [cdnjs](https://cdnjs.com/libraries/spectrum)
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.1/spectrum.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.1/spectrum.min.css">
|
||||
|
||||
### Continuous Integration
|
||||
|
||||
[](http://travis-ci.org/bgrins/spectrum)
|
||||
|
||||
Visit https://travis-ci.org/bgrins/spectrum to view the status of the automated tests.
|
||||
|
||||
### Building Spectrum Locally
|
||||
|
||||
If you'd like to download and use the plugin, head over to http://bgrins.github.io/spectrum/ and click the 'Download Zip' button.
|
||||
|
||||
If you'd like to run the development version, spectrum uses Grunt to automate the testing, linting, and building. Head over to http://gruntjs.com/getting-started for more information. First, clone the repository, then run:
|
||||
|
||||
npm install -g grunt-cli
|
||||
npm install
|
||||
|
||||
# runs jshint and the unit test suite
|
||||
grunt
|
||||
|
||||
# runs jshint, the unit test suite, and builds a minified version of the file.
|
||||
grunt build
|
||||
|
||||
### Internationalization
|
||||
|
||||
If you are able to translate the text in the UI to another language, please do! You can do so by either [filing a pull request](https://github.com/bgrins/spectrum/pulls) or [opening an issue]( https://github.com/bgrins/spectrum/issues) with the translation. The existing languages are listed at: https://github.com/bgrins/spectrum/tree/master/i18n.
|
||||
|
||||
For an example, see the [Dutch translation](i18n/jquery.spectrum-nl.js).
|
||||
22
public/assets/spectrum/bower.json
Normal file
22
public/assets/spectrum/bower.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "spectrum",
|
||||
"version": "1.8.1",
|
||||
"main": ["./spectrum.css", "./spectrum.js"],
|
||||
"docs": "http://bgrins.github.com/spectrum",
|
||||
"homepage": "http://bgrins.github.com/spectrum",
|
||||
"demo": "http://jsfiddle.net/bgrins/ctkY3/",
|
||||
"dependencies": {
|
||||
"jquery": ">=1.7.2"
|
||||
},
|
||||
"ignore": [
|
||||
".gitignore",
|
||||
".travis.yml",
|
||||
"build/",
|
||||
"docs/",
|
||||
"example/",
|
||||
"Gruntfile.js",
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"test/"
|
||||
]
|
||||
}
|
||||
1
public/assets/spectrum/build/.gitignore
vendored
Normal file
1
public/assets/spectrum/build/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
spectrum-min.js
|
||||
6158
public/assets/spectrum/docs/bootstrap.css
vendored
Normal file
6158
public/assets/spectrum/docs/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
273
public/assets/spectrum/docs/docs.css
vendored
Normal file
273
public/assets/spectrum/docs/docs.css
vendored
Normal file
@@ -0,0 +1,273 @@
|
||||
|
||||
/* Styles for the demo page only. See spectrum.css for the actual colorpicker styles */
|
||||
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
|
||||
body { margin: 0; font-size: 14px; line-height: 1.5; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAG0lEQVQIW2OMqXogyYADMIIkl7QpPMcmP+gkAYLGGdeobP2EAAAAAElFTkSuQmCC); }
|
||||
body, button, input, select, textarea { font-family: Droid Sans, Tahoma, sans-serif; color: #222; }
|
||||
body p { font-family: Verdana; font-size: 12px; color: #333; line-height: 1.8; }
|
||||
h1 { font-family: Lucida Sans, Droid Sans, Verdana; font-size: 30px; line-height: inherit; margin: 0; padding:0; font-weight: lighter; position:fixed; top: 3px; left: 10px; }
|
||||
h1 a { text-decoration: none; color: #334 !important; }
|
||||
h1 a:hover { text-decoration: underline; color: #336 !important; }
|
||||
#header { background: #eee; background: #eee; height: 60px; line-height: 60px; padding: 3px 10px;}
|
||||
|
||||
#goals { margin:0 auto; padding:0; width: 98%; }
|
||||
.goal { float: left; width: 29%; margin:1%; padding:1%; color: #335; min-height: 300px; background: #eee; border-radius: 10px; font-family: Verdana; }
|
||||
#docs .goal h4 { text-align: center; margin: .5em 0; font-weight: lighter; text-decoration: underline; font-family: Verdana; }
|
||||
a { color: #00e; }
|
||||
a:visited { color: #009; }
|
||||
a:hover { color: #06e; }
|
||||
a:focus { outline: thin dotted; }
|
||||
#header h2 { float:left; margin:0; padding:0; margin-left: 180px; font-size: 14px; line-height: inherit; font-weight: normal; font-family: Georgia;}
|
||||
#header h2 em {background: #444; color: #fff; font-style: normal; padding: 5px; border-radius: 5px; border: solid 1px #999; box-shadow: 0 0 4px #333;}
|
||||
#links { float:right; text-align: right; }
|
||||
#pick2-details { font: monospace; }
|
||||
#switch-current { float: left; position:relative; display:none;}
|
||||
/*#switch-current .spectrum-container { position: fixed; top:60px; left: 10px; }*/
|
||||
#docs-content { margin-left: 190px; padding: 10px 30px; border:solid 10px #ecc; border-right:none;border-bottom:none; padding-bottom: 20px; background: #fff; background: rgba(255, 255, 255, .6); }
|
||||
.footer { padding-top: 50px; }
|
||||
.switch-current-output { display:none; margin:3px auto; width: 200px; text-align: center; }
|
||||
.type { padding-left: 4px; font-size: .8em; font-weight: bold;}
|
||||
.description, .example {
|
||||
padding: 10px;
|
||||
border: 1px solid #888;
|
||||
background: white;
|
||||
position:relative;
|
||||
padding-top: 15px;
|
||||
}
|
||||
#docs { }
|
||||
#docs ul { margin-left: 25px; padding-left:10px; }
|
||||
#docs li { list-style: square; margin-left: 6px; }
|
||||
#docs p { margin: 0; padding:0; padding-top:4px; }
|
||||
#docs pre { position:relative; }
|
||||
#docs h2 { margin: 30px -25px; border-bottom: solid 1px; }
|
||||
#docs h3 { padding: 10px 15px; margin: 10px auto; margin-top: 40px; border: solid 3px #aaa;
|
||||
box-shadow: 0 3px 5px #333; }
|
||||
#docs h3.point { box-shadow: none; margin-left: -30px; margin-right: -30px; border: solid 1px #999; border-left: none; border-right:none;}
|
||||
#code-heading { font-size: 24px; text-align: center; margin: 6px 0; }
|
||||
#docs-content { color: #222; }
|
||||
#docs-content.dark { color: #ddd; }
|
||||
code { font-weight: bold; color: #933; }
|
||||
.note { float:right; background: #eee; padding: 4px; font-size: 11px; border: solid 1px #bbb; border-radius: 4px;}
|
||||
.option-content .note { float:none; position:absolute; right: 0; top: -40px;}
|
||||
.option-content { position:relative; background: #ededed;
|
||||
border: solid 2px #aaa; border-top: none;
|
||||
padding: 12px; width: 95%; margin: 0 auto;
|
||||
margin-top: -10px; padding-top: 20px;
|
||||
box-shadow: 0 0 10px #ccc; border-radius: 0 0 5px 5px;
|
||||
}
|
||||
.em-label { padding:4px; margin-left: 10px; display:inline-block; vertical-align: top; margin-top: 3px; }
|
||||
.hide { display:none; }
|
||||
.clearfix:before, .clearfix:after { content: ""; display: table; }
|
||||
.clearfix:after { clear: both; }
|
||||
.clearfix { *zoom: 1; }
|
||||
|
||||
input[type="text"] { height: auto; }
|
||||
.label {
|
||||
padding: 1px 4px 2px;
|
||||
font-size: 10.998px;
|
||||
font-weight: bold;
|
||||
line-height: 13px;
|
||||
color: #ffffff;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #999999;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.label:hover {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
.label-important {
|
||||
background-color: #b94a48;
|
||||
}
|
||||
.label-important:hover {
|
||||
background-color: #953b39;
|
||||
}
|
||||
.label-result {
|
||||
background-color: #3a87ad;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.example .label-result {
|
||||
position:absolute;
|
||||
top: -10px;
|
||||
left: 5px;
|
||||
}
|
||||
.label-warning {
|
||||
background-color: #f89406;
|
||||
}
|
||||
.label-warning:hover {
|
||||
background-color: #c67605;
|
||||
}
|
||||
.label-success {
|
||||
background-color: #468847;
|
||||
}
|
||||
.label-success:hover {
|
||||
background-color: #356635;
|
||||
}
|
||||
.label-info {
|
||||
background-color: #3a87ad;
|
||||
}
|
||||
.label-info:hover {
|
||||
background-color: #2d6987;
|
||||
}
|
||||
.label-inverse {
|
||||
background-color: #333333;
|
||||
}
|
||||
.label-inverse:hover {
|
||||
background-color: #1a1a1a;
|
||||
}
|
||||
.alert {
|
||||
padding: 8px 35px 8px 14px;
|
||||
margin: 10px 0;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
background-color: #fcf8e3;
|
||||
border: 1px solid #fbeed5;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
color: #c09853;
|
||||
}
|
||||
.alert-heading {
|
||||
color: inherit;
|
||||
}
|
||||
.alert .close {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
right: -21px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.alert-success {
|
||||
background-color: #dff0d8;
|
||||
border-color: #d6e9c6;
|
||||
color: #468847;
|
||||
}
|
||||
.alert-danger,
|
||||
.alert-error {
|
||||
background-color: #f2dede;
|
||||
border-color: #eed3d7;
|
||||
color: #b94a48;
|
||||
}
|
||||
.alert-info {
|
||||
background-color: #d9edf7;
|
||||
border-color: #bce8f1;
|
||||
color: #3a87ad;
|
||||
}
|
||||
.alert-block {
|
||||
padding-top: 14px;
|
||||
padding-bottom: 14px;
|
||||
}
|
||||
.alert-block > p,
|
||||
.alert-block > ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.alert-block p + p {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.btn-primary:visited {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* prettify */
|
||||
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888; background: white;}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
||||
|
||||
/* desert scheme ported from vim to google prettify */
|
||||
.dark pre { display: block; background-color: #333; border:1px solid #888; padding:2px; }
|
||||
.dark pre .nocode { background-color: none; color: #000 }
|
||||
.dark pre .str { color: #ffa0a0 } /* string - pink */
|
||||
.dark pre .kwd { color: #f0e68c; font-weight: bold }
|
||||
.dark pre .com { color: #87ceeb } /* comment - skyblue */
|
||||
.dark pre .typ { color: #98fb98 } /* type - lightgreen */
|
||||
.dark pre .lit { color: #cd5c5c } /* literal - darkred */
|
||||
.dark pre .pun { color: #fff } /* punctuation */
|
||||
.dark pre .pln { color: #fff } /* plaintext */
|
||||
.dark pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */
|
||||
.dark pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */
|
||||
.dark pre .atv { color: #ffa0a0 } /* attribute value - pink */
|
||||
.dark pre .dec { color: #98fb98 } /* decimal - lightgreen */
|
||||
|
||||
@media print {
|
||||
.dark pre { background-color: none }
|
||||
.dark pre .str, .dark code .str { color: #060 }
|
||||
.dark pre .kwd, .dark code .kwd { color: #006; font-weight: bold }
|
||||
.dark pre .com, .dark code .com { color: #600; font-style: italic }
|
||||
.dark pre .typ, .dark code .typ { color: #404; font-weight: bold }
|
||||
.dark pre .lit, .dark code .lit { color: #044 }
|
||||
.dark pre .pun, .dark code .pun { color: #440 }
|
||||
.dark pre .pln, .dark code .pln { color: #000 }
|
||||
.dark pre .tag, .dark code .tag { color: #006; font-weight: bold }
|
||||
.dark pre .atn, .dark code .atn { color: #404 }
|
||||
.dark pre .atv, .dark code .atv { color: #060 }
|
||||
}
|
||||
|
||||
/* http://projects.jga.me/toc/ */
|
||||
#toc {
|
||||
top: 76px;
|
||||
bottom: 0;
|
||||
left: 0px;
|
||||
position: fixed;
|
||||
font-size: 11px;
|
||||
width: 180px;
|
||||
color: #222;
|
||||
overflow-y: auto;
|
||||
font-family: Georgia;
|
||||
}
|
||||
#toc-slider {
|
||||
position:fixed;
|
||||
top:0;
|
||||
bottom:0;
|
||||
left: 0;
|
||||
width: 170px;
|
||||
background: #eee;
|
||||
line-height: 60px;
|
||||
padding-top: 3px;
|
||||
padding-left: 10px;
|
||||
border-right: solid 10px #cce;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
@media (max-device-width: 480px) {
|
||||
|
||||
#toc, #toc-slider, h1 {
|
||||
position:absolute;
|
||||
}
|
||||
}
|
||||
#toc ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#toc li {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
#toc a {
|
||||
color: #225;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#toc .toc-h2 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#toc .toc-h3 {
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
#toc .toc-active {
|
||||
background: #CCE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.full-spectrum {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.full-spectrum .sp-palette {
|
||||
|
||||
max-width: 200px;
|
||||
}
|
||||
493
public/assets/spectrum/docs/docs.js
Normal file
493
public/assets/spectrum/docs/docs.js
Normal file
@@ -0,0 +1,493 @@
|
||||
|
||||
function updateBorders(color) {
|
||||
var hexColor = "transparent";
|
||||
if(color) {
|
||||
hexColor = color.toHexString();
|
||||
}
|
||||
$("#docs-content").css("border-color", hexColor);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
$("#full").spectrum({
|
||||
allowEmpty:true,
|
||||
color: "#ECC",
|
||||
showInput: true,
|
||||
containerClassName: "full-spectrum",
|
||||
showInitial: true,
|
||||
showPalette: true,
|
||||
showSelectionPalette: true,
|
||||
showAlpha: true,
|
||||
maxPaletteSize: 10,
|
||||
preferredFormat: "hex",
|
||||
localStorageKey: "spectrum.demo",
|
||||
move: function (color) {
|
||||
updateBorders(color);
|
||||
},
|
||||
show: function () {
|
||||
|
||||
},
|
||||
beforeShow: function () {
|
||||
|
||||
},
|
||||
hide: function (color) {
|
||||
updateBorders(color);
|
||||
},
|
||||
|
||||
palette: [
|
||||
["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)", /*"rgb(153, 153, 153)","rgb(183, 183, 183)",*/
|
||||
"rgb(204, 204, 204)", "rgb(217, 217, 217)", /*"rgb(239, 239, 239)", "rgb(243, 243, 243)",*/ "rgb(255, 255, 255)"],
|
||||
["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)",
|
||||
"rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"],
|
||||
["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)",
|
||||
"rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)",
|
||||
"rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)",
|
||||
"rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)",
|
||||
"rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)",
|
||||
"rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)",
|
||||
"rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)",
|
||||
"rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)",
|
||||
/*"rgb(133, 32, 12)", "rgb(153, 0, 0)", "rgb(180, 95, 6)", "rgb(191, 144, 0)", "rgb(56, 118, 29)",
|
||||
"rgb(19, 79, 92)", "rgb(17, 85, 204)", "rgb(11, 83, 148)", "rgb(53, 28, 117)", "rgb(116, 27, 71)",*/
|
||||
"rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)",
|
||||
"rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"]
|
||||
]
|
||||
});
|
||||
|
||||
$("#hideButtons").spectrum({
|
||||
showButtons: false,
|
||||
change: updateBorders
|
||||
});
|
||||
|
||||
|
||||
var isDisabled = true;
|
||||
$("#toggle-disabled").click(function() {
|
||||
if (isDisabled) {
|
||||
$("#disabled").spectrum("enable");
|
||||
}
|
||||
else {
|
||||
$("#disabled").spectrum("disable");
|
||||
}
|
||||
isDisabled = !isDisabled;
|
||||
return false;
|
||||
});
|
||||
|
||||
$("input:disabled").spectrum({
|
||||
|
||||
});
|
||||
$("#disabled").spectrum({
|
||||
disabled: true
|
||||
});
|
||||
|
||||
$("#pick1").spectrum({
|
||||
flat: true,
|
||||
change: function(color) {
|
||||
var hsv = color.toHsv();
|
||||
var rgb = color.toRgbString();
|
||||
var hex = color.toHexString();
|
||||
//console.log("callback",color.toHslString(), color.toHsl().h, color.toHsl().s, color.toHsl().l)
|
||||
$("#docs-content").css({
|
||||
'background-color': color.toRgbString()
|
||||
}).toggleClass("dark", hsv.v < .5);
|
||||
$("#switch-current-rgb").text(rgb);
|
||||
$("#switch-current-hex").text(hex);
|
||||
},
|
||||
show: function() {
|
||||
|
||||
},
|
||||
hide: function() {
|
||||
|
||||
},
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: ['white', '#306', '#c5c88d', '#ac5c5c', '#344660']
|
||||
});
|
||||
|
||||
$("#collapsed").spectrum({
|
||||
color: "#dd3333",
|
||||
change: updateBorders,
|
||||
show: function() {
|
||||
|
||||
},
|
||||
hide: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("#flat").spectrum({
|
||||
flat: true,
|
||||
showInput: true,
|
||||
move: updateBorders
|
||||
});
|
||||
|
||||
$("#flatClearable").spectrum({
|
||||
flat: true,
|
||||
move: updateBorders,
|
||||
change: updateBorders,
|
||||
allowEmpty:true,
|
||||
showInput: true
|
||||
});
|
||||
|
||||
$("#showInput").spectrum({
|
||||
color: "#dd33dd",
|
||||
showInput: true,
|
||||
change: updateBorders,
|
||||
show: function() {
|
||||
|
||||
},
|
||||
hide: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("#showAlpha").spectrum({
|
||||
color: "rgba(255, 128, 0, .5)",
|
||||
showAlpha: true,
|
||||
change: updateBorders
|
||||
});
|
||||
|
||||
$("#showAlphaWithInput").spectrum({
|
||||
color: "rgba(255, 128, 0, .5)",
|
||||
showAlpha: true,
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: [
|
||||
["rgba(255, 128, 0, .9)", "rgba(255, 128, 0, .5)"],
|
||||
["red", "green", "blue"],
|
||||
["hsla(25, 50, 75, .5)", "rgba(100, .5, .5, .8)"]
|
||||
],
|
||||
change: updateBorders
|
||||
});
|
||||
|
||||
$("#showAlphaWithInputAndEmpty").spectrum({
|
||||
color: "rgba(255, 128, 0, .5)",
|
||||
allowEmpty:true,
|
||||
showAlpha: true,
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: [
|
||||
["rgba(255, 128, 0, .9)", "rgba(255, 128, 0, .5)"],
|
||||
["red", "green", "blue"],
|
||||
["hsla(25, 50, 75, .5)", "rgba(100, .5, .5, .8)"]
|
||||
],
|
||||
change: updateBorders
|
||||
});
|
||||
|
||||
$("#showInputWithClear").spectrum({
|
||||
allowEmpty:true,
|
||||
color: "",
|
||||
showInput: true,
|
||||
change: updateBorders,
|
||||
show: function() {
|
||||
|
||||
},
|
||||
hide: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("#openWithLink").spectrum({
|
||||
color: "#dd3333",
|
||||
change: updateBorders,
|
||||
show: function() {
|
||||
|
||||
},
|
||||
hide: function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("#className").spectrum({
|
||||
className: 'awesome'
|
||||
});
|
||||
|
||||
$("#replacerClassName").spectrum({
|
||||
replacerClassName: 'awesome'
|
||||
});
|
||||
|
||||
$("#containerClassName").spectrum({
|
||||
containerClassName: 'awesome'
|
||||
});
|
||||
|
||||
$("#showPalette").spectrum({
|
||||
showPalette: true,
|
||||
palette: [
|
||||
['black', 'white', 'blanchedalmond'],
|
||||
['rgb(255, 128, 0);', 'hsv 100 70 50', 'lightyellow']
|
||||
],
|
||||
hide: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Hidden: " + c.toHexString());
|
||||
},
|
||||
change: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Change called: " + c.toHexString());
|
||||
},
|
||||
move: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Move called: " + c.toHexString());
|
||||
}
|
||||
});
|
||||
|
||||
var textPalette = ["rgb(255, 255, 255)", "rgb(204, 204, 204)", "rgb(192, 192, 192)", "rgb(153, 153, 153)", "rgb(102, 102, 102)", "rgb(51, 51, 51)", "rgb(0, 0, 0)", "rgb(255, 204, 204)", "rgb(255, 102, 102)", "rgb(255, 0, 0)", "rgb(204, 0, 0)", "rgb(153, 0, 0)", "rgb(102, 0, 0)", "rgb(51, 0, 0)", "rgb(255, 204, 153)", "rgb(255, 153, 102)", "rgb(255, 153, 0)", "rgb(255, 102, 0)", "rgb(204, 102, 0)", "rgb(153, 51, 0)", "rgb(102, 51, 0)", "rgb(255, 255, 153)", "rgb(255, 255, 102)", "rgb(255, 204, 102)", "rgb(255, 204, 51)", "rgb(204, 153, 51)", "rgb(153, 102, 51)", "rgb(102, 51, 51)", "rgb(255, 255, 204)", "rgb(255, 255, 51)", "rgb(255, 255, 0)", "rgb(255, 204, 0)", "rgb(153, 153, 0)", "rgb(102, 102, 0)", "rgb(51, 51, 0)", "rgb(153, 255, 153)", "rgb(102, 255, 153)", "rgb(51, 255, 51)", "rgb(51, 204, 0)", "rgb(0, 153, 0)", "rgb(0, 102, 0)", "rgb(0, 51, 0)", "rgb(153, 255, 255)", "rgb(51, 255, 255)", "rgb(102, 204, 204)", "rgb(0, 204, 204)", "rgb(51, 153, 153)", "rgb(51, 102, 102)", "rgb(0, 51, 51)", "rgb(204, 255, 255)", "rgb(102, 255, 255)", "rgb(51, 204, 255)", "rgb(51, 102, 255)", "rgb(51, 51, 255)", "rgb(0, 0, 153)", "rgb(0, 0, 102)", "rgb(204, 204, 255)", "rgb(153, 153, 255)", "rgb(102, 102, 204)", "rgb(102, 51, 255)", "rgb(102, 0, 204)", "rgb(51, 51, 153)", "rgb(51, 0, 153)", "rgb(255, 204, 255)", "rgb(255, 153, 255)", "rgb(204, 102, 204)", "rgb(204, 51, 204)", "rgb(153, 51, 153)", "rgb(102, 51, 102)", "rgb(51, 0, 51)"];
|
||||
|
||||
$("#showPaletteOnly").spectrum({
|
||||
color: 'blanchedalmond',
|
||||
showPaletteOnly: true,
|
||||
showPalette:true,
|
||||
palette: [
|
||||
['black', 'white', 'blanchedalmond',
|
||||
'rgb(255, 128, 0);', 'hsv 100 70 50'],
|
||||
['red', 'yellow', 'green', 'blue', 'violet']
|
||||
],
|
||||
change: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Change called: " + c.toHexString());
|
||||
},
|
||||
move: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Move called: " + c.toHexString());
|
||||
}
|
||||
});
|
||||
|
||||
$("#hideAfterPaletteSelect").spectrum({
|
||||
showPaletteOnly: true,
|
||||
showPalette:true,
|
||||
hideAfterPaletteSelect:true,
|
||||
color: 'blanchedalmond',
|
||||
palette: [
|
||||
['black', 'white', 'blanchedalmond',
|
||||
'rgb(255, 128, 0);', 'hsv 100 70 50'],
|
||||
['red', 'yellow', 'green', 'blue', 'violet']
|
||||
],
|
||||
change: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Change called: " + c.toHexString());
|
||||
},
|
||||
move: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Move called: " + c.toHexString());
|
||||
}
|
||||
});
|
||||
|
||||
$("#togglePaletteOnly").spectrum({
|
||||
color: 'blanchedalmond',
|
||||
showPaletteOnly: true,
|
||||
togglePaletteOnly: true,
|
||||
showPalette:true,
|
||||
palette: [
|
||||
["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],
|
||||
["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],
|
||||
["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],
|
||||
["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],
|
||||
["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],
|
||||
["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],
|
||||
["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],
|
||||
["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]
|
||||
]
|
||||
});
|
||||
|
||||
$("#clickoutFiresChange").spectrum({
|
||||
change: updateBorders
|
||||
});
|
||||
|
||||
$("#clickoutDoesntFireChange").spectrum({
|
||||
change: updateBorders,
|
||||
clickoutFiresChange: false
|
||||
});
|
||||
|
||||
$("#showInitial").spectrum({
|
||||
showInitial: true
|
||||
});
|
||||
|
||||
$("#showInputAndInitial").spectrum({
|
||||
showInitial: true,
|
||||
showInput: true
|
||||
});
|
||||
|
||||
$("#showInputInitialClear").spectrum({
|
||||
allowEmpty:true,
|
||||
showInitial: true,
|
||||
showInput: true
|
||||
});
|
||||
|
||||
$("#changeOnMove").spectrum({
|
||||
move: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Move called: " + c.toHexString());
|
||||
}
|
||||
});
|
||||
$("#changeOnMoveNo").spectrum({
|
||||
showInput: true,
|
||||
change: function(c) {
|
||||
var label = $("[data-label-for=" + this.id + "]");
|
||||
label.text("Change called: " + c.toHexString());
|
||||
}
|
||||
});
|
||||
|
||||
function prettyTime() {
|
||||
var date = new Date();
|
||||
|
||||
return date.toLocaleTimeString();
|
||||
}
|
||||
|
||||
$("#eventshow").spectrum({
|
||||
show: function(c) {
|
||||
var label = $("#eventshowLabel");
|
||||
label.text("show called at " + prettyTime() + " (color is " + c.toHexString() + ")");
|
||||
}
|
||||
});
|
||||
|
||||
$("#eventhide").spectrum({
|
||||
hide: function(c) {
|
||||
var label = $("#eventhideLabel");
|
||||
label.text("hide called at " + prettyTime() + " (color is " + c.toHexString() + ")");
|
||||
}
|
||||
});
|
||||
|
||||
$("#eventdragstart").spectrum({
|
||||
showAlpha: true
|
||||
}).on("dragstart.spectrum", function(e, c) {
|
||||
var label = $("#eventdragstartLabel");
|
||||
label.text("dragstart called at " + prettyTime() + " (color is " + c.toHexString() + ")");
|
||||
});
|
||||
|
||||
$("#eventdragstop").spectrum({
|
||||
showAlpha: true
|
||||
}).on("dragstop.spectrum", function(e, c) {
|
||||
var label = $("#eventdragstopLabel");
|
||||
label.text("dragstop called at " + prettyTime() + " (color is " + c.toHexString() + ")");
|
||||
});
|
||||
|
||||
|
||||
$(".basic").spectrum({ change: updateBorders });
|
||||
$(".override").spectrum({
|
||||
color: "yellow",
|
||||
change: updateBorders
|
||||
});
|
||||
|
||||
$(".startEmpty").spectrum({
|
||||
allowEmpty:true,
|
||||
change: updateBorders});
|
||||
|
||||
$("#beforeShow").spectrum({
|
||||
beforeShow: function() {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#custom").spectrum({
|
||||
color: "#f00"
|
||||
});
|
||||
|
||||
$("#buttonText").spectrum({
|
||||
allowEmpty:true,
|
||||
chooseText: "Alright",
|
||||
cancelText: "No way"
|
||||
});
|
||||
|
||||
|
||||
$("#showSelectionPalette").spectrum({
|
||||
showPalette: true,
|
||||
showSelectionPalette: true, // true by default
|
||||
palette: [ ]
|
||||
});
|
||||
$("#showSelectionPaletteStorage").spectrum({
|
||||
showPalette: true,
|
||||
localStorageKey: "spectrum.homepage", // Any picker with the same string will share selection
|
||||
showSelectionPalette: true,
|
||||
palette: [ ]
|
||||
});
|
||||
$("#showSelectionPaletteStorage2").spectrum({
|
||||
showPalette: true,
|
||||
localStorageKey: "spectrum.homepage", // Any picker with the same string will share selection
|
||||
showSelectionPalette: true,
|
||||
palette: [ ]
|
||||
});
|
||||
|
||||
$("#selectionPalette").spectrum({
|
||||
showPalette: true,
|
||||
palette: [ ],
|
||||
showSelectionPalette: true, // true by default
|
||||
selectionPalette: ["red", "green", "blue"]
|
||||
});
|
||||
|
||||
$("#maxSelectionSize").spectrum({
|
||||
showPalette: true,
|
||||
palette: [ ],
|
||||
showSelectionPalette: true, // true by default
|
||||
selectionPalette: ["red", "green", "blue"],
|
||||
maxSelectionSize: 2
|
||||
});
|
||||
|
||||
$("#preferredHex").spectrum({
|
||||
preferredFormat: "hex",
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||
});
|
||||
$("#preferredHex3").spectrum({
|
||||
preferredFormat: "hex3",
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||
});
|
||||
$("#preferredHsl").spectrum({
|
||||
preferredFormat: "hsl",
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||
});
|
||||
$("#preferredRgb").spectrum({
|
||||
preferredFormat: "rgb",
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||
});
|
||||
$("#preferredName").spectrum({
|
||||
preferredFormat: "name",
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||
});
|
||||
$("#preferredNone").spectrum({
|
||||
showInput: true,
|
||||
showPalette: true,
|
||||
palette: [["red", "rgba(0, 255, 0, .5)", "rgb(0, 0, 255)"]]
|
||||
});
|
||||
|
||||
$("#triggerSet").spectrum({
|
||||
change: updateBorders
|
||||
});
|
||||
|
||||
// Show the original input to demonstrate the value changing when calling `set`
|
||||
$("#triggerSet").show();
|
||||
|
||||
$("#btnEnterAColor").click(function() {
|
||||
$("#triggerSet").spectrum("set", $("#enterAColor").val());
|
||||
});
|
||||
|
||||
$("#toggle").spectrum();
|
||||
$("#btn-toggle").click(function() {
|
||||
$("#toggle").spectrum("toggle");
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$('#toc').toc({
|
||||
'selectors': 'h2,h3', //elements to use as headings
|
||||
'container': '#docs', //element to find all selectors in
|
||||
'smoothScrolling': true, //enable or disable smooth scrolling on click
|
||||
'prefix': 'toc', //prefix for anchor tags and class names
|
||||
'highlightOnScroll': true, //add class to heading that is currently in focus
|
||||
'highlightOffset': 100, //offset to trigger the next headline
|
||||
'anchorName': function(i, heading, prefix) { //custom function for anchor name
|
||||
return heading.id || prefix+i;
|
||||
}
|
||||
});
|
||||
|
||||
prettyPrint();
|
||||
|
||||
|
||||
});
|
||||
9597
public/assets/spectrum/docs/jquery-1.9.1.js
vendored
Normal file
9597
public/assets/spectrum/docs/jquery-1.9.1.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9111
public/assets/spectrum/docs/jquery-2.1.0.js
vendored
Normal file
9111
public/assets/spectrum/docs/jquery-2.1.0.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10872
public/assets/spectrum/docs/jquery-3.5.1.js
vendored
Normal file
10872
public/assets/spectrum/docs/jquery-3.5.1.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
28
public/assets/spectrum/docs/prettify.js
Normal file
28
public/assets/spectrum/docs/prettify.js
Normal file
@@ -0,0 +1,28 @@
|
||||
var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
||||
(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
|
||||
[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
|
||||
f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
|
||||
(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
|
||||
{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
|
||||
t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
|
||||
"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
|
||||
l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
||||
q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
|
||||
q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
|
||||
"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
|
||||
a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
|
||||
for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
|
||||
m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
|
||||
a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
|
||||
j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
||||
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
|
||||
H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
|
||||
J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
|
||||
I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
|
||||
["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
|
||||
/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
|
||||
["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
|
||||
hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
|
||||
!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
|
||||
250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
|
||||
PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
||||
109
public/assets/spectrum/docs/toc.js
Normal file
109
public/assets/spectrum/docs/toc.js
Normal file
@@ -0,0 +1,109 @@
|
||||
!function($) {
|
||||
$.fn.toc = function(options) {
|
||||
var self = this;
|
||||
var opts = $.extend({}, jQuery.fn.toc.defaults, options);
|
||||
|
||||
var container = $(opts.container);
|
||||
var headings = $(opts.selectors, container);
|
||||
var headingOffsets = [];
|
||||
var activeClassName = opts.prefix+'-active';
|
||||
|
||||
var findScrollableElement = function(els) {
|
||||
for (var i = 0, argLength = arguments.length; i < argLength; i++) {
|
||||
var el = arguments[i],
|
||||
$scrollElement = $(el);
|
||||
if ($scrollElement.scrollTop() > 0) {
|
||||
return $scrollElement;
|
||||
} else {
|
||||
$scrollElement.scrollTop(1);
|
||||
var isScrollable = $scrollElement.scrollTop() > 0;
|
||||
$scrollElement.scrollTop(0);
|
||||
if (isScrollable) {
|
||||
return $scrollElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
return [];
|
||||
};
|
||||
var scrollable = findScrollableElement(opts.container, 'body', 'html');
|
||||
|
||||
var scrollTo = function(e) {
|
||||
if (opts.smoothScrolling) {
|
||||
e.preventDefault();
|
||||
var elScrollTo = $(e.target).attr('href');
|
||||
var $el = $(elScrollTo);
|
||||
|
||||
scrollable.animate({ scrollTop: $el.offset().top }, 400, 'swing', function() {
|
||||
location.hash = elScrollTo;
|
||||
});
|
||||
}
|
||||
$('li', self).removeClass(activeClassName);
|
||||
$(e.target).parent().addClass(activeClassName);
|
||||
};
|
||||
|
||||
//highlight on scroll
|
||||
var timeout;
|
||||
var highlightOnScroll = function(e) {
|
||||
if (timeout) {
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
timeout = setTimeout(function() {
|
||||
var top = $(window).scrollTop();
|
||||
for (var i = 0, c = headingOffsets.length; i < c; i++) {
|
||||
if (headingOffsets[i] >= top) {
|
||||
$('li', self).removeClass(activeClassName);
|
||||
$('li:eq('+(i-1)+')', self).addClass(activeClassName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}, 50);
|
||||
};
|
||||
if (opts.highlightOnScroll) {
|
||||
$(window).bind('scroll', highlightOnScroll);
|
||||
highlightOnScroll();
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
//build TOC
|
||||
var ul = $('<ul/>');
|
||||
headings.each(function(i, heading) {
|
||||
var $h = $(heading);
|
||||
headingOffsets.push($h.offset().top - opts.highlightOffset);
|
||||
|
||||
//add anchor
|
||||
var anchorName = opts.anchorName(i, heading, opts.prefix);
|
||||
var anchor = $([]);
|
||||
if (!document.getElementById(anchorName)) {
|
||||
anchor = $('<span/>').attr('id', opts.anchorName(i, heading, opts.prefix)).insertBefore($h);
|
||||
}
|
||||
//build TOC item
|
||||
var a = $('<a/>')
|
||||
.text($h.text())
|
||||
.attr('href', '#' + anchorName)
|
||||
.bind('click', scrollTo);
|
||||
|
||||
var li = $('<li/>')
|
||||
.addClass(opts.prefix+'-'+$h[0].tagName.toLowerCase())
|
||||
.append(a);
|
||||
|
||||
ul.append(li);
|
||||
});
|
||||
var el = $(this);
|
||||
el.html(ul);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
jQuery.fn.toc.defaults = {
|
||||
container: 'body',
|
||||
selectors: 'h1,h2,h3',
|
||||
smoothScrolling: true,
|
||||
prefix: '',
|
||||
highlightOnScroll: true,
|
||||
highlightOffset: 100,
|
||||
anchorName: function(i, heading, prefix) {
|
||||
return prefix+i;
|
||||
}
|
||||
};
|
||||
|
||||
}(jQuery);
|
||||
254
public/assets/spectrum/example/example.js
Normal file
254
public/assets/spectrum/example/example.js
Normal file
@@ -0,0 +1,254 @@
|
||||
|
||||
$(function() {
|
||||
|
||||
var colorpickerInput = $("#full");
|
||||
|
||||
|
||||
function toggleButtonState() {
|
||||
var options = colorpickerInput.spectrum("option");
|
||||
$(".toggleBtn").each(function() {
|
||||
$(this).toggleClass("active", !!options[$(this).data("rule")]);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on("click", ".toggleBtn", function() {
|
||||
var option = $(this).data("rule");
|
||||
var existing = colorpickerInput.spectrum("option", option);
|
||||
|
||||
colorpickerInput.spectrum("option", option, !existing);
|
||||
toggleButtonState();
|
||||
});
|
||||
|
||||
colorpickerInput.spectrum({
|
||||
color: "#ECC",
|
||||
flat: true,
|
||||
showInput: true,
|
||||
className: "full-spectrum",
|
||||
showInitial: true,
|
||||
showPalette: true,
|
||||
showSelectionPalette: true,
|
||||
maxPaletteSize: 10,
|
||||
preferredFormat: "hex",
|
||||
localStorageKey: "spectrum.example",
|
||||
move: function (color) {
|
||||
},
|
||||
show: function () {
|
||||
|
||||
},
|
||||
beforeShow: function () {
|
||||
|
||||
},
|
||||
hide: function (color) {
|
||||
},
|
||||
|
||||
palette: [
|
||||
["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)", /*"rgb(153, 153, 153)","rgb(183, 183, 183)",*/
|
||||
"rgb(204, 204, 204)", "rgb(217, 217, 217)", /*"rgb(239, 239, 239)", "rgb(243, 243, 243)",*/ "rgb(255, 255, 255)"],
|
||||
["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)",
|
||||
"rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"],
|
||||
["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)",
|
||||
"rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)",
|
||||
"rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)",
|
||||
"rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)",
|
||||
"rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)",
|
||||
"rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)",
|
||||
"rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)",
|
||||
"rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)",
|
||||
/*"rgb(133, 32, 12)", "rgb(153, 0, 0)", "rgb(180, 95, 6)", "rgb(191, 144, 0)", "rgb(56, 118, 29)",
|
||||
"rgb(19, 79, 92)", "rgb(17, 85, 204)", "rgb(11, 83, 148)", "rgb(53, 28, 117)", "rgb(116, 27, 71)",*/
|
||||
"rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)",
|
||||
"rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"]
|
||||
]
|
||||
});
|
||||
|
||||
$("#size").change(function() {
|
||||
var size = Math.min(500, Math.max(50, $(this).val()));
|
||||
$(".sp-picker-container").width(size);
|
||||
|
||||
colorpickerInput.spectrum("reflow");
|
||||
});
|
||||
|
||||
$("#huesize").change(function() {
|
||||
var size = Math.min(80, Math.max(5, $(this).val()));
|
||||
|
||||
$(".sp-hue").css("left", (103 - size) + "%");
|
||||
$(".sp-color").css("right", size + "%");
|
||||
$(".sp-fill").css("padding-top", (100 - size) + "%");
|
||||
|
||||
colorpickerInput.spectrum("reflow");
|
||||
});
|
||||
|
||||
toggleButtonState();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
var palettes = { };
|
||||
|
||||
|
||||
palettes.newGmail = [["#000","#444","#666","#999","#ccc","#eee","#f3f3f3","#fff"],["#f00","#f90","#ff0","#0f0","#0ff","#00f","#90f","#f0f"],["#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc"],["#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd"],["#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0"],["#c00","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79"],["#900","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47"],["#600","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]];
|
||||
|
||||
palettes.default = [
|
||||
["#000000", "#434343", "#666666", "#999999", "#b7b7b7", "#cccccc", "#d9d9d9", "#efefef", "#f3f3f3", "#ffffff"],
|
||||
["#980000", "#ff0000", "#ff9900", "#ffff00", "#00ff00", "#00ffff", "#4a86e8", "#0000ff", "#9900ff", "#ff00ff"],
|
||||
["#e6b8af", "#f4cccc", "#fce5cd", "#fff2cc", "#d9ead3", "#d9ead3", "#c9daf8", "#cfe2f3", "#d9d2e9", "#ead1dc"],
|
||||
["#dd7e6b", "#ea9999", "#f9cb9c", "#ffe599", "#b6d7a8", "#a2c4c9", "#a4c2f4", "#9fc5e8", "#b4a7d6", "#d5a6bd"],
|
||||
["#cc4125", "#e06666", "#f6b26b", "#ffd966", "#93c47d", "#76a5af", "#6d9eeb", "#6fa8dc", "#8e7cc3", "#c27ba0"],
|
||||
["#a61c00", "#cc0000", "#e69138", "#f1c232", "#6aa84f", "#45818e", "#3c78d8", "#3d85c6", "#674ea7", "#a64d79"],
|
||||
["#85200c", "#990000", "#b45f06", "#bf9000", "#38761d", "#134f5c", "#1155cc", "#0b5394", "#351c75", "#741b47"],
|
||||
["#5b0f00", "#660000", "#783f04", "#7f6000", "#274e13", "#0c343d", "#1c4587", "#073763", "#20124d", "#4c1130"]
|
||||
];
|
||||
|
||||
palettes.snagit = [
|
||||
["#ffffff", "#000000", "#c00000", "#f79646", "#f5f445", "#7fd13b", "#4bacc6", "#1f497d", "#8064a2", "#ff0000"],
|
||||
["#f2f2f2", "#7f7f7f", "#f8d1d3", "#fdeada", "#fafdd7", "#e5f5d7", "#dbeef3", "#c6d9f0", "#e5e0ec", "#ffcc00"],
|
||||
["#d7d7d7", "#595959", "#f2a3a7", "#fbd5b5", "#fbfaae", "#cbecb0", "#b7dde8", "#8db3e2", "#ccc1d9", "#ffff00"],
|
||||
["#bebebe", "#414141", "#eb757b", "#fac08f", "#eef98e", "#b2e389", "#92cddc", "#548dd4", "#b2a2c7", "#00ff00"],
|
||||
["#a3a3a3", "#2a2a2a", "#a3171e", "#e36c09", "#dede07", "#5ea226", "#31859b", "#17365d", "#5f497a", "#0000ff"],
|
||||
["#7e7e7e", "#141414", "#6d0f14", "#974806", "#c0c00d", "#3f6c19", "#205867", "#0f243e", "#3f3151", "#9900ff"]
|
||||
];
|
||||
|
||||
palettes.newton = [
|
||||
|
||||
"#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"
|
||||
|
||||
];
|
||||
|
||||
palettes.aol = [
|
||||
|
||||
["#ffffff", "#fff7de", "#ffffce", "#ffffbd", "#ffffd6", "#b5ff84", "#c6efde", "#efffff", "#efe7f7", "#dea5d6"],
|
||||
["#ded6c6", "#ffc6bd", "#ffe7b5", "#ffe7a5", "#efef7b", "#adf77b", "#5abd9c", "#a5d6f7", "#8494e7", "#ef7be7"],
|
||||
["#cec6b5", "#e78473", "#efad52", "#f7b500", "#efef9c", "#a5ff00", "#7bd6bd", "#a5d6de", "#8c5ae7", "#de6bce"],
|
||||
["#8c8473", "#ef0018", "#ef4210", "#f79400", "#ffff00", "#63d600", "#a5c684", "#5a63d6", "#7b52c6", "#c642ce"],
|
||||
["#736b63", "#d60039", "#d67310", "#f7844a", "#f7de00", "#429400", "#4a944a", "#4200ff", "#9c00de", "#a500c6"],
|
||||
["#39524a", "#b51821", "#944a08", "#a55229", "#8c8c00", "#318c00", "#429484", "#3100c6", "#523984", "#940084"],
|
||||
["#000000", "#940008", "#840008", "#ad2929", "#637321", "#296b00", "#29006b", "#21007b", "#52007b", "#84007b"]
|
||||
|
||||
|
||||
];
|
||||
|
||||
palettes.oldGmail = [
|
||||
["#ffffff", "#cecece", "#c6c6c6", "#9c9c9c", "#636363", "#313131", "#000000"],
|
||||
["#ffcece", "#ff6363", "#ff0000", "#ce0000", "#9c0000", "#630000", "#310000"],
|
||||
["#ffce9c", "#ff9c63", "#ff9c00", "#ff6300", "#ce6300", "#9c3100", "#633100"],
|
||||
["#ffff9c", "#ffff63", "#ffce63", "#ffce31", "#ce9c31", "#9c6331", "#633131"],
|
||||
["#ffffce", "#ffff31", "#ffff00", "#ffce00", "#9c9c00", "#636300", "#313100"],
|
||||
["#9cff9c", "#63ff9c", "#31ff31", "#31ce00", "#009c00", "#006300", "#003100"],
|
||||
["#9cffff", "#31ffff", "#63cece", "#00cece", "#319c9c", "#316363", "#003131"],
|
||||
["#ceffff", "#63ffff", "#31ceff", "#3163ff", "#3131ff", "#00009c", "#000063"],
|
||||
["#ceceff", "#9c9cff", "#6363ce", "#6331ff", "#6300ce", "#31319c", "#31009c"],
|
||||
["#ffceff", "#ff9cff", "#ce63ce", "#ce31ce", "#9c319c", "#633163", "#310031"]
|
||||
|
||||
|
||||
];
|
||||
palettes.hotmail = [
|
||||
["#ffffff", "#000000", "#efefe7", "#184a7b", "#4a84bd", "#c6524a", "#9cbd5a", "#8463a5", "#4aadc6", "#f79442"],
|
||||
["#f7f7f7", "#7b7b7b", "#dedec6", "#c6def7", "#dee7f7", "#f7dede", "#eff7de", "#e7e7ef", "#deeff7", "#ffefde"],
|
||||
["#dedede", "#5a5a5a", "#c6bd94", "#8cb5e7", "#bdcee7", "#e7bdb5", "#d6e7bd", "#cec6de", "#b5deef", "#ffd6b5"],
|
||||
["#bdbdbd", "#393939", "#948c52", "#528cd6", "#94b5d6", "#de9494", "#c6d69c", "#b5a5c6", "#94cede", "#ffc68c"],
|
||||
["#a5a5a5", "#212121", "#4a4229", "#10315a", "#316394", "#943131", "#739439", "#5a4a7b", "#31849c", "#e76b08"],
|
||||
["#848484", "#080808", "#181810", "#082139", "#214263", "#632121", "#4a6329", "#393152", "#215a63", "#944a00"],
|
||||
["#c60000", "#ff0000", "#ffc600", "#ffff00", "#94d652", "#00b552", "#00b5f7", "#0073c6", "#002163", "#7331a5"],
|
||||
|
||||
];
|
||||
palettes.yahoo = [
|
||||
|
||||
["#000000", "#111111", "#2d2d2d", "#434343", "#5b5b5b", "#737373", "#8b8b8b", "#a2a2a2", "#b9b9b9", "#d0d0d0", "#e6e6e6", "#ffffff"],
|
||||
["#7f7f00", "#bfbf00", "#ffff00", "#ffff40", "#ffff80", "#ffffbf", "#525330", "#898a49", "#aea945", "#c3be71", "#e0dcaa", "#fcfae1"],
|
||||
["#407f00", "#60bf00", "#80ff00", "#a0ff40", "#c0ff80", "#dfffbf", "#3b5738", "#668f5a", "#7f9757", "#8a9b55", "#b7c296", "#e6ebd5"],
|
||||
["#007f40", "#00bf60", "#00ff80", "#40ffa0", "#80ffc0", "#bfffdf", "#033d21", "#438059", "#7fa37c", "#8dae94", "#acc6b5", "#ddebe2"],
|
||||
["#007f7f", "#00bfbf", "#00ffff", "#40ffff", "#80ffff", "#bfffff", "#033d3d", "#347d7e", "#609a9f", "#96bdc4", "#b5d1d7", "#e2f1f4"],
|
||||
["#00407f", "#0060bf", "#0080ff", "#40a0ff", "#80c0ff", "#bfdfff", "#1b2c48", "#385376", "#57708f", "#7792ac", "#a8bed1", "#deebf6"],
|
||||
["#00007f", "#0000bf", "#0000ff", "#4040ff", "#8080ff", "#bfbfff", "#212143", "#373e68", "#444f75", "#585e82", "#8687a4", "#d2d1e1"],
|
||||
["#40007f", "#6000bf", "#8000ff", "#a040ff", "#c080ff", "#dfbfff", "#302449", "#54466f", "#655a7f", "#726284", "#9e8fa9", "#dcd1df"],
|
||||
["#7f007f", "#bf00bf", "#ff00ff", "#ff40ff", "#ff80ff", "#ffbfff", "#4a234a", "#794a72", "#936386", "#9d7292", "#c0a0b6", "#ecdae5"],
|
||||
["#7f003f", "#bf005f", "#ff007f", "#ff409f", "#ff80bf", "#ffbfdf", "#451528", "#823857", "#a94a76", "#bc6f95", "#d8a5bb", "#f7dde9"],
|
||||
["#800000", "#c00000", "#ff0000", "#ff4040", "#ff8080", "#ffc0c0", "#441415", "#82393c", "#aa4d4e", "#bc6e6e", "#d8a3a4", "#f8dddd"],
|
||||
["#7f3f00", "#bf5f00", "#ff7f00", "#ff9f40", "#ffbf80", "#ffdfbf", "#482c1b", "#855a40", "#b27c51", "#c49b71", "#e1c4a8", "#fdeee0"]
|
||||
|
||||
];
|
||||
palettes.sixteen = [
|
||||
["#000000", "#000084", "#0000ff", "#840000"],
|
||||
["#840084", "#008200", "#ff0000", "#008284"],
|
||||
["#ff00ff", "#848200", "#848284", "#00ff00"],
|
||||
["#ffa600", "#00ffff", "#c6c3c6", "#ffff00"],
|
||||
["#ffffff"]
|
||||
];
|
||||
|
||||
palettes.websafe = [
|
||||
["#000", "#300", "#600", "#900", "#c00", "#f00"],
|
||||
["#003", "#303", "#603", "#903", "#c03", "#f03"],
|
||||
["#006", "#306", "#606", "#906", "#c06", "#f06"],
|
||||
["#009", "#309", "#609", "#909", "#c09", "#f09"],
|
||||
["#00c", "#30c", "#60c", "#90c", "#c0c", "#f0c"],
|
||||
["#00f", "#30f", "#60f", "#90f", "#c0f", "#f0f"],
|
||||
["#030", "#330", "#630", "#930", "#c30", "#f30"],
|
||||
["#033", "#333", "#633", "#933", "#c33", "#f33"],
|
||||
["#036", "#336", "#636", "#936", "#c36", "#f36"],
|
||||
["#039", "#339", "#639", "#939", "#c39", "#f39"],
|
||||
["#03c", "#33c", "#63c", "#93c", "#c3c", "#f3c"],
|
||||
["#03f", "#33f", "#63f", "#93f", "#c3f", "#f3f"],
|
||||
["#060", "#360", "#660", "#960", "#c60", "#f60"],
|
||||
["#063", "#363", "#663", "#963", "#c63", "#f63"],
|
||||
["#066", "#366", "#666", "#966", "#c66", "#f66"],
|
||||
["#069", "#369", "#669", "#969", "#c69", "#f69"],
|
||||
["#06c", "#36c", "#66c", "#96c", "#c6c", "#f6c"],
|
||||
["#06f", "#36f", "#66f", "#96f", "#c6f", "#f6f"],
|
||||
["#090", "#390", "#690", "#990", "#c90", "#f90"],
|
||||
["#093", "#393", "#693", "#993", "#c93", "#f93"],
|
||||
["#096", "#396", "#696", "#996", "#c96", "#f96"],
|
||||
["#099", "#399", "#699", "#999", "#c99", "#f99"],
|
||||
["#09c", "#39c", "#69c", "#99c", "#c9c", "#f9c"],
|
||||
["#09f", "#39f", "#69f", "#99f", "#c9f", "#f9f"],
|
||||
["#0c0", "#3c0", "#6c0", "#9c0", "#cc0", "#fc0"],
|
||||
["#0c3", "#3c3", "#6c3", "#9c3", "#cc3", "#fc3"],
|
||||
["#0c6", "#3c6", "#6c6", "#9c6", "#cc6", "#fc6"],
|
||||
["#0c9", "#3c9", "#6c9", "#9c9", "#cc9", "#fc9"],
|
||||
["#0cc", "#3cc", "#6cc", "#9cc", "#ccc", "#fcc"],
|
||||
["#0cf", "#3cf", "#6cf", "#9cf", "#ccf", "#fcf"],
|
||||
["#0f0", "#3f0", "#6f0", "#9f0", "#cf0", "#ff0"],
|
||||
["#0f3", "#3f3", "#6f3", "#9f3", "#cf3", "#ff3"],
|
||||
["#0f6", "#3f6", "#6f6", "#9f6", "#cf6", "#ff6"],
|
||||
["#0f9", "#3f9", "#6f9", "#9f9", "#cf9", "#ff9"],
|
||||
["#0fc", "#3fc", "#6fc", "#9fc", "#cfc", "#ffc"],
|
||||
["#0ff", "#3ff", "#6ff", "#9ff", "#cff", "#fff"]
|
||||
];
|
||||
|
||||
|
||||
palettes.named = [
|
||||
["White", "Ivory", "Snow", "LightYellow", "MintCream", "Azure", "FloralWhite", "Honeydew", "GhostWhite", "Seashell", "Cornsilk", "AliceBlue", "LemonChiffon", "LightCyan"],
|
||||
["OldLace", "LightGoldenrodYellow", "LavenderBlush", "WhiteSmoke", "Beige", "Linen", "PapayaWhip", "BlanchedAlmond", "AntiqueWhite", "MistyRose", "Bisque", "Lavender", "Moccasin", "PaleGoldenrod"],
|
||||
["NavajoWhite", "Yellow", "PeachPuff", "Wheat", "Khaki", "Gainsboro", "PaleTurquoise", "Pink", "Aquamarine", "LightGray", "PowderBlue", "PaleGreen", "GreenYellow", "LightPink"],
|
||||
["LightBlue", "Gold", "Thistle", "LightGreen", "LightSteelBlue", "Silver", "LightSkyBlue", "BurlyWood", "SkyBlue", "Chartreuse", "Plum", "LawnGreen", "Tan", "LightSalmon"],
|
||||
["SandyBrown", "Cyan", "Aqua", "DarkKhaki", "Violet", "Turquoise", "Orange", "YellowGreen", "DarkSalmon", "MediumAquamarine", "DarkSeaGreen", "DarkGray", "MediumTurquoise", "Goldenrod"],
|
||||
["MediumSpringGreen", "SpringGreen", "Salmon", "LightCoral", "Coral", "DarkOrange", "HotPink", "RosyBrown", "Orchid", "Lime", "PaleVioletRed", "Peru", "DarkTurquoise", "CornflowerBlue"],
|
||||
["Tomato", "DeepSkyBlue", "LimeGreen", "CadetBlue", "MediumSeaGreen", "DarkGoldenrod", "MediumPurple", "LightSeaGreen", "LightSlateGray", "MediumOrchid", "Gray", "Chocolate", "IndianRed", "SlateGray"],
|
||||
["MediumSlateBlue", "DodgerBlue", "OliveDrab", "SteelBlue", "OrangeRed", "Olive", "SlateBlue", "RoyalBlue", "Magenta", "Fuchsia", "SeaGreen", "DimGray", "DeepPink", "Sienna"],
|
||||
["DarkOrchid", "DarkCyan", "ForestGreen", "DarkOliveGreen", "BlueViolet", "Teal", "MediumVioletRed", "Crimson", "SaddleBrown", "Brown", "FireBrick", "Red", "Green", "DarkSlateBlue"],
|
||||
["DarkSlateGray", "DarkViolet", "DarkGreen", "DarkMagenta", "Purple", "DarkRed", "Maroon", "Indigo", "MidnightBlue", "Blue", "MediumBlue", "DarkBlue", "Navy", "Black"]
|
||||
];
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
for (var i in palettes) {
|
||||
$("<h3 />").text(i).appendTo("#palettes");
|
||||
$("<input />").appendTo("#palettes").spectrum({
|
||||
flat: true,
|
||||
showInput: true,
|
||||
className: i,
|
||||
preferredFormat: "rgb",
|
||||
showPalette: true,
|
||||
showPaletteOnly: true,
|
||||
palette: palettes[i]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#langdemo").spectrum({
|
||||
flat: false,
|
||||
showInput: true,
|
||||
});
|
||||
});
|
||||
149
public/assets/spectrum/example/index.html
Normal file
149
public/assets/spectrum/example/index.html
Normal file
@@ -0,0 +1,149 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Spectrum - The No Hassle jQuery Colorpicker</title>
|
||||
|
||||
<meta name="description" content="Spectrum is a JavaScript colorpicker plugin using the jQuery framework. It is highly customizable, but can also be used as a simple input type=color polyfill">
|
||||
<meta name="author" content="Brian Grinstead and Spectrum contributors">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../spectrum.css">
|
||||
<link rel="stylesheet" type="text/css" href="../docs/bootstrap.css">
|
||||
<link rel="stylesheet" type="text/css" href="../docs/docs.css">
|
||||
<script type="text/javascript" src="../docs/jquery-1.9.1.js"></script>
|
||||
<script type="text/javascript" src="../spectrum.js"></script>
|
||||
<script type="text/javascript" src="../i18n/jquery.spectrum-fi.js"></script>
|
||||
<script type='text/javascript' src='example.js'></script>
|
||||
|
||||
<style>
|
||||
|
||||
.example-container {
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
background: #333;
|
||||
background: linear-gradient(to bottom, #eee, #ccc);
|
||||
padding: 3px;
|
||||
padding-top: 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.example-controls {
|
||||
background: #999;
|
||||
margin: 0 -3px;
|
||||
padding: 10px 0;
|
||||
margin-bottom: 15px;
|
||||
|
||||
}
|
||||
label {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
#palettes .sp-palette {
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
|
||||
.newGmail .sp-palette-row-0, .newGmail .sp-palette-row-1 {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.newGmail .sp-palette .sp-thumb-el {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 1px 1px;
|
||||
}
|
||||
|
||||
.newGmail .sp-palette .sp-thumb-el:hover, .newGmail .sp-palette .sp-thumb-el.sp-thumb-active {
|
||||
border-color: #000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='header'>
|
||||
<h1><a href='http://bgrins.github.com/spectrum'>Spectrum</a></h1> <h2><em>The No Hassle jQuery Colorpicker</em></h2>
|
||||
<div id='links'>
|
||||
View the <a href='http://github.com/bgrins/spectrum'>Source code</a>.
|
||||
Spectrum is a project by <a href='http://twitter.com/bgrins'>@bgrins</a>.
|
||||
</div>
|
||||
<br style='clear:both;' />
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h2>Spectrum Colorpicker Crazy Configurator</h2>
|
||||
<div class='alert'>NOTE: this page is currently in development. Please refer to the <a href='http://github.com/bgrins/spectrum'>Home Page</a> for demos and documentation instead.
|
||||
</div>
|
||||
<p>
|
||||
Spectrum can be customized to show and hide different portions of the colorpicker. Try clicking some of the buttons below to see how it can change.
|
||||
</p>
|
||||
|
||||
<div class="example-container">
|
||||
<div class="example-controls">
|
||||
<div class='btn-group'>
|
||||
<button class='btn toggleBtn' data-rule='showPalette'>Show Palette</button>
|
||||
<button class='btn toggleBtn' data-rule='showInput'>Show Input</button>
|
||||
<button class='btn toggleBtn' data-rule='showInitial'>Show Initial</button>
|
||||
<button class='btn toggleBtn' data-rule='showAlpha'>Show Alpha</button>
|
||||
<button class='btn toggleBtn' data-rule='showPaletteOnly'>Show Palette Only</button>
|
||||
<button class='btn toggleBtn' data-rule='togglePaletteOnly'>Show Picker Toggle Button</button>
|
||||
<button class='btn toggleBtn' data-rule='showButtons'>Show Buttons</button>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<p>
|
||||
<label>Draggable Size <input type='range' value='172' id='size' max='500' min='50' /></label>
|
||||
|
||||
<label>Hue Size <input type='range' value='16' id='huesize' max='90' min='5' /></label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<input id="full">
|
||||
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<h2>Spectrum Colorpicker Localization</h2>
|
||||
<div class='alert'>
|
||||
<p>
|
||||
This page has loaded the German localization. Here is a list of all <a href='https://github.com/bgrins/spectrum/tree/master/i18n'>spectrum localizations</a>. <strong>Please help expand our localizations</strong> if you know a language that isn't represented! You can copy and paste one of the files, and update the text for 'cancel' and 'choose', then submit a pull request at: <a href'https://github.com/bgrins/spectrum'>https://github.com/bgrins/spectrum</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<input id="langdemo" />
|
||||
|
||||
<hr />
|
||||
<h2>Spectrum Colorpicker Sample Palettes</h2>
|
||||
<div class='alert'>
|
||||
|
||||
<p>
|
||||
NOTE: these palettes are also a work in progress. Ideally the site will eventually allow you to choose between a few options and download them.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The <code>newGmail</code> palette below is an example of customizing the palette size and layout with CSS.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div id="palettes" class="example-container">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="../docs/prettify.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-8259845-4']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
93
public/assets/spectrum/example/testcase.html
Normal file
93
public/assets/spectrum/example/testcase.html
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Spectrum - The No Hassle jQuery Colorpicker</title>
|
||||
|
||||
<meta name="description" content="Spectrum is a JavaScript colorpicker plugin using the jQuery framework. It is highly customizable, but can also be used as a simple input type=color polyfill">
|
||||
<meta name="author" content="Brian Grinstead and Spectrum contributors">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../spectrum.css">
|
||||
<link rel="stylesheet" type="text/css" href="../docs/bootstrap.css">
|
||||
<link rel="stylesheet" type="text/css" href="../docs/docs.css">
|
||||
<script type="text/javascript" src="../docs/jquery-1.9.1.js"></script>
|
||||
<script type="text/javascript" src="../spectrum.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id='header'>
|
||||
<h1><a href='http://bgrins.github.com/spectrum'>Spectrum</a></h1> <h2><em>The No Hassle jQuery Colorpicker</em></h2>
|
||||
<div id='links'>
|
||||
View the <a href='http://github.com/bgrins/spectrum'>Source code</a>.
|
||||
Spectrum is a project by <a href='http://twitter.com/bgrins'>@bgrins</a>.
|
||||
</div>
|
||||
<br style='clear:both;' />
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2>Basic Test Case</h2>
|
||||
<p>Also available as a <a href="http://jsfiddle.net/bgrins/ctkY3/">jsfiddle</a></p>
|
||||
|
||||
<button id="update">Update palette</button>
|
||||
<h2>Full Example</h2>
|
||||
<input type='text' id="full"/>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#update").click (function() {
|
||||
console.log($("#full").spectrum("option", "palette"));
|
||||
$("#full").spectrum("option", "palette", [
|
||||
["red", "green", "blue"]
|
||||
]);
|
||||
});
|
||||
|
||||
$("#full").spectrum({
|
||||
color: "#ECC",
|
||||
flat: true,
|
||||
showInput: true,
|
||||
className: "full-spectrum",
|
||||
showInitial: true,
|
||||
showPalette: true,
|
||||
showSelectionPalette: true,
|
||||
maxPaletteSize: 10,
|
||||
preferredFormat: "hex",
|
||||
localStorageKey: "spectrum.demo",
|
||||
move: function (color) {
|
||||
|
||||
},
|
||||
show: function () {
|
||||
|
||||
},
|
||||
beforeShow: function () {
|
||||
|
||||
},
|
||||
hide: function () {
|
||||
|
||||
},
|
||||
change: function() {
|
||||
|
||||
},
|
||||
palette: [
|
||||
["rgb(0, 0, 0)", "rgb(67, 67, 67)", "rgb(102, 102, 102)",
|
||||
"rgb(204, 204, 204)", "rgb(217, 217, 217)","rgb(255, 255, 255)"],
|
||||
["rgb(152, 0, 0)", "rgb(255, 0, 0)", "rgb(255, 153, 0)", "rgb(255, 255, 0)", "rgb(0, 255, 0)",
|
||||
"rgb(0, 255, 255)", "rgb(74, 134, 232)", "rgb(0, 0, 255)", "rgb(153, 0, 255)", "rgb(255, 0, 255)"],
|
||||
["rgb(230, 184, 175)", "rgb(244, 204, 204)", "rgb(252, 229, 205)", "rgb(255, 242, 204)", "rgb(217, 234, 211)",
|
||||
"rgb(208, 224, 227)", "rgb(201, 218, 248)", "rgb(207, 226, 243)", "rgb(217, 210, 233)", "rgb(234, 209, 220)",
|
||||
"rgb(221, 126, 107)", "rgb(234, 153, 153)", "rgb(249, 203, 156)", "rgb(255, 229, 153)", "rgb(182, 215, 168)",
|
||||
"rgb(162, 196, 201)", "rgb(164, 194, 244)", "rgb(159, 197, 232)", "rgb(180, 167, 214)", "rgb(213, 166, 189)",
|
||||
"rgb(204, 65, 37)", "rgb(224, 102, 102)", "rgb(246, 178, 107)", "rgb(255, 217, 102)", "rgb(147, 196, 125)",
|
||||
"rgb(118, 165, 175)", "rgb(109, 158, 235)", "rgb(111, 168, 220)", "rgb(142, 124, 195)", "rgb(194, 123, 160)",
|
||||
"rgb(166, 28, 0)", "rgb(204, 0, 0)", "rgb(230, 145, 56)", "rgb(241, 194, 50)", "rgb(106, 168, 79)",
|
||||
"rgb(69, 129, 142)", "rgb(60, 120, 216)", "rgb(61, 133, 198)", "rgb(103, 78, 167)", "rgb(166, 77, 121)",
|
||||
"rgb(91, 15, 0)", "rgb(102, 0, 0)", "rgb(120, 63, 4)", "rgb(127, 96, 0)", "rgb(39, 78, 19)",
|
||||
"rgb(12, 52, 61)", "rgb(28, 69, 135)", "rgb(7, 55, 99)", "rgb(32, 18, 77)", "rgb(76, 17, 48)"]
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
17
public/assets/spectrum/i18n/jquery.spectrum-ar.js
Normal file
17
public/assets/spectrum/i18n/jquery.spectrum-ar.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// Spectrum Colorpicker
|
||||
// Arabic (ar) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["ar"] = {
|
||||
cancelText: "إلغاء",
|
||||
chooseText: "إختار",
|
||||
clearText: "إرجاع الألوان على ما كانت",
|
||||
noColorSelectedText: "لم تختار أي لون",
|
||||
togglePaletteMoreText: "أكثر",
|
||||
togglePaletteLessText: "أقل"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-ca.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-ca.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Catalan (ca) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["ca"] = {
|
||||
cancelText: "Cancel·lar",
|
||||
chooseText: "Escollir",
|
||||
clearText: "Esborrar color seleccionat",
|
||||
noColorSelectedText: "Cap color seleccionat",
|
||||
togglePaletteMoreText: "Més",
|
||||
togglePaletteLessText: "Menys"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
19
public/assets/spectrum/i18n/jquery.spectrum-cs.js
Normal file
19
public/assets/spectrum/i18n/jquery.spectrum-cs.js
Normal file
@@ -0,0 +1,19 @@
|
||||
// Spectrum Colorpicker
|
||||
// Czech (cs) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
// author localization cs Pavel Laupe Dvorak pavel@pavel-dvorak.cz
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["cs"] = {
|
||||
cancelText: "zrušit",
|
||||
chooseText: "vybrat",
|
||||
clearText: "Resetovat výměr barev",
|
||||
noColorSelectedText: "Žádná barva nebyla vybrána",
|
||||
togglePaletteMoreText: "více",
|
||||
togglePaletteLessText: "méně"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-de.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-de.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// German (de) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["de"] = {
|
||||
cancelText: "Abbrechen",
|
||||
chooseText: "Wählen",
|
||||
clearText: "Farbauswahl zurücksetzen",
|
||||
noColorSelectedText: "Keine Farbe ausgewählt",
|
||||
togglePaletteMoreText: "Mehr",
|
||||
togglePaletteLessText: "Weniger"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
14
public/assets/spectrum/i18n/jquery.spectrum-dk.js
Normal file
14
public/assets/spectrum/i18n/jquery.spectrum-dk.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// Spectrum Colorpicker
|
||||
// Danish (dk) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["dk"] = {
|
||||
cancelText: "annuller",
|
||||
chooseText: "Vælg"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-es.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-es.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Spanish (es) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["es"] = {
|
||||
cancelText: "Cancelar",
|
||||
chooseText: "Elegir",
|
||||
clearText: "Borrar color seleccionado",
|
||||
noColorSelectedText: "Ningún color seleccionado",
|
||||
togglePaletteMoreText: "Más",
|
||||
togglePaletteLessText: "Menos"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-fa.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-fa.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Persian (fa) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["fa"] = {
|
||||
cancelText: "لغو",
|
||||
chooseText: "انتخاب",
|
||||
clearText: "تنظیم مجدد رنگ",
|
||||
noColorSelectedText: "هیچ رنگی انتخاب نشده است!",
|
||||
togglePaletteMoreText: "بیشتر",
|
||||
togglePaletteLessText: "کمتر"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
14
public/assets/spectrum/i18n/jquery.spectrum-fi.js
Normal file
14
public/assets/spectrum/i18n/jquery.spectrum-fi.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// Spectrum Colorpicker
|
||||
// Finnish (fi) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["fi"] = {
|
||||
cancelText: "Kumoa",
|
||||
chooseText: "Valitse"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-fr.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-fr.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// French (fr) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["fr"] = {
|
||||
cancelText: "Annuler",
|
||||
chooseText: "Valider",
|
||||
clearText: "Effacer couleur sélectionnée",
|
||||
noColorSelectedText: "Aucune couleur sélectionnée",
|
||||
togglePaletteMoreText: "Plus",
|
||||
togglePaletteLessText: "Moins"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-gr.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-gr.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Greek (gr) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["gr"] = {
|
||||
cancelText: "Ακύρωση",
|
||||
chooseText: "Επιλογή",
|
||||
clearText: "Καθαρισμός επιλεγμένου χρώματος",
|
||||
noColorSelectedText: "Δεν έχει επιλεχθεί κάποιο χρώμα",
|
||||
togglePaletteMoreText: "Περισσότερα",
|
||||
togglePaletteLessText: "Λιγότερα"
|
||||
};
|
||||
|
||||
$.extend($.gr.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-he.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-he.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Hebrew (he) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["he"] = {
|
||||
cancelText: "בטל בחירה",
|
||||
chooseText: "בחר צבע",
|
||||
clearText: "אפס בחירה",
|
||||
noColorSelectedText: "לא נבחר צבע",
|
||||
togglePaletteMoreText: "עוד צבעים",
|
||||
togglePaletteLessText: "פחות צבעים"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-hr.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-hr.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Croatian (hr) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["hr"] = {
|
||||
cancelText: "Odustani",
|
||||
chooseText: "Odaberi",
|
||||
clearText: "Poništi odabir",
|
||||
noColorSelectedText: "Niti jedna boja nije odabrana",
|
||||
togglePaletteMoreText: "Više",
|
||||
togglePaletteLessText: "Manje"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-id.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-id.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Indonesia/Bahasa Indonesia (id) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["id"] = {
|
||||
cancelText: "Batal",
|
||||
chooseText: "Pilih",
|
||||
clearText: "Hapus Pilihan Warna",
|
||||
noColorSelectedText: "Warna Tidak Dipilih",
|
||||
togglePaletteMoreText: "tambah",
|
||||
togglePaletteLessText: "kurangi"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
16
public/assets/spectrum/i18n/jquery.spectrum-it.js
Normal file
16
public/assets/spectrum/i18n/jquery.spectrum-it.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// Spectrum Colorpicker
|
||||
// Italian (it) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["it"] = {
|
||||
cancelText: "annulla",
|
||||
chooseText: "scegli",
|
||||
clearText: "Annulla selezione colore",
|
||||
noColorSelectedText: "Nessun colore selezionato"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
14
public/assets/spectrum/i18n/jquery.spectrum-ja.js
Normal file
14
public/assets/spectrum/i18n/jquery.spectrum-ja.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// Spectrum Colorpicker
|
||||
// Japanese (ja) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["ja"] = {
|
||||
cancelText: "中止",
|
||||
chooseText: "選択"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-ko.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-ko.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Korean (ko) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["ko"] = {
|
||||
cancelText: "취소",
|
||||
chooseText: "선택",
|
||||
clearText: "선택 초기화",
|
||||
noColorSelectedText: "선택된 색상 없음",
|
||||
togglePaletteMoreText: "더보기",
|
||||
togglePaletteLessText: "줄이기"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-lt.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-lt.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Lithuanian (lt) localization
|
||||
// https://github.com/liesislukas
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["lt"] = {
|
||||
cancelText: "Atšaukti",
|
||||
chooseText: "Pasirinkti",
|
||||
clearText: "Išvalyti pasirinkimą",
|
||||
noColorSelectedText: "Spalva nepasirinkta",
|
||||
togglePaletteMoreText: "Daugiau",
|
||||
togglePaletteLessText: "Mažiau"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
17
public/assets/spectrum/i18n/jquery.spectrum-nl.js
Normal file
17
public/assets/spectrum/i18n/jquery.spectrum-nl.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// Spectrum Colorpicker
|
||||
// Dutch (nl-nl) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["nl-nl"] = {
|
||||
cancelText: "Annuleer",
|
||||
chooseText: "Kies",
|
||||
clearText: "Wis kleur selectie",
|
||||
togglePaletteMoreText: 'Meer',
|
||||
togglePaletteLessText: 'Minder'
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-pl.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-pl.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Polish (pl) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["pl"] = {
|
||||
cancelText: "Anuluj",
|
||||
chooseText: "Wybierz",
|
||||
clearText: "Usuń wybór koloru",
|
||||
noColorSelectedText: "Nie wybrano koloru",
|
||||
togglePaletteMoreText: "Więcej",
|
||||
togglePaletteLessText: "Mniej"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-pt-br.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-pt-br.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Brazilian (pt-br) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["pt-br"] = {
|
||||
cancelText: "Cancelar",
|
||||
chooseText: "Escolher",
|
||||
clearText: "Limpar cor selecionada",
|
||||
noColorSelectedText: "Nenhuma cor selecionada",
|
||||
togglePaletteMoreText: "Mais",
|
||||
togglePaletteLessText: "Menos"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-ru.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-ru.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Russian (ru) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["ru"] = {
|
||||
cancelText: "Отмена",
|
||||
chooseText: "Выбрать",
|
||||
clearText: "Сбросить",
|
||||
noColorSelectedText: "Цвет не выбран",
|
||||
togglePaletteMoreText: "Ещё",
|
||||
togglePaletteLessText: "Скрыть"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
14
public/assets/spectrum/i18n/jquery.spectrum-sv.js
Normal file
14
public/assets/spectrum/i18n/jquery.spectrum-sv.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// Spectrum Colorpicker
|
||||
// Swedish (sv) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["sv"] = {
|
||||
cancelText: "Avbryt",
|
||||
chooseText: "Välj"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
14
public/assets/spectrum/i18n/jquery.spectrum-tr.js
Normal file
14
public/assets/spectrum/i18n/jquery.spectrum-tr.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// Spectrum Colorpicker
|
||||
// Turkish (tr) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["tr"] = {
|
||||
cancelText: "iptal",
|
||||
chooseText: "tamam"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-zh-cn.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-zh-cn.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Simplified Chinese (zh-cn) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["zh-cn"] = {
|
||||
cancelText: "取消",
|
||||
chooseText: "选择",
|
||||
clearText: "清除",
|
||||
togglePaletteMoreText: "更多选项",
|
||||
togglePaletteLessText: "隐藏",
|
||||
noColorSelectedText: "尚未选择任何颜色"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
18
public/assets/spectrum/i18n/jquery.spectrum-zh-tw.js
Normal file
18
public/assets/spectrum/i18n/jquery.spectrum-zh-tw.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// Spectrum Colorpicker
|
||||
// Traditional Chinese (zh-tw) localization
|
||||
// https://github.com/bgrins/spectrum
|
||||
|
||||
(function ( $ ) {
|
||||
|
||||
var localization = $.spectrum.localization["zh-tw"] = {
|
||||
cancelText: "取消",
|
||||
chooseText: "選擇",
|
||||
clearText: "清除",
|
||||
togglePaletteMoreText: "更多選項",
|
||||
togglePaletteLessText: "隱藏",
|
||||
noColorSelectedText: "尚未選擇任何顏色"
|
||||
};
|
||||
|
||||
$.extend($.fn.spectrum.defaults, localization);
|
||||
|
||||
})( jQuery );
|
||||
1214
public/assets/spectrum/index.html
Normal file
1214
public/assets/spectrum/index.html
Normal file
File diff suppressed because it is too large
Load Diff
30
public/assets/spectrum/package.json
Normal file
30
public/assets/spectrum/package.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "spectrum-colorpicker",
|
||||
"description": "Spectrum: the no hassle jQuery colorpicker",
|
||||
"version": "1.8.1",
|
||||
"main": "spectrum.js",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"jquery-plugin",
|
||||
"ecosystem:jquery",
|
||||
"color",
|
||||
"colorpicker",
|
||||
"ui"
|
||||
],
|
||||
"homepage": "http://bgrins.github.com/spectrum",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://bgrins.github.com/spectrum"
|
||||
},
|
||||
"author": {
|
||||
"name": "Brian Grinstead",
|
||||
"email": "briangrinstead@gmail.com",
|
||||
"url": "http://briangrinstead.com/"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "^1.1.0",
|
||||
"grunt-contrib-jshint": "^2.1.0",
|
||||
"grunt-contrib-qunit": "^3.1.0",
|
||||
"grunt-contrib-uglify": "^4.0.1"
|
||||
}
|
||||
}
|
||||
507
public/assets/spectrum/spectrum.css
vendored
Normal file
507
public/assets/spectrum/spectrum.css
vendored
Normal file
@@ -0,0 +1,507 @@
|
||||
/***
|
||||
Spectrum Colorpicker v1.8.1
|
||||
https://github.com/bgrins/spectrum
|
||||
Author: Brian Grinstead
|
||||
License: MIT
|
||||
***/
|
||||
|
||||
.sp-container {
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
display:inline-block;
|
||||
*display: inline;
|
||||
*zoom: 1;
|
||||
/* https://github.com/bgrins/spectrum/issues/40 */
|
||||
z-index: 9999994;
|
||||
overflow: hidden;
|
||||
}
|
||||
.sp-container.sp-flat {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Fix for * { box-sizing: border-box; } */
|
||||
.sp-container,
|
||||
.sp-container * {
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
|
||||
.sp-top {
|
||||
position:relative;
|
||||
width: 100%;
|
||||
display:inline-block;
|
||||
}
|
||||
.sp-top-inner {
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
right:0;
|
||||
}
|
||||
.sp-color {
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
right:20%;
|
||||
}
|
||||
.sp-hue {
|
||||
position: absolute;
|
||||
top:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
left:84%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sp-clear-enabled .sp-hue {
|
||||
top:33px;
|
||||
height: 77.5%;
|
||||
}
|
||||
|
||||
.sp-fill {
|
||||
padding-top: 80%;
|
||||
}
|
||||
.sp-sat, .sp-val {
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
}
|
||||
|
||||
.sp-alpha-enabled .sp-top {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.sp-alpha-enabled .sp-alpha {
|
||||
display: block;
|
||||
}
|
||||
.sp-alpha-handle {
|
||||
position:absolute;
|
||||
top:-4px;
|
||||
bottom: -4px;
|
||||
width: 6px;
|
||||
left: 50%;
|
||||
cursor: pointer;
|
||||
border: 1px solid black;
|
||||
background: white;
|
||||
opacity: .8;
|
||||
}
|
||||
.sp-alpha {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: -14px;
|
||||
right: 0;
|
||||
left: 0;
|
||||
height: 8px;
|
||||
}
|
||||
.sp-alpha-inner {
|
||||
border: solid 1px #333;
|
||||
}
|
||||
|
||||
.sp-clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sp-clear.sp-clear-display {
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.sp-clear-enabled .sp-clear {
|
||||
display: block;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:0;
|
||||
bottom:0;
|
||||
left:84%;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
/* Don't allow text selection */
|
||||
.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
|
||||
-webkit-user-select:none;
|
||||
-moz-user-select: -moz-none;
|
||||
-o-user-select:none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.sp-container.sp-input-disabled .sp-input-container {
|
||||
display: none;
|
||||
}
|
||||
.sp-container.sp-buttons-disabled .sp-button-container {
|
||||
display: none;
|
||||
}
|
||||
.sp-container.sp-palette-buttons-disabled .sp-palette-button-container {
|
||||
display: none;
|
||||
}
|
||||
.sp-palette-only .sp-picker-container {
|
||||
display: none;
|
||||
}
|
||||
.sp-palette-disabled .sp-palette-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sp-initial-disabled .sp-initial {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
|
||||
.sp-sat {
|
||||
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
|
||||
background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
|
||||
background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
||||
background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
||||
background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
|
||||
background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
|
||||
filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
|
||||
}
|
||||
.sp-val {
|
||||
background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
|
||||
background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
|
||||
background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
||||
background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
||||
background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
|
||||
background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
|
||||
filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
|
||||
}
|
||||
|
||||
.sp-hue {
|
||||
background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
|
||||
background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
|
||||
}
|
||||
|
||||
/* IE filters do not support multiple color stops.
|
||||
Generate 6 divs, line them up, and do two color gradients for each.
|
||||
Yes, really.
|
||||
*/
|
||||
.sp-1 {
|
||||
height:17%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
|
||||
}
|
||||
.sp-2 {
|
||||
height:16%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
|
||||
}
|
||||
.sp-3 {
|
||||
height:17%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
|
||||
}
|
||||
.sp-4 {
|
||||
height:17%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
|
||||
}
|
||||
.sp-5 {
|
||||
height:16%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
|
||||
}
|
||||
.sp-6 {
|
||||
height:17%;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
|
||||
}
|
||||
|
||||
.sp-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Clearfix hack */
|
||||
.sp-cf:before, .sp-cf:after { content: ""; display: table; }
|
||||
.sp-cf:after { clear: both; }
|
||||
.sp-cf { *zoom: 1; }
|
||||
|
||||
/* Mobile devices, make hue slider bigger so it is easier to slide */
|
||||
@media (max-device-width: 480px) {
|
||||
.sp-color { right: 40%; }
|
||||
.sp-hue { left: 63%; }
|
||||
.sp-fill { padding-top: 60%; }
|
||||
}
|
||||
.sp-dragger {
|
||||
border-radius: 5px;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
border: 1px solid #fff;
|
||||
background: #000;
|
||||
cursor: pointer;
|
||||
position:absolute;
|
||||
top:0;
|
||||
left: 0;
|
||||
}
|
||||
.sp-slider {
|
||||
position: absolute;
|
||||
top:0;
|
||||
cursor:pointer;
|
||||
height: 3px;
|
||||
left: -1px;
|
||||
right: -1px;
|
||||
border: 1px solid #000;
|
||||
background: white;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
/*
|
||||
Theme authors:
|
||||
Here are the basic themeable display options (colors, fonts, global widths).
|
||||
See http://bgrins.github.io/spectrum/themes/ for instructions.
|
||||
*/
|
||||
|
||||
.sp-container {
|
||||
border-radius: 0;
|
||||
background-color: #ECECEC;
|
||||
border: solid 1px #f0c49B;
|
||||
padding: 0;
|
||||
}
|
||||
.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear {
|
||||
font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.sp-top {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.sp-color, .sp-hue, .sp-clear {
|
||||
border: solid 1px #666;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
.sp-input-container {
|
||||
float:right;
|
||||
width: 100px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.sp-initial-disabled .sp-input-container {
|
||||
width: 100%;
|
||||
}
|
||||
.sp-input {
|
||||
font-size: 12px !important;
|
||||
border: 1px inset;
|
||||
padding: 4px 5px;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
background:transparent;
|
||||
border-radius: 3px;
|
||||
color: #222;
|
||||
}
|
||||
.sp-input:focus {
|
||||
border: 1px solid orange;
|
||||
}
|
||||
.sp-input.sp-validation-error {
|
||||
border: 1px solid red;
|
||||
background: #fdd;
|
||||
}
|
||||
.sp-picker-container , .sp-palette-container {
|
||||
float:left;
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
padding-bottom: 300px;
|
||||
margin-bottom: -290px;
|
||||
}
|
||||
.sp-picker-container {
|
||||
width: 172px;
|
||||
border-left: solid 1px #fff;
|
||||
}
|
||||
|
||||
/* Palettes */
|
||||
.sp-palette-container {
|
||||
border-right: solid 1px #ccc;
|
||||
}
|
||||
|
||||
.sp-palette-only .sp-palette-container {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.sp-palette .sp-thumb-el {
|
||||
display: block;
|
||||
position:relative;
|
||||
float:left;
|
||||
width: 24px;
|
||||
height: 15px;
|
||||
margin: 3px;
|
||||
cursor: pointer;
|
||||
border:solid 2px transparent;
|
||||
}
|
||||
.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
|
||||
border-color: orange;
|
||||
}
|
||||
.sp-thumb-el {
|
||||
position:relative;
|
||||
}
|
||||
|
||||
/* Initial */
|
||||
.sp-initial {
|
||||
float: left;
|
||||
border: solid 1px #333;
|
||||
}
|
||||
.sp-initial span {
|
||||
width: 30px;
|
||||
height: 25px;
|
||||
border:none;
|
||||
display:block;
|
||||
float:left;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.sp-initial .sp-clear-display {
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.sp-palette-button-container,
|
||||
.sp-button-container {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* Replacer (the little preview div that shows up instead of the <input>) */
|
||||
.sp-replacer {
|
||||
margin:0;
|
||||
overflow:hidden;
|
||||
cursor:pointer;
|
||||
padding: 4px;
|
||||
display:inline-block;
|
||||
*zoom: 1;
|
||||
*display: inline;
|
||||
border: solid 1px #91765d;
|
||||
background: #eee;
|
||||
color: #333;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.sp-replacer:hover, .sp-replacer.sp-active {
|
||||
border-color: #F0C49B;
|
||||
color: #111;
|
||||
}
|
||||
.sp-replacer.sp-disabled {
|
||||
cursor:default;
|
||||
border-color: silver;
|
||||
color: silver;
|
||||
}
|
||||
.sp-dd {
|
||||
padding: 2px 0;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
float:left;
|
||||
font-size:10px;
|
||||
}
|
||||
.sp-preview {
|
||||
position:relative;
|
||||
width:25px;
|
||||
height: 20px;
|
||||
border: solid 1px #222;
|
||||
margin-right: 5px;
|
||||
float:left;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.sp-palette {
|
||||
*width: 220px;
|
||||
max-width: 220px;
|
||||
}
|
||||
.sp-palette .sp-thumb-el {
|
||||
width:16px;
|
||||
height: 16px;
|
||||
margin:2px 1px;
|
||||
border: solid 1px #d0d0d0;
|
||||
}
|
||||
|
||||
.sp-container {
|
||||
padding-bottom:0;
|
||||
}
|
||||
|
||||
|
||||
/* Buttons: http://hellohappy.org/css3-buttons/ */
|
||||
.sp-container button {
|
||||
background-color: #eeeeee;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
|
||||
background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 1px solid #bbb;
|
||||
border-radius: 3px;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
padding: 5px 4px;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 #eee;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.sp-container button:hover {
|
||||
background-color: #dddddd;
|
||||
background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
|
||||
background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
|
||||
border: 1px solid #bbb;
|
||||
border-bottom: 1px solid #999;
|
||||
cursor: pointer;
|
||||
text-shadow: 0 1px 0 #ddd;
|
||||
}
|
||||
.sp-container button:active {
|
||||
border: 1px solid #aaa;
|
||||
border-bottom: 1px solid #888;
|
||||
-webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
-moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
-ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
-o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
|
||||
}
|
||||
.sp-cancel {
|
||||
font-size: 11px;
|
||||
color: #d93f3f !important;
|
||||
margin:0;
|
||||
padding:2px;
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
text-decoration:none;
|
||||
|
||||
}
|
||||
.sp-cancel:hover {
|
||||
color: #d93f3f !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
.sp-palette span:hover, .sp-palette span.sp-thumb-active {
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
.sp-preview, .sp-alpha, .sp-thumb-el {
|
||||
position:relative;
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
|
||||
}
|
||||
.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner {
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:0;left:0;bottom:0;right:0;
|
||||
}
|
||||
|
||||
.sp-palette .sp-thumb-inner {
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
|
||||
}
|
||||
|
||||
.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
|
||||
}
|
||||
|
||||
.sp-clear-display {
|
||||
background-repeat:no-repeat;
|
||||
background-position: center;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==);
|
||||
}
|
||||
2341
public/assets/spectrum/spectrum.js
Normal file
2341
public/assets/spectrum/spectrum.js
Normal file
File diff suppressed because it is too large
Load Diff
18
public/assets/spectrum/test/index.html
Normal file
18
public/assets/spectrum/test/index.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Spectrum Tests</title>
|
||||
<link rel="stylesheet" href="qunit.css">
|
||||
<link rel="stylesheet" href="../spectrum.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<script src="../docs/jquery-3.5.1.js"></script>
|
||||
<script src="../spectrum.js"></script>
|
||||
<script src="qunit.js"></script>
|
||||
<script src="tests.js"></script>
|
||||
|
||||
<input type="color" id="type-color-on-page" />
|
||||
</body>
|
||||
</html>
|
||||
10872
public/assets/spectrum/test/jquery.js
vendored
Normal file
10872
public/assets/spectrum/test/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
13
public/assets/spectrum/test/loaders.html
Normal file
13
public/assets/spectrum/test/loaders.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Spectrum Tests</title>
|
||||
<link rel="stylesheet" href="qunit.css">
|
||||
<link rel="stylesheet" href="../spectrum.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit"></div>
|
||||
<script src="require.js" data-main="loaders.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
15
public/assets/spectrum/test/loaders.js
Normal file
15
public/assets/spectrum/test/loaders.js
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
require(["../spectrum", "./qunit"], function (spectrum, QUnit) {
|
||||
QUnit.module("Initialization");
|
||||
QUnit.test("Custom offset", function (assert) {
|
||||
assert.ok($.fn.spectrum, "Plugin has been loaded");
|
||||
|
||||
// Just do some basic stuff with the API as a sanity check.
|
||||
var el = $("<input id='spec' />").spectrum();
|
||||
el.spectrum("set", "red");
|
||||
assert.equal(el.spectrum("get").toName(), "red", "Basic color setting");
|
||||
el.spectrum("destroy");
|
||||
});
|
||||
|
||||
QUnit.start();
|
||||
});
|
||||
447
public/assets/spectrum/test/qunit.css
vendored
Normal file
447
public/assets/spectrum/test/qunit.css
vendored
Normal file
@@ -0,0 +1,447 @@
|
||||
/*!
|
||||
* QUnit 2.10.0
|
||||
* https://qunitjs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2020-05-02T22:51Z
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
|
||||
[id^=qunit] button {
|
||||
font-size: initial;
|
||||
border: initial;
|
||||
background-color: buttonface;
|
||||
}
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/** Header (excluding toolbar) */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #8699A4;
|
||||
background-color: #0D3349;
|
||||
|
||||
font-size: 1.5em;
|
||||
line-height: 1em;
|
||||
font-weight: 400;
|
||||
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
|
||||
#qunit-header a {
|
||||
text-decoration: none;
|
||||
color: #C2CCD1;
|
||||
}
|
||||
|
||||
#qunit-header a:hover,
|
||||
#qunit-header a:focus {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-filteredTest {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #366097;
|
||||
background-color: #F4FF77;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #FFF;
|
||||
background-color: #2B81AF;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
|
||||
/** Toolbar */
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #5E740B;
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar .clearfix {
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar input[type=checkbox],
|
||||
#qunit-testrunner-toolbar input[type=radio] {
|
||||
margin: 3px;
|
||||
vertical-align: -2px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar input[type=text] {
|
||||
box-sizing: border-box;
|
||||
height: 1.6em;
|
||||
}
|
||||
|
||||
#qunit-toolbar-filters {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.qunit-url-config,
|
||||
.qunit-filter,
|
||||
#qunit-modulefilter {
|
||||
display: inline-block;
|
||||
line-height: 2.1em;
|
||||
}
|
||||
|
||||
.qunit-filter,
|
||||
#qunit-modulefilter {
|
||||
position: relative;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.qunit-url-config label {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-search {
|
||||
box-sizing: border-box;
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-search-container:after {
|
||||
position: absolute;
|
||||
right: 0.3em;
|
||||
content: "\25bc";
|
||||
color: black;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown {
|
||||
/* align with #qunit-modulefilter-search */
|
||||
box-sizing: border-box;
|
||||
min-width: 400px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
margin-top: 0.8em;
|
||||
|
||||
border: 1px solid #D3D3D3;
|
||||
border-top: none;
|
||||
border-radius: 0 0 .25em .25em;
|
||||
color: #000;
|
||||
background-color: #F5F5F5;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown .clickable.checked {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
background-color: #D2E0E6;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown .clickable:hover {
|
||||
color: #FFF;
|
||||
background-color: #0D3349;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-actions {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
|
||||
/* align with #qunit-modulefilter-dropdown-list */
|
||||
font: smaller/1.5em sans-serif;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > * {
|
||||
box-sizing: border-box;
|
||||
max-height: 2.8em;
|
||||
display: block;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > button {
|
||||
float: right;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > :last-child {
|
||||
/* insert padding to align with checkbox margins */
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
margin: 0;
|
||||
border-top: 2px groove threedhighlight;
|
||||
padding: 0.4em 0 0;
|
||||
font: smaller/1.5em sans-serif;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list li {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list .clickable {
|
||||
display: block;
|
||||
padding-left: 0.15em;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 1em 0.4em 1em;
|
||||
border-bottom: 1px solid #FFF;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests > li {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests li.running,
|
||||
#qunit-tests li.pass,
|
||||
#qunit-tests li.fail,
|
||||
#qunit-tests li.skipped,
|
||||
#qunit-tests li.aborted {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.running,
|
||||
#qunit-tests.hidepass li.pass:not(.todo) {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li.skipped strong {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #C2CCD1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests li p a {
|
||||
padding: 0.25em;
|
||||
color: #6B6464;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#qunit-tests li .runtime {
|
||||
float: right;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.qunit-assert-list {
|
||||
margin-top: 0.5em;
|
||||
padding: 0.5em;
|
||||
|
||||
background-color: #FFF;
|
||||
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.qunit-source {
|
||||
margin: 0.6em 0 0.3em;
|
||||
}
|
||||
|
||||
.qunit-collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests table {
|
||||
border-collapse: collapse;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
#qunit-tests th {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
padding: 0 0.5em 0 0;
|
||||
}
|
||||
|
||||
#qunit-tests td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#qunit-tests pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#qunit-tests del {
|
||||
color: #374E0C;
|
||||
background-color: #E0F2BE;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests ins {
|
||||
color: #500;
|
||||
background-color: #FFCACA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*** Test Counts */
|
||||
|
||||
#qunit-tests b.counts { color: #000; }
|
||||
#qunit-tests b.passed { color: #5E740B; }
|
||||
#qunit-tests b.failed { color: #710909; }
|
||||
|
||||
#qunit-tests li li {
|
||||
padding: 5px;
|
||||
background-color: #FFF;
|
||||
border-bottom: none;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #3C510C;
|
||||
background-color: #FFF;
|
||||
border-left: 10px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests .pass .test-name { color: #366097; }
|
||||
|
||||
#qunit-tests .pass .test-actual,
|
||||
#qunit-tests .pass .test-expected { color: #999; }
|
||||
|
||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #FFF;
|
||||
border-left: 10px solid #EE5757;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#qunit-tests > li:last-child {
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
||||
#qunit-tests .fail .test-name,
|
||||
#qunit-tests .fail .module-name { color: #000; }
|
||||
|
||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||
#qunit-tests .fail .test-expected { color: #008000; }
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
|
||||
/*** Aborted tests */
|
||||
#qunit-tests .aborted { color: #000; background-color: orange; }
|
||||
/*** Skipped tests */
|
||||
|
||||
#qunit-tests .skipped {
|
||||
background-color: #EBECE9;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-todo-label,
|
||||
#qunit-tests .qunit-skipped-label {
|
||||
background-color: #F4FF77;
|
||||
display: inline-block;
|
||||
font-style: normal;
|
||||
color: #366097;
|
||||
line-height: 1.8em;
|
||||
padding: 0 0.5em;
|
||||
margin: -0.4em 0.4em -0.4em 0;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-todo-label {
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
color: #2B81AF;
|
||||
background-color: #D2E0E6;
|
||||
|
||||
border-bottom: 1px solid #FFF;
|
||||
}
|
||||
#qunit-testresult .clearfix {
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
#qunit-testresult .module-name {
|
||||
font-weight: 700;
|
||||
}
|
||||
#qunit-testresult-display {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
width: 85%;
|
||||
float:left;
|
||||
}
|
||||
#qunit-testresult-controls {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
width: 10%;
|
||||
float:left;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
#qunit-fixture {
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
width: 1000px;
|
||||
height: 1000px;
|
||||
}
|
||||
6643
public/assets/spectrum/test/qunit.js
Normal file
6643
public/assets/spectrum/test/qunit.js
Normal file
File diff suppressed because it is too large
Load Diff
2145
public/assets/spectrum/test/require.js
Normal file
2145
public/assets/spectrum/test/require.js
Normal file
File diff suppressed because it is too large
Load Diff
1101
public/assets/spectrum/test/tests.js
Normal file
1101
public/assets/spectrum/test/tests.js
Normal file
File diff suppressed because it is too large
Load Diff
113
public/assets/spectrum/themes/index.html
Normal file
113
public/assets/spectrum/themes/index.html
Normal file
@@ -0,0 +1,113 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<title>Spectrum - The No Hassle jQuery Colorpicker</title>
|
||||
|
||||
<meta name="description" content="Spectrum is a JavaScript colorpicker plugin using the jQuery framework. It is highly customizable, but can also be used as a simple input type=color polyfill">
|
||||
<meta name="author" content="Brian Grinstead and Spectrum contributors">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../spectrum.css">
|
||||
<link rel="stylesheet" type="text/css" href="../docs/bootstrap.css">
|
||||
<link rel="stylesheet" type="text/css" href="../docs/docs.css">
|
||||
<script type="text/javascript" src="../docs/jquery-1.9.1.js"></script>
|
||||
<script type="text/javascript" src="../spectrum.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="sp-dark.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id='header'>
|
||||
<h1><a href='http://bgrins.github.com/spectrum'>Spectrum</a></h1> <h2><em>The No Hassle jQuery Colorpicker</em></h2>
|
||||
<div id='links'>
|
||||
View the <a href='http://github.com/bgrins/spectrum'>Source code</a>.
|
||||
Spectrum is a project by <a href='http://twitter.com/bgrins'>@bgrins</a>.
|
||||
</div>
|
||||
<br style='clear:both;' />
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h2>Themes</h2>
|
||||
|
||||
<div class="alert">
|
||||
This page is in development.
|
||||
</div>
|
||||
|
||||
<div id="theme-gallery">
|
||||
<h3>Gallery of existing themes</h3>
|
||||
|
||||
<div class="theme" id="sp-light">
|
||||
<h4>sp-light</h4>
|
||||
<p>This is the default theme that you know and love.</p>
|
||||
|
||||
<div class='example'>
|
||||
<input type='text' />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="theme" id="sp-dark">
|
||||
<h4>sp-dark</h4>
|
||||
<p>Similar to sp-light, only ... darker</p>
|
||||
|
||||
<div class='example'>
|
||||
<input type='text' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="theme-instructions">
|
||||
<h3>Instructions for building themes</h3>
|
||||
<p>
|
||||
You can change most any property on spectrum using CSS. Anything from borders and colors, to the size of the draggable areas, to the layout of the colorpicker can be changed with plain CSS.
|
||||
</p>
|
||||
<h4>Playing friendly with other themes</h4>
|
||||
<p>
|
||||
Please prefix all of your rules with <code>.theme-name</code>. The exception is for changes to <code>.sp-container</code> and <code>.sp-replacer</code>, which will have your theme name applied.
|
||||
</p>
|
||||
<p>
|
||||
See a basic scaffold for a super simple theme. See <a href='sp-dark.css'>sp-dark.css</a> for a slightly more advanced example.
|
||||
</p>
|
||||
<pre>
|
||||
.theme-name.sp-container {
|
||||
|
||||
}
|
||||
.theme-name.sp-replacer {
|
||||
|
||||
}
|
||||
.theme-name .sp-preview {
|
||||
|
||||
}
|
||||
</pre>
|
||||
<h3>Submitting a theme</h3>
|
||||
<p>
|
||||
If you have made some customizations that you would like to share, please open a <a href="http://bgrins.github.com/spectrum/pulls">pull request</a> with the theme file inside of this themes/ directory in the project. Or <a href="http://bgrins.github.com/spectrum/issues">open an issue</a> with a link to the theme.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$("#sp-light input").spectrum({
|
||||
theme: "sp-light"
|
||||
});
|
||||
$("#sp-dark input").spectrum({
|
||||
theme: "sp-dark"
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="../docs/prettify.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-8259845-4']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
128
public/assets/spectrum/themes/sp-dark.css
vendored
Normal file
128
public/assets/spectrum/themes/sp-dark.css
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
/* Container */
|
||||
.sp-dark.sp-container {
|
||||
background-color: #333;
|
||||
border: solid 1px #555;
|
||||
}
|
||||
|
||||
/* Replacer (the little preview div that shows up instead of the <input>) */
|
||||
.sp-dark.sp-replacer {
|
||||
border: solid 1px #fff;
|
||||
background: #333;
|
||||
color: #eee;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.sp-replacer:hover, .sp-replacer.sp-active {
|
||||
border-color: #F0C49B;
|
||||
color: #fff;
|
||||
}
|
||||
.sp-replacer.sp-disabled {
|
||||
border-color: silver;
|
||||
color: silver;
|
||||
}
|
||||
.sp-dark .sp-preview {
|
||||
border: solid 1px #999;
|
||||
}
|
||||
.sp-dark .sp-cancel {
|
||||
color: #f99f9f !important;
|
||||
}
|
||||
|
||||
.sp-dark, .sp-dark button, .sp-dark input, .sp-color, .sp-hue {
|
||||
|
||||
}
|
||||
|
||||
/* Input */
|
||||
.sp-dark .sp-input-container {
|
||||
|
||||
}
|
||||
.sp-dark .sp-initial-disabled .sp-input-container {
|
||||
|
||||
}
|
||||
.sp-dark .sp-input {
|
||||
|
||||
}
|
||||
.sp-dark .sp-input:focus {
|
||||
|
||||
}
|
||||
.sp-dark .sp-input.sp-validation-error {
|
||||
|
||||
}
|
||||
|
||||
.sp-dark .sp-picker-container , .sp-dark .sp-palette-container {
|
||||
|
||||
}
|
||||
.sp-dark .sp-picker-container {
|
||||
|
||||
}
|
||||
|
||||
/* Palettes */
|
||||
.sp-dark .sp-palette-container {
|
||||
|
||||
}
|
||||
|
||||
.sp-dark .sp-palette .sp-thumb-el {
|
||||
|
||||
}
|
||||
.sp-dark .sp-palette .sp-thumb-el:hover, .sp-dark .sp-palette .sp-thumb-el.sp-thumb-active {
|
||||
|
||||
}
|
||||
.sp-dark .sp-thumb-el {
|
||||
}
|
||||
|
||||
/* Initial */
|
||||
.sp-dark .sp-initial {
|
||||
|
||||
}
|
||||
.sp-dark .sp-initial span {
|
||||
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.sp-dark .sp-button-container {
|
||||
|
||||
}
|
||||
|
||||
/* Replacer (the little preview div that shows up instead of the <input>) */
|
||||
.sp-dark.sp-replacer {
|
||||
|
||||
}
|
||||
.sp-dark.sp-replacer:hover, .sp-dark.sp-replacer.sp-active {
|
||||
border-color: #F0C49B;
|
||||
color: #111;
|
||||
}
|
||||
.sp-dark.sp-replacer.sp-disabled {
|
||||
|
||||
}
|
||||
.sp-dark .sp-dd {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.sp-dark .sp-preview {
|
||||
|
||||
}
|
||||
.sp-dark .sp-palette {
|
||||
|
||||
}
|
||||
.sp-dark .sp-palette .sp-thumb-el {
|
||||
|
||||
}
|
||||
|
||||
.sp-dark button {
|
||||
|
||||
}
|
||||
.sp-dark button:hover {
|
||||
|
||||
}
|
||||
.sp-dark button:active {
|
||||
|
||||
}
|
||||
.sp-dark .sp-cancel {
|
||||
|
||||
}
|
||||
.sp-dark .sp-cancel:hover {
|
||||
|
||||
}
|
||||
.sp-dark .sp-palette span:hover, .sp-dark .sp-palette span.sp-thumb-active {
|
||||
|
||||
}
|
||||
@@ -44,7 +44,7 @@ scratch. This page gets rid of all links and provides the needed markup only.
|
||||
<!-- jquery-ui -->
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||
{{-- spectrum --}}
|
||||
<link rel="stylesheet" href="http://bgrins.github.io/spectrum/spectrum.css">
|
||||
<link rel="stylesheet" href="{{ asset('/assets/spectrum/spectrum.css') }}">
|
||||
|
||||
<style>
|
||||
/* .store-password-field {
|
||||
@@ -229,7 +229,7 @@ desired effect
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="{{ asset('/bower_components/bootstrap/dist/js/bootstrap.min.js') }}"></script>
|
||||
{{-- spectrum --}}
|
||||
<script src="http://bgrins.github.com/spectrum/spectrum.js"></script>
|
||||
<script src="{{ asset('/assets/spectrum/spectrum.js') }}"></script>
|
||||
<!-- DataTables -->
|
||||
<script src="{{ asset('/bower_components/datatables.net/js/jquery.dataTables.min.js') }}"></script>
|
||||
<script src="{{ asset('/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js') }}"></script>
|
||||
|
||||
Reference in New Issue
Block a user