From 675e32ac9ac1bdcfbb6e293eb363d2b592140ae7 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 4 Dec 2009 20:21:05 -0500 Subject: use cssLink() instead of element() to write out references to CSS --- plugins/MobileProfile/MobileProfilePlugin.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'plugins/MobileProfile/MobileProfilePlugin.php') diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 0b1e4de28..8b5e5f31d 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -243,19 +243,13 @@ class MobileProfilePlugin extends WAP20Plugin if (file_exists(Theme::file('css/mp-screen.css'))) { $action->cssLink('css/mp-screen.css', null, 'screen'); } else { - $action->element('link', array('rel' => 'stylesheet', - 'type' => 'text/css', - 'href' => common_path('plugins/MobileProfile/mp-screen.css') . '?version=' . STATUSNET_VERSION, - 'media' => 'screen')); + $action->cssLink('plugins/MobileProfile/mp-screen.css',null,'screen'); } if (file_exists(Theme::file('css/mp-handheld.css'))) { $action->cssLink('css/mp-handheld.css', null, 'handheld'); } else { - $action->element('link', array('rel' => 'stylesheet', - 'type' => 'text/css', - 'href' => common_path('plugins/MobileProfile/mp-handheld.css') . '?version=' . STATUSNET_VERSION, - 'media' => 'handheld')); + $action->cssLink('plugins/MobileProfile/mp-handheld.css',null,'handheld'); } return false; -- cgit v1.2.3-54-g00ecf From d41a0a5ed03b2f4bbf8e8b3984960103383090d1 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 4 Dec 2009 20:33:41 -0500 Subject: Use inlineScript() instead of element() to write inline javascript --- lib/htmloutputter.php | 7 ++----- plugins/MobileProfile/MobileProfilePlugin.php | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'plugins/MobileProfile/MobileProfilePlugin.php') diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index a88a5b82c..cf93944e7 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -477,13 +477,10 @@ class HTMLOutputter extends XMLOutputter */ function autofocus($id) { - $this->elementStart('script', array('type' => 'text/javascript')); - $this->raw('/*inlineScript( ' $(document).ready(function() {'. ' var el = $("#' . $id . '");'. ' if (el.length) { el.focus(); }'. - ' });'. - ' /*]]>*/'); - $this->elementEnd('script'); + ' });'); } } diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 8b5e5f31d..35678bedd 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -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'), -- cgit v1.2.3-54-g00ecf