diff --git a/web/index.html b/web/index.html index df1dbabc4..df935109c 100755 --- a/web/index.html +++ b/web/index.html @@ -239,6 +239,10 @@ diff --git a/web/javascript/inspector.js b/web/javascript/inspector.js index cbac04635..37768a418 100644 --- a/web/javascript/inspector.js +++ b/web/javascript/inspector.js @@ -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(); diff --git a/web/style/transmission/common.css b/web/style/transmission/common.css index fdaaeebae..34b90aab4 100644 --- a/web/style/transmission/common.css +++ b/web/style/transmission/common.css @@ -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; diff --git a/web/style/transmission/common.scss b/web/style/transmission/common.scss index b16c5f04d..651fb4ddd 100644 --- a/web/style/transmission/common.scss +++ b/web/style/transmission/common.scss @@ -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%; diff --git a/web/style/transmission/mobile.css b/web/style/transmission/mobile.css index c6ee70de7..823bf2f27 100644 --- a/web/style/transmission/mobile.css +++ b/web/style/transmission/mobile.css @@ -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; diff --git a/web/style/transmission/mobile.scss b/web/style/transmission/mobile.scss index 294860bc8..8c1263a4d 100644 --- a/web/style/transmission/mobile.scss +++ b/web/style/transmission/mobile.scss @@ -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;