5439 |
daniel |
1 |
# X-editable
|
|
|
2 |
|
|
|
3 |
In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery.
|
|
|
4 |
|
|
|
5 |
## Live demo
|
|
|
6 |
**http://vitalets.github.io/x-editable/demo.html**
|
|
|
7 |
|
|
|
8 |
## Documentation
|
|
|
9 |
**http://vitalets.github.io/x-editable**
|
|
|
10 |
|
|
|
11 |
## How to get it
|
|
|
12 |
|
|
|
13 |
### Manual download
|
|
|
14 |
Use **http://vitalets.github.io/x-editable** main page.
|
|
|
15 |
|
|
|
16 |
### Bower
|
|
|
17 |
````
|
|
|
18 |
bower install x-editable
|
|
|
19 |
````
|
|
|
20 |
|
|
|
21 |
### CDN
|
|
|
22 |
Bootstrap 3 build:
|
|
|
23 |
````js
|
|
|
24 |
<link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet"/>
|
|
|
25 |
<script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
|
|
|
26 |
````
|
|
|
27 |
|
|
|
28 |
Bootstrap 2 build:
|
|
|
29 |
````js
|
|
|
30 |
<link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet"/>
|
|
|
31 |
<script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/bootstrap-editable/js/bootstrap-editable.min.js"></script>
|
|
|
32 |
````
|
|
|
33 |
|
|
|
34 |
jQuery UI build:
|
|
|
35 |
````js
|
|
|
36 |
<link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/jqueryui-editable/css/jqueryui-editable.css" rel="stylesheet"/>
|
|
|
37 |
<script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/jqueryui-editable/js/jqueryui-editable.min.js"></script>
|
|
|
38 |
````
|
|
|
39 |
|
|
|
40 |
jQuery only build:
|
|
|
41 |
````js
|
|
|
42 |
<link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/jquery-editable/css/jquery-editable.css" rel="stylesheet"/>
|
|
|
43 |
<script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.5.0/jquery-editable/js/jquery-editable-poshytip.min.js"></script>
|
|
|
44 |
````
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
## Reporting issues
|
|
|
48 |
Please **provide jsFiddle** when creating issues!
|
|
|
49 |
It's really saves much time. Use these as template:
|
|
|
50 |
1. [jsFiddle Bootstrap 3](http://jsfiddle.net/xBB5x/2265/)
|
|
|
51 |
2. [jsFiddle Bootstrap 2](http://jsfiddle.net/xBB5x/1817/)
|
|
|
52 |
3. [jsFiddle jQuery-ui](http://jsfiddle.net/xBB5x/2511/)
|
|
|
53 |
4. [jsFiddle jQuery](http://jsfiddle.net/xBB5x/197)
|
|
|
54 |
Your feedback is very appreciated!
|
|
|
55 |
|
|
|
56 |
## Contribution
|
|
|
57 |
A few steps how to start contributing.
|
|
|
58 |
Assuming you have [Node.js](http://nodejs.org/) already installed.
|
|
|
59 |
|
|
|
60 |
1.Fork *X-editable* on github and clone it to your local mashine:
|
|
|
61 |
````
|
|
|
62 |
git clone https://github.com/<your-github-name>/x-editable.git -b dev
|
|
|
63 |
````
|
|
|
64 |
2.Install *grunt-cli* globally (if not yet):
|
|
|
65 |
````
|
|
|
66 |
npm i -g grunt-cli
|
|
|
67 |
````
|
|
|
68 |
3.Install dependencies:
|
|
|
69 |
````
|
|
|
70 |
cd x-editable
|
|
|
71 |
npm i
|
|
|
72 |
````
|
|
|
73 |
4.Make your changes:
|
|
|
74 |
````
|
|
|
75 |
vim editable-form.js
|
|
|
76 |
````
|
|
|
77 |
5.Write some tests for your changes:
|
|
|
78 |
````
|
|
|
79 |
vim /test/unit/*.js
|
|
|
80 |
````
|
|
|
81 |
6.Run tests in cli:
|
|
|
82 |
````
|
|
|
83 |
grunt test
|
|
|
84 |
````
|
|
|
85 |
or directly in browser:
|
|
|
86 |
````
|
|
|
87 |
grunt server
|
|
|
88 |
````
|
|
|
89 |
and open http://127.0.0.1:8000/test
|
|
|
90 |
By default test run on bootstrap 3 popup version, but you can test any other build:
|
|
|
91 |
|
|
|
92 |
* bootstrap 3
|
|
|
93 |
* popup: http://127.0.0.1:8000/test/?f=bootstrap3&c=popup
|
|
|
94 |
* inline: http://127.0.0.1:8000/test/?f=bootstrap3&c=inline
|
|
|
95 |
* bootstrap 2
|
|
|
96 |
* popup: http://127.0.0.1:8000/test/?f=bootstrap2&c=popup
|
|
|
97 |
* inline: http://127.0.0.1:8000/test/?f=bootstrap2&c=inline
|
|
|
98 |
* jquery-ui
|
|
|
99 |
* popup: http://127.0.0.1:8000/test/?f=jqueryui&c=popup
|
|
|
100 |
* inline: http://127.0.0.1:8000/test/?f=jqueryui&c=inline
|
|
|
101 |
* jquery + poshytip
|
|
|
102 |
* popup: http://127.0.0.1:8000/test/?f=plain&c=popup
|
|
|
103 |
* inline: http://127.0.0.1:8000/test/?f=plain&c=inline
|
|
|
104 |
|
|
|
105 |
7.Commit and push back on github:
|
|
|
106 |
````
|
|
|
107 |
git add .
|
|
|
108 |
git commit -m'refactor editable form, fix #123'
|
|
|
109 |
git push origin
|
|
|
110 |
````
|
|
|
111 |
8.Make pull request on github (to `dev` branch).
|
|
|
112 |
|
|
|
113 |
Thanks for your support!
|
|
|
114 |
|
|
|
115 |
### Local build
|
|
|
116 |
To build x-editable locally please run:
|
|
|
117 |
````
|
|
|
118 |
grunt build
|
|
|
119 |
````
|
|
|
120 |
Result will appear in `dist` directory.
|
|
|
121 |
|
|
|
122 |
## License
|
|
|
123 |
Copyright (c) 2012 Vitaliy Potapov
|
|
|
124 |
Licensed under the MIT license.
|