Skip to content

Commit 64cd724

Browse files
sharpfivesjuliandescottes
authored andcommitted
reverted checkbox class and added method to controller
1 parent dae0810 commit 64cd724

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/js/controller/settings/exportimage/ZipExportController.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@
1515
this.splitByLayersCheckbox = document.querySelector('.zip-split-layers-checkbox');
1616
this.addEventListener(this.splitByLayersCheckbox, 'change', this.onSplitLayersClick_);
1717

18-
this.useLayerNamesCheckboxContainer = document.querySelector('.use-layer-names-checkbox-container');
18+
this.useLayerNamesContainer = document.querySelector('.use-layer-names-container');
1919
this.useLayerNamesCheckbox = document.querySelector('.zip-use-layer-names-checkbox');
20-
this.useLayerNamesCheckboxContainer.hidden = !this.splitByLayersCheckbox.checked;
20+
this.toggleHideUseLayerNamesCheckbox();
2121

2222
var zipButton = document.querySelector('.zip-generate-button');
2323
this.addEventListener(zipButton, 'click', this.onZipButtonClick_);
2424
};
2525

26+
ns.ZipExportController.prototype.toggleHideUseLayerNamesCheckbox = function () {
27+
this.useLayerNamesContainer.style.display = (this.splitByLayersCheckbox.checked ? 'block' : 'none');
28+
};
29+
2630
ns.ZipExportController.prototype.onSplitLayersClick_ = function () {
27-
this.useLayerNamesCheckboxContainer.hidden = !this.splitByLayersCheckbox.checked;
31+
this.toggleHideUseLayerNamesCheckbox();
2832
};
2933

3034
ns.ZipExportController.prototype.onZipButtonClick_ = function () {

src/templates/settings/export/zip.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<input id="zip-split-layers" class="zip-split-layers-checkbox checkbox-fix" type="checkbox" />
1212
<label for="zip-split-layers">Split by layers</label>
1313
</div>
14-
<div class="use-layer-names-checkbox-container" style="margin: 5px 0;">
14+
<div class="checkbox-container use-layer-names-container" style="margin: 5px 0;">
1515
<input id="zip-use-layer-names" class="zip-use-layer-names-checkbox checkbox-fix" type="checkbox" />
1616
<label for="zip-use-layer-names">Index by layer names</label>
1717
</div>

0 commit comments

Comments
 (0)