Patch #244 ยป editr.html.diff
C:/Program Files/Apache Group/Apache2/htdocs/redmine/app/views/wiki/edit.rhtml (working copy) | ||
---|---|---|
29 | 29 |
<% end %> |
30 | 30 | |
31 | 31 |
<% set_html_title @page.pretty_title %> |
32 |
<script type="text/javascript"> |
|
33 |
var preveiwTimerId; |
|
34 |
var previewFunc = function(){ |
|
35 |
new Ajax.Updater('preview', '/wiki/1/Docs/preview', |
|
36 |
{asynchronous:true, evalScripts:true, method:'post', |
|
37 |
onComplete:function(request){ |
|
38 |
Element.setStyle($('content_text'),{'width':'50%'}); |
|
39 |
Element.setStyle($('preview'), |
|
40 |
{'position':'absolute','width':'48%','top':'146px','right':'10px'}); |
|
41 |
}, parameters:Form.serialize('wiki_form')}); |
|
42 |
return false; |
|
43 |
} |
|
44 |
var previewTimerFunc = function(){ |
|
45 |
clearTimeout(preveiwTimerId); |
|
46 |
preveiwTimerId = setTimeout(previewFunc,1000); |
|
47 | ||
48 |
} |
|
49 |
Event.observe('content_text', 'keyup', previewTimerFunc, false); |
|
50 |
</script> |