passing tests and displaying titles in web UI

This commit is contained in:
jywarren
2017-03-03 19:05:06 -05:00
parent 89852e4459
commit eda5ecd3e7
13 changed files with 96 additions and 79 deletions

View File

@@ -8,13 +8,13 @@ module.exports = function UserInterface(options) {
options.random = options.random || parseInt(Math.random() * (new Date()).getTime() / 1000000);
options.uniqueSelector = options.uniqueSelector || options.selector + '-' + options.random;
$(options.container).append('<div class="panel ' + options.selector + ' ' + options.uniqueSelector + '"></div>');
$(options.container).append('<div class="panel ' + options.selector + ' ' + options.uniqueSelector + '"><div class="image"></div></div>');
options.el = options.el || $('.' + options.uniqueSelector);
createLabel(options.el);
// method to remove the UI for a given method, and remove the step
function display(image) {
options.el.html(image);
options.el.find('.image').html(image);
}
// method to remove the UI for a given method, and remove the step
@@ -24,8 +24,7 @@ module.exports = function UserInterface(options) {
//function move() {}
function createLabel(el) {
console.log("createLabel", module.title)
el.append('<h3 class="title">' + module.title + '</h3>');
if (options.title) el.prepend('<h3 class="title">' + options.title + '</h3>');
}
return {