Browse Source

Update app with account level recordings

master
Emmanuel Balogun 3 years ago
parent
commit
44180b8be5
6 changed files with 34 additions and 47 deletions
  1. +31
    -30
      app.js
  2. +1
    -2
      metadata/app.json
  3. BIN
      metadata/screenshots/recordings.png
  4. BIN
      metadata/screenshots/recordings1.png
  5. BIN
      metadata/screenshots/recordings2.png
  6. +2
    -15
      views/received-recordings.html

+ 31
- 30
app.js View File

@ -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) {


+ 1
- 2
metadata/app.json View File

@ -20,8 +20,7 @@
"license": "-",
"price": 0,
"screenshots": [
"recordings1.png",
"recordings2.png"
"recordings.png"
],
"urls": {
"documentation": "{documentation_url}",


BIN
metadata/screenshots/recordings.png View File

Before After
Width: 1851  |  Height: 952  |  Size: 100 KiB

BIN
metadata/screenshots/recordings1.png View File

Before After
Width: 2154  |  Height: 964  |  Size: 127 KiB

BIN
metadata/screenshots/recordings2.png View File

Before After
Width: 2194  |  Height: 964  |  Size: 76 KiB

+ 2
- 15
views/received-recordings.html View File

@ -1,4 +1,4 @@
<div class="received-recordings-container empty">
<div class="received-recordings-container">
<div class="main-header clearfix">
<div class="recording-selection-wrapper pull-left">
<div class="filters recbox-selector">
@ -6,7 +6,7 @@
{{ i18n.recordings.receivedRECs.actionBar.currentlyViewing }}
</div>
<select class="select-recbox" id="select_recbox">
<option value="none"></option>
<option value="all">All</option>
{{#each recboxes}}
<option value="{{id}}">{{first_name}} {{last_name}}</option>
{{/each}}
@ -74,19 +74,6 @@
</div>
<div class="content">
<div class="empty-state">
<div class="headline">{{ i18n.recordings.receivedRECs.empty.headline1 }}<span class="count">{{count}}</span>{{ i18n.recordings.receivedRECs.empty.headline2 }}</div>
<div class="sub-headline">{{ i18n.recordings.receivedRECs.empty.subHeadline }}</div>
<div class="recboxes-list">
<select class="select-recbox" id="select_recbox_empty">
<option value="none"></option>
{{#each recboxes}}
<option class="box-row" data-id="{{id}}" value="{{id}}">{{first_name}} {{last_name}}</option>
{{/each}}
</select>
</div>
</div>
<div class="data-state">
<div class="recordings-table">
<table class="monster-table footable" id="recordings_table">


Loading…
Cancel
Save