Skip to content

Commit

Permalink
Merge pull request #333 from tidusjar/dev
Browse files Browse the repository at this point in the history
Dev to master
  • Loading branch information
Jamie authored Jun 21, 2016
2 parents 2963f38 + 292e078 commit 6f30ce2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion PlexRequests.Core/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ private void CreateDefaultSettingsPage(string baseUrl)
SearchForMovies = true,
SearchForTvShows = true,
WeeklyRequestLimit = 0,
BaseUrl = baseUrl ?? string.Empty
BaseUrl = baseUrl ?? string.Empty,
CollectAnalyticData = true,
};
var s = new SettingsServiceV2<PlexRequestSettings>(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
s.SaveSettings(defaultSettings);
Expand Down
9 changes: 8 additions & 1 deletion PlexRequests.UI/Modules/AdminModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,14 @@ private Response SaveSlackNotifications()
private async Task<Negotiator> LandingPage()
{
var settings = await LandingSettings.GetSettingsAsync();

if (settings.NoticeEnd == DateTime.MinValue)
{
settings.NoticeEnd = DateTime.Now;
}
if (settings.NoticeStart == DateTime.MinValue)
{
settings.NoticeStart = DateTime.Now;
}
return View["LandingPage", settings];
}

Expand Down
6 changes: 3 additions & 3 deletions PlexRequests.UI/Modules/IssuesModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ private async Task<IEnumerable<IssuesModel>> FilterIssuesAsync(IEnumerable<Issue

return myIssues;
}
private async Task<Negotiator> RemoveIssue(int issueId)
private async Task<Response> RemoveIssue(int issueId)
{
try
{
Expand All @@ -378,13 +378,13 @@ private async Task<Negotiator> RemoveIssue(int issueId)
await IssuesService.DeleteIssueAsync(issueId);
}

return View["Index"];
return Response.AsJson(new JsonResponseModel() { Result = true });

}
catch (Exception e)
{
Log.Error(e);
return View["Index"];
return Response.AsJson(new JsonResponseModel() { Result = false, Message = "Could not delete issue! Check the logs."});
}

}
Expand Down
4 changes: 2 additions & 2 deletions PlexRequests.UI/Views/Issues/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</div>

<script id="issue-template" type="text/x-handlebars-template">
<div>
<div id="{{id}}Template">
<div class="row">
<div class="col-md-3">
<div id="title">{{title}}</div>
Expand All @@ -83,7 +83,7 @@
<div class="col-sm-1">
<a href="" id="{{id}}link" class="btn btn-sm btn-info-outline approve"><i class="fa fa-info"></i> Details</a>
<br />
<form action="@formAction/issues/remove" method="post">
<form action="@formAction/issues/remove" method="post" id="delete{{id}}">
<input id="issueId" name="issueId" value="{{id}}" hidden="hidden" />
<button type="submit" id="{{id}}" class="btn btn-sm btn-danger-outline dropdown-toggle delete">Remove</button>
</form>
Expand Down

0 comments on commit 6f30ce2

Please sign in to comment.