Skip to content

Commit

Permalink
Add call button
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Pythoud committed Mar 25, 2012
1 parent 03ac8e4 commit 37daa9b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
24 changes: 23 additions & 1 deletion www/app/controller/Application.js
Expand Up @@ -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: {
Expand All @@ -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());
},
Expand Down
3 changes: 2 additions & 1 deletion www/app/view/band/Show.js
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion www/resources/css/app.css

Large diffs are not rendered by default.

Binary file not shown.
6 changes: 4 additions & 2 deletions www/resources/sass/_band.scss
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 37daa9b

Please sign in to comment.