DIalog

util.alert('aaa'); 

util.alert('aaa', cb); 

function cb() {
  log('Dialog closed');
}
util.dialog.info('aaa', demo.okDialogCb);
util.dialog.info('Title', 'content', demo.okDialogCb);
util.dialog.info('aaa\nbbbbbbbb', demo.okDialogCb);
ar style = {
  background: 'rgba(0,0,0,0.3)'
};
util.modal.setStyle(style);

var content = '';
content += 'aaa\n\n';
content += '<button onclick="demo.openDialog2();">Open OK Dialog</button>';
content += ' ';
content += '<button onclick="util.dialog.close();">Close</button>';
var opt = {
  closeAnywhere: true,
};
util.dialog.open(content, opt);

util.modal.setStyle(null);
  var opt = {
    focus: 'no',
    data: 'ABC',
    style: {
      body: {
        'width': '200px',
        'height': '100px'
      },
      title: {
        'font-size': '24px'
      },
      content: {
        'color': '#00f'
      },
      message: {
        'text-align': 'left'
      },
      button: {
        'width': '100px',
        'height': '50px',
        'color': '#00a',
        'background': '#ddd',
        'font-size': '28px'
      }
    }
  };
  util.dialog.info('Title', 'abcdefg\nxyz1234567890?', opt);
  var opt = {
    data: 'abc1'
  };
  util.dialog.confirm('abcdefg?', demo.confirmDialogCbYes, opt);
  var opt = {
    data: 'abc1'
  };
  util.dialog.confirm('abcdefg?', demo.confirmDialogCbYes, demo.confirmDialogCbNo, opt);
  util.dialog.confirm('Title', 'abcdefg?', demo.confirmDialogCbYes);
  util.dialog.confirm('Title', 'abcdefg?', demo.confirmDialogCbYes, demo.confirmDialogCbNo);
  var opt = {
    focus: 'no',
    data: 'xyz'
  };
  util.dialog.confirm('Title', 'abcdefg?', demo.confirmDialogCbYes, demo.confirmDialogCbNo, opt);
  var opt = {
    focus: 'no',
    data: 'xyz'
  };
  util.dialog.confirm('Title', 'abcdefg\nzyx12345678901234567890?', demo.confirmDialogCbYes, demo.confirmDialogCbNo, opt);
  var opt = {
    focus: 'no',
    data: 'ABC',
    style: {
      body: {
        'width': '200px',
        'height': '100px'
      },
      title: {
        'font-size': '24px'
      },
      content: {
        'color': '#00f'
      },
      message: {
        'text-align': 'left'
      },
      button: {
        'color': '#00a',
        'background': '#ddd'
      }
    }
  };
  util.dialog.confirm('Title', 'abcdefg\nxyz1234567890?', demo.confirmDialogCbYes, demo.confirmDialogCbNo, opt);
  var opt = {
    data: 'abc1'
  };
  util.dialog.text('abcd\nefg?', demo.textDialogCbYes, opt);
demo.textDialogCbYes = function(text, data) {
  log('Yes: text=' + text + ' : data=' + data)
};
demo.textDialogCbNo = function(text, data) {
  log('No : text=' + text + ' : data=' + data)
};
  util.dialog.text('Title', 'abcdefg?', demo.textDialogCbYes);
  util.dialog.text('Title', 'abcdefg?', demo.textDialogCbYes, demo.textDialogCbNo);
  var opt = {
    focus: 'no',
    data: 'xyz'
  };
  util.dialog.text('Title', 'abcdefg?', demo.textDialogCbYes, demo.textDialogCbNo, opt);
  var opt = {
    focus: 'no',
    data: 'ABC',
    style: {
      body: {
        'width': '600px',
        'height': '400px'
      },
      title: {
        'font-size': '24px'
      },
      content: {
        'color': '#00f'
      },
      message: {
        'text-align': 'left'
      },
      button: {
        'color': '#00a',
        'background': '#ddd'
      },
      textbox: {
        'width': '150px',
        'color': '#f00'
      }
    }
  };
  util.dialog.text('Title', 'abcdefg\nxyz1234567890?', demo.textDialogCbYes, demo.textDialogCbNo, opt);
  var opt = {
    secure: true
  };
  util.dialog.text('abcdefg\nxyz1234567890?', demo.textDialogCbYes, demo.textDialogCbNo, opt);