[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/js/tinymce/jscripts/tiny_mce/themes/advanced/ -> source_editor.htm (source)

   1  <html>
   2  <head>
   3  <title>{$lang_theme_code_title}</title>
   4  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
   5  <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
   6  <script language="javascript" type="text/javascript">
   7  <!--
   8      tinyMCE.setWindowArg('mce_windowresize', false);
   9  
  10      function saveContent() {
  11          if (window.opener) {
  12              window.opener.tinyMCE.setContent(document.getElementById('htmlSource').value);
  13              window.close();
  14          }
  15      }
  16  
  17      // Fixes some charcode issues
  18      function fixContent(html) {
  19          html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1');
  20          html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'</$1>\n');
  21          html = tinyMCE.regexpReplace(html, '<br />','<br />\n','gi');
  22          html = tinyMCE.regexpReplace(html, '\n\n','\n','gi');
  23          return html;
  24      }
  25  
  26      function onLoadInit() {
  27          document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id')));
  28          resizeInputs();
  29          setWrap('off');
  30      }
  31  
  32      function setWrap(val) {
  33          // hard soft off
  34          document.forms[0].htmlSource.wrap = val;
  35      }
  36  
  37      function toggleWordWrap(elm) {
  38          if (elm.checked)
  39              setWrap('soft');
  40          else
  41              setWrap('off');
  42      }
  43  
  44      var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
  45  
  46      function resizeInputs() {
  47          if (!tinyMCE.isMSIE) {
  48               wHeight = self.innerHeight-80;
  49               wWidth = self.innerWidth-25;
  50          } else {
  51               wHeight = document.body.clientHeight-80;
  52               wWidth = document.body.clientWidth-25;
  53          }
  54  
  55          document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
  56          document.forms[0].htmlSource.style.width  = Math.abs(wWidth) + 'px';
  57              
  58      }
  59  
  60      window.focus();
  61  //-->
  62  </script>
  63  </head>
  64  <body scroll="no" onload="onLoadInit();" onresize="resizeInputs();">
  65  <form name="source" onsubmit="saveContent();">
  66      <table border="0" cellpadding="0" cellspacing="2" align="center">
  67          <tr>
  68              <td class="title">{$lang_theme_code_title}</td>
  69              <td align="right"><script language="javascript" type="text/javascript">
  70  <!--
  71      if (tinyMCE.isMSIE) {
  72          document.write('<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>');
  73      }
  74  //-->
  75              </script></td>
  76          </tr>
  77          <tr>
  78              <td colspan="2" align="center">
  79                  <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft"></textarea>
  80              </td>
  81          </tr>
  82          <tr>
  83              <td colspan="2" align="right"><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="saveContent();" /></td>
  84          </tr>
  85      </table>
  86  </form>
  87  </body>
  88  </html>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7