Skip to content
Snippets Groups Projects
Commit 38989c34 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #8404 from owncloud/fix-checkboxes

Fixed too generic checkbox and link selectors
parents dca2d931 2f58e798
No related branches found
No related tags found
No related merge requests found
...@@ -92,8 +92,8 @@ window.FileList = { ...@@ -92,8 +92,8 @@ window.FileList = {
FileList.breadcrumb.resize(width, false); FileList.breadcrumb.resize(width, false);
}); });
this.$fileList.on('click','td.filename a', _.bind(this._onClickFile, this)); this.$fileList.on('click','td.filename>a.name', _.bind(this._onClickFile, this));
this.$fileList.on('change', 'td.filename input:checkbox', _.bind(this._onClickFileCheckbox, this)); this.$fileList.on('change', 'td.filename>input:checkbox', _.bind(this._onClickFileCheckbox, this));
this.$el.find('#select_all').click(_.bind(this._onClickSelectAll, this)); this.$el.find('#select_all').click(_.bind(this._onClickSelectAll, this));
this.$el.find('.download').click(_.bind(this._onClickDownloadSelected, this)); this.$el.find('.download').click(_.bind(this._onClickDownloadSelected, this));
this.$el.find('.delete-selected').click(_.bind(this._onClickDeleteSelected, this)); this.$el.find('.delete-selected').click(_.bind(this._onClickDeleteSelected, this));
...@@ -107,7 +107,7 @@ window.FileList = { ...@@ -107,7 +107,7 @@ window.FileList = {
* @param state true to select, false to deselect * @param state true to select, false to deselect
*/ */
_selectFileEl: function($tr, state) { _selectFileEl: function($tr, state) {
var $checkbox = $tr.find('input:checkbox'); var $checkbox = $tr.find('td.filename>input:checkbox');
var oldData = !!this._selectedFiles[$tr.data('id')]; var oldData = !!this._selectedFiles[$tr.data('id')];
var data; var data;
$checkbox.prop('checked', state); $checkbox.prop('checked', state);
...@@ -156,7 +156,7 @@ window.FileList = { ...@@ -156,7 +156,7 @@ window.FileList = {
else { else {
this._lastChecked = $tr; this._lastChecked = $tr;
} }
var $checkbox = $tr.find('input:checkbox'); var $checkbox = $tr.find('td.filename>input:checkbox');
this._selectFileEl($tr, !$checkbox.prop('checked')); this._selectFileEl($tr, !$checkbox.prop('checked'));
this.updateSelectionSummary(); this.updateSelectionSummary();
} else { } else {
...@@ -191,7 +191,7 @@ window.FileList = { ...@@ -191,7 +191,7 @@ window.FileList = {
*/ */
_onClickSelectAll: function(e) { _onClickSelectAll: function(e) {
var checked = $(e.target).prop('checked'); var checked = $(e.target).prop('checked');
this.$fileList.find('td.filename input:checkbox').prop('checked', checked) this.$fileList.find('td.filename>input:checkbox').prop('checked', checked)
.closest('tr').toggleClass('selected', checked); .closest('tr').toggleClass('selected', checked);
this._selectedFiles = {}; this._selectedFiles = {};
this._selectionSummary.clear(); this._selectionSummary.clear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment