Epoz/epoz/epoz_core epoz_script_main.js.dtml,1.1,1.2

Maik Jablonski <[email protected]>
Newsgroups gmane.comp.web.zope.epoz
Message-ID <[email protected]>
Update of /cvsroot/epoz/Epoz/epoz/epoz_core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20497/epoz/epoz_core

Modified Files:
	epoz_script_main.js.dtml 
Log Message:
fixes for JavaScript-in-content-area-fixes

Index: epoz_script_main.js.dtml
===================================================================
RCS file: /cvsroot/epoz/Epoz/epoz/epoz_core/epoz_script_main.js.dtml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** epoz_script_main.js.dtml	19 Jan 2005 22:54:01 -0000	1.1
--- epoz_script_main.js.dtml	19 Feb 2005 13:59:53 -0000	1.2
***************
*** 110,115 ****
  function SyncEpoz() {
      var html = TidyHTML(GetHTML());
!     
!     // strip trailing whitespace    
      html = (html.replace(/^\s*/,'')).replace(/\s*$/,'')
  
--- 110,115 ----
  function SyncEpoz() {
      var html = TidyHTML(GetHTML());
! 
!     // strip trailing whitespace
      html = (html.replace(/^\s*/,'')).replace(/\s*$/,'')
  
***************
*** 118,122 ****
          html = "";
      }
!         
      document.getElementById(form_name).value = html;
  }
--- 118,122 ----
          html = "";
      }
! 
      document.getElementById(form_name).value = html;
  }
***************
*** 378,384 ****
          EpozTextArea.style.display="inline";
      } else {
!         html = html.replace('<script ', '<epoz:script style="display: none" ')
!         html = html.replace('</script>', '</epoz:script>')
!     
          EpozElement.contentWindow.document.body.innerHTML = html;
          document.getElementById("EpozToolbar").style.display="inline";
--- 378,384 ----
          EpozTextArea.style.display="inline";
      } else {
!         html = html.replace(/<script/i, '<epoz:script style="display: none;"');
!         html = html.replace(/<\/script>/i, '</epoz:script>');
! 
          EpozElement.contentWindow.document.body.innerHTML = html;
          document.getElementById("EpozToolbar").style.display="inline";
***************
*** 395,406 ****
  function HandleKeyboardEvent(event)
  {
! 	if (event.ctrlKey) {
! 		var key = String.fromCharCode(event.charCode).toLowerCase();
! 		switch (key) {
! 			case 'b': FormatText('bold',''); event.preventDefault(); break;
! 			case 'i': FormatText('italic',''); event.preventDefault(); break;
! 			case 'u': FormatText('underline',''); event.preventDefault(); break;
! 			case 'k': CreateLink(); event.preventDefault(); break;
! 		};
! 	}
  }
--- 395,406 ----
  function HandleKeyboardEvent(event)
  {
!     if (event.ctrlKey) {
!         var key = String.fromCharCode(event.charCode).toLowerCase();
!         switch (key) {
!             case 'b': FormatText('bold',''); event.preventDefault(); break;
!             case 'i': FormatText('italic',''); event.preventDefault(); break;
!             case 'u': FormatText('underline',''); event.preventDefault(); break;
!             case 'k': CreateLink(); event.preventDefault(); break;
!         };
!     }
  }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.