Skip to content

Releases: shanti-uva/kmaps_engine

Add auto collapse option to KmapsTree and fix CSS for typeahead

12 Sep 17:19
Compare
Choose a tag to compare

KmapsTree now supports the option for auto collapse, this is when one
node is selected if there is an open node it will close. The default
behaviour is false (no auto collapse), to set it on send true to the
option autoCollapse.

Example:

        $("#tree").kmapsTree({
          termindex_root: "<%= Feature.config.url %>",
          kmindex_root: "<%= MmsIntegration::Picture.config.url %>",
          type: "<%= Feature.uid_prefix %>", //subjects
          root_kmap_path: '',
          baseUrl: "<%= (defined?(admin) && admin) ? admin_features_path : features_path %>/%%ID%%",
          expand_path: "",
          perspective: "<%= current_perspective.code %>",
          view: "<%= current_view.code %>",
<%        unless feature.nil? %>
            activeNodeId: "<%= feature.fid %>",
<%        end %>
					sortNodes: true,
          sortNodesBy: "position_i",
          autoCollapse: false
        });

Fixed display bug for typeahead. When the option to show hint was
selected for advanced search, for places application, the hint appear to
the left making it hard to read the text. The CSS fix uses the selector
"advanced-view" to make sure it only affects the CSS for places advanced
search.