Changeset 1598257
- Timestamp:
- 02/17/2017 08:21:12 PM (9 years ago)
- Location:
- recipepress-reloaded/trunk
- Files:
-
- 8 edited
-
admin/class-rpr-admin-migration.php (modified) (2 diffs)
-
admin/class-rpr-admin.php (modified) (3 diffs)
-
admin/js/rpr-admin-ing-meta-table.js (modified) (1 diff)
-
admin/views/rpr-metabox-ingredients.php (modified) (3 diffs)
-
public/css/rpr-public.css (modified) (2 diffs)
-
public/rpr_template_tags.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
-
recipe-press-reloaded.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
recipepress-reloaded/trunk/admin/class-rpr-admin-migration.php
r1566130 r1598257 140 140 */ 141 141 private function rpr_update_from_4(){ 142 142 143 143 144 $new_options = get_option( 'rpr_options' ); 144 145 $old_options = get_option( 'rpr_option' ); 145 // Move options to new scheme: 146 147 // create a backup of the old options: 148 update_option( 'rpr_options_backup', $old_options ); 149 150 // Move options to new scheme: 146 151 147 152 // General options … … 303 308 $new_options['advanced']['display_categories'] = $old_options['recipe_display_categories_in_recipe']; 304 309 $new_options['advanced']['display_tags'] = $old_options['recipe_display_tags_in_recipe']; 305 310 306 311 // Save the new options 307 312 update_option( 'rpr_options', $new_options ); -
recipepress-reloaded/trunk/admin/class-rpr-admin.php
r1584584 r1598257 162 162 wp_enqueue_script( 'recipepress-reloaded' . '_meta_ing_link', plugin_dir_url( __FILE__ ) . 'js/rpr-admin-ing-meta-link.js', array ( 'jquery' ), $this->version, false ); 163 163 wp_enqueue_script( 'recipepress-reloaded' . '_meta_ins_table', plugin_dir_url( __FILE__ ) . 'js/rpr-admin-ins-meta-table.js', array ( 'jquery' ), $this->version, false ); 164 // Load jQuery suggest script to add autocomplete to ingredients 165 wp_enqueue_script( 'suggest' ); 164 166 } 165 167 } … … 178 180 // Load jQuery Link script to add links to ingredients 179 181 wp_enqueue_script( 'wp-link' ); 182 183 180 184 181 185 } … … 260 264 $this->nutrition->save_nutritionalmeta($recipe_id, $data, $recipe); 261 265 } 262 echo "</pre>";263 266 //die; 264 267 add_action('save_post', array($this, 'save_recipe')); -
recipepress-reloaded/trunk/admin/js/rpr-admin-ing-meta-table.js
r1566130 r1598257 135 135 var name = $( this ).attr( 'name' ); 136 136 name = name.replace( /\[(\d+)\]/, '[' + (rowIndex +1 ) + ']'); 137 $( this ).attr( 'name', name ).attr( 'id', name ); 137 var id = $( this ).attr( 'id' ); 138 id = id.replace( /\_(\d+)/, '_' + (rowIndex + 1) ); 139 $( this ).attr( 'name', name ); 140 $( this ).attr( 'id', id ); 138 141 if( $(this).attr('onfocus') ){ 139 142 var onf = $(this).attr('onfocus'); -
recipepress-reloaded/trunk/admin/views/rpr-metabox-ingredients.php
r1571393 r1598257 22 22 */ 23 23 ?> 24 <script> 25 function autoSuggestTag(id, type) { 26 jQuery('#' + id).suggest("<?php echo get_bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php?action=ajax-tag-search&tax=" + type); 27 window.console.log(id); 28 } 29 var plugin_url = "<?php echo plugins_url(); //$this->pluginUrl; ?>"; 24 25 <script type="text/javascript"> 26 <?php 27 $ingredients = get_terms( 'rpr_ingredient', array( 'orderby'=> 'name', 'order' => 'ASC' ) ); 28 $inglist = array(); 29 foreach( $ingredients as $ing ){ 30 array_push( $inglist, $ing->name ); 31 } 32 ?> 33 /*var ingredients = ; */ 34 var haystack = <?php echo json_encode( $inglist ); ?>; 35 jQuery(document).on("focusin", ".rpr-ing-name-input", function(){ 36 window.console.log(this.name); 37 jQuery(this).autocomplete({ 38 source: haystack, 39 minLength: 2, 40 autoFocus: true 41 }); 42 }); 43 jQuery(document).on("focusout", ".rpr-ing-name-input", function(){ 44 jQuery(this).autocomplete("destroy"); 45 46 }); 30 47 </script> 31 48 … … 133 150 </td> 134 151 <td class="rpr-ing-name"> 135 <input type="text" name="rpr_recipe_ingredients[<?php echo $i; ?>][ingredient]" class="ingredients_name" id="ingredients_<?php echo $i; ?>" onfocus="autoSuggestTag('ingredients_<?php echo $i; ?>', 'rpr_ingredient');"value="<?php echo $ing['ingredient']; ?>" />152 <input type="text" class="rpr-ing-name-input" name="rpr_recipe_ingredients[<?php echo $i; ?>][ingredient]" class="ingredients_name" id="ingredients_<?php echo $i; ?>" value="<?php echo $ing['ingredient']; ?>" /> 136 153 </td> 137 154 <td class="rpr-ing-note"> … … 177 194 </td> 178 195 <td class="rpr-ing-name"> 179 <input type="text" name="rpr_recipe_ingredients[<?php echo $i; ?>][ingredient]" class="ingredients_name" id="ingredients_<?php echo $i; ?>" onfocus="autoSuggestTag('ingredients_<?php echo $i; ?>', 'rpr_ingredient');" placeholder="<?php _e( 'olive oil', 'recipepress-reloaded' ); ?>" />196 <input type="text" class="rpr-ing-name-input" name="rpr_recipe_ingredients[<?php echo $i; ?>][ingredient]" class="ingredients_name" id="ingredients_<?php echo $i; ?>" /> 180 197 </td> 181 198 <td class="rpr-ing-note"> -
recipepress-reloaded/trunk/public/css/rpr-public.css
r1566130 r1598257 26 26 27 27 /* times */ 28 div.rpr_times{ 29 margin-bottom:1.5ex; 30 } 28 31 .rpr_times dl{ 29 32 font-size: 80%; … … 32 35 float:left; 33 36 margin-right:12px; 37 clear:none!important; 38 width:auto!important; 34 39 } 35 40 .rpr_times dd{ -
recipepress-reloaded/trunk/public/rpr_template_tags.php
r1584584 r1598257 278 278 * Add the custom taxonomies 279 279 */ 280 foreach( AdminPageFramework::getOption( 'rpr_options', array( 'tax_custom' ) ) as $taxonomy ){280 foreach( AdminPageFramework::getOption( 'rpr_options', array( 'tax_custom' ), array() ) as $taxonomy ){ 281 281 $out .= get_the_rpr_taxonomy_terms($taxonomy['slug'], $icons, $label, $sep); 282 282 } … … 718 718 * Loop over all the ingredients 719 719 */ 720 $i =0; 720 721 foreach ( $ingredients as $ingredient ){ 721 722 /** … … 732 733 * Start the list on the first item 733 734 */ 734 if( isset( $ingredient['sort'] ) && $ingredient['sort'] == 1 ){ 735 if( $i == 0 ) { 736 //if( isset( $ingredient['sort'] ) && $ingredient['sort'] == 1 ){ 735 737 $out .= '<ul class="rpr-ingredient-list" >'; 736 738 } … … 746 748 } 747 749 } 750 $i++; 748 751 } 752 /** 753 * Close the list on the last item 754 */ 755 $out .= '</ul>'; 749 756 } else { 750 757 /** … … 1969 1976 */ 1970 1977 if( AdminPageFramework::getOption( 'rpr_options', array( 'advanced', 'display_author' ), false ) ){ 1971 $out .= '<span class="rpr_author">' . get_the_author_link() . '</span> ';1978 $out .= '<span class="rpr_author">' . get_the_author_link() . '</span> '; 1972 1979 } 1973 1980 /** -
recipepress-reloaded/trunk/readme.txt
r1584584 r1598257 68 68 69 69 == Changelog == 70 = 0.8.4 = 71 * Fixing several display bugs 72 70 73 = 0.8.3 = 71 74 * Fixing a bug on activation (file name was wrong) … … 86 89 87 90 == Upgrade Notice == 91 = 0.8.4 = 92 Fixing several bugs in displaying recipes. 93 If you get a 'File not found' error on recipepress-reloaded.php please just reactivate. 94 88 95 = 0.8.3 = 89 96 Fixing mor bugs after the complete recode 0.8.0 90 97 If you get a 'File not found' error on recipepress-reloaded.php please just reactivate. 98 This is an error in 0.8.0-0.8.2 only. Updating form 0.7.x is not affected. 91 99 = 0.8.2 = 92 100 Bugfix release -
recipepress-reloaded/trunk/recipe-press-reloaded.php
r1584584 r1598257 17 17 * Plugin URI: http://tech.cbjck.de/wp-plugins/rpr/ 18 18 * Description: The swiss army knife for your food blog. A tool not only to add nicely and seo friendly formatted recipes to your posts. But also to manage present your recipe collection. 19 * Version: 0.8. 319 * Version: 0.8.4 20 20 * Author: Jan Köster 21 21 * Author URI: http://tech.cbjck.de/author/jan … … 34 34 * Define constants 35 35 */ 36 const RPR_VERSION = '0.8. 3';36 const RPR_VERSION = '0.8.4'; 37 37 const RPR_DBVER = ''; 38 38
Note: See TracChangeset
for help on using the changeset viewer.