(trunk web) #4731 "'Select All' and 'Deselect All' options missing from Inspector>Files" -- fixed.

This commit is contained in:
Jordan Lee 2012-02-03 22:59:33 +00:00
parent fbc7f3dc3c
commit 9a27751d77
6 changed files with 106 additions and 8 deletions

View File

@ -239,6 +239,10 @@
</div><!-- id="inspector_tab_trackers_container" -->
<div style="display:none;" class="inspector-page" id="inspector-page-files">
<ul id="file-list-header">
<li id="select-all-files">Select All</li>
<li id="deselect-all-files">Deselect All</li>
</ul>
<ul id="inspector_file_list">
</ul>
</div><!-- id="inspector_tab_files_container" -->

View File

@ -453,6 +453,14 @@ function Inspector(controller) {
data.controller.changeFileCommand(torrentId, rowIndices, command);
},
selectAllFiles = function() {
changeFileCommand([], 'files-wanted');
},
deselectAllFiles = function() {
changeFileCommand([], 'files-unwanted');
},
onFileWantedToggled = function(ev, row, want) {
changeFileCommand([row], want?'files-wanted':'files-unwanted');
},
@ -714,6 +722,10 @@ function Inspector(controller) {
data.elements.comment_lb = $('#inspector-info-comment')[0];
data.elements.name_lb = $('#torrent_inspector_name')[0];
// file page's buttons
$('#select-all-files').click(selectAllFiles);
$('#deselect-all-files').click(deselectAllFiles);
// force initial 'N/A' updates on all the pages
updateInspector();
updateInfoPage();

View File

@ -607,6 +607,34 @@ div#torrent_inspector {
font-size: 1.2em;
font-weight: bold;
color: #222; }
div#torrent_inspector #file-list-header {
float: right; }
div#torrent_inspector #file-list-header > * {
cursor: pointer;
-moz-user-select: none;
-webkit-user-select: none;
display: inline-block;
border-style: solid;
border-color: #aaa;
border-width: 1px;
padding: 3px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: #dddddd;
background-image: -webkit-gradient(linear, left top, left bottom, from(white), to(#bbbbbb));
background-image: -webkit-linear-gradient(top, white, #bbbbbb);
background-image: -moz-linear-gradient(top, white, #bbbbbb);
background-image: -ms-linear-gradient(top, white, #bbbbbb);
background-image: -o-linear-gradient(top, white, #bbbbbb);
background-image: linear-gradient(top, white, #bbbbbb); }
div#torrent_inspector #file-list-header > *:active {
background-color: #e6e6ff;
background-image: -webkit-gradient(linear, left top, left bottom, from(#cdcdff), to(white));
background-image: -webkit-linear-gradient(top, #cdcdff, white);
background-image: -moz-linear-gradient(top, #cdcdff, white);
background-image: -ms-linear-gradient(top, #cdcdff, white);
background-image: -o-linear-gradient(top, #cdcdff, white);
background-image: linear-gradient(top, #cdcdff, white); }
div#torrent_inspector #inspector_file_list {
padding: 0 0 0 0;
margin: 0 0 0 0;

View File

@ -551,6 +551,11 @@ div#torrent_inspector
bottom: 22px;
right: 0px;
$idle-color-top: $nonselected-gradient-top;
$idle-color-bottom: $nonselected-gradient-bottom;
$active-color-top: $selected-gradient-top;
$active-color-bottom: $selected-gradient-bottom;
#inspector-close
{
display: none;
@ -565,10 +570,6 @@ div#torrent_inspector
#inspector-tabs
{
$border-radius: 5px;
$idle-color-top: $nonselected-gradient-top;
$idle-color-bottom: $nonselected-gradient-bottom;
$active-color-top: $selected-gradient-top;
$active-color-bottom: $selected-gradient-bottom;
display: inline-block;
@ -661,6 +662,18 @@ div#torrent_inspector
}
/* Files Inspector Tab */
#file-list-header {
float: right;
> * {
@include roundedButton(5px);
@include verticalGradient($idle-color-top, $idle-color-bottom);
&:active {
@include verticalGradient($active-color-top, $active-color-bottom);
}
}
}
#inspector_file_list {
padding: 0 0 0 0;
margin: 0 0 0 0;
@ -668,6 +681,7 @@ div#torrent_inspector
cursor: default;
overflow: hidden;
}
#inspector_file_list {
border-top: 1px solid #888;
width: 100%;

View File

@ -564,6 +564,34 @@ div#torrent_inspector {
font-size: 1.2em;
font-weight: bold;
color: #222; }
div#torrent_inspector #file-list-header {
float: right; }
div#torrent_inspector #file-list-header > * {
background-color: #dddddd;
background-image: -webkit-gradient(linear, left top, left bottom, from(white), to(#bbbbbb));
background-image: -webkit-linear-gradient(top, white, #bbbbbb);
background-image: -moz-linear-gradient(top, white, #bbbbbb);
background-image: -ms-linear-gradient(top, white, #bbbbbb);
background-image: -o-linear-gradient(top, white, #bbbbbb);
background-image: linear-gradient(top, white, #bbbbbb);
cursor: pointer;
-moz-user-select: none;
-webkit-user-select: none;
display: inline-block;
border-style: solid;
border-color: #aaa;
border-width: 1px;
padding: 3px;
-moz-border-radius: 5px;
border-radius: 5px; }
div#torrent_inspector #file-list-header > *:active {
background-color: #e6e6ff;
background-image: -webkit-gradient(linear, left top, left bottom, from(#cdcdff), to(white));
background-image: -webkit-linear-gradient(top, #cdcdff, white);
background-image: -moz-linear-gradient(top, #cdcdff, white);
background-image: -ms-linear-gradient(top, #cdcdff, white);
background-image: -o-linear-gradient(top, #cdcdff, white);
background-image: linear-gradient(top, #cdcdff, white); }
div#torrent_inspector #inspector_file_list {
padding: 0 0 0 0;
margin: 0 0 0 0;

View File

@ -497,6 +497,11 @@ div#torrent_inspector
width: 100%;
z-index: 2;
$idle-color-top: $nonselected-gradient-top;
$idle-color-bottom: $nonselected-gradient-bottom;
$active-color-top: $selected-gradient-top;
$active-color-bottom: $selected-gradient-bottom;
#inspector-tabs-wrapper
{
@ -507,10 +512,6 @@ div#torrent_inspector
#inspector-tabs
{
$border-radius: 5px;
$idle-color-top: $nonselected-gradient-top;
$idle-color-bottom: $nonselected-gradient-bottom;
$active-color-top: $selected-gradient-top;
$active-color-bottom: $selected-gradient-bottom;
display: inline-block;
@ -602,6 +603,17 @@ div#torrent_inspector
color: #222;
}
#file-list-header {
float: right;
> * {
@include verticalGradient($idle-color-top, $idle-color-bottom);
@include roundedButton(5px);
&:active {
@include verticalGradient($active-color-top, $active-color-bottom);
}
}
}
/* Files Inspector Tab */
#inspector_file_list {
padding: 0 0 0 0;