1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 02:21:58 +02:00

Fix for Admin -> Sitelinks -> Sublink Generator. (no SEF URL support yet).

Bootstrap
This commit is contained in:
Cameron
2016-03-08 09:32:52 -08:00
parent 724b1697b3
commit 7e55a677b3
3 changed files with 72 additions and 26 deletions

View File

@@ -14,8 +14,21 @@ define('VIEWPORT', "width=device-width, initial-scale=1.0");
// use https if e107 is using https.
e107::js("url", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery', 2);
e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css');
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css');
if($bootswatch = e107::pref('theme', 'bootswatch',false))
{
e107::css('url', 'https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/'.$bootswatch.'/bootstrap.min.css');
}
else
{
e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css');
}
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css');
/* @example prefetch */
//e107::link(array('rel'=>'prefetch', 'href'=>THEME.'images/browsers.png'));

View File

@@ -8,12 +8,12 @@ class theme_bootstrap3 implements e_theme_config
function process() // Save posted values from config() fields.
{
$pref = e107::getConfig();
$tp = e107::getParser();
$theme_pref = array();
$theme_pref['nav_alignment'] = $_POST['nav_alignment'];
$theme_pref['usernav_placement'] = $_POST['usernav_placement'];
$theme_pref['branding'] = $_POST['branding'];
$theme_pref['bootswatch'] = $_POST['bootswatch'];
$pref->set('sitetheme_pref', $theme_pref);
return $pref->dataHasChanged();
@@ -37,6 +37,37 @@ class theme_bootstrap3 implements e_theme_config
$var[2]['html'] = $frm->select('usernav_placement', array('top', 'bottom'), e107::pref('theme', 'usernav_placement', 'top'),'useValues=1' );
$var[2]['help'] = "";
$bootswatch = array(
// '' => LAN_DEFAULT,
"cerulean"=> 'Cerulean',
"cosmo"=> 'Cosmo',
"cyborg"=> 'Cyborg',
"darkly"=> 'Darkly',
"flatly"=> 'Flatly',
"journal"=> 'Journal',
"lumen"=> 'Lumen',
"paper"=> 'Paper',
"readable"=> 'Readable',
"sandstone"=> 'Sandstone',
"simplex"=> 'Simplex',
"slate"=> 'Slate',
"spacelab"=> 'Spacelab',
"superhero"=> 'Superhero',
"united"=> 'United',
"yeti"=> 'Yeti',
);
$previewLink = " <a class='btn btn-default e-modal' data-modal-caption=\"Use the 'Themes' menu to view the selection.\" href='http://bootswatch.com/default/'>".LAN_PREVIEW."</a>";
$var[3]['caption'] = "Bootswatch Styles";
$var[3]['html'] = "<div class='form-inline'>".$frm->select('bootswatch', $bootswatch, e107::pref('theme', 'bootswatch', ''),null,LAN_DEFAULT ).$previewLink."</div>";
$var[3]['help'] = "";
// $var[1]['caption'] = "Sample configuration field 2";
// $var[1]['html'] = $frm->text('_blank_example2', e107::pref('theme', 'example2', 'default'));