All default.handlebars styles moved to CSS, added grid for fullscreen, screen scaling and menu position toggle
Jovan Strika committed
Apr 15, 2019 at 20:26 UTC
816b65f2172d45ea7587e19a2b46a1480541f5ef
3 files changed
+881
-407
public/styles/style.css
+462
-49
@@ -1,4 +1,9 @@
1
-body {
1
+
2
+html, body {
3
+ width: 100%;
4
+ height: 100%;
5
+}
6
+body {
7
margin: 0;
8
padding: 0;
9
border: 0;
@@ -6,7 +11,7 @@
11
font-size: 13px;
12
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
13
background-color: #d3d9d6;
9
- overflow-y: hidden;
14
+ /* overflow-y: hidden; */
15
}
16
17
#container {
@@ -21,22 +26,49 @@
26
border-left: 1px solid #b7b7b7;
27
padding: 0;
28
}
24
-
29
+ .fullscreen.menu_stack #container {
30
+ grid-template-rows: 66px 48px auto 45px;
31
+ grid-template-columns: 90px repeat(auto-fit, minmax(900px, 1fr));
32
+ grid-template-areas:
33
+ "header header"
34
+ "nav nav"
35
+ "content content"
36
+ "footer footer";
37
+ }
38
.fullscreen #container {
39
width: 100%;
27
- min-width: 700px;
40
+ min-width: 100%;
41
min-height: 0px;
42
border-right: 0px none #b7b7b7;
43
border-left: 0px none #b7b7b7;
31
- }
44
45
+ height: 100%;
46
+ position: relative;
47
+ display: grid;
48
+ grid-gap: 0px;
49
+ grid-template-areas:
50
+ "header header"
51
+ "sidebar nav"
52
+ "sidebar content"
53
+ "sidebar footer";
54
+ grid-template-columns: 90px auto;
55
+ grid-template-rows: 66px 24px auto 45px;
56
+ }
57
+
58
.fulldesk #container {
59
width: 100%;
60
+ height: 100%;
61
min-width: 700px;
62
min-height: 0px;
63
border-right: 0px none #b7b7b7;
64
border-left: 0px none #b7b7b7;
65
position: unset;
66
+ position: relative;
67
+ display: grid !important;
68
+ grid-gap: 0px;
69
+ grid-template-areas: "content"!important;
70
+ grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
71
+ grid-template-rows: repeat(auto-fit, minmax(100px, 1fr))!important;
72
}
73
74
#masthead {
@@ -57,6 +89,7 @@
89
90
.fullscreen #masthead {
91
width: 100%;
92
+ grid-area: header;
93
}
94
95
.fulldesk #masthead {
@@ -91,39 +124,23 @@
124
font-weight: bold;
125
}
126
94
-#page_content {
95
- max-height: calc(100vh - 108px);
96
-}
97
- .fullscreen #page_content {
98
- position: absolute;
99
- top: 66px;
100
- left: 90px;
101
- right: 0px;
102
- bottom: 0px;
103
- }
104
- .arg_hide #page_content {
105
- left: 0px;
106
- }
107
- .fulldesk #page_content {
108
- position: static;
109
- top: 0;
110
- left: 0;
111
- right: 0;
112
- bottom: 0;
113
- }
114
-
127
#page_leftbar {
128
height: calc(100vh - 66px);
129
width: 90px;
118
- position: absolute;
130
z-index: 1000;
131
background: #113962;
132
background: linear-gradient(to bottom, #104893 0%,#113962 100%);
133
color: white;
134
+ overflow-y: hidden;
135
+ display: none;
136
}
137
.fullscreen #page_leftbar {
138
+ grid-area: sidebar;
139
display: block;
140
}
141
+ .menu_stack #page_leftbar {
142
+ display: none;
143
+ }
144
.arg_hide #page_leftbar {
145
display: none;
146
}
@@ -131,6 +148,10 @@
148
display: none;
149
}
150
151
+#topbarmaster {
152
+ grid-area: nav;
153
+}
154
+
155
#topbar {
156
/* height: 24px; */
157
position: relative;
@@ -157,21 +178,41 @@
178
top: 3px;
179
right: 6px
180
}
181
+#toggle2 {
182
+ cursor: pointer;
183
+ color: white;
184
+ position: absolute;
185
+ top: 3px;
186
+ right: 26px;
187
+ display: none;
188
+}
189
+ .fullscreen #toggle2 {
190
+ display: block;
191
+ }
192
193
#MainMenuSpan, #MainSubMenu, #MeshSubMenu, #UserSubMenu, #ServerSubMenu, #UserDummyMenu {
194
width: 100%;
163
- height: 22px
195
+ height: 24px;
196
+ color: white;
197
+ background-color: #808080;
198
}
199
+ .menu_stack #UserDummyMenu {
200
+ display: none;
201
+ }
202
203
#MainMenuSpan {
204
display: table;
205
}
206
+
207
.fullscreen #MainMenuSpan {
208
display: none;
209
}
210
.fulldesk #MainMenuSpan {
211
display: none;
212
}
213
+ .menu_stack #MainMenuSpan {
214
+ display: block;
215
+ }
216
217
#column_l {
218
position: relative;
@@ -180,20 +221,20 @@
221
margin: 0;
222
padding: 0 15px;
223
background-color: #fff;
183
- /*max-height: calc(100vh - 111px);*/
224
+ /* max-height: calc(100vh - 151px); */
225
min-width: unset;
226
}
186
-.room4submenu {
187
- max-height: calc(100vh - 159px) !important;
188
-}
227
228
.fullscreen #column_l {
191
- height: calc(100vh - 135px);
192
- width: calc(100% - 30px);
229
+ grid-area: content;
230
+ width: unset;
231
+ /* height: calc(100vh - 111px);
232
+ width: calc(100% - 30px); */
233
overflow-y: auto;
234
}
235
236
.fulldesk #column_l {
237
+ height: 100%;
238
width: 100%;
239
height: unset;
240
margin-left: unset;
@@ -205,6 +246,10 @@
246
display: none;
247
}
248
249
+.room4submenu {
250
+ min-height: calc(100vh - 159px);
251
+}
252
+
253
#centralTable {
254
width: 100%;
255
}
@@ -254,6 +299,7 @@
299
}
300
301
#footer {
302
+ grid-area: footer;
303
clear: both;
304
overflow: auto;
305
width: 100%;
@@ -315,6 +361,12 @@
361
text-decoration: none;
362
}
363
364
+#verifyEmailId2 {
365
+ color:yellow;
366
+ margin-left:3px;
367
+ cursor:pointer;
368
+}
369
+
370
#dialog {
371
z-index: 1000;
372
background-color: #EEE;
@@ -332,6 +384,18 @@
384
background-color: #003366;
385
color: #FFF;
386
border-radius: 5px 5px 0 0;
387
+ margin-bottom: 6px;
388
+}
389
+
390
+#id_dialogclose {
391
+ float: right;
392
+ padding: 3px;
393
+ margin-right: 3px;
394
+ cursor: pointer;
395
+}
396
+
397
+#id_dialogtitle {
398
+ padding: 5px;
399
}
400
401
#dialogBody {
@@ -360,14 +424,62 @@
424
padding:10px;
425
}
426
363
-#dialog2, #dialog3 {
364
- margin: auto;
427
+#dialog2, #dialog3, #dialog7 {
428
margin: 3px;
429
}
430
431
+#d3uploadMode, #d3localFile {
432
+ float:right;
433
+ width:260px;
434
+}
435
+
436
+#d3serveraction {
437
+ width: 100%;
438
+ background-color: #d3d9d6;
439
+ text-align: left;
440
+ padding: 3px;
441
+}
442
+
443
+#d3serverfiles {
444
+ width: 100%;
445
+ height: 150px;
446
+ background-color: white;
447
+ padding: 2px;
448
+ border: 1px solid gray;
449
+ overflow-y: scroll;
450
+}
451
+
452
+
453
+#d7bitmapquality, #d7bitmapquality, #d7bitmapscaling, #d7framelimiter, #d7desktopmode {
454
+ float: right;
455
+ width: 200px;
456
+ height: 20px;
457
+}
458
+
459
+#dialog7 h4 {
460
+ width:100%;
461
+ border-bottom: 1px solid gray;
462
+}
463
+
464
+#d7meshkvm div, #d7amtkvm div, #d3upload, #d3localmode {
465
+ margin:3px 0 3px 0;
466
+ display: flex;
467
+ justify-content: space-between;
468
+}
469
+
470
+#d7otherset {
471
+ display: block;
472
+ border: 1px solid #666;
473
+ width: 200px;
474
+ height: 60px;
475
+ overflow-y: scroll;
476
+ background-color: white;
477
+}
478
+
479
#idx_dlgButtonBar {
480
padding: 10px;
370
- margin-bottom: 20px;
481
+ margin-bottom: 5px;
482
+ overflow: auto;
483
}
484
485
#idx_dlgCancelButton {
@@ -398,7 +510,7 @@
510
511
#idx_deskFullBtn2 {
512
float: left;
401
- font-size: large;
513
+ font-size: 16px;
514
cursor: pointer;
515
display: none;
516
}
@@ -543,6 +655,14 @@
655
font-size: 10px;
656
}
657
658
+#p2AccountActions .mL {
659
+ margin-left: 40px;
660
+}
661
+
662
+#p2ServerActions .mL {
663
+ margin-left: 40px;
664
+}
665
+
666
.newMeshBtn {
667
background: url(../images/icon-addnew.png) no-repeat 0px 0px;
668
height: 12px;
@@ -552,10 +672,14 @@
672
padding-left: 15px;
673
}
674
555
-#p2noMeshFound, #p2ServerActionsBackup, #p2ServerActionsRestore, #p2ServerActionsVersion, #p2ServerActionsErrors, #serverStats {
675
+#p2noMeshFound, #serverStats {
676
margin-left:40px;
677
}
678
679
+#p2ServerActionsBackup, #p2ServerActionsRestore, #p2ServerActionsVersion, #p2ServerActionsErrors {
680
+ margin-left:0px;
681
+}
682
+
683
.pTable {
684
width: 100%;
685
height: 24px;
@@ -580,7 +704,7 @@
704
}
705
706
#p3events {
583
- height: calc(100vh - 243px);
707
+ height: calc(100vh - 270px);
708
overflow-y: scroll
709
}
710
@@ -599,6 +723,10 @@
723
width: 230px;
724
}
725
726
+#p5toolbar {
727
+ width: 100%;
728
+}
729
+
730
#p5filehead {
731
width: 100%;
732
background-color: #d3d9d6;
@@ -618,7 +746,7 @@
746
747
#p5filetable {
748
width: 100%;
621
- height: calc(100vh - 294px);
749
+ height: calc(100vh - 219px);
750
overflow: auto;
751
-webkit-user-select: none;
752
position: relative;
@@ -631,6 +759,9 @@
759
-webkit-user-select: none;
760
background-color: lightsteelblue;
761
}
762
+ #p5PublicShare div {
763
+ padding: 4px;
764
+ }
765
766
#bigok {
767
width: 256px;
@@ -655,7 +786,7 @@
786
}
787
788
.chartViewCanvas {
658
- width: 60px;
789
+ width: 80px;
790
display: inline-block;
791
}
792
@@ -723,6 +854,14 @@
854
font-size: x-small;
855
}
856
857
+#dp10devicevalue {
858
+ width: 230px;
859
+}
860
+
861
+.fulldesk #p11 {
862
+ height: 100%;
863
+}
864
+
865
#MainComputerImage {
866
border-width: 0px;
867
height: 200px;
@@ -763,7 +902,6 @@
902
top: 0;
903
right: 0;
904
border-left: 2px solid lightgray;
766
- display: none;
905
}
906
#DeskToolsRefreshButton {
907
float: right;
@@ -774,6 +912,7 @@
912
a {
913
color: #036;
914
text-decoration: underline;
915
+ cursor: pointer;
916
}
917
918
.i1 {
@@ -1046,7 +1185,7 @@ a {
1185
}
1186
1187
.style7 {
1049
- font-size: large;
1188
+ font-size: 22px;
1189
background-color: #FFFFFF;
1190
width: 180px;
1191
}
@@ -1071,11 +1210,20 @@ a {
1210
background-color: #D3D9D6;
1211
}
1212
1213
+.pTable .style14 {
1214
+ float: left;
1215
+}
1216
+
1217
.auto-style1 {
1218
text-align: right;
1219
background-color: #D3D9D6;
1220
}
1221
1222
+#pTable .auto-style1 {
1223
+ height: 100%;
1224
+ float: right;
1225
+}
1226
+
1227
.icon2 {
1228
float: left;
1229
margin: 7px;
@@ -1215,7 +1363,7 @@ a {
1363
.h1 {
1364
background-position: 0% 0%;
1365
width: 14px;
1218
- height: 100%;
1366
+ height: 24px;
1367
/* fallback (Opera) */
1368
/* Mozilla: */
1369
/* Chrome, Safari:*/
@@ -1229,13 +1377,13 @@ a {
1377
height: 100%;
1378
width: 20px;
1379
float: right;
1232
- background-color: #ffffff
1380
+ background-color: #ffffff;
1381
}
1382
1383
.h2 {
1384
background-position: 0% 0%;
1385
width: 14px;
1238
- height: 100%;
1386
+ height: 24px;
1387
/* fallback (Opera) */
1388
/* Mozilla: */
1389
/* Chrome, Safari:*/
@@ -1433,13 +1581,107 @@ a {
1581
padding: 4px
1582
}
1583
1584
+
1585
+.deskareaicon {
1586
+ cursor: pointer;
1587
+ border: none;
1588
+ float: right;
1589
+ font-size: 130%;
1590
+ margin-right: 4px;
1591
+}
1592
+
1593
+.areaHead {
1594
+ padding-top: 2px;
1595
+ padding-bottom: 2px;
1596
+ background: #C0C0C0;
1597
+}
1598
+
1599
+.areaProgress {
1600
+ background-color: gray;
1601
+}
1602
+
1603
+.areaProgress div {
1604
+ height: 2px;
1605
+ width: 0%;
1606
+ background-color:red;
1607
+}
1608
+
1609
+.areaFoot {
1610
+ padding-top: 2px;
1611
+ padding-bottom: 2px;
1612
+ background: #C0C0C0;
1613
+}
1614
+
1615
+.toright2 {
1616
+ float: right;
1617
+ text-align: right;
1618
+ padding-right: 4px;
1619
+}
1620
+
1621
+#deskarea0 {
1622
+ width: 100%;
1623
+ padding: 0px;
1624
+ padding: 0px;
1625
+ margin-top: 0px;
1626
+}
1627
+
1628
+ .fulldesk #deskarea0 {
1629
+ min-width: 100%;
1630
+ min-height: 0px;
1631
+ height: 100%;
1632
+ position: relative;
1633
+ display: grid;
1634
+ grid-gap: 0px;
1635
+ grid-template-areas:
1636
+ "deskarea1"
1637
+ "deskarea2"
1638
+ "deskarea3"
1639
+ "deskarea4";
1640
+ /* grid-template-columns: 90px auto; */
1641
+ grid-template-rows: 24px max-content auto max-content;
1642
+ }
1643
+
1644
+ #deskarea0 .mR {
1645
+ margin-right: 3px;
1646
+ }
1647
+
1648
+#deskarea1 {
1649
+ grid-area: deskarea1;
1650
+}
1651
+
1652
+
1653
+#deskarea2 {
1654
+ grid-area: deskarea2;
1655
+ background-color: gray;
1656
+}
1657
+
1658
+#progressbar {
1659
+ height:2px;
1660
+ width:0%;
1661
+ background-color:red;
1662
+}
1663
+
1664
#deskarea3x {
1665
background: black;
1666
text-align: center;
1667
position: relative;
1668
overflow: hidden;
1669
+ width: 100%;
1670
+ max-height: calc(100vh - 292px); /* + 24px hight of submenu */
1671
+ height: calc(100vh - 292px);
1672
}
1673
1674
+ .room4submenu #deskarea3x {
1675
+ max-height: calc(100vh - 292px);
1676
+ height: calc(100vh - 292px);
1677
+ }
1678
+
1679
+ .fulldesk #deskarea3x {
1680
+ grid-area: deskarea3;
1681
+ max-height: none;
1682
+ height: unset;
1683
+ }
1684
+
1685
#DeskFocus {
1686
overflow: hidden;
1687
color: transparent;
@@ -1449,7 +1691,13 @@ a {
1691
}
1692
1693
#DeskParent {
1452
- overflow:hidden
1694
+ margin: 0;
1695
+ overflow:hidden;
1696
+ height: 100%;
1697
+ width: 100%;
1698
+ position: absolute;
1699
+ right: 0;
1700
+ top: 0;
1701
}
1702
1703
#Desk {
@@ -1459,7 +1707,6 @@ a {
1707
margin-left: 0px;
1708
}
1709
1462
-
1710
#deskToolsBar {
1711
position: absolute;
1712
padding: 3px;
@@ -1471,6 +1718,27 @@ a {
1718
cursor: pointer;
1719
}
1720
1721
+#deskToolsArea {
1722
+ position: absolute;
1723
+ top: 26px;
1724
+ left: 4px;
1725
+ right: 4px;
1726
+ bottom: 4px;
1727
+ background-color: lightgray;
1728
+ text-align: left;
1729
+}
1730
+
1731
+#deskToolsHeader {
1732
+ border-bottom: 1px solid darkgray;
1733
+ padding: 3px;
1734
+}
1735
+
1736
+#deskToolsHeader .colmn1 {
1737
+ width: 50px;
1738
+ padding-right: 5px;
1739
+ float: left;
1740
+}
1741
+
1742
#DeskToolsProcesses {
1743
overflow-y: scroll;
1744
position: absolute;
@@ -1486,6 +1754,20 @@ a {
1754
background-color: #EFE8B6;
1755
}
1756
1757
+#deskarea4 {
1758
+ grid-area: deskarea4;
1759
+}
1760
+
1761
+#DeskChatButton, #DeskNotifyButton, #DeskOpenWebButton {
1762
+ float: right;
1763
+ margin-top: 1px;
1764
+ margin-right: 4px;
1765
+ cursor: pointer;
1766
+}
1767
+
1768
+#DeskClip, #DeskControlSpan, #specialkeylist {
1769
+ margin-left:6px;
1770
+}
1771
1772
.userTableHeader {
1773
border-bottom: 1pt solid lightgray;
@@ -1493,6 +1775,137 @@ a {
1775
padding-bottom: 4px;
1776
}
1777
1778
+#deskkeys {
1779
+ margin-left: 6px;
1780
+}
1781
+
1782
+#p12BackButton {
1783
+ float: left;
1784
+}
1785
+
1786
+#termTable {
1787
+ width: 100%;
1788
+ padding: 0px;
1789
+ padding: 0px;
1790
+ margin-top: 0px;
1791
+}
1792
+
1793
+#termarea3x {
1794
+ background: black;
1795
+ text-align: center;
1796
+ height: 500px;
1797
+ position: relative;
1798
+}
1799
+
1800
+#Term {
1801
+ background: black;
1802
+ margin: 0;
1803
+ padding: 0;
1804
+}
1805
+
1806
+#p13toolbar {
1807
+ width: 100%
1808
+}
1809
+#p13toolbar .areaHead {
1810
+ border-bottom: 2px solid black;
1811
+}
1812
+
1813
+#p13toolbar .areaHead2 {
1814
+ width: 100%;
1815
+ background-color: #d3d9d6;
1816
+ text-align: left;
1817
+ padding: 4px;
1818
+}
1819
+
1820
+#p13toolbar .areaHead3 {
1821
+ background-color:#E4E9E7;
1822
+ height:28px;
1823
+}
1824
+
1825
+#p13filetable {
1826
+ width: 100%;
1827
+ height: calc(100vh - 346px);
1828
+ overflow: auto;
1829
+ -webkit-user-select: none;
1830
+}
1831
+
1832
+#p13bigok {
1833
+ width: 256px;
1834
+ overflow: hidden;
1835
+ position: absolute;
1836
+ left: 337px;
1837
+ top: 200px;
1838
+ text-align: center;
1839
+ font-size: 1600%;
1840
+ color: #AAAAAA;
1841
+}
1842
+
1843
+#p13bigfail {
1844
+ width: 256px;
1845
+ overflow: hidden;
1846
+ position: absolute;
1847
+ left: 337px;
1848
+ top: 200px;
1849
+ text-align: center;
1850
+ font-size: 1600%;
1851
+ color: #AAAAAA;
1852
+}
1853
+
1854
+#p14iframe {
1855
+ width: 100%;
1856
+ height: calc(100vh - 242px);
1857
+ border: 0;
1858
+ overflow: hidden;
1859
+}
1860
+
1861
+#p13toolbarBottom, #p13toolbar {
1862
+ width: 100%;
1863
+}
1864
+
1865
+#consoleTable {
1866
+ width: 100%;
1867
+ padding: 0px;
1868
+ padding: 0px;
1869
+ margin-top: 0px;
1870
+}
1871
+
1872
+#p15agentConsole {
1873
+ background: black;
1874
+ margin: 0;
1875
+ padding: 0;
1876
+ color: lightgray;
1877
+ width: 100%;
1878
+ height: calc(100vh - 296px);
1879
+ max-height: 500px;
1880
+ position: relative;
1881
+}
1882
+
1883
+#p15coreName {
1884
+ padding: 4px;
1885
+ display: inline-block;
1886
+}
1887
+
1888
+#p15agentConsoleText {
1889
+ position: absolute;
1890
+ margin: 0;
1891
+ padding: 0;
1892
+ top: 0;
1893
+ bottom: 0;
1894
+ left: 0;
1895
+ right: 0;
1896
+ overflow-y: scroll;
1897
+ overflow-x: auto;
1898
+}
1899
+
1900
+#p16events, #p31events {
1901
+ max-height: calc(100vh - 269px);
1902
+ overflow-y: auto;
1903
+}
1904
+
1905
+#p40 {
1906
+ height:calc(100vh - 191px)
1907
+}
1908
+
1909
.viewSelector {
1910
width:32px;
1911
height:32px;
views/default.handlebars
+417
-355
@@ -53,7 +53,6 @@
53
<!-- main page -->
54
<div id=container>
55
<div id="notifiyBox" class="notifiyBox" style="display:none"></div>
56
- <div id=mastheadx></div>
56
<div id=masthead class=noselect>
57
<div class="title">{{{title}}}</div>
58
<div class="title2">{{{title2}}}</div>
@@ -73,22 +72,23 @@
72
<div id=LeftMenuMyEvents class="lbbutton" title="My Events" onclick=go(3)>
73
<div class="lb3"></div>
74
</div>
76
- <div id=LeftMenuMyFiles class="lbbutton" title="My Files" onclick=go(5)>
75
+ <div id=LeftMenuMyFiles class="lbbutton" style="display:none" title="My Files" onclick=go(5)>
76
<div class="lb4"></div>
77
</div>
79
- <div id=LeftMenuMyUsers class="lbbutton" title="My Users" onclick=go(4)>
78
+ <div id=LeftMenuMyUsers class="lbbutton" style="display:none" title="My Users" onclick=go(4)>
79
<div class="lb5"></div>
80
</div>
82
- <div id=LeftMenuMyServer class="lbbutton" title="My Server" onclick=go(6) style="display:none">
81
+ <div id=LeftMenuMyServer class="lbbutton" style="display:none" title="My Server" onclick=go(6) style="display:none">
82
<div class="lb6"></div>
83
</div>
84
</div>
86
- <div id="page_content">
85
+ {{!-- <div id="page_content"> --}}
86
<div id=topbarmaster>
87
<div id=topbar class=noselect>
88
<div>
89
<div style="position:relative">
90
<div id=toggle title="Toggle full width" onclick="toggleFullScreen(1)">↔</div>
91
+ <div id=toggle2 title="Toggle Main Menu position" onclick="toggleStackMenu(1)">↕</div>
92
<table id=MainMenuSpan cellpadding=0 cellspacing=0 class=style1>
93
<tr>
94
<td id=MainMenuMyDevices class="topbar_td style3x" onclick=go(1)>My Devices</td>
@@ -221,7 +221,8 @@
221
<img src="images/info.png" />
222
</td>
223
<td>
224
- To get started, <a onclick=account_createMesh() ><strong>click here to create a device group</strong></a>.
224
+ <div id="getStarted1">To get started, <a onclick=account_createMesh()><strong>click here to create a device group</strong></a>.</div>
225
+ <div id="getStarted2">No device groups.</div>
226
</td>
227
</tr>
228
</table>
@@ -252,7 +253,7 @@
253
</div>
254
<div id="p2AccountActions">
255
<p><strong>Account actions</strong></p>
255
- <p style="margin-left:40px">
256
+ <p class="mL">
257
<span id="verifyEmailId" style="display:none"><a onclick="account_showVerifyEmail()">Verify email</a><br /></span>
258
<a onclick="account_showChangeEmail()">Change email address</a><br />
259
<a onclick="account_showChangePassword()">Change password</a><span id="p2nextPasswordUpdateTime"></span><br />
@@ -261,19 +262,19 @@
262
<br style=clear:both />
263
</div>
264
<strong>Device Groups</strong>
264
- ( <a onclick=account_createMesh() class="newMeshBtn"> New</a> )
265
+ <span id="p2createMeshLink1">( <a onclick=account_createMesh() class="newMeshBtn"> New</a> )</span>
266
<br /><br />
267
<div id=p2meshes></div>
267
- <div id=p2noMeshFound style="display:none">No device groups. <a onclick=account_createMesh()><strong>Get started here!</strong></a></div>
268
+ <div id=p2noMeshFound style="display:none">No device groups.<span id="p2createMeshLink2"> <a onclick=account_createMesh()><strong>Get started here!</strong></a></span></div>
269
<br style=clear:both />
270
</div>
271
<div id=p3 style="display:none">
272
<h1>My Events</h1>
273
<table class="pTable">
274
<tr>
274
- <td class=h1></td>
275
- <td> <input id=p2deleteall type=button onclick=showDeleteAllEventsDialog() style="display:none" value="Delete All..." /></td>
276
- <td class=auto-style1>
275
+ <td class="h1"></td>
276
+ <td> <input id="p2deleteall" type=button onclick=showDeleteAllEventsDialog() style="display:none" value="Delete All..." /></td>
277
+ <td class="auto-style1">
278
Show
279
<select id=p3limitdropdown onchange=refreshEvents()>
280
<option value=60>Last 60</option>
@@ -283,7 +284,7 @@
284
<option value=1000>Last 1000</option>
285
</select>
286
</td>
286
- <td class=h2></td>
287
+ <td class="h2"></td>
288
</tr>
289
</table>
290
<div id=p3events style=""></div>
@@ -292,8 +293,8 @@
293
<h1>My Users</h1>
294
<table class="pTable">
295
<tr>
295
- <td class=h1></td>
296
- <td class=style14>
296
+ <td class="h1"></td>
297
+ <td class="style14">
298
<div style="float:right">
299
<input type=button onclick=showUserBroadcastDialog() style=margin-right:6px value="Broadcast" />
300
</div>
@@ -302,14 +303,14 @@
303
<input id=UserSearchInput type=text style=width:120px;margin-left:6px placeholder=Filter onchange=onUserSearchInputChanged() onkeyup=onUserSearchInputChanged() autocomplete=off onfocus=onUserSearchFocus(1) onblur=onUserSearchFocus(0) />
304
</div>
305
</td>
305
- <td class=h2></td>
306
+ <td class="h2"></td>
307
</tr>
308
</table>
309
<div id="p3users"></div>
310
</div>
311
<div id=p5 style="display:none">
312
<h1>My Files</h1>
312
- <table id="p5toolbar" style="width:100%" cellpadding="0" cellspacing="0">
313
+ <table id="p5toolbar" cellpadding="0" cellspacing="0">
314
<tr>
315
<td id="p5filehead" valign=bottom>
316
<div id="p5rightOfButtons"></div>
@@ -350,7 +351,7 @@
351
<input type=submit id=p5fileCatchAllSubmit style="display:none" />
352
</form>
353
-->
353
- <div id="p5PublicShare" style=""><div style="padding:4px">These files are shared publicly, click "link" to get public url.</div></div>
354
+ <div id="p5PublicShare" style=""><div>These files are shared publicly, click "link" to get public url.</div></div>
355
<div id="bigok" style="display:none"><b>✓</b></div>
356
<div id="bigfail" style="display:none"><b>✗</b></div>
357
<span id="p5files"></span>
@@ -362,13 +363,15 @@
363
<div id=p6 style="display:none">
364
<img id=MainMeshImage src="serverpic.ashx">
365
<h1>My Server</h1>
365
- <p id="p2ServerActions"><strong>Server actions</strong></p>
366
- <p style="margin-left:40px">
367
- <div id="p2ServerActionsBackup"><a href="/backup.zip" rel="noreferrer noopener" target="_blank">Download server backup</a></div>
368
- <div id="p2ServerActionsRestore"><a onclick="server_showRestoreDlg()">Restore server with backup</a></div>
369
- <div id="p2ServerActionsVersion"><a onclick="server_showVersionDlg()">Check server version</a></div>
370
- <div id="p2ServerActionsErrors"><a onclick="server_showErrorsDlg()">Show server error log</a></div>
371
- </p>
366
+ <div id="p2ServerActions">
367
+ <p><strong>Server actions</strong></p>
368
+ <div class="mL">
369
+ <div id="p2ServerActionsBackup"><a href="/backup.zip" rel="noreferrer noopener" target="_blank">Download server backup</a></div>
370
+ <div id="p2ServerActionsRestore"><a onclick="server_showRestoreDlg()">Restore server with backup</a></div>
371
+ <div id="p2ServerActionsVersion"><a onclick="server_showVersionDlg()">Check server version</a></div>
372
+ <div id="p2ServerActionsErrors"><a onclick="server_showErrorsDlg()">Show server error log</a></div>
373
+ </div>
374
+ </div>
375
<br /><strong>Server Statistics</strong><br /><br />
376
<div id="serverStats">
377
<div id="serverCpuChartView" style="display:none">
@@ -418,81 +421,77 @@
421
<div class="icon2"></div>
422
<div class="warningbox">Remote computer is not powered on, click here to issue a power command.</div>
423
</div>
421
- <table id=deskarea0 cellpadding=0 cellspacing=0 style="width:100%;padding:0px;padding:0px;margin-top:0px">
422
- <tr id=deskarea1>
423
- <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0">
424
- <div style="float:right;text-align:right">
425
- <span id="p14power"></span>
426
- <div style='cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px' title="Rotate Left" onclick="drotate(-1)">↺</div>
427
- <div style='cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px' title="Rotate Right" onclick="drotate(1)">↻</div>
428
- <input id="deskFocusBtn" type="button" title="Toggle focus mode, when active only the region around the mouse is updated" onkeypress="return false" onkeydown="return false" value="Focus All" onclick="deskToggleFocus()" style="margin-right:3px;display:none">
429
- <input id="deskSaveBtn" type="button" title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value="Save..." onclick=deskSaveImage() style=margin-right:3px>
430
- <input id="deskActionsBtn" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() style=margin-right:3px />
431
- <input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" style="margin-right:3px">
432
- <input type="button" title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick="showPowerActionDlg()" style="margin-right:3px;display:none">
433
- </div>
434
- <div>
435
- <div id="idx_deskFullBtn2" onclick=deskToggleFull(event)> ✖</div>
436
- <input type="button" id="autoconnectbutton1" value="AutoConnect" onclick=autoConnectDesktop(event) onkeypress="return false" onkeydown="return false" style="display:none">
437
- <span id=connectbutton1span> <input type=button id=connectbutton1 value="Connect" onclick=connectDesktop(event,1) onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
438
- <span id=connectbutton1hspan> <input type=button id=connectbutton1h value="HW Connect" onclick=connectDesktop(event,2) onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
439
- <span id=disconnectbutton1span> <input type=button id=disconnectbutton1 value="Disconnect" onclick=connectDesktop(event,0) onkeypress="return false" onkeydown="return false"></span>
440
- <span id="deskstatus">Disconnected</span>
441
- </div>
442
- </td>
443
- </tr>
444
- <tr id=deskarea2>
445
- <td>
446
- <div style=background-color:gray><div id=progressbar style=height:2px;width:0%;background-color:red></div></div>
447
- </td>
448
- </tr>
449
- <tr id=deskarea3>
450
- <td id=deskarea3x style="">
451
- <div id=DeskFocus oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></div>
452
- <div id=DeskParent>
453
- <canvas id=Desk width=640 height=480 oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas>
454
- </div>
455
- <div id=DeskTools>
456
- <a id=DeskToolsRefreshButton style="" onclick="refreshDeskTools()">Refresh</a>
457
- <div id=DeskToolsBar>Processes</div>
458
- <div style="position:absolute;top:26px;left:4px;right:4px;bottom:4px;background-color:lightgray;text-align:left">
459
- <div style="border-bottom:1px solid darkgray;padding:3px"><a style=width:50px;padding-right:5px;float:left;cursor:pointer title="Sort by process id" onclick=sortProcess(0)>PID</a><a style=cursor:pointer title="Sort by name" onclick=sortProcess(1)>Name</a></div>
460
- <div id="DeskToolsProcesses" style=""></div>
461
- </div>
462
- </div>
463
- </td>
464
- </tr>
465
- <tr id=deskarea4>
466
- <td style=padding-top:2px;padding-bottom:2px;background:#C0C0C0>
467
- <div style=float:right;text-align:right>
468
- <select id=termdisplays style="display:none" onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>
469
- <input id=DeskToolsButton type=button value=Tools title="Toggle tools view" onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()">
470
- <span id=DeskChatButton style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Open chat window to this computer"><img src='images/icon-chat.png' onclick=deviceChat() height=16 width=16 style=padding-top:2px /></span>
471
- <span id=DeskNotifyButton style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Display a notification on the remote computer"><img src='images/icon-notify.png' onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px /></span>
472
- <span id=DeskOpenWebButton style="float:right;margin-top:1px;margin-right:4px;cursor:pointer" title="Open a web address on remote computer"><img src='images/icon-url2.png' onclick=deviceUrlFunction() height=16 width=16 style=padding-top:2px /></span>
473
- </div>
474
- <div>
475
- <select style="margin-left:6px" id="deskkeys">
476
- <option value=5>Win</option>
477
- <option value=0>Win+Down</option>
478
- <option value=1>Win+Up</option>
479
- <option value=2>Win+L</option>
480
- <option value=3>Win+M</option>
481
- <option value=4>Shift+Win+M</option>
482
- <option value=6>Win+R</option>
483
- </select>
484
- <input id="DeskWD" type=button value="Send" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()">
485
- <input id="DeskClip" style="margin-left:6px;display:none" type="button" value="Clipboard" onkeypress="return false" onkeydown="return false" onclick="showDeskClip()">
486
- <input id="DeskCAD" type="button" value="Ctrl-Alt-Del" onkeypress="return false" onkeydown="return false" onclick="sendCAD()">
487
- <label><span id="DeskControlSpan" style="margin-left:6px" title="Toggle mouse and keyboard input"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false" onclick="toggleKvmControl()">Input</span></label>
424
+
425
+ <div id=deskarea0 cellpadding=0 cellspacing=0>
426
+ <div id=deskarea1 class="areaHead">
427
+ <div class="toright2">
428
+ <span id="p14power"></span>
429
+ <div class='deskareaicon' title="Toggle Aspect Ratio" onclick="toggleAspectRatio(1)">⇲</div>
430
+ <div class='deskareaicon' title="Rotate Left" onclick="drotate(-1)">↺</div>
431
+ <div class='deskareaicon' title="Rotate Right" onclick="drotate(1)">↻</div>
432
+ <input id="deskFocusBtn" type="button" title="Toggle focus mode, when active only the region around the mouse is updated" onkeypress="return false" onkeydown="return false" value="Focus All" onclick="deskToggleFocus()" style="margin-right:3px;display:none">
433
+ <input id="deskSaveBtn" type="button" title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value="Save..." onclick=deskSaveImage() class="mR">
434
+ <input id="deskActionsBtn" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() class="mR" />
435
+ <input id="deskActionsSettings" type="button" value="Settings..." title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick="showDesktopSettings()" class="mR">
436
+ <input type="button" title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick="showPowerActionDlg()" style="display:none">
437
+ </div>
438
+ <div>
439
+ <div id="idx_deskFullBtn2" onclick=deskToggleFull(event)> ✖</div>
440
+ <input type="button" id="autoconnectbutton1" value="AutoConnect" onclick=autoConnectDesktop(event) onkeypress="return false" onkeydown="return false" style="display:none">
441
+ <span id=connectbutton1span> <input type=button id=connectbutton1 value="Connect" onclick=connectDesktop(event,1) onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
442
+ <span id=connectbutton1hspan> <input type=button id=connectbutton1h value="HW Connect" onclick=connectDesktop(event,2) onkeypress="return false" onkeydown="return false" disabled="disabled"></span>
443
+ <span id=disconnectbutton1span> <input type=button id=disconnectbutton1 value="Disconnect" onclick=connectDesktop(event,0) onkeypress="return false" onkeydown="return false"></span>
444
+ <span id="deskstatus">Disconnected</span>
445
+ </div>
446
+ </div>
447
+ <div id=deskarea2 style="">
448
+ <div class="areaProgress"><div id="progressbar" style=""></div></div>
449
+ </div>
450
+ <div id=deskarea3x>
451
+ <div id=DeskFocus oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></div>
452
+ <div id=DeskParent>
453
+ <canvas id=Desk width=640 height=480 oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel=dmousewheel(event)></canvas>
454
+ </div>
455
+ <div id=DeskTools>
456
+ <a id=DeskToolsRefreshButton style="" onclick="refreshDeskTools()">Refresh</a>
457
+ <div id=DeskToolsBar>Processes</div>
458
+ <div id=deskToolsArea>
459
+ <div id=deskToolsHeader>
460
+ <a class="colmn1" title="Sort by process id" onclick=sortProcess(0)>PID</a>
461
+ <a class="colmn2" title="Sort by name" onclick=sortProcess(1)>Name</a></div>
462
+ <div id="DeskToolsProcesses" style=""></div>
463
</div>
489
- </td>
490
- </tr>
491
- </table>
464
+ </div>
465
+ </div>
466
+ <div id=deskarea4 class="areaFoot">
467
+ <div class="toright2">
468
+ <select id=termdisplays style="display:none" onchange=deskSetDisplay(event) onclick=deskGetDisplayNumbers(event)></select>
469
+ <input id=DeskToolsButton type=button value=Tools title="Toggle tools view" onkeypress="return false" onkeydown="return false" onclick="toggleDeskTools()">
470
+ <span id=DeskChatButton class="deskarea" title="Open chat window to this computer"><img src='images/icon-chat.png' onclick=deviceChat() height=16 width=16 style=padding-top:2px /></span>
471
+ <span id=DeskNotifyButton title="Display a notification on the remote computer"><img src='images/icon-notify.png' onclick=deviceToastFunction() height=16 width=16 style=padding-top:2px /></span>
472
+ <span id=DeskOpenWebButton title="Open a web address on remote computer"><img src='images/icon-url2.png' onclick=deviceUrlFunction() height=16 width=16 style=padding-top:2px /></span>
473
+ </div>
474
+ <div>
475
+ <select id="deskkeys">
476
+ <option value=5>Win</option>
477
+ <option value=0>Win+Down</option>
478
+ <option value=1>Win+Up</option>
479
+ <option value=2>Win+L</option>
480
+ <option value=3>Win+M</option>
481
+ <option value=4>Shift+Win+M</option>
482
+ <option value=6>Win+R</option>
483
+ </select>
484
+ <input id="DeskWD" type=button value="Send" onkeypress="return false" onkeydown="return false" onclick="deskSendKeys()">
485
+ <input id="DeskClip" style="" type="button" value="Clipboard" onkeypress="return false" onkeydown="return false" onclick="showDeskClip()">
486
+ <input id="DeskCAD" type="button" value="Ctrl-Alt-Del" onkeypress="return false" onkeydown="return false" onclick="sendCAD()">
487
+ <label><span id="DeskControlSpan" title="Toggle mouse and keyboard input"><input id="DeskControl" type="checkbox" onkeypress="return false" onkeydown="return false" onclick="toggleKvmControl()">Input</span></label>
488
+ </div>
489
+ </div>
490
+ </div>
491
</div>
492
<div id=p12 style="display:none">
493
<div id="p12title">
495
- <div id="p12BackButton" style="float:left"><div class="backButton" onclick=goBack() title="Back"><div class="backButtonEx"></div></div></div>
494
+ <div id="p12BackButton"><div class="backButton" onclick=goBack() title="Back"><div class="backButtonEx"></div></div></div>
495
<h1>Terminal - <span id=p12deviceName></span></h1>
496
</div>
497
<div id="p12warning" onclick=showFeaturesDlg()>
@@ -503,11 +502,11 @@
502
<div class="icon2"></div>
503
<div class="warningbox">Remote computer is not powered on, click here to issue a power command.</div>
504
</div>
506
- <table cellpadding=0 cellspacing=0 style="width:100%;padding:0px;padding:0px;margin-top:0px">
505
+ <table id=termTable cellpadding=0 cellspacing=0>
506
<tr>
508
- <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0">
509
- <div style="float:right;text-align:right">
510
- <input id="termActionsBtn" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() style=margin-right:3px />
507
+ <td class="areaHead">
508
+ <div class="toright2">
509
+ <input id="termActionsBtn" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction()/>
510
</div>
511
<div>
512
<input type="button" id="autoconnectbutton2" value="AutoConnect" onclick=autoConnectTerminal(event) onkeypress="return false" onkeydown="return false" style="display:none">
@@ -520,23 +519,23 @@
519
</tr>
520
<tr>
521
<td>
523
- <div style="background-color:gray"><div id="termprogressbar" style="height:2px;width:0%;background-color:red"></div></div>
522
+ <div class="areaProgress"><div id="termprogressbar" style=""></div></div>
523
</td>
524
</tr>
525
<tr>
527
- <td style="background:black;text-align:center;height:500px;position:relative">
528
- <pre id="Term" style="background:black;margin:0;padding:0"></pre>
526
+ <td id="termarea3x">
527
+ <pre id="Term"></pre>
528
</td>
529
</tr>
530
<tr>
532
- <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0">
533
- <div style="float:right;text-align:right">
531
+ <td class="areaFoot">
532
+ <div class="toright2">
533
<span id="terminalSettingsButtons" style="display:none">
534
<input id="id_tcrbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="CR+LF" title="Toggle what the return key will send" onclick="termToggleCr()">
535
<input id="id_tfxkeysbutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx()">
536
<input id="id_ttypebutton" type="button" onkeypress="return false" onkeydown="return false" class="bottombutton" value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType()">
537
</span>
539
- <select id="specialkeylist" onkeypress="return false" style="margin-left:5px"></select>
538
+ <select id="specialkeylist" onkeypress="return false"></select>
539
<input id="specialkeylistinput" type="button" onkeypress="return false" class="bottombutton" value="Send" title="Send the selected special key" onclick="sendSpecialKey()" />
540
</div>
541
<div>
@@ -556,11 +555,11 @@
555
<div id="p13BackButton" style="float:left"><div class="backButton" onclick=goBack() title="Back"><div class="backButtonEx"></div></div></div>
556
<h1>Files - <span id=p13deviceName></span></h1>
557
</div>
559
- <table id="p13toolbar" style="width: 100%" cellpadding="0" cellspacing="0">
558
+ <table id="p13toolbar" cellpadding="0" cellspacing="0">
559
<tr>
561
- <td style="background-color:#C0C0C0;border-bottom:2px solid black;padding:2px">
562
- <div style="float:right;text-align:right">
563
- <input id="filesActionsBtn" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() style=margin-right:3px />
560
+ <td class="areaHead">
561
+ <div class="toright2">
562
+ <input id="filesActionsBtn" type=button title="Perform power actions on the device" onkeypress="return false" onkeydown="return false" value=Actions onclick=deviceActionFunction() />
563
</div>
564
<div>
565
<input id=p13AutoConnect value="AutoConnect" onclick=autoConnectFiles(event) onkeypress="return false" onkeydown="return false" type="button" style="display:none">
@@ -570,8 +569,8 @@
569
</td>
570
</tr>
571
<tr>
573
- <td style="width:100%;background-color:#d3d9d6;text-align:left;padding:4px" valign=bottom>
574
- <div id="p13rightOfButtons" style="float:right;margin-top:3px"></div>
572
+ <td class="areaHead2" valign=bottom>
573
+ <div id="p13rightOfButtons" class="toright2"></div>
574
<div>
575
<input type=button id=p13FolderUp disabled="disabled" onclick="p13folderup()" value="Up" />
576
<input type=button id=p13SelectAllButton disabled="disabled" onclick="p13selectallfile()" value="Select All" onkeypress="return false" onkeydown="return false" />
@@ -587,8 +586,8 @@
586
</td>
587
</tr>
588
<tr>
590
- <td style="background-color:#E4E9E7;height:28px">
591
- <div style=float:right>
589
+ <td class="areaHead3">
590
+ <div class="toright2">
591
<select id=p13sortdropdown onchange=p13updateFiles()>
592
<option value=1 selected="selected">Sort by name</option>
593
<option value=2>Sort by size</option>
@@ -602,12 +601,12 @@
601
</td>
602
</tr>
603
</table>
605
- <div id="p13filetable" style="width:100%;height:calc(100vh - 346px);overflow:auto;-webkit-user-select:none">
606
- <div id="p13bigok" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>✓</b></div>
607
- <div id="p13bigfail" style="width:256px;overflow:hidden;position:absolute;left:337px;top:200px;text-align:center;font-size:1600%;color:#AAAAAA;display:none"><b>✗</b></div>
604
+ <div id="p13filetable" style="">
605
+ <div id="p13bigok" style="display:none"><b>✓</b></div>
606
+ <div id="p13bigfail" style="display:none"><b>✗</b></div>
607
<span id="p13files"></span>
608
</div>
610
- <table id="p13toolbarBottom" style=width:100% cellpadding=0 cellspacing=0>
609
+ <table id="p13toolbarBottom" cellpadding=0 cellspacing=0>
610
<tr><td class=style6> <span id="p13bottomstatus"></span></td></tr>
611
</table>
612
</div>
@@ -616,18 +615,18 @@
615
<div id="p14BackButton" style="float:left"><div class="backButton" onclick=goBack() title="Back"><div class="backButtonEx"></div></div></div>
616
<h1>Intel® AMT - <span id=p14deviceName></span></h1>
617
</div>
619
- <iframe id=p14iframe style="width:100%;height:calc(100vh - 242px);border:0;overflow:hidden" src="/commander.htm"></iframe>
618
+ <iframe id=p14iframe src="/commander.htm"></iframe>
619
</div>
620
<div id=p15 style="display:none">
621
<div id="p15title">
622
<div id="p15BackButton" style="float:left"><div class="backButton" onclick=goBack() title="Back"><div class="backButtonEx"></div></div></div>
623
<h1><span id=p15deviceName></span></h1>
624
</div>
626
- <table cellpadding=0 cellspacing=0 style="width:100%;padding:0px;padding:0px;margin-top:0px">
625
+ <table id="consoleTable" cellpadding=0 cellspacing=0>
626
<tr>
628
- <td style=background:#C0C0C0>
629
- <div style=float:right;padding-right:4px>
630
- <div style=padding:4px;display:inline-block id=p15coreName title="Information about current core running on this agent"></div>
627
+ <td class="areaHead">
628
+ <div class="toright2">
629
+ <div id=p15coreName title="Information about current core running on this agent"></div>
630
<input type=button id=p15uploadCore value="Agent Action" onclick=p15uploadCore(event) title="Change the agent Java Script code module" />
631
</div>
632
<div id="p15statetext" style=padding:4px></div>
@@ -635,16 +634,16 @@
634
</tr>
635
<tr>
636
<td>
638
- <div style="background-color:gray"><div id="consoleprogressbar" style="height:2px;width:0%;background-color:red"></div></div>
637
+ <div class="areaProgress"><div id="consoleprogressbar" style=""></div></div>
638
</td>
639
</tr>
640
<tr>
642
- <td id=p15agentConsole style="background:black;margin:0;padding:0;color:lightgray;width:100%;height:calc(100vh - 296px);max-height:500px;position:relative">
643
- <pre id=p15agentConsoleText style="position:absolute;margin:0;padding:0;top:0;bottom:0;left:0;right:0;overflow-y:scroll;overflow-x:auto"></pre>
641
+ <td id=p15agentConsole>
642
+ <pre id=p15agentConsoleText></pre>
643
</td>
644
</tr>
645
<tr>
647
- <td style="padding-top:2px;padding-bottom:2px;background:#C0C0C0">
646
+ <td class="areaFoot">
647
<table style="width:100%">
648
<tr>
649
<td style="width:99%">
@@ -663,25 +662,24 @@
662
<div id="p16BackButton" style="float:left"><div class="backButton" onclick=goBack() title="Back"><div class="backButtonEx"></div></div></div>
663
<h1>Events - <span id=p16deviceName></span></h1>
664
</div>
666
- <div style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px">
667
- <div class="h1pre"> </div>
668
- <div class="h1" style="float:left"> </div>
669
- <!--<div class=style14 style=height:100%;float:left> <input id=p31deleteall type=button style="display:none" value="Delete All..." /> </div>-->
670
- <div class="style14" style="float:left"> <input type=button value=Refresh onclick=refreshDeviceEvents() /> </div>
671
- <div class="auto-style1" style="height:100%;float:right">
672
- Show
673
- <select id=p16limitdropdown onchange=refreshDeviceEvents()>
674
- <option value=60>Last 60</option>
675
- <option value=120>Last 120</option>
676
- <option value=250>Last 250</option>
677
- <option value=500>Last 500</option>
678
- <option value=1000>Last 1000</option>
679
- </select>
680
- <div class="h2end"></div>
681
- <div class="h2" style="height:100%;float:right"> </div>
682
- </div>
683
- </div>
684
- <div id=p16events style="max-height:calc(100vh - 267px);overflow-y:auto"></div>
665
+ <table class="pTable">
666
+ <tr>
667
+ <td class="h1"></td>
668
+ <td> <input type=button onclick=refreshDeviceEvents() value="Refresh" /></td>
669
+ <td class="auto-style1">
670
+ Show
671
+ <select id=p16limitdropdown onchange=refreshDeviceEvents()>
672
+ <option value=60>Last 60</option>
673
+ <option value=120>Last 120</option>
674
+ <option value=250>Last 250</option>
675
+ <option value=500>Last 500</option>
676
+ <option value=1000>Last 1000</option>
677
+ </select>
678
+ </td>
679
+ <td class="h2"></td>
680
+ </tr>
681
+ </table>
682
+ <div id=p16events></div>
683
</div>
684
<div id=p20 style="display:none">
685
<picture id=MainMeshImage style=border-width:0px;height:200px;width:200px;float:right>
@@ -718,30 +716,29 @@
716
<div id=p31 style="display:none">
717
<div style="float:left"><div class="backButton" onclick=goBack() title="Back"><div class="backButtonEx"></div></div></div>
718
<h1>Events - <span id=p31userName></span></h1>
721
- <div style="width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px">
722
- <div class="h1pre"> </div>
723
- <div class="h1" style="height:100%;float:left"> </div>
724
- <!--<div class=style14 style=float:left> <input id=p31deleteall type=button style="display:none" value="Delete All..." /> </div>-->
725
- <div class="style14" style="float:left"> <input type=button value=Refresh onclick=refreshUsersEvents() /> </div>
726
- <div class="auto-style1" style="height:100%;float:right">
727
- Show
728
- <select id=p31limitdropdown onchange=refreshUsersEvents()>
729
- <option value=60>Last 60</option>
730
- <option value=120>Last 120</option>
731
- <option value=250>Last 250</option>
732
- <option value=500>Last 500</option>
733
- <option value=1000>Last 1000</option>
734
- </select>
735
- <div class="h2end"></div>
736
- <div class="h2" style="height:100%;float:right;"> </div>
737
- </div>
738
- </div>
739
- <div id=p31events style="max-height:calc(100vh - 267px);overflow-y:scroll"></div>
719
+ <table class="pTable">
720
+ <tr>
721
+ <td class="h1"></td>
722
+ <td> <input type=button onclick=refreshUsersEvents() value="Refresh" /></td>
723
+ <td class="auto-style1">
724
+ Show
725
+ <select id=p31limitdropdown onchange=refreshUsersEvents()>
726
+ <option value=60>Last 60</option>
727
+ <option value=120>Last 120</option>
728
+ <option value=250>Last 250</option>
729
+ <option value=500>Last 500</option>
730
+ <option value=1000>Last 1000</option>
731
+ </select>
732
+ </td>
733
+ <td class="h2"></td>
734
+ </tr>
735
+ </table>
736
+ <div id=p31events></div>
737
</div>
741
- <div id=p40 style="display:none;height:calc(100vh - 170px)">
738
+ <div id=p40 style="display:none;">
739
<h1>My Server Stats</h1>
743
- <div style=width:100%;height:24px;background-color:#d3d9d6;margin-bottom:4px>
744
- <div style="float:right">
740
+ <div class="areaHead">
741
+ <div class="toright2">
742
<select id=p40type onchange=updateServerTimelineStats()>
743
<option value=0>Connections</option>
744
<option value=1>Memory</option>
@@ -751,7 +748,7 @@
748
<option value=8>Last 8 hours</option>
749
<option value=24>Last day</option>
750
<option value=168>Last week</option>
754
- <option value=5040>Last 30 days</option>
751
+ <option value=720>Last 30 days</option>
752
</select>
753
<img src=images/link4.png height=10 width=10 title="Download data points (.csv)" style=cursor:pointer onclick=p40downloadEvents()>
754
</div>
@@ -764,24 +761,17 @@
761
</div>
762
<br id="column_l_bottomgap" />
763
</div>
767
- <div id=footer class=noselect>
768
- <table cellpadding=0 cellspacing=10 style="width:100%">
769
- <tr>
770
- <td style="text-align:left;color:white">
771
- {{{footer}}}
772
- </td>
773
- <td style="text-align:right">
774
- <a id="verifyEmailId2" style="color:yellow;margin-left:3px;cursor:pointer;display:none" onclick="account_showVerifyEmail()">Verify Email</a>
775
- <a style="margin-left:3px" href="terms">Terms & Privacy</a>
776
- </td>
777
- </tr>
778
- </table>
764
+ <div id="footer">
765
+ <div class="footer1">{{{footer}}}</div>
766
+ <div class="footer2">
767
+ <a id="verifyEmailId2" style="display:none" onclick="account_showVerifyEmail()">Verify Email</a>
768
+ <a href=terms>Terms & Privacy</a>
769
+ </div>
770
</div>
771
<div id=dialog style="display:none">
772
<div id=dialogHeader>
782
- <div id=id_dialogclose style=float:right;padding:3px;margin-right:3px;cursor:pointer onclick=setDialogMode()>✖</div>
783
- <div id=id_dialogtitle style=padding:5px></div>
784
- <div style=width:100%;margin:6px></div>
773
+ <div id=id_dialogclose onclick=setDialogMode()>✖</div>
774
+ <div id=id_dialogtitle></div>
775
</div>
776
<div id=dialogBody>
777
<div id=dialog1>
@@ -791,38 +781,38 @@
781
<div id=id_dialogOptions></div>
782
</div>
783
<div id=dialog3 style="">
794
- <div style=height:26px>
795
- <select id=d3uploadMode style=float:right;width:260px onchange=d3modechange()>
784
+ <div id=d3upload>
785
+ <div>File Selection</div>
786
+ <select id=d3uploadMode onchange=d3modechange()>
787
<option value=1>Local file upload</option>
788
<option value=2>Server file selection</option>
789
</select>
799
- <div>File Selection</div>
790
</div>
801
- <div id=d3localmode style=height:26px;display:none>
791
+ <div id=d3localmode style="display:none">
792
+ <div>Upload File</div>
793
<form id=d3localmodeform method=post enctype=multipart/form-data action=uploadfile.ashx target=fileUploadFrame>
794
<input type=text id=d3attrib name=attrib style="display:none" />
804
- <input type=file id=d3localFile name=files style=float:right;width:260px onchange=d3setActions() />
795
+ <input type=file id=d3localFile name=files onchange=d3setActions() />
796
<input type=submit id=d3submit style="display:none" />
797
</form>
807
- <div>Upload File</div>
798
</div>
799
<div id=d3servermode>
810
- <div style="width:100%;background-color:#d3d9d6;text-align:left;padding:3px" valign=bottom>
800
+ <div id=d3serveraction valign=bottom>
801
<input type=button id=p3FolderUp disabled="disabled" onclick=d3folderup() value="Up" />
802
</div>
813
- <div id=d3serverfiles style="width:100%;height:150px;background-color:white;padding:2px;border:1px solid gray;overflow-y:scroll"></div>
803
+ <div id=d3serverfiles></div>
804
</div>
805
</div>
816
- <div id=dialog7 style="margin:auto;margin:3px">
817
-
806
+ <div id=dialog7 style="">
807
<div id="d7meshkvm">
819
- <h4 style="width:100%;border-bottom:1px solid gray">Agent Remote Desktop</h4>
820
- <div style="margin:3px 0 3px 0">
821
- <select id="d7bitmapquality" style="float:right;width:200px;height:20px" dir="rtl"></select>
822
- <div style="height:20px">Quality</div>
808
+ <h4>Agent Remote Desktop</h4>
809
+ <div>
810
+ <div>Quality</div>
811
+ <select id="d7bitmapquality" dir="rtl"></select>
812
</div>
824
- <div style="margin:3px 0 3px 0">
825
- <select id="d7bitmapscaling" style="float:right;width:200px;height:20px" dir="rtl">
813
+ <div>
814
+ <div>Scaling</div>
815
+ <select id="d7bitmapscaling" style="" dir="rtl">
816
<option selected=selected value=1024>100%</option>
817
<option value=896>87.5%</option>
818
<option value=768>75%</option>
@@ -832,51 +822,50 @@
822
<option value=256>25%</option>
823
<option value=128>12.5%</option>
824
</select>
835
- <div style="height:20px">Scaling</div>
825
</div>
837
- <div style="margin:3px 0 3px 0">
838
- <select id="d7framelimiter" style="float:right;width:200px;height:20px" dir="rtl">
826
+ <div>
827
+ <div>Frame rate</div>
828
+ <select id="d7framelimiter" dir="rtl">
829
<option selected=selected value=50>Fast</option>
830
<option value=100>Medium</option>
831
<option value=400>Slow</option>
832
<option value=1000>Very slow</option>
833
</select>
844
- <div style="height:20px">Frame rate</div>
834
</div>
835
</div>
836
<div id="d7amtkvm">
848
- <h4 style="width:100%;border-bottom:1px solid gray">Intel® AMT Hardware KVM</h4>
849
- <div style='height:26px'>
850
- <select id="d7desktopmode" style="float:right;width:200px">
837
+ <h4>Intel® AMT Hardware KVM</h4>
838
+ <div>
839
+ <div>Image Encoding</div>
840
+ <select id="d7desktopmode">
841
<option value="1">RLE8, Fastest</option>
842
<option value="2">RLE16, Recommended</option>
843
<option value="3">RAW8, Slow</option>
844
<option value="4">RAW16, Very Slow</option>
845
</select>
856
- <div>Image Encoding</div>
846
</div>
858
- <div style="height:60px">
859
- <div style="float:right;border:1px solid #666;width:200px;height:60px;overflow-y:scroll;background-color:white">
847
+ <div>
848
+ <div>Other Settings</div>
849
+ <div id="d7otherset">
850
<label><input type="checkbox" id='d7showfocus'>Show Focus Tool<br></label>
851
<label><input type="checkbox" id='d7showcursor'>Show Local Mouse Cursor<br></label>
852
<label><input type="checkbox" id='d7localKeyMap'>Local Keyboard Map<br></label>
853
</div>
864
- <div>Other Settings</div>
854
</div>
855
</div>
856
</div>
857
</div>
869
- <div id="idx_dlgButtonBar" style="padding:10px;margin-bottom:4px">
858
+ <div id="idx_dlgButtonBar">
859
<input id="idx_dlgCancelButton" type="button" value="Cancel" style="" onclick="dialogclose(0)">
860
<input id="idx_dlgOkButton" type="button" value="OK" style="" onclick="dialogclose(1)">
872
- <div style="height:25px"><input id=idx_dlgDeleteButton type=button value=Delete style="display:none" onclick="dialogclose(2)"></div>
861
+ <div><input id=idx_dlgDeleteButton type=button value=Delete style="display:none" onclick="dialogclose(2)"></div>
862
</div>
863
</div>
864
<iframe name="fileUploadFrame" style="display:none"></iframe>
865
<form style="display:none" method=post action=uploadfile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p5fileDragName name="name"><input id=p5fileDragSize name="size"><input id=p5fileDragType name="type"><input id=p5fileDragData name="data"><input id=p5fileDragLink name="link"><input type=submit id=p5loginSubmit2 style="display:none" /></form>
866
<form style="display:none" method=post action=uploadnodefile.ashx enctype=multipart/form-data target=fileUploadFrame><input id=p13fileDragName name="name"><input id=p13fileDragSize name="size"><input id=p13fileDragType name="type"><input id=p13fileDragData name="data"><input id=p13fileDragLink name="link"><input type=submit id=p13loginSubmit2 style="display:none" /></form>
867
<audio id="chimes"><source src="sounds/chimes.mp3" type="audio/mp3"></audio>
879
- </div>
868
+ {{!-- </div> --}}
869
</div>
870
<script type="text/javascript">
871
'use strict';
@@ -904,6 +893,7 @@
893
var desktop;
894
var desktopsettings = { encoding: 2, showfocus: false, showmouse: true, showcad: true, quality: 40, scaling: 1024, framerate: 50, localkeymap: false };
895
var multidesktopsettings = { quality: 20, scaling: 128, framerate: 1000 };
896
+ var deskAspectRatio = getstore('deskAspectRatio', false);
897
var terminal;
898
var files;
899
var debugLevel = parseInt("{{{debuglevel}}}");
@@ -925,6 +915,10 @@
915
if (webPageFullScreen == 'true') { webPageFullScreen = true; }
916
var passRequirements = "{{{passRequirements}}}";
917
if (passRequirements != "") { passRequirements = JSON.parse(decodeURIComponent(passRequirements)); }
918
+
919
+ var webPageStackMenu = getstore('webPageStackMenu', false);
920
+ if (webPageStackMenu == true || webPageStackMenu == 'true') { webPageStackMenu = true } else { webPageStackMenu = false };
921
+ toggleStackMenu(0)
922
923
function startup() {
924
if ((features & 32) == 0) {
@@ -1038,55 +1032,46 @@
1032
setupServerTimelineStats();
1033
}
1034
1035
+ // Toggle the web page to full screen
1036
+ function toggleAspectRatio(toggle) {
1037
+ if (toggle === 1) { deskAspectRatio = !deskAspectRatio; putstore('deskAspectRatio', deskAspectRatio); }
1038
+ deskAdjust()
1039
+ }
1040
+
1041
+ // If FullScreen, toggle menu to be horisontal or vertical
1042
+ function toggleStackMenu(toggle) {
1043
+ if (webPageFullScreen == true) {
1044
+ if (toggle === 1) {
1045
+ webPageStackMenu = !webPageStackMenu;
1046
+ putstore('webPageStackMenu', webPageStackMenu);
1047
+ }
1048
+ if (webPageStackMenu == false) {
1049
+ QC('body').remove("menu_stack");
1050
+ } else {
1051
+ QC('body').add("menu_stack");
1052
+ if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
1053
+ }
1054
+ deskAdjust();
1055
+ }
1056
+ }
1057
+
1058
// Toggle the web page to full screen
1059
function toggleFullScreen(toggle) {
1060
if (toggle === 1) { webPageFullScreen = !webPageFullScreen; putstore('webPageFullScreen', webPageFullScreen); }
1061
var hide = 0;
1062
if (args.hide) { hide = parseInt(args.hide); }
1046
- console.log("-----------hide:", hide)
1063
if (webPageFullScreen == false) {
1064
QC('body').remove("fullscreen");
1065
QC('body').remove("arg_hide");
1050
- /* QS('container').width = '960px';
1051
- QS('container')['border-right'] = '1px solid #b7b7b7';
1052
- QS('container')['border-left'] = '1px solid #b7b7b7';
1053
- QS('container')['min-width'] = '960px';
1054
- QS('container')['overflow'] = '';
1055
- QS('column_l').width = '930px';
1056
- QS('column_l').height = '';
1057
- QS('column_l')['margin-left'] = '';
1058
- QS('column_l')["overflow-y"] = '';
1059
- QS('column_l')["max-height"] = (xxcurrentView >= 10) ? 'calc(100vh - 159px)' : 'calc(100vh - 135px)';
1060
- QS('container').position = '';
1061
- QS('page_content').position = '';
1062
- QV('MainMenuSpan', true); */
1066
+ if (xxcurrentView >= 10) QC('column_l').add('room4submenu');
1067
QV('UserDummyMenuSpan', false);
1064
- QV('page_leftbar', false);
1068
+ //QV('page_leftbar', false);
1069
} else {
1070
QC('body').add("fullscreen");
1067
- if (hide & 16) QC('body').add("arg_hide");
1068
- /* QS('container').position = 'absolute';
1069
- QS('container').width = '100%';
1070
- QS('container').top = '0px';
1071
- QS('container').bottom = '0px';
1072
- QS('container')['border-right'] = '0';
1073
- QS('container')['border-left'] = '0';
1074
- QS('container')['min-width'] = '700px';
1075
- QS('container')['overflow'] = 'hidden';
1076
- QS('page_content').position = 'absolute';
1077
- QS('page_content').top = '66px';
1078
- QS('page_content').left = (hide & 16)?'0px':'90px';
1079
- QS('page_content').right = '0px';
1080
- QS('page_content').bottom = '0px';
1081
- QS('column_l').height = 'calc(100vh - 135px)';
1082
- QS('column_l').width = 'calc(100% - 30px)';
1083
- QS('column_l')["overflow-y"] = 'auto';
1084
- QS('column_l')["max-height"] = 'calc(100vh - 135px)';
1085
- QV('MainMenuSpan', false); */
1071
+ if (hide & 16) QC('body').add("arg_hide"); // This is replacement for QV('page_leftbar', !(hide & 16));
1072
+ if (xxcurrentView >= 10) QC('column_l').remove('room4submenu');
1073
QV('UserDummyMenuSpan', (xxcurrentView < 10) && webPageFullScreen);
1087
- QV('page_leftbar', !(hide & 16));
1074
}
1089
- //center();
1075
masterUpdate(512);
1076
QV('body', true);
1077
}
@@ -1218,6 +1203,13 @@
1203
QV('authCodesSetupCheck', userinfo.otpkeys > 0);
1204
masterUpdate(4 + 128);
1205
1206
+ // If we can't create new groups, hide all links that can do that.
1207
+ var newGroupsAllowed = ((userinfo.siteadmin == 0xFFFFFFFF) || ((userinfo.siteadmin & 64) == 0));
1208
+ QV('p2createMeshLink1', newGroupsAllowed);
1209
+ QV('p2createMeshLink2', newGroupsAllowed);
1210
+ QV('getStarted1', newGroupsAllowed);
1211
+ QV('getStarted2', !newGroupsAllowed);
1212
+
1213
if (typeof userinfo.passchange == 'number') {
1214
if (userinfo.passchange == -1) { QH('p2nextPasswordUpdateTime', ' - Reset on next login.'); }
1215
else if ((passRequirements != null) && (typeof passRequirements.reset == 'number')) {
@@ -1620,7 +1612,7 @@
1612
}
1613
case 'createmesh': {
1614
// A new mesh was created
1623
- if (message.event.links['user/' + domain + '/' + userinfo.name.toLowerCase()] != null) { // Check if this is a mesh create for a mesh we own. If site administrator, we get all messages so need to ignore some.
1615
+ if (message.event.links[userinfo._id] != null) { // Check if this is a mesh create for a mesh we own. If site administrator, we get all messages so need to ignore some.
1616
meshes[message.event.meshid] = { _id: message.event.meshid, name: message.event.name, mtype: message.event.mtype, desc: message.event.desc, links: message.event.links };
1617
masterUpdate(4 + 128);
1618
meshserver.send({ action: 'files' });
@@ -1638,11 +1630,12 @@
1630
if (message.event.name) { meshes[message.event.meshid].name = message.event.name; }
1631
if (message.event.desc) { meshes[message.event.meshid].desc = message.event.desc; }
1632
if (message.event.flags != null) { meshes[message.event.meshid].flags = message.event.flags; }
1633
+ if (message.event.consent != null) { meshes[message.event.meshid].consent = message.event.consent; }
1634
if (message.event.links) { meshes[message.event.meshid].links = message.event.links; }
1635
if (message.event.amt) { meshes[message.event.meshid].amt = message.event.amt; }
1636
1637
// Check if we lost rights to this mesh in this change.
1645
- if (meshes[message.event.meshid].links['user/' + domain + '/' + userinfo.name.toLowerCase()] == null) {
1638
+ if (meshes[message.event.meshid].links[userinfo._id] == null) {
1639
if ((xxcurrentView == 20) && (currentMesh == meshes[message.event.meshid])) go(2);
1640
delete meshes[message.event.meshid];
1641
@@ -1656,7 +1649,7 @@
1649
}
1650
}
1651
masterUpdate(4 + 128);
1659
- if (currentNode && (currentNode.meshid == message.event.meshid)) { refreshDevice(currentNode._id); }
1652
+ if (currentNode && (currentNode.meshid == message.event.meshid)) { currentNode = null; if ((xxcurrentView >= 10) && (xxcurrentView < 20)) { go(1); } }
1653
//meshserver.send({ action: 'files' }); // TODO: Why do we need to do this??
1654
1655
// If we are looking at a mesh that is now deleted, move back to "My Account"
@@ -1924,7 +1917,7 @@
1917
// Check what keys we are allows to send
1918
if (currentNode != null) {
1919
var mesh = meshes[currentNode.meshid];
1927
- var meshrights = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
1920
+ var meshrights = mesh.links[userinfo._id].rights;
1921
var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
1922
if (inputAllowed == false) return false;
1923
var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
@@ -1983,7 +1976,7 @@
1976
// Check what keys we are allows to send
1977
if (currentNode != null) {
1978
var mesh = meshes[currentNode.meshid];
1986
- var meshrights = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
1979
+ var meshrights = mesh.links[userinfo._id].rights;
1980
var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
1981
if (inputAllowed == false) return false;
1982
var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
@@ -2017,7 +2010,7 @@
2010
// Check what keys we are allows to send
2011
if (currentNode != null) {
2012
var mesh = meshes[currentNode.meshid];
2020
- var meshrights = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
2013
+ var meshrights = mesh.links[userinfo._id].rights;
2014
var inputAllowed = ((meshrights == 0xFFFFFFFF) || (((meshrights & 8) != 0) && ((meshrights & 256) == 0)));
2015
if (inputAllowed == false) return false;
2016
var limitedInputAllowed = ((meshrights != 0xFFFFFFFF) && (((meshrights & 8) != 0) && ((meshrights & 256) == 0) && ((meshrights & 4096) != 0)));
@@ -2116,7 +2109,7 @@
2109
for (var i in nodes) {
2110
var node = nodes[i];
2111
if (node.v == false) continue;
2119
- var mesh2 = meshes[node.meshid], meshlinks = mesh2.links['user/' + domain + '/' + userinfo.name.toLowerCase()];
2112
+ var mesh2 = meshes[node.meshid], meshlinks = mesh2.links[userinfo._id];
2113
if (meshlinks == null) continue;
2114
var meshrights = meshlinks.rights;
2115
if ((view == 3) && (mesh2.mtype == 1)) continue;
@@ -2234,7 +2227,7 @@
2227
// Display all empty meshes, we need to do this because users can add devices to these at any time.
2228
if ((sort == 0) && (Q('SearchInput').value == '') && (view < 3)) {
2229
for (var i in meshes) {
2237
- var mesh = meshes[i], meshlink = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()];
2230
+ var mesh = meshes[i], meshlink = mesh.links[userinfo._id];
2231
if (meshlink != null) {
2232
var meshrights = meshlink.rights;
2233
if (displayedMeshes[mesh._id] == null) {
@@ -2314,7 +2307,7 @@
2307
multiDesktop[id] = desktop;
2308
desktop = desktopNode = currentNode = null;
2309
// Setup a replacement desktop
2317
- QH('DeskParent', '<canvas id="Desk" width="640" height="480" style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');
2310
+ QH('DeskParent', '<canvas id="Desk" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');
2311
} else {
2312
// This is a new device, create a canvas for it.
2313
var c = document.createElement('canvas');
@@ -2347,7 +2340,7 @@
2340
}
2341
2342
function toggleKvmDevice(nodeid) {
2350
- var node = getNodeFromId(nodeid), mesh = meshes[node.meshid], meshrights = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
2343
+ var node = getNodeFromId(nodeid), mesh = meshes[node.meshid], meshrights = mesh.links[userinfo._id].rights;
2344
if ((meshrights & 8) || (meshrights & 256)) { // Requires remote control rights or desktop view only rights
2345
//var conn = 0;
2346
//if ((node.conn & 1) != 0) { conn = 1; } else if ((node.conn & 6) != 0) { conn = 2; } // Check what type of connect we can do (Agent vs AMT)
@@ -2884,7 +2877,7 @@
2877
var nodeid = contextelement.children[1].attributes.onclick.value;
2878
var node = getNodeFromId(nodeid.substring(12, nodeid.length - 18));
2879
var mesh = meshes[node.meshid];
2887
- var meshlinks = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()];
2880
+ var meshlinks = mesh.links[userinfo._id];
2881
var meshrights = meshlinks.rights;
2882
var consoleRights = ((meshrights & 16) != 0);
2883
@@ -3548,7 +3541,7 @@
3541
3542
function getNodeRights(nodeid) {
3543
var node = getNodeFromId(nodeid), mesh = meshes[node.meshid];
3551
- return mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
3544
+ return mesh.links[userinfo._id].rights;
3545
}
3546
3547
var currentNode;
@@ -3559,8 +3552,10 @@
3552
function getCurrentNode() { return currentNode; };
3553
function gotoDevice(nodeid, panel, refresh, event) {
3554
3562
- // Check if we are allowed to create a new device group
3563
- if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "New Device Group", 1, null, "Unable to create a new device group until a email address is verified. This is required for password recovery. Go to the \"My Account\" tab to change and verify an email address."); return; }
3555
+ // Remind the user to verify the email address
3556
+ if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Account Security", 1, null, "Unable to access a device until a email address is verified. This is required for password recovery. Go to the \"My Account\" tab to change and verify an email address."); return; }
3557
+ // Remind the user to add two factor authentication
3558
+ if ((features & 0x00040000) && !((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0) || (userinfo.otpkeys > 0))) { setDialogMode(2, "Account Security", 1, null, "Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the \"My Account\" tab and look at the \"Account Security\" section."); return; }
3559
3560
if (event && (event.shiftKey == true)) {
3561
// Open the device in a different tab
@@ -3571,7 +3566,7 @@
3566
//disconnectAllKvmFunction();
3567
var node = getNodeFromId(nodeid);
3568
var mesh = meshes[node.meshid];
3574
- var meshrights = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
3569
+ var meshrights = mesh.links[userinfo._id].rights;
3570
if (!currentNode || currentNode._id != node._id || refresh == true) {
3571
currentNode = node;
3572
@@ -3787,7 +3782,7 @@
3782
refreshDeviceEvents();
3783
3784
// Update the web page title
3790
- if ((currentNode) && (xxcurrentView >= 10) && (xxcurrentView < 20)) { document.title = '{{{title}}} - ' + currentNode.name; } else { document.title = '{{{title}}}'; }
3785
+ if ((currentNode) && (xxcurrentView >= 10) && (xxcurrentView < 20)) { document.title = decodeURIComponent("{{{extitle}}}") + ' - ' + currentNode.name; } else { document.title = decodeURIComponent("{{{extitle}}}"); }
3786
}
3787
setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching.
3788
if (!panel) panel = 10;
@@ -3830,7 +3825,7 @@
3825
3826
function deviceActionFunction() {
3827
if (xxdialogMode) return;
3833
- var meshrights = meshes[currentNode.meshid].links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
3828
+ var meshrights = meshes[currentNode.meshid].links[userinfo._id].rights;
3829
var x = "Select an operation to perform on this device.<br /><br />";
3830
var y = '<select id=d2deviceop style=float:right;width:250px>';
3831
if ((meshrights & 64) != 0) { y += '<option value=100>Wake-up</option>'; } // Wake-up permission
@@ -3987,7 +3982,7 @@
3982
// List all available alternative groups
3983
var y = "<select id=p10newGroup style=width:236px>", count = 0;
3984
for (var i in meshes) {
3990
- var meshrights = meshes[i].links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
3985
+ var meshrights = meshes[i].links[userinfo._id].rights;
3986
if ((meshes[i]._id != targetMeshId) && (meshrights & 4)) { count++; y += "<option value='" + meshes[i]._id + "'>" + meshes[i].name + "</option>"; }
3987
}
3988
y += "</select>";
@@ -4119,7 +4114,7 @@
4114
function p10showiconselector() {
4115
if (xxdialogMode) return;
4116
var mesh = meshes[currentNode.meshid];
4122
- var meshrights = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
4117
+ var meshrights = mesh.links[userinfo._id].rights;
4118
if ((meshrights & 4) == 0) return;
4119
4120
var x = '<br><div style=display:inline-block;width:40px></div>';
@@ -4143,7 +4138,7 @@
4138
var showEditNodeValueDialog_modes3 = ['', '', '', 'Tag1, Tag2, Tag3'];
4139
function showEditNodeValueDialog(mode) {
4140
if (xxdialogMode) return;
4146
- var x = addHtmlValue(showEditNodeValueDialog_modes[mode], '<input id=dp10devicevalue style=width:230px maxlength=64 placeholder="' + showEditNodeValueDialog_modes3[mode] + '" onchange=p10editdevicevalueValidate(' + mode + ',event) onkeyup=p10editdevicevalueValidate(' + mode + ',event) />');
4141
+ var x = addHtmlValue(showEditNodeValueDialog_modes[mode], '<input id=dp10devicevalue maxlength=64 placeholder="' + showEditNodeValueDialog_modes3[mode] + '" onchange=p10editdevicevalueValidate(' + mode + ',event) onkeyup=p10editdevicevalueValidate(' + mode + ',event) />');
4142
setDialogMode(2, "Edit Device", 3, showEditNodeValueDialogEx, x, mode);
4143
var v = currentNode[showEditNodeValueDialog_modes2[mode]];
4144
if (v == null) v = '';
@@ -4182,7 +4177,6 @@
4177
QH('DeskParent', '');
4178
var c = xdesk.m.CanvasId;
4179
c.setAttribute('id', 'Desk');
4185
- c.setAttribute('style', 'width:100%;-ms-touch-action:none;margin-left:0px');
4180
c.setAttribute('onmousedown', 'dmousedown(event)');
4181
c.setAttribute('onmouseup', 'dmouseup(event)');
4182
c.setAttribute('onmousemove', 'dmousemove(event)');
@@ -4196,7 +4190,7 @@
4190
delete multiDesktop[currentNode._id];
4191
} else {
4192
// Device is not already connected, just setup a blank canvas
4199
- QH('DeskParent', '<canvas id=Desk width=640 height=480 style="width:100%;-ms-touch-action:none;margin-left:0px" oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');
4193
+ QH('DeskParent', '<canvas id=Desk oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event)></canvas>');
4194
desktopNode = currentNode;
4195
}
4196
// Setup the mouse wheel
@@ -4216,7 +4210,7 @@
4210
var mesh = meshes[currentNode.meshid];
4211
var deskState = 0;
4212
if (desktop != null) { deskState = desktop.State; }
4219
- var meshrights = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
4213
+ var meshrights = mesh.links[userinfo._id].rights;
4214
4215
// Show the right buttons
4216
QV('disconnectbutton1span', (deskState != 0));
@@ -4492,45 +4486,19 @@
4486
var browserfullscreen = false;
4487
function deskToggleFull(e) {
4488
fullscreen = !fullscreen;
4495
- /* QV('mastheadx', !fullscreen);
4496
- QV('masthead', !fullscreen);
4497
- QV('topbar', !fullscreen);
4498
- QV('p11deviceNameHeader', !fullscreen);
4499
- QV('footer', !fullscreen);
4500
- QV('column_l_bottomgap', !fullscreen);
4501
- QV('idx_deskFullBtn2', fullscreen);
4502
- QV('deskFullBtn', !fullscreen);
4503
- QV('page_leftbar', !fullscreen); */
4489
if (fullscreen) {
4490
QC('body').add("fulldesk");
4491
+ QS('deskarea3x').height = null;
4492
// If shift is pressed, enter browser full screen.
4493
if (e.shiftKey == true) { enterBrowserFullscreen(Q('deskarea0')); browserfullscreen = true; }
4508
- /* QS('column_l').width = '930px';
4509
- QS('column_l').height = '';
4510
- QS('column_l')['margin-left'] = '';
4511
- QS('column_l')['overflow-y'] = '';
4512
- QS('container').position = '';
4513
- QS('page_content').position = '';
4514
- QV('MainMenuSpan', true);
4515
- QS('container').width = '100%';
4516
- QS('container')['border-right'] = '0';
4517
- QS('container')['border-left'] = '0';
4518
- QS('column_l').padding = '0';
4519
- QS('column_l').width = '100%';
4520
- QS('column_l')["max-height"] = ''; */
4494
} else {
4495
QC('body').remove("fulldesk");
4496
exitBrowserFullscreen();
4497
browserfullscreen = false;
4525
- /* QS('container').width = '960px';
4526
- QS('container')['border-right'] = '1px solid #b7b7b7';
4527
- QS('container')['border-left'] = '1px solid #b7b7b7';
4528
- QS('column_l').padding = '0 15px';
4529
- QS('column_l').width = '930px'; */
4498
toggleFullScreen();
4499
}
4500
deskAdjust();
4533
- deskAdjust();
4501
+ //deskAdjust();
4502
updateDesktopButtons();
4503
}
4504
@@ -4540,33 +4508,33 @@
4508
}
4509
4510
function deskAdjust() {
4543
- var x = (Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - (Q('deskarea1').clientHeight + Q('deskarea2').clientHeight + Q('Desk').clientHeight + Q('deskarea4').clientHeight + 2)) / 2;
4544
- if (fullscreen) {
4545
- document.documentElement.style.overflow = 'hidden';
4511
+ if (deskAspectRatio) {
4512
+ QS('Desk').width = '100%';
4513
+ QS('Desk').height = '100%';
4514
QS('deskarea3x').height = null;
4547
- if (x < 0) {
4548
- var mh = (Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - (Q('deskarea1').clientHeight + Q('deskarea2').clientHeight + Q('deskarea4').clientHeight));
4549
- var mw = 9999;
4550
- if (desktop) { mw = (desktop.m.width / desktop.m.height) * mh; }
4551
- if (webRtcDesktop && webRtcDesktop.softdesktop) { mw = (webRtcDesktop.softdesktop.m.width / webRtcDesktop.softdesktop.m.height) * mh; }
4552
- QS('Desk')['max-height'] = mh + 'px';
4553
- QS('Desk')['max-width'] = mw + 'px';
4554
- x = 0;
4515
+ } else {
4516
+ var parentH = Q('DeskParent').clientHeight;
4517
+ var parentW = Q('DeskParent').clientWidth;
4518
+ var deskH = Q('Desk').height;
4519
+ var deskW = Q('Desk').width;
4520
+ if (parentH / parentW > deskH / deskW) {
4521
+ var hNew = (deskH * parentW / deskW) + 'px';
4522
+ if (webPageFullScreen || fullscreen) {
4523
+ QS('deskarea3x').height = null;
4524
+ } else {
4525
+ QS('deskarea3x').height = hNew;
4526
+ }
4527
+ QS('Desk').height = hNew;
4528
+ QS('Desk').width = '100%';
4529
} else {
4556
- QS('Desk')['max-height'] = null;
4557
- QS('Desk')['max-width'] = null;
4530
+ var wNew = (deskW * parentH / deskH) + 'px';
4531
+ if (webPageFullScreen || fullscreen) {
4532
+ QS('Desk').height = null;
4533
+ } else {
4534
+ QS('Desk').height = '100%';
4535
+ }
4536
+ QS('Desk').width = wNew;
4537
}
4559
- QS('Desk')['margin-top'] = x + 'px';
4560
- QS('Desk')['margin-bottom'] = x + 'px';
4561
- } else {
4562
- var mw = 9999, mh = (Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - (webPageFullScreen?276:290));
4563
- if (desktop) { mw = (desktop.m.width / desktop.m.height) * mh; }
4564
- if (webRtcDesktop && webRtcDesktop.softdesktop) { mw = (webRtcDesktop.softdesktop.m.width / webRtcDesktop.softdesktop.m.height) * mh; }
4565
- document.documentElement.style.overflow = 'auto';
4566
- QS('Desk')['max-height'] = mh + 'px';
4567
- QS('Desk')['max-width'] = mw + 'px';
4568
- QS('Desk')['margin-top'] = '0';
4569
- QS('Desk')['margin-bottom'] = '0';
4538
}
4539
}
4540
@@ -5497,7 +5465,7 @@
5465
consoleNode = currentNode;
5466
5467
var mesh = meshes[consoleNode.meshid];
5500
- var meshrights = mesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
5468
+ var meshrights = mesh.links[userinfo._id].rights;
5469
if ((meshrights & 16) != 0) {
5470
if (consoleNode.consoleText == null) { consoleNode.consoleText = ''; }
5471
if (samenode == false) {
@@ -5784,8 +5752,10 @@
5752
// Check if we are disallowed from creating a device group
5753
if ((userinfo.siteadmin != 0xFFFFFFFF) && ((userinfo.siteadmin & 64) != 0)) { setDialogMode(2, "New Device Group", 1, null, "This account does not have the rights to create a new device group."); return; }
5754
5787
- // Check if we are allowed to create a new device group
5788
- if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "New Device Group", 1, null, "Unable to create a new device group until a email address is verified. This is required for password recovery. Go to the \"My Account\" tab to change and verify an email address."); return; }
5755
+ // Remind the user to verify the email address
5756
+ if ((userinfo.emailVerified !== true) && (serverinfo.emailcheck == true) && (userinfo.siteadmin != 0xFFFFFFFF)) { setDialogMode(2, "Account Security", 1, null, "Unable to access a device until a email address is verified. This is required for password recovery. Go to the \"My Account\" tab to change and verify an email address."); return; }
5757
+ // Remind the user to add two factor authentication
5758
+ if ((features & 0x00040000) && !((userinfo.otpsecret == 1) || (userinfo.otphkeys > 0) || (userinfo.otpkeys > 0))) { setDialogMode(2, "Account Security", 1, null, "Unable to access a device until two-factor authentication is enabled. This is required for extra security. Go to the \"My Account\" tab and look at the \"Account Security\" section."); return; }
5759
5760
// We are allowed, let's prompt to information
5761
var x = "Create a new device group using the options below.<br /><br />";
@@ -5866,7 +5836,7 @@
5836
5837
// Mesh rights
5838
var meshrights = 0;
5869
- if (meshes[i].links['user/' + domain + '/' + userinfo.name.toLowerCase()]) { meshrights = meshes[i].links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights; }
5839
+ if (meshes[i].links[userinfo._id]) { meshrights = meshes[i].links[userinfo._id].rights; }
5840
var rights = 'Partial Rights';
5841
if (meshrights == 0xFFFFFFFF) rights = 'Full Administrator'; else if (meshrights == 0) rights = 'No Rights';
5842
@@ -5928,7 +5898,7 @@
5898
QH('p20meshName', EscapeHtml(currentMesh.name));
5899
var meshtype = 'Unknown #' + currentMesh.mtype;
5900
var meshrights = 0;
5931
- try { meshrights = currentMesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights; } catch (ex) { }
5901
+ try { meshrights = currentMesh.links[userinfo._id].rights; } catch (ex) { }
5902
if (currentMesh.mtype == 1) meshtype = 'Intel® AMT only, no agent';
5903
if (currentMesh.mtype == 2) meshtype = 'Managed using a software agent';
5904
@@ -5936,6 +5906,10 @@
5906
x += addHtmlValue('Name', addLinkConditional(EscapeHtml(currentMesh.name), 'p20editmesh(1)', (meshrights & 1) != 0));
5907
x += addHtmlValue('Description', addLinkConditional(((currentMesh.desc && currentMesh.desc != '')?EscapeHtml(currentMesh.desc):'<i>None</i>'), 'p20editmesh(2)', (meshrights & 1) != 0));
5908
5909
+ // Display group type
5910
+ x += addHtmlValue('Type', meshtype);
5911
+ //x += addHtmlValue('Identifier', currentMesh._id.split('/')[2]);
5912
+
5913
// Display features
5914
var meshFeatures = [];
5915
if (currentMesh.flags) {
@@ -5944,11 +5918,21 @@
5918
}
5919
meshFeatures = meshFeatures.join(', ');
5920
if (meshFeatures == '') { meshFeatures = '<i>None</i>'; }
5947
- x += addHtmlValue('Features', addLinkConditional(meshFeatures, 'p20editmeshfeatures()', (meshrights & 1) != 0));
5921
+ x += addHtmlValue('Features', addLinkConditional(meshFeatures, 'p20editmeshfeatures()', meshrights & 1));
5922
+ // Display user consent
5923
+ meshFeatures = [];
5924
+ var consent = 0;
5925
+ if (currentMesh.consent) { consent = currentMesh.consent; }
5926
+ if (serverinfo.consent) { consent |= serverinfo.consent; }
5927
+ if (consent & 1) { meshFeatures.push('Desktop Notify'); }
5928
+ if (consent & 2) { meshFeatures.push('Terminal Notify'); }
5929
+ if (consent & 4) { meshFeatures.push('Files Notify'); }
5930
+ //if ((consent & 7) == 7) { meshFeatures.push('Always Notify'); } else if ((currentMesh.consent & 7) != 0) { meshFeatures.push('Notify Sometimes'); }
5931
+ //if ((consent & 56) == 56) { meshFeatures.push('Always Blink Border'); } else if ((currentMesh.consent & 56) != 0) { meshFeatures.push('Blick Border Sometimes'); }
5932
5949
- // Display group type
5950
- x += addHtmlValue('Type', meshtype);
5951
- //x += addHtmlValue('Identifier', currentMesh._id.split('/')[2]);
5933
+ meshFeatures = meshFeatures.join(', ');
5934
+ if (meshFeatures == '') { meshFeatures = '<i>None</i>'; }
5935
+ x += addHtmlValue('User Consent', addLinkConditional(meshFeatures, 'p20editmeshconsent()', meshrights & 1));
5936
5937
// Intel AMT setup
5938
if (currentMesh.mtype == 2) {
@@ -5960,14 +5944,14 @@
5944
if (currentMesh.amt.cirasetup == 2) { intelAmtPolicy += ' + CIRA'; }
5945
}
5946
}
5963
- x += addHtmlValue('Intel® AMT', addLinkConditional(intelAmtPolicy, 'p20editMeshAmt()', (meshrights & 0xFFFFFFFF) != 0));
5947
+ x += addHtmlValue('Intel® AMT', addLinkConditional(intelAmtPolicy, 'p20editMeshAmt()', meshrights & 1));
5948
}
5949
5950
// Display group note support
5951
if (meshrights & 1) { x += '<br><input type=button value=Notes title="View notes about this device group" onclick=showNotes(false,"' + encodeURIComponent(currentMesh._id) + '") />'; }
5952
5953
x += '<br style=clear:both><br>';
5970
- var currentMeshLinks = currentMesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()];
5954
+ var currentMeshLinks = currentMesh.links[userinfo._id];
5955
if (currentMeshLinks && ((currentMeshLinks.rights & 2) != 0)) { x += '<a onclick=p20showAddMeshUserDialog() style=cursor:pointer;margin-right:10px><img src=images/icon-addnew.png border=0 height=12 width=12> Add User</a>'; }
5956
5957
if ((meshrights & 4) != 0) {
@@ -6002,7 +5986,12 @@
5986
5987
// Sort the users for this mesh
5988
var count = 1, sortedusers = [];
6005
- for (var i in currentMesh.links) { sortedusers.push({ id: i, name: i.split('/')[2], rights: currentMesh.links[i].rights }); }
5989
+ for (var i in currentMesh.links) {
5990
+ var uname = i.split('/')[2];
5991
+ if (currentMesh.links[i].name) { uname = currentMesh.links[i].name; }
5992
+ if (i == userinfo._id) { uname = userinfo.name; }
5993
+ sortedusers.push({ id: i, name: uname, rights: currentMesh.links[i].rights });
5994
+ }
5995
sortedusers.sort(function(a, b) { if (a.name > b.name) return 1; if (a.name < b.name) return -1; return 0; });
5996
5997
// Display all users for this mesh
@@ -6104,6 +6093,40 @@
6093
QE('idx_dlgOkButton', Q('dp20meshname').value.length > 0);
6094
}
6095
6096
+ function p20editmeshconsent() {
6097
+ if (xxdialogMode) return;
6098
+ var x = '', consent = (currentMesh.consent) ? currentMesh.consent : 0;
6099
+ x += '<div style="width:100%;border-bottom:1px solid gray;margin-bottom:5px"><b>Desktop</b></div>';
6100
+ x += "<div><input type=checkbox id=d20flag1 " + ((consent & 0x0001) ? 'checked' : '') + ">Notify User</div>";
6101
+ //x += "<div><input type=checkbox id=d20flag2 " + ((consent & 0x0008) ? 'checked' : '') + ">Blinking Border</div>";
6102
+ x += '<div style="width:100%;border-bottom:1px solid gray;margin-bottom:5px;margin-top:8px"><b>Terminal</b></div>';
6103
+ x += "<div><input type=checkbox id=d20flag3 " + ((consent & 0x0002) ? 'checked' : '') + ">Notify User</div>";
6104
+ //x += "<div><input type=checkbox id=d20flag4 " + ((consent & 0x0010) ? 'checked' : '') + ">Blinking Border</div>";
6105
+ x += '<div style="width:100%;border-bottom:1px solid gray;margin-bottom:5px;margin-top:8px"><b>Files</b></div>';
6106
+ x += "<div><input type=checkbox id=d20flag5 " + ((consent & 0x0004) ? 'checked' : '') + ">Notify User</div>";
6107
+ //x += "<div><input type=checkbox id=d20flag6 " + ((consent & 0x0020) ? 'checked' : '') + ">Blinking Border</div>";
6108
+ setDialogMode(2, "Edit Device Group User Consent", 3, p20editmeshconsentEx, x);
6109
+ if (serverinfo.consent) {
6110
+ if (serverinfo.consent & 1) { Q('d20flag1').checked = true; }
6111
+ if (serverinfo.consent & 2) { Q('d20flag3').checked = true; }
6112
+ if (serverinfo.consent & 4) { Q('d20flag5').checked = true; }
6113
+ QE('d20flag1', !(serverinfo.consent & 1));
6114
+ QE('d20flag3', !(serverinfo.consent & 2));
6115
+ QE('d20flag5', !(serverinfo.consent & 4));
6116
+ }
6117
+ }
6118
+
6119
+ function p20editmeshconsentEx() {
6120
+ var consent = 0;
6121
+ if (Q('d20flag1').checked) { consent += 0x0001; }
6122
+ //if (Q('d20flag2').checked) { consent += 0x0008; }
6123
+ if (Q('d20flag3').checked) { consent += 0x0002; }
6124
+ //if (Q('d20flag4').checked) { consent += 0x0010; }
6125
+ if (Q('d20flag5').checked) { consent += 0x0004; }
6126
+ //if (Q('d20flag6').checked) { consent += 0x0020; }
6127
+ meshserver.send({ action: 'editmesh', meshid: currentMesh._id, consent: consent });
6128
+ }
6129
+
6130
function p20editmeshfeatures() {
6131
if (xxdialogMode) return;
6132
var flags = (currentMesh.flags)?currentMesh.flags:0;
@@ -6145,7 +6168,7 @@
6168
}
6169
6170
function p20validateAddMeshUserDialog() {
6148
- var meshrights = currentMesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights;
6171
+ var meshrights = currentMesh.links[userinfo._id].rights;
6172
QE('idx_dlgOkButton', (Q('dp20username').value.length > 0));
6173
QE('p20fulladmin', meshrights == 0xFFFFFFFF);
6174
QE('p20editmesh', (!Q('p20fulladmin').checked) && (meshrights == 0xFFFFFFFF));
@@ -6186,7 +6209,7 @@
6209
function p20viewuser(userid) {
6210
if (xxdialogMode) return;
6211
userid = decodeURIComponent(userid);
6189
- var r = '', cmeshrights = currentMesh.links['user/' + domain + '/' + userinfo.name.toLowerCase()].rights, meshrights = currentMesh.links[userid].rights;
6212
+ var r = '', cmeshrights = currentMesh.links[userinfo._id].rights, meshrights = currentMesh.links[userid].rights;
6213
if (meshrights == 0xFFFFFFFF) r = ', Full Administrator (all rights)'; else {
6214
if ((meshrights & 1) != 0) r += ', Edit Device Group';
6215
if ((meshrights & 2) != 0) r += ', Manage Device Group Users';
@@ -6204,9 +6227,14 @@
6227
}
6228
r = r.substring(2);
6229
if (r == '') { r = 'No Rights'; }
6207
- var buttons = 1, x = addHtmlValue('User Name', EscapeHtml(decodeURIComponent(userid.split('/')[2])));
6230
+ var uname = userid.split('/')[2];
6231
+ if (users) { uname = users[userid].name; }
6232
+ if (userinfo._id == userid) { uname = userinfo.name; }
6233
+ var buttons = 1, x = addHtmlValue('User Name', EscapeHtml(uname));
6234
+ if (userid.split('/')[2] != uname) { x += addHtmlValue('User Identifier', EscapeHtml(userid.split('/')[2])); }
6235
+
6236
x += addHtmlValue('Permissions', r);
6209
- if ((('user/' + domain + '/' + userinfo.name.toLowerCase()) != userid) && (cmeshrights == 0xFFFFFFFF || (((cmeshrights & 2) != 0) && (meshrights != 0xFFFFFFFF)))) buttons += 4;
6237
+ if (((userinfo._id) != userid) && (cmeshrights == 0xFFFFFFFF || (((cmeshrights & 2) != 0) && (meshrights != 0xFFFFFFFF)))) buttons += 4;
6238
setDialogMode(2, "Device Group User", buttons, p20viewuserEx, x, userid);
6239
}
6240
@@ -6712,6 +6740,34 @@
6740
meshserver.send({ action: 'adduser', username: Q('p4name').value, email: Q('p4email').value, pass: Q('p4pass1').value, resetNextLogin: Q('p4resetNextLogin').checked });
6741
}
6742
6743
+ function showUserGroupDialog(e, userid) {
6744
+ if (xxdialogMode) return;
6745
+ haltEvent(e);
6746
+ userid = decodeURIComponent(userid);
6747
+ var user = users[userid.toLowerCase()], groups = "";
6748
+ if (user.groups != null) { groups = user.groups.join(', ') }
6749
+ var x = 'Enter a comma seperate list of groups.<br /><br />';
6750
+ x += addHtmlValue('Groups', '<input id=dp4usergroups style=width:230px value="' + groups + '" placeholder="Group1, Group2, Group3" maxlength=256 onchange=p4validateUserGroups() onkeyup=p4validateUserGroups() />');
6751
+ setDialogMode(2, "User Groups", 3, showUserGroupDialogEx, x, user);
6752
+ focusTextBox('dp4usergroups');
6753
+ p4validateUserGroups();
6754
+ return false;
6755
+ }
6756
+
6757
+ function p4validateUserGroups() {
6758
+ var groups = Q('dp4usergroups').value;
6759
+ var k = 0, i = groups.indexOf('\"') + groups.indexOf('/') + groups.indexOf('>') + groups.indexOf('<') + groups.indexOf('\'');
6760
+ var g = groups.split(',');
6761
+ for (var j in g) { if (g[j].trim().length == 0) k++; }
6762
+ QE('idx_dlgOkButton', (groups == '') || ((i == -5) && (k < 1)));
6763
+ }
6764
+
6765
+ function showUserGroupDialogEx(event, user) {
6766
+ var groups = Q('dp4usergroups').value, g = groups.split(','), g2 = [];
6767
+ for (var j in g) { var x = g[j].trim(); if (x.length > 0) { g2.push(x); } }
6768
+ meshserver.send({ action: 'edituser', id: user._id, groups: g2 });
6769
+ }
6770
+
6771
function showUserAdminDialog(e, userid) {
6772
if (xxdialogMode) return;
6773
haltEvent(e);
@@ -6780,7 +6836,7 @@
6836
if (Q('ua_nonewgroups').checked == true) siteadmin += 64;
6837
if (Q('ua_nomeshcmd').checked == true) siteadmin += 128;
6838
}
6783
- var x = { action: 'edituser', name: user.name, siteadmin: siteadmin };
6839
+ var x = { action: 'edituser', id: user._id, siteadmin: siteadmin };
6840
if (isNaN(quota) == false) { x.quota = (quota * 1024); }
6841
meshserver.send(x);
6842
}
@@ -6809,12 +6865,13 @@
6865
var msg = [], premsg = '';
6866
if ((user.siteadmin != null) && ((user.siteadmin & 32) != 0) && (user.siteadmin != 0xFFFFFFFF)) { premsg = '<img src="images/padlock12.png" height=12 width=8 title="Account is locked" style="margin-top:2px" /> '; msg.push("Locked account"); }
6867
if ((user.siteadmin == null) || ((user.siteadmin & (0xFFFFFFFF - 224)) == 0)) { msg.push("No server rights"); } else if (user.siteadmin == 8) { msg.push("Access to server files"); } else if (user.siteadmin == 0xFFFFFFFF) { msg.push("Full administrator"); } else { msg.push("Partial rights"); }
6812
- if ((user.siteadmin != null) && ((user.siteadmin & (64 + 128)) != 0)) { msg.push("Restrictions"); }
6868
+ if ((user.siteadmin != null) && (user.siteadmin != 0xFFFFFFFF) && ((user.siteadmin & (64 + 128)) != 0)) { msg.push("Restrictions"); }
6869
6870
// Show user attributes
6871
var x = '<div style=min-height:80px><table style=width:100%>';
6872
var email = user.email?EscapeHtml(user.email):'<i>Not set</i>', everify = '';
6873
if (serverinfo.emailcheck) { everify = ((user.emailVerified == true)?'<b style=color:green;cursor:pointer title="Email is verified">🗸</b> ':'<b style=color:red;cursor:pointer title="Email not verified">🗴</b> '); }
6874
+ if (user.name.toLowerCase() != user._id.split('/')[2]) { x += addDeviceAttribute('User Identifier', user._id.split('/')[2]); }
6875
x += addDeviceAttribute('Email', everify + "<a style=cursor:pointer onclick=p30showUserEmailChangeDialog(event,\"" + userid + "\")>" + email + '</a> <a style=cursor:pointer onclick=doemail(event,\"' + user.email + '\")><img class=hoverButton src="images/link1.png" /></a>');
6876
x += addDeviceAttribute('Server Rights', premsg + "<a style=cursor:pointer onclick=showUserAdminDialog(event,\"" + userid + "\")>" + msg.join(', ') + "</a>");
6877
if (user.quota) x += addDeviceAttribute('Server Quota', EscapeHtml(parseInt(user.quota) / 1024) + ' k');
@@ -6823,6 +6880,7 @@
6880
if (user.passchange == -1) { x += addDeviceAttribute('Password', 'Will be changed on next login.'); }
6881
else if (user.passchange) { x += addDeviceAttribute('Password', 'Last changed: ' + new Date(user.passchange * 1000).toLocaleString()); }
6882
6883
+ // Device Groups
6884
var linkCount = 0, linkCountStr = '<i>None<i>';
6885
if (user.links) {
6886
for (var i in user.links) { linkCount++; }
@@ -6830,6 +6888,12 @@
6888
}
6889
x += addDeviceAttribute('Device Groups', linkCountStr);
6890
6891
+ // User Groups
6892
+ var userGroups = '<i>None</i>';
6893
+ if (user.groups) { userGroups = ''; for (var i in user.groups) { userGroups += '<span class="tagSpan">' + user.groups[i] + '</span>'; } }
6894
+ x += addDeviceAttribute('User Groups', addLinkConditional(userGroups, 'showUserGroupDialog(event,\"' + userid + '\")', ((userinfo.groups == null) && (userinfo.siteadmin & 2) && (userinfo._id != user._id))));
6895
+
6896
+
6897
var multiFactor = 0;
6898
if ((user.otpsecret > 0) || (user.otphkeys > 0)) {
6899
multiFactor = 1;
@@ -6899,7 +6963,7 @@
6963
6964
// Send to the server the new user's email address and validation status
6965
function p30showUserEmailChangeDialogEx() {
6902
- var x = { action: 'edituser', name: currentUser.name, email: Q('dp30email').value };
6966
+ var x = { action: 'edituser', id: currentUser._id, email: Q('dp30email').value };
6967
if (serverinfo.emailcheck) { x.emailVerified = (Q('dp30verified').value == 1); }
6968
meshserver.send(x);
6969
}
@@ -7441,7 +7505,7 @@
7505
}
7506
7507
function center() {
7444
- if (xxcurrentView == 11) { deskAdjust(); } //deskAdjust(); }
7508
+ if (xxcurrentView == 11) { deskAdjust(); }
7509
else if (xxcurrentView == 10) { masterUpdate(256); }
7510
else if (xxcurrentView == 1) { masterUpdate(4); }
7511
}
@@ -7475,7 +7539,6 @@
7539
QC(leftBarItems[i]).remove('lbbuttonsel2');
7540
}
7541
7478
- QV('topbar', x != 0);
7542
// Define class for Menu(s) as fully or semi active.
7543
var mainMenuActiveClass = (x < 9 ? 'fullselect' : 'semiselect');
7544
var leftMenuActiveClass = (x < 9 ? 'lbbuttonsel2' : 'lbbuttonsel');
@@ -7511,21 +7574,20 @@
7574
QC('column_l').remove('room4submenu');
7575
}
7576
7514
- // Jovan, please check. I think this part is not needed anymore. Removing class will revert to default style
7515
- /*
7577
+ // If we are going to panel 0 in "full screen mode", hide the left bar.
7578
+ QV('topbar', x != 0);
7579
if ((x == 0) && (webPageFullScreen)) {
7517
- QS('page_content').position = '';
7518
- QV('page_leftbar', false);
7519
- QS('column_l').height = 'calc(100vh - 110px)';
7520
- QS('column_l')["max-height"] = '';
7521
- } */
7580
+ QC('body').add("arg_hide");
7581
+ // QS('column_l').height = 'calc(100vh - 111px)';
7582
+ }
7583
7584
QV('MainSubMenuSpan', x >= 10 && x < 20);
7585
QV('UserDummyMenuSpan', (x < 10) && (x != 6) && webPageFullScreen);
7586
QV('MeshSubMenuSpan', x >= 20 && x < 30);
7587
QV('UserSubMenuSpan', x >= 30 && x < 40);
7588
QV('ServerSubMenuSpan', x == 6 || x == 115 || x == 40);
7528
- var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 20: 'MeshGeneral', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 115: 'ServerConsole' };
7589
+ var panels = { 10: 'MainDev', 11: 'MainDevDesktop', 12: 'MainDevTerminal', 13: 'MainDevFiles', 14: 'MainDevAmt', 15: 'MainDevConsole', 16: 'MainDevEvents', 20: 'MeshGeneral', 30: 'UserGeneral', 31: 'UserEvents', 6: 'ServerGeneral', 40: 'ServerStats', 115: 'ServerConsole' };
7590
+
7591
for (var i in panels) {
7592
QC(panels[i]).remove('style3x');
7593
QC(panels[i]).remove('style3sel');
@@ -7544,7 +7606,7 @@
7606
if ((x == 40) && (serverTimelineStats == null)) { refreshServerTimelineStats(); }
7607
7608
// Update the web page title
7547
- if ((currentNode) && (x >= 10) && (x < 20)) { document.title = '{{{title}}} - ' + currentNode.name; } else { document.title = '{{{title}}}'; }
7609
+ if ((currentNode) && (x >= 10) && (x < 20)) { document.title = decodeURIComponent("{{{extitle}}}") + ' - ' + currentNode.name; } else { document.title = decodeURIComponent("{{{extitle}}}"); }
7610
}
7611
7612
// Generic methods
views/login.handlebars
+2
-3
@@ -220,9 +220,8 @@
220
</div>
221
<div id=dialog style="display:none">
222
<div id=dialogHeader>
223
- <div id=id_dialogclose style=float:right;padding:5px;cursor:pointer onclick=setDialogMode()><b>X</b></div>
224
- <div id=id_dialogtitle style=padding:5px></div>
225
- <div style=width:100%;margin:6px></div>
223
+ <div id=id_dialogclose onclick=setDialogMode()><b>X</b></div>
224
+ <div id=id_dialogtitle></div>
225
</div>
226
<div id=dialogBody>
227
<div id=dialog1>