-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
143 additions
and
39 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 |
---|---|---|
|
@@ -27,9 +27,16 @@ after_success: | |
- echo "Deploying build $TRAVIS_BUILD_NUMBER - $TRAVIS_TAG" | ||
- gulp deploy:gh-pages | ||
deploy: | ||
provider: npm | ||
email: [email protected] | ||
- provider: releases | ||
skip_cleanup: true | ||
api_key: | ||
secure: ZZu4Tw4QOBZyN3kmK8OxVM+tMg3GbRtqoceuAlj8HmRxRL2LzQR3oQLsPvvwEBcrZH6MG2mQAEzWyjkkZPhwjvCwAhemGrlX1wSzEQQlnjsaxRXEAnsV7bHT2damtmi8JE4z8y6ldTRRsu+UNr5n7Kuo754wJGhzAqnxkL1GXyPCmT2iIHc3Xfz9I9T7HgTYhrEYVGNJO2umd8AXn/B9uSaxia6xpBRTlnueTqQ/BjVLfw9aLbezP0ZoFtecKdsW9tLPGl8wHs7Rb/iYWQu47eqkyPpHNYWjXuw5oNOxEs1QErtRkCXRNOQI9uFDzjFFIdzbPlQgHAP2B/nYAdqS2eIeo0x2MH1K/nv7I9msTf+GrOX0fYftQYf7OM1k2rlvbxYYB5K3x4M7nbbUYMlQXXXlhZ2ydKRXlR4sy0ekbqtOF1ewz5qnK2DiudvRajvqtcySz///lu2EgHW+9JUotKnqsypsl8b1xCNeeQbyLGKCPfqiX14WWISCTlkfzTL6x92NJD6tP9/NWZtQOs+VSU5bPAqY72TGJWbszb9LItfY3JDC0a0iVpugI/TLgsFd9roLVZa167kx5BaTLlZpuOoiFuKQ6eOJioJCgHxSi6EzNKMkAOMlamrIWzEx3DSEMVfu6pVm3ZqnnL+v29D3Az9Y8i5pzIcF9w484SscFYY= | ||
on: | ||
tags: true | ||
repo: sharvit/angular-bootstrap-locale-dialog | ||
- provider: npm | ||
skip_cleanup: true | ||
email: [email protected] | ||
api_key: | ||
secure: GaCzA/GIAkqyyS+mzV9DC9irWv+4PxnphKClM7jV+TpuitPOZG0rPTk5uLzd4pCcU6haQHxHkqmwAUnox+YWMR7ugPnKEp0K3Znkgxc7s6mOY2OnbfF8+8UbNHp11eNkOnSmK5zUTOY9v0GNO8RshOnrGm5JD6ITThWZGTgXHAiZ3xh2+Tcwe6MvxOZBLVRuOrfD57Eqkb7HhZERRj10VJyGXAfrgvE41Dh8sV0Xz51xzukj/tHGdYEI+z9Bmf1CcXej2Hv0r6MJqzBTrwDA09C95N752Z1sM0w0Qd8zqm5WXNMxH9WXXOarSomE/eKGkkNix8LtELepetRGWySv3MdhKx3SxVpILUuoIBVL1p/5Oo+FtQT83fVHowe9rn9oXRpzm3gIg0M/27FfAHjptKEGt3byZA47I4wIx090bj9ZysaflbdTqzXoFyquoAjrDvu13bCZL4fD8fiDgRxzBt9CSfJDdkUDTzul+a5LacQ3xmi7lPuaBWiuycfazVTV03jNsJT5SCcRFkol4jIb9CzSh+IO6tuiY8Eli5D63J9xTr6oLKBuiyxwQsWxT7PEJCuwTsyH0eCJuztHaZXz1eqmLEdKPge72qM4hIuh5JtC3978G5n1AQEYfbG1MkpA0JeMlnPT/Ma6ee3H0kFrDaQvXEM9/pu2K3b8wEN82I4= | ||
on: | ||
|
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,5 +1,70 @@ | ||
# Angular Bootstrap Locale Dialog | ||
Locale selector dialog for angular-bootstrap | ||
|
||
# Getting started | ||
Getting started here | ||
|
||
## Angular Bootstrap Locale Dialog - [AngularJS] service to open locale (language) selector dialog using [AngularUI Bootstrap] | ||
|
||
[![Build Status](https://travis-ci.org/sharvit/angular-bootstrap-locale-dialog.svg?branch=master)](https://travis-ci.org/sharvit/angular-bootstrap-locale-dialog) | ||
[![devDependency Status](https://david-dm.org/sharvit/angular-bootstrap-locale-dialog/dev-status.svg?branch=master)](https://david-dm.org/sharvit/angular-bootstrap-locale-dialog#info=devDependencies) | ||
|
||
### Quick links | ||
- [Demo](#demo) | ||
- [Installation](#installation) | ||
- [Download the build](#download-the-build) | ||
- [NPM](#install-with-npm) | ||
- [Bower](#install-with-bower) | ||
- [Manual](#manual-download) | ||
- [Adding dependency to your project](#adding-dependency-to-your-project) | ||
|
||
|
||
## Demo | ||
|
||
Do you want to see dialog in action? | ||
Visit http://sharvit.github.io/angular-bootstrap-locale-dialog/! | ||
|
||
|
||
## Installation | ||
|
||
Installation is easy as [angular-bootstrap-locale-dialog] has minimal dependencies - only the [AngularJS] and [AngularUI Bootstrap] are required. | ||
|
||
Additionally, it is recommended to use some other dependencies: | ||
- [font-awesome] - use to render extra icons for the dialog | ||
- [flag-icon-css] - use to render flag icons for each locale | ||
|
||
### Download the build | ||
|
||
#### Install with NPM | ||
|
||
```sh | ||
$ npm install angular-bootstrap-locale-dialog | ||
``` | ||
|
||
This will install [AngularJS] and [AngularUI Bootstrap] NPM packages. | ||
|
||
#### Install with Bower | ||
```sh | ||
$ bower install angular-bootstrap-locale-dialog | ||
``` | ||
|
||
This will install [AngularJS] and [AngularUI Bootstrap] bower packages. | ||
|
||
#### Manual download | ||
|
||
All the build files for all version can manually downloaded (or better yet, referencing them from the CDN): | ||
https://github.com/sharvit/angular-bootstrap-locale-dialog/tree/gh-pages | ||
|
||
### Adding dependency to your project | ||
|
||
When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the `angular-bootstrap-locale-dialog` [AngularJS] module: | ||
|
||
```js | ||
angular.module('myModule', [ | ||
'ui.bootstrap', | ||
'angular-bootstrap-locale-dialog' | ||
]); | ||
``` | ||
|
||
|
||
[angular-bootstrap-locale-dialog]: http://sharvit.github.io/angular-bootstrap-locale-dialog/ | ||
[AngularJS]: https://angularjs.org/ | ||
[AngularUI Bootstrap]: https://angular-ui.github.io/bootstrap/ | ||
[font-awesome]: https://fortawesome.github.io/Font-Awesome/ | ||
[flag-icon-css]: https://lipis.github.io/flag-icon-css/ |
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,6 +1,6 @@ | ||
{ | ||
"name": "angular-bootstrap-locale-dialog", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "Locale selector dialog for angular-bootstrap", | ||
"author": "Avi Sharvit <[email protected]> (https://sharvit.github.io)", | ||
"homepage": "https://sharvit.github.io/angular-bootstrap-locale-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
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
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
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,2 +1,55 @@ | ||
# angular-bootstrap-locale-dialog | ||
Locale selector dialog for angular-bootstrap | ||
`$localeSelectorDialog` is a service to open the locale selector dialog. | ||
It based on [AngularBS] `$uibModal` witch can create modal windows. | ||
|
||
The `$localeSelectorDialog` service has only one method: `open(options)`. | ||
|
||
### $localeSelectorDialog's open function | ||
|
||
#### options parameter | ||
|
||
* `locales` | ||
_(Type: `object`, Default: `{}`)_ - | ||
An `object` with all the supported locales of your app. | ||
The `keys` inside the object should be your locale id, for example: `en-US` | ||
The `value` for each `key` should fill the following requirements: | ||
- `name` | ||
_(Type: `string`)_ - | ||
The locale readable name, for example `English (US)` | ||
|
||
- `language` | ||
_(Type: `string`)_ - | ||
The language key, for example `en` | ||
|
||
- `country` | ||
_(Type: `string`)_ - | ||
The country key, for example `us` | ||
|
||
**Their is an example for the `locale` object at the demo.** | ||
* `templateUrl` | ||
_(Type: `string`, Default: `angular-bootstrap-locale-dialog/angular-bootstrap-locale-dialog.html`)_ - | ||
A path to a template representing modal's content. | ||
Use it if you don't want to use the default template. | ||
|
||
* `showFlags` | ||
_(Type: `boolean`, Default: `false`)_ - | ||
Set to true to show flags next to the locale name. | ||
Need to install [flag-icon-css] so it will match the css to the flag icon. | ||
|
||
* `showSearch` | ||
_(Type: `boolean`, Default: `false`)_ - | ||
Set to true to show the search field. | ||
Useful when you have a big list of locales. | ||
|
||
* `contributeUrl` | ||
_(Type: `string`, Default: `null`)_ - | ||
Have a contribute url that your users can help localize your app? | ||
Set it in order to show contribute box with that url. | ||
|
||
--- | ||
|
||
#### return | ||
|
||
The `open` method returns the `$uibModal` modal instance and use his `promise` to let you know when the dialog is getting closed and what locale did the user choose. | ||
You can get the selected locale from the `result` property of the returned `$uibModal` modal instance. | ||
See the example. | ||
[read more about the $uibModal] |