Skip to content

Commit 1fb2549

Browse files
authored
Merge pull request #221 from mreishman/4.1
4.1
2 parents 7c10ad8 + 151ff47 commit 1fb2549

File tree

10 files changed

+257
-72
lines changed

10 files changed

+257
-72
lines changed

core/html/changelog.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
11
<ul>
2+
<li>
3+
Version 4.1
4+
<ul>
5+
<li>
6+
Features
7+
<ul>
8+
<li>
9+
Grouped Groups! (Ctrl / Command click to view more than one group)
10+
</li>
11+
<li>
12+
Added a minimized display type (Same as standard prior to 4.1, Standard now shows last update info)
13+
</li>
14+
</ul>
15+
</li>
16+
<li>
17+
Bug Fixes
18+
<ul>
19+
<li>
20+
Expand menu dropdown near bottom of screen now changes directions on first click
21+
</li>
22+
<li>
23+
Expand menu dropdown follows scroll of window
24+
</li>
25+
</ul>
26+
</li>
27+
</ul>
28+
</li>
229
<li>
330
Version 4.0
431
<ul>

core/js/main.js

Lines changed: 175 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var updating = false;
33
var pollTimer = null;
44
var blocekdInnerObj = {};
55
var currentIdOfMainSidebar = "";
6+
var currentOpenMenu = "";
67

78
function escapeHTML(unsafeStr)
89
{
@@ -789,21 +790,26 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
789790
website = websitePass;
790791
}
791792
item = item.replace(/{{website}}/g,website);
792-
item = item.replace(/{{branchView}}/g,branchView);
793-
if(branchView === "devBoxContentSecondary")
793+
if(branchView === "Standard")
794794
{
795795
item = item.replace(/{{upArrow}}/g,"display: none;");
796796
item = item.replace(/{{downArrow}}/g,"");
797+
item = item.replace(/{{branchView}}/g,"devBoxContentSecondary");
798+
item = item.replace(/{{branchViewTwo}}/g,"devBoxContentTertiary");
797799
}
798-
else if(branchView === "devBoxContentSecondaryExpanded")
800+
else if(branchView === "Expanded")
799801
{
800802
item = item.replace(/{{upArrow}}/g,"");
801803
item = item.replace(/{{downArrow}}/g,"display: none;");
804+
item = item.replace(/{{branchView}}/g,"devBoxContentSecondaryExpanded");
805+
item = item.replace(/{{branchViewTwo}}/g,"devBoxContentTertiaryExpanded");
802806
}
803807
else
804808
{
805809
item = item.replace(/{{upArrow}}/g,"");
806810
item = item.replace(/{{downArrow}}/g,"");
811+
item = item.replace(/{{branchView}}/g,"devBoxContentSecondary");
812+
item = item.replace(/{{branchViewTwo}}/g,"devBoxContentTertiary");
807813
}
808814
item = item.replace(/{{groupInfo}}/g,groupNames);
809815
$("#windows").append(item);
@@ -1390,67 +1396,113 @@ function startPoll()
13901396
pollTimer = Visibility.every(pollingRate, pollingRateBG, function () { poll(); });
13911397
}
13921398

1393-
function singleSwitchToStandardView(idOfBlock)
1399+
function singleDecreaseView(idOfBlock)
13941400
{
1395-
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondaryExpanded').addClass('devBoxContentSecondary');
1396-
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondaryExpanded').removeClass('devBoxContentSecondaryExpanded');
1397-
document.getElementById(idOfBlock+"DownArrow").style.display = "inline-block";
1398-
document.getElementById(idOfBlock+"UpArrow").style.display = "none";
1401+
if($('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondaryExpanded').hasClass('devBoxContentSecondaryExpanded'))
1402+
{
1403+
if($('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondaryExpanded .devBoxContentTertiaryExpanded').hasClass('devBoxContentTertiaryExpanded'))
1404+
{
1405+
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentTertiaryExpanded').addClass('devBoxContentTertiary');
1406+
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentTertiaryExpanded').removeClass('devBoxContentTertiaryExpanded');
1407+
}
1408+
else
1409+
{
1410+
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondaryExpanded').addClass('devBoxContentSecondary');
1411+
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondaryExpanded').removeClass('devBoxContentSecondaryExpanded');
1412+
$("#"+idOfBlock+"UpArrow").addClass("disabledArrow");
1413+
}
1414+
$("#"+idOfBlock+"DownArrow").removeClass("disabledArrow");
1415+
}
13991416
}
14001417

1401-
function switchToStandardView()
1418+
function singleIncreaseView(idOfBlock)
14021419
{
1403-
if($('#standardViewButtonMainSection').hasClass('buttonSlectorInnerBoxes'))
1420+
if($('#innerFirstDevBox'+idOfBlock+' .devBoxContentTertiary').hasClass('devBoxContentTertiary'))
14041421
{
1405-
if($('#expandedViewButtonMainSection').hasClass('buttonSlectorInnerBoxesSelected'))
1422+
if($('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondaryExpanded').hasClass('devBoxContentSecondaryExpanded'))
14061423
{
1407-
if(defaultViewBranchCookie = "true")
1408-
{
1409-
document.cookie = "defaultViewBranchCookie=Standard";
1410-
}
1411-
removeAllButtonSelectorClasses('standardViewButtonMainSection');
1412-
branchView = "devBoxContentSecondary";
1413-
$('#standardViewButtonMainSection').addClass('buttonSlectorInnerBoxesSelected');
1414-
$('#standardViewButtonMainSection').removeClass('buttonSlectorInnerBoxes');
1415-
1416-
$('.devBoxContentSecondaryExpanded').addClass('devBoxContentSecondary');
1417-
$('.devBoxContentSecondaryExpanded').removeClass('devBoxContentSecondaryExpanded');
1424+
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentTertiary').addClass('devBoxContentTertiaryExpanded');
1425+
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentTertiary').removeClass('devBoxContentTertiary');
1426+
$("#"+idOfBlock+"DownArrow").addClass("disabledArrow");
1427+
}
1428+
else
1429+
{
1430+
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondary').addClass('devBoxContentSecondaryExpanded');
1431+
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondary').removeClass('devBoxContentSecondary');
1432+
}
1433+
$("#"+idOfBlock+"UpArrow").removeClass("disabledArrow");
1434+
}
1435+
}
14181436

1419-
$(".downArrow").css("display","inline-block");
1420-
$(".upArrow").css("display","none");
1437+
function switchToMinimizedView()
1438+
{
1439+
if($('#minimizedViewButtonMainSection').hasClass('buttonSlectorInnerBoxes'))
1440+
{
1441+
if(defaultViewBranchCookie = "true")
1442+
{
1443+
document.cookie = "defaultViewBranchCookie=Minimized";
14211444
}
1445+
removeAllButtonSelectorClasses('minimizedViewButtonMainSection');
1446+
branchView = "Minimized";
1447+
$('#minimizedViewButtonMainSection').addClass('buttonSlectorInnerBoxesSelected');
1448+
$('#minimizedViewButtonMainSection').removeClass('buttonSlectorInnerBoxes');
1449+
1450+
$('.devBoxContentSecondaryExpanded').addClass('devBoxContentSecondary');
1451+
$('.devBoxContentSecondaryExpanded').removeClass('devBoxContentSecondaryExpanded');
1452+
1453+
$('.devBoxContentTertiaryExpanded').addClass('devBoxContentTertiary');
1454+
$('.devBoxContentTertiaryExpanded').removeClass('devBoxContentTertiaryExpanded');
1455+
1456+
$(".downArrow").removeClass("disabledArrow");
1457+
$(".upArrow").addClass("disabledArrow");
14221458
}
14231459
}
14241460

1425-
function singleSwitchToExpandView(idOfBlock)
1461+
function switchToStandardView()
14261462
{
1427-
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondary').addClass('devBoxContentSecondaryExpanded');
1428-
$('#innerFirstDevBox'+idOfBlock+' .devBoxContentSecondary').removeClass('devBoxContentSecondary');
1429-
document.getElementById(idOfBlock+"DownArrow").style.display = "none";
1430-
document.getElementById(idOfBlock+"UpArrow").style.display = "inline-block";
1463+
if($('#standardViewButtonMainSection').hasClass('buttonSlectorInnerBoxes'))
1464+
{
1465+
if(defaultViewBranchCookie = "true")
1466+
{
1467+
document.cookie = "defaultViewBranchCookie=Standard";
1468+
}
1469+
removeAllButtonSelectorClasses('standardViewButtonMainSection');
1470+
branchView = "Standard";
1471+
$('#standardViewButtonMainSection').addClass('buttonSlectorInnerBoxesSelected');
1472+
$('#standardViewButtonMainSection').removeClass('buttonSlectorInnerBoxes');
1473+
1474+
$('.devBoxContentSecondary').addClass('devBoxContentSecondaryExpanded');
1475+
$('.devBoxContentSecondary').removeClass('devBoxContentSecondary');
1476+
1477+
$('.devBoxContentTertiaryExpanded').addClass('devBoxContentTertiary');
1478+
$('.devBoxContentTertiaryExpanded').removeClass('devBoxContentTertiaryExpanded');
1479+
1480+
$(".downArrow").removeClass("disabledArrow");
1481+
$(".upArrow").removeClass("disabledArrow");
1482+
}
14311483
}
14321484

14331485
function switchToExpandedView()
14341486
{
14351487
if($('#expandedViewButtonMainSection').hasClass('buttonSlectorInnerBoxes'))
14361488
{
1437-
if($('#standardViewButtonMainSection').hasClass('buttonSlectorInnerBoxesSelected'))
1489+
if(defaultViewBranchCookie = "true")
14381490
{
1439-
if(defaultViewBranchCookie = "true")
1440-
{
1441-
document.cookie = "defaultViewBranchCookie=Expanded";
1442-
}
1443-
removeAllButtonSelectorClasses('expandedViewButtonMainSection');
1444-
branchView = "devBoxContentSecondaryExpanded";
1445-
$('#expandedViewButtonMainSection').addClass('buttonSlectorInnerBoxesSelected');
1446-
$('#expandedViewButtonMainSection').removeClass('buttonSlectorInnerBoxes');
1491+
document.cookie = "defaultViewBranchCookie=Expanded";
1492+
}
1493+
removeAllButtonSelectorClasses('expandedViewButtonMainSection');
1494+
branchView = "Expanded";
1495+
$('#expandedViewButtonMainSection').addClass('buttonSlectorInnerBoxesSelected');
1496+
$('#expandedViewButtonMainSection').removeClass('buttonSlectorInnerBoxes');
14471497

1448-
$('.devBoxContentSecondary').addClass('devBoxContentSecondaryExpanded');
1449-
$('.devBoxContentSecondary').removeClass('devBoxContentSecondary');
1498+
$('.devBoxContentSecondary').addClass('devBoxContentSecondaryExpanded');
1499+
$('.devBoxContentSecondary').removeClass('devBoxContentSecondary');
14501500

1451-
$(".downArrow").css("display","none");
1452-
$(".upArrow").css("display","inline-block");
1453-
}
1501+
$('.devBoxContentTertiary').addClass('devBoxContentTertiaryExpanded');
1502+
$('.devBoxContentTertiary').removeClass('devBoxContentTertiary');
1503+
1504+
$(".downArrow").addClass("disabledArrow");
1505+
$(".upArrow").removeClass("disabledArrow");
14541506
}
14551507
}
14561508

@@ -1474,6 +1526,16 @@ function removeAllButtonSelectorClasses(ignore)
14741526

14751527
}
14761528
}
1529+
1530+
if(ignore != 'minimizedViewButtonMainSection')
1531+
{
1532+
if($('#minimizedViewButtonMainSection').hasClass('buttonSlectorInnerBoxesSelected'))
1533+
{
1534+
$('#minimizedViewButtonMainSection').removeClass('buttonSlectorInnerBoxesSelected');
1535+
$('#minimizedViewButtonMainSection').addClass('buttonSlectorInnerBoxes');
1536+
1537+
}
1538+
}
14771539
}
14781540

14791541
function calcuateWidth()
@@ -1519,11 +1581,39 @@ function calcuateWidth()
15191581
document.getElementById("iframeForStuff").style.width = ((innerWidthWindow)-415)+"px";
15201582
}
15211583

1522-
function showOrHideGroups(groupName)
1584+
function showOrHideGroups(event, groupName)
15231585
{
15241586
//change tab to selected / unselected
1525-
$('.groupTab').removeClass('groupTabSelected');
1526-
$('#Group'+groupName).addClass('groupTabSelected');
1587+
if((event.ctrlKey || event.metaKey) && groupName !== "All")
1588+
{
1589+
event.preventDefault();
1590+
if($('#GroupAll').hasClass('groupTabSelected'))
1591+
{
1592+
$('#GroupAll').removeClass('groupTabSelected');
1593+
}
1594+
//if hold ctrl and not 'all'
1595+
if($('#Group'+groupName).hasClass('groupTabSelected'))
1596+
{
1597+
$('#Group'+groupName).removeClass('groupTabSelected');
1598+
}
1599+
else
1600+
{
1601+
$('#Group'+groupName).addClass('groupTabSelected');
1602+
}
1603+
}
1604+
else
1605+
{
1606+
if($('#Group'+groupName).hasClass('groupTabSelected') && $('.groupTab.groupTabSelected').length == 1)
1607+
{
1608+
$('.groupTab').removeClass('groupTabSelected');
1609+
$('#GroupAll').addClass('groupTabSelected');
1610+
}
1611+
else
1612+
{
1613+
$('.groupTab').removeClass('groupTabSelected');
1614+
$('#Group'+groupName).addClass('groupTabSelected');
1615+
}
1616+
}
15271617

15281618
//show / hide groups
15291619
updateGroupsShown();
@@ -1553,30 +1643,67 @@ function dropdownShow(nameOfElem)
15531643
{
15541644
$('.dropdown-content').hide();
15551645
$('.dropdown-content').css('margin-top',"0px");
1646+
currentOpenMenu = "";
15561647
}
15571648
else
15581649
{
15591650
$('.dropdown-content').hide();
15601651
var currentElement = document.getElementById("dropdown-"+nameOfElem);
15611652
currentElement.style.display = 'block';
15621653
currentElement.style.marginTop = "0px";
1654+
$("#dropdown-"+nameOfElem).css("top" , "" + ($("#innerFirstDevBox"+nameOfElem+" .expandMenu").position().top + $("#innerFirstDevBox"+nameOfElem+" .expandMenu").height()) + "px")
1655+
currentElement = document.getElementById("dropdown-"+nameOfElem);
15631656
var elementLowestPosition = (currentElement.getBoundingClientRect().top+currentElement.offsetHeight);
15641657
var heightWindow = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
15651658
if(elementLowestPosition > heightWindow)
15661659
{
15671660
currentElement.style.marginTop = "-"+(currentElement.offsetHeight+25)+"px";
15681661
}
1662+
currentOpenMenu = nameOfElem;
15691663
}
15701664
}
15711665

1666+
$( "#windows" ).scroll(function() {
1667+
let nameOfElem = currentOpenMenu;
1668+
if(nameOfElem === "")
1669+
{
1670+
return;
1671+
}
1672+
if(document.getElementById("dropdown-"+nameOfElem).style.display === 'block')
1673+
{
1674+
let heightWindow = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
1675+
if($("#innerFirstDevBox"+nameOfElem+" .expandMenu").position().top < 0 || ($("#innerFirstDevBox"+nameOfElem+" .expandMenu").position().top) > heightWindow)
1676+
{
1677+
forceCloseDropdownMenu();
1678+
}
1679+
else
1680+
{
1681+
let currentElement = document.getElementById("dropdown-"+nameOfElem);
1682+
$("#dropdown-"+nameOfElem).css("top" , "" + ($("#innerFirstDevBox"+nameOfElem+" .expandMenu").position().top + $("#innerFirstDevBox"+nameOfElem+" .expandMenu").height()) + "px")
1683+
let elementLowestPosition = (currentElement.getBoundingClientRect().top+currentElement.offsetHeight);
1684+
let heightWindow = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
1685+
if(elementLowestPosition > heightWindow)
1686+
{
1687+
currentElement.style.marginTop = "-"+(currentElement.offsetHeight+25)+"px";
1688+
}
1689+
}
1690+
}
1691+
});
1692+
15721693
window.onclick = function(event) {
15731694
if (!event.target.matches('.expandMenu'))
15741695
{
1575-
$('.dropdown-content').hide();
1576-
$('.dropdown-content').css('margin-top',"0px");
1696+
forceCloseDropdownMenu();
15771697
}
15781698
}
15791699

1700+
function forceCloseDropdownMenu()
1701+
{
1702+
$('.dropdown-content').hide();
1703+
$('.dropdown-content').css('margin-top',"0px");
1704+
currentOpenMenu = "";
1705+
}
1706+
15801707
function showUpdateCheckPopup(data)
15811708
{
15821709
showPopup();

core/php/configStatic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?php
33

44
$configStatic = array(
5-
'version' => '4.0',
5+
'version' => '4.1',
66
'lastCheck' => '12-14-2018',
77
'newestVersion' => '3.3.4',
88
'versionList' => array(

0 commit comments

Comments
 (0)