mirror of
https://github.com/fazo96/pbs.git
synced 2025-01-26 14:24:20 +01:00
a lot of fixes
This commit is contained in:
parent
82c00c97f4
commit
416b4b0158
@ -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
|
||||
|
@ -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 }))
|
||||
|
@ -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), {}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="home">
|
||||
<textarea id="ta" class="form-control" rows="10">{{rawdata}}</textarea>
|
||||
<button id="save" class="btn btn-primary">Save</button>
|
||||
<button class="btn btn-primary" ng-click="saveData($event)">Save</button>
|
||||
<a href="#/pert" class="btn btn-success">View Pert</a>
|
||||
</div>
|
||||
|
@ -3,15 +3,17 @@
|
||||
<head>
|
||||
<title>Pert</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="dist/vis.min.css">
|
||||
<link rel="stylesheet" href="dist/bootstrap.css">
|
||||
<link rel="stylesheet" href="dist/style.css">
|
||||
<script src="dist/jquery.js"></script>
|
||||
<script src="dist/angular.js"></script>
|
||||
<script src="dist/angular-ui-router.js"></script>
|
||||
<script src="dist/vis.min.js"></script>
|
||||
<script src="dist/pert.js"></script>
|
||||
<script src="dist/app.js"></script>
|
||||
<link rel="stylesheet" href="vis.min.css">
|
||||
<link rel="stylesheet" href="bootstrap.css">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<link rel="stylesheet" href="sweet-alert.css">
|
||||
<script src="jquery.js"></script>
|
||||
<script src="sweet-alert.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script src="angular-ui-router.js"></script>
|
||||
<script src="vis.min.js"></script>
|
||||
<script src="pert.js"></script>
|
||||
<script src="app.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" ui-view></div>
|
||||
|
Loading…
Reference in New Issue
Block a user