Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

README.md 3.4 KiB

3 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # X-editable
  2. In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery.
  3. ## Live demo
  4. **http://vitalets.github.io/x-editable/demo.html**
  5. ## Installation
  6. ### Manual download
  7. Use **http://vitalets.github.io/x-editable**
  8. ### Bower
  9. ````
  10. bower install x-editable
  11. ````
  12. ### CDN
  13. ````js
  14. <link href="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.6/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet"/>
  15. <script src="//cdnjs.cloudflare.com/ajax/libs/x-editable/1.4.6/bootstrap-editable/js/bootstrap-editable.min.js"></script>
  16. ````
  17. ## Documentation
  18. **http://vitalets.github.io/x-editable**
  19. ## Reporting issues
  20. When creating issues please provide [jsFiddle](http://jsfiddle.net) example. You can easily fork one of following:
  21. 1. [jsFiddle bootstrap template](http://jsfiddle.net/xBB5x/1817)
  22. 2. [jsFiddle jqueryui template](http://jsfiddle.net/xBB5x/196)
  23. 3. [jsFiddle jquery template](http://jsfiddle.net/xBB5x/197)
  24. Your feedback is very appreciated!
  25. ## Contribution
  26. A few steps how to start contributing:
  27. 1.[Fork X-editable](https://github.com/vitalets/x-editable/fork) and pull the latest changes from <code>dev</code> branch
  28. 2.Arrange local directory structure. It should be:
  29. **x-editable**
  30. | -- **lib** (repo related to <code>dev</code> and <code>master</code> branches)
  31. | -- **gh-pages** (repo related to <code>gh-pages</code> branch for docs & demo)
  32. | -- **playground** (simple node-server and html page for testing, [playground_1.2.zip](https://github.com/downloads/vitalets/x-editable/playground_1.2.zip), **updated in 1.2.0!**)
  33. To make it easy follow this script ( _assuming you have [nodejs](http://nodejs.org) installed_ ).
  34. Please replace <code>&lt;your-github-name&gt;</code> with your name:
  35. ````
  36. mkdir x-editable
  37. cd x-editable
  38. #lib
  39. git clone https://github.com/<your-github-name>/x-editable.git -b dev lib
  40. cd lib
  41. #install gruntjs globally - building tool
  42. npm install -g grunt
  43. #install other dependencies - grunt-contrib
  44. npm install
  45. cd ..
  46. #gh-pages
  47. git clone https://github.com/<your-github-name>/x-editable.git -b gh-pages gh-pages
  48. cd gh-pages
  49. npm install
  50. cd ..
  51. #playground
  52. #download playground.zip from https://github.com/downloads/vitalets/x-editable/playground_1.2.zip
  53. unzip playground.zip
  54. cd playground
  55. npm install
  56. ````
  57. 3.That's it! You can start editing files in **lib/src** directory or create new editable input/container/whatever.
  58. To test the result go to **playground**, start server <code>node server.js</code> and open in your browser [http://localhost:3000/playground](http://localhost:3000/playground).
  59. 4.To run unit tests you can open it directly in browser **lib/test/index.html**.
  60. Or use grunt's _qunit_ task <code>grunt test</code>. For that you also need to [install PhantomJS](https://github.com/gruntjs/grunt/blob/master/docs/faq.md#why-does-grunt-complain-that-phantomjs-isnt-installed)
  61. 5.To build distributive run <code>grunt build</code> in **lib** directory. Result will appear in **lib/dist**.
  62. 6.To build docs run <code>build data-docs-dist</code> in **gh-pages** directory. Result will appear in **gh-pages/*.html**.
  63. Do not edit **index.html** and **docs.html** directly! Instead look at [Handlebars](https://github.com/wycats/handlebars.js) templates in **generator/templates**.
  64. 7.Commit changes on <code>dev</code> / <code>gh-pages-dev</code> branch and make pull request as usual.
  65. Thanks for your support!
  66. ## License
  67. Copyright (c) 2012 Vitaliy Potapov
  68. Licensed under the MIT license.