Plugin Directory

Changeset 368143


Ignore:
Timestamp:
04/02/2011 04:09:28 PM (15 years ago)
Author:
doolin
Message:

More javascript cleanups.

Location:
hrecipe/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • hrecipe/trunk

    • Property svn:ignore set to
      .project
      .gitignore
  • hrecipe/trunk/hrecipe.class.php

    r366041 r368143  
    5050        //wp_enqueue_script('hrecipe-reciply');
    5151        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         wp_localize_script('hrecipescript','hrecipe_handle',hrecipe_localize_vars());
     52        //wp_register_script('hrecipescript',plugins_url('hrecipe/js/hrecipescript.js', dirname(__FILE__)));
     53        //wp_localize_script('hrecipescript','hrecipe_handle',hrecipe_localize_vars());
     54        wp_localize_script('hrecipeformat','hrecipe_handle',hrecipe_localize_vars());
    5455
    5556        // TODO: Move the enqueue to where it's needed.
    56         wp_enqueue_script('hrecipescript');
     57        //wp_enqueue_script('hrecipescript');
    5758        wp_enqueue_script('hrecipeformat');
    5859    }
  • hrecipe/trunk/hrecipe.css

    r288193 r368143  
    9191
    9292/* div-based layouts */
     93
     94div.hrecipe h4 {
     95  font-weight: bold;
     96  font-size: 115%;
     97}
     98
    9399div.hrecipe p.item {
    94100    font-size: 1.6em;
  • hrecipe/trunk/js/hrecipe_format.js

    r366041 r368143  
    33/*global tinyMCE, edInsertContent, edCanvas */
    44
     5
     6/*
     7 * enqueue this script with a dependency on 'quicktags'
     8 */
    59//(function () {
    610
     
    2428
    2529  hrecipe_qttoolbar = document.getElementById("ed_toolbar");
     30/*
    2631  if (hrecipe_qttoolbar === null) {
    2732    alert("ed_toolber element is null");
    2833  }
     34 */
    2935  //if (hrecipe_qttoolbar = document.getElementById("ed_toolbar")) {
    3036  if (hrecipe_qttoolbar !== null) {
     
    163169  }
    164170
     171
     172/*
     173  function format_summary(itemSummary) {
     174    var markup = '';
     175    if (itemSummary === '') { return; }
     176    markup = '<h4 class="summary">';
     177    markup += hrecipe_handle.hrecipe_summary_text;
     178    markup += '<em>' + itemSummary + '</em>';   
     179    markup += '</h4>';
     180    return markup;
     181  }
     182*/
     183
    165184/**
    166185 * Thanks for Michael Allen Smith for help
     
    186205  }
    187206   
     207 
     208/**
     209 * Refactor format_item into something which can be used for all the
     210 * pieces of hrecipe output to reduce the maintenance load for
     211 * changing formatting etc.
     212 */
    188213 
    189214  function format_item(hrclass, hrtext, hritem) {
  • hrecipe/trunk/readme.txt

    r361090 r368143  
    44Requires at least: 3.0
    55Tested up to: 3.1
    6 Stable tag: 0.5.4.4
     6Stable tag: 0.5.4.5
    77
    88This is a plugin to allow the easy entry of microformat content for
     
    8888
    8989== Changelog ==
     90
     91= 0.5.4.5 =
     92* Scripting cleanup including s/$/jQeury/ and enqueueing script with variables now localized.
    9093
    9194= 0.5.4.4 =
  • hrecipe/trunk/view/lightbox.php

    r366041 r368143  
    77// http://ottodestruct.com/blog/2010/dont-include-wp-load-please/
    88// http://ottopress.com/2010/passing-parameters-from-php-to-javascripts-in-plugins/
    9 //require_once('../../../../wp-load.php'); // Ugly directory stuff
    10 require_once('../../../../wp-admin/admin.php'); // Ugly directory stuff
    11 // This is not working, and it should.
    12 //require_once(ABSPATH.'wp-admin/admin.php'); // Ugly directory stuff
    13 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
     9require_once('../../../../wp-admin/admin.php');
     10
     11//@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
    1412?>
    1513<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    1614<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
    1715<head>
     16<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
     17<title><?php bloginfo('name') ?> &rsaquo; <?php _e('hRecipe'); ?> &#8212; <?php _e('WordPress'); ?></title> 
    1818<?php
    1919wp_enqueue_style( 'global' );
     
    2727<script type="text/javascript">
    2828
    29 $(document).ready(function() {
     29jQuery(document).ready(function() {
    3030
    3131    //Default Action
     
    235235//]]>
    236236</script>
    237 
    238 
    239 
    240237
    241238<?php
     
    464461</div>
    465462</form></div>
     463<?php
     464  //do_action('admin_print_footer_scripts');
     465?>
    466466</body>
    467467</html>
Note: See TracChangeset for help on using the changeset viewer.