app/helpers/admin/layouts_helper.rb in radiant-0.8.2 vs app/helpers/admin/layouts_helper.rb in radiant-0.9.0.rc2
- old
+ new
@@ -1,19 +1,38 @@
module Admin::LayoutsHelper
+ def layout_edit_javascripts
+ <<-CODE
+ var tagReferenceWindows = {};
+ function loadTagReference() {
+ var pageType = 'Page';
+ if (!tagReferenceWindows[pageType])
+ tagReferenceWindows[pageType] = new Popup.AjaxWindow("#{admin_reference_path('tags')}?class_name=" + encodeURIComponent(pageType), {reload: false});
+ var window = tagReferenceWindows[pageType];
+ if('Page' != pageType) {
+ $('tag_reference_link').highlight();
+ window.show();
+ } else {
+ window.toggle();
+ }
+ lastPageType = pageType;
+ return false;
+ }
+ CODE
+ end
end