Skip to content

Commit

Permalink
Merge pull request usablica#775 from usablica/fix-dataset-mixedcase
Browse files Browse the repository at this point in the history
Changed camelcase data attributes to lowercase
  • Loading branch information
afshinm authored Dec 2, 2017
2 parents e452f37 + 860f738 commit 4b0a05d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/docs/hints/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ permalink: /hints/attributes/
You can use these HTML attributes to manage or alter hint elements.

- `data-hint`: The tooltip text of hint
- `data-hintPosition`: Optionally define the position of hint. Options: `top-middle`, `top-left`, `top-right`, `bottom-left`, `bottom-right`, `bottom-middle`, `middle-left`, `middle-right`, `middle-middle`. Default: `top-middle`
- `data-hintposition`: Optionally define the position of hint. Options: `top-middle`, `top-left`, `top-right`, `bottom-left`, `bottom-right`, `bottom-middle`, `middle-left`, `middle-right`, `middle-middle`. Default: `top-middle`
6 changes: 3 additions & 3 deletions docs/docs/intro/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ You can use these HTML attributes to manage or alter intro elements.

- `data-intro`: The tooltip text of step
- `data-step`: Optionally define the number (priority) of step
- `data-tooltipClass`: Optionally define a CSS class for tooltip
- `data-highlightClass`: Optionally append a CSS class to the helperLayer
- `data-tooltipclass`: Optionally define a CSS class for tooltip
- `data-highlightclass`: Optionally append a CSS class to the helperLayer
- `data-position`: Optionally define the position of tooltip, `top`, `left`, `right`, `bottom`, `bottom-left-aligned` (same as `bottom`), `bottom-middle-aligned`, `bottom-right-aligned` or `auto` (to detect the position of element and assign the correct position automatically). Default is `bottom`
- `data-scrollTo`: Optionally define the element to scroll to, `element` or `tooltip`. Default is `element`.
- `data-scrollto`: Optionally define the element to scroll to, `element` or `tooltip`. Default is `element`.
- `data-disable-interaction`: To disable interactions with elements inside the highlighted box, `true` or `false` (also `1` or `0`).
2 changes: 1 addition & 1 deletion example/callbacks/onbeforechange.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1 data-step="1" data-intro="This is a tooltip!">Usage of onbeforechange</h1>
<hr>

<div class="row-fluid marketing">
<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right' data-scrollTo='tooltip'>
<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right' data-scrollto='tooltip'>
<h4>Section One</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.</p>

Expand Down
2 changes: 1 addition & 1 deletion example/custom-class/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="container-narrow">

<div class="masthead">
<ul class="nav nav-pills pull-right" data-step="5" data-tooltipClass='forLastStep' data-intro="Get it, use it.">
<ul class="nav nav-pills pull-right" data-step="5" data-tooltipclass='forLastStep' data-intro="Get it, use it.">
<li><a href="https://github.com/usablica/intro.js/tags"><i class='icon-black icon-download-alt'></i> Download</a></li>
<li><a href="https://github.com/usablica/intro.js">Github</a></li>
<li><a href="https://twitter.com/usablica">@usablica</a></li>
Expand Down
2 changes: 1 addition & 1 deletion example/disable-interaction/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h1 data-step="1" data-intro="Interaction is disabled in this step" data-disable
<hr>

<div class="row-fluid marketing">
<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right' data-scrollTo='tooltip'>
<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right' data-scrollto='tooltip'>
<h4>Section One</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.</p>

Expand Down
18 changes: 9 additions & 9 deletions intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@
element: currentElement,
intro: currentElement.getAttribute('data-intro'),
step: parseInt(currentElement.getAttribute('data-step'), 10),
tooltipClass: currentElement.getAttribute('data-tooltipClass'),
highlightClass: currentElement.getAttribute('data-highlightClass'),
tooltipClass: currentElement.getAttribute('data-tooltipclass'),
highlightClass: currentElement.getAttribute('data-highlightclass'),
position: currentElement.getAttribute('data-position') || this._options.tooltipPosition,
scrollTo: currentElement.getAttribute('data-scrollTo') || this._options.scrollTo,
scrollTo: currentElement.getAttribute('data-scrollto') || this._options.scrollTo,
disableInteraction: disableInteraction
};
}
Expand Down Expand Up @@ -220,10 +220,10 @@
element: currentElement,
intro: currentElement.getAttribute('data-intro'),
step: nextStep + 1,
tooltipClass: currentElement.getAttribute('data-tooltipClass'),
highlightClass: currentElement.getAttribute('data-highlightClass'),
tooltipClass: currentElement.getAttribute('data-tooltipclass'),
highlightClass: currentElement.getAttribute('data-highlightclass'),
position: currentElement.getAttribute('data-position') || this._options.tooltipPosition,
scrollTo: currentElement.getAttribute('data-scrollTo') || this._options.scrollTo,
scrollTo: currentElement.getAttribute('data-scrollto') || this._options.scrollTo,
disableInteraction: disableInteraction
};
}
Expand Down Expand Up @@ -1707,7 +1707,7 @@
//first add intro items with data-step
_forEach(hints, function (currentElement) {
// hint animation
var hintAnimation = currentElement.getAttribute('data-hintAnimation');
var hintAnimation = currentElement.getAttribute('data-hintanimation');

if (hintAnimation) {
hintAnimation = (hintAnimation === 'true');
Expand All @@ -1718,9 +1718,9 @@
this._introItems.push({
element: currentElement,
hint: currentElement.getAttribute('data-hint'),
hintPosition: currentElement.getAttribute('data-hintPosition') || this._options.hintPosition,
hintPosition: currentElement.getAttribute('data-hintposition') || this._options.hintPosition,
hintAnimation: hintAnimation,
tooltipClass: currentElement.getAttribute('data-tooltipClass'),
tooltipClass: currentElement.getAttribute('data-tooltipclass'),
position: currentElement.getAttribute('data-position') || this._options.tooltipPosition
});
}.bind(this));
Expand Down

0 comments on commit 4b0a05d

Please sign in to comment.