This commit is contained in:
parent
28ea0769f6
commit
d970a2e342
|
@ -391,7 +391,23 @@ func SearchText(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
sid := args["sid"].(string)
|
||||
wSession := session.WideSessions.Get(sid)
|
||||
if nil == wSession {
|
||||
data["succ"] = false
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// XXX: just one directory
|
||||
|
||||
dir := args["dir"].(string)
|
||||
if "" == dir {
|
||||
userWorkspace := conf.Wide.GetUserWorkspace(wSession.Username)
|
||||
workspaces := filepath.SplitList(userWorkspace)
|
||||
dir = workspaces[0]
|
||||
}
|
||||
|
||||
extension := args["extension"].(string)
|
||||
text := args["text"].(string)
|
||||
|
||||
|
|
|
@ -382,7 +382,13 @@ var tree = {
|
|||
},
|
||||
"ok": function () {
|
||||
var request = newWideRequest();
|
||||
request.dir = wide.curNode.path;
|
||||
|
||||
if (!wide.curNode) {
|
||||
request.dir = "";
|
||||
} else {
|
||||
request.dir = wide.curNode.path;
|
||||
}
|
||||
|
||||
request.text = $("#dialogSearchForm > input:eq(0)").val();
|
||||
request.extension = $("#dialogSearchForm > input:eq(1)").val();
|
||||
|
||||
|
|
|
@ -130,11 +130,11 @@
|
|||
<span>{{.i18n.find}}</span>
|
||||
<div class="frame">
|
||||
<ul>
|
||||
<li onclick="alert('Dev In Progress')">
|
||||
<li onclick="$('#dialogGoFilePrompt').dialog('open')">
|
||||
<span>{{.i18n.goto_file}}</span>
|
||||
</li>
|
||||
<li class="hr"></li>
|
||||
<li onclick="alert('Dev In Progress')">
|
||||
<li onclick="$('#dialogSearchForm').dialog('open')">
|
||||
<span>{{.i18n.find_in_files}}</span>
|
||||
</li>
|
||||
<li class="hr"></li>
|
||||
|
|
Loading…
Reference in New Issue