Changeset 1026 for branches


Ignore:
Timestamp:
08/23/08 18:19:32 (11 years ago)
Author:
ray
Message:

#1176 added global config options for centering, greyout, and close on escape

Location:
branches/new-dialogs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/new-dialogs/Xinha.css

    r1010 r1026  
    122122} 
    123123.xinha_dialog_background { 
    124   filter: alpha(opacity = 0); 
     124  filter: alpha(opacity=0); 
    125125  -moz-opacity: 0; 
    126126  opacity: 0; 
    127127  border:none; 
    128128} 
    129 .xinha_dialog_background.modal { 
     129.xinha_dialog_background.modal.greyout { 
    130130  background-color:#666; 
    131   filter: alpha(opacity = 70); 
     131  filter: alpha(opacity=70) !IMPORTANT; 
    132132  -moz-opacity: 0.7; 
    133133  opacity: 0.7; 
     134} 
     135.xinha_dialog_background.modal { 
     136  filter: alpha(opacity=0) !IMPORTANT; 
     137  -moz-opacity: 0; 
     138  opacity: 0; 
    134139  border:none; 
    135140} 
     141body.xinha_dialog_background.modal.greyout { 
     142  filter: alpha(opacity=100) !IMPORTANT; 
     143} 
    136144body.xinha_dialog_background.modal { 
    137   filter: alpha(opacity = 100); 
     145  filter: alpha(opacity=0); 
    138146} 
    139147.dialog .content { padding: 2px; } 
  • branches/new-dialogs/XinhaCore.js

    r1018 r1026  
    977977    "Formatted": "pre" 
    978978  }; 
     979   
     980  this.dialogOptions = 
     981  {  
     982    'centered' : true, //true: dialog is shown in the center the screen, false dialog is shown near the clicked toolbar button 
     983    'greyout':true, //true: when showing modal dialogs, the page behind the dialoge is greyed-out 
     984    'closeOnEscape':true 
     985  }; 
     986 
    979987  /** ?? 
    980988   * Default: <code>{}</code> 
  • branches/new-dialogs/modules/Dialogs/XinhaDialog.js

    r1023 r1026  
    6161      this.closable = globalOptions.closable; 
    6262    } 
     63    if (typeof(globalOptions.greyout) != 'undefined') { 
     64      this.greyout = globalOptions.greyout; 
     65    } 
    6366    if (typeof(globalOptions.closeOnEscape) != 'undefined') { 
    6467      this.closeOnEscape = globalOptions.closeOnEscape; 
     
    7881        //insert styles to make background color skinable 
    7982        var styles, stylesheets = document.styleSheets; 
     83         
    8084        for (var i=0;i<stylesheets.length;i++) 
    8185        { 
     
    8791        doc.body.className = 'xinha_dialog_background'; 
    8892        if (dialog.modal) doc.body.className += ' modal'; 
     93        if (dialog.greyout) doc.body.className += ' greyout'; 
    8994      } 
    9095    } 
     
    97102  backG.className = "xinha_dialog_background"; 
    98103  if (this.modal) backG.className += ' modal'; 
     104  if (this.greyout) backG.className += ' greyout'; 
    99105  with (backG.style) 
    100106  { 
Note: See TracChangeset for help on using the changeset viewer.