diff --git a/README.md b/README.md index d55895b..0dfdba4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Pert is a small web app built to assist in working with Project Breakdown Structures. -It should be accessible [here](http://fazo96.github.io/pert) +It should be accessible [here](http://pert.divshot.io) ## Features @@ -27,6 +27,13 @@ This is a valid input document (extra data is ignored but not thrashed): ] ``` +## Development + +1. Clone the repo +2. make sure you have [gulp](http://gulpjs.com) +3. run `npm install && bower install && gulp` to build the project +4. the resulting static website is in `dist/` + ## License MIT diff --git a/gulpfile.js b/gulpfile.js index c4dbd89..c885d46 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,6 +7,7 @@ var clean = require('gulp-clean') gulp.task('css',function(){ cssFiles = ["src/*.css","bower_components/vis/dist/vis.min.css", + "bower_components/sweetalert/lib/sweet-alert.css", "bower_components/bootstrap/dist/css/bootstrap.css"] return gulp.src(cssFiles) .pipe(minifyCSS()) @@ -22,6 +23,7 @@ gulp.task('js',function(){ jsFiles = ["src/*.js", "bower_components/jquery/dist/jquery.js", "bower_components/angular/angular.js", + "bower_components/sweetalert/lib/sweet-alert.js", "bower_components/angular-ui-router/release/angular-ui-router.js", "bower_components/vis/dist/vis.min.js"] return gulp.src(jsFiles).pipe(uglify({ mangle: false })) diff --git a/src/app.coffee b/src/app.coffee index 572757a..356fbba 100644 --- a/src/app.coffee +++ b/src/app.coffee @@ -4,20 +4,20 @@ pertApp.config ($stateProvider,$urlRouterProvider) -> $urlRouterProvider.otherwise '/' $stateProvider.state 'home', url: '/' - templateUrl: 'dist/home.html' + templateUrl: 'home.html' controller: ($scope) -> $scope.rawdata = localStorage.getItem 'ganttpert' + $scope.saveData = -> + swal 'Saved', 'Your data has been updated', 'success' + localStorage.setItem 'ganttpert', $('#ta').val() $stateProvider.state 'pert', url: '/pert' - templateUrl: 'dist/pert.html' + templateUrl: 'pert.html' controller: pertController -$('#save').click -> - console.log 'save' - localStorage.setItem 'ganttpert', $('#ta').val() - +pertController = ($scope) -> toDates = (list, startDay) -> list.map (i) -> r = content: ""+i.id, id: i.id @@ -25,8 +25,6 @@ $('#save').click -> if i.endDay? then r.end = moment(startDay).add(i.endDay, 'days').format 'YYYY-MM-DD' return r -pertController = ($scope) -> - console.log 'controller' buildTimeline = (data) -> timeline = new vis.Timeline (document.getElementById 'timeline'), (toDates data.activities), {} diff --git a/src/home.html b/src/home.html index cae0fcd..3922255 100644 --- a/src/home.html +++ b/src/home.html @@ -1,5 +1,5 @@
- + View Pert
diff --git a/src/index.html b/src/index.html index aa4e615..067606b 100644 --- a/src/index.html +++ b/src/index.html @@ -3,15 +3,17 @@ Pert - - - - - - - - - + + + + + + + + + + +