Commit f494cdab9db8e3a608c6eab173b3d15923d5c070

Authored by Nei Jobson da Costa Carneiro
2 parents 9e995b84 350f7ed1

Merge branch 'pre_versao_1.1.0_SEI-3_e_Intercorrente' into 'pre_versao_1.1.0_SEI-3_e_Intercorrente'

Ajuste na barra de rolagem do editor de documentos

Prezados,

Segue melhorias no editor de documentos do módulo de peticionamento para habilitar a barra de rolagem de documento.
Peço que avaliem estas alterações e testem novamente no ambiente da Anatel.

Atenciosamente,

See merge request !6
sei/web/modulos/peticionamento/editor_peticionamento_processar.php
... ... @@ -189,19 +189,36 @@
189 189 ?>
190 190 function inicializar(){
191 191 infraEfeitoTabelas();
  192 + infraAdicionarEvento(window,'resize',redimensionar);
  193 + CKEDITOR.on('instanceReady', function( evt ) { redimensionar();});
192 194 }
  195 +
  196 + function redimensionar() {
  197 + setTimeout(function(){
  198 +
  199 + var tamComandos=document.getElementById('divComandos').offsetHeight;
  200 + var divEd=document.getElementById('divEditores');
  201 + if (tamComandos>divEd.offsetHeight) tamComandos-=divEd.offsetHeight;
  202 + var tamEditor=infraClientHeight()- tamComandos - 20;
  203 + divEd.style.height = (tamEditor>0?tamEditor:1) +'px';
  204 + },0);
  205 + }
  206 +
193 207 <?
194 208 PaginaSEIExterna::getInstance()->fecharJavaScript();
195 209 echo $retEditor->getStrInicializacao();
196 210 PaginaSEIExterna::getInstance()->fecharHead();
197 211 ?>
198   -
  212 +<body onload="inicializar();" style="margin: 5px;overflow: hidden">
199 213 <form id="frmTextoPadraoInternoCadastro" method="post" onsubmit="return OnSubmitForm();"
200 214 action="<?=PaginaSEIExterna::getInstance()->formatarXHTML(SessaoSEIExterna::getInstance()->assinarLink('controlador_externo.php?id_serie=' . $_GET['id_serie'] . '&acao='.$_GET['acao'].'&acao_origem='.$_GET['acao']))?>">
201 215  
202   - <table style="width: 100%; height: 95%;">
203   - <td style="width: 95%; height: 95%;">
204   - <div id="divEditores" style="overflow: auto; ">
  216 + <div id="divComandos" style="margin:0px;"></div>
  217 + <?
  218 + if (PaginaSEIExterna::getInstance()->getNumTipoBrowser()==InfraPagina::$TIPO_BROWSER_IE7 ) echo '<br style="margin:0;font-size:1px;"/>';
  219 + ?>
  220 +
  221 + <div id="divEditores" style="overflow: auto;border-top:2px solid;border-bottom:0px;">
205 222 <textarea id="txaConteudo" name="txaConteudo" rows="10" class="infraTextarea"
206 223 tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>"><?=$txtConteudo?></textarea>
207 224 <script type="text/javascript">
... ... @@ -209,8 +226,7 @@ PaginaSEIExterna::getInstance()-&gt;fecharHead();
209 226 'toolbar':[["Save"],["Find","Replace","-","RemoveFormat","Bold","Italic","Underline","Strike","Subscript","Superscript","Maiuscula","Minuscula","TextColor","BGColor"],["Cut","Copy","PasteFromWord","PasteText","-","Undo","Redo","ShowBlocks","Symbol","Scayt"],["NumberedList","BulletedList","-","Outdent","Indent","base64image"],["Table","SpecialChar","SimpleLink","Extenso","Zoom"],["Styles"]]});
210 227 </script>
211 228 </div>
212   - </td>
213   - </table>
  229 +
214 230  
215 231 <input type="hidden" id="hdnVersao" name="hdnVersao" value="0" />
216 232 <input type="hidden" id="hdnIdConjuntoEstilos" name="hdnIdConjuntoEstilos" value="<?= $conjuntoEstilosDTO->getNumIdConjuntoEstilos() ?>" />
... ...