ig.module( 'weltmeister.modal-dialogs' ) .requires( 'weltmeister.select-file-dropdown' ) .defines(function(){ "use strict"; wm.ModalDialog = ig.Class.extend({ onOk: null, onCancel: null, text: '', okText: '', cancelText: '', background: null, dialogBox: null, buttonDiv: null, init: function( text, okText, cancelText ) { this.text = text; this.okText = okText || 'OK'; this.cancelText = cancelText || 'Cancel'; this.background = $('
', {'class':'modalDialogBackground'}); this.dialogBox = $('', {'class':'modalDialogBox'}); this.background.append( this.dialogBox ); $('body').append( this.background ); this.initDialog( text ); }, initDialog: function() { this.buttonDiv = $('', {'class': 'modalDialogButtons'} ); var okButton = $('', {'type': 'button', 'class':'button', 'value': this.okText}); var cancelButton = $('', {'type': 'button', 'class':'button', 'value': this.cancelText}); okButton.bind( 'click', this.clickOk.bind(this) ); cancelButton.bind( 'click', this.clickCancel.bind(this) ); this.buttonDiv.append( okButton ).append( cancelButton ); this.dialogBox.html('