summaryrefslogtreecommitdiffstats
path: root/usr/local/www/index.php
diff options
context:
space:
mode:
authorCharlie Marshall <charlie0440@gmail.com>2013-06-30 15:32:50 +0100
committerCharlie Marshall <charlie0440@gmail.com>2013-06-30 15:32:50 +0100
commitcafb7dfe782cf9677ea5e24ba8dd8f9c014c2f91 (patch)
tree1b27178b237a638c6545190a66e1e0bffec48ae2 /usr/local/www/index.php
parent60695c6aeec34ba0fb3903aba897bef2b66829bd (diff)
downloadpfsense-cafb7dfe782cf9677ea5e24ba8dd8f9c014c2f91.zip
pfsense-cafb7dfe782cf9677ea5e24ba8dd8f9c014c2f91.tar.gz
change css & jquery to allow for multiple columns for themes ending in _fs
Diffstat (limited to 'usr/local/www/index.php')
-rwxr-xr-xusr/local/www/index.php47
1 files changed, 33 insertions, 14 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index 3fd07f6..bbea847 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -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();
OpenPOWER on IntegriCloud