Plugin Directory

Changeset 1598257


Ignore:
Timestamp:
02/17/2017 08:21:12 PM (9 years ago)
Author:
dasmaeh
Message:

Preparing release 0.8.4

Location:
recipepress-reloaded/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • recipepress-reloaded/trunk/admin/class-rpr-admin-migration.php

    r1566130 r1598257  
    140140     */
    141141    private function rpr_update_from_4(){
    142        
     142
     143       
    143144        $new_options = get_option( 'rpr_options' );
    144145        $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:
    146151       
    147152        // General options
     
    303308        $new_options['advanced']['display_categories'] = $old_options['recipe_display_categories_in_recipe'];
    304309        $new_options['advanced']['display_tags'] = $old_options['recipe_display_tags_in_recipe'];
    305                
     310                       
    306311        // Save the new options
    307312        update_option( 'rpr_options', $new_options );
  • recipepress-reloaded/trunk/admin/class-rpr-admin.php

    r1584584 r1598257  
    162162                wp_enqueue_script( 'recipepress-reloaded' . '_meta_ing_link', plugin_dir_url( __FILE__ ) . 'js/rpr-admin-ing-meta-link.js', array ( 'jquery' ), $this->version, false );
    163163                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' );
    164166            }
    165167        }
     
    178180        // Load jQuery Link script to add links to ingredients
    179181        wp_enqueue_script( 'wp-link' );
     182       
     183
    180184       
    181185    }
     
    260264                    $this->nutrition->save_nutritionalmeta($recipe_id, $data, $recipe);
    261265                }
    262                 echo "</pre>";
    263266                //die;
    264267                add_action('save_post', array($this, 'save_recipe'));
  • recipepress-reloaded/trunk/admin/js/rpr-admin-ing-meta-table.js

    r1566130 r1598257  
    135135            var name = $( this ).attr( 'name' );
    136136            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 );
    138141                if( $(this).attr('onfocus') ){
    139142                    var onf = $(this).attr('onfocus');
  • recipepress-reloaded/trunk/admin/views/rpr-metabox-ingredients.php

    r1571393 r1598257  
    2222 */
    2323?>
    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 ); ?>;
     35jQuery(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});
     43jQuery(document).on("focusout", ".rpr-ing-name-input", function(){
     44        jQuery(this).autocomplete("destroy");
     45
     46});
    3047</script>
    3148
     
    133150            </td>
    134151            <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']; ?>" />
    136153            </td>
    137154            <td class="rpr-ing-note">
     
    177194            </td>
    178195            <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; ?>" />
    180197            </td>
    181198            <td class="rpr-ing-note">
  • recipepress-reloaded/trunk/public/css/rpr-public.css

    r1566130 r1598257  
    2626
    2727/* times */
     28div.rpr_times{
     29    margin-bottom:1.5ex;
     30}
    2831.rpr_times dl{
    2932    font-size: 80%;
     
    3235    float:left;
    3336    margin-right:12px;
     37    clear:none!important;
     38    width:auto!important;
    3439}
    3540.rpr_times dd{
  • recipepress-reloaded/trunk/public/rpr_template_tags.php

    r1584584 r1598257  
    278278         *  Add the custom taxonomies
    279279         */
    280         foreach( AdminPageFramework::getOption( 'rpr_options', array( 'tax_custom' ) ) as $taxonomy ){
     280        foreach( AdminPageFramework::getOption( 'rpr_options', array( 'tax_custom' ), array() ) as $taxonomy ){
    281281            $out .= get_the_rpr_taxonomy_terms($taxonomy['slug'], $icons, $label, $sep);
    282282        }
     
    718718            * Loop over all the ingredients
    719719            */
     720            $i =0;
    720721           foreach ( $ingredients as $ingredient ){
    721722               /**
     
    732733                    * Start the list on the first item
    733734                    */
    734                    if( isset( $ingredient['sort'] ) && $ingredient['sort'] == 1 ){
     735                    if( $i == 0 ) {
     736                   //if( isset( $ingredient['sort'] ) && $ingredient['sort'] == 1 ){
    735737                       $out .= '<ul class="rpr-ingredient-list" >';
    736738                   }
     
    746748                   }
    747749               }
     750               $i++;
    748751           }
     752           /**
     753             * Close the list on the last item
     754             */
     755            $out .= '</ul>';
    749756        } else {
    750757            /**
     
    19691976         */
    19701977        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>&nbsp;';
    19721979        }
    19731980        /**
  • recipepress-reloaded/trunk/readme.txt

    r1584584 r1598257  
    6868
    6969== Changelog ==
     70= 0.8.4 =
     71 * Fixing several display bugs
     72 
    7073= 0.8.3 =
    7174 * Fixing a bug on activation (file name was wrong)
     
    8689
    8790== Upgrade Notice ==
     91= 0.8.4 =
     92Fixing several bugs in displaying recipes.
     93If you get a 'File not found' error on recipepress-reloaded.php please just reactivate.
     94
    8895= 0.8.3 =
    8996Fixing mor bugs after the complete recode 0.8.0
    9097If you get a 'File not found' error on recipepress-reloaded.php please just reactivate.
     98This is an error in 0.8.0-0.8.2 only. Updating form 0.7.x is not affected.
    9199= 0.8.2 =
    92100Bugfix release
  • recipepress-reloaded/trunk/recipe-press-reloaded.php

    r1584584 r1598257  
    1717 * Plugin URI:        http://tech.cbjck.de/wp-plugins/rpr/
    1818 * 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.3
     19 * Version:           0.8.4
    2020 * Author:            Jan Köster
    2121 * Author URI:        http://tech.cbjck.de/author/jan
     
    3434 * Define constants
    3535 */
    36 const RPR_VERSION = '0.8.3';
     36const RPR_VERSION = '0.8.4';
    3737const RPR_DBVER = '';
    3838
Note: See TracChangeset for help on using the changeset viewer.