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

Disable within disabled fieldset #772

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

AdamAxtmann
Copy link

disable ui-selects when inside a disabled fieldset

@AdamAxtmann AdamAxtmann changed the title Disable within fieldset Disable within disabled fieldset Mar 19, 2015
element.append(disabledWatch);

// Watch the disabled flag on disabledWatch, and set $select.disabled.
scope.$watch(function () { return disabledWatch.is(":disabled"); }, function (value) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.is() isn't part of angular.element so we'll be creating a dependency on jquery to make this work which we should avoid

@rwlogel
Copy link
Contributor

rwlogel commented Mar 20, 2015

What if we did this instead:

if(!!disabledWatch.is) {
  return disabledWatch.is(':disabled');  // Use jquery if available
}
return !!element[0].querySelector('.ui-select-disabled-watch:disabled');

I tested in in Chrome and Firefox and it worked fine. It doesn't seem to work in IE 11, but neither do fieldsets.

Also maybe the unit tests shouldn't use jquery if dependency on jquery should be avoided.

@AdamAxtmann
Copy link
Author

@rwlogel That seems to work. I ran the tests on my machine and updated the pull request with the change.

@AdamAxtmann
Copy link
Author

hello?

@rwlogel
Copy link
Contributor

rwlogel commented Sep 4, 2015

Any ETA for this merge?

@Sheeryada
Copy link

can anybody update on this merge ?

@wesleycho
Copy link
Contributor

This needs history cleaned up - there should be no revert commit.

@cwagner22
Copy link

+1

@katemihalikova
Copy link
Contributor

What about merging this via squash merge?

@luzrafaelf
Copy link

+1

@Jefiozie
Copy link
Contributor

Hi, I think people see what needs to be done to get this merged. Somebody maybe can make a new PR for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants