-
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
0 parents
commit ba217e6
Showing
15 changed files
with
1,181 additions
and
0 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,140 @@ | ||
# Basic Usage | ||
> Modal UI, hold does not exceed the current page, you can use in order to process a simple user input and information. In some cases, by the other page so as to output in the modal, it can also handle the task of more diverse forms. | ||
## setConfig() | ||
`setConfig([options])` | ||
You define the default settings for the modal. Create a ax5.ui.modal instance, using the setConfig method in that instance, you can define a default value. | ||
|
||
```js | ||
var myModal = new ax5.ui.modal(); | ||
myModal.set_config({ | ||
width: "Number", | ||
height: "Number", | ||
position: { | ||
left: "left|center|right|Number", | ||
top: "top|middle|bottom|Number", | ||
margin: "Number" | ||
}, | ||
iframe: { | ||
method: "get|post", | ||
url: "String", | ||
param: "paramString|Object" | ||
}, | ||
closeToEsc: "Boolean", | ||
onStateChanged: "Function", | ||
animateTime: "Number", | ||
zIndex: "Number", | ||
fullScreen: "Boolean" | ||
}); | ||
``` | ||
|
||
### width | ||
|
||
Type: `Number` [default: 300] | ||
|
||
Modal width | ||
|
||
### height | ||
|
||
Type: `Number` [default: 400] | ||
|
||
Modal height | ||
|
||
### position | ||
|
||
Type: `Object` | ||
|
||
**default** | ||
```json | ||
{ | ||
left: "center", // left|center|right|Number | ||
top: "middle", // top|middle|bottom|Number | ||
margin: 10 | ||
} | ||
``` | ||
|
||
### iframe | ||
|
||
Type: `Object` | ||
|
||
**default** | ||
```json | ||
{ | ||
method: "get", // get|post | ||
url: "", // iframe src url | ||
param: "" // parameter | ||
} | ||
``` | ||
|
||
### closeToEsc | ||
|
||
Type: `Boolean` | ||
|
||
### onStateChanged | ||
|
||
Type: `Function` | ||
|
||
onStateChanged function is executed when the modal of the state is changed, | ||
this.state state value is passed to this time onStateChanged function. | ||
|
||
### animateTime | ||
|
||
Type: `Number` [default : 300] | ||
|
||
### zIndex | ||
|
||
Type: `Number` | ||
|
||
|
||
### fullScreen | ||
|
||
Type: `Boolean` | ||
|
||
```json | ||
fullScreen : true | ||
``` | ||
|
||
- - - | ||
|
||
## open() | ||
`open(Options[, callBack])` | ||
|
||
it is possible to redefine all of the options that can be used in setConfig. | ||
|
||
```js | ||
modal.open(); | ||
modal.open({ | ||
width: 500, | ||
height: 500 | ||
}); | ||
modal.open({}, function(){ | ||
console.log(this); | ||
}); | ||
``` | ||
|
||
- - - | ||
|
||
## css() | ||
`css(Object)` | ||
|
||
```js | ||
modal.css({ | ||
width: 400, | ||
height: 600 | ||
}); | ||
``` | ||
|
||
- - - | ||
|
||
## align() | ||
`align(Object)` | ||
|
||
```js | ||
modal.align({left:"center", top:"middle"}); | ||
modal.align({left:"left", top:"top", margin: 20}); | ||
``` | ||
|
||
- - - | ||
|
||
## close() | ||
`close()` |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) AXISJ | ||
|
||
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 restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
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 NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,77 @@ | ||
[![axisj-contributed](https://img.shields.io/badge/AXISJ.com-Contributed-green.svg)](https://github.com/axisj) ![](https://img.shields.io/badge/Seowoo-Mondo&Thomas-red.svg) | ||
|
||
# ax5ui-modal | ||
|
||
> *Dependencies* | ||
> * _[jQuery 1.X+](http://jquery.com/)_ | ||
> * _[ax5core](http://ax5.io/ax5core)_ | ||
> * _[bootstrap](http://getbootstrap.com/)_ | ||
|
||
### Install by bower | ||
```sh | ||
bower install ax5ui-modal | ||
``` | ||
[bower](http://bower.io/#install-bower) is web front-end package manager. | ||
using the `bower`, when you install the plug-in is installed to resolve the plug-in dependencies under the `bower_components` folder. | ||
(You can change the folder location. [.bowerrc](http://bower.io/docs/config/#bowerrc-specification) ) | ||
|
||
It is recommended that you install by using the `bower`. | ||
If you've never used a bower is, you will be able to be used for [http://bower.io/#install-bower](http://bower.io/#install-bower). | ||
|
||
### Download code | ||
- [ax5core Github releases](https://github.com/ax5ui/ax5core/releases) | ||
- [ax5ui-modal Github releases](https://github.com/ax5ui/ax5ui-modal/releases) | ||
|
||
|
||
### Insert the "ax5modal" in the HTML HEAD. | ||
|
||
Location of the folder can be determined freely in your project. But be careful not to accidentally caused | ||
exactly the path. | ||
```html | ||
<html> | ||
<head> | ||
<link rel="stylesheet" type="text/css" href="bower_components/ax5ui-modal/dist/ax5modal.css" /> | ||
<script type="text/javascript" src="bower_components/jquery/dist/jquery.min.js"></script> | ||
<script type="text/javascript" src="bower_components/ax5core/dist/ax5core.min.js"></script> | ||
<script type="text/javascript" src="bower_components/ax5ui-modal/dist/ax5modal.min.js"></script> | ||
</head> | ||
<body> | ||
.... | ||
</body> | ||
</html> | ||
``` | ||
|
||
### Basic Usages | ||
```js | ||
var modal = new ax5.ui.modal(); | ||
modal.setConfig({ | ||
onStateChanged: function(){ | ||
console.log(this); | ||
} | ||
}); | ||
modal.open(); | ||
``` | ||
|
||
- - - | ||
|
||
### Install by npm | ||
If you do not use the bower, it can be downloaded by using the npm as second best. | ||
In npm, so pile on the package manager for the front end, you need to solve the problem of plug-in dependencies. | ||
|
||
```sh | ||
npm install jquery | ||
npm install ax5core | ||
npm install ax5ui-modal | ||
``` | ||
|
||
After you download the file in npm install, you will need to copy to the location where you want to use as a resource for the project. | ||
If the inconvenience in the process that you want to copy the file and can be easily copied by using a `gulp` or `grunt`. | ||
|
||
- - - | ||
|
||
|
||
### Preview | ||
- [See Demostration](http://ax5.io/ax5ui-modal/demo/index.html) | ||
|
||
If you have any questions, please refer to the following [gitHub](https://github.com/ax5ui/ax5ui-kernel) |
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,26 @@ | ||
{ | ||
"name": "ax5ui-modal", | ||
"version": "0.5.0", | ||
"authors": [ | ||
"ThomasJ <[email protected]>" | ||
], | ||
"description": "", | ||
"main": "dist/ax5modal.js", | ||
"keywords": [ | ||
"bootstrap", | ||
"jquery", | ||
"ax5ui", | ||
"plugin", | ||
"bootstrap jQuery plugins", | ||
"modal", | ||
"ax5ui-modal", | ||
"javascript ui" | ||
], | ||
"dependencies": { | ||
"jquery": "^1.11.0", | ||
"ax5core": ">=0.4.0", | ||
"bootstrap": "^3.3.6" | ||
}, | ||
"license": "MIT", | ||
"homepage": "ax5.io" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.