1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/9d29df33bac9/ Changeset: 9d29df33bac9 User: guerler Date: 2014-03-08 11:39:36 Summary: Charts: Cache datasets Affected #: 3 files diff -r 0e7b5c5cfcd9bb3fc13c9087d661597c064ba546 -r 9d29df33bac909a04f172214934b6cb1c60db0e0 config/plugins/visualizations/charts/static/library/datasets.js --- a/config/plugins/visualizations/charts/static/library/datasets.js +++ b/config/plugins/visualizations/charts/static/library/datasets.js @@ -4,6 +4,9 @@ // widget return Backbone.Collection.extend( { + // list of datasets + list: {}, + // initialize initialize: function(app, options) { @@ -19,22 +22,31 @@ // link this var self = this; - // wait for dataset - Utils.request('GET', config.root + 'api/datasets/' + options.id, {}, function(dataset) { - switch (dataset.state) { - case 'error': - if (error) { - error(dataset); - } - break; - default: - if (options.groups) { - self._fetch(options, success); - } else { + // check if column data is requested + if (options.groups) { + this._fetch(options, success); + } else { + // check if dataset is available from cache + var dataset = this.list[options.id]; + if (dataset) { + success(dataset); + return; + } + + // request dataset + Utils.request('GET', config.root + 'api/datasets/' + options.id, {}, function(dataset) { + switch (dataset.state) { + case 'error': + if (error) { + error(dataset); + } + break; + default: + self.list[options.id] = dataset; success(dataset); - } - } - }); + } + }); + } }, // fetch data columns into dataset object diff -r 0e7b5c5cfcd9bb3fc13c9087d661597c064ba546 -r 9d29df33bac909a04f172214934b6cb1c60db0e0 config/plugins/visualizations/charts/static/library/ui-table-form.js --- a/config/plugins/visualizations/charts/static/library/ui-table-form.js +++ b/config/plugins/visualizations/charts/static/library/ui-table-form.js @@ -92,7 +92,7 @@ // combine field and info var $input = $('<div/>'); $input.append(field.$el); - $input.append('<div class="toolParamHelp">' + settings_def.info + '</div>'); + $input.append('<div class="toolParamHelp" style="font-size: 0.9em;">' + settings_def.info + '</div>'); // add row to table this.table.add('<span style="white-space: nowrap;">' + settings_def.title + '</span>'); diff -r 0e7b5c5cfcd9bb3fc13c9087d661597c064ba546 -r 9d29df33bac909a04f172214934b6cb1c60db0e0 config/plugins/visualizations/charts/templates/charts.mako --- a/config/plugins/visualizations/charts/templates/charts.mako +++ b/config/plugins/visualizations/charts/templates/charts.mako @@ -1,5 +1,6 @@ <% scripts = [ 'jquery/jquery.js', + 'jquery/select2.js', 'bootstrap.js', 'require.js', 'underscore.js', Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.