Skip to content

Commit a704a55

Browse files
authored
Fix behavior with >5 local/remote branches (#25)
Also tidies up HTML, downgrades to bootstrap 4.x for IE support for Studio
1 parent a846912 commit a704a55

File tree

15 files changed

+343
-2896
lines changed

15 files changed

+343
-2896
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.vscode/
22
testcode.txt
33
.gitattributes
4-
*.code-workspace
4+
*.code-workspace
5+
package-lock.json
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Class SourceControl.Git.StreamServer Extends %CSP.StreamServer
2+
{
3+
4+
/// The <method>OnPage()</method> is called by the CSP dispatcher to generate the
5+
/// page content. For %CSP.StreamServer, since the content type is actually a stream, not HTML
6+
/// we simply write out the stream data.
7+
ClassMethod OnPage() As %Status
8+
{
9+
if (%stream '= $$$NULLOREF) && $data(%base)#2 {
10+
while '%stream.AtEnd {
11+
write $Replace(%stream.Read(),"{{baseHref}}",..EscapeHTML(%base))
12+
}
13+
quit $$$OK
14+
}
15+
Quit ##super()
16+
}
17+
18+
}
19+

csp/gitprojectsettings.csp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<title>IRIS/Git Integration Settings</title>
88
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
99
<link rel="stylesheet" type="text/css" href="css/git-webui.css" />
10-
<STYLE type='text/css'>
10+
<style type='text/css'>
1111
.error {
1212
color: red;
1313
}
@@ -36,7 +36,7 @@ body {
3636
hr {
3737
opacity: 0.15
3838
}
39-
</STYLE>
39+
</style>
4040
</head>
4141
<body>
4242
<server>
@@ -71,7 +71,7 @@ hr {
7171
<h3>Settings for namespace #(..EscapeHTML(namespace))#</h3><br/>
7272

7373
<div class="form-group row mb-3">
74-
<label for="gitBinPath" class="col-sm-3 col-form-label" data-toggle="tooltip" title="Absolute path to the Git executable">Path to git.exe</small></small></label>
74+
<label for="gitBinPath" class="col-sm-3 col-form-label" data-toggle="tooltip" title="Absolute path to the Git executable">Path to git.exe</label>
7575
<div class="col-sm-7">
7676
<input type="text" class="form-control" id="gitBinPath" name="gitBinPath" value='#(..EscapeHTML(settings.gitBinPath))#' placeholder="(e.g. C:\Program Files\Git\bin\git.exe)">
7777
<csp:if condition='$D(%request.Data("gitsettings",1)) && (##class(SourceControl.Git.Utils).GitBinExists()=0)'>
@@ -110,7 +110,7 @@ hr {
110110
<label for="MappingsPath" class="col-form-label" data-toggle="tooltip" title="Relative paths mapping the files in your project">Mappings</label>
111111
<button type="button" class="btn btn-default btn-add" >
112112
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="#198754" class="bi bi-plus-circle-fill" viewBox="0 0 16 16">
113-
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/>
113+
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"></path>
114114
</svg>
115115
</button>
116116
</div>
@@ -140,8 +140,8 @@ hr {
140140
<input type="text" class="form-control" id="MappingsPath" name="MappingsPath" value=#(settings.Mappings(extKey, covKey))# placeholder="Relative path">
141141
<div class="input-group-append">
142142
<button type="button" class="btn btn-remove" >
143-
<svg xmlns="http://www.w3.org/2000/svg" width=20" height="20" fill="#dc3545" class="bi bi-dash-circle-fill" viewBox="0 0 16 16">
144-
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM4.5 7.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-7z"/>
143+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#dc3545" class="bi bi-dash-circle-fill" viewBox="0 0 16 16">
144+
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM4.5 7.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-7z"></path>
145145
</svg>
146146
</button>
147147
</div>
@@ -188,10 +188,11 @@ hr {
188188
<em>Settings saved. Click cross in the upper-right corner to close the settings window.</em>
189189
</csp:if>
190190
</div>
191+
<script src="js/polyfills.js"></script>
191192
<script src="js/jquery.min.js"></script>
192193
<script src="js/popper.min.js"></script>
193194
<script src="js/bootstrap.min.js"></script>
194-
<script language="JavaScript">
195+
<script type="text/javascript">
195196
$(function () {
196197
$('[data-toggle="tooltip"]').tooltip()
197198
})

csp/webuidriver.csp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
new $NAMESPACE
1010
set $NAMESPACE = namespace
11+
set %namespace = namespace
1112

1213
try {
1314
if (%request.UserAgent [ " Code/") {
@@ -51,11 +52,10 @@
5152

5253
quit 1
5354
</script><server>
54-
if $data(%base)#2 {
55-
&html<<base href="#(..EscapeHTML(%base))#"/>>
56-
}
55+
new $NAMESPACE
56+
set $NAMESPACE = %namespace
5757
if $Get(%stream) {
58-
Quit ##class(%CSP.StreamServer).Page()
58+
Quit ##class(SourceControl.Git.StreamServer).Page()
5959
} elseif $IsObject($Get(%data)) {
6060
do %data.OutputToDevice()
6161
}

0 commit comments

Comments
 (0)