Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Remove legacy picker code #156

Open
jespirit opened this issue Feb 22, 2019 · 2 comments
Open

Remove legacy picker code #156

jespirit opened this issue Feb 22, 2019 · 2 comments

Comments

@jespirit
Copy link

The directive still references the picker object that is legacy code dating back to Bootstrap-Slider version 3.0.0

Current usage in this AngularJS directive

// check if slider jQuery plugin exists
if (typeof window.$ !== 'undefined' && typeof $.fn === 'object' && $.fn.slider) {
    // adding methods to jQuery slider plugin prototype
    $.fn.slider.constructor.prototype.disable = function () {
        this.picker.off();
    };
    $.fn.slider.constructor.prototype.enable = function () {
        this.picker.on();
    };
}

Legacy code

if (parent.hasClass('slider') === true) {
    updateSlider = true;
    this.picker = parent;
} else {
    this.picker = $('<div class="slider">'+
                        '<div class="slider-track">'+
                            '<div class="slider-selection"></div>'+
                            '<div class="slider-handle"></div>'+
                            '<div class="slider-handle"></div>'+
                        '</div>'+
                        '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'+
                    '</div>')
                        .insertBefore(this.element)
                        .append(this.element);
}
@vincentfullstack
Copy link
Collaborator

I will do it.

@seiyria
Copy link
Owner

seiyria commented Feb 22, 2019

Always happy to add maintainers over here - I don't use this anymore and will not be coming back to it. Feel free to put up a PR!

seiyria added a commit that referenced this issue Mar 26, 2019
Fix issue #156 - remove the legacy code
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants