Commit Graph

190 Commits

Author SHA1 Message Date
Samuel Georges 7baea87068 Allow AJAX handlers to pipe objects to Laravel
Treat non scalar, non array, non RedirectResponse, non null as a Laravel compatible response
This brings AJAX handlers in line with page cycles, which do the same thing if the response is not a string. However in AJAX we should treat any scalar as a "result", not just a string. For all else (where not null), let Laravel handle it as a custom response object -- could be a model for serialization, or anything compatible.
Importantly to note when a custom redirect is sent, October's workflow is completely wiped out, so any partial updates, redirects, etc. will not occur. This is a normal and fair expectation.
Fixes #1784
2016-07-23 11:57:15 +10:00
Samuel Georges e970d80443 Align AJAX logic: merge custom response last
This is to allow overriding the standard values
Refs #2209
2016-07-16 13:11:10 +10:00
Samuel Georges 0111100990 Shared view vars now passed to content blocks and mail templates 2016-06-04 07:26:16 +10:00
Samuel Georges ebc7929ada MaintenanceSettings -> MaintenanceSetting 2016-05-27 07:49:13 +10:00
Pásztor Gábor 9f3fcf27ed Update AssetsList 2016-03-30 18:17:18 +02:00
Samuel Georges 24a620e890 Convert CmsObject and CmsCompoundObject to use Halcyon
getFullPath -> getFilePath
2016-03-12 15:32:16 +11:00
Samuel Georges c34f72b821 Decouple ComponentPartial from CmsObject 2016-03-09 21:01:57 +11:00
Samuel Georges 07132ffbd6 Returns original setter functionality
To protected things like $this->page->title = "foo";
Template -> Bracket
2016-03-05 10:49:24 +11:00
Samuel Georges 136ec18084 This allows AJAX to function on maintenance and 404 pages 2016-02-27 22:39:26 +11:00
Samuel Georges d76863a3ec Merge branch 'develop' into stable
Conflicts:
	composer.json
2016-02-27 14:55:52 +11:00
Samuel Georges b88e78ffb4 Minor 2016-02-27 14:22:56 +11:00
Breno Douglas Araujo Souza ec03b7b2f8 Access paramater in onStart method in the partial
Variables passed in parameter partils not accessed in onStart method in the partial.

With merged vars before render partial, stays like this::

```php
function onStart() {
   $this['param'];
}
```
2016-02-27 14:18:22 +11:00
Samuel Georges acfb35cbed Merge branch 'develop' into stable 2016-02-10 20:03:51 +11:00
Samuel Georges 03e7c19a5d Fixes issue where twig passed null
Minor update to dropdown docs
2016-02-09 17:58:37 +11:00
Jens Herlevsen 2350e30853 Make default 404 page use 404 status code 2016-01-24 19:04:22 +01:00
Samuel Georges af4f42e208 Add 503 header when maintenance mode enabled.
Fixes #1655
2016-01-21 20:16:53 +11:00
Daniel Müller 01c63d6e32 fixed some PHPDocs
removed my prior changes to the code behaviour

removed errorous PHPDocs

fixed some PHPDocs

removed my prior changes to the code behaviour

removed errorous PHPDocs
2015-12-12 11:34:27 +11:00
Samuel Georges 3b4ee3340e * Build 305
Fix bug when property values are array
2015-10-17 14:52:50 +11:00
Vojta Svoboda 16eb704793 Add missing PHPDoc @return tag 2015-10-17 09:17:37 +11:00
Samuel Georges 91d3d4dbde Swap FileHelper methods for new Ini parser 2015-10-03 07:30:11 +10:00
Samuel Georges 51c7878e8f Fixes rendering 2 shared component partials nukes context 2015-08-30 11:56:44 +10:00
Samuel Georges 85933facbc Stack partials, store components, unstack partials - Fixes #1373
Fixes instances where nested repeating partials are destroying the partial component stack and causing breaking errors.
Nesting example:

Partial (with components)
^-> Calls component default markup
^-> Refers to partial override (with repeating partial calls)
^-> Calls another partial (with components)
^-> Components not found (destroyed by repeating calls above)
2015-08-15 11:05:30 +10:00
Samuel Georges f9c921a797 Adds getAjaxHandler() API to controllers
Fixes bug where update process fails midway
2015-06-30 08:56:53 +10:00
Samuel Georges cd1d62d8d7 AJAX requests can only use the POST method 2015-06-20 20:18:58 +10:00
Samuel Georges 8c6a58981e Roll back the changes from #852 in the name of KISS
The page vars are just that, view variables, if used incorrectly (relaxed) they can leech out
2015-06-17 18:50:51 +10:00
Samuel Georges 9e6d0a660c Simplify visibleViewBag + visibleSettings
hidden -> is_hidden
2015-06-05 17:24:27 +10:00
Samuel Georges 84da449d05 Fixes an infinite loop 2015-06-03 17:24:22 +10:00
Samuel Georges 4d057ba266 Fixes flaw in logic
Recompile JS from #1135
2015-05-16 09:57:40 +10:00
Samuel Georges 8b3ab93786 Component variables set with `$this->page` no longer leech in to other component partials.
Fixes #852
2015-05-16 09:29:27 +10:00
Samuel Georges e675866284 The |page filter now supports passing an empty string to generate a link to the current page. 2015-05-15 20:18:40 +10:00
Samuel Georges cacec27d25 Fixes issue preventing CMS AJAX from returning arrays 2015-04-28 19:31:38 +10:00
Samuel Georges ab1272bea9 Add parameter support to {% content %} tags 2015-04-25 13:58:05 +10:00
Samuel Georges 9173e3bb9a Merge branch 'develop' into media-manager 2015-04-23 18:09:18 +10:00
Łukasz Biały e2fccafa3c allow calling of components extension ajax handlers 2015-04-22 01:22:14 +02:00
Samuel Georges 1a037bad04 Add the ability to include middleware in CMS / Backend controllers
Add init.php script to plugins
Fixes https://github.com/octobercms/library/issues/106
2015-04-21 20:07:34 +10:00
alekseybobkov 87a2ea1350 Implemented Insert Video and Insert Audio features 2015-04-14 22:44:45 -07:00
Samuel Georges a8389fb1aa Tooltip now auto initializes
initForm can now pass context
Various improvements and bug fixes
2015-03-12 20:50:16 +11:00
Samuel Georges fbe755c119 Use fallback when routes are not registered for pageUrl()
pageUrl() also no longer supports $absolute (arg 3)
2015-03-11 19:15:54 +11:00
Samuel Georges 682dbe4b95 Refactor CMS Controller, can now have ::render() called from the outside 2015-03-11 08:34:25 +11:00
Samuel Georges a3f3084924 Implement AjaxException 2015-03-03 18:41:09 +11:00
Samuel Georges 7145aac457 Prepare for CDN, config rename cms.plugins|themes|uploadsDir -> cms.plugins|themes|uploadsPath
Deprecate data-trigger-type on triggerapi
Fixes ref to Util class
2015-02-17 20:58:38 +11:00
Samuel Georges 7b52e07b65 Overhaul exceptions, rename triggerapi display -> show 2015-02-16 21:16:43 +11:00
Samuel Georges a2f2f5f87f Component->paramName() was not functioning as described
{{ :param }} returned null, should return "param"
2015-02-14 15:52:58 +11:00
Samuel Georges 6a2f64757b *** REMOVED ALL DEPRECATED CODE ** 2015-02-14 14:11:25 +11:00
Samuel Georges 0a6e14f4d2 Popup control now supports several sizes via `data-size` attribute: giant, huge, large, small, tiny.
Fixes various bugs in RC version
2015-02-11 14:36:00 +11:00
Samuel Georges 610ea932fc Fixes #856 - Implement a linking policy, defaults to relative 2015-02-09 21:52:17 +11:00
Samuel Georges 9a616b6174 Fix clear cache, update storage paths 2015-02-07 14:50:03 +11:00
Samuel Georges 4c29c5080d Clean up, get front and backends operational again 2015-02-05 19:47:20 +11:00
Samuel Georges b1b700368f Radical reorg of some classes 2015-01-28 11:49:54 +11:00
alekseybobkov e7e50bc684 Merge branch 'develop' of github.com:octobercms/october into develop 2015-01-21 21:39:03 -08:00
alekseybobkov cc23b434cb Minor improvements in the CMS API 2015-01-21 21:38:42 -08:00
Samuel Georges 9c4b2d690b Tidy up event 2015-01-21 22:03:52 +11:00
Samuel Georges f24d9ab3d3 Turns out this event was used, added it back with proper args 2015-01-21 21:41:09 +11:00
alekseybobkov d850a795fd Minor updates in the components API and Inspector 2015-01-20 19:38:02 -08:00
Samuel Georges 7b4a419241 Not sure this event is used anywhere, it has improper implementation (missing $result from passed arguments) 2015-01-18 16:00:38 +11:00
Samuel Georges 2bf0084796 * Build 180 - Use less situational event names. @ping alekseybobkov 2015-01-18 15:59:44 +11:00
Samuel Georges 9ea6940e6a Add {{ this.session }} 2015-01-05 21:08:30 +11:00
Samuel Georges b08020fd4c Update CHANGELOG 2015-01-05 15:02:22 +11:00
Samuel Georges 55a68be13b Check for the presence of validation errors in the session, and add it to the view 2015-01-05 14:57:17 +11:00
alekseybobkov 7e5ce04a79 Merge branch 'develop' into dynamic-partials 2015-01-03 16:41:25 -08:00
alekseybobkov 6440b718d8 Updates in the rich editor styling, minor improvements in the Inspector and CMS core. 2015-01-03 16:39:38 -08:00
Samuel Georges df3e66246f Fixes #839 - When rendering partials from component PHP code, be firm about the context 2015-01-03 15:15:57 +11:00
Samuel Georges fa250927d0 New events for components: runAjaxHandler + beforeRunAjaxHandler 2015-01-03 12:51:09 +11:00
Samuel Georges 03bf0c8206 These are useful helpers, make them public 2015-01-03 12:33:32 +11:00
Samuel Georges 3170dd61ea Add new methods propertyName() and paramName() to Component base class for accessing names of external properties. 2014-12-16 15:41:50 +11:00
Samuel Georges b95eb5b342 setComponentPropertiesFromParameters -> setComponentPropertiesFromParams 2014-12-16 15:18:36 +11:00
Samuel Georges d3000ca51a Unify the handling of detailed exception messages 2014-12-16 12:21:55 +11:00
Samuel Georges 9f8eb58591 Fixes bug where setting statusCode doesn't work for AJAX handlers 2014-12-08 19:01:27 +11:00
Samuel Georges 33be75af10 Config item `cms.customErrorPage` is deprecated, the setting `app.debug` should be used instead. 2014-12-06 13:22:57 +11:00
Samuel Georges 2533b4ab4d ThemeData now applies default values, Theme object will proxy to ThemeData 2014-12-05 16:45:20 +11:00
Samuel Georges bb18230f46 Refs #792 - Fixes logic error 2014-11-26 17:31:07 +11:00
Samuel Georges 49f5b23e31 Refs #792: Improve 'cms.page.beforeDisplay' event to support modifying the page, clean up events 2014-11-26 17:29:04 +11:00
Sam Georges cfaf3228d9 Fixes #9 - Adds maintenance mode setting to the CMS 2014-11-10 20:34:42 +11:00
Sam Georges 7357954c84 Proposed fix for handling defaults when parsing external properties 2014-11-04 12:33:38 +11:00
Sam Georges c83797231d Subsequent expressions are on a new line (see developer guide > PSR exceptions) 2014-11-01 12:00:45 +11:00
Sam Georges ac37d23d14 Tidy up code a lil 2014-10-30 16:54:56 +11:00
alekseybobkov 9a05a408c9 Added support for components in partials 2014-10-29 22:12:42 -07:00
Sam Georges 23f6d75416 Peer review of #679 2014-10-19 10:58:18 +11:00
Stefan Talen 509e7d2a12 Fixing issues with files in modules/cms 2014-10-18 12:03:48 +02:00
Stefan Talen 347dff7e75 Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
Conflicts:
	modules/backend/behaviors/RelationController.php
	modules/backend/classes/WidgetManager.php
	modules/cms/classes/CmsCompoundObject.php
	modules/cms/twig/Extension.php
	modules/cms/twig/PlaceholderNode.php
	modules/cms/widgets/TemplateList.php
2014-10-18 11:07:17 +02:00
alekseybobkov 219f1ff8f7 Merge branch 'develop' into static-pages-support
Conflicts:
	modules/backend/assets/less/controls/filelist.less
2014-10-16 21:03:20 -07:00
alekseybobkov 12175b29db Multiple updates in the back-end widgets and styles 2014-10-16 20:47:23 -07:00
Stefan Talen 06890d711a Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
Conflicts:
	modules/backend/behaviors/UserPreferencesModel.php
	modules/cms/classes/Controller.php
	modules/system/classes/CombineAssets.php
2014-10-16 18:44:18 +02:00
Sam Georges 57ec5c7261 Moved asset combiner to the system module 2014-10-15 08:09:46 +11:00
Stefan Talen 202e8869b1 Updating modules/cms/classes 2014-10-11 01:22:03 +02:00
alekseybobkov a534f7bc79 Fixes in the Richeditor styling. Implemented parsed content caching for content blocks. 2014-09-29 22:58:30 -07:00
alekseybobkov dcf7bb7d4f Merge branch 'develop' into misc-tmp 2014-09-27 23:29:41 -07:00
alekseybobkov 6b42055184 Fixes in the rich editor, improved the content block rendering code, minor fixes in the popover and form styling. 2014-09-27 23:28:38 -07:00
Sam Georges 73feabaf18 Fixes unit tests, also rename October\Test to October\Tester to remove conflict between real plugin of that name 2014-09-20 17:59:19 +10:00
Sam Georges 23710dbbc3 No longer lower case partial override component alias Att: @chadstrat 2014-09-19 17:23:08 +10:00
Anton Romanov 7ded6e5fed Update Controller.php 2014-09-11 12:44:52 +08:00
Sam Georges 0e3d909bd0 Add missing refs and accessors for pageObj and layoutObj 2014-09-03 08:48:15 +10:00
Sam Georges b8bf570289 Add initial version of dump() twig function / debug extension 2014-08-29 21:55:41 +10:00
Sam Georges a0bfbfc0d6 CMS AJAX handlers now have a way to invoke the page cycle if desired 2014-08-23 17:23:29 +10:00
Sam Georges 20e279bf4c Page URLs now support dots (.)
Add hook for cms.page.init
2014-08-21 19:47:29 +10:00
Sam Georges bcc48054e7 Add hook to render page 2014-08-19 12:35:33 +10:00
Samuel Georges 0980c6d997 Merge pull request #549 from Flynsarmy/twigDebugState
Set twigs debug state to the same as Octobers
2014-08-16 18:01:33 +10:00
flynsarmy 35e4f9c4fb Tailing comma 2014-08-14 21:08:15 +10:00
flynsarmy 869765af76 Set twigs debug state to the same as Octobers 2014-08-14 21:06:58 +10:00
Sam Georges 3ff31f2180 Minor 2014-08-13 21:25:57 +10:00