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

Empty field on blur if user is not allowed to create new items #2

Open
wants to merge 322 commits into
base: no-reset-on-blur
Choose a base branch
from

Conversation

steambros
Copy link
Member

On blur: if there's no selection, remove the value of the field if user is not allowed to create new items (law school students won't be allowed to create new orgs)

aaronroberson and others added 30 commits January 27, 2016 15:15
fix(selectize): with search disabled, selectize hides menu on click

With search disabled, selectize hides menu on click.

Fixes angular-ui#797
fix: stop <select> from closing

Stop <select> from closing when focusing it from ui-select

Closes angular-ui#1408
fix(uiSelectDirective): stop select from closing

Stop select from closing when focusing it from ui-select

Closes angular-ui#1408
test(travis): use shallow cloning to make CI build faster

Change git depth to 10 for shallow cloning
Found a spelling mistake
coordially → cordially
In Angular 1.5, transcluded content is compiled lazily.
For uiSelect that means the clone in the transclude function is not compiled and linked yet, so
uiSelect cannot detect the match and choices elements by their classnames, because they haven't been
set yet (which happens by replacing the elements with the templates).
However, the templateUrl function is executed at this point, so we can use it to add the
class names to the directive elements.

On another note, this behavior also affected versions earlier than 1.5.0-beta.2, when the template
of ui-select-match or ui-select-choices wasn't cached. In that case, the async compilation of
the template would mean also that the clone in the transclude function wasn't compiled yet, and so
the classes wouldn't be set either. This might be the cause of the error described in issue angular-ui#224.

Closes angular-ui#1422
Closes angular-ui#1356
Closes angular-ui#1325
Closes angular-ui#1239
fix: make compatible with Angular 1.5 and non-cached templates
Since a ngClass is already present in the uiSelect theme templates, we could not add any ngClass on <ui-select> without getting an JS error
Currently, adding a ngClass on <ui-select> result in:
`ng-class="{class: expression} {open: $select.open}"`
With this fix, doing the same thing result in:
`ng-class="{class: expression, open: $select.open}"`

Closes angular-ui#277
…ose11-master

# Conflicts:
#	dist/select.css
#	dist/select.js
#	dist/select.min.css
#	dist/select.min.js
Eenhance regex functions to avoid failures with the "track by" feature

Fixes angular-ui#806 and angular-ui#665
Removes the require of the CSS file in index.js so that a CSS plugin is not required for Webpack users
fix(ui-select): allow setting a ngClass on <ui-select> element

Since a ngClass is already present in the uiSelect theme templates, we could not add any ngClass on without getting an JS error
Currently, adding a ngClass on result in:
ng-class="{class: expression} {open: $select.open}"
With this fix, doing the same thing result in:
ng-class="{class: expression, open: $select.open}"

Closes angular-ui#277
Fixed error when accessing length property on undefined for propsItemNameMatches and matches

Closes angular-ui#1343
fix(uiSelectSort): fix dependency not found error
…-paste

# Conflicts:
#	src/uiSelectController.js
#	test/select.spec.js
Add paste="expression" to allow custom paste handling.

Allow pasting in tagging mode when the tagging function is not defined.

In IE use window.clipboardData so jQuery is not required.

Fixes angular-ui#910, angular-ui#704, angular-ui#789, angular-ui#848, angular-ui#429
…elect into Josh68-Josh68-IE8-fix-patch

# Conflicts:
#	src/uiSelectChoicesDirective.js
Checks for document.addEventListener support before registering ng-mouseenter and ng-click events

Closes angular-ui#158
Closes angular-ui#1003

chore(release): bump package version and update changelog
aaronroberson and others added 29 commits October 19, 2016 12:25
* Revert "Bug fix - Search input isn't blocked  (angular-ui#1822)"
Many problems with this change. Reverted it for this reason.
This reverts commit 0d81493.

* cleaning up comments
…hange

Previously when the lock expression value changes from true to false the locked value was not removed from the locked list.

Closes angular-ui#1824
Make demos actually work in many cases.  Mostly add missing
controller references and incorrect model names.

   - demo-append-to-body.html - expand width of grid
   - demo-basic.html - expand width of grid
   - demo-group-filter.html - add missing controller
   - demo-multiple-selection.html - add many missing controller refs
   - demo-object-as-source.html - fix search filters, add search highlights
   - demo-select2-with-bootstrap.html - fix incorrect model names
   - demo-selectize-with-bootstraph.html - fix incorrect model name
   - demo-tagging.html - fix incorrect model name
   - Removed search highlighting from email and age fields
   - Change the bootstrap group-by examples to group by country instead of age
   - .gitignore - addition of "*~" to ignore vim backup files
   - removed some trailing spaces
   - removed BOM from beginnings of some files
   - added a line ending to last lines if necessary
   - add "(NOT WORKING)" to the two "Tagging in single object mode"
     examples.
Previously the `ctrl.refreshing` flag may not have been reset to `false` if the async request for data failed. 

Closes angular-ui#1833
Adds `backspace-reset` attribute (default: `true`).

Currently, when you select an option and you press the backspace key, it will reset the model.

Setting `backspace-reset="false"` will disable this behavior and so avoid resetting the model.

Closes angular-ui#926 angular-ui#525
Removed "gulp changelog" as it doesn't actually commit/deploy a changelog. 

Corrected post build step to build docs.
When accessing https://angular-ui.github.io/ui-select/demo-tagging.html, the browser blocks insecure (http://) content.
…eached

Previously if a limit was defined for a multiple selection ui-select 
and that limit was reached, the onSelectCallback would still be fired 
even though the item wasn't actually selected. 

This commit moves the firing of the callback to after the select has 
actually taken place to ensure it is only fired on the correct 
occassions.

Fixes angular-ui#1794 
Closes angular-ui#1836
…ngular-ui#1850)

* fix(uiSelectChoices): prevent template element from being modified

Previously, the .ui-select-choices-row element got deleted whenever the linked scope got destroyed which prevents rendering of the options in some cases.

* fix(uiSelectChoicesDirective): use element reference instead of template element in link function

Closes angular-ui#1851
…ular-ui#1848)

* fix(uiSelectController) ActiveIndex should skip disabled choises on key up/down.

* Shortend the check for activeIndex.

* Added test for multiple and tagging/

* fix(uiSelectController) ActiveIndex should skip disabled choises on key up/down.

* Shortend the check for activeIndex.

* Added test for multiple and tagging/

* Revert "Added the changes for merge."

This reverts commit 46de564, reversing
changes made to 143c6d9.

* Some mistakes in commit. Now test should be good.

* Made the requested changes and added some extra tests.
Angular 1.6 alters the way uncaught promises are handled - errors cause promise rejection rather than outright exceptions to be thrown.  Update existing exception tests to use the exceptionHandler service instead of `.throws()`

Closes angular-ui#1877
fix(angular-ui#271) if option is set the refresh function is getting the request.
@steambros steambros changed the title No reset on blur v2 Empty field on blur if user is not allowed to create new items Feb 14, 2017
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

Successfully merging this pull request may close these issues.