parent
1411cac54a
commit
fdfd0a2153
@ -1,49 +1,72 @@
|
|||||||
<style>
|
<script>
|
||||||
.quality-selectee { width: 75px; padding: 1px; padding-left: 5px; margin: 3px; }
|
(function ($) {
|
||||||
.quality-selecting { background: #85AEF9; }
|
$.fn.episodeProgress = function (episodes, totalEpisodes) {
|
||||||
.quality-selected { background: #065EFE; color: white; }
|
return this.each(
|
||||||
</style>
|
function () {
|
||||||
|
var div = $(this);
|
||||||
<fieldset class="quality-selectee">
|
var innerdiv = div.find(".progress");
|
||||||
SDTV
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset class="quality-selectee">
|
|
||||||
DVD
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset class="quality-selectee">
|
|
||||||
HDTV
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset class="quality-selectee">
|
var width = Math.round(episodes / totalEpisodes * 100);
|
||||||
WEBDL
|
innerdiv.css("width", width + "%");
|
||||||
</fieldset>
|
div.find(".progressText").html(episodes + " / " + totalEpisodes);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
})(jQuery);
|
||||||
|
</script>
|
||||||
|
|
||||||
<fieldset class="quality-selectee">
|
<style>
|
||||||
Bluray720p
|
/* progress bar container */
|
||||||
</fieldset>
|
.progressbar
|
||||||
|
{
|
||||||
|
z-index: 1;
|
||||||
|
border:1px solid grey;
|
||||||
|
-khtml-border-radius:8px;
|
||||||
|
border-radius:8px;
|
||||||
|
-moz-border-radius:8px;
|
||||||
|
-webkit-border-radius:8px;
|
||||||
|
width:125px;
|
||||||
|
height:20px;
|
||||||
|
position:relative;
|
||||||
|
color:black;
|
||||||
|
}
|
||||||
|
|
||||||
<fieldset class="quality-selectee">
|
.progress
|
||||||
Bluray1080p
|
{
|
||||||
</fieldset>
|
z-index: 5;
|
||||||
|
}
|
||||||
|
|
||||||
<br />
|
/* color bar */
|
||||||
|
.progressbar div.progress
|
||||||
@Html.TextBox("result", "")
|
{
|
||||||
|
position:absolute;
|
||||||
<script type="text/javascript">
|
width:0;
|
||||||
$('.quality-selectee').click(function () {
|
height:100%;
|
||||||
if ($(this).hasClass('quality-selected'))
|
overflow:hidden;
|
||||||
$(this).removeClass('quality-selected');
|
background-color:#065EFE;
|
||||||
else
|
}
|
||||||
$(this).addClass('quality-selected');
|
/* text on bar */
|
||||||
|
.progressbar div.progress .progressText{
|
||||||
|
position:absolute;
|
||||||
|
text-align:center;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
/* text off bar */
|
||||||
|
.progressbar div.progressText{
|
||||||
|
position:absolute;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
result = "";
|
<div id="progressbar" class="progressbar">
|
||||||
$(".quality-selected").each(function () {
|
<div class="progressText"></div>
|
||||||
result += this.firstChild.data + ",";
|
<div class="progress">
|
||||||
});
|
<span class="progressText" style="width: 125px;"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
$("#result").empty().val(result);
|
<script>
|
||||||
});
|
$("#progressbar").episodeProgress(100, 200);
|
||||||
</script>
|
</script>
|
Loading…
Reference in new issue