Changeset 613


Ignore:
Timestamp:
04/28/09 21:29:09 (3 years ago)
Author:
jf.hovinne
Message:

Fixed #167.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/test/resizable.html

    r510 r613  
    2222<title>WYMeditor</title> 
    2323<script type="text/javascript" src="../jquery/jquery.js"></script> 
     24<script type="text/javascript" src="../jquery/jquery.ui.js"></script> 
     25<script type="text/javascript" src="../jquery/jquery.ui.resizable.js"></script> 
    2426<script type="text/javascript" src="../wymeditor/jquery.wymeditor.js"></script> 
    2527<script type="text/javascript" src="../wymeditor/jquery.wymeditor.explorer.js"></script> 
  • trunk/src/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js

    r584 r613  
    11/* 
    22 * WYMeditor : what you see is What You Mean web-based editor 
    3  * Copyright (c) 2008 Jean-Francois Hovinne, http://www.wymeditor.org/ 
     3 * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ 
    44 * Dual licensed under the MIT (MIT-license.txt) 
    55 * and GPL (GPL-license.txt) licenses. 
     
    1414 * File Authors: 
    1515 *        Peter Eschler (peschler _at_ gmail.com) 
     16 *        Jean-Francois Hovinne - http://www.hovinne.com/ 
    1617 * 
    1718 * Version: 
    18  *        0.3 
     19 *        0.4 
    1920 * 
    2021 * Changelog: 
     22 * 
     23 * 0.4 
     24 *     - Removed UI and UI.resizable scripts loading - see #167 (jfh). 
    2125 * 
    2226 * 0.3 
     
    3943 *         wym.resizable({ handles: "s,e", 
    4044 *                         maxHeight: 600 }); 
     45 * 
     46 * DEPENDENCIES: jQuery UI, jQuery UI resizable 
    4147 * 
    4248 * @param options options for the plugin   
     
    8086    var final_options = jQuery.extend(default_options, options); 
    8187 
    82     // Get the jQuery path from the editor, stripping away the jQuery file. 
    83     // see http://www.oreilly.com/catalog/regex/chapter/ch04.html 
    84     // The match result array contains the path and the filename. 
    85     var jQueryPath = wym.computeJqueryPath().match(/^(.*)\/(.*)$/)[1]; 
    86  
    87     // Make an array of the external JavaScript files required by the plugin. 
    88     var jQueryPlugins = [jQueryPath + '/jquery.ui.js', 
    89                          jQueryPath + '/jquery.ui.resizable.js']; 
    90      
    91     // First get the jQuery UI base file 
    92     jQuery.getScript(jQueryPlugins[0]); 
    93  
    94     // Get the jQuery UI resizeable plugin and then init the wymeditor resize 
    95     // plugin. It is import to do the initialisation after loading the     
    96     // necessary jQuery UI files has finished, otherwise the "resizable" method 
    97     // would not be available. 
    98     jQuery.getScript(jQueryPlugins[1], function() {      
    99         jQuery(wym._box).resizable(final_options); 
    100     }); 
     88    if(jQuery.isFunction( jQuery.fn.resizable )) jQuery(wym._box).resizable(final_options); 
    10189 
    10290}; 
Note: See TracChangeset for help on using the changeset viewer.