WordPress.org

Plugin Directory

Changeset 533856


Ignore:
Timestamp:
04/20/12 05:07:15 (2 years ago)
Author:
ZaMoose
Message:

AJAXified saves work now.

Location:
lb-colorbox/trunk/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lb-colorbox/trunk/include/css/lbcb-core.css

    r532108 r533856  
    2929 
    3030.authortitle, 
    31 .hextitle{ 
     31.hextitle, 
     32.linktitle { 
    3233    font-weight: bold; 
    3334} 
     
    4849    background: transparent url('../images/ku_36pxBugOnly.png') no-repeat; 
    4950} 
     51 
     52.kuler-saved { 
     53    background-color: #F8FAFC; 
     54} 
  • lb-colorbox/trunk/include/js/lbcb-ajax.js

    r532655 r533856  
    99            alert(response); 
    1010        }); 
     11        //$(this).closest('tr').addClass('kuler-saved'); 
    1112        return false; 
    1213    }); 
  • lb-colorbox/trunk/include/lbcb-ajax.php

    r533244 r533856  
    4747            $k_full = $kuler_trans[$k_index]; 
    4848             
    49             print_r($k_full); 
     49            //print_r($k_full); 
    5050        }else{ 
    5151            echo "Whoops. You shouldn't ever see this message."; 
     
    6060                                    ); 
    6161        $kuler_query = new WP_Query( $lbcb_args ); 
    62         //$response = $kuler; 
     62         
    6363        if( 0 == $kuler_query->post_count){ 
    64             echo "No Kulers found!"; 
    65              
     64            $k_full['type'] = 'kuler'; 
     65            lbcb_insert_colorbox( $k_full ); 
     66            echo "Kuler added."; 
     67        }else{ 
     68            echo "Kuler already present."; 
    6669        } 
    6770        die(); 
  • lb-colorbox/trunk/include/lbcb-cpt.php

    r532666 r533856  
    165165        'post_type'     => 'colorbox', 
    166166        'post_title'    => $colorbox['title'], 
    167         'post_status'   => 'draft', 
     167        'post_status'   => 'publish', 
    168168    ); 
    169169     
     
    172172    $cb_types = array( 'original', 'colourlover', 'studiopress', 'kuler', 'colllor', 'other' ); 
    173173     
    174     if( in_array( $colorbox['type'], $types) ){ 
     174    if( in_array( $colorbox['type'], $cb_types) ){ 
    175175        $lbcb_type = $colorbox['type']; 
    176176    }else{ 
     
    181181        add_post_meta( $cb_ID, '_lbcb_type', $lbcb_type, true ); 
    182182        add_post_meta( $cb_ID, '_lbcb_author', $colorbox['author'], true ); 
    183         add_post_meta( $cb_ID, '_lbcb_url', $colorbox['url'], true ); 
     183        add_post_meta( $cb_ID, '_lbcb_link', $colorbox['url'], true ); 
    184184        add_post_meta( $cb_ID, '_lbcb_color1', $colorbox['color1'], true ); 
    185185        add_post_meta( $cb_ID, '_lbcb_color2', $colorbox['color2'], true ); 
  • lb-colorbox/trunk/include/lbcb-output.php

    r532108 r533856  
    2626        $hexes = array(); 
    2727        $lbcb_author = get_post_meta( $post->ID, '_lbcb_author', true); 
    28          
     28        $lbcb_url = get_post_meta( $post->ID, '_lbcb_link', true); 
    2929         
    3030        $cb_content .= '<div class="lbcb-swatch-wrapper">' . "\n"; 
     
    3737        $cb_content .= '</div><!-- .lbcb-swatch-wrapper -->' . "\n"; 
    3838        $cb_content .= '<div class="lbcb-meta-wrapper">' . "\n"; 
    39         $cb_content .= '<div class="lbcb-author-wrapper"><span class="authortitle">Author:</span> ' . $lbcb_author . '</div>' . "\n"; 
     39        if( !empty($lbcb_author) ){ 
     40            $cb_content .= '<div class="lbcb-author-wrapper"><span class="authortitle">Author:</span> ' . $lbcb_author . '</div>' . "\n"; 
     41        } 
     42        if( !empty($lbcb_url) ){ 
     43            $cb_content .= '<div class="lbcb-link-wrapper"><span class="linktitle">Source:</span> ' . make_clickable( $lbcb_url ) . '</div>' . "\n"; 
     44        } 
    4045        $cb_content .= '<div class="lbcb-hex-wrapper"><span class="hextitle">Hex values:</span> ' . implode( ', ', $hexes ) . '</div>' . "\n"; 
    4146        $cb_content .= '</div><!-- .lbcb-meta-wrapper -->' . "\n"; 
     
    97102            'slug'  => '', 
    98103            'id'    => '', 
    99              
    100             ), $atts 
    101     )); 
     104            '' 
     105            ), $atts )); 
    102106     
    103107    $lbcb_args = array( 
Note: See TracChangeset for help on using the changeset viewer.