mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
change css & jquery to allow for multiple columns for themes ending in _fs
This commit is contained in:
parent
60695c6aee
commit
cafb7dfe78
@ -471,7 +471,7 @@ include("head.inc");
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
columns = ['col1','col2'];
|
||||
columns = ['col1','col2','col3','col4', 'col5','col6','col7','col8','col9','col10'];
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@ -559,7 +559,7 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
|
||||
$printed = false;
|
||||
$firstprint = false;
|
||||
?>
|
||||
<div id="col1" style="float:left;width:49%;padding-bottom:40px">
|
||||
<div id="col1" style="float:left;width:49%;padding-bottom:40px" class="ui-sortable">
|
||||
<?php
|
||||
|
||||
foreach($widgetlist as $widget) {
|
||||
@ -636,22 +636,42 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['widgets'] && $pconfig['sequence'] != ""){
|
||||
if ($colpos[$widgetcounter] == "col2" && $printed == false)
|
||||
{
|
||||
if( substr($g['theme'], -3) != "_fs") {
|
||||
if ($config['widgets'] && $pconfig['sequence'] != ""){
|
||||
if ($colpos[$widgetcounter] == "col2" && $printed == false)
|
||||
{
|
||||
$printed = true;
|
||||
?>
|
||||
</div>
|
||||
<div id="col2" style="float:right;width:49%;padding-bottom:40px" class="ui-sortable">
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else if ($widgetcounter >= $halftotal && $printed == false){
|
||||
$printed = true;
|
||||
?>
|
||||
</div>
|
||||
<div id="col2" style="float:right;width:49%;padding-bottom:40px">
|
||||
<div id="col2" style="float:right;width:49%;padding-bottom:40px" class="ui-sortable">
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else if ($widgetcounter >= $halftotal && $printed == false){
|
||||
$printed = true;
|
||||
?>
|
||||
</div>
|
||||
<div id="col2" style="float:right;width:49%;padding-bottom:40px">
|
||||
<?php
|
||||
else {
|
||||
if ($config['widgets'] && $pconfig['sequence'] != "") {
|
||||
if ($colpos[$widgetcounter] == "col2" && $printed == false)
|
||||
{
|
||||
$printed = true;
|
||||
?>
|
||||
</div>
|
||||
<div id="col2" style="float:right;width:49%;padding-bottom:40px" class="ui-sortable">
|
||||
<?php
|
||||
}
|
||||
else { ?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
var colpos = "<?=$colpos[$widgetcounter]?>";
|
||||
createColumn(colpos);
|
||||
</script>
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -726,8 +746,7 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
|
||||
//<![CDATA[
|
||||
jQuery(document).ready(function(in_event)
|
||||
{
|
||||
jQuery('#col1').sortable({connectWith: '#col2', dropOnEmpty: true, handle: '.widgetheader', change: showSave});
|
||||
jQuery('#col2').sortable({connectWith: '#col1', dropOnEmpty: true, handle: '.widgetheader', change: showSave});
|
||||
jQuery('.ui-sortable').sortable({connectWith: '.ui-sortable', dropOnEmpty: true, handle: '.widgetheader', change: showSave});
|
||||
|
||||
<?php if (!$config['widgets'] && $pconfig['sequence'] != ""){ ?>
|
||||
hideAllWidgets();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user