From aa28106896d59c16da40d3fe0039dde3dfb13807 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Thu, 22 Jul 2010 05:51:40 +0000 Subject: [PATCH] glossary MDL-23369 made glossary item autolink filter popups the right size --- lib/javascript-static.js | 10 +++++++++- mod/glossary/yui/autolinker/autolinker.js | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 087d399c8fdc8..51f073914315e 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1554,6 +1554,14 @@ function old_onload_focus(formid, controlname) { } function build_querystring(obj) { + return convert_object_to_string(obj, '&'); +} + +function build_windowoptionsstring(obj) { + return convert_object_to_string(obj, ','); +} + +function convert_object_to_string(obj, separator) { if (typeof obj !== 'object') { return null; } @@ -1569,7 +1577,7 @@ function build_querystring(obj) { list.push(k+'='+encodeURIComponent(value)); } } - return list.join('&'); + return list.join(separator); } function stripHTML(str) { diff --git a/mod/glossary/yui/autolinker/autolinker.js b/mod/glossary/yui/autolinker/autolinker.js index dadb903d3bb70..56e014d26fcd3 100644 --- a/mod/glossary/yui/autolinker/autolinker.js +++ b/mod/glossary/yui/autolinker/autolinker.js @@ -29,7 +29,7 @@ YUI.add('moodle-mod_glossary-autolinker', function(Y) { openpopup(e, { url : this.getAttribute('href')+'&popup=1', name : popupname, - options : build_querystring(popupoptions) + options : build_windowoptionsstring(popupoptions) }) }, Y.one(document.body), 'a.glossary.autolink'); }