\n";
$ret .= "
\n";
@@ -164,23 +187,48 @@ sub Dashboard_DetailFN() {
return $ret;
}
+sub Dashboard_Set($@) {
+ my ( $hash, $name, $cmd, @args ) = @_;
+
+ if ( $cmd eq "lock" ) {
+ #$attr{$name}{dashboard_lockstate} = "lock";
+ readingsSingleUpdate( $hash, "lockstate", "lock", 0 );
+ #$hash->{LOCKSTATE} = "lock";
+ return;
+ } elsif ( $cmd eq "unlock" ) {
+ #$attr{$name}{dashboard_lockstate} = "unlock";
+ readingsSingleUpdate( $hash, "lockstate", "unlock", 0 );
+ #$hash->{LOCKSTATE} = "unlock";
+ return;
+ }else {
+ return "Unknown argument " . $cmd . ", choose one of lock:noArg unlock:noArg";
+ }
+}
+
sub Dashboard_define ($$) {
- my ($hash, $def) = @_;
- readingsSingleUpdate( $hash, "state", "Initialized", 0 );
- #CheckInstallation($hash);
- CheckDashboardEntry($hash);
- return;
+ my ($hash, $def) = @_;
+ my $now = time();
+ my $name = $hash->{NAME};
+ $hash->{VERSION} = $dashboardversion;
+ readingsSingleUpdate( $hash, "state", "Initialized", 0 );
+
+ RemoveInternalTimer($hash);
+ InternalTimer ($now + 5, 'CreateDashboardEntry', $hash, 0);
+ InternalTimer ($now + 5, 'CheckDashboardAttributUssage', $hash, 0);
+ return;
}
sub Dashboard_undef ($$) {
- my ($hash,$arg) = @_;
- RemoveInternalTimer($hash);
- return undef;
+ my ($hash,$arg) = @_;
+
+ RemoveInternalTimer($hash);
+
+ return undef;
}
sub Dashboard_attr($$$) {
- #my ($cmd, $name, $attrName, $attrVal) = @_;
- return;
+ my ($cmd, $name, $attrName, $attrVal) = @_;
+ return;
}
#############################################################################################
@@ -194,93 +242,93 @@ sub DashboardAsHtml($)
sub Dashboard_SummaryFN($$$$)
{
- my ($FW_wname, $d, $room, $pageHash) = @_;
+ my ($FW_wname, $d, $room, $pageHash) = @_;
- my $ret = "";
- my $showbuttonbar = "hidden";
- my $debugfield = "hidden";
-
- my $h = $defs{$d};
- my $name = $defs{$d}{NAME};
- my $id = $defs{$d}{NR};
+ my $ret = "";
+ my $showbuttonbar = "hidden";
+ my $debugfield = "hidden";
- ######################### Read Dashboard Attributes and set Default-Values ####################################
- my $disable = AttrVal($defs{$d}{NAME}, "disable", 0);
- my $colcount = AttrVal($defs{$d}{NAME}, "dashboard_colcount", 1);
- my $colwidth = AttrVal($defs{$d}{NAME}, "dashboard_rowcentercolwidth", 100);
- my $colheight = AttrVal($defs{$d}{NAME}, "dashboard_rowcenterheight", 400);
- my $rowtopheight = AttrVal($defs{$d}{NAME}, "dashboard_rowtopheight", 250);
- my $rowbottomheight = AttrVal($defs{$d}{NAME}, "dashboard_rowbottomheight", 250);
- my $showhelper = AttrVal($defs{$d}{NAME}, "dashboard_showhelper", 1);
- my $showtabs = AttrVal($defs{$d}{NAME}, "dashboard_showtabs", "tabs-and-buttonbar-at-the-top");
- my $showtooglebuttons = AttrVal($defs{$d}{NAME}, "dashboard_showtooglebuttons", 1);
- my $showfullsize = AttrVal($defs{$d}{NAME}, "dashboard_showfullsize", 0);
- my $webfrontendfilter = AttrVal($defs{$d}{NAME}, "dashboard_webfrontendfilter", "*");
- my $customcss = AttrVal($defs{$d}{NAME}, "dashboard_customcss", "none");
+ my $h = $defs{$d};
+ my $name = $defs{$d}{NAME};
+ my $id = $defs{$d}{NR};
- my $row = AttrVal($defs{$d}{NAME}, "dashboard_row", "center");
- my $debug = AttrVal($defs{$d}{NAME}, "dashboard_debug", "0");
- my $lockstate = AttrVal($defs{$d}{NAME}, "dashboard_lockstate", "unlock");
+ ######################### Read Dashboard Attributes and set Default-Values ####################################
+ my $disable = AttrVal($defs{$d}{NAME}, "disable", 0);
+ my $colcount = AttrVal($defs{$d}{NAME}, "dashboard_colcount", 1);
+ my $colwidth = AttrVal($defs{$d}{NAME}, "dashboard_rowcentercolwidth", 100);
+ my $colheight = AttrVal($defs{$d}{NAME}, "dashboard_rowcenterheight", 400);
+ my $rowtopheight = AttrVal($defs{$d}{NAME}, "dashboard_rowtopheight", 250);
+ my $rowbottomheight = AttrVal($defs{$d}{NAME}, "dashboard_rowbottomheight", 250);
+ my $showhelper = AttrVal($defs{$d}{NAME}, "dashboard_showhelper", 1);
+ my $showtabs = AttrVal($defs{$d}{NAME}, "dashboard_showtabs", "tabs-and-buttonbar-at-the-top");
+ my $showtooglebuttons = AttrVal($defs{$d}{NAME}, "dashboard_showtooglebuttons", 1);
+ my $showfullsize = AttrVal($defs{$d}{NAME}, "dashboard_showfullsize", 0);
+ my $webfrontendfilter = AttrVal($defs{$d}{NAME}, "dashboard_webfrontendfilter", "*");
+ my $customcss = AttrVal($defs{$d}{NAME}, "dashboard_customcss", "none");
- my $activetab = AttrVal($defs{$d}{NAME}, "dashboard_activetab", 1);
- my $tabcount = AttrVal($defs{$d}{NAME}, "dashboard_tabcount", 1);
- my $dbwidth = AttrVal($defs{$d}{NAME}, "dashboard_width", "100%");
- my @tabnames = (AttrVal($defs{$d}{NAME}, "dashboard_tab1name", "Dashboard-Tab 1"),
+ my $row = AttrVal($defs{$d}{NAME}, "dashboard_row", "center");
+ my $debug = AttrVal($defs{$d}{NAME}, "dashboard_debug", "0");
+
+ my $lockstate = ($defs{$d}->{READINGS}{lockstate}{VAL}) ? $defs{$d}->{READINGS}{lockstate}{VAL} : "unlock";
+Log 1, "[DASHBOARD simple debug] ".$defs{$d}->{READINGS}{lockstate}{VAL};
+ #my $lockstate = AttrVal($defs{$d}{NAME}, "dashboard_lockstate", "unlock");
+
+ my $activetab = AttrVal($defs{$d}{NAME}, "dashboard_activetab", 1);
+ my $tabcount = AttrVal($defs{$d}{NAME}, "dashboard_tabcount", 1);
+ my $dbwidth = AttrVal($defs{$d}{NAME}, "dashboard_width", "100%");
+ my @tabnames = (AttrVal($defs{$d}{NAME}, "dashboard_tab1name", "Dashboard-Tab 1"),
AttrVal($defs{$d}{NAME}, "dashboard_tab2name", "Dashboard-Tab 2"),
AttrVal($defs{$d}{NAME}, "dashboard_tab3name", "Dashboard-Tab 3"),
AttrVal($defs{$d}{NAME}, "dashboard_tab4name", "Dashboard-Tab 4"),
AttrVal($defs{$d}{NAME}, "dashboard_tab5name", "Dashboard-Tab 5"),
AttrVal($defs{$d}{NAME}, "dashboard_tab6name", "Dashboard-Tab 6"),
AttrVal($defs{$d}{NAME}, "dashboard_tab7name", "Dashboard-Tab 7"));
- my @tabgroups = (AttrVal($defs{$d}{NAME}, "dashboard_tab1groups", ""),
+ my @tabgroups = (AttrVal($defs{$d}{NAME}, "dashboard_tab1groups", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab2groups", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab3groups", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab4groups", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab5groups", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab6groups", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab7groups", ""));
- my @tabsortings = (AttrVal($defs{$d}{NAME}, "dashboard_tab1sorting", ""),
+ my @tabsortings = (AttrVal($defs{$d}{NAME}, "dashboard_tab1sorting", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab2sorting", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab3sorting", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab4sorting", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab5sorting", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab6sorting", ""),
AttrVal($defs{$d}{NAME}, "dashboard_tab7sorting", ""));
- my @tabicons = (AttrVal($defs{$d}{NAME}, "dashboard_tab1icon", ""),
- AttrVal($defs{$d}{NAME}, "dashboard_tab2icon", ""),
- AttrVal($defs{$d}{NAME}, "dashboard_tab3icon", ""),
- AttrVal($defs{$d}{NAME}, "dashboard_tab4icon", ""),
- AttrVal($defs{$d}{NAME}, "dashboard_tab5icon", ""),
- AttrVal($defs{$d}{NAME}, "dashboard_tab6icon", ""),
- AttrVal($defs{$d}{NAME}, "dashboard_tab7icon", ""));
- #############################################################################################
- ###################### Build Device View for Room "all" and for Wrong Configurations #################################
- $ret .= "
";
- $ret .= "".$defs{$d}{TYPE}."
";
- $ret .= "";
- $ret .= "";
- $ret .= " ";
- $ret .= "".$defs{$d}{STATE}."
";
- $ret .= " ";
- $ret .= "
";
- $ret .= "
";
+ my @tabicons = (AttrVal($defs{$d}{NAME}, "dashboard_tab1icon", ""),
+ AttrVal($defs{$d}{NAME}, "dashboard_tab2icon", ""),
+ AttrVal($defs{$d}{NAME}, "dashboard_tab3icon", ""),
+ AttrVal($defs{$d}{NAME}, "dashboard_tab4icon", ""),
+ AttrVal($defs{$d}{NAME}, "dashboard_tab5icon", ""),
+ AttrVal($defs{$d}{NAME}, "dashboard_tab6icon", ""),
+ AttrVal($defs{$d}{NAME}, "dashboard_tab7icon", ""));
+
#############################################################################################
-
+
if ($disable == 1) {
readingsSingleUpdate( $defs{$d}, "state", "Disabled", 0 );
- return $ret;
+ return "";
}
unless (@tabgroups) {
readingsSingleUpdate( $defs{$d}, "state", "No Groups set", 0 );
- return $ret;
+ return "";
}
############# Filter Dashboard display depending on $FW_wname ###################################
if ($webfrontendfilter ne "*") {
my $filterhit = 0;
my @webfilter = split(",", $webfrontendfilter);
- for (my $i=0;$i<@webfilter;$i++){ if (trim($FW_wname) eq trim($webfilter[$i]) ) { $filterhit = 1; } }
- if ($filterhit == 0) { return $ret; }
+ for (my $i=0;$i<@webfilter;$i++){
+
+ if (trim($FW_wname) eq trim($webfilter[$i]) ) { $filterhit = 1; }
+ }
+ if ($filterhit == 0) {
+ # $ret .= "No Dashboard configured for ".$FW_wname."
";
+ # $ret .= "Set Attribute dashboard_webfrontendfilter, see
Details ";
+ return $ret;
+ }
}
##################################################################################
@@ -304,68 +352,69 @@ sub Dashboard_SummaryFN($$$$)
}
#-------------------------------------------------------------------------------------------------
- if ($room && $room ne "all") {
- $ret = "";
-
- $ret .= "\n";
-
- $ret .= "
\n";
-
- $ret .= "\n";
- $ret .= " \n";
- $ret .= " \n";
- $ret .= "
\n";
- $ret .= "\n";
-
- ########################### Dashboard Tab-Liste ##############################################
- my $tabshow = "hidden";
- my $tabicon = "";
- if ($showtabs eq "tabs-and-buttonbar-at-the-top" || $showtabs eq "tabs-at-the-top-buttonbar-hidden") { $tabshow = "top";}
- if ($showtabs eq "tabs-and-buttonbar-on-the-bottom" || $showtabs eq "tabs-on-the-bottom-buttonbar-hidden") { $tabshow = "bottom";}
+ if ($room ne "all") {
+ $ret .= "
\n";
+
+ $ret .= "\n";
+ $ret .= " \n";
+ $ret .= " \n";
+ $ret .= "
\n";
+ $ret .= "\n";
+
+ ########################### Dashboard Tab-Liste ##############################################
+ my $tabshow = "hidden";
+ my $tabicon = "";
+ if ($showtabs eq "tabs-and-buttonbar-at-the-top" || $showtabs eq "tabs-at-the-top-buttonbar-hidden") { $tabshow = "top";}
+ if ($showtabs eq "tabs-and-buttonbar-on-the-bottom" || $showtabs eq "tabs-on-the-bottom-buttonbar-hidden") { $tabshow = "bottom";}
+
+ $ret .= "
\n";
+ if ($showtabs ne "tabs-at-the-top-buttonbar-hidden" && $showtabs ne "tabs-on-the-bottom-buttonbar-hidden" && $showtabs ne "tabs-and-buttonbar-hidden") { $ret .= BuildButtonBar($d,$showtabs,$showfullsize); }
+
+ for (my $i=0;$i<$tabcount;$i++){
+ $tabicon = "";
+ if ($tabicons[$i] ne "") { $tabicon = FW_makeImage($tabicons[$i],$tabicons[$i],"dashboard_tabicon") . " "; }
+ $ret .= " ".$tabicon."".trim($tabnames[$i])." ";
+ }
+ $ret .= " \n";
+ ##############################################################################################
+
+ for (my $t=0;$t<$tabcount;$t++){
+ my @tabgroup = split(",", $tabgroups[$t]); #Set temp. position for groups without an stored position
+ for (my $i=0;$i<@tabgroup;$i++){
+ my @stabgroup = split(":", trim($tabgroup[$i]));
+ if (index($tabsortings[$t],trim($stabgroup[0])) < 0) { $tabsortings[$t] = $tabsortings[$t]."t".$t."c".GetMaxColumnId($row,$colcount).",".trim($stabgroup[0]).",true,0,0:"; }
+ }
- $ret .= "
\n";
- if ($showtabs ne "tabs-at-the-top-buttonbar-hidden" && $showtabs ne "tabs-on-the-bottom-buttonbar-hidden" && $showtabs ne "tabs-and-buttonbar-hidden") { $ret .= BuildButtonBar($d,$showtabs,$showfullsize); }
-
- for (my $i=0;$i<$tabcount;$i++){
- $tabicon = "";
- if ($tabicons[$i] ne "") { $tabicon = FW_makeImage($tabicons[$i],$tabicons[$i],"dashboard_tabicon") . " "; }
- $ret .= " ".$tabicon."".trim($tabnames[$i])." ";
- }
- $ret .= " \n";
- ##############################################################################################
-
- for (my $t=0;$t<$tabcount;$t++){
- my @tabgroup = split(",", $tabgroups[$t]); #Set temp. position for groups without an stored position
- for (my $i=0;$i<@tabgroup;$i++){
- my @stabgroup = split(":", trim($tabgroup[$i]));
- if (index($tabsortings[$t],trim($stabgroup[0])) < 0) { $tabsortings[$t] = $tabsortings[$t]."t".$t."c".GetMaxColumnId($row,$colcount).",".trim($stabgroup[0]).",true,0,0:"; }
- }
-
- %group = BuildGroupList($tabgroups[$t]);
- $ret .= "
\n";
- $ret .= "
\n";
- $ret .= " \n";
- ##################### Top Row (only one Column) #############################################
- if ($row eq "top-center-bottom" || $row eq "top-center" || $row eq "top"){ $ret .= BuildDashboardTopRow($t,$id,$tabgroups[$t],$tabsortings[$t]); }
- ##################### Center Row (max. 5 Column) ############################################
- if ($row eq "top-center-bottom" || $row eq "top-center" || $row eq "center-bottom" || $row eq "center"){ $ret .= BuildDashboardCenterRow($t,$id,$tabgroups[$t],$tabsortings[$t],$colcount);}
- ############################# Bottom Row (only one Column) ############################################
- if ($row eq "top-center-bottom" || $row eq "center-bottom" || $row eq "bottom"){ $ret .= BuildDashboardBottomRow($t,$id,$tabgroups[$t],$tabsortings[$t]); }
- #############################################################################################
- $ret .= "
\n";
- $ret .= " \n";
- $ret .= "
\n";
- }
- $ret .= "
\n";
- $ret .= "
\n";
+ %group = BuildGroupList($tabgroups[$t]);
+ $ret .= "
\n";
+ $ret .= "
\n";
+ $ret .= " \n";
+ ##################### Top Row (only one Column) #############################################
+ if ($row eq "top-center-bottom" || $row eq "top-center" || $row eq "top"){ $ret .= BuildDashboardTopRow($t,$id,$tabgroups[$t],$tabsortings[$t]); }
+ ##################### Center Row (max. 5 Column) ############################################
+ if ($row eq "top-center-bottom" || $row eq "top-center" || $row eq "center-bottom" || $row eq "center"){ $ret .= BuildDashboardCenterRow($t,$id,$tabgroups[$t],$tabsortings[$t],$colcount);}
+ ############################# Bottom Row (only one Column) ############################################
+ if ($row eq "top-center-bottom" || $row eq "center-bottom" || $row eq "bottom"){ $ret .= BuildDashboardBottomRow($t,$id,$tabgroups[$t],$tabsortings[$t]); }
+ #############################################################################################
+ $ret .= "
\n";
+ $ret .= " \n";
+ $ret .= "
\n";
+ }
+ $ret .= "
\n";
+ $ret .= "
\n";
+ } else {
+ $ret .= "
";
+ $ret .= "".$defs{$d}{TYPE}."
";
+ $ret .= "";
+ $ret .= "";
+ $ret .= " ";
+ $ret .= "".$defs{$d}{STATE}."
";
+ $ret .= " ";
+ $ret .= "
";
+ $ret .= "
";
}
-
- return $ret;
-
+
+ return $ret;
}
sub BuildDashboardTopRow($$$$){
@@ -427,7 +476,6 @@ sub BuildButtonBar($$$){
if ($pos ne "hidden") {
$ret .= "
\n";
}
@@ -589,27 +637,6 @@ sub GetMaxColumnId($$) {
return $maxcolid;
}
-sub CheckInstallation($) {
- my ($hash) = @_;
-
- unless (-e $FW_dir."/pgm2/".$fwjquery) {
- Log3 $hash, 3, "[".$hash->{NAME}. " V".$dashboardversion."] Missing File ".$FW_dir."/pgm2/".$fwjquery;
- readingsSingleUpdate( $hash, "state", "Missing File, see LogFile for Details", 0 );
- }
- unless (-e $FW_dir."/pgm2/".$fwjqueryui) {
- Log3 $hash, 3, "[".$hash->{NAME}. " V".$dashboardversion."] Missing File ".$FW_dir."/pgm2/".$fwjqueryui;
- readingsSingleUpdate( $hash, "state", "Missing File, see LogFile for Details", 0 );
- }
- unless (-e $FW_dir."/pgm2/dashboard.js") {
- Log3 $hash, 3, "[".$hash->{NAME}. " V".$dashboardversion."] Missing File ".$FW_dir."/pgm2/dashboard.js";
- readingsSingleUpdate( $hash, "state", "Missing File, see LogFile for Details", 0 );
- }
- unless (-e $FW_icondir."/default/dashboardicons.png") {
- Log3 $hash, 3, "[".$hash->{NAME}. " V".$dashboardversion."] Missing File ".$FW_icondir."/default/dashboardicons.png";
- readingsSingleUpdate( $hash, "state", "Missing File, see LogFile for Details", 0 );
- }
-}
-
sub CheckDashboardEntry($) {
my ($hash) = @_;
my $now = time();
@@ -643,6 +670,12 @@ sub CheckDashboardAttributUssage($) { # replaces old disused attributes and thei
$tabgroups = AttrVal($defs{$d}{NAME}, "dashboard_tab5groups", "999");
if ($tabgroups eq "1" ) { FW_fC("deleteattr ".$d." dashboard_tab5groups"); }
# -------------------------------------------------------------------------------------------------
+
+ my $lockstate = AttrVal($defs{$d}{NAME}, "dashboard_lockstate", ""); # outdates 04.2014
+ if ($lockstate ne "") {
+ { FW_fC("deleteattr ".$d." dashboard_lockstate"); }
+ Log3 $hash, 3, "[".$hash->{NAME}. " V".$dashboardversion."]"." Using an outdated no longer used Attribute or Value. This has been corrected. Don't forget to save config. [dashboard_lockstate]";
+ }
}
sub CreateDashboardEntry($) {
@@ -657,16 +690,7 @@ sub CreateDashboardEntry($) {
foreach my $dn (sort keys %defs) {
if ($defs{$dn}{TYPE} eq "FHEMWEB" && $defs{$dn}{NAME} !~ /FHEMWEB:/) {
- my $hr = AttrVal($defs{$dn}{NAME}, "hiddenroom", "");
-
- #---------- Delete older Hiddenroom for Dashboard due changes in 01_FHEMWEB.pm (01.2014) ---------
- if (index($hr,$dashboardname) != -1 && index($hr,$dashboardhiddenroom) == -1) {
- $hr =~ s/$dashboardname/$dashboardhiddenroom/g;
- FW_fC("attr ".$defs{$dn}{NAME}." hiddenroom ".$hr);
- Log3 $hash, 3, "[".$hash->{NAME}. " V".$dashboardversion."]"." Corrected hiddenroom '".$dashboardname."' -> '".$dashboardhiddenroom."' in ".$defs{$dn}{NAME}.". Don't forget to save config.";
- }
- #-------------------------------------------------------------------------------------------------
-
+ my $hr = AttrVal($defs{$dn}{NAME}, "hiddenroom", "");
if (index($hr,$dashboardhiddenroom) == -1){
if ($hr eq "") {FW_fC("attr ".$defs{$dn}{NAME}." hiddenroom ".$dashboardhiddenroom);}
else {FW_fC("attr ".$defs{$dn}{NAME}." hiddenroom ".$hr.",".$dashboardhiddenroom);}
@@ -675,9 +699,10 @@ sub CreateDashboardEntry($) {
}
}
-}
-
-
+
+ #dashboard_lockstate
+
+}
1;
diff --git a/fhem/www/pgm2/dashboard.js b/fhem/www/pgm2/dashboard.js
index 8f5aa87e7..43094ba29 100644
--- a/fhem/www/pgm2/dashboard.js
+++ b/fhem/www/pgm2/dashboard.js
@@ -13,7 +13,7 @@
// 2.03: Fix showhelper Bug on lock/unlock. The error that after a trigger action the curren tab is changed to the "old" activetab tab has
// been fixed.
// 2.04: Dashboard position near Top in showfullsize-mode. Restore ActiveTab funktion
-// 2.04: dashboard_showfullsize not applied in room "all" resp. "Everything"
+// 2.05: Delete function for set lockstate
//
// Known Bugs/Todo's
// See 95_Dashboard.pm
@@ -142,21 +142,6 @@ function showdebugMessage(msg){
document.getElementById("dashboard_jsdebug").value = msg;
}
-function dashboard_tooglelock(){
- var params = (document.getElementById("dashboard_attr").value).split(","); //get current Configuration
- if (params[3] == "lock"){ //current state lock, do unlock
- params[3] = "unlock";
- $("#dashboard_button_lock").button( "option", "label", "Lock" );
- dashboard_unsetlock();
- } else { //current state unlock, set lock
- params[3] = "lock";
- $("#dashboard_button_lock").button( "option", "label", "Unlock" );
- dashboard_setlock();
- }
- document.getElementById("dashboard_attr").value = params;
- FW_cmd(document.location.pathname+'?XHR=1&cmd.'+params[0]+'=attr '+params[0]+' dashboard_lockstate '+params[3]);
-}
-
function dashboard_setlock(){
$("#dashboard_button_lock").prepend('
');
//############################################################
@@ -235,14 +220,12 @@ $(document).ready( function () {
//-------------------------------------------------------------------------------------------------------------------------------------
$("body").attr("longpollfilter", ".*") //need for longpoll
- if (params[13] == 1){ //disable roomlist and header, but not in room Everything
- if ($('#content').attr("room") != "all") {
- $("#menuScrollArea").remove();
- $("#hdr").remove();
- $(".roomoverview:first").remove();
- $("br:first").remove();
- $("#content").css({position: 'inherit'});
- }
+ if (params[13] == 1){ //disable roomlist and header
+ $("#menuScrollArea").remove();
+ $("#hdr").remove();
+ $(".roomoverview:first").remove();
+ $("br:first").remove();
+ $("#content").css({position: 'inherit'});
}
$(".dashboard_column").sortable({
@@ -305,7 +288,7 @@ $(document).ready( function () {
restoreOrder();
},
activate: function (event, ui) {
- restoreOrder();
+ restoreOrder();
}
});
if ($("#dashboard_tabnav").hasClass("dashboard_tabnav_bottom")) { $(".dashboard_tabnav").appendTo(".dashboard_tabs"); } //set Tabs on the Bottom
@@ -325,21 +308,8 @@ $(document).ready( function () {
}
});
- $("#dashboard_button_lock").button({
- create: function( event, ui ) {
- dashboard_modifyWidget();
- if (params[3] == "lock") {
- $(this).button( "option", "label", "Unlock" );
- dashboard_setlock();
- } else {
- $(this).button( "option", "label", "Lock" );
- dashboard_unsetlock();
- }
- }
- });
-
+ dashboard_modifyWidget();
+ if (params[3] == "lock") {dashboard_setlock();} else {dashboard_unsetlock();}
if (params[14] != "none" ) {$('').appendTo($('head')); }
}
-});
-
-
+});
\ No newline at end of file