diff --git a/app.js b/app.js index ed6e333..7940895 100755 --- a/app.js +++ b/app.js @@ -22,6 +22,10 @@ define(function(require) { }, requests: { + 'recordings.get': { + 'verb': 'GET', + 'url': 'accounts/{accountId}/recordings?{filters}' + }, 'recordings.user.get': { 'verb': 'GET', 'url': 'accounts/{accountId}/users/{userId}/recordings?{filters}' @@ -136,12 +140,12 @@ define(function(require) { placeholder_text_single: self.i18n.active().recordings.receivedRECs.actionBar.selectREC.none }); + // Default selection when page is loaded + self.displayRECList(template, "all"); + $selectRECBox.on('change', function() { var recboxId = $(this).val(); - // We update the select-recbox from the listing recordings when we click on a recbox in the welcome page - template.find('.select-recbox').val(recboxId).trigger('chosen:updated'); - self.displayRECList(template, recboxId); }); @@ -467,7 +471,6 @@ define(function(require) { totalRecordings: recordings.length } }; - return formattedData; }, @@ -494,35 +497,33 @@ define(function(require) { }); }, - getRECBox: function(recboxId, callback) { - var self = this; - - monster.request({ - resource: 'recordings.user.get', - data: { - accountId: self.accountId, - userId: recboxId - }, - success: function(data) { - callback && callback(data.data); - } - }); - }, - newGetRECBoxMessages: function(filters, recboxId, callback) { var self = this; - monster.request({ - resource: 'recordings.user.get', - data: { - accountId: self.accountId, - userId: recboxId, - filters: filters - }, - success: function(data) { - callback && callback(data); - } - }); + if (recboxId === 'all') { + monster.request({ + resource: 'recordings.get', + data: { + accountId: self.accountId, + filters: filters + }, + success: function(data) { + callback && callback(data); + } + }); + } else { + monster.request({ + resource: 'recordings.user.get', + data: { + accountId: self.accountId, + userId: recboxId, + filters: filters + }, + success: function(data) { + callback && callback(data); + } + }); + } }, bulkRemoveRecordings: function(recboxId, recordings, callback) { diff --git a/metadata/app.json b/metadata/app.json index 9424709..0d81220 100755 --- a/metadata/app.json +++ b/metadata/app.json @@ -20,8 +20,7 @@ "license": "-", "price": 0, "screenshots": [ - "recordings1.png", - "recordings2.png" + "recordings.png" ], "urls": { "documentation": "{documentation_url}", diff --git a/metadata/screenshots/recordings.png b/metadata/screenshots/recordings.png new file mode 100755 index 0000000..c8bddb4 Binary files /dev/null and b/metadata/screenshots/recordings.png differ diff --git a/metadata/screenshots/recordings1.png b/metadata/screenshots/recordings1.png deleted file mode 100755 index d624997..0000000 Binary files a/metadata/screenshots/recordings1.png and /dev/null differ diff --git a/metadata/screenshots/recordings2.png b/metadata/screenshots/recordings2.png deleted file mode 100755 index 0ecf83d..0000000 Binary files a/metadata/screenshots/recordings2.png and /dev/null differ diff --git a/views/received-recordings.html b/views/received-recordings.html index 192250d..f26fbc1 100755 --- a/views/received-recordings.html +++ b/views/received-recordings.html @@ -1,4 +1,4 @@ -
+
@@ -6,7 +6,7 @@ {{ i18n.recordings.receivedRECs.actionBar.currentlyViewing }}
- - {{#each recboxes}} - - {{/each}} - -
-