forked from GNUsocial/gnu-social
Revert "use jquery-ui for input_forms tabset"
This reverts commit c4bada9022
.
This commit is contained in:
parent
39f8d2c728
commit
afa1aa6c9b
16
js/util.js
16
js/util.js
@ -1276,6 +1276,22 @@ var SN = { // StatusNet
|
||||
|
||||
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: {
|
||||
|
@ -315,7 +315,6 @@ class Action extends HTMLOutputter // lawsuit
|
||||
$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));
|
||||
}
|
||||
@ -593,7 +592,7 @@ class Action extends HTMLOutputter // lawsuit
|
||||
{
|
||||
$tabs = array('status' => _('Status'));
|
||||
|
||||
$this->elementStart('div', array('id' => 'input_forms'));
|
||||
$this->elementStart('div', 'input_forms');
|
||||
|
||||
if (Event::handle('StartShowEntryForms', array(&$tabs))) {
|
||||
|
||||
@ -612,7 +611,7 @@ class Action extends HTMLOutputter // lawsuit
|
||||
$this->elementStart('li', $attrs);
|
||||
|
||||
$this->element('a',
|
||||
array('href' => '#input_forms-'.$tag),
|
||||
array('href' => 'javascript:SN.U.switchInputFormTab("'.$tag.'")'),
|
||||
$title);
|
||||
$this->elementEnd('li');
|
||||
}
|
||||
@ -622,7 +621,7 @@ class Action extends HTMLOutputter // lawsuit
|
||||
foreach ($tabs as $tag => $title) {
|
||||
|
||||
$attrs = array('class' => 'input_form',
|
||||
'id' => 'input_forms-'.$tag);
|
||||
'id' => 'input_form_'.$tag);
|
||||
|
||||
if ($tag == 'status') {
|
||||
$attrs['class'] .= ' current';
|
||||
|
@ -1962,6 +1962,18 @@ margin-bottom:18px;
|
||||
padding-left:20px;
|
||||
}
|
||||
|
||||
#input_form_nav {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#input_form_nav li {
|
||||
display:inline;
|
||||
}
|
||||
|
||||
.input_form_nav_tab.current {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.input_form {
|
||||
display: none;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user