summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-04 12:04:34 +0200
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-04-04 12:04:34 +0200
commitd6a733440eee34dab3daf25089d40aed91018a49 (patch)
tree632e46e34a4338a6e3b4f7cb2c29c123f50a4ea9 /public/js
parentcea2cc3c1cc1e48fc4600c698d52dfda2bde4505 (diff)
Limit the amount of displayed phone_numbers in a switchboard_entry
Diffstat (limited to 'public/js')
-rw-r--r--public/js/app.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/js/app.js b/public/js/app.js
index 4bc8cc1..3124f41 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -71,7 +71,13 @@ App.SipAccount = DS.Model.extend({
switchboardEntrys: DS.hasMany('App.SwitchboardEntry'),
phoneNumbers: DS.hasMany('App.PhoneNumber'),
callerName: DS.attr('string'),
- authName: DS.attr('string')
+ authName: DS.attr('string'),
+
+ phoneNumberShortList: Ember.computed(function() {
+ var phoneNumbers = this.get('phoneNumbers');
+ return phoneNumbers.slice(0,amount_of_displayed_phone_numbers);
+ }).property('phoneNumbers.@each.number')
+
});
App.PhoneNumber = DS.Model.extend({