updated readme

This commit is contained in:
David Baldwynn 2015-07-09 15:15:34 -07:00
parent 23fd8e36d6
commit b2211412d8
6 changed files with 34 additions and 45 deletions

10
Dockerfile Executable file → Normal file
View file

@ -1,7 +1,15 @@
FROM node:0.10
# DOCKER-VERSION 1.7.0
FROM ubuntu:13.10
# make sure apt is up to date
RUN apt-get update
MAINTAINER Matthias Luebken, matthias@catalyst-zero.com
# install nodejs and npm
RUN apt-get install -y nodejs npm git git-core
WORKDIR /home/mean
# Install Mean.JS Prerequisites

View file

@ -1,10 +1,11 @@
[![MEAN.JS Logo](http://meanjs.org/img/logo-small.png)](http://meanjs.org/)
MEDFORMS
--------
[![Build Status](https://travis-ci.org/meanjs/mean.svg?branch=master)](https://travis-ci.org/meanjs/mean)
[![Dependencies Status](https://david-dm.org/meanjs/mean.svg)](https://david-dm.org/meanjs/mean)
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/meanjs/mean?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
MEAN.JS is a full-stack JavaScript open-source solution, which provides a solid starting point for [MongoDB](http://www.mongodb.org/), [Node.js](http://www.nodejs.org/), [Express](http://expressjs.com/), and [AngularJS](http://angularjs.org/) based applications. The idea is to solve the common issues with connecting those frameworks, build a robust framework to support daily development needs, and help developers use better practices while working with popular JavaScript components.
Medforms is an opensource *form builder* that can create stunning forms from PDFs or from scratch
## Before You Begin
Before you begin we recommend you read about the basic building blocks that assemble a MEAN.JS application:
@ -39,44 +40,26 @@ The recommended way would be to use the [Official Yo Generator](http://meanjs.or
### Cloning The GitHub Repository
You can also use Git to directly clone the MEAN.JS repository:
```bash
$ git clone https://github.com/meanjs/mean.git meanjs
$ git clone https://github.com/whitef0x0/medforms.git medforms
```
This will clone the latest version of the MEAN.JS repository to a **meanjs** folder.
This will clone the latest version of the Medforms repository to a **medforms** folder.
### Downloading The Repository Zip File
Another way to use the MEAN.JS boilerplate is to download a zip copy from the [master branch on GitHub](https://github.com/meanjs/mean/archive/master.zip). You can also do this using `wget` command:
```bash
$ wget https://github.com/meanjs/mean/archive/master.zip -O meanjs.zip; unzip meanjs.zip; rm meanjs.zip
```
Don't forget to rename **mean-master** after your project name.
## Quick Install
Once you've downloaded the boilerplate and installed all the prerequisites, you're just a few steps away from starting to develop your MEAN application.
The first thing you should do is install the Node.js dependencies. The boilerplate comes pre-bundled with a package.json file that contains the list of modules you need to start your application. To learn more about the modules installed visit the NPM & Package.json section.
To install Node.js dependencies you're going to use npm again. In the application folder run this in the command-line:
## Quickstart
Install dependencies first.
```bash
$ npm install
$ bower install
```
This command does a few things:
* First it will install the dependencies needed for the application to run.
* If you're running in a development environment, it will then also install development dependencies needed for testing and running your application.
* Finally, when the install process is over, npm will initiate a bower install command to install all the front-end modules needed for the application.
## Running Your Application
After the install process is over, you'll be able to run your application using Grunt. Just run grunt default task:
Then run your application using grunt.
```bash
$ grunt
```
Your application should run on port 3000, so in your browser just go to [http://localhost:3000](http://localhost:3000)
That's it! Your application should be running. To proceed with your development, check the other sections in this documentation.
If you encounter any problems, try the Troubleshooting section.
## Testing Your Application
You can run the full test suite included with MEAN.JS with the test task:
@ -102,16 +85,20 @@ $ grunt test:client
## Development and deployment With Docker
* Install [Docker](http://www.docker.com/)
* Install [Fig](https://github.com/orchardup/fig)
* Install [Docker-Machine](https://docs.docker.com/machine/)
* Local development and testing with fig:
* Local development and setup with dockermachine:
```bash
$ fig up
$ curl -L https://github.com/docker/machine/releases/download/v0.3.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
$ chmod +x /usr/local/bin/docker-machine
$ docker-machine create -d virtualbox dev
$ docker-machine env dev
$ eval "$(docker-machine env dev)"
```
* Local development and testing with just Docker:
```bash
$ docker build -t mean .
$ docker build -t medforms .
$ docker run -p 27017:27017 -d --name db mongo
$ docker run -p 3000:3000 --link db:db_1 mean
$
@ -130,9 +117,6 @@ $ sh ./scripts/generate-ssl-certs.sh
Windows users can follow instructions found [here](http://www.websense.com/support/article/kbarticle/How-to-use-OpenSSL-and-Microsoft-Certification-Authority).
After you've generated the key and certificate, place them in the *config/sslcerts* folder.
## Getting Started With MEAN.JS
You have your application running, but there is a lot of stuff to understand. We recommend you go over the [Official Documentation](http://meanjs.org/docs.html).
In the docs we'll try to explain both general concepts of MEAN components and give you some guidelines to help you improve your development process. We tried covering as many aspects as possible, and will keep it updated by your request. You can also help us develop and improve the documentation by checking out the *gh-pages* branch of this repository.
## Community
* Use the [Official Website](http://meanjs.org) to learn about changes and the roadmap.
@ -144,8 +128,7 @@ In the docs we'll try to explain both general concepts of MEAN components and gi
Browse the live MEAN.JS example on [http://meanjs.herokuapp.com](http://meanjs.herokuapp.com).
## Credits
Inspired by the great work of [Madhusudhan Srinivasa](https://github.com/madhums/)
The MEAN name was coined by [Valeri Karpov](http://blog.mongodb.org/post/49262866911/the-mean-stack-mongodb-expressjs-angularjs-and)
Inspired/built off great work of the meanjs team [MeanJS](https://github.com/mean/)
## License
(The MIT License)

View file

@ -17,6 +17,7 @@ angular.module(ApplicationConfiguration.applicationModuleName).run(['$rootScope'
// add previous state property
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState) {
console.log(fromState);
$state.previous = fromState;
//Redirect home to listForms if user is authenticated

View file

@ -7,9 +7,9 @@ angular.module('forms').directive('autoSaveForm', ['$rootScope', '$timeout', fun
link: function($scope, $element, $attrs, $ctrls) {
var difference = function(array){
var rest = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));
var rest = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));
var containsEquals = function(obj, target) {
var containsEquals = function(obj, target) {
if (obj == null) return false;
return _.any(obj, function(value) {
return _.isEqual(value, target);

View file

@ -3,9 +3,6 @@
angular.module('forms').directive('editFormDirective', ['$rootScope', '$q', '$http', '$timeout', 'timeCounter', 'Auth', 'FormFields',
function ($rootScope, $q, $http, $timeout, timeCounter, Auth, FormFields) {
return {
// link: function (scope, iElm, iAttrs) {
// console.log(scope);
// },
templateUrl: './modules/forms/views/directiveViews/form/edit-form.html',
restrict: 'E',
scope: {
@ -29,12 +26,14 @@ angular.module('forms').directive('editFormDirective', ['$rootScope', '$q', '$ht
$scope.accordion = {};
$scope.accordion.oneAtATime = true;
// create new field button click
// Add a new field to form
$scope.addNewField = function(fieldType){
// incr field_id counter
$scope.addField.lastAddedID++;
var fieldTitle;
//F
for(var i = 0; i < $scope.addField.types.length; i++){
// console.log($scope.addField.types[i].name === fieldType);
if($scope.addField.types[i].name === fieldType){

View file

@ -17,10 +17,8 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$loca
function(response) {
Auth.login(response);
$scope.user = $rootScope.user = Auth.ensureHasCurrentUser(User);
console.log('$state.previous: \n');
console.log($state.previous);
if($state.previous !== 'home'){
if($state.previous.name !== 'home'){
$state.go($state.previous.name);
}else{
$state.go('home');