Skip to content

Commit

Permalink
Refs #10007 - Support more Simile Exhibit facets
Browse files Browse the repository at this point in the history
- Update HISTORY.txt
- Fix some JS errors.
  • Loading branch information
avoinea committed Feb 28, 2013
1 parent 47088c0 commit aab004d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Changelog

7.1-dev - (unreleased)
----------------------
* Feature: Support all Simile Exhibit facets
[voineali refs #10007]

7.0 - (2013-02-25)
------------------
Expand Down
8 changes: 6 additions & 2 deletions eea/app/visualization/browser/js/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ DavizEdit.Facet.prototype = {
data: query,
success: function(data){
DavizEdit.Status.stop(data);
if(options.trigger && options.trigger.attr('name').indexOf('.type') !== -1){
if(options && options.trigger && options.trigger.attr('name').indexOf('.type') !== -1){
var action = self.form.attr('action');
jQuery(document).trigger(DavizEdit.Events.facet.refresh, {
init: false, action: action
Expand Down Expand Up @@ -1192,7 +1192,11 @@ DavizEdit.JsonGrid.prototype = {

save_header: function(options){
var self = this;
self.table.properties[options.key].label = options.value;
var column = self.table.properties[options.key];
if(!column){
return;
}
column.label = options.value;
self.textarea.val(JSON.stringify(self.table, null, " "));
self.grid.updateColumnHeader(options.key, options.value);
}
Expand Down
9 changes: 9 additions & 0 deletions eea/app/visualization/facets/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,21 @@ class IVisualizationAddFacet(Interface):
title=_(u'Id'),
description=_(u"Facet id. Same as the key id in your JSON. "
"(e.g. publishDate)"))

label = schema.TextLine(
title=_(u'Friendly name'),
description=_(u"Label for facet (e.g. Effective Date)"),
required=False
)

type = schema.Choice(
title=_(u"Facet type"),
description=_('Exhibit facet type'),
default=u'daviz.list.facet',
required=True,
vocabulary=u"eea.daviz.vocabularies.FacetTypesVocabulary"
)

class IVisualizationEditFacet(Interface):
""" Edit facet
"""
Expand Down

0 comments on commit aab004d

Please sign in to comment.