geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
416 stars 487 forks source link

Can't assign categories (tags) to record on GN 3.2 #1840

Closed oscarfonts closed 7 years ago

oscarfonts commented 7 years ago

On the edit interface, category button drop-down:

edit-record-tags

It's not possible to assign new categories to the record. Clicking on a disabled category has no effect.

But one can click on the enabled ones and the change is saved automatically. So eventually the record could end up with no categories assigned, and no way to roll the previous status back.

oscarfonts commented 7 years ago

It seems click events are disabled here:

https://github.com/geonetwork/core-geonetwork/blob/5758666ceabaceaa5a26d69f0b8a38ec2f9b7319/web-ui/src/main/resources/catalog/style/gn.less#L255

Which was added here: https://github.com/geonetwork/core-geonetwork/commit/ecf4cd3126be2bef2fa38d07421fcb810c369870#diff-4755bec92d2e541807a5101dc4c7db00R226

oscarfonts commented 7 years ago

Ok, confirmed. It works if the CSS rule is overriden in catalog/views/default/less/gn_view.less, like so:

.dropdown-menu {
  li.disabled {
    a {
      pointer-events: auto;
    }
  }
}

@josegar74 do you remember why you put ponter-events: none; on that commit (see comment above)? Is it safe to remove it again? Maybe we need a more specific CSS selector for either case?

josegar74 commented 7 years ago

That was added to disable the publish option if metadata is not valid and the settinf to prevent invalid metadata to be published is enabled.

fxprunayre commented 7 years ago

Fixed by https://github.com/geonetwork/core-geonetwork/pull/1845