summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-25 13:09:07 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-06-25 13:09:07 +0200
commit14da4be11fe13d4fcd55143c39b73c0d086b901b (patch)
tree2f6d2b9385b69852c9ea1c9e537aeefd0705ed24 /public
parent17f94f46374d60e58a00071303c9081469e7997c (diff)
Show transfer buttons only for switchable incoming calls.
Diffstat (limited to 'public')
-rw-r--r--public/js/app.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/public/js/app.js b/public/js/app.js
index efc0752..1dee270 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -51,6 +51,7 @@ DS.RESTAdapter.reopen({
App.Switchboard = DS.Model.extend({
switchboardEntrys: DS.hasMany('App.SwitchboardEntry'),
activeCalls: DS.hasMany('App.ActiveCall'),
+ dispatchableIncomingCalls: DS.hasMany('App.DispatchableIncomingCall'),
name: DS.attr('string')
});
@@ -87,6 +88,30 @@ App.ActiveCall = DS.Model.extend({
}.property('b_callstate')
});
+App.DispatchableIncomingCall = DS.Model.extend({
+ start_stamp: DS.attr('number'),
+ callstate: DS.attr('string'),
+ b_callstate: DS.attr('string'),
+ destination: DS.attr('string'),
+ b_caller_id_number: DS.attr('string'),
+
+ isActive: function() {
+ if (this.get('b_callstate') == 'ACTIVE') {
+ return true
+ } else {
+ return false
+ }
+ }.property('b_callstate'),
+
+ isRinging: function() {
+ if (this.get('b_callstate') == 'RINGING') {
+ return true
+ } else {
+ return false
+ }
+ }.property('b_callstate')
+});
+
App.Adapter = DS.RESTAdapter.extend();
App.store = App.Store.create({