mirror of
https://github.com/e107inc/e107.git
synced 2025-09-02 02:42:40 +02:00
Auto-prepend "cdn." (when available and CDN is On). Autoload "unminified" version (if available) when debug mode is On.
This commit is contained in:
@@ -1,29 +1,33 @@
|
||||
<?php
|
||||
if ( ! defined('e107_INIT')) { exit(); }
|
||||
|
||||
define("SEP"," <span class='fa fa-play e-breadcrumb'></span> ");
|
||||
define("BOOTSTRAP", 3);
|
||||
define('FONTAWESOME', 4);
|
||||
/**
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2017 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* @file
|
||||
* Bootstrap 3 Theme for e107 v2.x admin area.
|
||||
*/
|
||||
|
||||
$minified = deftrue('e_DEBUG') == true ? null : 'minified';
|
||||
$cdn = e107::getPref('e_jslib_cdn', true);
|
||||
|
||||
if($cdn) {
|
||||
e107::library('load', 'cdn.bootstrap', $minified);
|
||||
e107::library('load', 'cdn.fontawesome', $minified);
|
||||
}
|
||||
else
|
||||
if(!defined('e107_INIT'))
|
||||
{
|
||||
e107::library('load', 'bootstrap', $minified);
|
||||
e107::library('load', 'fontawesome', $minified);
|
||||
exit();
|
||||
}
|
||||
|
||||
e107::library('load', 'bootstrap.editable', $minified);
|
||||
define("SEP", " <span class='fa fa-play e-breadcrumb'></span> ");
|
||||
define("BOOTSTRAP", 3);
|
||||
define('FONTAWESOME', 4);
|
||||
|
||||
e107::css('theme','css/bootstrap-dark.min.css');
|
||||
e107::css('theme','admin_style.css');
|
||||
e107::css('theme','admin_dark.css');
|
||||
e107::css('theme','ie_all.css',null,'all',"<!--[if IE]>","<![endif]-->");
|
||||
e107::library('load', 'bootstrap');
|
||||
e107::library('load', 'fontawesome');
|
||||
e107::library('load', 'bootstrap.editable');
|
||||
|
||||
e107::css('theme', 'css/bootstrap-dark.min.css');
|
||||
e107::css('theme', 'admin_style.css');
|
||||
e107::css('theme', 'admin_dark.css');
|
||||
e107::css('theme', 'ie_all.css', null, 'all', "<!--[if IE]>", "<![endif]-->");
|
||||
|
||||
e107::css('inline', "
|
||||
.mce-menubar .mce-caret { border-top-color: #C6C6C6!important }
|
||||
|
@@ -1,6 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2017 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* @file
|
||||
* Bootstrap 3 Theme for e107 v2.x.
|
||||
*/
|
||||
@@ -14,19 +20,8 @@ define("BOOTSTRAP", 3);
|
||||
define("FONTAWESOME", 4);
|
||||
define('VIEWPORT', "width=device-width, initial-scale=1.0");
|
||||
|
||||
$min = deftrue('e_DEBUG') == true ? null : 'minified';
|
||||
$cdn = e107::getPref('e_jslib_cdn', true);
|
||||
|
||||
if($cdn)
|
||||
{
|
||||
e107::library('load', 'cdn.bootstrap', $min);
|
||||
e107::library('load', 'cdn.fontawesome', $min);
|
||||
}
|
||||
else
|
||||
{
|
||||
e107::library('load', 'bootstrap', $min);
|
||||
e107::library('load', 'fontawesome', $min);
|
||||
}
|
||||
e107::library('load', 'bootstrap');
|
||||
e107::library('load', 'fontawesome');
|
||||
|
||||
// CDN provider for Bootswatch.
|
||||
$cndPref = e107::pref('theme', 'cdn', 'cdnjs');
|
||||
@@ -50,18 +45,9 @@ switch($cndPref)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* @example prefetch */
|
||||
//e107::link(array('rel'=>'prefetch', 'href'=>THEME.'images/browsers.png'));
|
||||
|
||||
|
||||
|
||||
e107::js("footer-inline", "$('.e-tip').tooltip({container: 'body'})"); // activate bootstrap tooltips.
|
||||
|
||||
// Legacy Stuff.
|
||||
|
@@ -1,6 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2017 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* @file
|
||||
* Provides information about external libraries.
|
||||
*/
|
||||
@@ -17,13 +23,12 @@ class bootstrap3_library
|
||||
*/
|
||||
function config()
|
||||
{
|
||||
$libraries = array();
|
||||
|
||||
return $libraries;
|
||||
// TODO - bootswatch...
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Alter the library information before detection and caching takes place.
|
||||
* Alters library information before detection and caching takes place.
|
||||
*/
|
||||
function config_alter(&$libraries)
|
||||
{
|
||||
@@ -33,9 +38,9 @@ class bootstrap3_library
|
||||
{
|
||||
// Disable Bootstrap CSS.
|
||||
unset($libraries['cdn.bootstrap']['files']['css']);
|
||||
unset($libraries['cdn.bootstrap']['variants']['minified']['files']['css']);
|
||||
unset($libraries['cdn.bootstrap']['variants']['dev']['files']['css']);
|
||||
unset($libraries['bootstrap']['files']['css']);
|
||||
unset($libraries['bootstrap']['variants']['minified']['files']['css']);
|
||||
unset($libraries['bootstrap']['variants']['dev']['files']['css']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user