fckplugin.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Dokeos - elearning and course management software
  3. *
  4. * Copyright (c) 2008-2009 Dokeos SPRL
  5. * Copyright (c) 2009 Ivan Tcholakov <ivantcholakov@gmail.com>
  6. *
  7. * For a full list of contributors, see "credits.txt".
  8. * The full license can be read in "license.txt".
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License
  12. * as published by the Free Software Foundation; either version 2
  13. * of the License, or (at your option) any later version.
  14. *
  15. * See the GNU General Public License for more details.
  16. *
  17. * Contact address: Dokeos, rue du Corbeau, 108, B-1030 Brussels, Belgium
  18. * Mail: info@dokeos.com
  19. */
  20. FCKDialog.Prompt = function( message, default_value, action, title, width, height )
  21. {
  22. if ( !message )
  23. {
  24. message = '&nbsp;';
  25. }
  26. if ( !title )
  27. {
  28. title = '&nbsp;';
  29. }
  30. if ( !default_value )
  31. {
  32. default_value = '';
  33. }
  34. if ( !width )
  35. {
  36. width = 500 ;
  37. }
  38. if ( !height )
  39. {
  40. height = 200 ;
  41. }
  42. var custom_value = {} ;
  43. custom_value.default_value = default_value
  44. custom_value.action = action ;
  45. custom_value.message = message ;
  46. FCKDialog.OpenDialog( 'FCKDialog_Prompt', title, FCKConfig.PluginsPath + 'prompt/fck_prompt.html', width, height, custom_value ) ;
  47. }