Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
webui: dvr.js remove extra whitespaces
  • Loading branch information
perexg committed Aug 6, 2014
1 parent fa0bba6 commit fd5a8a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions src/webui/static/app/dvr.js
Expand Up @@ -414,22 +414,22 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
});

/* Bottom toolbar to include default previous/goto-page/next and refresh buttons, also number-of-items combobox */

var bbar = new Ext.PagingToolbar({
store : dvrStore,
displayInfo : true,
items : ['-','Recordings per page: ',itemPageCombo],
displayMsg : 'Programs {0} - {1} of {2}',
emptyMsg : "No programs to display"
});

function abortEntry(btn) {
if (btn !== 'yes')
return;

var selectedKeys = panel.selModel.selections.keys;
// Delete each entry one by one since the API doesn't support deleting

// Delete each entry one by one since the API doesn't support deleting
// multiple
for (var i = 0; i < selectedKeys.length; i++) {
var recordingId = selectedKeys[i];
Expand All @@ -453,7 +453,7 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {

var selectedKeys = panel.selModel.selections.keys;

// Delete each entry one by one since the API doesn't support deleting
// Delete each entry one by one since the API doesn't support deleting
// multiple
for (var i = 0; i < selectedKeys.length; i++) {
var recordingId = selectedKeys[i];
Expand All @@ -473,38 +473,38 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
});
}
};

function abortSelected() {
Ext.MessageBox.confirm('Message',
'Do you really want to abort/unschedule the selection?', abortEntry);
};

function deleteSelected() {
Ext.MessageBox.confirm('Message',
'Do you really want to delete the selection?', deleteEntry);
};

var abortButton = new Ext.Toolbar.Button({
tooltip: 'Abort or unschedule one or more selected rows',
iconCls: 'remove',
text: 'Abort/unschedule selected',
handler: abortSelected,
disabled: true
});

var deleteButton = new Ext.Toolbar.Button({
tooltip: 'Delete one or more selected rows',
iconCls: 'remove',
text: 'Delete selected',
handler: deleteSelected,
disabled: true
});

// Make multiple rows selectable
var selModel = new Ext.grid.RowSelectionModel({
singleSelect: false
});

// Enable/disable some buttons when nothing is selected
selModel.on('selectionchange', function(self) {
if (self.getCount() > 0) {
Expand All @@ -516,10 +516,10 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
abortButton.disable();
}
});

// Define which panel buttons should be visible
var panelButtons = [];

// Add the "Add entry" and "Abort" buttons only to "Upcoming recordings"
if (iconCls === 'clock') {
panelButtons.push([
Expand All @@ -536,10 +536,10 @@ tvheadend.dvrschedule = function(title, iconCls, dvrStore) {
else {
panelButtons.push(deleteButton);
}

// Add the help button to all panels
panelButtons.push([
'->',
'->',
{
text: 'Help',
handler: function() {
Expand Down
4 changes: 2 additions & 2 deletions src/webui/static/app/epg.js
Expand Up @@ -295,9 +295,9 @@ tvheadend.epg = function() {
name: 'serieslink'
}])
});

/**
* Listener for DVR notifications. We want to update the EPG grid when a
* Listener for DVR notifications. We want to update the EPG grid when a
* recording is finished/deleted etc. so the status icon gets updated.
*/
tvheadend.comet.on('dvrdb', function() {
Expand Down

0 comments on commit fd5a8a4

Please sign in to comment.