Permalink
Browse files

Add call button

  • Loading branch information...
1 parent 03ac8e4 commit 37daa9bbd46b0672690e9608f1bbafbd281c7d22 Simon Pythoud committed Mar 25, 2012
@@ -10,7 +10,8 @@ Ext.define('BandOnTheRun.controller.Application', {
listBand: 'band-list',
showBand: 'band-show',
editBand: 'band-edit',
- saveButton: '#saveButton'
+ saveButton: '#saveButton',
+ conferenceCallButton: '#conferenceCallButton'
},
control: {
@@ -29,10 +30,31 @@ Ext.define('BandOnTheRun.controller.Application', {
},
editBand: {
change: 'onBandChange'
+ },
+ conferenceCallButton: {
+ tap: 'startConferenceCall'
}
}
},
+ startConferenceCall: function() {
+ // we create the Ajax request
+ Ext.Ajax.request({
+ //first we give it the URL of the request. take not that this can only be local to the web server
+ //you are on
+ url: 'start_call',
+
+ //then we define a success method, which is called once the ajax request is successful
+ success: function(response) {
+ console.log('Conference started');
+
+ },
+ failure: function() {
+ console.log('Conference ended');
+ }
+ });
+ },
+
showBandPanel: function(){
this.getMain().setActiveItem(this.getBand());
},
@@ -29,7 +29,8 @@ Ext.define('BandOnTheRun.view.band.Show', {
xtype: 'spacer'
},
{
- xtype: 'button',
+ xtype: 'button',
+ id: 'conferenceCallButton',
action : 'call',
text : 'Start the call',
iconCls: 'call',

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -86,10 +86,12 @@
.x-band-show-toolbar {
.x-button {
- width: 200px;
+ width: 180px;
.x-button-icon {
- background-image: url('../images/phone.png');
+ background-image: url('../images/phone.png') !important;
+ background-size: cover;
+ background-color: transparent !important;
}
}
}

0 comments on commit 37daa9b

Please sign in to comment.