Skip to content

Commit

Permalink
glossary MDL-23369 made glossary item autolink filter popups the righ…
Browse files Browse the repository at this point in the history
…t size
  • Loading branch information
Andrew Davis committed Jul 22, 2010
1 parent f954e12 commit aa28106
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion lib/javascript-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -1569,7 +1577,7 @@ function build_querystring(obj) {
list.push(k+'='+encodeURIComponent(value));
}
}
return list.join('&');
return list.join(separator);
}

function stripHTML(str) {
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/yui/autolinker/autolinker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit aa28106

Please sign in to comment.