Parent: [3fc04c] (diff)

Child: [ddf08c] (diff)

Download this file

wiki.py    15 lines (12 with data), 568 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import ew.jinja2_ew as ew
from allura.lib.widgets import form_fields as ffw
class CreatePageWidget(ffw.Lightbox):
def resources(self):
for r in super(CreatePageWidget, self).resources(): yield r
yield ew.JSScript('''$(function () {
$('#lightbox_create_wiki_page form').submit(function(){
location.href = $('#sidebar a.add_wiki_page').attr('href') +
encodeURIComponent($('input[name=name]', $(this)).val().replace('/', '-')) + '/edit';
return false;
});
});''');