Skip to content

Commit

Permalink
MINOR Updated chosen.js from 0.9.5 to 0.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Mar 5, 2012
1 parent ad5cf1e commit fe29d4e
Show file tree
Hide file tree
Showing 14 changed files with 824 additions and 617 deletions.
14 changes: 13 additions & 1 deletion admin/thirdparty/chosen/Cakefile
Expand Up @@ -77,7 +77,8 @@ task 'build', 'build Chosen from source', build = (cb) ->
write_chosen_javascript javascript.replace(/\.js$/,'.min.js'), ( write_chosen_javascript javascript.replace(/\.js$/,'.min.js'), (
uglify.gen_code uglify.ast_squeeze uglify.ast_mangle parser.parse code uglify.gen_code uglify.ast_squeeze uglify.ast_mangle parser.parse code
) )
cb() if typeof cb is 'function' package_npm () ->
cb() if typeof cb is 'function'
catch e catch e
print_error e, file_name, file_contents print_error e, file_name, file_contents


Expand All @@ -94,6 +95,17 @@ task 'watch', 'watch coffee/ for changes and build Chosen', ->
invoke 'build' invoke 'build'
)(file) )(file)


task 'package_npm', 'generate the package.json file for npm', package_npm = (cb) ->
try
package_file = 'package.json'
package = JSON.parse("#{fs.readFileSync package_file}")
package['version'] = version()
fs.writeFileSync package_file, JSON.stringify(package, null, 2)
console.log "Wrote #{package_file}"
cb() if typeof cb is 'function'
catch e
print_error e, package_file

run = (cmd, args, cb, err_cb) -> run = (cmd, args, cb, err_cb) ->
exec "#{cmd} #{args.join(' ')}", (err, stdout, stderr) -> exec "#{cmd} #{args.join(' ')}", (err, stdout, stderr) ->
if err isnt null if err isnt null
Expand Down
20 changes: 12 additions & 8 deletions admin/thirdparty/chosen/README.md
Expand Up @@ -14,17 +14,20 @@ Contributions and pull requests are very welcome. Please follow these guidelines


1. Make all changes in Coffeescript files, **not** JavaScript files. 1. Make all changes in Coffeescript files, **not** JavaScript files.
2. For feature changes, update both jQuery *and* Prototype versions 2. For feature changes, update both jQuery *and* Prototype versions
3. Use 'cake build' to generate Chosen's JavaScript file and minified version. 3. Use `npm install -d` to install the correct development dependencies.
4. Don't touch the VERSION file 4. Use `cake build` or `cake watch` to generate Chosen's JavaScript file and minified version.
5. Submit a Pull Request using GitHub. 5. Don't touch the `VERSION` file
6. Submit a Pull Request using GitHub.


### Using CoffeeScript & Cake ### Using CoffeeScript & Cake


First, make sure you have the proper CoffeeScript / Cake set-up in place. First, make sure you have the proper CoffeeScript / Cake set-up in place. We have added a package.json that makes this easy:


1. Install Coffeescript: the [CoffeeScript documentation](http://jashkenas.github.com/coffee-script/) provides easy-to-follow instructions. ```
2. Install UglifyJS: <code>npm -g install uglify-js</code> npm install -d
3. Verify that your $NODE_PATH is properly configured using <code>echo $NODE_PATH</code> ```

This will install `coffee-script` and `uglifyjs`.


Once you're configured, building the JavasScript from the command line is easy: Once you're configured, building the JavasScript from the command line is easy:


Expand All @@ -43,4 +46,5 @@ If you're interested, you can find the recipes in Cakefile.
### Notable Forks ### Notable Forks


- [Chosen for MooTools](https://github.com/julesjanssen/chosen), by Jules Janssen - [Chosen for MooTools](https://github.com/julesjanssen/chosen), by Jules Janssen
- [Chosen Drupal 7 Module](http://drupal.org/project/chosen), by Pol Dell'Aiera, Arshad Chummun, Bart Feenstra, Kálmán Hosszu, etc. - [Chosen Drupal 7 Module](http://drupal.org/project/chosen), by Pol Dell'Aiera, Arshad Chummun, Bart Feenstra, Kálmán Hosszu, etc.
- [Chosen CakePHP Plugin](https://github.com/paulredmond/chosen-cakephp), by Paul Redmond
2 changes: 1 addition & 1 deletion admin/thirdparty/chosen/VERSION
@@ -1 +1 @@
0.9.5 0.9.7
Binary file modified admin/thirdparty/chosen/chosen/chosen-sprite.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
196 changes: 107 additions & 89 deletions admin/thirdparty/chosen/chosen/chosen.css

Large diffs are not rendered by default.

0 comments on commit fe29d4e

Please sign in to comment.