Open rs4231199 opened 3 years ago
Controller for the inline editing is working.
In the Normal save()
method, whenever an exception occurs, the user gets redirected to the appropriate page with an informative message. I have made some changes in the CMSApplication
to modify the above-mentioned redirect behavior if the request is made for the inline editing.
I have undone the changes in the CMSApplication
.
The JsonResponse
message
should also have the same JText::_('JINVALID_TOKEN')
In this way, if something goes wrong you can also report the error message.
Added informative messages with the JsonResponse
.
Added Method to get a form field from the server via Ajax request.
Some screenshots.
@rs4231199 I checked out this branch but I am unable to do front-end inline editing. Nothing happens when I click on a title or description. Inline editing is enabled in the Global Configuration. What is missing?
What is missing?
The JavaScript part.
Proper rendering needs some more work.
Editing experience needs some improvements.
There are two commits.
1) We can never be sure about what got saved in the database. For example, Custom Fields has a filter option that modifies the received value before it gets saved to the database. So, instead of displaying what the user has entered, it now receives the saved value
along with the saved status
.
2) The aim is to create an inline editable version of each field.
We'll define a new layout
for each inline editable field. Inline editable fields would require different scripts and styles than the regular fields. We can add those in the new layouts. The renderField()
method now accepts an extra parameter to determine what layout
to render.
As of now, Custom Text Field and article title can be edited inline. But I haven't modified the layout to inline experience. This commit is more about finalizing the approach. So, wait for a few more commits to experience the final inline editing. 🙂
Pull Request for Issue #8.
[x] Add controller methods
POST
request when the one field's data is received.[x] Render inline-editable fields differently
com_content
com_fields
[ ] CSS Part
:hover
styling[x] JavaScript Part
absolute
position)[x] Language Support
[x] Form Fields covered