-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from gasolin/port_to_gaia_component
Bug 1168044 - [gaia-dialog] based on gaia-component
- Loading branch information
Showing
14 changed files
with
1,169 additions
and
1,258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"camelcase": false, | ||
"curly": true, | ||
"forin": false, | ||
"latedef": "nofunc", | ||
"newcap": false, | ||
"noarg": true, | ||
"node": true, | ||
"nonew": true, | ||
"quotmark": "single", | ||
"undef": true, | ||
"unused": "vars", | ||
"strict": true, | ||
"trailing": true, | ||
"maxlen": 80, | ||
|
||
"eqnull": true, | ||
"esnext": true, | ||
"expr": true, | ||
"globalstrict": true, | ||
|
||
"maxerr": 1000, | ||
"regexdash": true, | ||
"laxcomma": true, | ||
"proto": true, | ||
|
||
"browser": true, | ||
"devel": true, | ||
"nonstandard": true, | ||
"worker": true, | ||
|
||
"-W078": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- '0.10' | ||
|
||
install: | ||
- npm install | ||
|
||
script: | ||
- $CI_ACTION | ||
|
||
env: | ||
matrix: | ||
- CI_ACTION="npm run lint" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,129 @@ | ||
# <gaia-dialog> | ||
# <gaia-dialog> [![](https://travis-ci.org/gaia-components/gaia-dialog.svg)](https://travis-ci.org/gaia-components/gaia-dialog) [![devDependency Status](https://david-dm.org/gaia-components/gaia-dialog/dev-status.svg)](https://david-dm.org/gaia-components/gaia-dialog#info=devDependencies) | ||
|
||
gaia-dialog contains several type of dialogs, including alert, confirm, prompt, action, select, and menu. | ||
|
||
## Installation | ||
|
||
```bash | ||
$ bower install gaia-components/gaia-dialog | ||
``` | ||
|
||
## Usage | ||
## Alert Dialog | ||
|
||
Include folowing files in HTML | ||
|
||
```html | ||
<script src="bower_components/gaia-list/gaia-dialog.js"></script> | ||
<script src="bower_components/gaia-list/gaia-dialog-alert.js"></script> | ||
``` | ||
|
||
### Usage | ||
|
||
```html | ||
<gaia-dialog-alert>No SIM card is present</gaia-dialog-alert> | ||
``` | ||
|
||
## Confirm Dialog | ||
|
||
Include folowing files in HTML | ||
|
||
```html | ||
<script src="bower_components/gaia-list/gaia-dialog.js"></script> | ||
<script src="bower_components/gaia-list/gaia-dialog-confirm.js"></script> | ||
``` | ||
|
||
### Usage | ||
|
||
```html | ||
<gaia-dialog-confirm>Are you sure you want to delete this contact?</gaia-dialog-confirm> | ||
``` | ||
|
||
## Prompt Dialog | ||
|
||
Include folowing files in HTML | ||
|
||
```html | ||
<script src="bower_components/gaia-list/gaia-dialog.js"></script> | ||
<script src="bower_components/gaia-list/gaia-dialog-prompt.js"></script> | ||
``` | ||
|
||
### Usage | ||
|
||
```html | ||
<gaia-dialog-prompt>Device name</gaia-dialog-prompt> | ||
``` | ||
|
||
## Action Dialog | ||
|
||
Include folowing files in HTML | ||
|
||
```html | ||
<gaia-dialog> | ||
<h1>Application Download</h1> | ||
<p>Do you want to download and install this application?</p> | ||
<section> | ||
<button>Cancel</button> | ||
<button>Action</button> | ||
</section> | ||
</gaia-dialog> | ||
<script src="bower_components/gaia-list/gaia-dialog.js"></script> | ||
<script src="bower_components/gaia-list/gaia-dialog-action.js"></script> | ||
``` | ||
|
||
### Usage | ||
|
||
```html | ||
<gaia-dialog-action> | ||
<h1>Descriptions...</h1> | ||
<button>Action 1</button> | ||
<button>Action 2</button> | ||
</gaia-dialog-action> | ||
``` | ||
|
||
## Select Dialog | ||
|
||
Include folowing files in HTML | ||
|
||
```html | ||
<script src="bower_components/gaia-list/gaia-dialog.js"></script> | ||
<script src="bower_components/gaia-list/gaia-dialog-select.js"></script> | ||
``` | ||
|
||
### Usage | ||
|
||
```html | ||
<gaia-dialog-select> | ||
<h1>Ring tone</h1> | ||
<li>Classic prism</li> | ||
<li>Wallphone</li> | ||
</gaia-dialog-select> | ||
``` | ||
|
||
#### Multiple Select | ||
|
||
Add `multiple` attribute in `gaia-dialog-select` element to enable multiple selection. | ||
|
||
```html | ||
<gaia-dialog-select multiple> | ||
<h1>Ring tone</h1> | ||
<li>Classic prism</li> | ||
<li>Wallphone</li> | ||
</gaia-dialog-select> | ||
``` | ||
|
||
## Menu Dialog | ||
|
||
Include folowing files in HTML | ||
|
||
```html | ||
<script src="bower_components/gaia-list/gaia-dialog.js"></script> | ||
<script src="bower_components/gaia-list/gaia-dialog-menu.js"></script> | ||
``` | ||
|
||
### Usage | ||
|
||
```html | ||
<gaia-dialog-menu> | ||
<button data-icon="firefox">Open in new window</button> | ||
<button data-icon="firefox">Add to Home Screen</button> | ||
<button data-icon="firefox">Share link</button> | ||
<button data-icon="firefox">Settings</button> | ||
</gaia-dialog-menu> | ||
``` | ||
|
||
|
||
## Examples | ||
|
||
- [Example](http://gaia-components.github.io/gaia-dialog/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.