Changeset 783 for branches/ray/modules


Ignore:
Timestamp:
03/15/07 10:06:49 (13 years ago)
Author:
ray
Message:

updated branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ray/modules/Dialogs/inline-dialog.js

    r782 r783  
    212212}; 
    213213 
    214 Xinha.Dialog.background = []; 
    215214Xinha.Dialog.prototype.sizeBackground = function() 
    216215{ 
     
    263262  } 
    264263 
    265   this.editor.deactivateEditor(); 
     264  if ( this.modal ) this.editor.deactivateEditor(); 
    266265 
    267266  // unfortunately we have to hide the editor (iframe/caret bug) 
     
    272271    this.editor._iframe.style.visibility   = 'hidden'; 
    273272  } 
     273   
    274274  if (!this.editor._isFullScreen && this.modal) 
    275275  { 
     
    780780  return html; 
    781781} 
    782  
    783  
    784 Xinha.prototype.addPanel = function(side) 
    785 { 
    786   var div = document.createElement('div'); 
    787   div.side = side; 
    788   if ( side == 'left' || side == 'right' ) 
    789   { 
    790     div.style.width  = this.config.panel_dimensions[side]; 
    791     if(this._iframe) div.style.height = this._iframe.style.height;      
    792   } 
    793   Xinha.addClasses(div, 'panel'); 
    794   this._panels[side].panels.push(div); 
    795   this._panels[side].div.appendChild(div); 
    796  
    797   this.notifyOf('panel_change', {'action':'add','panel':div}); 
    798  
    799   return div; 
    800 }; 
    801  
    802  
    803 Xinha.prototype.removePanel = function(panel) 
    804 { 
    805   this._panels[panel.side].div.removeChild(panel); 
    806   var clean = []; 
    807   for ( var i = 0; i < this._panels[panel.side].panels.length; i++ ) 
    808   { 
    809     if ( this._panels[panel.side].panels[i] != panel ) 
    810     { 
    811       clean.push(this._panels[panel.side].panels[i]); 
    812     } 
    813   } 
    814   this._panels[panel.side].panels = clean; 
    815   this.notifyOf('panel_change', {'action':'remove','panel':panel}); 
    816 }; 
    817  
    818 Xinha.prototype.hidePanel = function(panel) 
    819 { 
    820   if ( panel && panel.style.display != 'none' ) 
    821   { 
    822     try { var pos = this.scrollPos(this._iframe.contentWindow); } catch(e) { } 
    823     panel.style.display = 'none'; 
    824     this.notifyOf('panel_change', {'action':'hide','panel':panel}); 
    825     try { this._iframe.contentWindow.scrollTo(pos.x,pos.y)} catch(e) { } 
    826   } 
    827 }; 
    828  
    829 Xinha.prototype.showPanel = function(panel) 
    830 { 
    831   if ( panel && panel.style.display == 'none' ) 
    832   { 
    833     try { var pos = this.scrollPos(this._iframe.contentWindow); } catch(e) { } 
    834         panel.style.display = '';     
    835     this.notifyOf('panel_change', {'action':'show','panel':panel}); 
    836     try { this._iframe.contentWindow.scrollTo(pos.x,pos.y)} catch(e) { } 
    837   } 
    838 }; 
    839  
    840 Xinha.prototype.hidePanels = function(sides) 
    841 { 
    842   if ( typeof sides == 'undefined' ) 
    843   { 
    844     sides = ['left','right','top','bottom']; 
    845   } 
    846  
    847   var reShow = []; 
    848   for ( var i = 0; i < sides.length;i++ ) 
    849   { 
    850     if ( this._panels[sides[i]].on ) 
    851     { 
    852       reShow.push(sides[i]); 
    853       this._panels[sides[i]].on = false; 
    854     } 
    855   } 
    856   this.notifyOf('panel_change', {'action':'multi_hide','sides':sides}); 
    857 }; 
    858  
    859 Xinha.prototype.showPanels = function(sides) 
    860 { 
    861   if ( typeof sides == 'undefined' ) 
    862   { 
    863     sides = ['left','right','top','bottom']; 
    864   } 
    865  
    866   var reHide = []; 
    867   for ( var i = 0; i < sides.length; i++ ) 
    868   { 
    869     if ( !this._panels[sides[i]].on ) 
    870     { 
    871       reHide.push(sides[i]); 
    872       this._panels[sides[i]].on = true; 
    873     } 
    874   } 
    875   this.notifyOf('panel_change', {'action':'multi_show','sides':sides}); 
    876 }; 
    877782 
    878783Xinha.PanelDialog = function(editor, side, html, localizer) 
Note: See TracChangeset for help on using the changeset viewer.