A tumblelog CMS built on AJAX, PHP and MySQL.

rule.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. function init() {
  2. tinyMCEPopup.resizeToInnerSize();
  3. var formObj = document.forms[0];
  4. formObj.width.value = tinyMCE.getWindowArg('width');
  5. formObj.size.value = tinyMCE.getWindowArg('size');
  6. formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'),'Insert',true);
  7. if (tinyMCE.getWindowArg('noshade')) {
  8. formObj.noshade.checked = true;
  9. }
  10. if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
  11. formObj.width2.value = "%";
  12. formObj.width.value = formObj.width.value.substring(0,formObj.width.value.length-1);
  13. }
  14. }
  15. function insertHR() {
  16. var formObj = document.forms[0];
  17. var width = formObj.width.value;
  18. var size = formObj.size.value;
  19. var html = '<hr';
  20. if (size!='' && size!=0) {
  21. html += ' size="' + size + '"';
  22. }
  23. if (width!='' && width!=0) {
  24. html += ' width="' + width;
  25. if (formObj.width2.value=='%') {
  26. html += '%';
  27. }
  28. html += '"';
  29. }
  30. if (formObj.noshade.checked==true) {
  31. html += ' noshade="noshade"';
  32. }
  33. html += ' />';
  34. tinyMCEPopup.execCommand("mceInsertContent", true, html);
  35. tinyMCEPopup.close();
  36. }
  37. function cancelAction() {
  38. tinyMCEPopup.close();
  39. }