Permalink
Browse files

Merge branch 'master' of ssh://github.com/zepheira/freemix

  • Loading branch information...
2 parents 3241c86 + 49031bd commit e005c3fada0031892bd835ed434535171c90b1af @erimille erimille committed Dec 15, 2011
@@ -20,8 +20,13 @@
config = config || this.config;
- return "<div ex:role='facet' ex:expression='" + config.expression +
- "' ex:facetLabel='" + config.name + "'></div>";
+ var result = $("<div ex:role='facet'></div>");
+ result.attr("ex:expression", config.expression);
+ if (config.name && config.name.length > 0) {
+ result.attr("ex:facetLabel", config.name);
+ }
+ return result;
+
},
showEditor: function(facetContainer) {
var facet = this;
@@ -11,7 +11,7 @@
generateExhibitHTML: function (config) {
config = config || this.config;
var result = $("<div ex:role='facet' ex:facetClass='TextSearch'></div>");
- if (config.name) {
+ if (config.name && config.name.length > 0) {
result.attr("ex:facetLabel", config.name);
}
return result;
@@ -10,12 +10,26 @@
config: {
type: "Slider",
expression: "",
- height: "50px"
+ height: "50px",
+ histogram: true,
+ horizontal: true
},
generateExhibitHTML: function(config) {
config = config || this.config;
- return "<div ex:role='facet' ex:facetClass='Slider' ex:histogram='true' ex:horizontal='true' ex:height='50px' ex:expression='" + config.expression +
- "' ex:facetLabel='" + config.name + "'></div>";
+
+ var result = $("<div ex:role='facet' ex:facetClass='Slider'></div>");
+
+ result.attr("ex:expression", config.expression);
+ result.attr("ex:height", config.height);
+ result.attr("ex:histogram", config.histogram);
+ result.attr("ex:horizontal", config.horizontal);
+ if (config.name && config.name.length > 0) {
+ result.attr("ex:facetLabel", config.name);
+ }
+ return result;
+//
+// return "<div ex:role='facet' ex:facetClass='Slider' ex:histogram='true' ex:horizontal='true' ex:height='50px' ex:expression='" + config.expression +
+// "' ex:facetLabel='" + config.name + "'></div>";
},
showEditor: function(facetContainer) {
var facet = this;
@@ -19,8 +19,12 @@
},
generateExhibitHTML: function (config) {
config = config || this.config;
- return "<div ex:role='facet' ex:facetClass='Cloud' ex:expression='" + config.expression + "' ex:facetLabel='" + config.name + "'></div>";
- },
+ var result = $("<div ex:role='facet' ex:facetClass='Cloud'></div>");
+ result.attr("ex:expression", config.expression);
+ if (config.name && config.name.length > 0) {
+ result.attr("ex:facetLabel", config.name);
+ }
+ return result; },
showEditor: function(facetContainer) {
var facet = this;

0 comments on commit e005c3f

Please sign in to comment.