Skip to content

Commit ebd8a20

Browse files
authored
Merge pull request #215 from mreishman/3.4.3
3.4.3
2 parents 147ca2e + ba6b5c4 commit ebd8a20

File tree

20 files changed

+548
-330
lines changed

20 files changed

+548
-330
lines changed

core/conf/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
'blockGitCommitDiff' => 'false',
2525
'blockGitCommitHistory' => 'false',
2626
'blockGitShowCommitStuff' => 'false',
27+
'successVerifyNum' => 3,
2728
'defaultBranchList' => 'master',
2829
'errorAndColorArray' => array(
2930
'error' => array(

core/html/changelog.html

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
11
<ul>
2+
<li>
3+
Version 3.4.3
4+
<ul>
5+
<li>
6+
Features
7+
<ul>
8+
<li>
9+
Added option for custom git url
10+
</li>
11+
<li>
12+
Buttons to move watchlist blocks up / down
13+
</li>
14+
</ul>
15+
</li>
16+
<li>
17+
Bug Fixes
18+
<ul>
19+
<li>
20+
Fixed issue with errors not displaying correctly when poll fails
21+
</li>
22+
<li>
23+
Changed archive to dropdown from button
24+
</li>
25+
<li>
26+
Fixed bug where adding a new server / removing a server would show dropdown inputs as text field inputs
27+
</li>
28+
<li>
29+
Added consecutive save verify check on saves
30+
</li>
31+
</ul>
32+
</li>
33+
</ul>
34+
</li>
235
<li>
336
Version 3.4.2
437
<ul>
@@ -355,7 +388,7 @@
355388
Bug Fixes
356389
<ul>
357390
<li>
358-
Fixed bug with new git branch logic
391+
Fixed bug with new git branch logic
359392
</li>
360393
</ul>
361394
</li>
@@ -709,7 +742,7 @@
709742
Features
710743
<ul>
711744
<li>
712-
New settings page for watch list / main settings.
745+
New settings page for watch list / main settings.
713746
</li>
714747
<li>
715748
Tabbed groups for servers
@@ -780,7 +813,7 @@
780813
Added link to log-hog on watch servers (if installed)
781814
</li>
782815
<li>
783-
Changes BG color of servers on master branch.
816+
Changes BG color of servers on master branch.
784817
</li>
785818
<li>
786819
Auto-refresh / Pause auto refresh

core/js/main.js

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ function getToday()
189189
if(dd<10)
190190
{
191191
dd='0'+dd
192-
}
192+
}
193193

194194
if(mm<10)
195195
{
196196
mm='0'+mm
197-
}
197+
}
198198
return mm+'/'+dd+'/'+yyyy;
199199
}
200200

@@ -221,7 +221,7 @@ function tryHTTPForPollRequest(count, name = null)
221221
if (dateForEnd >= today)
222222
{
223223
doPollLogic = false;
224-
}
224+
}
225225
}
226226
if(doPollLogic)
227227
{
@@ -365,9 +365,9 @@ function tryHttpActuallyPollLogic(count, name)
365365
}
366366

367367

368-
function tryHTTPSForPollRequest(_data, _innerData)
368+
function tryHTTPSForPollRequest(data2, _innerData)
369369
{
370-
var urlForSend = _data.urlForSend;
370+
var urlForSend = data2.urlForSend;
371371
urlForSend = urlForSend.replace("http","https");
372372
var data = _innerData;
373373
(function(_data){
@@ -384,7 +384,7 @@ function tryHTTPSForPollRequest(_data, _innerData)
384384
pollFailure(xhr.status, error, _data);
385385
}
386386
});
387-
}(data));
387+
}(data2));
388388
}
389389

390390
function showPopupWithMessage(type, message)
@@ -879,6 +879,10 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
879879
{
880880
baseRepoUrl = "gitlab.com";
881881
}
882+
if("customGit" in dataInner && customGit !== "")
883+
{
884+
baseRepoUrl = dataInner["customGit"];
885+
}
882886
}
883887
$("#"+noSpaceName+"BranchHistory").html(generateBranchHistory(dataInner, repoName, baseRepoUrl));
884888
var dataBranchForFile = '<span id="'+noSpaceName+'";">';
@@ -911,7 +915,7 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
911915
{
912916
if(checkForIssueInCommit == "true")
913917
{
914-
for(var i = 0, len = dataBranchForFileStats.length; i < len; i++)
918+
for(var i = 0, len = dataBranchForFileStats.length; i < len; i++)
915919
{
916920
if((dataBranchForFileStats[i] == "#") && (!isNaN(dataBranchForFileStats[i+1])) && (dataBranchForFileStats[i-1] != "&"))
917921
{
@@ -939,7 +943,7 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
939943
}
940944
//loop through filters, if match -> get number, add to title if != link
941945

942-
946+
943947
//num for start
944948
if(checkForIssueStartsWithNum == "true")
945949
{
@@ -960,13 +964,13 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
960964
}
961965
}
962966

963-
967+
964968
//num for end
965969
if(checkForIssueEndsWithNum == "true")
966970
{
967971
var numForEnd = "";
968972
var countForEndLoop = branchName.length - 1;
969-
973+
970974
while(!isNaN(branchName.charAt(countForEndLoop)) && countForEndLoop != 0)
971975
{
972976
numForEnd += branchName.charAt(countForEndLoop);
@@ -1011,19 +1015,19 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
10111015
}
10121016
dataBranchForFile += '</span>';
10131017
var nameForBackground = "innerFirstDevBox"+noSpaceName;
1014-
dataToFilterBy = dataInner['branch'];
1018+
dataToFilterBy = dataInner['branch'];
10151019
if(branchColorFilter == "authorName")
10161020
{
10171021
dataToFilterByArray = dataBranchForFileStats.split("<br>");
10181022
dataToFilterByArray = dataToFilterByArray[0].split("</b>");
1019-
dataToFilterBy = $.trim(dataToFilterByArray[1]);
1023+
dataToFilterBy = $.trim(dataToFilterByArray[1]);
10201024

10211025
}
10221026
else if(branchColorFilter == "committerName")
10231027
{
10241028
dataToFilterByArray = dataBranchForFileStats.split("<br>");
10251029
dataToFilterByArray = dataToFilterByArray[0].split("</b>");
1026-
dataToFilterBy = $.trim(dataToFilterByArray[1]);
1030+
dataToFilterBy = $.trim(dataToFilterByArray[1]);
10271031
}
10281032
var setFadeBool = false;
10291033
var urlHit = "";
@@ -1075,7 +1079,7 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
10751079
arrayOfWatchFilters[noSpaceName]["branchList"] = branchList;
10761080
arrayOfWatchFilters[noSpaceName]["urlHit"] = urlHit;
10771081
}
1078-
1082+
10791083
filterBGColor(dataToFilterBy, nameForBackground, 1);
10801084
arrayOfWatchFilters[noSpaceName]["backgroundColor"] = document.getElementById(nameForBackground).style.backgroundColor;
10811085
//custom message stuff
@@ -1090,11 +1094,11 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
10901094

10911095
if(dd<10) {
10921096
dd='0'+dd
1093-
}
1097+
}
10941098

10951099
if(mm<10) {
10961100
mm='0'+mm
1097-
}
1101+
}
10981102

10991103
today = mm+'/'+dd+'/'+yyyy;
11001104

@@ -1320,7 +1324,7 @@ function refreshAction(all = -1, status = 'outer')
13201324
}
13211325

13221326
function endRefreshAction()
1323-
{
1327+
{
13241328
if(isPaused())
13251329
{
13261330
document.title = "Git Status | Paused";
@@ -1559,7 +1563,7 @@ function dropdownShow(nameOfElem)
15591563
}
15601564

15611565
window.onclick = function(event) {
1562-
if (!event.target.matches('.expandMenu'))
1566+
if (!event.target.matches('.expandMenu'))
15631567
{
15641568
$('.dropdown-content').hide();
15651569
$('.dropdown-content').css('margin-top',"0px");
@@ -1619,7 +1623,7 @@ function installUpdates()
16191623
type: "POST",
16201624
complete: function(data)
16211625
{
1622-
//set thing to check for updated files.
1626+
//set thing to check for updated files.
16231627
timeoutVar = setInterval(function(){verifyChange();},3000);
16241628
}
16251629
});
@@ -2306,7 +2310,7 @@ function commitStuffSuccess(data)
23062310
currentNumberMinus++;
23072311
currentNumberPlus++;
23082312
}
2309-
2313+
23102314
}
23112315
htmlForCommit += "</table>";
23122316
$("#spanForMainDiff").html(htmlForCommit);

core/js/settingsAll.js

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
var modiferUrl = "";
2+
var countForVerifySave = 0;
3+
var countForVerifySaveSuccess = 0;
4+
var successVerifyNum = 3;
25

36
function saveAndVerifyMain(idForForm, modifier = "")
47
{
@@ -23,6 +26,7 @@ function saveAndVerifyMain(idForForm, modifier = "")
2326
function verifySaveTimer()
2427
{
2528
countForVerifySave = 0;
29+
countForVerifySaveSuccess = 0;
2630
pollCheckForUpdate = setInterval(timerVerifySave,3000);
2731
}
2832

@@ -42,28 +46,16 @@ function timerVerifySave()
4246
{
4347
if(data === true)
4448
{
45-
clearInterval(pollCheckForUpdate);
46-
if(idForFormMain === "settingsMainWatch")
49+
countForVerifySaveSuccess++;
50+
if(countForVerifySaveSuccess >= successVerifyNum)
4751
{
48-
showPopupForCacheClear = false;
49-
clearCache();
50-
}
51-
else
52-
{
53-
if(document.getElementsByName("pollType")[0])
54-
{
55-
if(document.getElementsByName("pollType")[0].value !== "2")
56-
{
57-
document.getElementById("menuBarLeftSettingsServerWatchList").style.display = "none";
58-
}
59-
else
60-
{
61-
document.getElementById("menuBarLeftSettingsServerWatchList").style.display = "block";
62-
}
63-
}
64-
saveVerified();
52+
verifySuccess();
6553
}
6654
}
55+
else
56+
{
57+
countForVerifySaveSuccess = 0;
58+
}
6759
},
6860
});
6961
}
@@ -74,6 +66,31 @@ function timerVerifySave()
7466
}
7567
}
7668

69+
function verifySuccess()
70+
{
71+
clearInterval(pollCheckForUpdate);
72+
if(idForFormMain === "settingsMainWatch")
73+
{
74+
showPopupForCacheClear = false;
75+
clearCache();
76+
}
77+
else
78+
{
79+
if(document.getElementsByName("pollType")[0])
80+
{
81+
if(document.getElementsByName("pollType")[0].value !== "2")
82+
{
83+
document.getElementById("menuBarLeftSettingsServerWatchList").style.display = "none";
84+
}
85+
else
86+
{
87+
document.getElementById("menuBarLeftSettingsServerWatchList").style.display = "block";
88+
}
89+
}
90+
saveVerified();
91+
}
92+
}
93+
7794
function saveVerified()
7895
{
7996
saveSuccess();

0 commit comments

Comments
 (0)