Skip to content

Commit

Permalink
thread html back onto usable widgets; work on geneontology/amigo#317
Browse files Browse the repository at this point in the history
  • Loading branch information
kltm committed Mar 16, 2016
1 parent a3bc4c3 commit bea819f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 25 deletions.
48 changes: 25 additions & 23 deletions lib/live_filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
var us = require('underscore');
var bbop = require('bbop-core');

var html = require('./html');

// Code here will be ignored by JSHint, as we are technically
// "redefining" jQuery (although we are not).
/* jshint ignore:start */
Expand Down Expand Up @@ -265,27 +267,27 @@ var live_filters = function(interface_id, manager, golr_conf_obj,
// Get a progress bar assembled.
var inspan = new html.tag('span', {'class': 'sr-only'}, '...');
var indiv = new html.tag('div', {'class': 'progress-bar',
'role': 'progressbar',
'aria-valuenow': '100',
'aria-valuemin': '0',
'aria-valuemax': '100',
'style': 'width: 100%;'},
inspan);
'role': 'progressbar',
'aria-valuenow': '100',
'aria-valuemin': '0',
'aria-valuemax': '100',
'style': 'width: 100%;'},
inspan);
spinner_div =
new html.tag('div',
{'generate_id': true,
'class':
'progress progress-striped active pull-right',
'style': 'width: 3em;'},
indiv);
{'generate_id': true,
'class':
'progress progress-striped active pull-right',
'style': 'width: 3em;'},
indiv);

// The container area; add in the label and count.
var mdiv_args = {
'class': 'well well-sm',
'id': meta_div_id
};
var mdiv = new html.tag('div', mdiv_args,
[this._meta_label, ms, spinner_div]);
[this._meta_label, ms, spinner_div]);

jQuery('#' + container_div.get_id()).append(mdiv.to_string());
};
Expand Down Expand Up @@ -376,7 +378,7 @@ var live_filters = function(interface_id, manager, golr_conf_obj,
};
var scont =
new html.tag('div', scont_attrs,
'No applied sticky filters');
'No applied sticky filters');

var sticky_filters_attrs = {
'class': 'panel panel-default',
Expand Down Expand Up @@ -408,7 +410,7 @@ var live_filters = function(interface_id, manager, golr_conf_obj,
};
var ccont =
new html.tag('div', ccont_attrs,
'No applied user filters');
'No applied user filters');

var current_filters_attrs = {
'class': 'panel panel-default',
Expand Down Expand Up @@ -950,15 +952,15 @@ var live_filters = function(interface_id, manager, golr_conf_obj,
// First, we need to make the filter clear button for the top
// of the table.
var b_cf = new html.button('×',
{
'type': 'button',
'id':
clear_user_filter_span_id,
'class':
'btn btn-danger btn-xs',
'title':
'Clear all user filters'
});
{
'type': 'button',
'id':
clear_user_filter_span_id,
'class':
'btn btn-danger btn-xs',
'title':
'Clear all user filters'
});

var in_query_filters = response.query_filters();
//var sticky_query_filters = manager.get_sticky_query_filters();
Expand Down
4 changes: 3 additions & 1 deletion lib/live_pager.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
var us = require('underscore');
var bbop = require('bbop-core');

var html = require('./html');

// Code here will be ignored by JSHint, as we are technically
// "redefining" jQuery (although we are not).
/* jshint ignore:start */
Expand Down Expand Up @@ -308,7 +310,7 @@ var live_pager = function(interface_id, manager, in_argument_hash){
}
}

/*
* Function: button_span_id
*
Expand Down
4 changes: 3 additions & 1 deletion lib/live_results.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
var us = require('underscore');
var bbop = require('bbop-core');

var html = require('./html');

// Code here will be ignored by JSHint, as we are technically
// "redefining" jQuery (although we are not).
/* jshint ignore:start */
Expand Down Expand Up @@ -44,7 +46,7 @@ var jQuery = require('jquery');
* this object
*/
var live_results = function(interface_id, manager, conf_class,
handler, linker, in_argument_hash){
handler, linker, in_argument_hash){
this._is_a = 'bbop-widget-set.live_results';

var anchor = this;
Expand Down

0 comments on commit bea819f

Please sign in to comment.