Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
Add the ability to set a custom value just typing into search field
Browse files Browse the repository at this point in the history
Add the ability to set a custom value just typing into search field

- The new texts accept custom values;
- Add option to active that behavior adding a class "chzn-custom-value" to select or specifying an option "allow_custom_value"= true;
- The custom values are added a new group at the end of the option list;
  • Loading branch information
andergmartins committed Aug 2, 2012
1 parent dc024d7 commit 6f1e622
Show file tree
Hide file tree
Showing 7 changed files with 291 additions and 82 deletions.
9 changes: 6 additions & 3 deletions Cakefile
Expand Up @@ -50,10 +50,13 @@ write_chosen_javascript = (filename, body, trailing='') ->
fs.writeFileSync filename, """
// Chosen, a Select Box Enhancer for jQuery and Protoype
// by Patrick Filler for Harvest, http://getharvest.com
//
//
// Version #{version()}
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com
//
// Changelog:
// [2012-08-02] - Add option to specify a custom value on the fly [Anderson Grüdtner Martins]
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `cake build`, do not edit it by hand.
Expand Down Expand Up @@ -81,7 +84,7 @@ task 'build', 'build Chosen from source', build = (cb) ->
cb() if typeof cb is 'function'
catch e
print_error e, file_name, file_contents

task 'watch', 'watch coffee/ for changes and build Chosen', ->
console.log "Watching for changes in coffee/"
for file in source_files()
Expand Down Expand Up @@ -154,7 +157,7 @@ print_error = (error, file_name, file_contents) ->
else
console.log """
Error compiling #{file_name}:
#{error.message}
"""
Expand Down

0 comments on commit 6f1e622

Please sign in to comment.