Comments (7)
If you look up 720c86b, you will see Chosen
change it's container html and use js to add/remove tag class chzn-with-drop
of container.
In my local box, I don't have your situation without ActiveAdmin. Maybe you can check if chzn-with-drop
exists?
from chosen-rails.
I didn't see that commit, I was checking against a working version to see what changed, my bad.
Having that in mind I looked at the code and the implementation was adding the chosen.css file with @import chosen
in active_admin.css.scss
so I deleted that and added the *= require chosen
but it didn't fix yet (but at least now it's added properly).
The chzn-with-drop
class is setted correctly
<div id="q_user_id_chzn" class="chzn-container chzn-container-multi chzn-with-drop chzn-container-active" style="width: 240px;" title="">
<ul class="chzn-choices">
....
Do you know if some online demo is already using this version? (so I can see a working version and really check if it is activeadmin what causes the problem)
from chosen-rails.
hmmm - I experience somewhat the same!
any leads?
from chosen-rails.
I should add that I'm on chosen-rails 0.9.15 (bundle updated today) and running Ruby 1.9.3 with Rails 3.2.8 on top
from chosen-rails.
@wdiechmann Do you add width
option in javascript, as discussed in #26 ?
from chosen-rails.
I use it just as prescribed :) Complete with
allow_single_deselect: true no_results_text: 'No results matched' width: '200px'
I can't be 100% sure - but I'am pretty sure this thing worked (in production too) back in 0.9.8'ish
ohh - and I use it with simple_form
- and I've checked the js console (no errors not even a missing resource or anything even close - what'a'you'know; gotta' get lucky once in a while ;) )
the resulting HTML looks like this:
<fieldset class="control-group select optional">
<div class="controls">
<label class="select optional " data-content="sprog" data-placement="top" for="employee_person_attributes_language_id" rel="popover">sprog</label>
<select class="select optional chzn-select chzn-done" id="employee_person_attributes_language_id" name="employee[person_attributes][language_id]" style="display: none;">
<option value="">vælg sproget</option>
<option value="13">dansk</option>
<option value="14">deutch</option>
<option value="15">italiano</option>
</select>
<div id="employee_person_attributes_language_id_chzn" class="chzn-container chzn-container-single" style="width: 250px;" title="">
<a href="javascript:void(0)" class="chzn-single" tabindex="-1">
<span>vælg sproget</span>
<div><b></b></div>
</a>
<div class="chzn-drop" style="left:-9000px;">
<div class="chzn-search">
<input type="text" autocomplete="off">
</div>
<ul class="chzn-results">
<li id="employee_person_attributes_language_id_chzn_o_0" class="active-result result-selected" style="">vælg sproget</li>
<li id="employee_person_attributes_language_id_chzn_o_1" class="active-result" style="">dansk</li>
<li id="employee_person_attributes_language_id_chzn_o_2" class="active-result" style="">deutch</li>
<li id="employee_person_attributes_language_id_chzn_o_3" class="active-result" style="">italiano</li>
</ul>
</div>
</div>
</div>
</fieldset>
from chosen-rails.
not sure whether this is any help to you @nicosantangelo - but when I compared the resources between my development and production I discovered that the chosen.css did not get compiled into the resource!
So - I went hunting and discovered that my application.css had this:
*= require_self
*= require chosen
at the top - and about half-way through this:
/*
* some comments and styles commented
*but no / at the end!
Lesson learned! Always keep comments in pairs!
Even if you're gonna comment the rest of the file
from chosen-rails.
Related Issues (20)
- DevTools failed to parse SourceMap: assets/bootstrap-chosen.css.map
- The latest update adds additional search icon when including chosen.scss HOT 1
- couldn't find file 'chosen-jquery' with type 'application/javascript'
- Sass is deprecated soon HOT 4
- SyntaxError: unexpected INDENT in vendor/assets/javascripts/chosen.proto.coffee
- Getting 'File to import not found or unreadable: chosen.' error while upgrading my app from Rails 5 to Rails 6. HOT 6
- Does not work with onchange: 'this.form.submit() HOT 3
- Populate Multi-Select on Edit HOT 2
- 40
- 20
- Sortable?
- With ActiveAdmin: couldn't find file 'chosen-jquery' with type 'application/javascript' HOT 2
- Updates gemspec to allow compass-rails 3.0.x HOT 1
- Add the missing "easy Rails" way to use Chosen HOT 1
- Remove references to compass in README HOT 1
- Update to latest chosen (1.7) HOT 5
- Multi select shouldn't close the dropdown on click
- sass-rails dependency HOT 7
- Partial string search (contains) HOT 2
- Unable to load chosen-sprite.png HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chosen-rails.