diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-08-10 23:05:05 -0700 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-08-10 23:07:50 -0700 |
| commit | cbba45fffc7368280e9529f55e108d0080175b6a (patch) | |
| tree | ff21dad0410f80e92084815315b75fda677f639d /themes/admin_default | |
| parent | 790545ac97358dd92ce954e617d5255e6644c1a7 (diff) | |
Create the concept of an "ajax link" and use it for thumbnail rotation
and album covers in the context menu.
Notes:
- This requires context_menu() to have a CSS selector that refers to the
<img> that we're operating on, otherwise we don't know how to find the
thumbnail, etc.
- Create Menu_Element_Ajax_Link which has an ajax_handler attribute
that contains a snippet of JS that we're going to run when the ajax
call returns.
- Add $.gallery_replace_image in gallery.common.js
- Add lib/gallery.ajax.js which can be used to ajaxify any link, and have
ui.init.js in the themes call that on all .gAjaxLink elements.
Diffstat (limited to 'themes/admin_default')
| -rw-r--r-- | themes/admin_default/js/ui.init.js | 3 | ||||
| -rw-r--r-- | themes/admin_default/views/admin.html.php | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/themes/admin_default/js/ui.init.js b/themes/admin_default/js/ui.init.js index e52f0c4c..daa6dd70 100644 --- a/themes/admin_default/js/ui.init.js +++ b/themes/admin_default/js/ui.init.js @@ -19,6 +19,9 @@ $(document).ready(function(){ // Initialize modal dialogs $(".gDialogLink").gallery_dialog(); + // Initialize ajax links + $(".gDialogLink").gallery_ajax(); + // Initialize panels $(".gPanelLink").gallery_panel(); diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index d27f9260..3f4128cb 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -25,6 +25,7 @@ <script type="text/javascript"> var MSG_CANCEL = "<?= t('Cancel') ?>"; </script> + <?= $theme->script("gallery.ajax.js") ?> <?= $theme->script("gallery.dialog.js") ?> <?= $theme->script("superfish/js/superfish.js") ?> <?= $theme->script("jquery.dropshadow.js") ?> |
