Giter VIP home page Giter VIP logo

ade's Introduction

AngularJS Datatype Editors (ADE)

ADE is a bunch of filters and directives for displaying and editing various types of data in an AngularJS App. For example, if you have a unix timestamp that you want to display and make editable, ADE can display a formatted date string and make a popup calendar for editing.

Try our Demo and take a look at the demo examples in our source files.

ADE currently supports the following datatypes:

  • Text (short)
  • Text (long)
  • URL
  • Email Address
  • Phone number
  • Date
  • Date + Time
  • Year
  • Time
  • Money
  • Decimal
  • Integer
  • Percent
  • Length
  • List (pick one)
  • List (pick multiple)
  • Rating
  • Boolean
  • Icon

Dependencies

All ADE datatypes depend on the following packages:

  • angular 1.2.13
  • jquery 1.11.0

The following packages are needed by their respective ADE datatypes:

  • angular-sanitize 1.2.13: email and url
  • bootstrap: date, email, icon, list, phone, rich, time, url
  • font-awesome: icon directive
  • tinymce 4.0.4 (for rich directive only) Use our modified version if you want keyboard commands to work.

The following packages included in ADE were modified to support a variety of use cases. You can use the unmodified packages available in bower, but we have not tested the results yet.

  • datejs: date and time
  • bootstrap-datepicker: date
  • bootstrap-timepicker: time
  • ngTagsInput: list and tag

We are working to reduce external dependencies as much as possible.

Installation

  1. Install ADE using bower:

    bower install ADE

Or Download ZIP.

Take a look at the "dist/build" directory.

  1. Add ADE's css and file to your HTML file:

CSS

<link rel="stylesheet" href="../bower_components/bootstrap/docs/assets/css/bootstrap.css"/>  
<link rel="stylesheet" href="../bower_components/ADE/dist/build/ade.min.css"/>

JavaScript

<script src="../bower_components/jquery/jquery.js"></script>
<script src="../bower_components/angular/angular.js"></script>
<script src="../bower_components/angular-sanitize/angular-sanitize.js"></script>

<script src="../bower_components/ADE/dist/build/ade.min.js"></script>
  1. Inject ADE in your angular project:

    var app = angular.module('app', ['ADE', 'ngSanitize']);

  2. Use the directives and filters in your HTML:

Individual datatypes

You can also choose individual ADE datatypes to include in your project. Take a look at the example source files to know which files to include.

The following directives are required by their respective ADE datatypes. These directives are available in the "app/common" directory.

  • number: decimal, integer, money and percent
  • url: email, phone and url

Build

You can build the project for your specific use case. For example, you may want to pick several components and have their minifed/uglified result available in dist/build.

  1. Install node and grunt on your system
  2. Install node modules by running "npm install"
  3. Run our build script "scripts/build.sh"

Licence

ADE is freely distributable under the terms of the MIT license.

ade's People

Contributors

alexngp avatar annavester avatar offsky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.