mirror of https://github.com/zulip/zulip.git
third: Add option for which container to append the color picker to.
This allows you to select the container that the color picker should append to and therefore be absolutely positioned in accordance with. This still defaults to document body, which was the previously default container to append the color picker to.
This commit is contained in:
parent
77aa43fffb
commit
eda1cdd0c5
|
@ -32,7 +32,10 @@
|
|||
showAlpha: false,
|
||||
theme: "sp-light",
|
||||
palette: ['fff', '000'],
|
||||
selectionPalette: []
|
||||
selectionPalette: [],
|
||||
|
||||
// user-specified container
|
||||
container: null
|
||||
},
|
||||
spectrums = [],
|
||||
IE = !!/msie/i.exec( window.navigator.userAgent ),
|
||||
|
@ -165,7 +168,7 @@
|
|||
draggingClass = "sp-dragging";
|
||||
|
||||
var doc = element.ownerDocument,
|
||||
body = doc.body,
|
||||
body = opts.container || doc.body,
|
||||
boundElement = $(element),
|
||||
container = $(markup, doc).addClass(theme),
|
||||
dragger = container.find(".sp-color"),
|
||||
|
|
Loading…
Reference in New Issue