Sha256: 9a00845a942e0fe22ba63ce8948d634df1a6d180a96a5122532db6f132bd0d9b

Contents?: true

Size: 1.3 KB

Versions: 5

Compression:

Stored size: 1.3 KB

Contents

/*   RSence
 *   Copyright 2009 Riassence Inc.
 *   http://riassence.com/
 *
 *   You should have received a copy of the GNU General Public License along
 *   with this software package. If not, contact licensing@riassence.com
 */

/*** = Description
  ** HAlertSheet is a simple alert notification control.
  ***/

HAlertSheet = HSheet.extend({

/** = Description
  * Refreshes the label of text if this['alertText'] is set.
  *
  **/
  refreshLabel: function(){
    this.base();
    if(this['alertText']){
      this.alertText.setValue( this.label );
    }
  },
  
/** = Description
  * Draws the warning text (this.label) as a HStringView and a warning image 
  * and an alert button.
  **/
  drawSubviews: function(){
    this.icon = HImageView.nu(
      [ 16, 16, 48, 48 ],
      this, {
        value: this.getThemeGfxFile('sheet_warning.png')
      }
    );
    this.alertText = HStringView.nu(
      [ 80, 16, null, null, 8, 48 ],
      this, {
        value: this.label
      }
    );
    this.alertButtons();
  },

/** = Description
  * Draws an alert button.
  *
  **/
  alertButtons: function(){
    this.okButton = HClickValueButton.nu(
      [ null, null, 60, 23, 8, 8 ],
      this, {
        label: 'OK',
        valueObj: this.valueObj,
        events: {
          click: true
        }
      }
    );
  }
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rsence-2.0.0.10.pre js/controls/dialogs/alert_sheet/alert_sheet.js
rsence-2.0.0.9.pre js/controls/dialogs/alert_sheet/alert_sheet.js
rsence-2.0.0.8.pre js/controls/dialogs/alert_sheet/alert_sheet.js
rsence-2.0.0.7.pre js/controls/dialogs/alert_sheet/alert_sheet.js
rsence-2.0.0.6.pre js/controls/dialogs/alert_sheet/alert_sheet.js