Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yswenli committed Mar 13, 2019
1 parent 24d69de commit 4c0bf80
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 16 deletions.
5 changes: 2 additions & 3 deletions SAEA.RESTED/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ActionResult GetGroups()
return Content(RecordDataHelper.GetGroups());
}

public ActionResult AddItem(string groupID,string title, string method, string url, string json)
public ActionResult AddItem(string groupID, string title, string method, string url, string json)
{
var result = "0";
if (!string.IsNullOrWhiteSpace(groupID) && !string.IsNullOrWhiteSpace(title) && !string.IsNullOrWhiteSpace(method) && !string.IsNullOrWhiteSpace(url))
Expand Down Expand Up @@ -128,7 +128,7 @@ public ActionResult GetItem(string groupID, string itemID)


public ActionResult Search(string keywords)
{
{
return Content(RecordDataHelper.Search(keywords));
}

Expand Down Expand Up @@ -164,7 +164,6 @@ public ActionResult Export()
return Json(RecordDataHelper.Read());
}


public ActionResult Request(string method, string url, string data)
{
var result = string.Empty;
Expand Down
4 changes: 2 additions & 2 deletions SAEA.RESTED/SAEA.RESTED.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<Reference Include="SAEA.Http, Version=4.2.3.6, Culture=neutral, PublicKeyToken=01a82380791791ab, processorArchitecture=MSIL">
<HintPath>..\packages\SAEA.Http.4.2.3.6\lib\netstandard2.0\SAEA.Http.dll</HintPath>
</Reference>
<Reference Include="SAEA.MVC, Version=4.2.3.6, Culture=neutral, PublicKeyToken=01a82380791791ab, processorArchitecture=MSIL">
<HintPath>..\packages\SAEA.MVC.4.2.3.6\lib\netstandard2.0\SAEA.MVC.dll</HintPath>
<Reference Include="SAEA.MVC, Version=4.2.4.1, Culture=neutral, PublicKeyToken=01a82380791791ab, processorArchitecture=MSIL">
<HintPath>..\packages\SAEA.MVC.4.2.4.1\lib\netstandard2.0\SAEA.MVC.dll</HintPath>
</Reference>
<Reference Include="SAEA.Sockets, Version=4.2.3.6, Culture=neutral, PublicKeyToken=01a82380791791ab, processorArchitecture=MSIL">
<HintPath>..\packages\SAEA.Sockets.4.2.3.6\lib\netstandard2.0\SAEA.Sockets.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion SAEA.RESTED/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net462" />
<package id="SAEA.Common" version="4.2.3.6" targetFramework="net462" />
<package id="SAEA.Http" version="4.2.3.6" targetFramework="net462" />
<package id="SAEA.MVC" version="4.2.3.6" targetFramework="net462" />
<package id="SAEA.MVC" version="4.2.4.1" targetFramework="net462" />
<package id="SAEA.Sockets" version="4.2.3.6" targetFramework="net462" />
<package id="System.Buffers" version="4.5.0" targetFramework="net462" />
<package id="System.Memory" version="4.5.2" targetFramework="net462" />
Expand Down
66 changes: 62 additions & 4 deletions SAEA.RESTED/wwwroot/content/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ textarea {
}

.list-item:hover {
background-color: #46a9ff;
border: solid 1px #46a9ff;
background-color: #ffffff;
border: solid 1px #f5f5f5;
}

.panel-footer {
Expand Down Expand Up @@ -170,8 +170,8 @@ a[aria-expanded="false"] {
}

.search-list div:hover {
background-color: #46a9ff;
border: solid 1px #46a9ff;
background-color: #ffffff;
border: solid 1px #f5f5f5;
color: #01063d;
}

Expand All @@ -194,3 +194,61 @@ a[aria-expanded="false"] {
overflow: scroll;
word-wrap: break-word;
}

.flicker {
animation: searchLights 0.5s ease-in 0.5s infinite;
}



@-webkit-keyframes searchLights {
0% {
left: 647px;
top: 120px;
background-color: #cfcfcf;
}

to {
left: 0;
top: 0;
}
}

@-o-keyframes searchLights {
0% {
left: 647px;
top: 120px;
background-color: #cfcfcf;
}

to {
left: 0;
top: 0;
}
}

@-moz-keyframes searchLights {
0% {
left: 647px;
top: 120px;
background-color: #cfcfcf;
}

to {
left: 0;
top: 0;
}
}

@keyframes searchLights {
0% {
left: 647px;
top: 120px;
background-color: #cfcfcf;
}

to {
left: 0;
top: 0;
}
}
25 changes: 19 additions & 6 deletions SAEA.RESTED/wwwroot/content/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,19 @@
if (groupID !== "" && itemID !== "") {

$.get("/home/getitem", `groupID=${groupID}&itemID=${itemID}`, function (data) {

setTimeout("$('#loading').modal('hide')", 500);

if (data !== undefined || data !== "") {
$("#methodSel").val(data.Method);
$("#methodSel").change();
$("#urlTxt").val(data.Url);
$("#methodSel").change();
$("#dataTxt").val(data.RequestJson);
$("#urlTxt").addClass("flicker");
setTimeout(function () {
$("#urlTxt").removeClass("flicker");
$("#urlTxt").val(data.Url);
}, 1000);
}
setTimeout("$('#loading').modal('hide')", 1000);
});
}
});
Expand All @@ -224,13 +230,20 @@
if (groupID !== "" && itemID !== "") {

$.get("/home/getitem", `groupID=${groupID}&itemID=${itemID}`, function (data) {

setTimeout("$('#loading').modal('hide')", 500);

if (data !== undefined || data !== "") {
$("#methodSel").val(data.Method);
$("#methodSel").change();
$("#urlTxt").val(data.Url);
$("#dataTxt").val(data.RequestJson);
$("#urlTxt").addClass("flicker");
setTimeout(function () {
$("#urlTxt").removeClass("flicker");
$("#urlTxt").val(data.Url);
}, 1000);
}
setTimeout("$('#loading').modal('hide')", 1000);

});
}
});
Expand Down Expand Up @@ -269,7 +282,7 @@
});

//快捷键
$("#urlTxt").keyup(function (event){
$("#urlTxt").keyup(function (event) {
if (event.keyCode === 13) {
$("#runBtn").click();
}
Expand Down

0 comments on commit 4c0bf80

Please sign in to comment.