-
-
Notifications
You must be signed in to change notification settings - Fork 497
Expose label on scope in template #358
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
Merged
ValentinH
merged 1 commit into
angular-slider:master
from
Liooo:expose-label-on-scope-in-template
Jul 9, 2016
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="rzslider"> | ||
<span class="rz-bar-wrapper"><span class="rz-bar"></span></span> | ||
<span class="rz-bar-wrapper"> | ||
<span class="rz-bar rz-selection" ng-style="barStyle"></span> | ||
</span> | ||
<span class="rz-pointer rz-pointer-min" ng-style=minPointerStyle></span> | ||
<span class="rz-pointer rz-pointer-max" ng-style=maxPointerStyle></span> | ||
<span class="rz-bubble rz-limit rz-floor no-label-injection">{{floorLabel}}</span> | ||
<span class="rz-bubble rz-limit rz-ceil no-label-injection">{{ceilLabel}}</span> | ||
<span class="rz-bubble no-label-injection"><clickable-label label="modelLabel" /></span> | ||
<span class="rz-bubble no-label-injection"><clickable-label label="highLabel" /></span> | ||
<span class="rz-bubble no-label-injection"> | ||
<clickable-label label="modelLabel"/> | ||
- | ||
<clickable-label label="highLabel"/> | ||
</span> | ||
<ul ng-show="showTicks" class="rz-ticks"> | ||
<li ng-repeat="t in ticks track by $index" class="rz-tick" ng-class="{'rz-selected': t.selected}" ng-style="t.style" ng-attr-uib-tooltip="{{ t.tooltip }}" ng-attr-tooltip-placement="{{t.tooltipPlacement}}" ng-attr-tooltip-append-to-body="{{ t.tooltip ? true : undefined}}"> | ||
<span ng-if="t.value != null" class="rz-tick-value" ng-attr-uib-tooltip="{{ t.valueTooltip }}" ng-attr-tooltip-placement="{{t.valueTooltipPlacement}}">{{ t.value }}</span> | ||
<span ng-if="t.legend != null" class="rz-tick-legend">{{ t.legend }}</span> | ||
</li> | ||
</ul> | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
(function() { | ||
"use strict"; | ||
|
||
describe('Custom templates - ', function() { | ||
var helper, | ||
RzSliderOptions, | ||
$rootScope, | ||
$timeout; | ||
|
||
beforeEach(module('test-helper')); | ||
|
||
beforeEach(inject(function(TestHelper, _RzSliderOptions_, _$rootScope_, _$timeout_) { | ||
helper = TestHelper; | ||
RzSliderOptions = _RzSliderOptions_; | ||
$rootScope = _$rootScope_; | ||
$timeout = _$timeout_; | ||
})); | ||
|
||
afterEach(function() { | ||
helper.clean(); | ||
}); | ||
|
||
var url = 'tests/specs/custom-tpl.html'; | ||
|
||
it('should render ceil/floor labels', function() { | ||
var sliderConf = { | ||
min: 10, | ||
max: 50, | ||
options: { | ||
floor: 0, | ||
ceil: 100, | ||
step: 10 | ||
} | ||
}; | ||
helper.createRangeSliderWithCustomTemplate(sliderConf, url); | ||
expect(helper.slider.flrLab.text()).to.equal('test- 0'); | ||
expect(helper.slider.ceilLab.text()).to.equal('test- 100'); | ||
}); | ||
|
||
it('should render min/max labels', function() { | ||
var sliderConf = { | ||
min: 10, | ||
max: 50, | ||
options: { | ||
floor: 0, | ||
ceil: 100, | ||
step: 10 | ||
} | ||
}; | ||
helper.createRangeSliderWithCustomTemplate(sliderConf, url); | ||
expect(helper.slider.minLab.text()).to.equal('test- 10'); | ||
expect(helper.slider.maxLab.text()).to.equal('test- 50'); | ||
}); | ||
|
||
it('should render min/max labels', function() { | ||
var sliderConf = { | ||
min: 50, | ||
max: 50, | ||
options: { | ||
floor: 0, | ||
ceil: 100, | ||
step: 10 | ||
} | ||
}; | ||
helper.createRangeSliderWithCustomTemplate(sliderConf, url); | ||
expect(helper.slider.cmbLab.text()).to.equal('test- 50 - 50'); | ||
}); | ||
|
||
}); | ||
}()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="rzslider"> | ||
<span class="rz-bar-wrapper"><span class="rz-bar"></span></span> | ||
<span class="rz-bar-wrapper"> | ||
<span class="rz-bar rz-selection" ng-style="barStyle"></span> | ||
</span> | ||
<span class="rz-pointer rz-pointer-min" ng-style=minPointerStyle></span> | ||
<span class="rz-pointer rz-pointer-max" ng-style=maxPointerStyle></span> | ||
<span class="rz-bubble rz-limit rz-floor no-label-injection">test- {{floorLabel}}</span> | ||
<span class="rz-bubble rz-limit rz-ceil no-label-injection">test- {{ceilLabel}}</span> | ||
<span class="rz-bubble no-label-injection">test- {{modelLabel}}</span> | ||
<span class="rz-bubble no-label-injection">test- {{highLabel}}</span> | ||
<span class="rz-bubble no-label-injection">test- {{cmbLabel}}</span> | ||
<ul ng-show="showTicks" class="rz-ticks"> | ||
<li ng-repeat="t in ticks track by $index" class="rz-tick" ng-class="{'rz-selected': t.selected}" ng-style="t.style" ng-attr-uib-tooltip="{{ t.tooltip }}" ng-attr-tooltip-placement="{{t.tooltipPlacement}}" ng-attr-tooltip-append-to-body="{{ t.tooltip ? true : undefined}}"> | ||
<span ng-if="t.value != null" class="rz-tick-value" ng-attr-uib-tooltip="{{ t.valueTooltip }}" ng-attr-tooltip-placement="{{t.valueTooltipPlacement}}">{{ t.value }}</span> | ||
<span ng-if="t.legend != null" class="rz-tick-legend">{{ t.legend }}</span> | ||
</li> | ||
</ul> | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the directiveInCustomTemplate.html template, did you forget to include it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot this branch was pullreqeusted one, it's just wip commit. Sorry for bothering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem! ;)