Changeset 2328
- Timestamp:
- 11/26/07 16:06:55 (14 months ago)
- Files:
-
- 14 modified
-
tags/deluge-0.5.6.96/plugins/WebUi/deluge_webserver.py (modified) (1 diff)
-
tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/index.html (modified) (6 diffs)
-
tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/part_categories.html (modified) (2 diffs)
-
tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/static/advanced.css (modified) (3 diffs)
-
tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/static/deluge.js (modified) (1 diff)
-
tags/deluge-0.5.6.96/plugins/WebUi/templates/deluge/tab_meta.html (modified) (1 diff)
-
trunk/plugins/WebUi/deluge_webserver.py (modified) (1 diff)
-
trunk/plugins/WebUi/revno (modified) (1 diff)
-
trunk/plugins/WebUi/templates/advanced/index.html (modified) (6 diffs)
-
trunk/plugins/WebUi/templates/advanced/part_categories.html (modified) (2 diffs)
-
trunk/plugins/WebUi/templates/advanced/static/advanced.css (modified) (3 diffs)
-
trunk/plugins/WebUi/templates/advanced/static/deluge.js (modified) (1 diff)
-
trunk/plugins/WebUi/templates/deluge/tab_meta.html (modified) (1 diff)
-
trunk/plugins/WebUi/version (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/deluge-0.5.6.96/plugins/WebUi/deluge_webserver.py
r2304 r2328 178 178 @check_session 179 179 def POST(self, name): 180 vars = web.input(url = None, torrent = {}) 181 182 if vars.url and vars.torrent.filename: 180 """ 181 allows: 182 *posting of url 183 *posting file-upload 184 *posting of data as string(for greasemonkey-private) 185 """ 186 187 vars = web.input(url = None, torrent = {}, 188 torrent_name=None, torrent_data = None) 189 190 torrent_name = vars.torrent_name 191 torrent_data = vars.torrent_data 192 if vars.torrent.filename: 193 torrent_name = vars.torrent.filename 194 torrent_data = vars.torrent.file.read() 195 196 if vars.url and torrent_name: 183 197 error_page(_("Choose an url or a torrent, not both.")) 184 198 if vars.url: 185 199 ws.proxy.add_torrent_url(vars.url) 186 200 do_redirect() 187 elif vars.torrent.filename: 188 data = vars.torrent.file.read() 189 data_b64 = base64.b64encode(data) 201 elif torrent_name: 202 data_b64 = base64.b64encode(torrent_data) 190 203 #b64 because of strange bug-reports related to binary data 191 204 ws.proxy.add_torrent_filecontent(vars.torrent.filename, data_b64) -
tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/index.html
r2304 r2328 5 5 6 6 <a class='toolbar_btn' href="#" 7 onclick='toolbar_get("/torrent/add/" )'7 onclick='toolbar_get("/torrent/add/",0)' 8 8 title='$_("Add")'><img class='toolbar_btn' 9 9 src='/static/images/tango/list-add.png'></a> 10 10 11 11 <a class='toolbar_btn' href="#" 12 onclick='toolbar_get("/torrent/delete/" )'><img class='toolbar_btn'12 onclick='toolbar_get("/torrent/delete/",2)'><img class='toolbar_btn' 13 13 src='/static/images/tango/list-remove.png' 14 14 title='$_("Remove")'></a> 15 15 16 16 <a class='toolbar_btn' href="#" 17 onclick='toolbar_post("/torrent/stop/" )'17 onclick='toolbar_post("/torrent/stop/",2)' 18 18 title='$_("Pause")'><img class='toolbar_btn' 19 19 src='/static/images/tango/pause.png' … … 21 21 22 22 <a class='toolbar_btn' href="#" 23 onclick='toolbar_post("/torrent/start/" )'23 onclick='toolbar_post("/torrent/start/",2)' 24 24 title='$_("Start")'><img class='toolbar_btn' 25 25 src='/static/images/tango/start.png'></a> 26 26 27 27 <a class='toolbar_btn' href="#" 28 onclick='toolbar_post("/torrent/queue/up/" )'28 onclick='toolbar_post("/torrent/queue/up/",2)' 29 29 title='$_("Up")'><img class='toolbar_btn' 30 30 src='/static/images/tango/queue-up.png'></a> … … 32 32 33 33 <a class='toolbar_btn' href="#" 34 onclick='toolbar_post("/torrent/queue/down/" )'34 onclick='toolbar_post("/torrent/queue/down/",2)' 35 35 title='$_("Down")'><img class='toolbar_btn' 36 36 src='/static/images/tango/queue-down.png'></a> … … 38 38 39 39 <a class='toolbar_btn' href="#" 40 onclick='toolbar_get("/torrent/info/" )'40 onclick='toolbar_get("/torrent/info/",1)' 41 41 title='$_("Details")'><img class='toolbar_btn' 42 42 src='/static/images/tango/details.png'></a> … … 68 68 $:(sort_head('total_size', _('Size'))) 69 69 $:(sort_head('progress', _('Progress'))) 70 $:(sort_head('category', _('Tracker'))) 70 71 $:(sort_head('num_seeds', _('Seeders'))) 71 72 $:(sort_head('num_peers', _('Peers'))) … … 100 101 </div> 101 102 </td> 103 <td>$torrent.category</td> 102 104 <td>$torrent.num_seeds ($torrent.total_seeds)</td> 103 105 <td>$torrent.num_peers ($torrent.total_peers)</td> -
tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/part_categories.html
r2304 r2328 1 1 $def with (filter_tabs, category_tabs) 2 <form method="GET" id="category_form" style="display:inline;position:relative;top:-5px;padding-left:50px;>2 <form method="GET" id="category_form"> 3 3 <input type="hidden" name="sort" value="$get('sort')"> 4 4 <input type="hidden" name="order" value="$get('order')"> … … 24 24 </select> 25 25 26 <input type="image" id='toolbar_refresh' 27 src='/static/images/tango/view-refresh.png' 28 title='$_('Refresh')' 29 > 30 26 31 </form> 27 32 -
tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/static/advanced.css
r2304 r2328 351 351 margin-bottom: 15px; 352 352 padding-left:32px; 353 height: 16px;353 height:20px; 354 354 } 355 355 … … 371 371 padding-right:3px; 372 372 text-decoration: none; 373 margin-bottom:3px; 373 374 } 374 375 a.toolbar_btn:hover { … … 377 378 text-decoration: none; 378 379 } 380 381 382 #toolbar_refresh { 383 margin:0; 384 border:0; 385 background-color:none; 386 padding-left:2px; 387 padding-top:2px; 388 padding-right:2px; 389 text-decoration: none; 390 background-color: #37506f; 391 position:relative; 392 top:5px; 393 } 394 #toolbar_refresh:hover { 395 background-color:#68a; 396 -moz-border-radius:5px; 397 text-decoration: none; 398 } 399 #category_form{ 400 display:inline; 401 position:relative; 402 top:-3px; 403 padding-left:20px; 404 } 405 379 406 380 407 form { /*all forms!*/ -
tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/static/deluge.js
r2304 r2328 98 98 99 99 /*toobar buttons, */ 100 function toolbar_post(url) { 101 /*this feels hacky, but it's the only way i know of*/ 102 var ids = state.selected_rows.join(','); 103 var form = $('toolbar_form'); 104 form.action = url +ids; 105 form.submit(); 100 function toolbar_post(url, selected) { 101 if ((!selected) || (state.selected_rows.length > 0)) { 102 var ids = state.selected_rows.join(','); 103 var form = $('toolbar_form'); 104 form.action = url +ids; 105 form.submit(); 106 } 106 107 return false; 107 108 } 108 109 109 function toolbar_get(url) { 110 /*this feels hacky, but it's the only way i know of*/ 111 var ids = state.selected_rows.join(','); 112 window.location.href = url +ids; 110 function toolbar_get(url , selected) { 111 if (!selected) { 112 window.location.href = url 113 } 114 else if (state.selected_rows.length > 0) { 115 var ids = state.selected_rows.join(','); 116 window.location.href = url +ids; 117 } 113 118 return false; 114 119 } -
tags/deluge-0.5.6.96/plugins/WebUi/templates/deluge/tab_meta.html
r2304 r2328 69 69 70 70 <tr><td class="info_label">$_('Tracker'):</td> 71 <td class="info_value" >$(crop(torrent.tracker, 30))</td></tr>71 <td class="info_value" title="$torrent.tracker">$(crop(torrent.tracker, 30))</td></tr> 72 72 73 73 <tr><td class="info_label">$_('Tracker Status'):</td> 74 <td class="info_value" >$torrent.tracker_status</td></tr>74 <td class="info_value" title="$torrent.tracker_status">$(crop(torrent.tracker_status, 30)) </td></tr> 75 75 76 76 <tr><td class="info_label">$_('Next Announce'):</td> -
trunk/plugins/WebUi/deluge_webserver.py
r2301 r2328 178 178 @check_session 179 179 def POST(self, name): 180 vars = web.input(url = None, torrent = {}) 181 182 if vars.url and vars.torrent.filename: 180 """ 181 allows: 182 *posting of url 183 *posting file-upload 184 *posting of data as string(for greasemonkey-private) 185 """ 186 187 vars = web.input(url = None, torrent = {}, 188 torrent_name=None, torrent_data = None) 189 190 torrent_name = vars.torrent_name 191 torrent_data = vars.torrent_data 192 if vars.torrent.filename: 193 torrent_name = vars.torrent.filename 194 torrent_data = vars.torrent.file.read() 195 196 if vars.url and torrent_name: 183 197 error_page(_("Choose an url or a torrent, not both.")) 184 198 if vars.url: 185 199 ws.proxy.add_torrent_url(vars.url) 186 200 do_redirect() 187 elif vars.torrent.filename: 188 data = vars.torrent.file.read() 189 data_b64 = base64.b64encode(data) 201 elif torrent_name: 202 data_b64 = base64.b64encode(torrent_data) 190 203 #b64 because of strange bug-reports related to binary data 191 204 ws.proxy.add_torrent_filecontent(vars.torrent.filename, data_b64) -
trunk/plugins/WebUi/revno
r2301 r2328 1 1 551 160 -
trunk/plugins/WebUi/templates/advanced/index.html
r2301 r2328 5 5 6 6 <a class='toolbar_btn' href="#" 7 onclick='toolbar_get("/torrent/add/" )'7 onclick='toolbar_get("/torrent/add/",0)' 8 8 title='$_("Add")'><img class='toolbar_btn' 9 9 src='/static/images/tango/list-add.png'></a> 10 10 11 11 <a class='toolbar_btn' href="#" 12 onclick='toolbar_get("/torrent/delete/" )'><img class='toolbar_btn'12 onclick='toolbar_get("/torrent/delete/",2)'><img class='toolbar_btn' 13 13 src='/static/images/tango/list-remove.png' 14 14 title='$_("Remove")'></a> 15 15 16 16 <a class='toolbar_btn' href="#" 17 onclick='toolbar_post("/torrent/stop/" )'17 onclick='toolbar_post("/torrent/stop/",2)' 18 18 title='$_("Pause")'><img class='toolbar_btn' 19 19 src='/static/images/tango/pause.png' … … 21 21 22 22 <a class='toolbar_btn' href="#" 23 onclick='toolbar_post("/torrent/start/" )'23 onclick='toolbar_post("/torrent/start/",2)' 24 24 title='$_("Start")'><img class='toolbar_btn' 25 25 src='/static/images/tango/start.png'></a> 26 26 27 27 <a class='toolbar_btn' href="#" 28 onclick='toolbar_post("/torrent/queue/up/" )'28 onclick='toolbar_post("/torrent/queue/up/",2)' 29 29 title='$_("Up")'><img class='toolbar_btn' 30 30 src='/static/images/tango/queue-up.png'></a> … … 32 32 33 33 <a class='toolbar_btn' href="#" 34 onclick='toolbar_post("/torrent/queue/down/" )'34 onclick='toolbar_post("/torrent/queue/down/",2)' 35 35 title='$_("Down")'><img class='toolbar_btn' 36 36 src='/static/images/tango/queue-down.png'></a> … … 38 38 39 39 <a class='toolbar_btn' href="#" 40 onclick='toolbar_get("/torrent/info/" )'40 onclick='toolbar_get("/torrent/info/",1)' 41 41 title='$_("Details")'><img class='toolbar_btn' 42 42 src='/static/images/tango/details.png'></a> … … 68 68 $:(sort_head('total_size', _('Size'))) 69 69 $:(sort_head('progress', _('Progress'))) 70 $:(sort_head('category', _('Tracker'))) 70 71 $:(sort_head('num_seeds', _('Seeders'))) 71 72 $:(sort_head('num_peers', _('Peers'))) … … 100 101 </div> 101 102 </td> 103 <td>$torrent.category</td> 102 104 <td>$torrent.num_seeds ($torrent.total_seeds)</td> 103 105 <td>$torrent.num_peers ($torrent.total_peers)</td> -
trunk/plugins/WebUi/templates/advanced/part_categories.html
r2301 r2328 1 1 $def with (filter_tabs, category_tabs) 2 <form method="GET" id="category_form" style="display:inline;position:relative;top:-5px;padding-left:50px;>2 <form method="GET" id="category_form"> 3 3 <input type="hidden" name="sort" value="$get('sort')"> 4 4 <input type="hidden" name="order" value="$get('order')"> … … 24 24 </select> 25 25 26 <input type="image" id='toolbar_refresh' 27 src='/static/images/tango/view-refresh.png' 28 title='$_('Refresh')' 29 > 30 26 31 </form> 27 32 -
trunk/plugins/WebUi/templates/advanced/static/advanced.css
r2301 r2328 351 351 margin-bottom: 15px; 352 352 padding-left:32px; 353 height: 16px;353 height:20px; 354 354 } 355 355 … … 371 371 padding-right:3px; 372 372 text-decoration: none; 373 margin-bottom:3px; 373 374 } 374 375 a.toolbar_btn:hover { … … 377 378 text-decoration: none; 378 379 } 380 381 382 #toolbar_refresh { 383 margin:0; 384 border:0; 385 background-color:none; 386 padding-left:2px; 387 padding-top:2px; 388 padding-right:2px; 389 text-decoration: none; 390 background-color: #37506f; 391 position:relative; 392 top:5px; 393 } 394 #toolbar_refresh:hover { 395 background-color:#68a; 396 -moz-border-radius:5px; 397 text-decoration: none; 398 } 399 #category_form{ 400 display:inline; 401 position:relative; 402 top:-3px; 403 padding-left:20px; 404 } 405 379 406 380 407 form { /*all forms!*/ -
trunk/plugins/WebUi/templates/advanced/static/deluge.js
r2301 r2328 98 98 99 99 /*toobar buttons, */ 100 function toolbar_post(url) { 101 /*this feels hacky, but it's the only way i know of*/ 102 var ids = state.selected_rows.join(','); 103 var form = $('toolbar_form'); 104 form.action = url +ids; 105 form.submit(); 100 function toolbar_post(url, selected) { 101 if ((!selected) || (state.selected_rows.length > 0)) { 102 var ids = state.selected_rows.join(','); 103 var form = $('toolbar_form'); 104 form.action = url +ids; 105 form.submit(); 106 } 106 107 return false; 107 108 } 108 109 109 function toolbar_get(url) { 110 /*this feels hacky, but it's the only way i know of*/ 111 var ids = state.selected_rows.join(','); 112 window.location.href = url +ids; 110 function toolbar_get(url , selected) { 111 if (!selected) { 112 window.location.href = url 113 } 114 else if (state.selected_rows.length > 0) { 115 var ids = state.selected_rows.join(','); 116 window.location.href = url +ids; 117 } 113 118 return false; 114 119 } -
trunk/plugins/WebUi/templates/deluge/tab_meta.html
r2301 r2328 69 69 70 70 <tr><td class="info_label">$_('Tracker'):</td> 71 <td class="info_value" >$(crop(torrent.tracker, 30))</td></tr>71 <td class="info_value" title="$torrent.tracker">$(crop(torrent.tracker, 30))</td></tr> 72 72 73 73 <tr><td class="info_label">$_('Tracker Status'):</td> 74 <td class="info_value" >$torrent.tracker_status</td></tr>74 <td class="info_value" title="$torrent.tracker_status">$(crop(torrent.tracker_status, 30)) </td></tr> 75 75 76 76 <tr><td class="info_label">$_('Next Announce'):</td> -
trunk/plugins/WebUi/version
r2301 r2328 1 1 revision-id: mvoncken@gmail.com-20070930083408-sv8mo0mi1rbjnfvk 2 date: 2007-11- 06 15:10:08 +02003 build-date: 2007-11- 06 15:34:50 +02004 revno: 1 552 date: 2007-11-26 15:10:08 +0200 3 build-date: 2007-11-26 15:34:50 +0200 4 revno: 160 5 5 branch-nick: WebUi
