mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-28 16:09:54 +03:00
fix: delete toggle button when delete is disabled
This commit is contained in:
parent
0f805daafa
commit
9e99b08b82
1 changed files with 8 additions and 5 deletions
|
@ -138,19 +138,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.on('mount', function() {
|
this.on('update', function() {
|
||||||
var toggle = this.refs['taglist-tag'].refs['remove-tag-checkbox'].toggle;
|
var checkbox = this.refs['taglist-tag'].refs['remove-tag-checkbox'];
|
||||||
this.refs['taglist-tag'].refs['remove-tag-checkbox'].toggle = function(e) {
|
if (!checkbox || checkbox._toggle) { return; }
|
||||||
|
|
||||||
|
checkbox._toggle = checkbox.toggle;
|
||||||
|
checkbox.toggle = function(e) {
|
||||||
if (e.altKey) {
|
if (e.altKey) {
|
||||||
self._getRemoveImageTags()
|
self._getRemoveImageTags()
|
||||||
.filter(function(img) { return !img.tags['material-checkbox'].checked; })
|
.filter(function(img) { return !img.tags['material-checkbox'].checked; })
|
||||||
.forEach(function(img) { img.tags['material-checkbox'].toggle() });
|
.forEach(function(img) { img.tags['material-checkbox'].toggle() });
|
||||||
} else {
|
} else {
|
||||||
toggle();
|
this._toggle();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.refs['taglist-tag'].refs['remove-tag-checkbox'].on('toggle', function() {
|
checkbox.on('toggle', function() {
|
||||||
registryUI.taglist.instance.multiDelete = this.checked;
|
registryUI.taglist.instance.multiDelete = this.checked;
|
||||||
registryUI.taglist.instance.update();
|
registryUI.taglist.instance.update();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue