Skip to content

Commit cc028e2

Browse files
committed
fix JS issues
1 parent e1172eb commit cc028e2

File tree

6 files changed

+22
-19
lines changed

6 files changed

+22
-19
lines changed

api/assets/bindata.go

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

api/handlers/rest_ApiComplete.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ func ApiComplete(w http.ResponseWriter, r *http.Request, session *sessions.Sessi
2929

3030
if globals.Windows {
3131
cms = strings.Replace(os.ExpandEnv("$GOPATH")+"\\bin\\gocode.exe", "/", "\\", -1)
32+
3233
}
3334

3435
cmd := fmt.Sprintf(cms+" -f=json --in=%s autocomplete %s", tempFile, prefx)
3536

36-
res,_ := core.RunCmdSmart(cmd)
37+
res, _ := core.RunCmdSmart(cmd)
3738
response = res
3839

39-
40-
4140
os.Remove(tempFile)
4241

4342
callmet = true

launcher.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,16 @@ func LaunchServer() {
7373
}
7474

7575
if _, err := os.Stat(os.ExpandEnv("$GOPATH") + "/bin/gocode" + trailerEx); os.IsNotExist(err) {
76-
fmt.Println("Go code completion not present, installing from github.com/nsf/gocode")
77-
core.RunCmdSmart("go get github.com/nsf/gocode")
76+
fmt.Println("Go code completion not present, installing from github.com/mdempsky/gocode")
77+
if globals.Windows {
78+
//
79+
core.RunCmdSmart("go get -u -ldflags -H=windowsgui github.com/mdempsky/gocode")
80+
} else {
81+
82+
core.RunCmdSmart("go get -u github.com/mdempsky/gocode")
83+
84+
}
85+
7886
}
7987

8088
if _, err := os.Stat(os.ExpandEnv("$GOPATH") + "/bin/dep" + trailerEx); os.IsNotExist(err) {

tmpl/js.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
id
337337
},
338338
success : function(html){
339-
let completions = html[1];
339+
let completions = html ? html[1] : false;
340340

341341
if(completions && completions.length > 0){
342342

tmpl/ui/docker.tmpl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,7 @@
4040
<p>Your image will be named `{{.Misc}}`</p>
4141
<button class="btn btn-lg build-button btn-primary">Build</button>
4242
</div>
43-
<div class="col-md-6" style="padding-top:10px;">
44-
45-
<!--<p><button class="btn btn-sm btn-tag btn-block do-push" >Push</button></p> -->
46-
<p><span style="color:#333;">Use the button below to use `dep` to download and save dependencies to project. (vendor folder)</span><br/><button class="btn btn-sm btn-tag btn-block get-deps">Download dependencies</button></p>
47-
48-
</div>
43+
4944
</div>
5045

5146
</div>

web/index.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
<button class="btn btn-sm btn-primary-outline open-terminal" onclick="toggleTerm()"><i class="fa fa-terminal"></i> <span class="hidden-md-down">Terminal</span> </button>
153153
<button class="btn btn-sm btn-primary-outline open-terminal" onclick="toggleChat()"><i class="fa fa-user"></i> <span class="hidden-md-down">Chat</span> </button>
154154

155-
<button class="btn new-package btn-sm btn-primary-outline xtrigger" path="/api/new?type=100">Plugins</button> <button class="btn xtrigger btn-sm btn-primary-outline " path="/api/new?type=100" >Helper</button> </p>
155+
<button class="btn new-package btn-sm btn-primary-outline xtrigger" path="/api/new?type=100">Plugins</button> <button class="btn btn-sm btn-primary-outline int-guides-toggle" >Helper</button> </p>
156156
</div>
157157
<div class="container-fluid full-height40" style="" id="panel">
158158
<div class="row full-height " style="margin-bottom:15px;">
@@ -234,6 +234,7 @@ box-shadow: 14px 2px 5px -8px rgba(48,48,48,0.2);background:#00101d; z-index: 10
234234
<button class="term-b" onclick="redtermwidth()"><i class="fa fa-arrow-right"></i></button>
235235
</div>
236236
<div id="terminaldefault" class="terminal" style="clear:both"></div>
237+
<button style="position: absolute;bottom: 0;right: 0;" class="btn btn-primary-outline next-dlv">Next</button>
237238
</div>
238239
<div class="footer-bay">
239240
</div>

0 commit comments

Comments
 (0)