Changeset 613
- Timestamp:
- 04/28/09 21:29:09 (3 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/test/resizable.html
r510 r613 22 22 <title>WYMeditor</title> 23 23 <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> 24 26 <script type="text/javascript" src="../wymeditor/jquery.wymeditor.js"></script> 25 27 <script type="text/javascript" src="../wymeditor/jquery.wymeditor.explorer.js"></script> -
trunk/src/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js
r584 r613 1 1 /* 2 2 * WYMeditor : what you see is What You Mean web-based editor 3 * Copyright (c) 200 8Jean-Francois Hovinne, http://www.wymeditor.org/3 * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/ 4 4 * Dual licensed under the MIT (MIT-license.txt) 5 5 * and GPL (GPL-license.txt) licenses. … … 14 14 * File Authors: 15 15 * Peter Eschler (peschler _at_ gmail.com) 16 * Jean-Francois Hovinne - http://www.hovinne.com/ 16 17 * 17 18 * Version: 18 * 0. 319 * 0.4 19 20 * 20 21 * Changelog: 22 * 23 * 0.4 24 * - Removed UI and UI.resizable scripts loading - see #167 (jfh). 21 25 * 22 26 * 0.3 … … 39 43 * wym.resizable({ handles: "s,e", 40 44 * maxHeight: 600 }); 45 * 46 * DEPENDENCIES: jQuery UI, jQuery UI resizable 41 47 * 42 48 * @param options options for the plugin … … 80 86 var final_options = jQuery.extend(default_options, options); 81 87 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); 101 89 102 90 };
Note: See TracChangeset
for help on using the changeset viewer.