return false;
},
-
- /**
- * Switch to another active input sub-form.
- * This will hide the current form (if any), show the new one, and
- * update the input type tab selection state.
- *
- * @param {String} tag
- */
- switchInputFormTab: function(tag) {
- // The one that's current isn't current anymore
- $('.input_form_nav_tab.current').removeClass('current');
- $('#input_form_nav_'+tag).addClass('current');
-
- $('.input_form.current').removeClass('current');
- $('#input_form_'+tag).addClass('current');
- }
},
Init: {
$this->showScriptMessages();
// Frame-busting code to avoid clickjacking attacks.
$this->inlineScript('if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
+ $this->inlineScript('$(document).ready(function(){ $(\'#input_forms\').tabs(); });');
Event::handle('EndShowStatusNetScripts', array($this));
Event::handle('EndShowLaconicaScripts', array($this));
}
{
$tabs = array('status' => _('Status'));
- $this->elementStart('div', 'input_forms');
+ $this->elementStart('div', array('id' => 'input_forms'));
if (Event::handle('StartShowEntryForms', array(&$tabs))) {
$this->elementStart('li', $attrs);
$this->element('a',
- array('href' => 'javascript:SN.U.switchInputFormTab("'.$tag.'")'),
+ array('href' => '#input_forms-'.$tag),
$title);
$this->elementEnd('li');
}
foreach ($tabs as $tag => $title) {
$attrs = array('class' => 'input_form',
- 'id' => 'input_form_'.$tag);
+ 'id' => 'input_forms-'.$tag);
if ($tag == 'status') {
$attrs['class'] .= ' current';