Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: priceRanges example has two "View HTML" buttons #505

Closed
pixelastic opened this issue Nov 9, 2015 · 2 comments
Closed

Documentation: priceRanges example has two "View HTML" buttons #505

pixelastic opened this issue Nov 9, 2015 · 2 comments
Assignees
Milestone

Comments

@pixelastic
Copy link
Contributor

The priceRanges example has two "View HTML" buttons

image

@pixelastic pixelastic added this to the 1.0.0 milestone Nov 9, 2015
@pixelastic
Copy link
Contributor Author

Ok, I found where it come from. The javascript code checks for all pre that contains #widgetName, and it got confused by the price and priceRange widget.

var buttons = $('.code-box pre:contains("#' + id + '")').closest('.code-box').find('.btn-group');

I tried fixing it by wrapping each widget in its own container, in a way to scope the selectors, but it messed the display.
I instead tried to "fix" the selector to search for '#widget-name' (including quotes), but then it got confused by the weird #priceranges.widget-container selector of the example.
I then tried to rename the selector to #priceranges to stay consistent and I realized that I got conflicts with other elements (headings) having the same id in the page...

In the end I gave up, I'll tackle other issues first, but this one needs quite a code cleanup.

@redox
Copy link
Contributor

redox commented Nov 9, 2015

I'll give you a hand @pixelastic, I'm the guilty author of that code :p

@redox redox self-assigned this Nov 9, 2015
@redox redox added in progress and removed ready labels Nov 11, 2015
@redox redox closed this as completed in 6528f2c Nov 12, 2015
vvo pushed a commit that referenced this issue Nov 12, 2015
<a name="0.12.1"></a>
## [0.12.1](v0.12.0...v0.12.1) (2015-11-12)

### Bug Fixes

* **counts:** missing formatNumber calls ([65e5ba0](65e5ba0)), closes [#560](#560)
* **doc:** ensure selector is not conflicting ([6528f2c](6528f2c)), closes [#505](#505)
* **docs:** improved label/input hover debug ([58573db](58573db)), closes [#503](#503)
* **examples/airbnb:** Use default theme from CDN ([f379c0a](f379c0a)), closes [#522](#522)
* **examples/youtube:** use the default theme ([cf9a4b6](cf9a4b6))
* **rangeSlider:** fixed tooltip CSS & outdated default theme. ([c4be2ef](c4be2ef))
vvo pushed a commit that referenced this issue Nov 12, 2015
<a name="0.12.1"></a>
## [0.12.1](v0.12.0...v0.12.1) (2015-11-12)

### Bug Fixes

* **counts:** missing formatNumber calls ([65e5ba0](65e5ba0)), closes [#560](#560)
* **doc:** ensure selector is not conflicting ([6528f2c](6528f2c)), closes [#505](#505)
* **docs:** improved label/input hover debug ([58573db](58573db)), closes [#503](#503)
* **examples/airbnb:** Use default theme from CDN ([f379c0a](f379c0a)), closes [#522](#522)
* **examples/youtube:** use the default theme ([cf9a4b6](cf9a4b6))
* **rangeSlider:** fixed tooltip CSS & outdated default theme. ([c4be2ef](c4be2ef))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants