Plugin Directory

Changeset 720447


Ignore:
Timestamp:
05/30/2013 03:59:47 PM (13 years ago)
Author:
yonisink
Message:

1.1 has color choosing, theme overwrite options, bug fixes.

Location:
sinking-dropdowns
Files:
32 added
7 edited

Legend:

Unmodified
Added
Removed
  • sinking-dropdowns/trunk/controller/constants.php

    r717941 r720447  
    1010define('SINKDROPDOWNS_THEMEPATH', SINKDROPDOWNS_PATH_INT . 'css/themes/');
    1111
     12define('SINKDROPDOWNS_DEFAULT_overwrite_theme', '');
     13
     14define('SINKDROPDOWNS_DEFAULT_COLORS_top', '#FFFFFF');
     15define('SINKDROPDOWNS_DEFAULT_COLORS_top_link', '#000000');
     16
     17define('SINKDROPDOWNS_DEFAULT_COLORS_mid', '#FFFFFF');
     18define('SINKDROPDOWNS_DEFAULT_COLORS_mid_link', '#000000');
     19
     20define('SINKDROPDOWNS_DEFAULT_COLORS_bottom', '#FFFFFF');
     21define('SINKDROPDOWNS_DEFAULT_COLORS_bottom_link', '#000000');
     22
    1223?>
  • sinking-dropdowns/trunk/css/backend.css

    r717941 r720447  
    1414    width: 60%;
    1515}
     16.sinking_dropdowns .hidden_section {
     17    display:none;
     18    }
    1619
    1720.sinking_dropdowns .copyright {
  • sinking-dropdowns/trunk/css/sinking_dropdowns.css

    r717941 r720447  
    2424.sink_dropdown ul {
    2525    list-style: none;
    26     width: 9em;
     26   /* width: 9em;*/
    2727}
    2828.sink_dropdown a {
     
    7979/** visual/graphic styles **/   
    8080.sink_dropdown_container {
    81     background:white !important;
     81   
    8282}
    8383
    8484li.sink_dropdown_top, .sink_dropdown li {
    85     background:beige;
     85   
    8686}
    8787
    8888    li.sink_dropdown_top a, .sink_dropdown li a {
    89         color:black;
     89       
    9090    }
    9191
    9292li.sink_dropdown_mid, .sink_dropdown li li {
    93     background:yellow;
     93   
    9494}
    9595
    9696    li.sink_dropdown_mid a, .sink_dropdown li li a {
    97         color:black;
     97       
    9898    }
    9999   
    100100li.sink_dropdown_bottom, .sink_dropdown li li li {
    101     background:blue;
     101   
    102102}
    103103
    104104    li.sink_dropdown_bottom a, .sink_dropdown li li li a {
    105         color:white;
     105       
    106106    }
    107107
  • sinking-dropdowns/trunk/js/sinking_dropdowns.js

    r717941 r720447  
    1919    $('.sink_dropdown li li li').addClass('sink_dropdown_bottom');
    2020    $('.sink_dropdown_top').children('a').addClass('toplink');
    21            
     21             
    2222    $(".sink_dropdown li a").each(function() {
    2323        if ($(this).next().length > 0) {
  • sinking-dropdowns/trunk/readme.txt

    r718000 r720447  
    55Requires at least: 3.1
    66Tested up to: 3.5.1
    7 Stable Tag: 1.0
     7Stable Tag: 1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838== Changelog ==
    3939
     40= 1.1 =
     41
     42Added color choice override options, including alpha transparency choosing.
     43
    4044= 1 =
    4145* Vou por ai a procurar rir pra não chorar.
  • sinking-dropdowns/trunk/sinking_dropdowns.php

    r719403 r720447  
    2323    //constants
    2424    require_once('controller/constants.php');
     25    require_once('controller/plugin.php');
     26   
     27    //activation
     28    register_activation_hook(__FILE__,'sinking_dropdowns_activate');   
    2529   
    2630
     
    3539        function sinking_dropdowns_scripting() {   
    3640            $plugin_url = plugins_url() . '/' . plugin_basename(dirname(__FILE__));
    37             $sinkdropdowns_menushow = get_option('sinkdropdowns_menushow')  ? get_option('sinkdropdowns_menushow') : SINKDROPDOWNS_DEFAULT_reveal;
    38             $sinkdropdowns_responsive_break = get_option('sinkdropdowns_responsive_break') ? get_option('sinkdropdowns_responsive_break') : SINKDROPDOWNS_DEFAULT_responsive_break;
    3941           
    40             //load custom colors
    41             $sinkdropdowns_sink_dropdown_top = get_option('sinkdropdowns_sink_dropdown_top');
    42             $sinkdropdowns_sink_dropdown_top_link = get_option('sinkdropdowns_sink_dropdown_top_link');
     42            $sinkdropdowns_menushow = get_option('sinkdropdowns_menushow');
     43            $sinkdropdowns_responsive_break = get_option('sinkdropdowns_responsive_break');
     44            $sinkdropdowns_sink_dropdown_themeoverwrite = get_option('sinkdropdowns_sink_dropdown_themeoverwrite');
    4345
    44             $sinkdropdowns_sink_dropdown_mid = get_option('sinkdropdowns_sink_dropdown_mid');
    45             $sinkdropdowns_sink_dropdown_mid_link = get_option('sinkdropdowns_sink_dropdown_mid_link');
     46            if($sinkdropdowns_sink_dropdown_themeoverwrite) {
     47                //colors
     48                $sinkdropdowns_sink_dropdown_top = get_option('sinkdropdowns_sink_dropdown_top');
     49                $sinkdropdowns_sink_dropdown_top_link = get_option('sinkdropdowns_sink_dropdown_top_link');
    4650
    47             $sinkdropdowns_sink_dropdown_bottom = get_option('sinkdropdowns_sink_dropdown_bottom');
    48             $sinkdropdowns_sink_dropdown_bottom_link = get_option('sinkdropdowns_sink_dropdown_bottom_link');
    49            
     51                $sinkdropdowns_sink_dropdown_mid = get_option('sinkdropdowns_sink_dropdown_mid');
     52                $sinkdropdowns_sink_dropdown_mid_link = get_option('sinkdropdowns_sink_dropdown_mid_link');
     53
     54                $sinkdropdowns_sink_dropdown_bottom = get_option('sinkdropdowns_sink_dropdown_bottom');
     55                $sinkdropdowns_sink_dropdown_bottom_link = get_option('sinkdropdowns_sink_dropdown_bottom_link');       
     56            }
    5057           
    5158                ?>     
     
    6673
    6774                         <style type="text/css">
    68                             <?php if($sinkdropdowns_sink_dropdown_top)  echo "li.sink_dropdown_top, .sink_dropdown li {background:$sinkdropdowns_sink_dropdown_top !important;}\n\r"; ?>
    69                             <?php if($sinkdropdowns_sink_dropdown_top_link) echo "li.sink_dropdown_top a, .sink_dropdown li a {color:$sinkdropdowns_sink_dropdown_top_link !important;}\n\r"; ?>
    70                             <?php if($sinkdropdowns_sink_dropdown_mid)  echo "li.sink_dropdown_mid a, .sink_dropdown li li a {background:$sinkdropdowns_sink_dropdown_mid !important;}\n\r"; ?>
    71                             <?php if($sinkdropdowns_sink_dropdown_mid_link) echo "li.sink_dropdown_mid a, .sink_dropdown li li a {color:$sinkdropdowns_sink_dropdown_mid_link !important;}\n\r"; ?>
    72                             <?php if($sinkdropdowns_sink_dropdown_bottom)   echo "li.sink_dropdown_bottom a, .sink_dropdown li li li a {background:$sinkdropdowns_sink_dropdown_bottom !important;}\n\r"; ?>
    73                             <?php if($sinkdropdowns_sink_dropdown_bottom_link)  echo "li.sink_dropdown_bottom a, .sink_dropdown li li li a {color:$sinkdropdowns_sink_dropdown_bottom_link !important;}\n\r"; ?>
     75                            <?php if($sinkdropdowns_sink_dropdown_themeoverwrite) { ?>
     76                                li.sink_dropdown_top, .sink_dropdown li {background:<? echo $sinkdropdowns_sink_dropdown_top ?> !important;}
     77                                li.sink_dropdown_top a, .sink_dropdown li a {color:<? echo $sinkdropdowns_sink_dropdown_top_link ?> !important;}
     78                                li.sink_dropdown_mid a, .sink_dropdown li li a {background:<? echo $sinkdropdowns_sink_dropdown_mid ?> !important; color:<? echo $sinkdropdowns_sink_dropdown_mid_link ?> !important;}
     79                                li.sink_dropdown_bottom a, .sink_dropdown li li li a {background:<? echo $sinkdropdowns_sink_dropdown_bottom ?> !important; color:<? echo $sinkdropdowns_sink_dropdown_bottom_link ?> !important;}
     80                            <? } ?>
    7481                         </style>
    7582                       
     
    105112        if(is_admin()){       
    106113            wp_enqueue_script('spectrum', plugins_url('sinking_dropdowns/js/spectrum.js'), array('jquery'));
     114            wp_enqueue_script('sinkdropdowns_admin', plugins_url('sinking_dropdowns/js/admin.js'), array('jquery'));
    107115        }
    108116    }   
  • sinking-dropdowns/trunk/views/config.php

    r719403 r720447  
    99}
    1010
    11 $sinkdropdowns_menushow = get_option('sinkdropdowns_menushow') ? get_option('sinkdropdowns_menushow') : SINKDROPDOWNS_DEFAULT_reveal;
    12 $sinkdropdowns_responsive_break = get_option('sinkdropdowns_responsive_break') ? get_option('sinkdropdowns_responsive_break') : SINKDROPDOWNS_DEFAULT_responsive_break;
     11$sinkdropdowns_menushow = get_option('sinkdropdowns_menushow');
     12$sinkdropdowns_responsive_break = get_option('sinkdropdowns_responsive_break');
    1313
    1414//colors
     15$sinkdropdowns_sink_dropdown_themeoverwrite = get_option('sinkdropdowns_sink_dropdown_themeoverwrite');
     16
    1517$sinkdropdowns_sink_dropdown_top = get_option('sinkdropdowns_sink_dropdown_top');
    1618$sinkdropdowns_sink_dropdown_top_link = get_option('sinkdropdowns_sink_dropdown_top_link');
     
    6668                                       
    6769                                        <div class="field">
    68                                             <p><b>Overwrite the basic colors:</b></p>
     70                                            <p>
     71                                                <label for="sinkdropdowns_sink_dropdown_themeoverwrite" class="checkbox_label"><strong>Overwrite CSS colors with custom colors:</strong></label>
     72                                                <input type="hidden" name="sinkdropdowns_sink_dropdown_themeoverwrite" value="" /> 
     73                                                <input type="checkbox" name="sinkdropdowns_sink_dropdown_themeoverwrite" id="sinkdropdowns_sink_dropdown_themeoverwrite" value="true" <?php if ($sinkdropdowns_sink_dropdown_themeoverwrite) { echo 'checked=checked'; } ?> />
     74                                            </p>
    6975                                           
    70                                             <div class="color_top color_section">
    71                                                 <p>Top Level</p>
    72                                                 <p>
    73                                                     <label for="sinkdropdowns_sink_dropdown_top"><strong>Top level Background</strong></label>
    74                                                     <input id="sinkdropdowns_sink_dropdown_top" name="sinkdropdowns_sink_dropdown_top" value="<?php echo $sinkdropdowns_sink_dropdown_top ?>" type="color" />
    75                                                 </p>                                       
    76                                                 <p>
    77                                                     <label for="sinkdropdowns_sink_dropdown_top_link"><strong>Top level link</strong></label>
    78                                                     <input id="sinkdropdowns_sink_dropdown_top_link" name="sinkdropdowns_sink_dropdown_top_link"  value="<?php echo $sinkdropdowns_sink_dropdown_top_link ?>" type="color" />
    79                                                 </p>
    80                                             </div>                                     
     76                                            <div class="color_selection_section <?php if (!$sinkdropdowns_sink_dropdown_themeoverwrite)  { echo 'hidden_section'; } ?>" >
     77                                                <div class="color_top color_section">
     78                                                    <p>Top Level</p>
     79                                                    <p>
     80                                                        <label for="sinkdropdowns_sink_dropdown_top"><strong>Top level Background</strong></label>
     81                                                        <input id="sinkdropdowns_sink_dropdown_top" class="colorchooser" name="sinkdropdowns_sink_dropdown_top" value="<?php echo $sinkdropdowns_sink_dropdown_top ?>" type="text" />
     82                                                       
     83                                                    </p>                                       
     84                                                    <p>
     85                                                        <label for="sinkdropdowns_sink_dropdown_top_link"><strong>Top level link</strong></label>
     86                                                        <input id="sinkdropdowns_sink_dropdown_top_link" name="sinkdropdowns_sink_dropdown_top_link"  value="<?php echo $sinkdropdowns_sink_dropdown_top_link ?>" type="text" />
     87                                                    </p>
     88                                                </div>                                     
     89                                               
     90                                                <div class="color_mid color_section">
     91                                                    <p class="">Mid Level</p>
     92                                                    <p>
     93                                                        <label for="sinkdropdowns_sink_dropdown_mid"><strong>Mid level Background</strong></label>
     94                                                        <input id="sinkdropdowns_sink_dropdown_mid" name="sinkdropdowns_sink_dropdown_mid"  value="<?php echo $sinkdropdowns_sink_dropdown_mid ?>" type="text" />
     95                                                    </p>                                       
     96                                                    <p>
     97                                                        <label for="sinkdropdowns_sink_dropdown_mid_link"><strong>Mid level link</strong></label>
     98                                                        <input id="sinkdropdowns_sink_dropdown_mid_link" name="sinkdropdowns_sink_dropdown_mid_link"  value="<?php echo $sinkdropdowns_sink_dropdown_mid_link ?>" type="text" />
     99                                                    </p>
     100                                                </div>                                     
     101                                               
     102                                                <div class="color_bottom color_section">
     103                                                    <p class="">Bottom Level</p>
     104                                                    <p>
     105                                                        <label for="sinkdropdowns_sink_dropdown_bottom"><strong>Bottom level Background</strong></label>
     106                                                        <input id="sinkdropdowns_sink_dropdown_bottom" name="sinkdropdowns_sink_dropdown_bottom"  value="<?php echo $sinkdropdowns_sink_dropdown_bottom ?>" type="text" />
     107                                                    </p>                                       
     108                                                    <p>
     109                                                        <label for="sinkdropdowns_sink_dropdown_bottom_link"><strong>Bottom level link</strong></label>
     110                                                        <input id="sinkdropdowns_sink_dropdown_bottom_link" name="sinkdropdowns_sink_dropdown_bottom_link"  value="<?php echo $sinkdropdowns_sink_dropdown_bottom_link ?>" type="text" />
     111                                                    </p>
     112                                                </div>
    81113                                           
    82                                             <div class="color_mid color_section">
    83                                                 <p class="">Mid Level</p>
    84                                                 <p>
    85                                                     <label for="sinkdropdowns_sink_dropdown_mid"><strong>Mid level Background</strong></label>
    86                                                     <input id="sinkdropdowns_sink_dropdown_mid" name="sinkdropdowns_sink_dropdown_mid"  value="<?php echo $sinkdropdowns_sink_dropdown_mid ?>" type="color" />
    87                                                 </p>                                       
    88                                                 <p>
    89                                                     <label for="sinkdropdowns_sink_dropdown_mid_link"><strong>Mid level link</strong></label>
    90                                                     <input id="sinkdropdowns_sink_dropdown_mid_link" name="sinkdropdowns_sink_dropdown_mid_link"  value="<?php echo $sinkdropdowns_sink_dropdown_mid_link ?>" type="color" />
    91                                                 </p>
    92                                             </div>                                     
    93                                            
    94                                             <div class="color_bottom color_section">
    95                                                 <p class="">Bottom Level</p>
    96                                                 <p>
    97                                                     <label for="sinkdropdowns_sink_dropdown_bottom"><strong>Bottom level Background</strong></label>
    98                                                     <input id="sinkdropdowns_sink_dropdown_bottom" name="sinkdropdowns_sink_dropdown_bottom"  value="<?php echo $sinkdropdowns_sink_dropdown_bottom ?>" type="color" />
    99                                                 </p>                                       
    100                                                 <p>
    101                                                     <label for="sinkdropdowns_sink_dropdown_bottom_link"><strong>Bottom level link</strong></label>
    102                                                     <input id="sinkdropdowns_sink_dropdown_bottom_link" name="sinkdropdowns_sink_dropdown_bottom_link"  value="<?php echo $sinkdropdowns_sink_dropdown_bottom_link ?>" type="color" />
    103                                                 </p>
     114                                                <div class="clearfix"></div>
    104115                                            </div>
    105                                            
    106                                             <div class="clearfix"></div>
    107116                                        </div>
    108117
Note: See TracChangeset for help on using the changeset viewer.