Plugin Directory

Changeset 959046


Ignore:
Timestamp:
08/02/2014 02:53:44 AM (12 years ago)
Author:
MicahBlu
Message:

Fixes several bugs

Location:
rsvp-me/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • rsvp-me/trunk/admin.css

    r892016 r959046  
    4545    display: block;
    4646}
     47
     48.rsvp-me-cal-options {
     49    float:left;
     50    box-sizing: border-box;
     51    padding-right: 30px;
     52}
     53
     54.rsvp-me-cal-sample {
     55    float:left;
     56    max-width: 300px;
     57}
  • rsvp-me/trunk/admin.php

    r892016 r959046  
    4343    wp_enqueue_script("rsvp-admin", RSVP_ME_PLUGIN_URI . "/js/admin.js", "jquery", null, true);
    4444
     45    wp_enqueue_style("rsvp-admin-css", RSVP_ME_PLUGIN_URI . "/admin.css");
    4546    wp_enqueue_style( 'wp-color-picker' );
    4647    wp_enqueue_script( 'my-script-handle', plugins_url('js/admin.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
     
    123124            <?php for($i=0; $i < count($options); $i++) : ?>
    124125            <?php $fields = $options[$i]['fields']; ?>
    125             <div class="tab-panel" id="tab-content-<?php echo $i ?>">
     126            <div class="tab-panel" id="tab-content-<?php echo $i ?>" <?php echo $i > 0 ? 'style="display:none"' : "" ?>>
    126127                <div class="<?php echo $options[$i]['section'] == 'calendar' ? 'rsvp-me-cal-options' : ''?>">
    127128                <?php
     
    160161               
    161162                <?php if($options[$i]['section'] == 'calendar') : ?>
    162                 <div class="rsvp-me-cal-sample">
    163                     <div id='rsvp_me_calendar_widget'>
     163                    <div class="rsvp-me-cal-sample">
     164                        <div id='rsvp_me_calendar_widget'>
    164165                            <?php rsvp_me_draw_calendar(array(date("Y-m-d") => array()));  ?>
    165166                        </div><!-- #rsvp_me_calendar_widget -->
    166                 </div>
    167                   <?php endif; ?>
     167                    </div>
     168                <?php endif; ?>
    168169            </div><!-- .tab-panel -->
    169170          <?php endfor; ?>
     
    178179
    179180    </div><!-- #rsvp-me-admin -->
    180 <?php }
    181 
    182 ?>
     181<?php } ?>
  • rsvp-me/trunk/includes/rsvpme_events_post_type.php

    r892016 r959046  
    340340    $content = $foomanchu->render($template, $event, false);
    341341
     342    die($content);
    342343    return $content;
    343344}
  • rsvp-me/trunk/includes/rsvpme_functions.php

    r892016 r959046  
    300300function rsvp_me_draw_calendar($events=NULL, $month=NULL, $year=NULL, $settings=NULL){
    301301    /**
    302         Changelog:
    303         -added div wrapper
    304         -added months array and header
    305         -added settings array that can be passed to allow manipulation of basic calendar settings like classname & day headers
    306         -added defaults for month/date/settings
    307    
    308         Notes:
    309         $obj needed as wordpress passes the first parameter
     302     * Changelog:
     303     * -added div wrapper
     304     * -added months array and header
     305     * -added settings array that can be passed to allow manipulation of basic calendar settings like classname & day headers
     306     * -added defaults for month/date/settings
     307     *
     308     * Notes:
     309     * $obj needed as wordpress passes the first parameter
    310310    */
    311311
     
    315315    if(!$settings){
    316316        //set the default settings
    317         $settings = array("class" => "rsvp_me_calendar",
    318                           "dayhead" => "short"
    319                           );
     317        $settings = array(
     318            "class" => "rsvp_me_calendar",
     319            "dayhead" => "short"
     320        );
    320321    }
    321322   
  • rsvp-me/trunk/js/rsvp_me.js

    r892016 r959046  
    187187                this.curyear = date.getFullYear();
    188188            }
     189
    189190            this.curmonth = (this.curmonth > 1) ? (this.curmonth - 1) : 12;
    190191            this.curyear = (this.curmonth == 12) ? (this.curyear - 1) : this.curyear;
     
    250251    function renderTemplate(tmpl, obj){
    251252        var reg,
    252               maxattempts = 50,
    253                 i = 0;
     253            maxattempts = 50,
     254            i = 0;
    254255
    255256        var ifmatches = tmpl.match(/\[{2}#if(.[^\]]+)\]\](.*)\[{2}\/if\]{2}/gmi);
     
    275276                    tmpl = tmpl.replace(parts[0], contents);
    276277                }
     278
    277279            }
    278280        }
     
    291293            }
    292294        }
     295
     296        tmpl = tmpl.replace(/\[\[.+\]\]/g, '');
    293297
    294298        return tmpl;
  • rsvp-me/trunk/rsvpme.css

    r853505 r959046  
    155155}
    156156
     157
    157158/* Default widget styles */
    158159#rsvp_me_event_calendar table{
  • rsvp-me/trunk/rsvpme.php

    r935808 r959046  
    1818$siteurl = get_option('siteurl');
    1919
    20 define('RSVP_ME_PLUGIN_URI', $siteurl . '/wp-content/plugins/rsvp-me');
     20define('RSVP_ME_PLUGIN_URI', plugins_url() . "/rsvp-me");
    2121
    2222include (RSVP_ME_FILE_PATH . "/vendors/foomanchu.php");
     
    4949
    5050function rsvp_me_assets(){
    51        
     51
    5252    wp_enqueue_style("rsvpMeStyles", RSVP_ME_PLUGIN_URI . "/rsvpme.css");
    5353
     
    5757   
    5858    /* rsvm me scripts */
    59     wp_enqueue_script("rsvp-me", RSVP_ME_PLUGIN_URI . "/js/rsvp_me.js", null, null, true);
     59    wp_enqueue_script("rsvp-me", RSVP_ME_PLUGIN_URI . "/js/rsvp_me.js", null, null, false);
    6060}
     61
    6162add_action('wp_enqueue_scripts', 'rsvp_me_assets');
    6263
     
    6465  <script type='text/javascript'>
    6566        var plugin_path = "<?php echo RSVP_ME_PLUGIN_URI ?>";
    66         //var ajaxurl = "<?php echo str_replace(get_site_url(), "", admin_url('admin-ajax.php')); ?>";
    6767        var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
    6868    </script>
  • rsvp-me/trunk/vendors/foomanchu.php

    r892016 r959046  
    7171                // for now only support 'if'
    7272                if($statement == "if"){
     73
    7374                    $match = false;
    7475                    foreach($symbols as $field => $value){
    7576                        if($condition == $field) $match = true;
    7677                    }
     78                    echo $statements[0][$i];
    7779                    if($match){
    7880                        $template = str_replace($statements[0][$i], $statements[3][$i], $template);
     
    99101        }
    100102
     103        // clean up
     104        $template = preg_replace('/\[\[.+?\]\]/', '', $template);
     105       
    101106        // Finally replace any remove third brackets for escaped template tags
    102107        $template = preg_replace('/\[{3}/', '[[', $template);
Note: See TracChangeset for help on using the changeset viewer.