Changeset 1385

Show
Ignore:
Timestamp:
03/04/07 18:33:53 (2 years ago)
Author:
jm3
Message:

dhtml collapseable link management console

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/folder-as-xml.php

    r889 r1385  
    4545<% 
    4646                        } else 
    47                                 $error = "no tag by that ID, or it's owned by someone else"; 
     47                                $error = "No tag by that ID, or it's owned by someone else"; 
    4848                        conClose( $con_xmlFolder ); 
    4949                } else 
  • feedmelinks/folder.php

    r1382 r1385  
    3434        $id = $folder; 
    3535        $unfiled = ($folder == "unfiled" ? true : false); 
    36         $fName = getNameForFolder( $id ); 
     36        $tag_name = getNameForFolder( $id ); 
    3737        if( $folder != "unfiled" ) { 
    3838                $public = isPublicFolder( $id ) ? "1" : "0"; 
     
    172172        } 
    173173        if( $owned || $public ) 
    174                 $title = "$owner&rsquo;s links " . getCatPast() . " with '$fName'"; 
     174                $title = "$owner&rsquo;s links " . getCatPast() . " with '$tag_name'"; 
    175175        else  
    176176                $title = "(a private " . getCatName() . ")"; 
     
    224224<script language="javascript" type="text/javascript" src="/script/bulk-management.js"></script> 
    225225<form method="post" action="/action" name="folderForm"> 
    226         &nbsp; (<a href="/edit-folder?op=edit&id=<?= $id ?>&name=<?= urlencode( $fName ) ?>&options=">click to rename '<?= $fName ?>' or change its privacy settings</a>) 
     226        &nbsp; (<a href="/edit-folder?op=edit&id=<?= $id ?>&name=<?= urlencode( $tag_name ) ?>&options=">click to rename '<?= $tag_name ?>' or change its privacy settings</a>) 
    227227        <p /> 
    228228 
     
    283283                if( !$condensed ) { ?> 
    284284                <div style='float: right'> 
    285 <small>&nbsp;select all:</small><input style="margin-bottom: -1px;" type="checkbox" name="selectAll" onChange="selectAllLinks(document.forms.folderForm);"/> 
     285                        <small>&nbsp;select all:</small><input id="select_all_links_button" style="margin-bottom: -1px;" type="checkbox" name="selectAll"  
     286                                        onChange="selectAllLinks(document.forms.folderForm);"/> 
    286287</div> 
    287288<?php } ?> 
  • feedmelinks/modules/tag-list-header.inc.php

    r1382 r1385  
     1        <script type="text/javascript" src="/script/mootools.v1.00.js"></script> 
     2        <script type="text/javascript" src="/script/taglist_toggle.js"></script> 
     3        <link rel="stylesheet" href="/style/taglist_toggle.css" type="text/css" media="screen" /> 
     4 
     5        <div> 
     6 
     7                <div id="batch_ops_header"> 
     8                        <div id="batch_ops_header_content" style="display:none"> 
     9                        <div class="header">Manage my links:</div> 
     10                        <p> 
     11                                Here you can do things in bunches: delete links, publicize / privatize links,  add tags &mdash; stuff like that.<br/> 
     12                                To get started, just click the checkboxes of the links you want to change, or click "Select All".<br/> 
     13                                Need help? Try the <a href="/FAQ"><abbr title="Frequently Asked Questions">FAQ</abbr> (Frequently Asked Questions)</a>. 
     14                        </p> 
     15 
    116<?php 
    217if( $owned && !$condensed) { ?> 
    318<!-- start row --> 
    4 <div id="taglist_header" class="r1"> 
    519 
    6         <div class="header"> 
    7                 Batch actions: 
    8         </div> 
    9         <div class="button_group"> 
    10                 Make selected links: 
    11                 <input class="medbutton" type="button" name="makePublicButton" value="Public"  
    12                         onClick="publicizeSelected()"/> 
    13                 /  
    14                 <input class="medbutton" type="button" name="makePrivateButton" value="Private"  
    15                         onClick="privatizeSelected()"/> 
     20                        <div> 
     21                                <input class="medbutton" type="button" name="makePublicButton" value="Make Selected Links Public"  
     22                                        onClick="publicizeSelected()"/> 
     23                                &nbsp;  
     24                                <input class="medbutton" type="button" name="makePrivateButton" value="Make Selected Links Private"  
     25                                        onClick="privatizeSelected()"/> 
     26                                &nbsp;  
     27                                &nbsp;<input class="medbutton" type="button" name="deleteButton" value="Delete Selected Links"  
     28                                        onClick="deleteSelected()"/> 
     29                                &nbsp;  
     30                                &nbsp;<input class="medbutton" type="button" name="untagButton" value="&quot;Un-tag&quot; Selected Links"  
     31                                        onClick="untagSelected()"/> 
     32                        </div> 
    1633 
    17                         &nbsp; 
    18                         Or: 
    19                  
    20                 &nbsp;<input class="medbutton" type="button" name="deleteButton" value="Delete selected"  
    21                         onClick="deleteSelected()"/> 
     34                        <div id="batch_separator"/> 
     35                        <br clear="all"/> 
    2236 
    23                 &nbsp;<input class="medbutton" type="button" name="untagButton" value="Un-tag selected"  
    24                         onClick="untagSelected()"/> 
    25         </div> 
    26         <br clear="all"/> 
    27         <br /> 
    28  
    29         <div id="re_tag_menu"> 
    30                 Add <?= ucfirst( getCatVerb()) ?>s:  
    31                 <select name="newFolderID"> 
    32                 <?php  
    33                 include( "$modules/folder-menu.inc.php" );  
    34                 ?> 
    35                 </select> 
    36                 <input type="hidden" name="op" value="tag" /> 
    37                 <input type="hidden" name="debug" value="<?= $debug ?>" /> 
    38                 <input type="hidden" name="folderID" value="<?= $folder ?>" /> 
    39                 <input class="medbutton" type="button" name="tagButton" value="<?= ucfirst( getCatVerb()) ?>" onClick="tagSelected()"/> 
    40         </div> 
    41 </div> 
     37                        <div> 
     38                                <span class="header">Add <?= ucfirst( getCatVerb()) ?>s: </span> 
     39                                <select name="newFolderID"> 
     40                                <?php  
     41                                include( "$modules/folder-menu.inc.php" );  
     42                                ?> 
     43                                </select> 
     44                                <input type="hidden" name="op" value="tag" /> 
     45                                <input type="hidden" name="debug" value="<?= $debug ?>" /> 
     46                                <input type="hidden" name="folderID" value="<?= $folder ?>" /> 
     47                                <input class="medbutton" type="button" name="tagButton" value="<?= ucfirst( getCatVerb()) ?>" onClick="tagSelected()"/> 
     48                        </div> 
    4249 
    4350<?php 
    4451        } 
    4552?> 
     53 
     54                </div> 
     55 
     56        </div> 
     57        <div id="batch_ops_button" class="batch_ops_button textbutton">Manage My Links</div> 
     58        <br clear="all"/> 
     59 
     60</div> 
     61 
  • feedmelinks/script/bulk-management.js

    r1351 r1385  
    4747 
    4848function selectAllLinks( argForm, snuff ) { 
     49        //if( ! batch_open ) 
     50                //toggle_batch_ops_fn(); 
     51 
    4952        // FIXME: for admin bulk snuffing 
    5053        // f.elements[i].name.match( /snuff_user_/ )) 
  • feedmelinks/script/taglist_toggle.js

    r1382 r1385  
    11/* built by code repurposed from Bas Wenneker of solutoire.com; his site rules, check it out */ 
     2 
     3// global so we can call it from othere 
     4var batch_open = false; 
    25 
    36window.onload = function(){ 
    47        var batch_ops_button = $('batch_ops_button'); 
     8        var checkbox = $('select_all_links_button'); 
    59        var content = $('batch_ops_header_content'); 
    610        var toggle_batch_ops_trans = new Fx.Style('batch_ops_header_content', 'height',{duration: 500}); 
    711 
    812        //add onclick event listener to toggle 
    9         batch_ops_button.addEvent('click', function(){ 
     13        function toggle_batch_ops_fn() { 
     14                batch_open = ! batch_open; 
    1015                if(content.getStyle('height').toInt() > 0) { 
    1116                        toggle_batch_ops_trans.start(0); //hide 
     
    1621                batch_ops_button.toggleClass('batch_ops_button_'); 
    1722                return false; 
    18         }); 
     23        } 
     24        function open_batch_ops_if_necessary_fn() { 
     25                if( ! batch_open ) 
     26                        toggle_batch_ops_fn(); 
     27        } 
     28        batch_ops_button.addEvent('click', toggle_batch_ops_fn ); 
     29        checkbox.addEvent('click', open_batch_ops_if_necessary_fn ); 
    1930        content.setStyle('display','block'); // needed for height transition to work 
    2031        var content_height = content.getSize().scrollSize.y; 
  • feedmelinks/style/main.css

    r1383 r1385  
    99input[type=button], input[type=submit], input[type=reset] { 
    1010        font-size: 10px; 
    11  background: #eee; 
    12  color: #222; 
    13  border: 1px outset #ccc; 
    14  padding: .1em .5em; 
     11       background: #eee; 
     12       color: #222; 
     13       border: 1px outset #ccc; 
     14       padding: .1em .5em; 
    1515} 
    1616input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover { 
    17  background: #ccb
     17       background: #333
    1818} 
    1919input[type=button][disabled], input[type=submit][disabled], 
    2020.cancel, input[type=reset][disabled] { 
    21  background: #f6f6f6; 
    22  border-style: solid; 
    23  color: #999; 
     21       background: #f6f6f6; 
     22       border-style: solid; 
     23       color: #999; 
    2424} 
    2525 
     
    104104 
    105105a.underhot:active, .underhot:active, a.underhot:hover, .underhot:hover { 
    106         border-bottom: 1px dotted #black; 
     106        border-bottom: 1px dotted black; 
    107107  color: black; 
    108108        text-decoration: none; 
     
    257257} 
    258258 
     259div.r0, div.r1 { 
     260        font-size: 13px; 
     261} 
    259262div.r0 { 
    260263        background-color: #F6F6F6; 
     
    426429/* taglist r0 and r1 rows */ 
    427430div.tl { 
     431        padding: 6px; 
     432} 
     433 
     434.textbutton { 
     435        font-weight: bold; 
    428436        padding: 4px; 
    429437} 
  • feedmelinks/style/taglist_toggle.css

    r1382 r1385  
     1#static_taglist_header{ } 
    12 
    2 /* *{padding:0px; margin:0px;} */ 
    3  
    4 #static_taglist_header{ 
    5         background:#d3e4a5; 
    6 } 
    73#batch_ops_header_content { 
    84        height:0px; 
     
    117        overflow:hidden; 
    128} 
     9 
    1310#batch_ops_header{ 
    1411        margin:0px auto; 
    15         padding:5px 40px; 
    16         background:#d3e4a5; 
     12        padding:5px 20px; 
    1713        overflow:hidden; 
    1814} 
    19 #batch_ops_button { 
    20         display:block; 
    21         height:14px; 
    22         width:129px; 
    23         float:left; 
    24         margin-left:2px; 
    25         background:#d3e4a5; 
    26         cursor:pointer; 
    27         text-align:center 
    28 
    29 .batch_ops_button_{ 
    30         font-weight:bold; 
    31 
    32 #batch_ops_button{ 
    33         margin-left:40px; 
     15 
     16#batch_ops_header_content > div.header, #batch_ops_header_content span.header { 
     17        font-size: 16px; 
     18        color: #777; 
     19        margin-top: 12px; 
     20        margin-bottom: 12px; 
    3421} 
    3522 
     23#batch_ops_header_content > p { 
     24        padding-left: 2.0em; 
     25        margin-bottom: 2.0em; 
     26} 
     27 
     28#batch_separator { 
     29        border-bottom: 1px dotted black; 
     30        float: center; 
     31        height: 1px; 
     32        margin-bottom: 10px; 
     33        padding: 5px; 
     34} 
     35 
     36#batch_ops_button { 
     37        font-size: 12px; 
     38        color: #999999; 
     39        display:block; 
     40        width: 100%; 
     41        float: right; 
     42        text-align:right; 
     43        cursor:pointer; 
     44} 
     45