* @return null
*/
function textarea($name, $value, $rows = 10, $cols = 80) {
- echo "<textarea name='$name' rows='$rows' cols='$cols' class='sqlarea' spellcheck='false' wrap='off' onkeydown='return textareaKeydown(this, event);'>"; // spellcheck, wrap - not valid before HTML5
+ global $jush;
+ echo "<textarea name='$name' rows='$rows' cols='$cols' class='sqlarea jush-$jush' spellcheck='false' wrap='off' onkeydown='return textareaKeydown(this, event);'>"; // spellcheck, wrap - not valid before HTML5
if (is_array($value)) {
foreach ($value as $val) { // not implode() to save memory
echo h($val[0]) . "\n\n\n"; // $val == array($query, $time)
jush.custom_links = jushLinks;
}
jush.highlight_tag('code', 0);
+ var tags = document.getElementsByTagName('textarea');
+ for (var i = 0; i < tags.length; i++) {
+ if (/(^|\s)jush-/.test(tags[i].className)) {
+ jush.textarea(tags[i]);
+ }
+ }
}
};
script.onreadystatechange = function () {
*/
function bodyKeydown(event, button) {
var target = getTarget(event);
+ if (target.jushTextarea) {
+ target = target.jushTextarea;
+ }
if (isCtrl(event) && (event.keyCode == 13 || event.keyCode == 10) && isTag(target, 'select|textarea|input')) { // 13|10 - Enter
target.blur();
if (button) {
-Subproject commit 9493dcc08e23313562d6860d3fa0592e40ed2cf8
+Subproject commit 06a7c7d73e2d031a493d1f07d37733aba94399f2