mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Revert changes by infopanel, and introduce flexpanel, which extends infopanel funcionality.
This commit is contained in:
@@ -31,18 +31,19 @@ if (varset($pref['adminstyle'])=='cascade' || varset($pref['adminstyle'])=='begi
|
|||||||
$pref['adminstyle'] = 'infopanel';
|
$pref['adminstyle'] = 'infopanel';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strpos($pref['adminstyle'], 'infopanel') === 0)
|
if(in_array($pref['adminstyle'], array('infopanel', 'flexpanel')))
|
||||||
{
|
{
|
||||||
// Define constant for using custom template on the dashboard.
|
|
||||||
define('e_DASHBOARD', true);
|
|
||||||
|
|
||||||
require_once(e_ADMIN . 'includes/' . $pref['adminstyle'] . '.php');
|
require_once(e_ADMIN . 'includes/' . $pref['adminstyle'] . '.php');
|
||||||
|
|
||||||
$_class = 'adminstyle_' . $pref['adminstyle'];
|
$_class = 'adminstyle_' . $pref['adminstyle'];
|
||||||
if(class_exists($_class, false))
|
if(class_exists($_class, false))
|
||||||
{
|
{
|
||||||
$adp = new $_class;
|
$adp = new $_class;
|
||||||
}
|
}
|
||||||
else $adp = new adminstyle_infopanel;
|
else
|
||||||
|
{
|
||||||
|
$adp = new adminstyle_infopanel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ if (!defined('e107_INIT'))
|
|||||||
}
|
}
|
||||||
$In_e107_Footer = TRUE; // For registered shutdown function
|
$In_e107_Footer = TRUE; // For registered shutdown function
|
||||||
|
|
||||||
global $error_handler,$db_time,$ADMIN_FOOTER,$ADMIN_FOOTER_DASHBOARD;
|
global $error_handler,$db_time,$ADMIN_FOOTER;
|
||||||
|
|
||||||
// Legacy fix - call header if not already done, mainly fixing left side menus to work proper
|
// Legacy fix - call header if not already done, mainly fixing left side menus to work proper
|
||||||
if(!deftrue('e_ADMIN_UI') && !deftrue('ADMIN_AREA'))
|
if(!deftrue('e_ADMIN_UI') && !deftrue('ADMIN_AREA'))
|
||||||
@@ -97,17 +97,9 @@ if (varset($e107_popup) != 1)
|
|||||||
//
|
//
|
||||||
//NEW - Iframe mod
|
//NEW - Iframe mod
|
||||||
if (!deftrue('e_IFRAME'))
|
if (!deftrue('e_IFRAME'))
|
||||||
{
|
|
||||||
// Dashboard uses its own template.
|
|
||||||
if (deftrue('e_DASHBOARD', false) === true)
|
|
||||||
{
|
|
||||||
parse_admin($ADMIN_FOOTER_DASHBOARD);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
parse_admin($ADMIN_FOOTER);
|
parse_admin($ADMIN_FOOTER);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$eTimingStop = microtime();
|
$eTimingStop = microtime();
|
||||||
global $eTimingStart;
|
global $eTimingStart;
|
||||||
|
@@ -295,15 +295,17 @@ echo "\n<!-- footer_other_css -->\n";
|
|||||||
$e_js->renderJs('core_css', false, 'css', false);
|
$e_js->renderJs('core_css', false, 'css', false);
|
||||||
echo "\n<!-- footer_core_css -->\n";
|
echo "\n<!-- footer_core_css -->\n";
|
||||||
|
|
||||||
// Plugin CSS
|
|
||||||
$e_js->renderJs('plugin_css', false, 'css', false);
|
|
||||||
echo "\n<!-- footer_plugin_css -->\n";
|
|
||||||
|
|
||||||
// Theme CSS
|
// Theme CSS
|
||||||
//echo "<!-- Theme css -->\n";
|
//echo "<!-- Theme css -->\n";
|
||||||
$e_js->renderJs('theme_css', false, 'css', false);
|
$e_js->renderJs('theme_css', false, 'css', false);
|
||||||
echo "\n<!-- footer_theme_css -->\n";
|
echo "\n<!-- footer_theme_css -->\n";
|
||||||
|
|
||||||
|
// Plugin CSS
|
||||||
|
$e_js->renderJs('plugin_css', false, 'css', false);
|
||||||
|
echo "\n<!-- footer_plugin_css -->\n";
|
||||||
|
|
||||||
// Inline CSS - not sure if this should stay at all!
|
// Inline CSS - not sure if this should stay at all!
|
||||||
$e_js->renderJs('inline_css', false, 'css', false);
|
$e_js->renderJs('inline_css', false, 'css', false);
|
||||||
echo "\n<!-- footer_inline_css -->\n";
|
echo "\n<!-- footer_inline_css -->\n";
|
||||||
@@ -589,10 +591,10 @@ if ($e107_popup != 1)
|
|||||||
{
|
{
|
||||||
//removed check strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE
|
//removed check strpos(e_SELF.'?'.e_QUERY, 'menus.php?configure') === FALSE
|
||||||
|
|
||||||
// Dashboard uses its own template.
|
// "flexpanel" style uses its own template!!!
|
||||||
if (deftrue('e_DASHBOARD', false) === true)
|
if(defset('e_PAGE') == 'admin.php' && varset($pref['adminstyle']) == 'flexpanel')
|
||||||
{
|
{
|
||||||
parse_admin($ADMIN_HEADER_DASHBOARD);
|
parse_admin($ADMIN_HEADER_FLEXPANEL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
262
e107_admin/includes/flexpanel.php
Normal file
262
e107_admin/includes/flexpanel.php
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(!defined('e107_INIT'))
|
||||||
|
{
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flexpanel uses infopanel's methods to avoid code duplication.
|
||||||
|
e107_require_once(e_ADMIN . 'includes/infopanel.php');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class adminstyle_flexpanel.
|
||||||
|
*/
|
||||||
|
class adminstyle_flexpanel extends adminstyle_infopanel
|
||||||
|
{
|
||||||
|
|
||||||
|
private $iconlist = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->iconlist = $this->getIconList();
|
||||||
|
|
||||||
|
e107::js('core', 'core/admin.flexpanel.js', 'jquery', 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render contents.
|
||||||
|
*/
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
$admin_sc = e107::getScBatch('admin');
|
||||||
|
$tp = e107::getParser();
|
||||||
|
$ns = e107::getRender();
|
||||||
|
$mes = e107::getMessage();
|
||||||
|
$pref = e107::getPref();
|
||||||
|
$frm = e107::getForm();
|
||||||
|
|
||||||
|
global $user_pref;
|
||||||
|
|
||||||
|
$panels = array(
|
||||||
|
'Area01' => '', // Sidebar.
|
||||||
|
'Area02' => '',
|
||||||
|
'Area03' => '',
|
||||||
|
'Area04' => '',
|
||||||
|
'Area05' => '',
|
||||||
|
'Area06' => '',
|
||||||
|
'Area07' => '', // Content left.
|
||||||
|
'Area08' => '', // Content right.
|
||||||
|
'Area09' => '',
|
||||||
|
'Area10' => '',
|
||||||
|
'Area11' => '',
|
||||||
|
'Area12' => '',
|
||||||
|
'Area13' => '',
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// "Help" box.
|
||||||
|
$panels['Area01'] .= $tp->parseTemplate('{SETSTYLE=site_info}{ADMIN_HELP}', true, $admin_sc);
|
||||||
|
// "Latest" box.
|
||||||
|
$panels['Area01'] .= $tp->parseTemplate('{SETSTYLE=admin_menu}{ADMIN_LATEST=infopanel}', true, $admin_sc);
|
||||||
|
// "Status" box.
|
||||||
|
$panels['Area01'] .= $tp->parseTemplate('{SETSTYLE=admin_menu}{ADMIN_STATUS=infopanel}', true, $admin_sc);
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------- Personalized Panel -----------------------
|
||||||
|
if(getperms('0') && !vartrue($user_pref['core-infopanel-mye107'])) // Set default icons.
|
||||||
|
{
|
||||||
|
$defArray = array(
|
||||||
|
0 => 'e-administrator',
|
||||||
|
1 => 'e-cpage',
|
||||||
|
2 => 'e-frontpage',
|
||||||
|
3 => 'e-mailout',
|
||||||
|
4 => 'e-image',
|
||||||
|
5 => 'e-menus',
|
||||||
|
6 => 'e-meta',
|
||||||
|
7 => 'e-newspost',
|
||||||
|
8 => 'e-plugin',
|
||||||
|
9 => 'e-prefs',
|
||||||
|
10 => 'e-links',
|
||||||
|
11 => 'e-theme',
|
||||||
|
12 => 'e-userclass2',
|
||||||
|
13 => 'e-users',
|
||||||
|
14 => 'e-wmessage'
|
||||||
|
);
|
||||||
|
$user_pref['core-infopanel-mye107'] = vartrue($pref['core-infopanel-default'], $defArray);
|
||||||
|
}
|
||||||
|
$tp->parseTemplate("{SETSTYLE=core-infopanel}");
|
||||||
|
$mainPanel = "<div id='core-infopanel_mye107'>";
|
||||||
|
$mainPanel .= "<div class='left'>";
|
||||||
|
foreach($this->iconlist as $key => $val)
|
||||||
|
{
|
||||||
|
if(!vartrue($user_pref['core-infopanel-mye107']) || in_array($key, $user_pref['core-infopanel-mye107']))
|
||||||
|
{
|
||||||
|
$mainPanel .= e107::getNav()->renderAdminButton($val['link'], $val['title'], $val['caption'], $val['perms'], $val['icon_32'], "div");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$mainPanel .= "</div></div>";
|
||||||
|
// Rendering the saved configuration.
|
||||||
|
$tp->parseTemplate("{SETSTYLE=core-infopanel}");
|
||||||
|
$caption = $tp->lanVars(LAN_CONTROL_PANEL, ucwords(USERNAME));
|
||||||
|
$coreInfoPanelMyE107 = $ns->tablerender($caption, $mainPanel, "core-infopanel_mye107", true);
|
||||||
|
$panels['Area07'] .= $coreInfoPanelMyE107;
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------- e107 News --------------------------------
|
||||||
|
$newsTabs = array();
|
||||||
|
$newsTabs['coreFeed'] = array('caption' => LAN_GENERAL, 'text' => "<div id='e-adminfeed' style='min-height:300px'></div><div class='right'><a rel='external' href='" . ADMINFEEDMORE . "'>" . LAN_MORE . "</a></div>");
|
||||||
|
$newsTabs['pluginFeed'] = array('caption' => LAN_PLUGIN, 'text' => "<div id='e-adminfeed-plugin'></div>");
|
||||||
|
$newsTabs['themeFeed'] = array('caption' => LAN_THEMES, 'text' => "<div id='e-adminfeed-theme'></div>");
|
||||||
|
|
||||||
|
$coreInfoPanelNews = $ns->tablerender(LAN_LATEST_e107_NEWS, e107::getForm()->tabs($newsTabs, array('active' => 'coreFeed')), "core-infopanel_news", true);
|
||||||
|
$panels['Area08'] .= $coreInfoPanelNews;
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------- Website Status ---------------------------
|
||||||
|
$coreInfoPanelWebsiteStatus = $ns->tablerender(LAN_WEBSITE_STATUS, $this->renderWebsiteStatus(), "", true);
|
||||||
|
$panels['Area08'] .= $coreInfoPanelWebsiteStatus;
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------- Latest Comments --------------------------
|
||||||
|
$panels['Area01'] .= $this->renderLatestComments();
|
||||||
|
|
||||||
|
|
||||||
|
// --------------------- User Selected Menus ----------------------
|
||||||
|
if(varset($user_pref['core-infopanel-menus']))
|
||||||
|
{
|
||||||
|
foreach($user_pref['core-infopanel-menus'] as $val)
|
||||||
|
{
|
||||||
|
$inc = $tp->parseTemplate("{PLUGIN=$val|TRUE}");
|
||||||
|
$panels['Area01'] .= $inc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sidebar.
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-md-3 col-lg-2" id="left-panel">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-01">';
|
||||||
|
echo $panels['Area01'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="col-md-9 col-lg-10" id="right-panel">';
|
||||||
|
|
||||||
|
|
||||||
|
if(vartrue($_GET['mode']) != 'customize')
|
||||||
|
{
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-sm-12">';
|
||||||
|
echo $mes->render();
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-sm-12">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-02">';
|
||||||
|
echo $panels['Area02'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-sm-4">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-03">';
|
||||||
|
echo $panels['Area03'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="col-sm-4">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-04">';
|
||||||
|
echo $panels['Area04'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="col-sm-4">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-05">';
|
||||||
|
echo $panels['Area05'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-sm-12">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-06">';
|
||||||
|
echo $panels['Area06'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-sm-6">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-07">';
|
||||||
|
echo $panels['Area07'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="col-sm-6">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-08">';
|
||||||
|
echo $panels['Area08'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-sm-12">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-09">';
|
||||||
|
echo $panels['Area09'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-sm-4">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-10">';
|
||||||
|
echo $panels['Area10'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="col-sm-4">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-11">';
|
||||||
|
echo $panels['Area11'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="col-sm-4">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-12">';
|
||||||
|
echo $panels['Area12'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col-sm-12">';
|
||||||
|
echo '<div class="draggable-panels" id="menu-area-13">';
|
||||||
|
echo $panels['Area13'];
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo $frm->open('infopanel', 'post', e_SELF);
|
||||||
|
echo $this->render_infopanel_options(true);
|
||||||
|
echo $frm->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -57,12 +57,9 @@ class adminstyle_infopanel
|
|||||||
{
|
{
|
||||||
|
|
||||||
$user_pref['core-infopanel-mye107'] = $_POST['e-mye107'];
|
$user_pref['core-infopanel-mye107'] = $_POST['e-mye107'];
|
||||||
|
$user_pref['core-infopanel-menus'] = $_POST['e-mymenus'];
|
||||||
|
|
||||||
save_prefs('user');
|
save_prefs('user');
|
||||||
|
|
||||||
$pref['core-infopanel-menus'] = $_POST['e-mymenus'];
|
|
||||||
|
|
||||||
save_prefs();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -74,6 +71,15 @@ class adminstyle_infopanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allow to get Icon List.
|
||||||
|
*/
|
||||||
|
function getIconList()
|
||||||
|
{
|
||||||
|
return $this->iconlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function render()
|
function render()
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
@@ -83,22 +89,52 @@ class adminstyle_infopanel
|
|||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
|
|
||||||
$droppableAreaContent1 = '';
|
|
||||||
$droppableAreaContent2 = '';
|
|
||||||
$droppableAreaContent3 = '';
|
|
||||||
$droppableAreaContent4 = '';
|
|
||||||
$droppableAreaContent5 = '';
|
|
||||||
$droppableAreaContent6 = '';
|
|
||||||
$droppableAreaContent7 = '';
|
|
||||||
$droppableAreaContent8 = '';
|
|
||||||
$droppableAreaContent9 = '';
|
|
||||||
$droppableAreaContent10 = '';
|
|
||||||
|
|
||||||
|
// XXX Check Bootstrap bug is fixed.
|
||||||
|
/*
|
||||||
|
echo '
|
||||||
|
<ul class="thumbnails">
|
||||||
|
<li class="span4">
|
||||||
|
<a href="#" class="thumbnail">
|
||||||
|
<img src="http://placehold.it/360x270" alt="">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="span4">
|
||||||
|
<a href="#" class="thumbnail">
|
||||||
|
<img src="http://placehold.it/360x270" alt="">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="span4">
|
||||||
|
<a href="#" class="thumbnail">
|
||||||
|
<img src="http://placehold.it/360x270" alt="">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="span4">
|
||||||
|
<a href="#" class="thumbnail">
|
||||||
|
<img src="http://placehold.it/360x270" alt="">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="span4">
|
||||||
|
<a href="#" class="thumbnail">
|
||||||
|
<img src="http://placehold.it/360x270" alt="">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="span4">
|
||||||
|
<a href="#" class="thumbnail">
|
||||||
|
<img src="http://placehold.it/360x270" alt="">
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
';
|
||||||
|
*/
|
||||||
//TODO LANs throughout.
|
//TODO LANs throughout.
|
||||||
|
|
||||||
global $style, $user_pref;
|
global $style, $user_pref;
|
||||||
|
|
||||||
// ---------------------- Start Panel -----------------------------
|
// ---------------------- Start Panel --------------------------------
|
||||||
|
|
||||||
|
// $text = "<div >";
|
||||||
if (getperms('0') && !vartrue($user_pref['core-infopanel-mye107'])) // Set default icons.
|
if (getperms('0') && !vartrue($user_pref['core-infopanel-mye107'])) // Set default icons.
|
||||||
{
|
{
|
||||||
$defArray = array (
|
$defArray = array (
|
||||||
@@ -118,17 +154,47 @@ class adminstyle_infopanel
|
|||||||
13 => 'e-users',
|
13 => 'e-users',
|
||||||
14 => 'e-wmessage'
|
14 => 'e-wmessage'
|
||||||
);
|
);
|
||||||
|
|
||||||
$user_pref['core-infopanel-mye107'] = vartrue($pref['core-infopanel-default'],$defArray);
|
$user_pref['core-infopanel-mye107'] = vartrue($pref['core-infopanel-default'],$defArray);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// "<form method='post' action='".e_SELF."?".e_QUERY."'>";
|
||||||
|
|
||||||
$tp->parseTemplate("{SETSTYLE=core-infopanel}");
|
$tp->parseTemplate("{SETSTYLE=core-infopanel}");
|
||||||
|
|
||||||
// --------------------- Personalized Panel -----------------------
|
// Personalized Panel
|
||||||
// Rendering the saved configuration.
|
// Rendering the saved configuration.
|
||||||
|
|
||||||
$mainPanel = "<div id='core-infopanel_mye107'>";
|
$mainPanel = "
|
||||||
$mainPanel .= "<div class='left'>";
|
<div id='core-infopanel_mye107' >
|
||||||
|
";
|
||||||
|
|
||||||
|
/*
|
||||||
|
$mainPanel .= '<span class="pull-right">
|
||||||
|
<span class="options">
|
||||||
|
<div class="btn-group">
|
||||||
|
<a class="dropdown-toggle" data-toggle="dropdown"><i class="icon-cog"></i></a>
|
||||||
|
<ul class="dropdown-menu black-box-dropdown dropdown-right">
|
||||||
|
<li>'.$this->render_infopanel_icons().'</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</span>';
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// print_a($user_pref['core-infopanel-mye107']);
|
||||||
|
|
||||||
|
$mainPanel .= "
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class='left'>";
|
||||||
|
|
||||||
foreach ($this->iconlist as $key=>$val)
|
foreach ($this->iconlist as $key=>$val)
|
||||||
{
|
{
|
||||||
if (!vartrue($user_pref['core-infopanel-mye107']) || in_array($key, $user_pref['core-infopanel-mye107']))
|
if (!vartrue($user_pref['core-infopanel-mye107']) || in_array($key, $user_pref['core-infopanel-mye107']))
|
||||||
@@ -136,117 +202,107 @@ class adminstyle_infopanel
|
|||||||
$mainPanel .= e107::getNav()->renderAdminButton($val['link'], $val['title'], $val['caption'], $val['perms'], $val['icon_32'], "div");
|
$mainPanel .= e107::getNav()->renderAdminButton($val['link'], $val['title'], $val['caption'], $val['perms'], $val['icon_32'], "div");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$mainPanel .= "</div></div>";
|
|
||||||
|
// $mainPanel .= "<div class='clear'> </div>";
|
||||||
|
$mainPanel .= "</div>
|
||||||
|
|
||||||
|
</div>";
|
||||||
|
|
||||||
$caption = $tp->lanVars(LAN_CONTROL_PANEL, ucwords(USERNAME));
|
$caption = $tp->lanVars(LAN_CONTROL_PANEL, ucwords(USERNAME));
|
||||||
$coreInfoPanelMyE107 = $ns->tablerender($caption, $mainPanel, "core-infopanel_mye107",true);
|
$text = $ns->tablerender($caption, $mainPanel, "core-infopanel_mye107",true);
|
||||||
$droppableAreaContent1 .= $coreInfoPanelMyE107;
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------- e107 News --------------------------------
|
// ------------------------------- e107 News --------------------------------
|
||||||
|
|
||||||
$newsTabs = array();
|
$newsTabs = array();
|
||||||
$newsTabs['coreFeed'] = array('caption'=>LAN_GENERAL,'text'=>"<div id='e-adminfeed' style='min-height:300px'></div><div class='right'><a rel='external' href='".ADMINFEEDMORE."'>".LAN_MORE."</a></div>");
|
$newsTabs['coreFeed'] = array('caption'=>LAN_GENERAL,'text'=>"<div id='e-adminfeed' style='min-height:300px'></div><div class='right'><a rel='external' href='".ADMINFEEDMORE."'>".LAN_MORE."</a></div>");
|
||||||
$newsTabs['pluginFeed'] = array('caption'=>LAN_PLUGIN,'text'=>"<div id='e-adminfeed-plugin'></div>");
|
$newsTabs['pluginFeed'] = array('caption'=>LAN_PLUGIN,'text'=>"<div id='e-adminfeed-plugin'></div>");
|
||||||
$newsTabs['themeFeed'] = array('caption'=>LAN_THEMES,'text'=>"<div id='e-adminfeed-theme'></div>");
|
$newsTabs['themeFeed'] = array('caption'=>LAN_THEMES,'text'=>"<div id='e-adminfeed-theme'></div>");
|
||||||
|
|
||||||
$coreInfoPanelNews = $ns->tablerender(LAN_LATEST_e107_NEWS,e107::getForm()->tabs($newsTabs, array('active'=>'coreFeed')),"core-infopanel_news",true);
|
$text2 = $ns->tablerender(LAN_LATEST_e107_NEWS,e107::getForm()->tabs($newsTabs, array('active'=>'coreFeed')),"core-infopanel_news",true);
|
||||||
$droppableAreaContent2 .= $coreInfoPanelNews;
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------- Website Status ---------------------------
|
|
||||||
$coreInfoPanelWebsiteStatus = $ns->tablerender(LAN_WEBSITE_STATUS, $this->renderWebsiteStatus(),"",true);
|
|
||||||
$droppableAreaContent2 .= $coreInfoPanelWebsiteStatus;
|
|
||||||
|
|
||||||
|
|
||||||
// --------------------- Latest Comments --------------------------
|
// ---------------------Latest Stuff ---------------------------
|
||||||
$droppableAreaContent1 .= $this->renderLatestComments();
|
|
||||||
|
//require_once (e_CORE."shortcodes/batch/admin_shortcodes.php");
|
||||||
|
e107::getScBatch('admin');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$text2 .= $ns->tablerender(LAN_WEBSITE_STATUS, $this->renderWebsiteStatus(),"",true);
|
||||||
|
|
||||||
|
|
||||||
|
// $text .= $ns->tablerender(ADLAN_LAT_1,$tp->parseTemplate("{ADMIN_LATEST=norender}"),"core-infopanel_latest",true);
|
||||||
|
// $text .= $ns->tablerender(LAN_STATUS,$tp->parseTemplate("{ADMIN_STATUS=norender}"),"core-infopanel_latest",true);
|
||||||
|
/*
|
||||||
|
|
||||||
|
$text .= "<li class='span6'>
|
||||||
|
".$tp->parseTemplate("{ADMIN_LATEST=norender}").
|
||||||
|
$tp->parseTemplate("{ADMIN_STATUS=norender}")."
|
||||||
|
</div>";
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
$text .= $this->renderLatestComments();
|
||||||
|
|
||||||
|
|
||||||
|
// ---------------------- Who's Online ------------------------
|
||||||
|
// TODO Could use a new _menu item instead.
|
||||||
|
|
||||||
|
|
||||||
|
// $text2 .= $ns->tablerender('Visitors Online : '.vartrue($nOnline), $panelOnline,'core-infopanel_online',true);
|
||||||
|
|
||||||
|
// --------------------- User Selected Menus -------------------
|
||||||
|
|
||||||
|
|
||||||
// --------------------- User Selected Menus ----------------------
|
|
||||||
if (varset($pref['core-infopanel-menus']))
|
if (varset($pref['core-infopanel-menus']))
|
||||||
{
|
{
|
||||||
foreach ($pref['core-infopanel-menus'] as $val)
|
foreach ($pref['core-infopanel-menus'] as $val)
|
||||||
{
|
{
|
||||||
$id = $frm->name2id('core-infopanel_'.$val);
|
$id = $frm->name2id('core-infopanel_'.$val);
|
||||||
$inc = $tp->parseTemplate("{PLUGIN=$val|TRUE}");
|
$inc = $tp->parseTemplate("{PLUGIN=$val|TRUE}");
|
||||||
$droppableAreaContent1 .= $inc;
|
$text .= $inc;
|
||||||
|
// $text .= $ns->tablerender("", $inc, $id,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$droppableAreaContent1 .= $this->render_infopanel_options();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// $text .= "<div class='clear'> </div>";
|
||||||
|
|
||||||
|
$text .= $this->render_infopanel_options();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// $text .= "</div>";
|
||||||
|
|
||||||
if(vartrue($_GET['mode']) != 'customize')
|
if(vartrue($_GET['mode']) != 'customize')
|
||||||
{
|
{
|
||||||
echo '<div class="row">';
|
// $ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
|
||||||
echo '<div class="col-sm-12">';
|
echo $mes->render().'
|
||||||
echo $mes->render();
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '<div class="row">';
|
<!-- INFOPANEL -->
|
||||||
echo '<div class="col-sm-12">';
|
<div class="row">
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-4">';
|
<div class="span6 col-md-6">
|
||||||
echo $droppableAreaContent4;
|
'.$text.'
|
||||||
echo '</div>';
|
</div>
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '<div class="row">';
|
<div class="span6 col-md-6">
|
||||||
echo '<div class="col-sm-4">';
|
'.$text2.'
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-5">';
|
</div>
|
||||||
echo $droppableAreaContent5;
|
</div>
|
||||||
echo '</div>';
|
<!-- -->
|
||||||
echo '</div>';
|
|
||||||
echo '<div class="col-sm-4">';
|
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-6">';
|
|
||||||
echo $droppableAreaContent6;
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '<div class="col-sm-4">';
|
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-7">';
|
|
||||||
echo $droppableAreaContent7;
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '<div class="row">';
|
|
||||||
echo '<div class="col-sm-6">';
|
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-1">';
|
|
||||||
echo $droppableAreaContent1; // Control Panel
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '<div class="col-sm-6">';
|
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-2">';
|
|
||||||
echo $droppableAreaContent2; // Latest e107 News
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '<div class="row">';
|
';
|
||||||
echo '<div class="col-sm-4">';
|
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-8">';
|
|
||||||
echo $droppableAreaContent8;
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '<div class="col-sm-4">';
|
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-9">';
|
|
||||||
echo $droppableAreaContent9;
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '<div class="col-sm-4">';
|
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-10">';
|
|
||||||
echo $droppableAreaContent10;
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
echo '<div class="row">';
|
|
||||||
echo '<div class="col-sm-12">';
|
|
||||||
echo '<div class="draggable-panels" id="droppable-area-content-3">';
|
|
||||||
echo $droppableAreaContent3; // Website Status
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
echo '</div>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -411,12 +411,11 @@ class admin_shortcodes
|
|||||||
|
|
||||||
function sc_admin_latest($parm)
|
function sc_admin_latest($parm)
|
||||||
{
|
{
|
||||||
if($parm == 'infopanel' && e_PAGE != 'admin.php')
|
if(($parm == 'infopanel' || $parm == 'flexpanel') && e_PAGE != 'admin.php')
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ADMIN) {
|
if (ADMIN) {
|
||||||
if (!function_exists('admin_latest')) //XXX Is this still necessary?
|
if (!function_exists('admin_latest')) //XXX Is this still necessary?
|
||||||
{
|
{
|
||||||
@@ -1095,7 +1094,7 @@ class admin_shortcodes
|
|||||||
|
|
||||||
function sc_admin_status($parm)
|
function sc_admin_status($parm)
|
||||||
{
|
{
|
||||||
if($parm == 'infopanel' && e_PAGE != 'admin.php')
|
if(($parm == 'infopanel' || $parm == 'flexpanel') && e_PAGE != 'admin.php')
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -208,6 +208,7 @@ $ADMIN_MODAL = '<div id="uiModal" class="modal hide fade" tabindex="-1" role="d
|
|||||||
</div>';*/
|
</div>';*/
|
||||||
|
|
||||||
|
|
||||||
|
// TODO - LANs
|
||||||
$ADMIN_MODAL = '
|
$ADMIN_MODAL = '
|
||||||
<div id="uiModal" class="modal fade">
|
<div id="uiModal" class="modal fade">
|
||||||
<div id="admin-ui-modal" class="modal-dialog modal-lg">
|
<div id="admin-ui-modal" class="modal-dialog modal-lg">
|
||||||
@@ -224,12 +225,13 @@ $ADMIN_MODAL = '
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.modal-content -->
|
</div>
|
||||||
</div><!-- /.modal-dialog -->
|
</div>
|
||||||
</div><!-- /.modal -->';
|
</div>
|
||||||
|
';
|
||||||
|
|
||||||
|
// TODO - LANs
|
||||||
$ADMIN_HEADER_DASHBOARD = $ADMIN_HEADER = $ADMIN_MODAL . '
|
$ADMIN_HEADER_FLEXPANEL = $ADMIN_HEADER = $ADMIN_MODAL . '
|
||||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
@@ -252,88 +254,57 @@ $ADMIN_HEADER_DASHBOARD = $ADMIN_HEADER = $ADMIN_MODAL . '
|
|||||||
{ADMIN_PM}
|
{ADMIN_PM}
|
||||||
{ADMIN_DEBUG}
|
{ADMIN_DEBUG}
|
||||||
</div>
|
</div>
|
||||||
</div><!--/.navbar-collapse -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
';
|
</div>
|
||||||
|
|
||||||
|
|
||||||
$ADMIN_HEADER_DASHBOARD .= '
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2" id="left-panel">
|
|
||||||
<div class="draggable-panels" id="droppable-area-sidebar">
|
|
||||||
{SETSTYLE=admin_menu}
|
|
||||||
{ADMIN_MENU}
|
|
||||||
{ADMIN_PWORD}
|
|
||||||
{ADMIN_MENUMANAGER}
|
|
||||||
|
|
||||||
{SETSTYLE=site_info}
|
|
||||||
{ADMINUI_HELP}
|
|
||||||
{ADMIN_HELP}
|
|
||||||
|
|
||||||
{ADMIN_SITEINFO=creditsonly}
|
|
||||||
{SETSTYLE=admin_menu}
|
|
||||||
{ADMIN_LATEST=infopanel}
|
|
||||||
{ADMIN_STATUS=infopanel}
|
|
||||||
{ADMIN_LOG=request}
|
|
||||||
{ADMIN_MSG=request}
|
|
||||||
{ADMIN_PLUGINS}
|
|
||||||
{SETSTYLE=default}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-10" id="right-panel">
|
|
||||||
<div class="sidebar-toggle">
|
|
||||||
<a href="#" title="Toggle Sidebar" data-toggle-sidebar="true"> </a>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
';
|
';
|
||||||
|
|
||||||
$ADMIN_FOOTER_DASHBOARD = '
|
$ADMIN_HEADER_FLEXPANEL .= '
|
||||||
</div>
|
<div class="col-sm-12">
|
||||||
</div><!--/span-->
|
<div class="admin-main-content">
|
||||||
</div><!--/row-->
|
|
||||||
</div><!--/.fluid-container-->
|
|
||||||
|
|
||||||
<footer class="center mute">
|
|
||||||
Copyright © 2008-2015 e107 Inc (e107.org)<br />
|
|
||||||
</footer>
|
|
||||||
';
|
';
|
||||||
|
|
||||||
|
// TODO - LANs
|
||||||
$ADMIN_HEADER .= '
|
$ADMIN_HEADER .= '
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3 col-lg-2" id="left-panel">
|
<div class="col-md-3 col-lg-2" id="left-panel">
|
||||||
{SETSTYLE=admin_menu}
|
{SETSTYLE=admin_menu}
|
||||||
{ADMIN_MENU}
|
{ADMIN_MENU}
|
||||||
|
|
||||||
{ADMIN_PWORD}
|
{ADMIN_PWORD}
|
||||||
{ADMIN_MENUMANAGER}
|
{ADMIN_MENUMANAGER}
|
||||||
|
|
||||||
<div class="e-scroll-fixed">
|
<div class="e-scroll-fixed">
|
||||||
{SETSTYLE=site_info}
|
{SETSTYLE=site_info}
|
||||||
{ADMINUI_HELP}
|
{ADMINUI_HELP}
|
||||||
{ADMIN_HELP}
|
{ADMIN_HELP}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{ADMIN_SITEINFO=creditsonly}
|
{ADMIN_SITEINFO=creditsonly}
|
||||||
{SETSTYLE=admin_menu}
|
{SETSTYLE=admin_menu}
|
||||||
|
|
||||||
{ADMIN_LATEST=infopanel}
|
{ADMIN_LATEST=infopanel}
|
||||||
{ADMIN_STATUS=infopanel}
|
{ADMIN_STATUS=infopanel}
|
||||||
|
|
||||||
{ADMIN_LOG=request}
|
{ADMIN_LOG=request}
|
||||||
{ADMIN_MSG=request}
|
{ADMIN_MSG=request}
|
||||||
{ADMIN_PLUGINS}
|
{ADMIN_PLUGINS}
|
||||||
|
|
||||||
{SETSTYLE=default}
|
{SETSTYLE=default}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9 col-lg-10" id="right-panel">
|
<div class="col-md-9 col-lg-10" id="right-panel">
|
||||||
<div class="sidebar-toggle">
|
<div class="sidebar-toggle">
|
||||||
<a href="#" title="Toggle Sidebar" data-toggle-sidebar="true"> </a>
|
<a href="#" title="Toggle Sidebar" data-toggle-sidebar="true"> </a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="admin-main-content">
|
||||||
';
|
';
|
||||||
|
|
||||||
|
// TODO - LANs
|
||||||
$ADMIN_FOOTER = '
|
$ADMIN_FOOTER = '
|
||||||
</div><!--/row-->
|
</div>
|
||||||
</div><!--/span-->
|
</div>
|
||||||
</div><!--/row-->
|
</div><!--/.row-->
|
||||||
</div><!--/.fluid-container-->
|
</div><!--/.fluid-container-->
|
||||||
|
|
||||||
<footer class="center mute">
|
<footer class="center mute">
|
||||||
|
@@ -5,7 +5,7 @@ define("SEP"," <span class='fa fa-play e-breadcrumb'></span> ");
|
|||||||
define("BOOTSTRAP", 3);
|
define("BOOTSTRAP", 3);
|
||||||
define('FONTAWESOME', 4);
|
define('FONTAWESOME', 4);
|
||||||
|
|
||||||
e107::js("theme", "js/bootstrap3.js", 'jquery');
|
|
||||||
|
|
||||||
// e107::js("url", "https://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js",'jquery', 2);
|
// e107::js("url", "https://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js",'jquery', 2);
|
||||||
// e107::css('url', 'http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css');
|
// e107::css('url', 'http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css');
|
||||||
|
@@ -4,7 +4,9 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
{
|
{
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
e107.settings.draggablePanels = {
|
e107.callbacks = e107.callbacks || {};
|
||||||
|
|
||||||
|
e107.settings.flexPanel = {
|
||||||
selector: '.draggable-panels',
|
selector: '.draggable-panels',
|
||||||
items: '> .panel'
|
items: '> .panel'
|
||||||
};
|
};
|
||||||
@@ -12,12 +14,12 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
/**
|
/**
|
||||||
* Behavior to initialize draggable panels on the dashboard.
|
* Behavior to initialize draggable panels on the dashboard.
|
||||||
*
|
*
|
||||||
* @type {{attach: e107.behaviors.adminDashboardDraggablePanels.attach}}
|
* @type {{attach: e107.behaviors.flexPanelDraggablePanels.attach}}
|
||||||
*/
|
*/
|
||||||
e107.behaviors.adminDashboardDraggablePanels = {
|
e107.behaviors.flexPanelDraggablePanels = {
|
||||||
attach: function (context, settings)
|
attach: function (context, settings)
|
||||||
{
|
{
|
||||||
var selector = e107.settings.draggablePanels.selector;
|
var selector = e107.settings.flexPanel.selector;
|
||||||
var onceKey = 'admin-dashboard-draggable-panels';
|
var onceKey = 'admin-dashboard-draggable-panels';
|
||||||
|
|
||||||
$(context).find(selector).once(onceKey).each(function ()
|
$(context).find(selector).once(onceKey).each(function ()
|
||||||
@@ -26,9 +28,9 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
|
|
||||||
$panel.sortable({
|
$panel.sortable({
|
||||||
connectWith: selector,
|
connectWith: selector,
|
||||||
items: e107.settings.draggablePanels.items,
|
items: e107.settings.flexPanel.items,
|
||||||
handle: '.panel-heading',
|
handle: '.panel-heading',
|
||||||
accept: e107.settings.draggablePanels.selector,
|
accept: e107.settings.flexPanel.selector,
|
||||||
cursor: 'move',
|
cursor: 'move',
|
||||||
placeholder: 'draggable-placeholder',
|
placeholder: 'draggable-placeholder',
|
||||||
forcePlaceholderSize: true,
|
forcePlaceholderSize: true,
|
||||||
@@ -39,7 +41,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
start: function (event, ui)
|
start: function (event, ui)
|
||||||
{
|
{
|
||||||
var $placeholders = $('.draggable-placeholder');
|
var $placeholders = $('.draggable-placeholder');
|
||||||
var $draggablePanels = $(e107.settings.draggablePanels.selector);
|
var $draggablePanels = $(e107.settings.flexPanel.selector);
|
||||||
|
|
||||||
$placeholders.css('margin', '15px');
|
$placeholders.css('margin', '15px');
|
||||||
$placeholders.css('background-color', '#337ab7');
|
$placeholders.css('background-color', '#337ab7');
|
||||||
@@ -52,21 +54,21 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
},
|
},
|
||||||
stop: function (event, ui)
|
stop: function (event, ui)
|
||||||
{
|
{
|
||||||
var $draggablePanels = $(e107.settings.draggablePanels.selector);
|
var $draggablePanels = $(e107.settings.flexPanel.selector);
|
||||||
$draggablePanels.css('min-height', '0');
|
$draggablePanels.css('min-height', '0');
|
||||||
$draggablePanels.css('border', 'none');
|
$draggablePanels.css('border', 'none');
|
||||||
$draggablePanels.css('margin-bottom', '0');
|
$draggablePanels.css('margin-bottom', '0');
|
||||||
|
|
||||||
e107.callbacks.adminDashboardSavePanelOrder();
|
e107.callbacks.flexPanelSavePanelOrder();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
e107.callbacks.adminDashboardSavePanelOrder = function ()
|
e107.callbacks.flexPanelSavePanelOrder = function ()
|
||||||
{
|
{
|
||||||
var selector = e107.settings.draggablePanels.selector;
|
var selector = e107.settings.flexPanel.selector;
|
||||||
var NewOrder = [];
|
var NewOrder = [];
|
||||||
|
|
||||||
$(selector).each(function ()
|
$(selector).each(function ()
|
||||||
@@ -78,7 +80,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
{
|
{
|
||||||
NewOrder[key] = [];
|
NewOrder[key] = [];
|
||||||
|
|
||||||
$('#' + key + ' ' + e107.settings.draggablePanels.items).each(function ()
|
$('#' + key + ' ' + e107.settings.flexPanel.items).each(function ()
|
||||||
{
|
{
|
||||||
var $item = $(this);
|
var $item = $(this);
|
||||||
var title = $item.find('.panel-title').eq(0).text();
|
var title = $item.find('.panel-title').eq(0).text();
|
||||||
@@ -89,6 +91,6 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
});
|
});
|
||||||
|
|
||||||
console.log(NewOrder);
|
console.log(NewOrder);
|
||||||
}
|
};
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
Reference in New Issue
Block a user