diff --git a/CHANGELOG b/CHANGELOG index cc4952f8ab3dba8946a7ffb678c701bc488e0ad8..0afdf8b96108aa2594ba756b50a8d783be3cdc43 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ minerva (14.0.0~beta.2) unstable; urgency=low * Bug fix: information about deprecated column is more clear about column names (#838) * Bug fix: version of the project is limited to 20 characters (#951) + * Bug fix: hide glyphs tab when necessary (#949) -- Piotr Gawron <piotr.gawron@uni.lu> Mon, 16 Sep 2019 21:00:00 +0200 diff --git a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js index 3bddd0aa486bdcb74a658991f1ee5d2251eff859..30825be638e38ba0a1ec680b6ceac9867ab76695 100644 --- a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js +++ b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js @@ -1404,6 +1404,7 @@ AddProjectDialog.prototype.setZipFileContent = function (file) { guiUtils.hideTab(self, $(".minerva-project-overlays-tab", self.getElement())[0]); guiUtils.hideTab(self, $(".minerva-project-submaps-tab", self.getElement())[0]); guiUtils.hideTab(self, $(".minerva-project-overview-images-tab", self.getElement())[0]); + guiUtils.hideTab(self, $(".minerva-project-glyphs-tab", self.getElement())[0]); return self.setZipEntries([]); } }; diff --git a/frontend-js/src/test/js/gui/admin/AddProjectDialog-test.js b/frontend-js/src/test/js/gui/admin/AddProjectDialog-test.js index 4cc65485bd1e0e3c4247bb4c357ce596a6df1bf0..5951de0fa32789f9da3926b1d2f17b5a8c121091 100644 --- a/frontend-js/src/test/js/gui/admin/AddProjectDialog-test.js +++ b/frontend-js/src/test/js/gui/admin/AddProjectDialog-test.js @@ -156,6 +156,20 @@ describe('AddProjectDialog', function () { return dialog.destroy(); }); }); + it('glyphs', function () { + var dialog = createDialog(); + var buf = fs.readFileSync("testFiles/map/complex_model_with_glyphs.zip"); + buf.name = "complex_model_with_glyphs.zip"; + return dialog.init().then(function () { + var dataTable = $($("[name='glyphsTable']", testDiv)[0]).DataTable(); + assert.equal(0, dataTable.data().count()); + return dialog.setZipFileContent(buf); + }).then(function () { + var dataTable = $($("[name='glyphsTable']", testDiv)[0]).DataTable(); + assert.ok(dataTable.data().count() > 0); + return dialog.destroy(); + }); + }); }); describe('showAnnotatorsDialog', function () { diff --git a/frontend-js/testFiles/map/complex_model_with_glyphs.zip b/frontend-js/testFiles/map/complex_model_with_glyphs.zip new file mode 100644 index 0000000000000000000000000000000000000000..089b4d20d98443c03ba01edd432ebe761b6c6d2c Binary files /dev/null and b/frontend-js/testFiles/map/complex_model_with_glyphs.zip differ