Changeset 959046
- Timestamp:
- 08/02/2014 02:53:44 AM (12 years ago)
- Location:
- rsvp-me/trunk
- Files:
-
- 8 edited
-
admin.css (modified) (1 diff)
-
admin.php (modified) (4 diffs)
-
includes/rsvpme_events_post_type.php (modified) (1 diff)
-
includes/rsvpme_functions.php (modified) (2 diffs)
-
js/rsvp_me.js (modified) (4 diffs)
-
rsvpme.css (modified) (1 diff)
-
rsvpme.php (modified) (4 diffs)
-
vendors/foomanchu.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
rsvp-me/trunk/admin.css
r892016 r959046 45 45 display: block; 46 46 } 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 43 43 wp_enqueue_script("rsvp-admin", RSVP_ME_PLUGIN_URI . "/js/admin.js", "jquery", null, true); 44 44 45 wp_enqueue_style("rsvp-admin-css", RSVP_ME_PLUGIN_URI . "/admin.css"); 45 46 wp_enqueue_style( 'wp-color-picker' ); 46 47 wp_enqueue_script( 'my-script-handle', plugins_url('js/admin.js', __FILE__ ), array( 'wp-color-picker' ), false, true ); … … 123 124 <?php for($i=0; $i < count($options); $i++) : ?> 124 125 <?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"' : "" ?>> 126 127 <div class="<?php echo $options[$i]['section'] == 'calendar' ? 'rsvp-me-cal-options' : ''?>"> 127 128 <?php … … 160 161 161 162 <?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'> 164 165 <?php rsvp_me_draw_calendar(array(date("Y-m-d") => array())); ?> 165 166 </div><!-- #rsvp_me_calendar_widget --> 166 </div>167 <?php endif; ?>167 </div> 168 <?php endif; ?> 168 169 </div><!-- .tab-panel --> 169 170 <?php endfor; ?> … … 178 179 179 180 </div><!-- #rsvp-me-admin --> 180 <?php } 181 182 ?> 181 <?php } ?> -
rsvp-me/trunk/includes/rsvpme_events_post_type.php
r892016 r959046 340 340 $content = $foomanchu->render($template, $event, false); 341 341 342 die($content); 342 343 return $content; 343 344 } -
rsvp-me/trunk/includes/rsvpme_functions.php
r892016 r959046 300 300 function rsvp_me_draw_calendar($events=NULL, $month=NULL, $year=NULL, $settings=NULL){ 301 301 /** 302 Changelog:303 -added div wrapper304 -added months array and header305 -added settings array that can be passed to allow manipulation of basic calendar settings like classname & day headers306 -added defaults for month/date/settings307 308 Notes:309 $obj needed as wordpress passes the first parameter302 * 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 310 310 */ 311 311 … … 315 315 if(!$settings){ 316 316 //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 ); 320 321 } 321 322 -
rsvp-me/trunk/js/rsvp_me.js
r892016 r959046 187 187 this.curyear = date.getFullYear(); 188 188 } 189 189 190 this.curmonth = (this.curmonth > 1) ? (this.curmonth - 1) : 12; 190 191 this.curyear = (this.curmonth == 12) ? (this.curyear - 1) : this.curyear; … … 250 251 function renderTemplate(tmpl, obj){ 251 252 var reg, 252 maxattempts = 50,253 i = 0;253 maxattempts = 50, 254 i = 0; 254 255 255 256 var ifmatches = tmpl.match(/\[{2}#if(.[^\]]+)\]\](.*)\[{2}\/if\]{2}/gmi); … … 275 276 tmpl = tmpl.replace(parts[0], contents); 276 277 } 278 277 279 } 278 280 } … … 291 293 } 292 294 } 295 296 tmpl = tmpl.replace(/\[\[.+\]\]/g, ''); 293 297 294 298 return tmpl; -
rsvp-me/trunk/rsvpme.css
r853505 r959046 155 155 } 156 156 157 157 158 /* Default widget styles */ 158 159 #rsvp_me_event_calendar table{ -
rsvp-me/trunk/rsvpme.php
r935808 r959046 18 18 $siteurl = get_option('siteurl'); 19 19 20 define('RSVP_ME_PLUGIN_URI', $siteurl . '/wp-content/plugins/rsvp-me');20 define('RSVP_ME_PLUGIN_URI', plugins_url() . "/rsvp-me"); 21 21 22 22 include (RSVP_ME_FILE_PATH . "/vendors/foomanchu.php"); … … 49 49 50 50 function rsvp_me_assets(){ 51 51 52 52 wp_enqueue_style("rsvpMeStyles", RSVP_ME_PLUGIN_URI . "/rsvpme.css"); 53 53 … … 57 57 58 58 /* 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); 60 60 } 61 61 62 add_action('wp_enqueue_scripts', 'rsvp_me_assets'); 62 63 … … 64 65 <script type='text/javascript'> 65 66 var plugin_path = "<?php echo RSVP_ME_PLUGIN_URI ?>"; 66 //var ajaxurl = "<?php echo str_replace(get_site_url(), "", admin_url('admin-ajax.php')); ?>";67 67 var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>"; 68 68 </script> -
rsvp-me/trunk/vendors/foomanchu.php
r892016 r959046 71 71 // for now only support 'if' 72 72 if($statement == "if"){ 73 73 74 $match = false; 74 75 foreach($symbols as $field => $value){ 75 76 if($condition == $field) $match = true; 76 77 } 78 echo $statements[0][$i]; 77 79 if($match){ 78 80 $template = str_replace($statements[0][$i], $statements[3][$i], $template); … … 99 101 } 100 102 103 // clean up 104 $template = preg_replace('/\[\[.+?\]\]/', '', $template); 105 101 106 // Finally replace any remove third brackets for escaped template tags 102 107 $template = preg_replace('/\[{3}/', '[[', $template);
Note: See TracChangeset
for help on using the changeset viewer.