4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
11 Roo.BLANK_IMAGE_URL = "../../images/default/s.gif";
13 Roo.onReady(function(){
\r
14 Roo.get('mb1').on('click', function(e){
\r
15 Roo.MessageBox.confirm('Confirm', 'Are you sure you want to do that?', showResult);
\r
18 Roo.get('mb2').on('click', function(e){
\r
19 Roo.MessageBox.prompt('Name', 'Please enter your name:', showResultText);
\r
22 Roo.get('mb3').on('click', function(e){
\r
23 Roo.MessageBox.show({
\r
25 msg: 'Please enter your address:',
\r
27 buttons: Roo.MessageBox.OKCANCEL,
\r
34 Roo.get('mb4').on('click', function(e){
\r
35 Roo.MessageBox.show({
\r
36 title:'Save Changes?',
\r
37 msg: 'Your are closing a tab that has unsaved changes. Would you like to save your changes?',
\r
38 buttons: Roo.MessageBox.YESNOCANCEL,
\r
44 Roo.get('mb6').on('click', function(){
\r
45 Roo.MessageBox.show({
\r
46 title: 'Please wait...',
\r
47 msg: 'Initializing...',
\r
54 // this hideous block creates the bogus progress
\r
55 var f = function(v){
\r
58 Roo.MessageBox.hide();
\r
60 Roo.MessageBox.updateProgress(v/10, 'Loading item ' + v + ' of 10...');
\r
64 for(var i = 1; i < 12; i++){
\r
65 setTimeout(f(i), i*1000);
\r
69 Roo.get('mb7').on('click', function(){
\r
70 Roo.MessageBox.alert('Status', 'Changes saved successfully.', showResult);
\r
74 function showResult(btn){
\r
75 Roo.example.msg('Button Click', 'You clicked the {0} button', btn);
\r
78 function showResultText(btn, text){
\r
79 Roo.example.msg('Button Click', 'You clicked the {0} button and entered the text "{1}".', btn, text);
\r