Cleaned up CSS

pull/4/head
Mark McDowall 12 years ago
parent 845c19bbcc
commit c1940ee2e7

@ -6,7 +6,7 @@
@Html.IncludeCss("Settings.css") @Html.IncludeCss("Settings.css")
} }
<style> <style>
.ui-progressbar, .progressbar { .progressbar {
position:relative; position:relative;
width: 125px; width: 125px;
height: 20px; height: 20px;
@ -15,7 +15,7 @@
margin: 2px; margin: 2px;
} }
.progressBarText, .progressbar-text { .progressbar-text {
position: absolute; position: absolute;
display: block; display: block;
width: 100%; width: 100%;
@ -27,7 +27,8 @@
border: 1px solid #065EFE; border: 1px solid #065EFE;
} }
.ui-progressbar-value .progressBarText, .ui-progressbar-value .progressbar-text { .ui-progressbar-value .progressbar-text {
position: relative;
font-weight: normal; font-weight: normal;
color: white; color: white;
} }
@ -168,16 +169,17 @@
if (row.aData["EpisodeCount"] > 0) if (row.aData["EpisodeCount"] > 0)
progress = row.aData["EpisodeFileCount"] / row.aData["EpisodeCount"] * 100; progress = row.aData["EpisodeFileCount"] / row.aData["EpisodeCount"] * 100;
var roundedProgress = Math.round(progress);
var progressbar = var progressbar =
'<div class="progressbar ui-progressbar ui-widget ui-widget-content ui-corner-all" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="92" data-value="' + progress + '">' + '<div class="progressbar ui-progressbar ui-widget ui-widget-content ui-corner-all" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="' + roundedProgress + '" data-value="' + progress + '">' +
'<span class="progressbar-text">' + row.aData["EpisodeFileCount"] + ' / ' + row.aData["EpisodeCount"] + '</span>' + '<span class="progressbar-text">' + row.aData["EpisodeFileCount"] + ' / ' + row.aData["EpisodeCount"] + '</span>' +
'<div class="ui-progressbar-value ui-widget-header ui-corner-left" style="width: ' + Math.round(progress) + '%">' + '<div class="ui-progressbar-value ui-widget-header ui-corner-left" style="width: ' + roundedProgress + '%">' +
'<span class="progressbar-text" style="width: 125px">' + row.aData["EpisodeFileCount"] + ' / ' + row.aData["EpisodeCount"] + '</span>' + '<span class="progressbar-text" style="width: 125px">' + row.aData["EpisodeFileCount"] + ' / ' + row.aData["EpisodeCount"] + '</span>' +
'</div>' + '</div>' +
'</div>'; '</div>';
return progressbar; return progressbar;
} }
}, //Episodes }, //Episodes
{ {
sClass: "commandsColumn", sClass: "commandsColumn",
@ -198,16 +200,6 @@
"fnCreatedRow": function( nRow, aData, iDataIndex ) { "fnCreatedRow": function( nRow, aData, iDataIndex ) {
$(nRow).attr('data-series-id', aData["SeriesId"].toString()); $(nRow).attr('data-series-id', aData["SeriesId"].toString());
}, },
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
var element = $(nRow).find('.progressBar');
var progressbar = $(element).progressbar({
value: parseInt($(element).attr("data-value"))
});
var label = progressbar.find('.progressBarText').clone().width(progressbar.width());
progressbar.find('.ui-progressbar-value').append(label);
},
"oLanguage": { "oLanguage": {
"sEmptyTable": "No series have been added" "sEmptyTable": "No series have been added"
} }

Loading…
Cancel
Save