Commit graph

344 commits

Author SHA1 Message Date
fabien.leconte d5dbd44024 - Better handling of loading state 2016-09-27 11:08:29 +02:00
fabien.leconte e1151d5353 - Added a method to handle loading states
- Added a method to get ajax callback function
 - Refactoring
2016-09-27 10:11:22 +02:00
fabien.leconte e8e4e61893 Draft for ajax search 2016-09-26 18:11:32 +02:00
Josh Johnson 57586c0e3d Update read me + minor tweak 2016-09-26 14:07:09 +01:00
Josh Johnson 76df544677 Merge branch 'pr-item-select-text' of https://github.com/froggiefab/Choices into froggiefab-pr-item-select-text 2016-09-26 14:02:18 +01:00
Josh Johnson 30fd342b8c Redefine input value width on item edit 2016-09-26 13:59:02 +01:00
fabien.leconte 239ae5e869 Remove debugger; 2016-09-26 11:41:05 +02:00
fabien.leconte eaf8f7c4f6 Remove debugger; 2016-09-26 11:39:51 +02:00
fabien.leconte bebbbdac88 Add the ability to pass "Press to select" text through Javascript configuration 2016-09-26 11:36:04 +02:00
Josh Johnson 8ed3fc5277 Housekeeping 2016-09-24 11:07:48 +01:00
Josh Johnson cd0bb9d45f Removing loading text flag regardless of whether there is a placeholder set 2016-09-24 10:52:17 +01:00
Josh Johnson 53f7207257 Ability to set item by disabled choice programatically 2016-09-21 13:32:25 +01:00
Josh Johnson 2c64c84c1d Default value of false for highlight function 2016-09-20 14:17:35 +01:00
Josh Johnson 727d304f49 Run onChange callback when removing highligted items 2016-09-20 12:57:44 +01:00
Josh Johnson ef1e7d23ef Minor tweaks 2016-09-15 21:34:10 +01:00
Josh Johnson a2be7f276a Housekeeping 2016-09-15 21:29:24 +01:00
Josh Johnson c8f12bc942 Deep merge of user config 2016-09-15 21:04:15 +01:00
Josh Johnson b484b6abbd Housekeeping 2016-09-05 22:47:11 +01:00
Josh Johnson 6d1da30f60 Minor refactoring 2016-09-05 22:31:20 +01:00
Josh Johnson d40841d8dd Move to 2 space indentation + editorconfig 2016-09-05 22:04:15 +01:00
Josh Johnson 1f2d685f5e Ensure single select boxes hide after choice selection 2016-09-05 13:48:51 +01:00
Josh Johnson 4179ca038a RTL support + examples 2016-09-04 22:23:20 +01:00
Josh Johnson 349b14386e Resolve IE11 single select box issue by not opening dropdown on focus + use objects instead of switch statements 2016-09-04 15:23:19 +01:00
Josh Johnson b95f9bac5e Force jasmine version to 2.4.1 2016-09-04 14:11:29 +01:00
Josh Johnson ca86265731 Better sort handling + sort tests 2016-09-04 13:44:31 +01:00
Josh Johnson 34bce568a2 Ensure init is returned to false on destroy 2016-09-04 12:27:05 +01:00
Josh Johnson 50396b4374 Ensure this is returned when checking for init 2016-09-04 12:25:43 +01:00
Josh Johnson d60bf1c86c Resolve test errors 2016-09-04 12:10:39 +01:00
Josh Johnson aff165e4a1 Ability to disable sorting of choices/groups 2016-08-31 19:18:46 +01:00
BroiSatse 593d722843 Optional sorting 2016-08-31 14:21:06 +01:00
Josh Johnson 3cd5bf8843 Ability to override choices selector names 2016-08-26 09:02:32 +01:00
Taras Yemtsov 05f9d9f418 variable press-to-select-text
It's useful for message or language changing trough variable.
2016-08-24 14:15:12 +03:00
Taras Yemtsov 63fd4d125b added !default to variables assignment in choices.scss
This allows to change values when including with webpack from node_modules.
Similar technique is used in twitter bootstrap for example.
2016-08-24 13:53:23 +03:00
Josh Johnson 1ba92d81b8 Version 1.1.7 2016-08-23 07:24:55 +01:00
Josh Johnson fb8d5dbe47 Compile one unminified file for devs 2016-08-23 07:24:45 +01:00
Josh Johnson 7207ee543f Remove unneccessary requestAnimation frame polyfill + type check before adding first predefined select option 2016-08-23 07:14:27 +01:00
Josh Johnson 81cef3090c Ensure the state of the dropdown is checked before opening/closing 2016-08-21 20:52:40 +01:00
Josh Johnson 66feebc1ee Ensure placeholder option is respected 2016-08-20 12:39:37 +01:00
Josh Johnson 5e557e61ae Minor css tweaks to buttons + further tests 2016-08-20 11:36:03 +01:00
Josh Johnson aee1732873 Remove button styling on focus + minor tweaks 2016-08-20 11:21:31 +01:00
Josh Johnson 760fbc9f9e Working version with minor bugs 2016-08-19 13:11:15 +01:00
Josh Johnson 5f0545d604 Refactoring 2016-08-19 09:51:44 +01:00
Josh Johnson 9b6cc40f58 Housekeeping 2016-08-18 17:56:27 +01:00
Josh Johnson 5e10f0eda8 Further refactoring 2016-08-18 17:53:46 +01:00
Josh Johnson df8c1bfcb0 Easier to understand focus/blur events 2016-08-18 17:25:14 +01:00
Josh Johnson f3bfa847b1 More spacing around remove buttons 2016-08-17 14:32:02 +01:00
Josh Johnson f201b6cd09 Resolve IE11 bug with documentFragment.children 2016-08-17 14:00:30 +01:00
Josh Johnson 9f0dc2c8dc ESLint entire project 2016-08-14 22:14:37 +01:00
Josh Johnson f300c25465 Favicons + update read me 2016-08-14 17:32:08 +01:00
Josh Johnson 0d66ed2ea2 Housekeeping 2016-08-14 17:19:49 +01:00
Josh Johnson 84bec3804e _canAddItem private function to validate a user can add an item 2016-08-14 17:14:55 +01:00
Josh Johnson 9da6b57b66 Loading placeholder for multiple select when using ajax 2016-08-14 16:19:09 +01:00
Josh Johnson 5d2f4d067d Move item/button/choice actions into functions + focus input on highlight item 2016-08-14 16:10:53 +01:00
Josh Johnson 6e712476bd Ability to specify no result/no choice dropdown text 2016-08-14 15:36:11 +01:00
Josh Johnson 1cacf4798b Add version number to output 2016-08-12 15:51:31 +01:00
Josh Johnson a611117219 Housekeeping 2016-08-08 21:58:15 +01:00
Josh Johnson 4ff68b60dc Split mousedown function into onClick & onMouseDown - maintaining default select actions 2016-08-08 21:46:17 +01:00
Josh Johnson 8cfa698746 Don't append choice list if text input 2016-08-08 17:54:06 +01:00
Josh Johnson fd8b594568 Further aria roles 2016-08-08 17:45:47 +01:00
Josh Johnson 12dd5ef28d Reset search on key up if a user has deleted value 2016-08-08 14:35:14 +01:00
Josh Johnson b17c3a1289 Only search filter for non-text inputs 2016-08-08 14:05:29 +01:00
Josh Johnson 5caa5e4684 Toggable single select drop downs 2016-08-08 13:58:37 +01:00
Josh Johnson 97451458ae Close dropdown for single select boxes without search on blur 2016-08-08 13:32:29 +01:00
Josh Johnson 692788e18d Reinstate single select focus behaviour + allow remove button to focus 2016-08-08 07:40:49 +01:00
Josh Johnson f785360b50 Prevent excessive touchmove variable reassignments 2016-08-07 22:16:05 +01:00
Josh Johnson 998d95a0b2 Version 1.0.56 (Resolve touchstart/move/end bug) 2016-08-07 22:10:21 +01:00
Josh Johnson 6dfeb5a76f CSS tweaks - don't rely on 'pointer-events: none' + only flip if no space in window rather than viewport 2016-08-07 21:05:43 +01:00
Josh Johnson c36e19e20e Fix tap/scroll issues on mobile 2016-08-07 19:03:00 +01:00
Josh Johnson 9e8974adfd Further touchstart tweaks 2016-08-05 20:54:36 +01:00
Josh Johnson 44bc18803e Touchstart dropdown tweak 2016-08-05 20:37:37 +01:00
Josh Johnson e9a0f1c938 Focus input/open dropdown on touchstart for touch devices 2016-08-05 20:28:21 +01:00
Josh Johnson d1a6654623 Hide 'Press enter' dropdown if rejex test fails 2016-08-04 23:02:34 +01:00
Josh Johnson 3a01f2c346 Logo image 2016-08-04 22:25:35 +01:00
Josh Johnson ab8e65689d Press to Enter '...' rather than Add '...' 2016-08-04 22:03:16 +01:00
Josh Johnson 9d1c64171b Kill event listeners when disabling/enabling 2016-08-04 19:30:37 +01:00
Josh Johnson 322f250b7f Highlight/unhighlight callbacks 2016-08-04 13:21:24 +01:00
Josh Johnson 25bc0c87e6 Simplify _createTemplates(); 2016-08-04 07:35:52 +01:00
Josh Johnson 0834c3a7d0 Request animation frame polyfill 2016-08-03 22:00:18 +01:00
Josh Johnson 2cfb347c9f Refactoring + tests + documentation 2016-08-03 21:51:24 +01:00
Josh Johnson b947ef17a7 Find polyfill 2016-08-03 21:50:45 +01:00
Josh Johnson 1d133307bf Update config/public method tests + minor tweaks" 2016-08-03 19:56:57 +01:00
Josh Johnson 6b0ec77a30 Use pixels instead of REMs for units to stop conflicts with other stylesheets 2016-08-03 19:36:37 +01:00
Josh Johnson 5f91165d4a Custom sorting in config + resolve setChoice bug when searching 2016-08-03 14:23:23 +01:00
Josh Johnson 6d9656bed2 Turn of spellcheck, autocomplete and autocorrect from input 2016-08-03 09:23:39 +01:00
Josh Johnson b7484612eb Configurable sorting fields 2016-08-03 07:43:35 +01:00
Josh Johnson 63bef1ee0e Accessibility tweaks 2016-08-02 22:02:29 +01:00
Josh Johnson 5817ce3a0f Enable() method 2016-08-02 21:10:53 +01:00
Josh Johnson e497999841 Set choice groups via setChoice 2016-08-02 21:02:52 +01:00
Josh Johnson 0ce7c574ea Ability to toggle flipped state 2016-08-02 19:39:24 +01:00
Josh Johnson 3585fdfd6a Ensure focus is consisent across single select boxes with/without search 2016-08-02 14:40:36 +01:00
Josh Johnson 6fadbde79e Ensure enter key can also open single select dropdown 2016-08-02 13:48:17 +01:00
Josh Johnson da68a92f31 Merge branch 'pr-issue-8' of https://github.com/chymz/Choices into chymz-pr-issue-8 2016-08-02 13:32:13 +01:00
Josh Johnson 79c08ceff9 Documentation for 'getValue' method + housekeeping 2016-08-02 07:45:08 +01:00
Simon Babay 1758943d7c getValue() 2016-08-01 21:42:50 +02:00
Simon Babay 1cb566a0f7 Merge fix 2016-08-01 21:30:31 +02:00
Simon Babay 8edb33f511 Merge remote-tracking branch 'refs/remotes/jshjohnson/master'
Conflicts:
	assets/scripts/src/choices.js
2016-08-01 21:27:41 +02:00
Simon Babay c6f9d95359 (select-one) Focus and hidden dropdown with keyboard navigation 2016-08-01 21:26:31 +02:00
Josh Johnson 677d3a5582 Add jQuery example to documentation 2016-08-01 20:00:24 +01:00
Simon Babay c18b9f81e4 (select-one) fix : keep focus after item is selected 2016-08-01 16:48:40 +02:00
Josh Johnson 6a6988f71b Disable touchstart event for now - causing issue with scrolling choices 2016-08-01 14:55:04 +01:00
Simon Babay 4e2b330659 Merged branch master into pr-issue-8 2016-08-01 15:50:08 +02:00
Simon Babay 3c1d0a615b Merge master 2016-08-01 15:49:44 +02:00
Josh Johnson 431e328d3d Resolve issue with single select box toggling 2016-08-01 14:46:51 +01:00
Simon Babay 8d3648e763 (select-one) search = false, click & show dropdown give focus 2016-08-01 15:44:01 +02:00
Simon Babay 611480ab3b (select-one) search = false, on blur hide dropdown 2016-08-01 15:36:29 +02:00
Simon Babay 994e20a4c3 onKeyDown on containerOuter to enable keyboard navigation 2016-08-01 15:35:49 +02:00
Josh Johnson 780a865097 Click toggle single select boxes and use touchstart for touch devices (as well as mousedown) 2016-08-01 14:27:27 +01:00
Simon Babay 1c268a1e5d (select-one) search = false, focus and keyboard navigation 2016-08-01 15:23:34 +02:00
Josh Johnson e898309fb1 Sprucing up the demo page + scroll to top of option list on search 2016-07-31 22:48:36 +01:00
Josh Johnson 4968d73ede Set value of select input based on choice 2016-07-31 21:05:17 +01:00
Josh Johnson ca39e30684 Set choices directly via public function + callback on change 2016-07-31 20:02:46 +01:00
Josh Johnson e667b61bf2 Only trim string values 2016-07-31 18:38:00 +01:00
Josh Johnson aaf58a2108 Last child spacing 2016-07-30 16:10:35 +01:00
Josh Johnson 56d9f7d381 Add repo link to demo page 2016-07-30 16:07:03 +01:00
Josh Johnson 4d2f82ee44 Build 2016-07-30 16:03:34 +01:00
Josh Johnson 1e249295ce Ability to define choices in config + minor tweaks 2016-07-30 16:03:20 +01:00
Josh Johnson 064d12400b Ability to specify options via config 2016-07-30 15:50:29 +01:00
Josh Johnson 400a70e5cb Options array in config 2016-07-30 15:12:22 +01:00
Josh Johnson 865ba7d485 Build 2016-07-14 23:21:28 +01:00
Josh Johnson 87ca00ee66 Further single select box tests 2016-07-13 21:40:59 +01:00
Josh Johnson db5d91517a Resolve typo 2016-07-13 20:11:44 +01:00
Josh Johnson edad6e7638 Array from polyfill - may not need 2016-07-11 15:27:58 +01:00
Josh Johnson 1934c7fa50 Seperate base and choices css 2016-07-11 09:46:48 +01:00
Josh Johnson 6c753b1078 Further test coverage 2016-07-02 14:48:20 +01:00
Josh Johnson c8337f3f67 Use Phantom for testing 2016-07-02 13:50:24 +01:00
Josh Johnson 712c8cf801 Tests 2016-07-02 13:04:38 +01:00
Josh Johnson ea7a7c2b22 Render callback 2016-07-02 11:11:16 +01:00
Josh Johnson f64a6295ad Remote source country list example 2016-06-30 22:25:00 +01:00
Josh Johnson 283324c65b Add backspace to search keycode regex 2016-06-30 22:08:40 +01:00
Josh Johnson ea2669312f Only add placeholder items for single select boxes 2016-06-30 14:11:09 +01:00
Josh Johnson 6a0ed866cf Refactoring + rename selected to highlighted 2016-06-30 13:57:56 +01:00
Josh Johnson b45715c5be Sort choices by label 2016-06-29 14:47:58 +01:00
Josh Johnson a862e4a00a Resolve ajax choices not showing 2016-06-28 14:27:25 +01:00
Josh Johnson c1278e8f0d Further updating of terminology 2016-06-27 14:57:33 +01:00
Josh Johnson a2e45209a7 Terminology updates (options -> choices) && documentation 2016-06-27 14:46:12 +01:00
Josh Johnson 6a9f2cb354 Documentation + minor fixes 2016-06-21 23:06:23 +01:00
Josh Johnson c9671c4625 Build 2016-06-21 21:36:02 +01:00
Josh Johnson 278a693886 Allow chaining + private/public function differentation + set/clear value methods 2016-06-08 14:45:29 +01:00
Josh Johnson 4671d37a51 Set value/clear value methods - to be implemented 2016-06-07 14:26:52 +01:00
Josh Johnson 1a9622aaff Eliminate excessive searches 2016-06-07 14:20:37 +01:00
Josh Johnson d9cb983262 Minor improvements 2016-06-02 14:41:53 +01:00
Josh Johnson 851ddea81c Psuedo fixed search box 2016-06-02 14:37:06 +01:00
Josh Johnson 7cfe84e9d1 Ability to disable search 2016-06-01 18:56:08 +01:00
Josh Johnson f361e4b34d Ability to add both attribute values and object values + housekeeping 2016-06-01 18:45:35 +01:00
Josh Johnson 110741aed3 Search within dropdown on single search boxes 2016-05-18 22:40:32 +01:00
Josh Johnson e2ff2d8f97 Persistent selectable state 2016-05-16 14:53:56 +01:00
Josh Johnson 16668b3bd1 Reference correct file 2016-05-16 14:49:18 +01:00
Josh Johnson 002da48b33 Set width of input as you're typing + notice of unique values 2016-05-16 14:46:04 +01:00
Josh Johnson 51ee98f4c8 Minor bordering styles 2016-05-12 09:05:40 +01:00
Josh Johnson d87a3f8171 Close button styling 2016-05-11 23:17:22 +01:00