/[webpac2]/Webpacus/root/editor/editor.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Webpacus/root/editor/editor.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 356 by dpavlin, Wed Dec 14 23:04:13 2005 UTC revision 357 by dpavlin, Sat Jan 7 23:43:38 2006 UTC
# Line 231  function hide_working() { Line 231  function hide_working() {
231          Logger.debug('hide_working, count = '+working_count);          Logger.debug('hide_working, count = '+working_count);
232  }  }
233    
234    /* called body.onLoad */
235    
236  function init_page() {  function init_page() {
237          show_working();          show_working();
238    
239            textarea_reset_size( 'template_content' );
240            textarea_reset_size( 'css_content' );
241    
242          edit_template();          edit_template();
243    
244          hide_working();          hide_working();
245  }  }
246    
247    /* resize textarea */
248    
249    function textarea_reset_size( id ) {
250            var textarea = $( id );
251            if (! textarea) {
252                    Logger.error('can\'t reset size to non-existant textarea '+id);
253                    return;
254            }
255            var hgt = Cookie.get('webpacus_ta_'+id);
256            if (! hgt) hgt='20em';
257            textarea.style.height = hgt;
258            Logger.debug('reset textarea '+id+' height to '+hgt);
259    }
260    
261    function textarea_resize( id, val ){
262            var textarea = $( id );
263            var height = parseInt(textarea.style.height.substr(0,textarea.style.height.length-2));
264            height += val;
265            Logger.debug('resize_textarea('+id+','+val+') '+textarea.style.height+' '+height);
266            textarea.style.height = height+'px';
267            Cookie.set('webpacus_ta_'+id,textarea.style.height,365);
268    }

Legend:
Removed from v.356  
changed lines
  Added in v.357

  ViewVC Help
Powered by ViewVC 1.1.26