[virtualcommons-developer] [lighterprints] r38 - in sandbox/shawn: . src
Status: Beta
Brought to you by:
alllee
|
From: <sdf...@so...> - 2011-06-16 03:47:56
|
Author: sdfitzpa
Date: Wed Jun 15 20:47:49 2011
New Revision: 38
Log:
I got the first message box basically working. Its trimming the box size too small which I'm still working on and the handling for it is less than what I want but it has the correct three buttons and is correctly distinguishing them in the function for the message box handler.
Modified:
sandbox/shawn/index.html
sandbox/shawn/src/index.js
Modified: sandbox/shawn/index.html
==============================================================================
--- sandbox/shawn/index.html Wed Jun 15 18:52:14 2011 (r37)
+++ sandbox/shawn/index.html Wed Jun 15 20:47:49 2011 (r38)
@@ -39,7 +39,7 @@
margin-top: 10px;
}
.actHome {
- margin-top: 150px;
+ margin-top: 130px;
}
.rulesHome {
margin-top: 200px;
Modified: sandbox/shawn/src/index.js
==============================================================================
--- sandbox/shawn/src/index.js Wed Jun 15 18:52:14 2011 (r37)
+++ sandbox/shawn/src/index.js Wed Jun 15 20:47:49 2011 (r38)
@@ -5,6 +5,11 @@
glossOnIcon: false,
onReady: function(options) {
+ function showResult(btn){
+ Ext.Msg.alert('Button Click', 'You clicked the ' + btn + ' button');
+ };
+
+
var buttonPanel = new Ext.Panel({
layout: {
type: 'hbox'
@@ -15,14 +20,13 @@
icon: 'src/bikefrom.bmp',
cls: 'homeSpace',
handler: function() {
- Ext.Msg.prompt(
- 'Bike',
- 'Bike to school?',
- function(ok, text) {
- // Ext.Ajax.doStuff
- alert("Too bad. Your bike was stolen because you wrote: " + text);
- }
- );
+ Ext.Msg.show({
+ title:'Save Changes?',
+ msg: 'Do you want to save your changes? Seriously you so should.',
+ buttons: [{text:'Yes', itemId:'Yes'}, {text:'Cancel', itemId:'Cancel'}, {text:'Info', itemId:'Info'}],
+ fn: showResult
+ });
+
}
},
{
|