Skip to content

Commit

Permalink
Add TravisCI image to the README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
craig-davis committed Apr 8, 2013
1 parent d9ed828 commit 8c089f1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 34 deletions.
2 changes: 2 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ module.exports = function (grunt) {
// Default task.
grunt.registerTask('default', ['jshint','qunit', 'clean', 'concat', 'cssmin', 'uglify']);

grunt.registerTask('travis', ['jshint', 'qunit']);

// Alias this to make it standard across my repos. (Jasmine v. QUnit)
grunt.registerTask('test', ['qunit']);

Expand Down
68 changes: 35 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[![Build Status](https://travis-ci.org/there4/uni-form.png?branch=make-sense)](https://travis-ci.org/there4/uni-form)

# [Uni-Form Markup](http://sprawsm.com/uni-form/): Making forms as simple as 1,2,3

- - -

Copyright (c) 2013, Dragan Babic

All JS written and maintained by Craig Davis of LearningStation

> Permission is hereby granted, free of charge, to any person
> obtaining a copy of this software and associated documentation
> files (the "Software"), to deal in the Software without
Expand All @@ -14,10 +16,10 @@ All JS written and maintained by Craig Davis of LearningStation
> copies of the Software, and to permit persons to whom the
> Software is furnished to do so, subject to the following
> conditions:
>
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Expand All @@ -27,38 +29,38 @@ All JS written and maintained by Craig Davis of LearningStation
> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> OTHER DEALINGS IN THE SOFTWARE.
## About Uni–Form
## About Uni–Form

Uni-Form is a “framework” that standardizes form markup and styles it with CSS
giving you two most widely used layout options to choose from. Anyone can get nice looking, well structured, highly customizable, accessible and usable forms. To put it simply: it makes a developer's life a lot easier.
Uni-Form is a “framework” that standardizes form markup and styles it with CSS
giving you two most widely used layout options to choose from. Anyone can get nice looking, well structured, highly customizable, accessible and usable forms. To put it simply: it makes a developer's life a lot easier.

* [Uni-Form Homepage](http://sprawsm.com/uni-form/)
* [Support at GitHub Issues](https://github.com/draganbabic/uni-form/issues)
* [GitHub repository](https://github.com/draganbabic/uni-form/)

## How to Use?
## How to Use?

First thing you need to do is to link up the necessary files:
First thing you need to do is to link up the necessary files:

1. Link to the main CSS file

<link href="path/to/file/uni-form.css" rel="stylesheet"/>

2. Link to the Uni–Form style CSS file

<link href="path/to/file/style.uni-form.css" rel="stylesheet"/>
3. Optionally you'll want to link up jQuery and Uni–Form jQuery files if you'd like Uni–Form to highlight the form rows on focus (it's a usability aid):

3. Optionally you'll want to link up jQuery and Uni–Form jQuery files if you'd like Uni–Form to highlight the form rows on focus (it's a usability aid):

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="path/to/file/uni-form.jquery.js"></script>

4. You may also want to try out the version of the Uni–Form jQuery plugin that supports client side validation, in case replace the regular plugin with this:

<script type="text/javascript" src="path/to/file/uni-form-validation.jquery.js"></script>

5. Please note that this plugin no longer automatically initializes itself. You must do this manually, by adding this snippet after you have included both jQuery and the plugin you have chosen:

<script type="text/javascript">
$(document).ready( function () {
// Initialize Uni-Form
Expand All @@ -70,27 +72,27 @@ First thing you need to do is to link up the necessary files:

- - -

Now that you're all set up, all you need to do is add form fields that are formatted with Uni–Form markup so the CSS and JavaScript will get the “hooks” they need. These chunks of code are called “units” and all available units can be found within the file called fauxform.html that is included in this package.
Now that you're all set up, all you need to do is add form fields that are formatted with Uni–Form markup so the CSS and JavaScript will get the “hooks” they need. These chunks of code are called “units” and all available units can be found within the file called fauxform.html that is included in this package.

Feel free to extend Uni–Form with units of your own and share.
Feel free to extend Uni–Form with units of your own and share.

### Uni–Form unit basics
### Uni–Form unit basics

* All units should be contained within a `.ctrl-holder`
* All fields should be marked up with a class: `.input-text` (for single line inputs), `.input-textarea` ( for multiline-inputs), `.input-select` (for select boxes), `.input-file` (for file uploads).
*
* All units should be contained within a `.ctrl-holder`
* All fields should be marked up with a class: `.input-text` (for single line inputs), `.input-textarea` ( for multiline-inputs), `.input-select` (for select boxes), `.input-file` (for file uploads).
*

## Styles
## Styles

As of v1.4 Uni–Form supports styles. These are separate CSS files that contain the presentation aspect of your form (considering that uni-form.css) contains the layout and all other necessities. Style CSS files should be used to control how your form looks, spacing, etc.
As of v1.4 Uni–Form supports styles. These are separate CSS files that contain the presentation aspect of your form (considering that uni-form.css) contains the layout and all other necessities. Style CSS files should be used to control how your form looks, spacing, etc.

Consider included style a starting point for making your own.
Consider included style a starting point for making your own.

## Options and Layout Control
## Options and Layout Control

Uni–Form by default has two form layouts: default and inline. This is controlled by adding (or removing) a CSS class `.inline-labels` to (preferably) the fieldset element.
Uni–Form by default has two form layouts: default and inline. This is controlled by adding (or removing) a CSS class `.inline-labels` to (preferably) the fieldset element.

There is another option in regards to the form field layout and it concerns what is referred to as "multifields" (grouped controls). These are fields that contain multiple inputs per unit and are usually used for checkboxes and radio buttons. Each layout supports an alternate multifield layout. This is achieved by adding (or removing) a CSS class `.uni-form-multi` to the `ul` element within `.ctrl-holder`.
There is another option in regards to the form field layout and it concerns what is referred to as "multifields" (grouped controls). These are fields that contain multiple inputs per unit and are usually used for checkboxes and radio buttons. Each layout supports an alternate multifield layout. This is achieved by adding (or removing) a CSS class `.uni-form-multi` to the `ul` element within `.ctrl-holder`.

## Events

Expand Down Expand Up @@ -133,13 +135,13 @@ Integer with value greater than or equal to 8:
* validateDate
* validateCallback

Validators what require a parameter, such as validateMinLength, take that parameter as a class name following the validator in the format of _val-{value}_.
Validators what require a parameter, such as validateMinLength, take that parameter as a class name following the validator in the format of _val-{value}_.

## We've got robust frameworks like Twitter Bootstrap, and Zurb's Foundation. Why do we need Uni-Form?
## We've got robust frameworks like Twitter Bootstrap, and Zurb's Foundation. Why do we need Uni-Form?

Because not all people want to get married to a full fledged framework for all their websites. Also many of those frameworks — and by the way I'm not denying their utility, they are great tools! — are not designed to be friendly to their environment, meaning it isn't really simple to tear out the form part of Bootstrap and implement it into your existing project.
Because not all people want to get married to a full fledged framework for all their websites. Also many of those frameworks — and by the way I'm not denying their utility, they are great tools! — are not designed to be friendly to their environment, meaning it isn't really simple to tear out the form part of Bootstrap and implement it into your existing project.

This is why Uni–Form is kept small, and why it's so plainly styled by default. We don't want to impose an aesthetic and we play nice with your existing code!
This is why Uni–Form is kept small, and why it's so plainly styled by default. We don't want to impose an aesthetic and we play nice with your existing code!

- - -

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
],
"scripts": {
"test": "grunt qunit"
"test": "grunt travis --verbose"
},
"engines": {
"node": ">= 0.8.0"
Expand Down

0 comments on commit 8c089f1

Please sign in to comment.