From: Wolfram Schneider Date: Mon, 19 May 2014 12:14:42 +0000 (+0000) Subject: The config value for facet_max_<...> can be a string or a number X-Git-Tag: 1.0.0~654 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=d1104229b6ce759a8f825f39d58bde19813a223c;p=mkws-moved-to-github.git The config value for facet_max_<...> can be a string or a number "facet_max_xtargets" : "10" our JS code will convert it to a number. --- diff --git a/src/mkws-widget-termlists.js b/src/mkws-widget-termlists.js index dc89504..acd9dcf 100644 --- a/src/mkws-widget-termlists.js +++ b/src/mkws-widget-termlists.js @@ -32,7 +32,7 @@ mkws.registerWidgetType('Facet', function() { var name = that.config.facet; var ref = facetConfig[name] || [ "Unknown", 10, true ]; var caption = this.config['facet_caption_' + name] || ref[0]; - var max = this.config['facet_max_' + name] || ref[1]; + var max = parseInt(this.config['facet_max_' + name] || ref[1]); var pzIndex = ref[2] ? name : null; that.toString = function() {