mirror of
https://github.com/fazo96/pbs.git
synced 2025-01-27 14:34:19 +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.
|
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
|
## 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
|
## License
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
@ -7,6 +7,7 @@ var clean = require('gulp-clean')
|
|||||||
|
|
||||||
gulp.task('css',function(){
|
gulp.task('css',function(){
|
||||||
cssFiles = ["src/*.css","bower_components/vis/dist/vis.min.css",
|
cssFiles = ["src/*.css","bower_components/vis/dist/vis.min.css",
|
||||||
|
"bower_components/sweetalert/lib/sweet-alert.css",
|
||||||
"bower_components/bootstrap/dist/css/bootstrap.css"]
|
"bower_components/bootstrap/dist/css/bootstrap.css"]
|
||||||
return gulp.src(cssFiles)
|
return gulp.src(cssFiles)
|
||||||
.pipe(minifyCSS())
|
.pipe(minifyCSS())
|
||||||
@ -22,6 +23,7 @@ gulp.task('js',function(){
|
|||||||
jsFiles = ["src/*.js",
|
jsFiles = ["src/*.js",
|
||||||
"bower_components/jquery/dist/jquery.js",
|
"bower_components/jquery/dist/jquery.js",
|
||||||
"bower_components/angular/angular.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/angular-ui-router/release/angular-ui-router.js",
|
||||||
"bower_components/vis/dist/vis.min.js"]
|
"bower_components/vis/dist/vis.min.js"]
|
||||||
return gulp.src(jsFiles).pipe(uglify({ mangle: false }))
|
return gulp.src(jsFiles).pipe(uglify({ mangle: false }))
|
||||||
|
@ -4,20 +4,20 @@ pertApp.config ($stateProvider,$urlRouterProvider) ->
|
|||||||
$urlRouterProvider.otherwise '/'
|
$urlRouterProvider.otherwise '/'
|
||||||
$stateProvider.state 'home',
|
$stateProvider.state 'home',
|
||||||
url: '/'
|
url: '/'
|
||||||
templateUrl: 'dist/home.html'
|
templateUrl: 'home.html'
|
||||||
controller: ($scope) ->
|
controller: ($scope) ->
|
||||||
$scope.rawdata = localStorage.getItem 'ganttpert'
|
$scope.rawdata = localStorage.getItem 'ganttpert'
|
||||||
|
$scope.saveData = ->
|
||||||
|
swal 'Saved', 'Your data has been updated', 'success'
|
||||||
|
localStorage.setItem 'ganttpert', $('#ta').val()
|
||||||
|
|
||||||
$stateProvider.state 'pert',
|
$stateProvider.state 'pert',
|
||||||
url: '/pert'
|
url: '/pert'
|
||||||
templateUrl: 'dist/pert.html'
|
templateUrl: 'pert.html'
|
||||||
controller: pertController
|
controller: pertController
|
||||||
|
|
||||||
|
|
||||||
$('#save').click ->
|
pertController = ($scope) ->
|
||||||
console.log 'save'
|
|
||||||
localStorage.setItem 'ganttpert', $('#ta').val()
|
|
||||||
|
|
||||||
toDates = (list, startDay) ->
|
toDates = (list, startDay) ->
|
||||||
list.map (i) ->
|
list.map (i) ->
|
||||||
r = content: ""+i.id, id: i.id
|
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'
|
if i.endDay? then r.end = moment(startDay).add(i.endDay, 'days').format 'YYYY-MM-DD'
|
||||||
return r
|
return r
|
||||||
|
|
||||||
pertController = ($scope) ->
|
|
||||||
console.log 'controller'
|
|
||||||
buildTimeline = (data) ->
|
buildTimeline = (data) ->
|
||||||
timeline = new vis.Timeline (document.getElementById 'timeline'), (toDates data.activities), {}
|
timeline = new vis.Timeline (document.getElementById 'timeline'), (toDates data.activities), {}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="home">
|
<div class="home">
|
||||||
<textarea id="ta" class="form-control" rows="10">{{rawdata}}</textarea>
|
<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>
|
<a href="#/pert" class="btn btn-success">View Pert</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,15 +3,17 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Pert</title>
|
<title>Pert</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" href="dist/vis.min.css">
|
<link rel="stylesheet" href="vis.min.css">
|
||||||
<link rel="stylesheet" href="dist/bootstrap.css">
|
<link rel="stylesheet" href="bootstrap.css">
|
||||||
<link rel="stylesheet" href="dist/style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
<script src="dist/jquery.js"></script>
|
<link rel="stylesheet" href="sweet-alert.css">
|
||||||
<script src="dist/angular.js"></script>
|
<script src="jquery.js"></script>
|
||||||
<script src="dist/angular-ui-router.js"></script>
|
<script src="sweet-alert.js"></script>
|
||||||
<script src="dist/vis.min.js"></script>
|
<script src="angular.js"></script>
|
||||||
<script src="dist/pert.js"></script>
|
<script src="angular-ui-router.js"></script>
|
||||||
<script src="dist/app.js"></script>
|
<script src="vis.min.js"></script>
|
||||||
|
<script src="pert.js"></script>
|
||||||
|
<script src="app.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container" ui-view></div>
|
<div class="container" ui-view></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user