Updating Cached Front-Facing Content After Gallery Edits: Difference between revisions
Jump to navigation
Jump to search
| Line 15: | Line 15: | ||
Adding a new image to the gallery. | Adding a new image to the gallery. | ||
* Click "add image" button. | |||
** JavaScript handler invokes the shared AJAX script, which returns the markup for the form as JSON. | |||
** Modal dialog opened with littled formDialog.js library. | |||
* Form filled out and submitted. | |||
** Shared AJAX handler saves image edits.<br />`/_ajax/images/edit_image.php` | |||
*** `EditImagePage::commit_edit()`<br />(`EditImagePage instanceof ajax_page_class`) | |||
**** `cache_class::refresh_content_after_edit()` | |||
***** `$content instanceof image_link_class` → `cache_class::refresh_content_after_image_edit()` | |||
*** `GalleryUploadClass::save()` → `image_link_class::save()` → `image_link_class::upload()` <br />`GalleryUploadClass` → `image_upload_class` → `image_link_class`<br />None of these classes have an `update_cache()` routine. | |||
[[Category:Albums CMS]] | [[Category:Albums CMS]] | ||
[[Category:CMS Documentation]] | [[Category:CMS Documentation]] | ||
[[Category:JQuery/AJAX]] | [[Category:JQuery/AJAX]] | ||
Revision as of 21:10, 16 September 2013
Overview
Documentation of the process of refreshing cached front-facing content after editing gallery images in the Albums CMS.
Use cases
- Add a new image to the gallery
- Edit an existing image in the gallery
- Delete an existing image in the gallery
- Click "update cache" button for the gallery
- Update the Album's cache
Process
Adding a new image to the gallery.
- Click "add image" button.
- JavaScript handler invokes the shared AJAX script, which returns the markup for the form as JSON.
- Modal dialog opened with littled formDialog.js library.
- Form filled out and submitted.
- Shared AJAX handler saves image edits.
/_ajax/images/edit_image.phpEditImagePage::commit_edit()
(EditImagePage instanceof ajax_page_class)cache_class::refresh_content_after_edit()$content instanceof image_link_class→cache_class::refresh_content_after_image_edit()
GalleryUploadClass::save()→image_link_class::save()→image_link_class::upload()GalleryUploadClass→image_upload_class→image_link_class
None of these classes have anupdate_cache()routine.
- Shared AJAX handler saves image edits.