diff options
author | przemyslawpluta <przemekpluta@hotmail.com> | 2014-10-01 20:06:31 +0100 |
---|---|---|
committer | przemyslawpluta <przemekpluta@hotmail.com> | 2014-10-01 20:06:31 +0100 |
commit | 53377f631000a517c0148cc278ad78e4f955329f (patch) | |
tree | 52f48516b5aa3f19d22d13ebcc7cb3233ad377d1 /lib | |
parent | 4f661004d55e58df3eee5ecba83d94019b0573e1 (diff) | |
download | mongo-edu-53377f631000a517c0148cc278ad78e4f955329f.zip |
new website support
Diffstat (limited to 'lib')
-rw-r--r-- | lib/courseware.js | 1 | ||||
-rw-r--r-- | lib/options.js | 10 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/courseware.js b/lib/courseware.js index 0c47210..8aa0d01 100644 --- a/lib/courseware.js +++ b/lib/courseware.js @@ -12,7 +12,6 @@ var fs = require('fs'), ProgressBar = require('progress'), inquirer = require('inquirer'), colors = require('colors'), - util = require('util'), _ = require('lodash'); var isWin = /^win/.test(process.platform), diff --git a/lib/options.js b/lib/options.js index 1b3fb6b..707beb4 100644 --- a/lib/options.js +++ b/lib/options.js @@ -7,7 +7,6 @@ */ var fs = require('fs'), - path = require('path'), _ = require('lodash'), inquirer = require('inquirer'), Table = require('easy-table'), @@ -122,13 +121,12 @@ function promptAsk(data, argv, initRun) { }); } -function showSign(item, rev) { +function showSign(item) { 'use strict'; if (!item) { return ''; } if (typeof item !== 'boolean') { return item; } - if (!rev) { return (item) ? ' x' : ''; } - return (item) ? '' : ' x'; + return (item) ? ' x' : ''; } function checkIfFilled(item, name, target, clear) { @@ -154,7 +152,7 @@ function showPresets(argv, initRun, checkIfLoad) { items.forEach(function each(item) { t.cell('Preset', presets[count]); t.cell('User', item.u); - t.cell('Wiki List', showSign(item.cw, true)); + t.cell('Wiki List', ((!item.cw && item.h) ? showSign(item.cw) : showSign(!item.cw))); t.cell('Courseware', showSign(item.cw)); t.cell('HQ Video', showSign(item.hq)); t.cell('CC', showSign(item.cc)); @@ -192,7 +190,7 @@ function showPresets(argv, initRun, checkIfLoad) { t.columns = _.pick(t.columns, clear); - if (info) { console.log('User: '.bold + users[0] + '\n'); } + if (info) { console.log('User: '.bold + users[0].underline + '\n'); } console.log(t.toString()); |