diff --git a/index.html b/index.html
index 405f48a..18fcf00 100644
--- a/index.html
+++ b/index.html
@@ -3,13 +3,17 @@
Pert
-
+
-
-
- view pert
+
+
+
diff --git a/pert.html b/pert.html
index a32709c..0ee2805 100644
--- a/pert.html
+++ b/pert.html
@@ -3,15 +3,22 @@
Pert
+
+
+
+
-
- edit data
-
diff --git a/scripts/build.sh b/scripts/build.sh
deleted file mode 100755
index 330d29e..0000000
--- a/scripts/build.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-coffee -b -c --no-header -p src/pert.coffee > pert.js
-coffee -b -c --no-header -p src/pert-ui.coffee > pert-ui.js
-coffee -b -c --no-header -p src/index.coffee > index.js
diff --git a/scripts/clean.sh b/scripts/clean.sh
deleted file mode 100755
index 4f3ced6..0000000
--- a/scripts/clean.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-rm -r *.js
diff --git a/src/pert-cli.coffee b/src/pert-cli.coffee
deleted file mode 100755
index a1c4ed2..0000000
--- a/src/pert-cli.coffee
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env coffee
-chalk = require 'chalk'
-cli = require 'commander'
-fs = require 'fs'
-Pert = require '../lib/pert.js'
-express = require 'express'
-
-ex = [{id: 0, depends: [], duration: 2}, { id: 1, depends: [0], duration: 3},{id: 2, depends: [0,1], duration: 4}]
-
-cli
- .version '0.1'
- .description 'loads activity data from JSON and computes the possible activity delays'
- .usage ' [options] [args]'
- .option '-v, --verbose', 'be verbose (for debugging)'
-
-didSomething = no
-
-cli
- .command 'example'
- .description 'show an example of the JSON data format'
- .action ->
- pert = new Pert ex, cli.verbose
- didSomething = yes
- console.log chalk.bold.green('Before:'), ex
- console.log chalk.bold.green('After calculations:'), pert.calculate()
- console.log chalk.green 'Tip:',chalk.bold 'optional fields can be freely included in the input data'
-
-cli
- .command 'calculate '
- .description 'calculate data on given JSON document'
- .alias 'c'
- .option '-j, --json', 'output json data'
- .action (file,options) ->
- didSomething = yes
- fs.readFile file, (error,content) ->
- if error then err error
- else
- pert = new Pert JSON.parse(content), cli.verbose
- console.log pert.calculate options
-
-cli
- .command 'graph '
- .description 'serve HTTP GUI with pert graph of given JSON document'
- .alias 'g'
- .option '-r, --read-only', 'disallow data editing'
- .action (file,options) ->
- didSomething = yes
- fs.readFile file, (error,content) ->
- if error then err error
- else
- pert = new Pert JSON.parse(content), cli.verbose
- data = pert.calculate()
- app = express()
- app.use express.static 'client'
- app.get '/data', (req,res) -> res.json data
- if !options.readOnly then app.post '/data', (req,res) ->
- data = req.body
- pert.setData(data).calculate()
- app.listen 3000
- console.log chalk.green('Started Web Server'), 'on port', chalk.bold(3000)
-
-
-cli.parse process.argv
-
-if !didSomething then console.log chalk.green('Tip:'), 'see', chalk.bold(cli.name()+' --help')
diff --git a/src/pert-ui.coffee b/src/pert-ui.coffee
index 1cd6afb..a9b7427 100644
--- a/src/pert-ui.coffee
+++ b/src/pert-ui.coffee
@@ -8,7 +8,6 @@ toDates = (list, startDay) ->
return r
buildTimeline = (data) ->
- console.log toDates data.activities
timeline = new vis.Timeline (document.getElementById 'timeline'), (toDates data.activities), {}
buildGraph = (data) ->
@@ -25,8 +24,6 @@ buildGraph = (data) ->
to: x.endDay+x.permittedDelay
color: 'green'
label: x.id+" ("+x.permittedDelay+")"
- console.log nodes
- console.log connections
if network
network.setData { nodes: nodes, edges: edges }
else
diff --git a/src/pert.coffee b/src/pert.coffee
old mode 100755
new mode 100644
diff --git a/src/style.css b/src/style.css
index 4030162..19c8926 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1,6 +1,10 @@
-body { height: 100%; }
#pert {
height: 600px;
width: 100%;
border: 1px solid lightgray;
+ margin-bottom: 1em
+}
+
+#ta {
+ margin: 1em 0 1em 0
}