Commit Graph

604 Commits

Author SHA1 Message Date
Luke Towers d164145229
Fixes #2613
This fixes #2613 by reloading the form widgets with the modified data after `model.filterFields`. **NOTE**: `$this->processExistingItems()` isn't simply just moved to `prepareVars()` because that messes up the adding new repeater item functionality by repeating the content from the fields for the last item in that group that already exists on the repeater.
2017-11-01 14:18:41 -06:00
Fl0Cri ec8dd56121 Fix richeditor popup z-index inside modal (#3194)
Fixes #3098. Related: #3111, #3113, #3114
2017-10-24 12:35:31 -06:00
Samuel Georges 669a4cee6e Merge branch 'maintenance-mediamanager' into develop 2017-10-16 17:56:34 +11:00
Samuel Georges 2a1234d21c Update MM lang refs 2017-10-16 17:52:50 +11:00
Floris Koch 161d81a192 Update _repeater_item.htm (#3149)
Allows using language files for group titles.
2017-10-03 10:15:29 -06:00
Luke Towers d14f1fec0f Moved MediaFinder formwidget from the CMS module to the System module 2017-09-27 22:30:53 -06:00
Fl0Cri d7b0e55ceb Fixes broken richeditor z-index inside and outside of a popup (#3113)
Fixes #3098, #3111. Credit to @Fl0Cri
2017-09-14 15:17:31 -06:00
Luke Towers 9565565865 Add ignoreTimezone option to datepicker field and column types.
Adds the ability to specify an `ignoreTimezone: true` option on the config for a datepicker form widget or date column type. This will ignore both October's and the backend user's timezone settings to display the date exactly as it is stored.
2017-09-10 22:39:15 -06:00
TimFoerster ead70c43f3 changing z-index of richeditor (#3099)
Changed z-index of the richeditor to prevent hidden popups.
Fixes #3098
2017-09-07 08:36:50 -06:00
Tschallacka c97d29fe4f Remove unused reference (#3045) 2017-08-17 14:00:43 -06:00
Samuel Georges b732f70c59 Adds support for single file uploads
...when used without a form tag
Refs #2857
2017-07-29 09:21:49 +10:00
Samuel Georges 28c30daa4f Use safe md parsing for mail
Ensure backward compatibility by disabling indented code blocks for mail templates
Tweak mail brand colors to match October
2017-07-22 19:01:20 +10:00
Samuel Georges 8e0279e45e Trigger color picker change event 2017-07-22 17:18:45 +10:00
Samuel Georges cd6a7c75dc Refresh colorpicker form widget
Replace colpick with spectrum plugin
Recompile client lang
2017-07-22 11:40:59 +10:00
Samuel Georges d7117f9cb2 Stetch + size improvements 2017-07-15 19:53:08 +10:00
Samuel Georges 0aa1fa96fb Fixes non-split stretch mode 2017-07-15 19:10:01 +10:00
Samuel Georges 4fd1ca824f Introduce concept of system roles
These are roles defined by a special API code, once a system role code is detected, the role becomes locked and its permissions are sourced from the AuthManager. All permissions are granted to system roles by default, unless otherwise specified. This should make it easier to create client accounts as "Publishers", hiding developer tools like the CMS and Builder plugins by default.
2017-07-13 19:29:50 +10:00
Samuel Georges 358a6337df We probably don't need to call this twice
Refs f8d9667f0e
2017-07-13 19:15:47 +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
Luke Towers 950c341c49 Prevent privilege escalation from crafted requests
Follow up to 2046efb51d.
The previous commit prevented users from visually managing permissions that they themselves didn't have access to, this follow-up commit enforces that limitation serverside to defend against crafted privilege escalation attacks by authenticated users.
2017-07-10 18:36:43 -06:00
Luke Towers 2046efb51d Prevent users from granting permissions they don't have
Prevents users from granting permissions that they themselves do not have. Fixes #1673, and is a partial solution to #2367. However, this still does not address the issue of being able to assign / manage groups that have permissions that the user doing the management does not themselves have. That will have to be addressed separately as a part of #2367.
2017-07-09 20:24:17 -06:00
Luke Towers 056a37fce4 Fix repeater title generation in readOnly mode
Refs: 2a16847724
2017-07-09 13:06:23 -06:00
Luke Towers 9ff11da179 Remove unused descriptionFrom property
Removes unused descriptionFrom property that was probably copy-pasta remnants from the RecordFinder formwidget when nameFrom was implemented in 6aaf4cce43. Also removed it from the docs here: 6164e4a9e7
2017-07-09 09:48:17 -06:00
Luke Towers 2a16847724 Add support for readOnly Repeater Widgets (#2960)
* Add support for previewMode in Repeater FormWidget
Refs: #2724, 5f91c45f79
* Add support for previewMode in Repeater FormWidget

Refs: #2724, 5f91c45f79

* Add support for previewMode in Repeater FormWidget

Refs: #2724, 5f91c45f79

* Add support for previewMode in Repeater FormWidget

Refs: #2724, 5f91c45f79
2017-07-08 13:34:04 -06:00
Samuel Georges 56eb61183b Minor UI improvements to recordfinder
Allow span elements to use oc-loading
2017-07-06 19:11:57 +10:00
Luke Towers 1a5e86e38d Improve support for non-id primary keys
Related: #2760
2017-07-04 18:55:42 -06:00
Hartmut Glücker dfcf324d00 Support changing the global default for richeditor buttons (#2937)
Added support for changing the global default for richeditor buttons. 
Addresses: #2677, #2384, #2078, #1743 and rainlab/pages-plugin#188
2017-07-04 08:10:58 -06:00
Tobias Kündig 4f97d07962 Added firstDay option to datepicker form widget (#2940)
Documented here: https://github.com/octobercms/docs/pull/243
2017-06-28 07:23:59 -06:00
Samuel Georges 600035cd49 Tszuj up some styling
Add active states and color correct treeview
Adjust proportions of repeater add button
2017-06-24 17:18:08 +10:00
Samuel Georges 08a710eb9a Update ace editor 1.2.3 to 1.2.6
Recompile assets
Refs #2570 (without the spam)
2017-06-24 09:01:07 +10:00
Luke Towers f8d9667f0e Support field being disabled in filterFields()
Completes support for the underlying field object being disabled in model's filterFields() method by rechecking status immediately before rendering.
2017-06-22 09:45:29 -06:00
Samuel Georges e2781c5fdf URL -> Url 2017-06-02 23:34:50 +10:00
Samuel Georges f0df1f458b Merge branch 'develop' into l55upgrade
Conflicts:
	modules/system/assets/ui/storm.css
2017-05-27 22:24:57 +10:00
Samuel Georges aa393dc54b Backend style improvements
This should make Windows PCs look a little nicer, albeit inconsistent with others (Sergoe UI is unique). If it's good enough for GitHub, then it's good enough for October.
All text shadows have been stripped, along with some box shading. They were barely noticeable and should speed up the UI.
2017-05-20 17:37:58 +10:00
Priit Perna 8ee7d3f5ae Added scope support to the Relation formwidget 2017-05-17 13:00:40 +03:00
Luke Towers 95cd3f7077 Translate group name and description
Refs: https://github.com/octobercms/october/issues/2772#issuecomment-301125572
2017-05-12 11:22:13 -06:00
Samuel Georges 6a6378a24d Strip indexes from repeater data sets 2017-04-26 08:10:45 +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 cb56c61e36 Retain true backward compatibility with early repeater 2017-04-24 19:06:59 +10:00
Samuel Georges d7ef8cdcf8 Minor logic change 2017-04-24 13:24:57 +10:00
Samuel Georges 6825ce12c8 Allow external group field definition - Refs #2772 2017-04-24 13:24:57 +10:00
Samuel Georges c52f91a6d2 Collapsed items should default to or include the group name - Refs #2772 2017-04-24 13:24:56 +10:00
Samuel Georges dac744dbc6 Scrollpad not rendering on open - Refs #2772 2017-04-24 13:24:56 +10:00
Samuel Georges acfe619cb9 Add button lacks loading state - Refs #2772 2017-04-24 13:24:55 +10:00
Samuel Georges ac7da4634a Implement working prototype of a grouped repeater
Refs #2772
2017-04-22 22:01:17 +10:00
Samuel Georges 83e80745b3 Fixes issue with index incrementation 2017-04-22 21:40:35 +10:00
Samuel Georges 46fcdbc636 Progress on repeater field groups
Refs #2772
2017-04-22 21:04:37 +10:00
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
Anže Časar 79bb4c2035 Nested DependsOn 2016-07-22 00:38:32 +02:00
Anže Časar 453096bb27 Fix nested repeater 2016-07-21 18:55:03 +02:00
Aleksey Bobkov 53b8df0721 Force rich editor to synchronize when a form is saved. 2016-07-06 18:27:27 -07:00
Samuel Georges fe3b61f802 Merge pull request #2157 from prasanth-darsan/develop
error on saving attachment config when in pivot form of a relation
2016-07-07 07:59:42 +10:00
Samuel Georges 68923d406b Update Froala to latest (2.3.3)
Recompile assets
2016-07-05 20:08:44 +10:00
Samuel Georges 4ca30f9888 Beautify saved content 2016-07-05 19:58:51 +10:00
Samuel Georges 43eb8c4946 Logic error. Fixes #2154 2016-07-01 18:56:58 +10:00
Prasanth Darsan 6cc50b8ca8 Fixed error on saving attachment config when its put on pivot form of a relation 2016-06-28 23:17:27 +05:30
Samuel Georges 7d171f4453 Merge pull request #2105 from triasrahman/develop
Fix fileupload image css on sidebar
2016-06-11 15:34:01 +10:00
Samuel Georges 927250e9c9 Allow customization of default rich editor buttons
Fixes #2078
Recompile assets
2016-06-11 13:51:34 +10:00
Samuel Georges 536a4b382c RecordFinder can specify number of records per page
Fixes #2082
Fix spacing on composer.json
2016-06-11 13:37:36 +10:00
Trias Nur Rahman b2df9d63ec Fix fileupload image css on sidebar 2016-06-07 22:44:35 +07:00
Samuel Georges bb5a44ced5 Add get/set content to code editor plugin
Fixes plain text / snippet editor issue
Fixes #2059
2016-05-29 08:54:22 +10:00
Samuel Georges 8a7f762c71 Restyle system status report widget
Fixes styling on popover-danger and popover-head with customization
2016-05-28 06:49:59 +10:00
Samuel Georges e9be15cc15 Preferences -> Preference
Rename brandsetting config folder
2016-05-27 07:46:50 +10:00
Samuel Georges 47d0a2677c UI Blocks can now be moved by dragging
Page links handler is now strict definition
Use more explicit naming for config_dashboard config
We have to use the codeeditor for mail templates for now, since froala is not playing nicely with twig
2016-05-27 05:21:50 +10:00
Samuel Georges ca8d8e4b39 Streamline event names and add get/set functions 2016-05-26 06:25:02 +10:00
Samuel Georges 30f7c03718 Fixes colorpicker when used inside a popup
Fixes #1145
Refs #1021
2016-05-25 06:37:03 +10:00
Samuel Georges 6b8f7b0dd9 Update MD editor to use new toolbar 2016-05-25 05:19:24 +10:00
Samuel Georges 4c50c23654 Refit the Predefined Page Links implementation
Refs #2005
2016-05-25 05:19:12 +10:00
Samuel Georges ef290df3af Custom CSS classes for styling elements
Define allowed tags, allowed empty, do not wrap, remove tags
Refs #2005
2016-05-24 05:33:32 +10:00
Samuel Georges e3f777b192 Native Rich Editor messages should remain multi-lingual
Refs #2005
2016-05-22 07:41:38 +10:00
Samuel Georges af19341c01 "Quick Uploads" are dumped in a special folder via media manager
Refs #2005
Remove the active state on media manager table data for consistency with other view modes
2016-05-22 07:24:04 +10:00
Samuel Georges bcacc326bd Update Froala to latest 2016-05-22 05:21:19 +10:00
Samuel Georges a33cf2ac8c Unify z-index's across all controls
Refs #1021
2016-05-21 15:17:14 +10:00
Samuel Georges aae177e7bc Create "windex" z-index window manager
Convert all storm UI z-indexes to variables
Refs #1021
2016-05-21 14:42:10 +10:00
Samuel Georges f936ff64f8 Continuity styling changes
Remove default predefined links from rich editor
2016-05-21 13:51:11 +10:00
Samuel Georges 79446aa464 Refit the media manager implementation
Refs #2005
2016-05-21 12:38:04 +10:00
Samuel Georges 67e05bc976 Remove redactor - Refs #2005 2016-05-21 08:16:40 +10:00
Samuel Georges 115fc0c1ef Refit the Block UI logic
Previously contained in richeditor (this is a bit messy, rich editor should be generic), the block UI logic has been moved to its own "figures" plugin
2016-05-21 06:58:34 +10:00
Samuel Georges 85decc4086 Style tweaks 2016-05-21 06:57:12 +10:00
Samuel Georges 9ad20d3b8d Continuity styling changes
Remove active states from inspector
Make the close (X) icons larger on CMS tabs and Components
2016-05-20 08:33:23 +10:00
Samuel Georges 066b918d39 Various styling changes
Removed the harsh title on popups
Anything considered an "overlay" now uses a box shading effect
The account menu now uses lighter shading
Introduced highlight states, allowing hover + active to behave independently
2016-05-20 06:33:16 +10:00
Samuel Georges d02a922868 Add custom toolbar button support
Style toolbar
Refs #2005
2016-05-20 04:35:40 +10:00
Samuel Georges a6ac4f50ce Create proposed Editor settings
Prevent Froala files from being added to git
2016-05-19 13:13:31 +10:00
Samuel Georges 4789616190 Initial switch from Redactor to Froala 2016-05-19 13:13:30 +10:00
Samuel Georges 61970413a8 More backend styling
Tone down the shading in some areas
Reduce intensity of button icons
2016-05-19 07:00:34 +10:00
Samuel Georges 3bad70f041 Relation controller now applies the defined constraints by default
Relation controller now supports scope and conditions for the manage mode (list)
Logic has been modified across recordfinder and filter that only allows one constraint in this order (1. conditions, 2. scope, 3. defined constraints (where applicable))
Fixes #1203
2016-05-17 05:17:40 +10:00
Samuel Georges cb86e655dd Fixes disabled relation nulling value
Just like DatePicker, relation and even regular fields should omitted from the data set
The same logic should apply to hidden fields
Fixes #1827
Recompile assets
2016-05-15 06:47:28 +10:00
Samuel Georges d50c7591cf Move the datepicker to storm
Write docs on usage
2016-05-12 06:48:10 +10:00
Samuel Georges e2647dcf64 Move moment + pickers to storm 2016-05-12 05:54:41 +10:00
Samuel Georges 5400ec7d2d Complete taglist form widget 2016-05-10 06:02:35 +10:00
Samuel Georges 5d27682f25 Create new TagList form widget (Experimental)
Update Select2 to latest
2016-05-08 17:43:21 +10:00
Samuel Georges 1608d80127 Reorganise code editor prefs
Fixes visual bugs
Update dashboard icon
Restyle flash messages
2016-04-30 04:53:33 +10:00
Samuel Georges d3efc1af4c Make the datepicker preview mode show pretty dates
Improve styles of preview form controls
2016-04-26 06:59:02 +10:00
Samuel Georges 41fe2407be Add support for TIME db columns
Tacks on todays date so it remains compatible with the datepicker control. Without this, it returns "Invalid date"
2016-04-26 06:18:04 +10:00
Samuel Georges 733c77c3f1 Improvements to clockpicker
AM/PM time now loads correctly
Updating the input field manually is reflected in the data locker
2016-04-26 06:12:16 +10:00
Samuel Georges 39e91575af Write docs for datepicker plugin 2016-04-24 09:43:26 +10:00
Samuel Georges e772e87de5 Complete rebuild of datepicker form widget
The datepicker now handles timezones and locale mainly on the client side. When a user selects a date/time, the value is chosen in their timezone preference, the script will then convert the value to the application timezone (UTC) for storage in the database. The reverse is true: when the value is loaded, it is converted from UTC to the user preference. The entire process is seamless. Dates are also formatted in the locale preference.

Example scenario: This fixes the issue when selecting the blog post published date. In some cases, the date could be set to 24th April but the server time is 23rd April, so the post appears unpublished against the user's intent.

There is still some issues around DATE and TIME column types stored in the database. It is best to always use TIMESTAMP/DATETIME to retain the timezone conversions. DATE will reset the time to 00:00 UTC which can cause issues and TIME does not play nicely with Carbon at all. We should still try to add support for these columns in the datepicker, even though they are not recommended.
2016-04-24 09:33:39 +10:00
Samuel Georges 13fb0e6388 Update moment, add moment.timezone library + locales 2016-04-23 13:11:26 +10:00
Samuel Georges 6c081d9265 Combine editor preferences and backend preferences
Add backend timezone setting used for converting display dates
2016-04-23 05:31:05 +10:00
Samuel Georges abaa65cc0e Cut back the design
Switch to hard lines
2016-04-22 08:21:08 +10:00
Samuel Georges 76faef7c17 Sync styles on media picker and file upload 2016-04-21 06:11:31 +10:00