1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-27 01:40:22 +02:00

featurebox tabs in action (blank & jayya themes)

This commit is contained in:
secretr
2009-12-12 16:36:42 +00:00
parent e7410e2440
commit 361b05ce6f
5 changed files with 27 additions and 26 deletions

View File

@@ -11,20 +11,19 @@ class theme__blank implements e_theme_config
$theme_pref = array(); $theme_pref = array();
$theme_pref['example'] = $_POST['_blank_example']; $theme_pref['example'] = $_POST['_blank_example'];
$theme_pref['example2'] = $_POST['_blank_example2']; $theme_pref['fb_tabs_cols'] = intval($_POST['fb_tabs_cols']);
$pref->set('sitetheme_pref', $theme_pref); $pref->set('sitetheme_pref', $theme_pref);
return $pref->dataHasChanged(); return $pref->dataHasChanged();
} }
function config() function config()
{ {
$var[0]['caption'] = "Sample configuration field"; $var[0]['caption'] = "Sample configuration field";
$var[0]['html'] = "<input type='text' name='_blank_example' value='".e107::getThemePref('example')."' />"; $var[0]['html'] = "<input type='text' name='_blank_example' value='".e107::getThemePref('example', 'default')."' />";
$var[1]['caption'] = "Another Example"; $var[1]['caption'] = "Featurebox Tab Category - number of items per tab";
$var[1]['html'] = "<input type='text' name='_blank_example2' value='".e107::getThemePref('example2')."' />"; $var[1]['html'] = "<input type='text' name='fb_tabs_cols' value='".e107::getThemePref('fb_tabs_cols', 1)."' />";
return $var; return $var;
} }

View File

@@ -125,6 +125,11 @@ div.e-autocomplete ul li {
} }
div.e-autocomplete ul li span.informal { font-weight: normal; font-size: 9px} div.e-autocomplete ul li span.informal { font-weight: normal; font-size: 9px}
/******** Tabs JS */
ul.e-tabs { border-bottom: 1px solid #DDDDDD; height: 31px; }
ul.e-tabs li { border: 1px solid #DDDDDD; display: block; float: left; line-height: 30px; padding: 0px 7px; margin-right: 3px; background-color: #F9F9F9 }
.admintabs ul.e-tabs li.active { border-bottom: 1px solid #FFFFFF; background-color: #FFFFFF}
/********** Misc */ /********** Misc */
.e-pointer { cursor: pointer; } /* Pointer Hand */ .e-pointer { cursor: pointer; } /* Pointer Hand */
.expand-container { padding: 10px; } /* Block with expandable items */ .expand-container { padding: 10px; } /* Block with expandable items */

View File

@@ -78,8 +78,9 @@ $FEATUREBOX_CATEGORY_TEMPLATE['dynamic']['js_inline'] = 'new Featurebox("feature
* *
* @var array * @var array
*/ */
$FEATUREBOX_CATEGORY_TEMPLATE['__INFO__'] = array( $FEATUREBOX_CATEGORY_INFO = array(
'default' => array('title' => 'Blank Theme Default - show by category limit'), 'default' => array('title' => 'Default (Blank Theme)', 'description' => 'Flat - show by category limit'),
'dynamic' => array('title' => 'Blank Theme Dynamic (AJAX) loading'), 'dynamic' => array('title' => 'Dynamic (Blank Theme)', 'description' => 'Load items on click (AJAX)'),
); );
?> ?>

View File

@@ -2,20 +2,19 @@
if ( ! defined('e107_INIT')) { exit(); } if ( ! defined('e107_INIT')) { exit(); }
include_lan(e_THEME."_blank/languages/".e_LANGUAGE.".php"); include_lan(e_THEME."_blank/languages/".e_LANGUAGE.".php");
$THEME_CORE_JSLIB = array( // TODO theme.xml - add them to jslib/php source
'jslib/core/decorate.js' => 'all', e107::getJs()->requireCoreLib('core/decorate.js')
'jslib/core/tabs.js' => 'admin' ->requireCoreLib('core/tabs.js');
);
$register_sc[]='FS_ADMIN_ALT_NAV'; //$register_sc[]='FS_ADMIN_ALT_NAV';
$no_core_css = TRUE; $no_core_css = TRUE;
define("STANDARDS_MODE",TRUE); define("STANDARDS_MODE",TRUE);
// TODO - JS/CSS handling via JSManager
function theme_head() { function theme_head() {
global $theme_pref; $theme_pref = e107::getThemePref();
$ret = ''; $ret = '';
$ret .= ' $ret .= '
@@ -32,16 +31,11 @@ function theme_head() {
<script type='text/javascript'> <script type='text/javascript'>
/** /**
* Decorate all tables having e-list class * Decorate all tables having e-list class
* TODO: add 'adminlist' class to all list core tables, allow theme decorate.
*/ */
e107.runOnLoad( function() { e107.runOnLoad( function() {
\$\$('table.adminlist').each(function(element) { \$\$('table.e-list').each(function(element) {
e107Utils.Decorate.table(element, {tr_td: 'first last'}); e107Utils.Decorate.table(element, { tr_td: 'first last' });
}); });
\$\$('div.admintabs').each(function(element) {
new e107Widgets.Tabs(element);
});
}, document, true); }, document, true);
</script>"; </script>";
@@ -60,7 +54,8 @@ function theme_head() {
return $ret; return $ret;
} }
function tablestyle($caption, $text, $mod) { function tablestyle($caption, $text, $mod)
{
global $style; global $style;
$type = $style; $type = $style;
@@ -133,6 +128,7 @@ $HEADER['default'] = '
{FEATUREBOX|dynamic=notablestyle} {FEATUREBOX|dynamic=notablestyle}
'; ';
$FOOTER['default'] = ' $FOOTER['default'] = '
{FEATUREBOX|tabs=notablestyle&cols='.e107::getThemePref('fb_tabs_cols', 1).'}
</div> </div>
</div> </div>
</td> </td>

View File

@@ -9,8 +9,8 @@
* *
* *
* $Source: /cvs_backup/e107_0.8/e107_themes/jayya/theme.php,v $ * $Source: /cvs_backup/e107_0.8/e107_themes/jayya/theme.php,v $
* $Revision: 1.13 $ * $Revision: 1.14 $
* $Date: 2009-12-10 22:46:46 $ * $Date: 2009-12-12 16:36:42 $
* $Author: secretr $ * $Author: secretr $
*/ */
@@ -79,8 +79,8 @@ $HEADER['3_column'] = "<table class='page_container'>
"; ";
$FOOTER['3_column'] = "<br /> $FOOTER['3_column'] = "<br />
{FEATUREBOX|tabs=notablestyle}
</td> </td>
<td class='right_menu'> <td class='right_menu'>
<table class='menus_container'><tr><td> <table class='menus_container'><tr><td>
{SETSTYLE=rightmenu} {SETSTYLE=rightmenu}