@@ -3477,29 +3477,13 @@ define(['app'], function (app) {
3477
3477
if ( ( $scope . config . DashboardType == 2 ) || ( window . myglobals . ismobile == true ) ) {
3478
3478
var vname = item . Name ;
3479
3479
if ( typeof item . Counter != 'undefined' ) {
3480
- if ( item . Type == "RFXMeter" ) {
3481
- vname = '<img src="images/next.png" onclick="ShowCounterLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="16" width="16">' + " " + item . Name ;
3482
- }
3483
- else {
3484
- if ( ( item . Type == "P1 Smart Meter" ) && ( item . SubType == "Energy" ) ) {
3485
- vname = '<img src="images/next.png" onclick="ShowSmartLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="16" width="16">' + " " + item . Name ;
3486
- }
3487
- else if ( ( item . Type == "P1 Smart Meter" ) && ( item . SubType == "Gas" ) ) {
3488
- vname = '<img src="images/next.png" onclick="ShowCounterLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="16" width="16">' + " " + item . Name ;
3489
- }
3490
- else if ( ( item . Type == "YouLess Meter" ) && ( item . SwitchTypeVal == 0 || item . SwitchTypeVal == 4 ) ) {
3491
- vname = '<img src="images/next.png" onclick="ShowCounterLogSpline(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="16" width="16">' + " " + item . Name ;
3492
- }
3493
- else {
3494
- vname = '<img src="images/next.png" onclick="ShowCounterLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="16" width="16">' + " " + item . Name ;
3495
- }
3496
- }
3480
+ vname = '<a href="#/Devices/' + item . idx + '/Log"><img src="images/next.png" height="16" width="16">' + " " + item . Name + '</a>' ;
3497
3481
}
3498
3482
else if ( ( item . Type == "Current" ) || ( item . Type == "Current/Energy" ) ) {
3499
3483
vname = '<img src="images/next.png" onclick="ShowCurrentLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . displaytype + ');" height="16" width="16">' + " " + item . Name ;
3500
3484
}
3501
3485
else if ( ( item . Type == "Energy" ) || ( item . SubType == "kWh" ) || ( item . SubType == "Power" ) ) {
3502
- vname = '<img src="images/next.png" onclick="ShowCounterLogSpline(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="16" width="16">' + " " + item . Name ;
3486
+ vname = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/next.png" height="16" width="16">' + " " + item . Name + '</a>' ;
3503
3487
}
3504
3488
else if ( item . Type == "Air Quality" ) {
3505
3489
vname = '<img src="images/next.png" onclick="ShowAirQualityLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\');" height="16" width="16">' + " " + item . Name ;
@@ -3737,30 +3721,27 @@ define(['app'], function (app) {
3737
3721
if ( typeof item . Counter != 'undefined' ) {
3738
3722
if ( ( item . Type == "RFXMeter" ) || ( item . Type == "YouLess Meter" ) ) {
3739
3723
if ( item . SwitchTypeVal == 1 ) {
3740
- imagehtml += 'Gas48.png" class="lcursor" onclick="ShowCounterLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3724
+ imagehtml = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/Gas48.png" class="lcursor" height="40" width="40"></a ></td>\n' ;
3741
3725
}
3742
3726
else if ( item . SwitchTypeVal == 2 ) {
3743
- imagehtml += 'Water48_On.png" class="lcursor" onclick="ShowCounterLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3727
+ imagehtml = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/Water48_On.png" class="lcursor" height="40" width="40"></a ></td>\n' ;
3744
3728
}
3745
3729
else if ( item . SwitchTypeVal == 3 ) {
3746
- imagehtml += 'Counter48.png" class="lcursor" onclick="ShowCounterLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3730
+ imagehtml = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/Counter48.png.png" class="lcursor" height="40" width="40"></a ></td>\n' ;
3747
3731
}
3748
3732
else if ( item . SwitchTypeVal == 4 ) {
3749
- imagehtml += 'PV48.png" class="lcursor" onclick="ShowCounterLogSpline(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3733
+ imagehtml = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/PV48.png" class="lcursor" height="40" width="40"></a ></td>\n' ;
3750
3734
}
3751
3735
else {
3752
- imagehtml += 'Counter48.png" class="lcursor" onclick="ShowCounterLogSpline(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3736
+ imagehtml = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/Counter48.png" class="lcursor" height="40" width="40"></a ></td>\n' ;
3753
3737
}
3754
3738
}
3755
3739
else {
3756
- if ( ( item . Type == "P1 Smart Meter" ) && ( item . SubType == "Energy" ) ) {
3757
- imagehtml += 'Counter48.png" class="lcursor" onclick="ShowSmartLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3758
- }
3759
- else if ( ( item . Type == "P1 Smart Meter" ) && ( item . SubType == "Gas" ) ) {
3760
- imagehtml += 'Gas48.png" class="lcursor" onclick="ShowCounterLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3740
+ if ( ( item . Type == "P1 Smart Meter" ) && ( item . SubType == "Gas" ) ) {
3741
+ imagehtml = '<a href="#/Devices/' + item . idx + '/Log"><img src="images/Gas48.png" class="lcursor" height="40" width="40"></a></td>\n' ;
3761
3742
}
3762
3743
else {
3763
- imagehtml += 'Counter48.png" class="lcursor" onclick="ShowCounterLog(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3744
+ imagehtml = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/Counter48.png" class="lcursor" height="40" width="40"></a ></td>\n' ;
3764
3745
}
3765
3746
}
3766
3747
if (
@@ -3780,10 +3761,10 @@ define(['app'], function (app) {
3780
3761
}
3781
3762
else if ( ( item . Type == "Energy" ) || ( item . Type == "Power" ) || ( item . SubType == "kWh" ) ) {
3782
3763
if ( ( ( item . Type == "Energy" ) || ( item . Type == "Power" ) || ( item . SubType == "kWh" ) ) && ( item . SwitchTypeVal == 4 ) ) {
3783
- imagehtml += 'PV48.png" class="lcursor" onclick="ShowCounterLogSpline(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3764
+ imagehtml = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/PV48.png" class="lcursor" height="40" width="40"></a ></td>\n' ;
3784
3765
}
3785
3766
else {
3786
- imagehtml += 'current48.png" class="lcursor" onclick="ShowCounterLogSpline(\'#dashcontent\',\'ShowFavorites\',' + item . idx + ',\'' + escape ( item . Name ) + '\', ' + item . SwitchTypeVal + ');" height="40" width="40"></td>\n' ;
3767
+ imagehtml = '<a href="#/Devices/ ' + item . idx + '/Log"><img src="images/current48.png" class="lcursor" height="40" width="40"></a ></td>\n' ;
3787
3768
}
3788
3769
statushtml = "" ;
3789
3770
}
@@ -3841,7 +3822,7 @@ define(['app'], function (app) {
3841
3822
}
3842
3823
else if ( item . SubType == "Text" ) {
3843
3824
var logLink = '#/Devices/' + item . idx + '/Log' ;
3844
-
3825
+
3845
3826
imagehtml = '<a href="' + logLink + '"><img src="images/text48.png" class="lcursor" height="40" width="40"></a></td>\n' ;
3846
3827
statushtml = item . Data . replace ( / ( [ ^ > \r \n ] ? ) ( \r \n | \n \r | \r | \n ) / g, '$1<br />$2' ) ;
3847
3828
}
0 commit comments