 
 CustomAttributesValuesDirective = ($templates, $storage) ->
     template = $templates.get("custom-attributes/custom-attributes-values.html", true)
-    collapsedHash = generateHash(["custom-attributes-collapsed"])
+    collapsedHash = (type) ->
+        return generateHash(["custom-attributes-collapsed", type])
 
     link = ($scope, $el, $attrs, $ctrls) ->
         $ctrl = $ctrls[0]

            $el.off()

    templateFn = ($el, $attrs) ->
        collapsed = $storage.get(collapsedHash) or false

        return template({
            requiredEditionPerm: $attrs.requiredEditionPerm

            $ctrl.loadCustomAttributesValues()

        $el.on "click", ".custom-fields-header a", ->
            hash = collapsedHash($attrs.type)
            collapsed = not($storage.get(hash) or false)
            $storage.set(hash, collapsed)
            if collapsed
                $el.find(".custom-fields-header a").removeClass("open")
                $el.find(".custom-fields-body").removeClass("open")
