diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-27 12:39:12 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-07-27 12:39:12 -0700 |
commit | 1f014aae6c16bbda62d8f5937180f11ccb0eb1b1 (patch) | |
tree | 9fa6c27716b14424c5c223299ffaa45f688ad620 /themes | |
parent | b3fe70e654c1519f8f1d54a80f99d0af7a8f2e49 (diff) |
Allow a theme to override the page refresh mechanism. Create a new
javascript lib (gallery.reload.js) which defines the functions
gallery_reload() and gallery_location(new_location). They just
do a window.location.reload() and window.location = new_location.
This change breaks the assumption that all themes will handle page reloads
the same and allows the theme to customize the page refresh.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/admin_default/views/admin.html.php | 2 | ||||
-rw-r--r-- | themes/default/views/page.html.php | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index d27f9260..63fc45b5 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -21,6 +21,8 @@ <?= $theme->script("jquery.form.js") ?> <?= $theme->script("jquery-ui.js") ?> <?= $theme->script("gallery.common.js") ?> + <? /* Themes can override this to provide custom refresh handling */ ?> + <?= $theme->script("gallery.reload.js") ?> <? /* MSG_CANCEL is required by gallery.dialog.js */ ?> <script type="text/javascript"> var MSG_CANCEL = "<?= t('Cancel') ?>"; diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 66282bae..5865e4cc 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -49,6 +49,8 @@ <?= $theme->script("jquery.form.js") ?> <?= $theme->script("jquery-ui.js") ?> <?= $theme->script("gallery.common.js") ?> + <? /* Themes can override this to provide custom refresh handling */ ?> + <?= $theme->script("gallery.reload.js") ?> <? /* MSG_CANCEL is required by gallery.dialog.js */ ?> <script type="text/javascript"> var MSG_CANCEL = "<?= t('Cancel') ?>"; |