fix datatable width

This commit is contained in:
kaso17 2017-02-03 13:57:16 +01:00
parent 732878a64f
commit dcfd0ee807
2 changed files with 20 additions and 18 deletions

View File

@ -723,6 +723,7 @@ function updateSearchResultTable(element, results) {
var datatable = element.find('table').DataTable( var datatable = element.find('table').DataTable(
{ {
"stateSave": true, "stateSave": true,
"bAutoWidth": false,
"pageLength": 20, "pageLength": 20,
"lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]], "lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
"order": [[0, "desc"]], "order": [[0, "desc"]],
@ -819,14 +820,16 @@ function bindUIButtons() {
var releaseTemplate = Handlebars.compile($("#jackett-releases").html()); var releaseTemplate = Handlebars.compile($("#jackett-releases").html());
var item = { releases: data, Title: 'Releases' }; var item = { releases: data, Title: 'Releases' };
var releaseDialog = $(releaseTemplate(item)); var releaseDialog = $(releaseTemplate(item));
var table = releaseDialog.find('table');
releaseDialog.find('tr.jackett-releases-row').each(function () { updateReleasesRow(this); }); releaseDialog.find('tr.jackett-releases-row').each(function () { updateReleasesRow(this); });
releaseDialog.on('hidden.bs.modal', function (e) { releaseDialog.on('hidden.bs.modal', function (e) {
$('#indexers div.dataTables_filter input').focusWithoutScrolling(); $('#indexers div.dataTables_filter input').focusWithoutScrolling();
}); });
var table = releaseDialog.find('table');
table.DataTable( table.DataTable(
{ {
"stateSave": true, "stateSave": true,
"bAutoWidth": false,
"pageLength": 20, "pageLength": 20,
"lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]], "lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
"order": [[0, "desc"]], "order": [[0, "desc"]],
@ -895,7 +898,6 @@ function bindUIButtons() {
}); });
$("#modals").append(releaseDialog); $("#modals").append(releaseDialog);
releaseDialog.modal("show"); releaseDialog.modal("show");
}).fail(function () { }).fail(function () {
doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert"); doNotify("Request to Jackett server failed", "danger", "glyphicon glyphicon-alert");
}); });

View File

@ -299,30 +299,30 @@
<th>Grabs</th> <th>Grabs</th>
<th>Seeds</th> <th>Seeds</th>
<th>Leechers</th> <th>Leechers</th>
<th>DL Factor</th> <th class="fit">DL Factor</th>
<th>UL Factor</th> <th class="fit">UL Factor</th>
<th>Download</th> <th>Download</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#each releases}} {{#each releases}}
<tr class="jackett-releases-row" data-imdb="{{Imdb}}" data-banner="{{BannerUrl}}" data-description="{{Description}}"> <tr class="jackett-releases-row" data-imdb="{{Imdb}}" data-banner="{{BannerUrl}}" data-description="{{Description}}">
<td>{{PublishDate}}</td> <td class="fit">{{PublishDate}}</td>
<td>{{FirstSeen}}</td> <td class="fit">{{FirstSeen}}</td>
<td>{{jacketTimespan PublishDate}}</td> <td class="fit">{{jacketTimespan PublishDate}}</td>
<td>{{jacketTimespan FirstSeen}}</td> <td class="fit">{{jacketTimespan FirstSeen}}</td>
<td>{{Tracker}}</td> <td class="fit">{{Tracker}}</td>
<td class="Title"><a href="{{Comments}}">{{Title}}</a> <span class="release-labels"></span></td> <td class="Title"><a href="{{Comments}}">{{Title}}</a> <span class="release-labels"></span></td>
<td>{{Size}}</td> <td class="fit">{{Size}}</td>
<td class="fit">{{jacketSize Size}}</td> <td class="fit">{{jacketSize Size}}</td>
<td>{{Files}}</td> <td class="fit">{{Files}}</td>
<td>{{CategoryDesc}}</td> <td class="fit">{{CategoryDesc}}</td>
<td>{{Grabs}}</td> <td class="fit">{{Grabs}}</td>
<td>{{Seeders}}</td> <td class="fit">{{Seeders}}</td>
<td>{{Peers}}</td> <td class="fit">{{Peers}}</td>
<td class="DownloadVolumeFactor">{{DownloadVolumeFactor}}</td> <td class="fit DownloadVolumeFactor">{{DownloadVolumeFactor}}</td>
<td class="UploadVolumeFactor">{{UploadVolumeFactor}}</td> <td class="fit UploadVolumeFactor">{{UploadVolumeFactor}}</td>
<td class="downloadcolumn"> <td class="fit downloadcolumn">
{{#if Link}} {{#if Link}}
<a class="downloadlink" title="Download locally" href="{{Link}}"><i class="fa fa-download"></i></a> <a class="downloadlink" title="Download locally" href="{{Link}}"><i class="fa fa-download"></i></a>
{{/if}} {{/if}}