Adds a helper for preview links.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10031 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-07-18 17:47:19 +00:00
parent bb2af97dcf
commit ff68fff80e
14 changed files with 32 additions and 83 deletions

View File

@@ -337,6 +337,16 @@ function hideModal(el) {
}
}
function submitPreview(url, form, target) {
new Ajax.Updater(target, url, {
asynchronous:true,
evalScripts:true,
method:'post',
onComplete:function(request){Element.scrollTo(target)},
parameters:Form.serialize(form)
});
}
function collapseScmEntry(id) {
var els = document.getElementsByClassName(id, 'browser');
for (var i = 0; i < els.length; i++) {