forked from GNUsocial/gnu-social
Use inlineScript() instead of element() to write inline javascript
This commit is contained in:
parent
675e32ac9a
commit
d41a0a5ed0
@ -477,13 +477,10 @@ class HTMLOutputter extends XMLOutputter
|
||||
*/
|
||||
function autofocus($id)
|
||||
{
|
||||
$this->elementStart('script', array('type' => 'text/javascript'));
|
||||
$this->raw('/*<![CDATA[*/'.
|
||||
$this->inlineScript(
|
||||
' $(document).ready(function() {'.
|
||||
' var el = $("#' . $id . '");'.
|
||||
' if (el.length) { el.focus(); }'.
|
||||
' });'.
|
||||
' /*]]>*/');
|
||||
$this->elementEnd('script');
|
||||
' });');
|
||||
}
|
||||
}
|
||||
|
@ -352,8 +352,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||
|
||||
$contentLimit = Notice::maxContent();
|
||||
|
||||
$form->out->element('script', array('type' => 'text/javascript'),
|
||||
'maxLength = ' . $contentLimit . ';');
|
||||
$form->out->inlineScript('maxLength = ' . $contentLimit . ';');
|
||||
|
||||
if ($contentLimit > 0) {
|
||||
$form->out->element('div', array('id' => 'notice_text-count'),
|
||||
|
Loading…
Reference in New Issue
Block a user