483 Commits

Author SHA1 Message Date
Samuel Georges
eaf2c9e4d0 Make the content selector more explicit (contentFrom) 2017-04-22 15:31:27 +10:00
Samuel Georges
49f5ec7557 Document and improve popover 2017-04-22 15:25:23 +10:00
Samuel Georges
4644218312 Move autocomplete to Storm UI
Rename select AJAX from "source" to "handler" (Refs #2836)
Document select handler usage
Recompile assets
2017-04-22 11:44:27 +10:00
Jim Cottrell
376a3b59e2 Add AJAX option to custom select functionality 2017-04-21 15:46:03 -06:00
José Longo
e13fba6068 add missed js language file in /modules/system/assets/js/lang 2017-04-11 14:37:22 +01:00
Samuel Georges
5daf4365ae Move the change event to the input element
This should bubble to the parent control element and persist any logic that depends on the old event
Fixes #2684
2017-04-06 08:08:50 +10:00
Samuel Georges
328a74c1ff Fixes JS error in recordfinder
It looks like the inheritance of the foundation library has caused a logic error
Refs #2756
Recompile assets
2017-04-06 07:51:04 +10:00
asbig
91c9d0cd17 Fixes icon styling in FireFox and Windows environment
line-height from .status-icon to .status-icon > i. (#2776) In /modules/system/assets/ui/less/chart.less.
2017-04-05 23:19:31 +10:00
Samuel Georges
b858ff680e Fixes required: false being treated as true
Fixes #2712
2017-04-05 22:24:00 +10:00
Samuel Georges
f8e7fa03e0 Refactor remove option implementation
Refs #2756

Add disabled support
Fixes #1199
2017-03-22 09:26:05 +11:00
Samuel Georges
e8f6cb4dc5 Merge pull request #2756 from ChVuagniaux/RecordFinder-Remove-button
RecordFinder - add a remove button
2017-03-22 09:06:27 +11:00
Samuel Georges
b6fedfb688 Specify explicit form element
This allows request elements external to the form to serialize a target form for use. An example might be a search form at the top of a page, list of results in the middle, then the pagination at the bottom. The pagination would need to target the search form with data-request-form to persist the search query value.

This should work with the JS API too, passed as an object, because $($()) is acceptable in jQuery
2017-03-19 13:54:21 +11:00
Christophe Vuagniaux
91d39d275c RecordFinder - add a remove button 2017-03-15 12:33:02 +01:00
Samuel Georges
5f91c45f79 Implement disabled support for some form widgets
Recompile assets
Fixes #2749 (Media Finder)
Fixes #2750 (File upload)
Fixes #2751 (Rich Editor)
Refs #2724
2017-03-14 13:52:47 +11:00
Luke Towers
cdc8b23fd4 Fixing same-origin AJAX requests
jQuery sends multiple values for the `X-REQUESTED-WITH` header if it has already been set, even when the value is the same. This means that same-origin requests would send `X-REQUESTED-WITH: XMLHttpRequest, XMLHttpRequest` which isn't detected as AJAX by Laravel/Symphony.

To fix this issue while retaining the crossDomain usage of framework.js, I've used `crossDomain: false` to trick jQuery into sending the header anyways on cross-origin requests. This is still changeable by the user in the `ajaxSetup` event.
2017-02-15 09:56:43 -06:00
Luke Towers
c4031de6d6 X-Requested-With to uppercase
Style change because headers are case insensitive
2017-02-14 17:53:43 -06:00
Luke Towers
88d53ec0d5 Support CORS requests via framework.js
Adds support for Cross-Origin requests made via framework.js by manually adding the `X-Requested-With: XMLHttpRequest` header required for server-side detection of AJAX requests that is sent on normal Same-Origin AJAX requests but stripped by default by jQuery when making Cross-Origin requests. Note: Request target server still needs to have `Access-Control` headers configured correctly to return a request.
2017-02-14 17:46:56 -06:00
Luke Towers
37a735c8ed Process JS API requests through the document
Process JS API requests ($.request(handler, options)) through the document object instead of a non-existent form element. The form element was originally added because the framework only supported requests made from within a form
```
[22:08:12] spunky:	The $triggerEl was implemented because previously it was just $form
[22:08:24] spunky: For data-requests without a form, these events were being ignored
[22:08:31] spunky:	So as a workaround I implemented $triggerEl
```
As this is no longer the case, any JS API requests will now be made through the document element instead to support listening to events (such as ajaxSetup) even when there is no real attached element to trigger them on.
2017-02-06 10:36:57 -06:00
Samuel Georges
d2082e0ea0 Throw an error when framework loads twice
Fixes #2379
2017-02-05 06:49:11 +11:00
Samuel Georges
562f60730f Fix bug in handleConfirmMessage override 2017-02-04 20:15:13 +11:00
Samuel Georges
6cd76e9c6d Add handleValidationMessage override function 2017-02-04 20:03:45 +11:00
Samuel Georges
88ed5c2c64 Dedicated ajaxSetup event for modifying option
Allow overriding confirm message with handleConfirmMessage function
2017-02-04 19:44:53 +11:00
Samuel Georges
7bcc31eef8 Add handleRedirectResponse override function 2017-02-04 19:14:26 +11:00
Samuel Georges
e323a1b98a Added handleFlashMessage function to framework.js
- Used for handling flash messages via JS API

Request options are now passed to ajaxBeforeSend & ajaxPromise events

Improved framework extras
- Fixes data-request-flash when used within a plain form, this code would fail because $triggerEl is set to a plain form:
`<form><button data-request="..." data-request-flash>...</button></form>`
2017-02-04 15:42:43 +11:00
Samuel Georges
08c5a27e50 Peer review 2be18764d47f78820d7f4a02ce3c0995358a16d1 2017-02-04 09:21:45 +11:00
Luke Towers
2be18764d4 Support passing objects as the loading indicator
Adds support for passing objects to be used as the loading indicator. Note: Objects must support `.show()` and `.hide()` methods.
Example:
```js
$.request('onHandler', {
    loading: $.oc.stripeLoadIndicator
});
```
2017-02-03 15:54:59 -06:00
Samuel Georges
ebed3cde5e Add afterUpdate event to match keyup
Recompile assets
Refs #2336
2017-02-03 06:50:38 +11:00
Samuel Georges
3bc87fb945 Merge pull request #2336 from rounce/master
input: on paste
2017-02-03 06:47:21 +11:00
Samuel Georges
56ad25ec6f Remove code deprecations for 2017
Recompile assets
2017-01-26 11:26:53 +11:00
Aleksey Bobkov
e35429cf28 Merge branch 'develop' of github.com:octobercms/october into develop 2017-01-12 20:13:50 -08:00
Aleksey Bobkov
6e54433bc1 Implemented page sorting by title, URL and file name in the CMS back-end. Closes #84 2017-01-12 20:13:32 -08:00
Alexander Guth
7894284409 Add afterUpdate event (#2574)
Add afterUpdate event
2017-01-13 08:02:41 +11:00
Samuel Georges
f9c659343b Further styling improvements
Refs #2575
2017-01-09 08:37:36 +11:00
Samuel Georges
62d7ff9532 Merge pull request #2575 from triasrahman/develop
Enhance usability of list pagination.
2017-01-09 07:51:01 +11:00
Pásztor Gábor
4172889c33 Fix image sizes in plugin details page. 2016-12-21 20:53:48 +01:00
Trias Nur Rahman
897c875fa9 Enhance usability of list pagination. 2016-12-21 21:50:44 +07:00
Samuel Georges
b85c4f9b7b Improve list tree styling and minor fix
Fixes bug with non standard primary key on model when using tree mode
Fixes #2532
Recompile assets
2016-12-10 13:19:32 +11:00
Samuel Georges
78c64cf4a8 Minor revision to style fix
Refs #2542
2016-12-08 01:59:19 +11:00
Pásztor Gábor
8de7891bcc Style fix on secondary tabs. 2016-12-07 15:41:59 +01:00
Samuel Georges
7f38d9b6b3 Merge pull request #2537 from gpasztor87/patch-2
Style fix in popover.
2016-12-03 08:12:24 +11:00
Pásztor Gábor
98dc55f5ab Style fix in popover. 2016-12-02 21:56:59 +01:00
Samuel Georges
6679aa6557 Increase default flash message interval
The data-validate-error container does not necessarily need to reside inside a form, but give it priority if it does.
2016-11-28 20:48:05 +11:00
Samuel Georges
07ef1bdf2b Last checkbox/radio in last form group
Makes it look good
2016-11-23 07:53:10 +11:00
kaserv
4025b4885b fix for array fields validation in client-side framework 2016-11-22 17:04:41 +04:00
Samuel Georges
b885ca0d24 Adds nowrap class & recompile less 2016-11-22 06:56:03 +11:00
Samuel Georges
0a8f169cc3 Improvements to framework extras
- Form validation
- Button loader
- Flash messages
2016-11-18 07:41:02 +11:00
Samuel Georges
10326c2d63 Framework supports passing a "flash" option
This will request the Flash contents, if they are available. It also clears the flash bag contents, which is why this is an optional feature.
Introduced "ajaxValidation" event for capturing all invalid fields at once
2016-11-18 07:39:54 +11:00
Samuel Georges
5c5ffb7950 Merge pull request #2483 from henrydinhh/master
Add Vietnamese Map
2016-11-15 07:48:21 +11:00
Samuel Georges
f4f7355bf2 A nested tab plugin's tabs are leaking in to the parent tab plugin.
Fixes #2481
2016-11-14 08:46:32 +11:00
Henry Dinh
4c34b798ce Add Vietnamese Map 2016-11-12 21:02:32 +07:00