From b2211412d86669a2efb2f056a9f4d569bda884d7 Mon Sep 17 00:00:00 2001 From: David Baldwynn Date: Thu, 9 Jul 2015 15:15:34 -0700 Subject: [PATCH] updated readme --- Dockerfile | 10 +++- README.md | 53 +++++++------------ public/application.js | 1 + .../directives/auto-save.client.directive.js | 4 +- .../directives/edit-form.client.directive.js | 7 ++- .../authentication.client.controller.js | 4 +- 6 files changed, 34 insertions(+), 45 deletions(-) mode change 100755 => 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile old mode 100755 new mode 100644 index 635adae4..18dba001 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 4b1a5acc..e1f4b909 100755 --- a/README.md +++ b/README.md @@ -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) diff --git a/public/application.js b/public/application.js index 3d6ea9fe..5f5b4d4d 100755 --- a/public/application.js +++ b/public/application.js @@ -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 diff --git a/public/modules/forms/directives/auto-save.client.directive.js b/public/modules/forms/directives/auto-save.client.directive.js index 5491cf8a..0a6c7c1c 100644 --- a/public/modules/forms/directives/auto-save.client.directive.js +++ b/public/modules/forms/directives/auto-save.client.directive.js @@ -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); diff --git a/public/modules/forms/directives/edit-form.client.directive.js b/public/modules/forms/directives/edit-form.client.directive.js index 9bc3a266..96e1c2cb 100644 --- a/public/modules/forms/directives/edit-form.client.directive.js +++ b/public/modules/forms/directives/edit-form.client.directive.js @@ -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){ diff --git a/public/modules/users/controllers/authentication.client.controller.js b/public/modules/users/controllers/authentication.client.controller.js index f55f15c1..0bcf0d04 100755 --- a/public/modules/users/controllers/authentication.client.controller.js +++ b/public/modules/users/controllers/authentication.client.controller.js @@ -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');