Skip to content

Instantly share code, notes, and snippets.

@jhenkens
Created February 24, 2015 22:27
Show Gist options
  • Save jhenkens/0dac233b41c3ab276967 to your computer and use it in GitHub Desktop.
Save jhenkens/0dac233b41c3ab276967 to your computer and use it in GitHub Desktop.
diff --git a/web/index.html b/web/index.html
index d77a0ab..2ec858d 100755
--- a/web/index.html
+++ b/web/index.html
@@ -44,6 +44,9 @@
<div id="toolbar-start" title="Start Selected Torrents"></div>
<div id="toolbar-pause" title="Pause Selected Torrents"></div>
<div id="toolbar-separator"></div>
+ <div id="toolbar-download-random" title="Download Selected Torrent Normally"></div>
+ <div id="toolbar-download-sequential" title="Downloaded Selected Torrent Sequentially"></div>
+ <div id="toolbar-separator"></div>
<div id="toolbar-start-all" title="Start All Torrents"></div>
<div id="toolbar-pause-all" title="Pause All Torrents"></div>
<div id="toolbar-inspector" title="Toggle Inspector"></div>
diff --git a/web/javascript/transmission.js b/web/javascript/transmission.js
index 2aea612..b25841f 100644
--- a/web/javascript/transmission.js
+++ b/web/javascript/transmission.js
@@ -43,6 +43,8 @@ Transmission.prototype =
// Set up user events
$('#toolbar-pause').click($.proxy(this.stopSelectedClicked,this));
$('#toolbar-start').click($.proxy(this.startSelectedClicked,this));
+ $('#toolbar-download-sequential').click($.proxy(this.downloadSelectedSequentialClicked,this));
+ $('#toolbar-download-random').click($.proxy(this.downloadSelectedRandomClicked,this));
$('#toolbar-pause-all').click($.proxy(this.stopAllClicked,this));
$('#toolbar-start-all').click($.proxy(this.startAllClicked,this));
$('#toolbar-remove').click($.proxy(this.removeClicked,this));
@@ -492,6 +494,20 @@ Transmission.prototype =
}
},
+ downloadSelectedSequentialClicked: function(ev) {
+ if (this.isButtonEnabled(ev)) {
+ this.sequentialSelectedTorrents(true);
+ this.hideMobileAddressbar();
+ }
+ },
+
+ downloadSelectedRandomClicked: function(ev) {
+ if (this.isButtonEnabled(ev)) {
+ this.sequentialSelectedTorrents(false);
+ this.hideMobileAddressbar();
+ }
+ },
+
stopAllClicked: function(ev) {
if (this.isButtonEnabled(ev)) {
this.stopAllTorrents();
diff --git a/web/style/transmission/common.css b/web/style/transmission/common.css
index 39fbfad..0c4b4aa 100644
--- a/web/style/transmission/common.css
+++ b/web/style/transmission/common.css
@@ -86,6 +86,10 @@ div#toolbar {
background-image: url("images/toolbar-start.png"); }
div#toolbar > div#toolbar-pause {
background-image: url("images/toolbar-pause.png"); }
+ div#toolbar > div#toolbar-download-random {
+ background-image: url("images/toolbar-download-random.png"); }
+ div#toolbar > div#toolbar-download-sequential {
+ background-image: url("images/toolbar-download-sequential.png"); }
div#toolbar > div#toolbar-start-all {
background-image: url("images/toolbar-start-all.png"); }
div#toolbar > div#toolbar-pause-all {
diff --git a/web/style/transmission/common.scss b/web/style/transmission/common.scss
index 621ad9e..7162ce0 100644
--- a/web/style/transmission/common.scss
+++ b/web/style/transmission/common.scss
@@ -167,6 +167,12 @@ div#toolbar
> div#toolbar-pause {
background-image: url('images/toolbar-pause.png');
}
+ > div#toolbar-download-random {
+ background-image: url('images/toolbar-download-random.png');
+ }
+ > div#toolbar-download-sequential {
+ background-image: url('images/toolbar-download-sequential.png');
+ }
> div#toolbar-start-all {
background-image: url('images/toolbar-start-all.png');
}
diff --git a/web/style/transmission/images/Makefile.am b/web/style/transmission/images/Makefile.am
index 9a72835..5f29c98 100644
--- a/web/style/transmission/images/Makefile.am
+++ b/web/style/transmission/images/Makefile.am
@@ -24,6 +24,8 @@ dist_data_DATA = \
toolbar-info.png \
toolbar-pause.png \
toolbar-start.png \
+ toolbar-download-random.png \
+ toolbar-download-sequential.png \
toolbar-pause-all.png \
toolbar-start-all.png \
turtle.png \
diff --git a/web/style/transmission/images/Makefile.in b/web/style/transmission/images/Makefile.in
index ede0b7a..f0b1e8f 100644
--- a/web/style/transmission/images/Makefile.in
+++ b/web/style/transmission/images/Makefile.in
@@ -416,6 +416,8 @@ dist_data_DATA = \
toolbar-info.png \
toolbar-pause.png \
toolbar-start.png \
+ toolbar-download-random.png \
+ toolbar-download-sequential.png \
toolbar-pause-all.png \
toolbar-start-all.png \
turtle.png \
diff --git a/web/style/transmission/images/toolbar-download-random.png b/web/style/transmission/images/toolbar-download-random.png
new file mode 100644
index 0000000000000000000000000000000000000000..c1f2b7644eb97f30b2b4e3721e2bc44ccc9be3d1
GIT binary patch
literal 1227
zcmV;+1T_1JP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800004b3#c}2nYxW
zd<bNS00009a7bBm000pQ000pQ0l?*=7ytkO8FWQhbW?9;ba!ELWdL_~cP?peYja~^
zaAhuUa%Y?FJQ@H11V~9lK~z|Uy;n_a8$}fU-q=kOz;%#7PzhS4k<*AKX|p@ym>?lc
z1sp0=s89kzrN9AbxRf4<D5wW2l@<gARSIwb%7uf)kB|@t5-JV_QSZ)10Yn9Hk$?lx
z9!RnvT(X|WAx`9M*6|O7cUrygoA-U5@ywecX2x2DZQFMe(MbTuUDtgziX+xceIa%M
z*bHFIw(U1ksnq)a+rUx~(ZlWS?Pt>I^!3Z~%#5L-p;)0%xJ3w&s2K1kGk@p0?oW*f
z4Gs>r&Ck#G0@!Gb*-u1wgeVt@XvlG#&j5gI+s*<w1z=N^nwp449LLG8CM>1Aiin<P
z=Dh&oHGBp{^rYiBC&;$#kFc;-tHnGs->bELKMKrbGS>t_@F{?8HR^=phyc)C2XP${
zy=7U}<}i@WW?O?G7;i!x0Bk`-&(=xaAcQzYL{ypdegA0yy-kRp2C$C+kWy-=G3IUn
zmsb$B0?33%G4m5z>z4swU|^uDR4RQ9pe026jflpXISrsIT!V;S=;-KpDwoTZsM<l4
zN~P8(lSvQ24I!v#jOq3~??<K71T*gp;XX54TI+&s+piJPqZQa6MD&p3IPWeds-6SW
z)6<s#>;({npjIKoT}r9@BE-SWhqcy)h?3tMV+Jb4S2X|tuIqXLjzmCLF!M_h`N_`C
z&XY^Uh4`WT`C&XBSDxp68y-+=zao)H9QA#F3xIv))Gy3@9T8m{q8cK4ESJlb785fw
zGp{6*$uG3lpL3P9uKFJchf?Y$W^O5!O2t?#b_OeFZ_IVw$LlKAi~#^3A|a(b%giza
z{R*Jlb=}!U4K&n@EX&#-Ar2xs*o-*Pzzj$!Hv%{ZAX%Ab<_WF!ZOw=S4a@)$od}Bq
zxMYkOX;vJlV;2B`l=5}}!{IzLKQ}o!IsI=8)SQ8AHrondECQOIo0~fZ0DXOZS6Y^J
zb(ql8)6<epr?-XsM?(gD-#-MPbHzX*Mhb<(-%6?XT3T8z2qDf(DMu?gZEbA_j4|KX
zw*5gSliAR)0j1Pd0HYDmJNbNm!m_Mg%)AE+OPK(0%(m^Nv%na$rTn=&2m;5ltZ-kc
zZa_-8&KUDLR(87Ccsza(0ElSC9e{{lv@C0TM9D58#95`(J<IsajC4A!N~O{RM3kt&
zdI4Awg+>;y*!}(esaPy_4nQo#nE@~kU^{BHW6QD*l($$tk=I(^$joLjA*Fl<(G9Cs
zoCYu~i0HvO2NaDlk5q~SfY$mbGfy;O;8p-{3jn{@LH-NCZqM_k!T>XyAPDXUaJ~r>
zS`g7FfVovjUjoRwuKP(f!qn8%g<`R|1Hf?rKi44~l>5hFVrFEs*;e28Zw7GLBEuNt
z1Nh4Gyo>eyn1vuBl2Yyfu&J(x$r?XSm)!}8$R(mZ`Fwt9mg?#S|3xtKo3pdCBjvm1
pQmm-~A;ibbJPhEF);jWe{tpltxX8)IKTrSw002ovPDHLkV1muLBZmM0
literal 0
HcmV?d00001
diff --git a/web/style/transmission/images/toolbar-download-sequential.png b/web/style/transmission/images/toolbar-download-sequential.png
new file mode 100644
index 0000000000000000000000000000000000000000..796cf4a02dbea6d263ea53107bdddee82c8109bb
GIT binary patch
literal 501
zcmV<R0Sf+!P)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800004b3#c}2nYxW
zd<bNS00009a7bBm000pQ000pQ0l?*=7ytkO8FWQhbW?9;ba!ELWdL_~cP?peYja~^
zaAhuUa%Y?FJQ@H10dh%1K~z|U?Uy@C13?r<&owJXF{PcIl}(DwEh5+i{1YifthExs
z2Z(}}!A20$SePH8V2G1IgcKrnc2*Mcfg#tzO()_eVHY$97M6vN?=Z{`bH&U^lCebF
zfdD{N=YS$G9aHZ!Q1Ra1OD>mN7LhU_F_rf)Gg}EnWIZf@1KwjQp8(P#vK|20@Z+BM
z{wR)iRow&*fo$TNa3qkpKoB+HoSPSsCE(0^|1_vTKP#{c90PaGxm6JvXcZ%eMPxF3
zoe_~!=iIfbF2*MC4LRUKRnPPJ{A>~eJ&K)9=T=p>3xz^D2?2m9V87jNU#aSN5(1GK
zw!jOplgVTjy!Ri!2}C{zexMQr!A7-OeTWhohCl;Y^WI<f6OJrkX0IXw@MvaRjYgwv
zX5D_u`w~c{QU~2`w+Woo>-B+;;>ZHETCD}N1}*OK=YGSHKxD)@*W~MF9Q(B#xCzXx
r6b>fo@QDjEvyzxuvZL9*pN>BPc(QXH=(I3M00000NkvXXu0mjfPp!u}
literal 0
HcmV?d00001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment