415 Commits

Author SHA1 Message Date
Luke Towers
08f9cd8448 Moved the |media twig filter from the CMS module to the System module 2017-09-27 22:15:01 -06:00
Luke Towers
de747f98b3 Deprecate the MediaLibrary & MediaLibraryItem classes in the CMS module 2017-09-27 22:12:45 -06:00
Luke Towers
5185ca075b Add the cms.object.listInTheme event (#3076)
Inspired by #3075. Provides a cms.object.listInTheme event to modify the results returned by that method.
2017-09-02 19:51:56 -06:00
Luke Towers
0b7170ac26 Add support for sorting direction to the MediaManager (#3007)
* Remove redundant returns

`$this->putSession()` in `Backend\Traits\SessionMaker` doesn't return anything, and the return values of these methods are not used; so returning the value of `putSession()` in these methods is redundant.

* Add support for sort direction to MediaLibrary

Adds support for switching the direction that item lists get sorted by the media library. This necessitates the changing of the default direction of Last Modified and Size to Ascending, previously their sorting direction was Descending while Title was sorted in Ascending order. This shouldn't change anything as the user still has the power to sort by either direction. Fully backwards compatible with any calls to `sortItemList`.

* Support sorting direction in the MediaManager widget

Adds further support for specifying a sorting direction to the MediaManager widget itself

* Display sorting direction options

* Improving styles for sorting direction

* Send sorting information to the MediaManager

* Add translations for sorting feature

* Removing strange ghost whitespace
2017-08-05 12:45:01 -06:00
Luke Towers
3b7a8f3123 Make extension comparisons case insensitive
Make extension comparisons done in `getFileType()` case insensitive to support audio/visual file types being correctly recognized when the file being uploaded has an uppercase extension as is occasionally the case. I.e. `.JPG` is the same as `.jpg`, this just tells October to consider them the same.
2017-07-31 21:03:28 -06:00
Samuel Georges
96d0535d09 Add generic onAjax handler that does nothing 2017-07-29 22:55:58 +10:00
Samuel Georges
5555b98799 Fixes deprecated Twig API
Refs https://github.com/kriswallsmith/assetic/pull/819
2017-07-26 22:16:52 +10:00
Samuel Georges
1db67af8e8 Merge remote-tracking branch 'remotes/origin/develop' into l55upgrade
Conflicts:
	modules/system/lang/en/lang.php
2017-07-11 10:48:54 +10:00
Max Schmitt
aeba740243 Add getStatusCode() in Cms\Classes\Controller (#2959)
Related: #2953. Provide a method to access the current statusCode of a CMS controller.
2017-07-08 08:53:08 -06:00
Samuel Georges
d1c160f9dc Check both instances to fix #1854
It appears there is no way around this. All directories should be lower case in October, prior to this, October wanted uppercase characters. Make up your mind guy, come on! ;-)
2017-07-01 12:26:55 +10:00
Samuel Georges
87f8f8feb1 Fixes inconsistency in component partial folder names
This is a breaking change that will require further attention - refs #1854

Eg: myComponent, the default component partial would use lower case folders
- /plugins/acme/test/components/mycomponent/default.htm

The theme component partial override would use case sensitive folders
- /themes/foobar/partials/myComponent/default.htm

This is fixed as
- /themes/foobar/partials/mycomponent/default.htm

Minor code fix to ModelBehavior class
2017-06-27 05:34:13 +10:00
Samuel Georges
3b56787a2b Use tabs cssClass definition instead of JS 2017-06-05 17:33:37 +10:00
Samuel Georges
e2781c5fdf URL -> Url 2017-06-02 23:34:50 +10:00
Samuel Georges
3be6dafa6b Fixes int folder name showing as 0
Fixes #2902
Code dusting
2017-06-02 20:16:26 +10:00
Samuel Georges
bab7976331 Merge branch 'develop' into l55upgrade 2017-05-20 09:08:09 +10:00
Samuel Georges
d9cf7381dc Implement helper method for checking ignored path
Refs #2858
2017-05-16 07:38:38 +10:00
Samuel Georges
2a0a91486c Logic error - fixes #2654 2017-05-16 07:24:07 +10:00
Samuel Georges
f05f4c21cf Merge pull request #2858 from TimFoerster/patch-1
Filter layout by ignored file names
2017-05-15 20:29:53 +10:00
Samuel Georges
5ea79489af pluck -> value
This is an odd one from Laravel, pluck is now value and lists is now pluck. We'll need a release note about this one.
2017-05-12 07:19:06 +10:00
TimFoerster
5eb278e883 Filter layout by ignored file names
The Layouts get filtered by the filesystem definition of ignored files.
#814
2017-05-04 14:53:19 +02:00
Samuel Georges
1723070444 Merge pull request #2801 from amdad/patch-1
Prevent preloading files in advance
2017-04-28 19:30:25 +10:00
Quezler
cc17b679f1 Code dusting (#2826)
Code cleaning according to PSR-2 w/ exemptions (mostly dust).
2017-04-24 21:38:19 +10:00
Samuel Georges
433cf1d504 Additional security fixes 2017-04-10 16:02:05 +10:00
amdad
5aea608e77 Prevent preloading files in advance
Files should be loaded on user click. Huge amount of data is loaded on page load, especially if many audio instances are on page. This is temporary solution. Ultimately widget should support params to match html5 audio/video tags.
2017-04-07 10:27:36 +02:00
Anže Časar
e0ce714285 Fix translatable URL caching
The same fix as https://github.com/rainlab/pages-plugin/pull/244 but for CMS pages.
2017-03-28 17:52:42 +02:00
Samuel Georges
c7eb965af8 Introduce ignorePatterns to Media Library, ignoring dot files by default
Roll back some changes from #2692
2017-03-20 17:42:17 +11:00
Samuel Georges
b447b8e056 Merge pull request #2692 from ctf0/regex-hide
use regex to hide files under media manger
2017-03-19 19:28:40 +11:00
Samuel Georges
0a981a25f7 API docs progress
Controller -> SystemController for consistency
2017-03-16 17:08:20 +11:00
Luke Towers
0df8f55450 Translate component properties' validationMessages
Fixes #2755
2017-03-15 16:56:22 -06:00
Samuel Georges
51ac144049 Moves CMS components to directory where they belong
Improve inline docs
2017-03-16 07:00:39 +11:00
Samuel Georges
b841f9e066 {@inheritDoc} -> @inheritDoc 2017-03-16 06:26:14 +11:00
Samuel Georges
e54cf7133b Improve some inline docs in preparation for API docs 2017-03-14 19:36:17 +11:00
Samuel Georges
c704ddcdf0 md5 is faster than crc32 in PHP apparently
Reference https://3v4l.org/2MAUr
2017-02-23 07:40:04 +11:00
Muah
bcd75c84c0 use regex to hide files under media manger 2017-02-20 13:54:30 +02:00
Samuel Georges
462c9cd4e8 Introduce theme logging + log settings
CmsObject changes can now be tracked (disabled by default)
Request logging is now disabled by default (security vector)
2017-02-08 05:44:04 +11:00
Pásztor Gábor
8beadb1ecc Typo 2017-02-05 21:43:14 +01:00
Samuel Georges
b2301a8056 Add new config cms.forceBytecodeInvalidation
Refs #2385
2017-01-31 07:23:58 +11:00
Samuel Georges
e2a5d54393 Revise #2426 - Rename preview to previewImage
This is an exotic feature so don't include in the form fields
2017-01-29 09:13:01 +11:00
Samuel Georges
8b2be062e5 Merge pull request #2426 from gergo85/develop
Set the path of theme preview image manually
2017-01-29 09:07:52 +11:00
Samuel Georges
60c322cf46 Add note from #2620 2017-01-21 11:30:19 +11:00
Luke Towers
8fcc80b9e1 Support nested components
This adds proper support for nested components by saving the value of the existing component context and restoring it after rendering the desired component. Fixes octobercms/october#2619
2017-01-20 14:34:48 -06:00
Samuel Georges
22bc5fce68 Bust OP cache for CMS template cache files
Fixes #2385
2017-01-20 07:20:08 +11:00
Aleksey Bobkov
5415e64cf3 Added an option to suppress folders in the MediaLibrary::listFolderContents() calls. Fixes #2016 2017-01-12 17:40:08 -08:00
Samuel Georges
0a2b343047 Simplify system events
This pipes all event calls through a new EventEmitter trait, which substitutes the October Rain event emitter trait. The view event has been moved to this trait also.
Pass some variables by reference to allow multi-extension.
Fixes #2420
2016-12-10 09:02:06 +11:00
Samuel Georges
1bdedb5584 Add renderPartial event to match renderContent
Fixes #2519
Fixes #2533
2016-12-09 08:15:32 +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
Szabó Gergő
78d7436460 Set the path of theme preview image manually 2016-10-17 13:51:09 +02:00
Szabó Gergő
d7f1d523f0 Translate some strings (#2395)
* Translate some strings
2016-10-11 08:29:26 +11:00
Samuel Georges
8075b40bf0 Now that File facade is removed, we must apply chmod manually 2016-08-27 13:38:19 +10:00
Samuel Georges
dd06cd13fa Handle cases where directory is not writable 2016-08-27 13:27:57 +10:00