1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +02:00

Changed Tabs code to bootstrap instead of jquery-ui

This commit is contained in:
Cameron
2013-02-25 02:47:23 -08:00
parent f028b5c18d
commit a2ea0f7a83
11 changed files with 370 additions and 358 deletions

View File

@@ -151,17 +151,19 @@ class emotec
$ns = e107::getRender(); $ns = e107::getRender();
$mes = e107::getMessage(); $mes = e107::getMessage();
$text = " $text = "
<div class='admintabs' id='tab-container'>
<ul class='e-tabs' id='core-emote-tabs'> <ul class='nav nav-tabs'>
<li id='tab-activate'><a href='#emoticon-activate'>".EMOLAN_1."</a></li> <li class='active'><a href='#emoticon-activate' data-toggle='tab'>".EMOLAN_1."</a></li>
<li id='tab-packages'><a href='#emoticon-packages'>".EMOLAN_13."</a></li> <li><a href='#emoticon-packages' data-toggle='tab'>".EMOLAN_13."</a></li>
</ul> </ul>
<div class='tab-content'>
<div class='tab-pane active' id='emoticon-activate'>
<fieldset>
<form method='post' action='".e_SELF."'> <form method='post' action='".e_SELF."'>
<fieldset id='emoticon-activate'>
<legend>".EMOLAN_1."</legend> <legend>".EMOLAN_1."</legend>
<table class='table adminlist'> <table class='table adminform'>
<colgroup> <colgroup>
<col style='width:30%' /> <col style='width:30%' />
<col style='width:70%' /> <col style='width:70%' />
@@ -182,13 +184,15 @@ class emotec
<div class='buttons-bar center'> <div class='buttons-bar center'>
".$frm->admin_button('active','active','update',LAN_UPDATE)." ".$frm->admin_button('active','active','update',LAN_UPDATE)."
</div> </div>
</fieldset> <fieldset>
</form> </form>
</div>
"; ";
$text .= " $text .= "
<div class='tab-pane' id='emoticon-packages'>
<form method='post' action='".e_SELF."#etabTabContainer=emoticon-packages'> <form method='post' action='".e_SELF."#etabTabContainer=emoticon-packages'>
<fieldset id='emoticon-packages'> <fieldset>
<legend>".EMOLAN_13."</legend> <legend>".EMOLAN_13."</legend>
<table class='table adminlist'> <table class='table adminlist'>
<colgroup> <colgroup>
@@ -267,6 +271,8 @@ class emotec
</fieldset> </fieldset>
</form> </form>
</div> </div>
</div>
"; ";
$ns->tablerender(EMOLAN_PAGE_TITLE, $mes->render().$text); $ns->tablerender(EMOLAN_PAGE_TITLE, $mes->render().$text);

View File

@@ -312,7 +312,7 @@ if (abs($_serverTime - $lastSet) > 120)
*/ */
// echo "<script type='text/javascript'>\n"; // echo "<script type='text/javascript'>\n";
e107::js('footer-inline',"SyncWithServerTime('{$_serverTime}', '{$_serverPath}', '{$_serverDomain}');",'prototype'); // e107::js('footer-inline',"SyncWithServerTime('{$_serverTime}', '{$_serverPath}', '{$_serverDomain}');",'prototype');
//echo "SyncWithServerTime('{$_serverTime}', '{$_serverPath}', '{$_serverDomain}'); //echo "SyncWithServerTime('{$_serverTime}', '{$_serverPath}', '{$_serverDomain}');
// </script>\n"; // </script>\n";

View File

@@ -79,7 +79,7 @@ e107::js("core", "core/all.jquery.js","jquery",4); // Load all default functions
e107::js("core", "core/admin.js","prototype",3); // Load all default functions. // e107::js("core", "core/admin.js","prototype",3); // Load all default functions.
// //
@@ -382,11 +382,13 @@ e107::getJs()->renderJs('header', 5);
* Fire Event e107:loaded - Prototype only * Fire Event e107:loaded - Prototype only
*/ */
//\$('e-js-css').remove(); //\$('e-js-css').remove();
/*
e107::js('inline'," e107::js('inline',"
document.observe('dom:loaded', function () { document.observe('dom:loaded', function () {
e107Event.trigger('loaded', null, document); e107Event.trigger('loaded', null, document);
}); });
",'prototype',5); ",'prototype',5);
*/
e107::getJs()->renderJs('header_inline', 5); e107::getJs()->renderJs('header_inline', 5);

View File

@@ -961,14 +961,14 @@ class media_admin_ui extends e_admin_ui
$bbcodeMode = ($this->getQuery('bbcode')=='img') ? 'bbcode=img' : FALSE; $bbcodeMode = ($this->getQuery('bbcode')=='img') ? 'bbcode=img' : FALSE;
$text = " $text = "
<div class='admintabs' id='tab-container'>
<ul class='e-tabs' id='core-emote-tabs'> <ul class='nav nav-tabs'>
<li id='tab-select'><a href='#core-media-select'>Choose from Library</a></li> <li class='active'><a data-toggle='tab' href='#core-media-select'>Choose from Library</a></li>
<li id='tab-upload'><a href='#core-media-upload'>Upload a File</a></li>"; <li><a data-toggle='tab' href='#core-media-upload'>Upload a File</a></li>";
if($bbcodeMode) if($bbcodeMode)
{ {
$text .= "<li id='tab-style'><a href='#core-media-style'>Appearance</a></li>\n"; $text .= "<li><a data-toggle='tab' href='#core-media-style'>Appearance</a></li>\n";
} }
if($_GET['from']) if($_GET['from'])
@@ -979,7 +979,8 @@ class media_admin_ui extends e_admin_ui
$text .= " $text .= "
</ul> </ul>
<fieldset id='core-media-select'> <div class='tab-content'>
<div class='tab-pane active' id='core-media-select'>
<legend>Library</legend> <legend>Library</legend>
<div class='table' style='display:block; height:500px'> <div class='table' style='display:block; height:500px'>
@@ -1000,9 +1001,9 @@ class media_admin_ui extends e_admin_ui
$text .= " $text .= "
</div> </div>
</fieldset> </div>
<fieldset id='core-media-upload'> <div class='tab-pane' id='core-media-upload'>
<legend>Upload</legend>"; <legend>Upload</legend>";
$this->fields['media_category']['readonly'] = TRUE; $this->fields['media_category']['readonly'] = TRUE;
@@ -1013,7 +1014,7 @@ class media_admin_ui extends e_admin_ui
// $text .= $this->CreatePage(); // comment me out to test plupload // $text .= $this->CreatePage(); // comment me out to test plupload
$text .= " $text .= "
</fieldset>"; </div>";
/* In BBCODE-Mode this dialog rerturns an [img] bbcode to the 'tagid' container with the appropriate parms generated. /* In BBCODE-Mode this dialog rerturns an [img] bbcode to the 'tagid' container with the appropriate parms generated.
* eg. [img style=float:left;margin-right:3px]{e_MEDIA_IMAGE}someimage.jpg[/img] * eg. [img style=float:left;margin-right:3px]{e_MEDIA_IMAGE}someimage.jpg[/img]
@@ -1510,7 +1511,7 @@ class media_admin_ui extends e_admin_ui
// $files = $fl->get_files(e_MEDIA."temp/"); // $files = $fl->get_files(e_MEDIA."temp/");
$files = $fl->get_files(e_TEMP); $files = $fl->get_files(e_TEMP);
e107::js('core','core/admin.js','prototype'); // e107::js('core','core/admin.js','prototype');
//TODO Detect XML file, and if found - read that instead of the directory. //TODO Detect XML file, and if found - read that instead of the directory.

View File

@@ -33,7 +33,7 @@ $gen = new convert();
//Handle Ajax Calls //Handle Ajax Calls
if($newspost->ajax_observer()) exit; if($newspost->ajax_observer()) exit;
e107::js('core','core/admin.js','prototype'); // e107::js('core','core/admin.js','prototype');
//e107::getJs()->requireCoreLib('core/admin.js'); //e107::getJs()->requireCoreLib('core/admin.js');
class news_admin extends e_admin_dispatcher class news_admin extends e_admin_dispatcher

View File

@@ -1455,38 +1455,40 @@ class pluginBuilder
} }
$text = $frm->open('newplugin-step3','post', e_SELF.'?mode=create&newplugin='.$newplug.'&step=3'); $text = $frm->open('newplugin-step3','post', e_SELF.'?mode=create&newplugin='.$newplug.'&step=3');
$text .= "<div class='admintabs' id='tab-container'>\n";
$text .= "<ul class='e-tabs' id='core-emote-tabs'>\n"; $text .= "<ul class='nav nav-tabs'>\n";
$text .= "<li id='tab-xml'><a href='#xml'>Basic Info.</a></li>"; $text .= "<li class='active'><a data-toggle='tab' href='#xml'>Basic Info.</a></li>";
$this->tableCount = count($ret['tables']); $this->tableCount = count($ret['tables']);
foreach($ret['tables'] as $key=>$table) foreach($ret['tables'] as $key=>$table)
{ {
$text .= "<li id='tab-".$table."'><a href='#".$table."'>Table: ".$table."</a></li>"; $text .= "<li><a data-toggle='tab' href='#".$table."'>Table: ".$table."</a></li>";
} }
$text .= "<li id='tab-preferences'><a href='#preferences'>Preferences</a></li>"; $text .= "<li><a data-toggle='tab' href='#preferences'>Preferences</a></li>";
$text .= "</ul>"; $text .= "</ul>";
$text .= "<div class='tab-content'>\n";
$text .= "<div class='tab-pane active' id='xml'>\n";
$text .= $this->pluginXml();
$text .= "</div>";
foreach($ret['tables'] as $key=>$table) foreach($ret['tables'] as $key=>$table)
{ {
$text .= "<fieldset id='".$table."'>\n"; $text .= "<div class='tab-pane' id='".$table."'>\n";
$fields = $dv->getFields($ret['data'][$key]); $fields = $dv->getFields($ret['data'][$key]);
$text .= $this->form($table,$fields); $text .= $this->form($table,$fields);
$text .= "</fieldset>"; $text .= "</div>";
} }
$text .= "<fieldset id='preferences'>\n"; $text .= "<div class='tab-pane' id='preferences'>\n";
$text .= $this->prefs(); $text .= $this->prefs();
$text .= "</fieldset>"; $text .= "</div>";
$text .= "<fieldset id='xml'>\n";
$text .= $this->pluginXml();
$text .= "</fieldset>";
$text .= "</div>"; $text .= "</div>";
@@ -1581,7 +1583,7 @@ class pluginBuilder
} }
} }
$text = "<table class='table adminlist'>"; $text = "<table class='table adminform'>";
foreach($data as $key=>$val) foreach($data as $key=>$val)
{ {

View File

@@ -1762,7 +1762,7 @@ $text .= "
"; ";
/*
e107::js('inline'," e107::js('inline',"
\$\$('#e-jslib-nocombine', '#e-jslib-nocombine-1').invoke('observe', 'change', function(event) { \$\$('#e-jslib-nocombine', '#e-jslib-nocombine-1').invoke('observe', 'change', function(event) {
var element = event.findElement('input'), check = !parseInt(element.value); var element = event.findElement('input'), check = !parseInt(element.value);
@@ -1781,7 +1781,7 @@ $text .= "
eHandleJsForm(".($pref['e_jslib_nocombine'] ? 'false' : 'true')."); eHandleJsForm(".($pref['e_jslib_nocombine'] ? 'false' : 'true').");
","prototype"); ","prototype");
*/
//Advanced Features //Advanced Features

View File

@@ -160,7 +160,7 @@ else
echo ' echo '
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
&nbsp; &nbsp;

View File

@@ -914,17 +914,18 @@ class themeHandler
$text = " $text = "
<h2 class='caption'>".$theme['name']."</h2> <h2 class='caption'>".$theme['name']."</h2>
<div id='tab-container' class='e-tabs'>
<ul id='core-thememanager-tabs'> <ul class='nav nav-tabs'>
<li><a href='#core-thememanager-configure'>".LAN_CONFIGURE."</a></li>"; <li class='active'><a data-toggle='tab' href='#core-thememanager-configure'>".LAN_CONFIGURE."</a></li>";
if($this->themeConfigObj && call_user_func(array(&$this->themeConfigObj, 'help'))) if($this->themeConfigObj && call_user_func(array(&$this->themeConfigObj, 'help')))
{ {
$text .= "<li><a href='#core-thememanager-help'>".LAN_HELP."</a></li>"; $text .= "<li><a data-toggle='tab' href='#core-thememanager-help'>".LAN_HELP."</a></li>\n";
} }
$text .= "</ul> $text .= "</ul>
<fieldset id='core-thememanager-configure'> <div class='tab-content'>
<div class='tab-pane active' id='core-thememanager-configure'>
<table class='table adminform'> <table class='table adminform'>
<colgroup> <colgroup>
<col class='col-label' /> <col class='col-label' />
@@ -944,7 +945,7 @@ class themeHandler
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_7."</b>:</td><td style='vertical-align:top'>".$theme['info']."</td></tr>"; $text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_7."</b>:</td><td style='vertical-align:top'>".$theme['info']."</td></tr>";
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".LAN_CATEGORY."</b>:</td><td style='vertical-align:top'>".$theme['category']."</td></tr>"; $text .= "<tr><td style='vertical-align:top; width:25%'><b>".LAN_CATEGORY."</b>:</td><td style='vertical-align:top'>".$theme['category']."</td></tr>";
$text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_49."</b>:</td> $text .= "<tr><td style='vertical-align:top; width:25%'><b>".TPVLAN_49."</b>:</td>
<td style='vertical-align:top'>"; <td style='vertical-align:top' colspan='2'>";
$text .= ($theme['xhtmlcompliant']) ? "W3C XHTML ".$theme['xhtmlcompliant'] : "Not Specified"; $text .= ($theme['xhtmlcompliant']) ? "W3C XHTML ".$theme['xhtmlcompliant'] : "Not Specified";
$text .= ($theme['csscompliant']) ? " &amp; CSS ".$theme['csscompliant'] : ""; $text .= ($theme['csscompliant']) ? " &amp; CSS ".$theme['csscompliant'] : "";
$text .= "</td></tr>"; $text .= "</td></tr>";
@@ -1185,16 +1186,10 @@ class themeHandler
$text .= "<input type='hidden' name='curTheme' value='".$theme['path']."' />"; $text .= "<input type='hidden' name='curTheme' value='".$theme['path']."' />";
$text .= " $text .= "</div>
</div> </div>
<div class='tab-pane' id='core-thememanager-help'>".$this->renderThemeHelp()."</div>
</fieldset>
<fieldset><div class='tab-border' id='core-thememanager-help'>".$this->renderThemeHelp()."</div></fieldset>
</div> </div>
\n"; \n";

View File

@@ -619,7 +619,7 @@ class adminDownload extends download
$text = " $text = "
<div class='admintabs' id='tab-container'> <div class='admintabs' id='tab-container'>
<ul class='e-tabs e-hideme' id='core-download-tabs'> <ul class='e-taXXbs' e-hideme' id='core-download-tabs'>
<li id='tab-general'><a href='#download-create'>".DOWLAN_175."</a></li> <li id='tab-general'><a href='#download-create'>".DOWLAN_175."</a></li>
<li id='tab-external'><a href='#download-edit-external'>".DOWLAN_176."</a></li> <li id='tab-external'><a href='#download-edit-external'>".DOWLAN_176."</a></li>
<li id='tab-mirror'><a href='#download-edit-mirror'>".DOWLAN_128."</a></li> <li id='tab-mirror'><a href='#download-edit-mirror'>".DOWLAN_128."</a></li>
@@ -1471,7 +1471,7 @@ class adminDownload extends download
); );
$text = " $text = "
<div class='admintabs' id='tab-container'> <div class='admintabs' id='tab-container'>
<ul class='e-tabs e-hideme' id='download-option-tabs'> <ul class='e-tabXXs e-hideme' id='download-option-tabs'>
<li id='tab-download1'><a href='#core-download-download1'>".LAN_DL_DOWNLOAD_OPT_GENERAL."</a></li> <li id='tab-download1'><a href='#core-download-download1'>".LAN_DL_DOWNLOAD_OPT_GENERAL."</a></li>
<li id='tab-download2'><a href='#core-download-download2'>".LAN_DL_DOWNLOAD_OPT_BROKEN."</a></li> <li id='tab-download2'><a href='#core-download-download2'>".LAN_DL_DOWNLOAD_OPT_BROKEN."</a></li>
<li id='tab-download3'><a href='#core-download-download3'>".LAN_DL_DOWNLOAD_OPT_AGREE."</a></li> <li id='tab-download3'><a href='#core-download-download3'>".LAN_DL_DOWNLOAD_OPT_AGREE."</a></li>

View File

@@ -1134,15 +1134,17 @@ $columnInfo = array(
$text = " $text = "
<div class='admintabs' id='tab-container'>
<ul class='e-tabs' id='core-download-tabs'> <ul class='nav nav-tabs'>
<li id='tab-general'><a href='#download-create'>".DOWLAN_175."</a></li> <li class='active'><a data-toggle='tab' href='#download-create'>".DOWLAN_175."</a></li>
<li id='tab-external'><a href='#download-edit-external'>".DOWLAN_176."</a></li> <li><a data-toggle='tab' href='#download-edit-external'>".DOWLAN_176."</a></li>
<li id='tab-mirror'><a href='#download-edit-mirror'>".DOWLAN_128."</a></li> <li><a data-toggle='tab' href='#download-edit-mirror'>".DOWLAN_128."</a></li>
</ul> </ul>
<div>
<form method='post' action='".e_SELF."?".e_QUERY."' id='myform'> <form method='post' action='".e_SELF."?".e_QUERY."' id='myform'>
<fieldset id='download-create'> <div class='tab-content'>
<div class='tab-pane active' id='download-create'>
<table class='table adminform'> <table class='table adminform'>
<tr> <tr>
<td>".DOWLAN_13."</td> <td>".DOWLAN_13."</td>
@@ -1194,8 +1196,8 @@ $columnInfo = array(
</td> </td>
</tr> </tr>
</table> </table>
</fieldset> </div>
<fieldset id='download-edit-external'> <div class='tab-pane' id='download-edit-external'>
<table class='table adminform'> <table class='table adminform'>
<tr> <tr>
<td>".DOWLAN_149."</td> <td>".DOWLAN_149."</td>
@@ -1210,8 +1212,8 @@ $columnInfo = array(
</td> </td>
</tr> </tr>
</table> </table>
</fieldset> </div>
<fieldset id='download-edit-mirror'> <div class='tab-pane' id='download-edit-mirror'>
<table class='table adminlist'> <table class='table adminlist'>
<tr> <tr>
<td style='width:20%'><span title='".DOWLAN_129."' style='cursor:help'>".DOWLAN_128."</span></td> <td style='width:20%'><span title='".DOWLAN_129."' style='cursor:help'>".DOWLAN_128."</span></td>
@@ -1274,7 +1276,8 @@ $columnInfo = array(
$download_author_email = $subAction != "edit" && $download_author_email == "" ? USEREMAIL : $download_author_email; $download_author_email = $subAction != "edit" && $download_author_email == "" ? USEREMAIL : $download_author_email;
$text .= " $text .= "
</table> </table>
</fieldset> </div>
</div>
<fieldset id='download-edit-therest'> <fieldset id='download-edit-therest'>
<table class='table adminform'> <table class='table adminform'>
<tr> <tr>
@@ -1457,8 +1460,9 @@ $columnInfo = array(
$text .= " $text .= "
<tr style=''>
<td colspan='2' style='text-align:center'>"; </table>
<div class='buttonsbar center'>";
@@ -1471,13 +1475,13 @@ $columnInfo = array(
} }
$text .= " $text .= "
</td> </div>
</tr>
</table>
</fieldset> </fieldset>
</form> </form>
</div>
</div>";
";
// $ns->tablerender(ADLAN_24, $text); // $ns->tablerender(ADLAN_24, $text);
echo $text; echo $text;
} }
@@ -1938,16 +1942,17 @@ $columnInfo = array(
); );
$text = " $text = "
<div class='admintabs' id='tab-container'>
<ul class='e-tabs e-hideme' id='download-option-tabs'> <ul class='nav nav-tabs'>
<li id='tab-download1'><a href='#core-download-download1'>".LAN_DL_DOWNLOAD_OPT_GENERAL."</a></li> <li class='active'><a data-toggle='tab' href='#core-download-download1'>".LAN_DL_DOWNLOAD_OPT_GENERAL."</a></li>
<li id='tab-download2'><a href='#core-download-download2'>".LAN_DL_DOWNLOAD_OPT_BROKEN."</a></li> <li><a data-toggle='tab' href='#core-download-download2'>".LAN_DL_DOWNLOAD_OPT_BROKEN."</a></li>
<li id='tab-download3'><a href='#core-download-download3'>".LAN_DL_DOWNLOAD_OPT_AGREE."</a></li> <li><a data-toggle='tab' href='#core-download-download3'>".LAN_DL_DOWNLOAD_OPT_AGREE."</a></li>
<li id='tab-download4'><a href='#core-download-download4'>".LAN_DL_UPLOAD."</a></li> <li><a data-toggle='tab' href='#core-download-download4'>".LAN_DL_UPLOAD."</a></li>
</ul> </ul>
<form method='post' action='".e_SELF."?".e_QUERY."'>\n <form method='post' action='".e_SELF."?".e_QUERY."'>\n
<fieldset id='core-download-download1'> <div class='tab-content'>
<div class='tab-pane active' id='core-download-download1'>
<div> <div>
<table class='table adminform'> <table class='table adminform'>
<colgroup> <colgroup>
@@ -2004,10 +2009,10 @@ $columnInfo = array(
</tr> </tr>
</table> </table>
</div> </div>
</fieldset> </div>
<fieldset id='core-download-download2'> <div class='tab-pane' id='core-download-download2'>
<div> <div>
<table style='".ADMIN_WIDTH."' class='adminlist'> <table class='table adminform'>
<colgroup> <colgroup>
<col style='width:30%'/> <col style='width:30%'/>
<col style='width:70%'/> <col style='width:70%'/>
@@ -2022,10 +2027,10 @@ $columnInfo = array(
</tr> </tr>
</table> </table>
</div> </div>
</fieldset> </div>
<fieldset id='core-download-download3'> <div class='tab-pane' id='core-download-download3'>
<div> <div>
<table style='".ADMIN_WIDTH."' class='adminlist'> <table class='table adminform'>
<colgroup> <colgroup>
<col style='width:30%'/> <col style='width:30%'/>
<col style='width:70%'/> <col style='width:70%'/>
@@ -2044,10 +2049,10 @@ $columnInfo = array(
</tr> </tr>
</table> </table>
</div> </div>
</fieldset> </div>
<fieldset id='core-download-download4'> <div class='tab-pane' id='core-download-download4'>
<div> <div>
<table style='".ADMIN_WIDTH."' class='adminlist'> <table class='table adminform'>
<colgroup> <colgroup>
<col style='width:30%'/> <col style='width:30%'/>
<col style='width:70%'/> <col style='width:70%'/>
@@ -2058,12 +2063,13 @@ $columnInfo = array(
</tr> </tr>
</table> </table>
</div> </div>
</fieldset> </div>
<div class='buttons-bar center'> <div class='buttons-bar center'>
<input class='button' type='submit' name='updatedownlaodoptions' value='".DOWLAN_64."'/> <input class='button' type='submit' name='updatedownlaodoptions' value='".DOWLAN_64."'/>
</div> </div>
</form>
</div> </div>
</form>
"; ";
// $ns->tablerender(LAN_DL_OPTIONS, $text); // $ns->tablerender(LAN_DL_OPTIONS, $text);
echo $text; echo $text;