move text from script placeholder to div

This commit is contained in:
rolux 2015-02-21 16:22:56 +05:30
parent b16abef44e
commit 0e74b41d98

View file

@ -6,13 +6,15 @@ pandora.ui.scriptDialog = function() {
var dialogHeight = Math.round((window.innerHeight - 48) * 0.75), var dialogHeight = Math.round((window.innerHeight - 48) * 0.75),
dialogWidth = Math.round(window.innerWidth * 0.75), dialogWidth = Math.round(window.innerWidth * 0.75),
$text = Ox.$('<div>')
.css({height: '32px', margin: '16px'})
.html(Ox._(
'Any JavaScript you paste here will run on load.<br>'
+ 'If you ever need to bypass it, '
+ 'press escape while the page is loading.'
)),
$input = Ox.Input({ $input = Ox.Input({
height: dialogHeight - 32, height: dialogHeight - 32,
id: 'onload',
placeholder: Ox._(
'/*\nAny JavaScript you paste here will run on load.\n'
+ 'If you ever need to bypass it, press escape while the site is loading.\n*/'
),
type: 'textarea', type: 'textarea',
value: pandora.user.script || '', value: pandora.user.script || '',
width: dialogWidth - 32 width: dialogWidth - 32
@ -40,7 +42,7 @@ pandora.ui.scriptDialog = function() {
}) })
], ],
closeButton: true, closeButton: true,
content: $input, content: Ox.Element().append($text).append($input),
height: dialogHeight, height: dialogHeight,
maximizeButton: true, maximizeButton: true,
minHeight: 256, minHeight: 256,