457 Commits

Author SHA1 Message Date
Samuel Georges
24c8b4368a Various security and UI fixes
The Media Manager now uses a white list approach to blocking files, we have been advised that the blacklist approach is too fragile and we agree.
Asset List and Media Manager now use $.oc.alert when displaying errors
2017-04-09 08:00:56 +10:00
Christophe Vuagniaux
9e74fe6a53 Repeaters Firefox compatibility fixes (#2738)
* Repeaters fix Firefox collapse/expand buttons not working

* Repeaters fix Firefox open new tab when CTRL + click on Expand/Collapse buttons
2017-04-08 20:21:34 +10:00
Samuel Georges
982bc43348 Fixes recordfinder (again)
Lots of complicated stuff going on here, all elements are getting wiped out when a record is updated and the control is getting disposed at the same time. We've created a dedicated variable to store the datalocker name as a string, this represents a small memory leak but a necessary one it seems.
Fixes #2798
2017-04-07 07:48:04 +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
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
juysoft
be7490c878 Update _recordfinder_form hard coded button "Cancel" text 2017-03-18 23:54:24 +02:00
Samuel Georges
b841f9e066 {@inheritDoc} -> @inheritDoc 2017-03-16 06:26:14 +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
Szabó Gergő
8cfc10280a Update Hungarian translation 2017-03-02 13:52:01 +01:00
Samuel Georges
e9cc782120 Peer review #2723 2017-03-01 14:31:37 +11:00
Luke Towers
3aa251db4e Client side enforcement of repeater maxitems
Adds client side enforcement of the max items property of the repeater form widget
2017-02-28 20:43:08 -06:00
Luke Towers
5c56c9579d Add support for maxItems to the Repeater FormWidget
Refs: #2710
2017-02-28 20:36:32 -06:00
Samuel Georges
023f2ac0f5 Push add/remove events to JS
Refs #2710 /cc @LukeTowers
2017-03-01 12:40:15 +11:00
Samuel Georges
13471b4178 Bump froala_editor to v2.4.2 2017-02-08 19:10:24 +11:00
Szabó Gergő
ebd476e00f Update the Hungarian translate 2017-01-30 10:07:55 +01:00
Samuel Georges
e7609aa5e8 Improvements to repeater collapsing
Removed the expand all, collapse all buttons, they are a bit too bulky so have been replaced with the standard CTRL+click behavior.
Added foundation library to repeater.js
Add "titleFrom" option to specify which input to use for the collapsed title
Styling improvements

Refs #2632 + #2631
2017-01-28 11:59:28 +11:00
Christophe Vuagniaux
4dbe172a43 Repeaters add Expand Collapse buttons see #2631 2017-01-28 11:03:49 +11:00
Samuel Georges
c9bb4d396e Merge pull request #2573 from sw-double/feature/datepicker-year-range
Support yearRange property for datepicker form field
2017-01-07 12:10:49 +11:00
Konstantin L
15cea23308 Support yearRange property for datepicker field. 2016-12-20 20:21:02 +01:00
Samuel Georges
afa2c83c3c Fixes bug introduced by #2507
The many-to-many relationship types choke pretty hard on this enhancement, so only use it for the simple one-to-many/one-to-one style relations instead.
Fixes #2524
2016-12-04 10:48:22 +11:00
Luke Towers
33c2d1c3bb Respect whitespace on disabled codeeditors
This wraps the contents of a disabled codeeditor field in an `pre` element so that the browser renders it respecting the formatting / whitespace of the contents (code in this widgets case) instead of squishing it all down.
2016-11-28 15:35:00 -06:00
Samuel Georges
f1d746abab Merge pull request #2507 from oliverpool/patch-1
Use the otherKey to update a relation
2016-11-28 08:45:40 +11:00
Samuel Georges
29040b416c Allow redirect: false on importExportController
Implement getFieldName() method
2016-11-28 07:50:06 +11:00
oliverpool
01193511d5 Use the otherKey to update a relation
If the `otherKey` of the relationship was set, the widget was considering the wrong column name.
2016-11-24 13:33:20 +01:00
Samuel Georges
a2a0b207c6 Expose isCodeViewActive API function
Recompile JS
2016-11-12 14:12:48 +11:00
Szabó Gergő
d1268c9905 Translate the Page link popup (#2467)
* Translate the Page link popup

* Remove the unnecessary dot

* Update the import/export Hungarian translation

* Update the Froala Hungarian translation
2016-11-10 07:39:29 +11:00
Samuel Georges
a313d4eb5b Minor fixes 2016-11-10 06:49:45 +11:00
Samuel Georges
4aca2d40ff Remove "allowClear" and tidy up #2459
Allow clear is not necessary, equivalent of allowClear false is "placeholder" and allowClear true is "emptyOption".
2016-11-07 08:43:52 +11:00
Samuell1
b320632eb4 Fixes taglist working inside a repeater
Fixes #2254
2016-11-07 08:08:48 +11:00
Samuel Georges
7b0f33e9b3 Adds an isNested flag to Form widget
This is useful when a form renders another form inside, specifically the repeater. In these cases the model and data will diverge, and it also provides an opportunity to not apply extension logic to nested form fields.
Fixes #2257
2016-11-05 09:53:23 +11:00
Samuel Georges
88196fb660 Allow passing an explicit format to datepicker
Refs #1919
Recompile assets
2016-10-20 08:44:14 +11:00
Samuel Georges
19bab2b472 Merge pull request #2419 from LukeTowers/patch-6
Pass current model to record finder scope method
2016-10-15 10:50:54 +11:00
Samuel Georges
5eab7bc365 Handle when editor is not initialized yet
https://github.com/rainlab/pages-plugin/issues/197
2016-10-13 05:57:38 +11:00
Luke Towers
567e464550 Pass current model to record finder scope method
This improves the extensibility of the record finder form widget by passing the current model to the query scope that will be applied to the records being displayed. It allows the use of attributes of the current model in the query scope applied to the records being displayed as options to select.

In my use case, I have a main Survey model with related Field models. Field models can have parents and children for a tree structure, but I only want fields to have parents and children that are:
**a) Not the main record itself**
**and b) Members of / related to the same Survey model**

By passing the current model to my query scope, I can filter out ineligible records like so:
```
/**
 * Limit results to only records that are eligible to be parents of the provided model
 *
 * @param Query $query
 * @param Model $model The model to check for eligible parents agains
 * @return Query
 */
public function scopeEligibleParents($query, $model) {
    return $query->where('id', '!=', $model->id)
            ->where('parent_id', '!=', $model->id)
            ->where('survey_id', '=', $model->survey_id);
}
```
2016-10-11 17:15:40 -06:00
Samuel Georges
de1b85e796 Rich editor content saves when in code view mode
Refs https://github.com/rainlab/pages-plugin/issues/193
2016-10-12 06:42:36 +11:00
Samuel Georges
8c91bfe66c Update froala to latest, recompile assets 2016-10-12 06:33:28 +11:00
Samuel Georges
5746f4dec0 Fixes missing ace vendor path
Refs https://github.com/rainlab/pages-plugin/issues/193
2016-10-12 06:13:01 +11:00
Szabó Gergő
da254af4e6 Update the Hungarian translate (#2334)
* Update the Hungarian translate
2016-09-03 09:44:32 +10:00
Szabó Gergő
813fdef1d1 Translated Froala missing keys for Hungarian 2016-08-16 08:49:20 +02:00
Jérémy Gaulin
66965e7a43 Translated missing keys 2016-08-15 22:25:55 +04:00
Samuel Georges
1c3631bede Datepicker can use an expressed date for default value
@Carbon::parse was still failing, wrapped in do nothing try/catch instead
We don't seem to need to prefix time values anymore, since DateTimeHelper::makeCarbon should handle it
Fixes #2299
2016-08-13 11:29:01 +10:00
Samuel Georges
0573e0593a Search should persist across pagination
The search term is now reset only when the record finder is first opened
Fixes #2161
2016-07-30 11:46:36 +10:00
Samuel Georges
675a6a4224 Code improvements
Refs #2235
2016-07-23 14:22:36 +10:00
Samuel Georges
07b0c7d0ce Merge pull request #2235 from acasar/nested-depends-on
DependsOn in repeater
2016-07-23 13:36:24 +10:00
Samuel Georges
80fb1f42cc Further code improvements
Refs #2233
2016-07-23 13:06:38 +10:00
Samuel Georges
b934e8bd98 Merge pull request #2233 from acasar/fix-nested-repeater
Fix nested repeater sorting
2016-07-23 13:00:31 +10:00
Evgeny Razumov
37a5ae611b Bug fix in taglist widget with nameFrom option
Fixes #2231
2016-07-23 12:57:08 +10:00
Samuel Georges
ad67c9ab09 Buttons container has an inner toolbar
Consider this when adding new buttons without insertBefore/insertAfter definition
Fixes #2194
2016-07-23 09:53:23 +10:00