diff --git a/dashboard-ui/css/metadataeditor.css b/dashboard-ui/css/metadataeditor.css index 8daeaeda25..e481ece130 100644 --- a/dashboard-ui/css/metadataeditor.css +++ b/dashboard-ui/css/metadataeditor.css @@ -107,8 +107,8 @@ .editorTile { display: inline-block; margin: 5px; - padding: 10px; - border: 1px solid #505050; + padding: 8px; + border: 1px solid #444; background-image: -webkit-gradient(linear,left top,left bottom,from(#444),to(#2d2d2d)); background-image: -webkit-linear-gradient(#444,#2d2d2d); background-image: -moz-linear-gradient(#444,#2d2d2d); @@ -118,7 +118,7 @@ } .imageEditorTile { - width: 192px; + width: 256px; padding-bottom: 0; } diff --git a/dashboard-ui/scripts/edititemimages.js b/dashboard-ui/scripts/edititemimages.js index ed1cca916c..a29ae40ad2 100644 --- a/dashboard-ui/scripts/edititemimages.js +++ b/dashboard-ui/scripts/edititemimages.js @@ -304,7 +304,7 @@ html += '
'; - html += '
'; + html += '
'; html += '
'; @@ -319,22 +319,22 @@ if (image.ImageType == "Backdrop" || image.ImageType == "Screenshot") { if (i > 0) { - html += ''; + html += ''; } else { - html += ''; + html += ''; } if (i < length - 1) { - html += ''; + html += ''; } else { - html += ''; + html += ''; } } - html += ''; + html += ''; if (imageProviders.length) { - html += ''; + html += ''; } html += '

'; diff --git a/dashboard-ui/scripts/metadataimagespage.js b/dashboard-ui/scripts/metadataimagespage.js index ff28ffba58..80c5253846 100644 --- a/dashboard-ui/scripts/metadataimagespage.js +++ b/dashboard-ui/scripts/metadataimagespage.js @@ -386,7 +386,7 @@ html += '' + plugin.Name + ''; - html += 'Up'; + html += 'Up'; html += ''; } @@ -395,7 +395,7 @@ html += '' + plugin.Name + ''; - html += 'Down'; + html += 'Down'; html += ''; } @@ -411,7 +411,38 @@ html += ''; html += '
Rank your preferred local metadata sources in order of priority. The first file found will be read.
'; - $('.metadataReaders', page).html(html).show().trigger('create'); + var elem = $('.metadataReaders', page).html(html).show().trigger('create'); + + $(elem).on('click', '.btnLocalReaderMove', function () { + + var li = $(this).parents('.localReaderOption'); + var ul = li.parents('ul'); + + if ($(this).hasClass('btnLocalReaderDown')) { + + var next = li.next(); + + li.remove().insertAfter(next); + + } else { + + var prev = li.prev(); + + li.remove().insertBefore(prev); + } + + $('.localReaderOption', ul).each(function () { + + if ($(this).prev('.localReaderOption').length) { + $('.btnLocalReaderMove', this).addClass('btnLocalReaderUp').removeClass('btnLocalReaderDown').attr('data-icon', 'arrow-u').removeClass('ui-icon-arrow-d').addClass('ui-icon-arrow-u'); + } else { + $('.btnLocalReaderMove', this).addClass('btnLocalReaderDown').removeClass('btnLocalReaderUp').attr('data-icon', 'arrow-d').removeClass('ui-icon-arrow-u').addClass('ui-icon-arrow-d'); + } + + }); + + ul.listview('destroy').listview({}); + }); } function loadPage(page) {