fckplugin.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * This piece of software has been created for Chamilo LMS
  3. * Mail: info@chamilo.org
  4. *
  5. * Copyright (c) 2009-2010 Ivan Tcholakov <ivantcholakov@gmail.com>
  6. *
  7. * For a full list of contributors detaining copyrights over parts of
  8. * the Chamilo software, see "documentation/credits.html".
  9. * The full license can be read in "documentation/license.html".
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License version 3
  13. * as published by the Free Software Foundation.
  14. *
  15. * See the GNU General Public License for more details.
  16. */
  17. FCKDialog.Prompt = function( message, default_value, action, title, width, height )
  18. {
  19. if ( !message )
  20. {
  21. message = '&nbsp;';
  22. }
  23. if ( !title )
  24. {
  25. title = '&nbsp;';
  26. }
  27. if ( !default_value )
  28. {
  29. default_value = '';
  30. }
  31. if ( !width )
  32. {
  33. width = 500 ;
  34. }
  35. if ( !height )
  36. {
  37. height = 200 ;
  38. }
  39. var custom_value = {} ;
  40. custom_value.default_value = default_value ;
  41. custom_value.action = action ;
  42. custom_value.message = message ;
  43. FCKDialog.OpenDialog( 'FCKDialog_Prompt', title, FCKConfig.PluginsPath + 'prompt/fck_prompt.html', width, height, custom_value ) ;
  44. }