Changeset 366041
- Timestamp:
- 03/28/2011 10:48:27 PM (15 years ago)
- Location:
- hrecipe/trunk
- Files:
-
- 1 added
- 6 edited
-
. (modified) (1 prop)
-
hrecipe.class.php (modified) (2 diffs)
-
hrecipe.php (modified) (3 diffs)
-
hrecipe_format.php (modified) (1 diff)
-
js/hrecipe_format.js (added)
-
tinymceplugin/editor_plugin.js (modified) (1 diff)
-
view/lightbox.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hrecipe/trunk
- Property svn:ignore deleted
-
hrecipe/trunk/hrecipe.class.php
r361092 r366041 49 49 //wp_enqueue_script('hrecipe-jquery-min'); 50 50 //wp_enqueue_script('hrecipe-reciply'); 51 wp_register_script('hrecipe -format',plugins_url('hrecipe/js/hrecipe_format.js',dirname(__FILE__)));52 wp_register_script('hrecipescript',plugins_url('hrecipe/js/hrecipescript.js', dirname(__FILE__)));51 wp_register_script('hrecipeformat',plugins_url('hrecipe/js/hrecipe_format.js', dirname(__FILE__)),'','',true); 52 wp_register_script('hrecipescript',plugins_url('hrecipe/js/hrecipescript.js', dirname(__FILE__))); 53 53 wp_localize_script('hrecipescript','hrecipe_handle',hrecipe_localize_vars()); 54 54 55 55 // TODO: Move the enqueue to where it's needed. 56 56 wp_enqueue_script('hrecipescript'); 57 //wp_enqueue_script('hrecipe-format'); 58 59 57 wp_enqueue_script('hrecipeformat'); 60 58 } 61 59 … … 136 134 // should go away, and it should be renamed to hrecipe_format.js 137 135 // See if wp_enqueue_script will work here. 138 //wp_enqueue_script('hrecipe-format'); 139 include ('hrecipe_format.php'); 136 wp_register_script('hrecipeformat',plugins_url('hrecipe/js/hrecipe_format.js', dirname(__FILE__)),'','',true); 137 wp_enqueue_script('hrecipeformat'); 138 //include ('hrecipe_format.php'); 140 139 } 141 140 -
hrecipe/trunk/hrecipe.php
r361294 r366041 1 1 <?php 2 2 /* 3 Plugin Name: hRecipe4 Plugin URI: http://hrecipe.com/5 Description: Fast and easy recipe formatting. Allows the correct microformat content to be easily added for recipes.6 Version: 0.5.4.4 7 Author: Dave Doolin8 Author URI: http://website-in-a-weekend.net/9 */3 * Plugin Name: hRecipe 4 * Plugin URI: http://hrecipe.com/ 5 * Description: Fast and easy recipe formatting. Allows the correct microformat content to be easily added for recipes. 6 * Version: 0.5.4.5 7 * Author: Dave Doolin 8 * Author URI: http://website-in-a-weekend.net/ 9 */ 10 10 11 11 /* Copyright 2009 David M. Doolin … … 71 71 72 72 73 add_action('admin_footer', array ($recipe, 'hrecipe_plugin_footer')); 73 //add_action('admin_footer', array ($recipe, 'hrecipe_plugin_footer')); 74 //add_action('admin_print_scripts', array ($recipe, 'hrecipe_plugin_footer')); 74 75 75 76 //add_action('wp_head', array ($recipe, 'hrecipe_plugin_head')); … … 83 84 84 85 add_action('init', array ($recipe, 'hrecipe_plugin_init')); 86 // Not yet ready to move to internal options handling. 85 87 //add_action('init', array ($recipe, 'register_mysettings')); 86 88 add_action('admin_menu', array ($recipe, 'hrecipe_plugin_menu')); -
hrecipe/trunk/hrecipe_format.php
r361079 r366041 148 148 149 149 /** 150 * Thanks for Michael Allen Smith for help 150 * Thanks for Michael Allen Smith for help 151 151 * with bringing duration into spec so that 152 152 * hrecipes will be properly displayed as -
hrecipe/trunk/tinymceplugin/editor_plugin.js
r359006 r366041 1 /* TinyMCE plugin for WordPress hRecipe plug-in. 2 Details on creating TinyMCE plugins at 3 http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x 4 */ 5 (function() { 6 // Grab the text strings to be used by hrecipe TinyMCE button 7 tinymce.PluginManager.requireLangPack('hrecipe_plugin'); 1 /* 2 * TinyMCE plugin for WordPress hRecipe plug-in. 3 * Details on creating TinyMCE plugins at 4 * http://tinymce.moxiecode.com/wiki.php/Creating_a_plugin 5 */ 6 /*global tinymce, edInsertHRecipe */ 8 7 9 tinymce.create('tinymce.plugins.hrecipe_plugin', { 10 getInfo : function() { 11 return { 12 longname : 'hRecipe Support for Editor', 13 author : 'Dave Doolin', 14 authorurl : 'http://website-in-a-weekend.net/', 15 infourl : 'http://website-in-a-weekend.net/', 16 version : "0.1" 17 }; 18 }, 8 (function () { 19 9 20 init : function(ed, url) { 21 ed.addButton('hrecipe_button', { 22 title : 'hrecipe_plugin.insertbutton', 23 image : url + '/../hrecipe_icon_20x20.png', 24 onclick : function () { 25 edInsertHRecipe(); 26 } 27 }); 28 }, 10 // Grab the text strings to be used by hrecipe TinyMCE button 11 tinymce.PluginManager.requireLangPack('hrecipe_plugin'); 29 12 30 createControl : function (n, cm) { 31 return null; 32 } 13 tinymce.create('tinymce.plugins.hrecipe_plugin', { 14 getInfo : function () { 15 return { 16 longname : 'hRecipe Support for Editor', 17 author : 'Dave Doolin', 18 authorurl : 'http://website-in-a-weekend.net/', 19 infourl : 'http://website-in-a-weekend.net/', 20 version : "0.1" 21 }; 22 }, 33 23 34 }); 24 init : function (ed, url) { 25 ed.addButton('hrecipe_button', { 26 title : 'hrecipe_plugin.insertbutton', 27 image : url + '/../hrecipe_icon_20x20.png', 28 onclick : function () { 29 edInsertHRecipe(); 30 } 31 }); 32 }, 35 33 36 // Adds the plugin class to the list of available TinyMCE plugins 37 tinymce.PluginManager.add('hrecipe_plugin', tinymce.plugins.hrecipe_plugin); 34 createControl : function (n, cm) { 35 return null; 36 } 37 38 }); 39 40 tinymce.PluginManager.add('hrecipe_plugin', tinymce.plugins.hrecipe_plugin); 38 41 })(); -
hrecipe/trunk/view/lightbox.php
r361027 r366041 131 131 } 132 132 133 134 133 135 function getSelectValue(fieldId) { 134 136 135 137 var selectItem = document.getElementById(fieldId); 136 138 var selectValue = selectItem.value; 137 if ("" != selectValue) 138 {139 140 if ("" != selectValue) { 139 141 return selectValue; 140 142 } 143 141 144 // avoid bug in old browsers where they never give any value directly 142 145 var selectIdx = selectItem.selectedIndex; 143 146 selectValue = selectItem.options[selectIdx].value; 144 if ("" != selectValue) 145 {147 148 if ("" != selectValue) { 146 149 return selectValue; 147 150 } 151 148 152 // and cope with IE 149 153 selectValue = (selectItem.options[selectIdx]).text; 150 154 return selectValue; 151 155 } 156 152 157 153 158 // Process the checkboxes here.
Note: See TracChangeset
for help on using the changeset viewer.