From 1f014aae6c16bbda62d8f5937180f11ccb0eb1b1 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 27 Jul 2009 12:39:12 -0700 Subject: 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. --- lib/gallery.reload.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/gallery.reload.js (limited to 'lib/gallery.reload.js') diff --git a/lib/gallery.reload.js b/lib/gallery.reload.js new file mode 100644 index 00000000..2c8752a0 --- /dev/null +++ b/lib/gallery.reload.js @@ -0,0 +1,16 @@ +/** + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +(function ($) { + $.gallery_reload = function() { + window.location.reload(); + }; +})(jQuery); + +// Vertically align a block element's content +(function ($) { + $.gallery_location = function(location) { + window.location = location; + }; +})(jQuery); -- cgit v1.2.3