Changeset 2328

Show
Ignore:
Timestamp:
11/26/07 16:06:55 (14 months ago)
Author:
markybob
Message:

webui tweaks rev 160

Files:
14 modified

Legend:

Unmodified
Added
Removed
  • tags/deluge-0.5.6.96/plugins/WebUi/deluge_webserver.py

    r2304 r2328  
    178178    @check_session 
    179179    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: 
    183197            error_page(_("Choose an url or a torrent, not both.")) 
    184198        if vars.url: 
    185199            ws.proxy.add_torrent_url(vars.url) 
    186200            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) 
    190203            #b64 because of strange bug-reports related to binary data 
    191204            ws.proxy.add_torrent_filecontent(vars.torrent.filename, data_b64) 
  • tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/index.html

    r2304 r2328  
    55 
    66    <a class='toolbar_btn' href="#" 
    7     onclick='toolbar_get("/torrent/add/")' 
     7    onclick='toolbar_get("/torrent/add/",0)' 
    88    title='$_("Add")'><img class='toolbar_btn' 
    99    src='/static/images/tango/list-add.png'></a> 
    1010 
    1111    <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' 
    1313        src='/static/images/tango/list-remove.png' 
    1414        title='$_("Remove")'></a> 
    1515 
    1616    <a class='toolbar_btn' href="#" 
    17     onclick='toolbar_post("/torrent/stop/")' 
     17    onclick='toolbar_post("/torrent/stop/",2)' 
    1818    title='$_("Pause")'><img class='toolbar_btn' 
    1919    src='/static/images/tango/pause.png' 
     
    2121 
    2222    <a class='toolbar_btn' href="#" 
    23     onclick='toolbar_post("/torrent/start/")' 
     23    onclick='toolbar_post("/torrent/start/",2)' 
    2424    title='$_("Start")'><img class='toolbar_btn' 
    2525    src='/static/images/tango/start.png'></a> 
    2626 
    2727    <a class='toolbar_btn' href="#" 
    28     onclick='toolbar_post("/torrent/queue/up/")' 
     28    onclick='toolbar_post("/torrent/queue/up/",2)' 
    2929    title='$_("Up")'><img class='toolbar_btn' 
    3030    src='/static/images/tango/queue-up.png'></a> 
     
    3232 
    3333    <a class='toolbar_btn' href="#" 
    34     onclick='toolbar_post("/torrent/queue/down/")' 
     34    onclick='toolbar_post("/torrent/queue/down/",2)' 
    3535    title='$_("Down")'><img class='toolbar_btn' 
    3636    src='/static/images/tango/queue-down.png'></a> 
     
    3838 
    3939    <a class='toolbar_btn' href="#" 
    40     onclick='toolbar_get("/torrent/info/")' 
     40    onclick='toolbar_get("/torrent/info/",1)' 
    4141    title='$_("Details")'><img class='toolbar_btn' 
    4242    src='/static/images/tango/details.png'></a> 
     
    6868        $:(sort_head('total_size', _('Size'))) 
    6969        $:(sort_head('progress', _('Progress'))) 
     70        $:(sort_head('category', _('Tracker'))) 
    7071        $:(sort_head('num_seeds', _('Seeders'))) 
    7172        $:(sort_head('num_peers', _('Peers'))) 
     
    100101        </div> 
    101102    </td> 
     103    <td>$torrent.category</td> 
    102104    <td>$torrent.num_seeds ($torrent.total_seeds)</td> 
    103105    <td>$torrent.num_peers ($torrent.total_peers)</td> 
  • tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/part_categories.html

    r2304 r2328  
    11$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"> 
    33<input type="hidden" name="sort" value="$get('sort')"> 
    44<input type="hidden" name="order" value="$get('order')"> 
     
    2424</select> 
    2525 
     26    <input type="image" id='toolbar_refresh' 
     27    src='/static/images/tango/view-refresh.png' 
     28    title='$_('Refresh')' 
     29    > 
     30 
    2631</form> 
    2732 
  • tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/static/advanced.css

    r2304 r2328  
    351351        margin-bottom: 15px; 
    352352        padding-left:32px; 
    353         height:16px; 
     353        height:20px; 
    354354} 
    355355 
     
    371371        padding-right:3px; 
    372372        text-decoration: none; 
     373        margin-bottom:3px; 
    373374} 
    374375a.toolbar_btn:hover { 
     
    377378        text-decoration: none; 
    378379} 
     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 
    379406 
    380407form { /*all forms!*/ 
  • tags/deluge-0.5.6.96/plugins/WebUi/templates/advanced/static/deluge.js

    r2304 r2328  
    9898 
    9999/*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(); 
     100function 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        } 
    106107        return false; 
    107108} 
    108109 
    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; 
     110function 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        } 
    113118        return false; 
    114119} 
  • tags/deluge-0.5.6.96/plugins/WebUi/templates/deluge/tab_meta.html

    r2304 r2328  
    6969 
    7070<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> 
    7272 
    7373<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> 
    7575 
    7676<tr><td class="info_label">$_('Next Announce'):</td> 
  • trunk/plugins/WebUi/deluge_webserver.py

    r2301 r2328  
    178178    @check_session 
    179179    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: 
    183197            error_page(_("Choose an url or a torrent, not both.")) 
    184198        if vars.url: 
    185199            ws.proxy.add_torrent_url(vars.url) 
    186200            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) 
    190203            #b64 because of strange bug-reports related to binary data 
    191204            ws.proxy.add_torrent_filecontent(vars.torrent.filename, data_b64) 
  • trunk/plugins/WebUi/revno

    r2301 r2328  
    1 155 
     1160 
  • trunk/plugins/WebUi/templates/advanced/index.html

    r2301 r2328  
    55 
    66    <a class='toolbar_btn' href="#" 
    7     onclick='toolbar_get("/torrent/add/")' 
     7    onclick='toolbar_get("/torrent/add/",0)' 
    88    title='$_("Add")'><img class='toolbar_btn' 
    99    src='/static/images/tango/list-add.png'></a> 
    1010 
    1111    <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' 
    1313        src='/static/images/tango/list-remove.png' 
    1414        title='$_("Remove")'></a> 
    1515 
    1616    <a class='toolbar_btn' href="#" 
    17     onclick='toolbar_post("/torrent/stop/")' 
     17    onclick='toolbar_post("/torrent/stop/",2)' 
    1818    title='$_("Pause")'><img class='toolbar_btn' 
    1919    src='/static/images/tango/pause.png' 
     
    2121 
    2222    <a class='toolbar_btn' href="#" 
    23     onclick='toolbar_post("/torrent/start/")' 
     23    onclick='toolbar_post("/torrent/start/",2)' 
    2424    title='$_("Start")'><img class='toolbar_btn' 
    2525    src='/static/images/tango/start.png'></a> 
    2626 
    2727    <a class='toolbar_btn' href="#" 
    28     onclick='toolbar_post("/torrent/queue/up/")' 
     28    onclick='toolbar_post("/torrent/queue/up/",2)' 
    2929    title='$_("Up")'><img class='toolbar_btn' 
    3030    src='/static/images/tango/queue-up.png'></a> 
     
    3232 
    3333    <a class='toolbar_btn' href="#" 
    34     onclick='toolbar_post("/torrent/queue/down/")' 
     34    onclick='toolbar_post("/torrent/queue/down/",2)' 
    3535    title='$_("Down")'><img class='toolbar_btn' 
    3636    src='/static/images/tango/queue-down.png'></a> 
     
    3838 
    3939    <a class='toolbar_btn' href="#" 
    40     onclick='toolbar_get("/torrent/info/")' 
     40    onclick='toolbar_get("/torrent/info/",1)' 
    4141    title='$_("Details")'><img class='toolbar_btn' 
    4242    src='/static/images/tango/details.png'></a> 
     
    6868        $:(sort_head('total_size', _('Size'))) 
    6969        $:(sort_head('progress', _('Progress'))) 
     70        $:(sort_head('category', _('Tracker'))) 
    7071        $:(sort_head('num_seeds', _('Seeders'))) 
    7172        $:(sort_head('num_peers', _('Peers'))) 
     
    100101        </div> 
    101102    </td> 
     103    <td>$torrent.category</td> 
    102104    <td>$torrent.num_seeds ($torrent.total_seeds)</td> 
    103105    <td>$torrent.num_peers ($torrent.total_peers)</td> 
  • trunk/plugins/WebUi/templates/advanced/part_categories.html

    r2301 r2328  
    11$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"> 
    33<input type="hidden" name="sort" value="$get('sort')"> 
    44<input type="hidden" name="order" value="$get('order')"> 
     
    2424</select> 
    2525 
     26    <input type="image" id='toolbar_refresh' 
     27    src='/static/images/tango/view-refresh.png' 
     28    title='$_('Refresh')' 
     29    > 
     30 
    2631</form> 
    2732 
  • trunk/plugins/WebUi/templates/advanced/static/advanced.css

    r2301 r2328  
    351351        margin-bottom: 15px; 
    352352        padding-left:32px; 
    353         height:16px; 
     353        height:20px; 
    354354} 
    355355 
     
    371371        padding-right:3px; 
    372372        text-decoration: none; 
     373        margin-bottom:3px; 
    373374} 
    374375a.toolbar_btn:hover { 
     
    377378        text-decoration: none; 
    378379} 
     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 
    379406 
    380407form { /*all forms!*/ 
  • trunk/plugins/WebUi/templates/advanced/static/deluge.js

    r2301 r2328  
    9898 
    9999/*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(); 
     100function 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        } 
    106107        return false; 
    107108} 
    108109 
    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; 
     110function 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        } 
    113118        return false; 
    114119} 
  • trunk/plugins/WebUi/templates/deluge/tab_meta.html

    r2301 r2328  
    6969 
    7070<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> 
    7272 
    7373<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> 
    7575 
    7676<tr><td class="info_label">$_('Next Announce'):</td> 
  • trunk/plugins/WebUi/version

    r2301 r2328  
    11revision-id: mvoncken@gmail.com-20070930083408-sv8mo0mi1rbjnfvk 
    2 date: 2007-11-06 15:10:08 +0200 
    3 build-date: 2007-11-06 15:34:50 +0200 
    4 revno:  155 
     2date: 2007-11-26 15:10:08 +0200 
     3build-date: 2007-11-26 15:34:50 +0200 
     4revno:  160 
    55branch-nick: WebUi