17cfd9d9c39d183ce018e820a1cbba2ff7577af97f89e232be101cfdd936b02a0995f735231980d1a359ba55d836cbcd2b19167609f4979ff67cfe698dee01 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Default plugin options
  3. */
  4. var defaults = {
  5. horizontal: false, // horizontal mode layout ?
  6. inline: false, //forces to show the colorpicker as an inline element
  7. color: false, //forces a color
  8. format: false, //forces a format
  9. input: 'input', // children input selector
  10. container: false, // container selector
  11. component: '.add-on, .input-group-addon', // children component selector
  12. fallbackColor: false, // fallback color value. null = keeps current color.
  13. fallbackFormat: 'hex', // fallback color format
  14. hexNumberSignPrefix: true, // put a '#' (number sign) before hex strings
  15. sliders: {
  16. saturation: {
  17. maxLeft: 100,
  18. maxTop: 100,
  19. callLeft: 'setSaturation',
  20. callTop: 'setBrightness'
  21. },
  22. hue: {
  23. maxLeft: 0,
  24. maxTop: 100,
  25. callLeft: false,
  26. callTop: 'setHue'
  27. },
  28. alpha: {
  29. maxLeft: 0,
  30. maxTop: 100,
  31. callLeft: false,
  32. callTop: 'setAlpha'
  33. }
  34. },
  35. slidersHorz: {
  36. saturation: {
  37. maxLeft: 100,
  38. maxTop: 100,
  39. callLeft: 'setSaturation',
  40. callTop: 'setBrightness'
  41. },
  42. hue: {
  43. maxLeft: 100,
  44. maxTop: 0,
  45. callLeft: 'setHue',
  46. callTop: false
  47. },
  48. alpha: {
  49. maxLeft: 100,
  50. maxTop: 0,
  51. callLeft: 'setAlpha',
  52. callTop: false
  53. }
  54. },
  55. template: '<div class="colorpicker dropdown-menu">' +
  56. '<div class="colorpicker-saturation"><i><b></b></i></div>' +
  57. '<div class="colorpicker-hue"><i></i></div>' +
  58. '<div class="colorpicker-alpha"><i></i></div>' +
  59. '<div class="colorpicker-color"><div /></div>' +
  60. '<div class="colorpicker-selectors"></div>' +
  61. '</div>',
  62. align: 'right',
  63. customClass: null, // custom class added to the colorpicker element
  64. colorSelectors: null // custom color aliases
  65. };