Implement simple button

pull/845/head
Marcus Hann 8 years ago
parent 2d7ded325f
commit e56e244efb

@ -83,7 +83,7 @@ $(function () {
});
// Click TV dropdown option
$(document).on("click", ".dropdownTv", function (e) {
$(document).on("click", ".requestTv", function (e) {
e.preventDefault();
var buttonId = e.target.id;
if ($("#" + buttonId).attr('disabled')) {
@ -429,7 +429,8 @@ $(function () {
url: result.plexUrl,
tvPartialAvailable: result.tvPartialAvailable,
disableTvRequestsByEpisode: result.disableTvRequestsByEpisode,
disableTvRequestsBySeason: result.disableTvRequestsBySeason
disableTvRequestsBySeason: result.disableTvRequestsBySeason,
enableTvRequestsForOnlySeries: result.enableTvRequestsForOnlySeries
};
return context;

@ -57,5 +57,6 @@ namespace Ombi.UI.Models
public bool TvFullyAvailable { get; set; }
public bool DisableTvRequestsByEpisode { get; set; }
public bool DisableTvRequestsBySeason { get; set; }
public bool EnableTvRequestsForOnlySeries { get; set; }
}
}

@ -363,7 +363,8 @@ namespace Ombi.UI.Modules
SeriesName = t.show.name,
Status = t.show.status,
DisableTvRequestsByEpisode = prSettings.DisableTvRequestsByEpisode,
DisableTvRequestsBySeason = prSettings.DisableTvRequestsBySeason
DisableTvRequestsBySeason = prSettings.DisableTvRequestsBySeason,
EnableTvRequestsForOnlySeries = (prSettings.DisableTvRequestsByEpisode && prSettings.DisableTvRequestsBySeason)
};

@ -107,7 +107,7 @@
}
<!-- Movie and TV Results template -->
<script id="search-template" type="text/x-handlebars-template">
<script id="search-template" type="text/x-handlebars-template">
<div class="row">
<div class="col-sm-2">
@ -174,6 +174,9 @@
{{#if_eq tvFullyAvailable true}}
@*//TODO Not used yet*@
<button style="text-align: right" class="btn btn-success-outline disabled" disabled><i class="fa fa-check"></i> @UI.Search_Available</button><br />
{{else}}
{{#if_eq enableTvRequestsForOnlySeries true}}
<button id="{{id}}" style="text-align: right" class="btn {{#if available}}btn-success-outline{{else}}btn-primary-outline{{/if}} btn-primary-outline requestTv" season-select="0" type="button"><i class="fa fa-plus"></i> @UI.Search_Request</button>
{{else}}
<div class="dropdown">
<button id="{{id}}" class="btn {{#if available}}btn-success-outline{{else}}btn-primary-outline{{/if}} dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
@ -192,6 +195,7 @@
{{/if_eq}}
</ul>
</div>
{{/if_eq}}
{{#if available}}
<br />
<a style="text-align: right" class="btn btn-sm btn-primary-outline" href="{{url}}" target="_blank"><i class="fa fa-eye"></i> @UI.Search_ViewInPlex</a>

Loading…
Cancel
Save