コード例 #1
0
ファイル: terrain.py プロジェクト: denverfoundation/storybase
def edit_tinymce_field(step, language, field_name, model):
    translation_form = world.find_translation_form(language, model)
    formatted_field_name = world.format_field_name(field_name)
    field_id = "id_%s-%s" % (translation_form['id'],
                             formatted_field_name)
    # HACK: Disable TinyMCE because splinter can't yet deal with it
    world.browser.execute_script("tinyMCE.getInstanceById('%s').remove()" % field_id)
    world.browser.fill("%s-%s" % (translation_form['id'], formatted_field_name), step.multiline)
    world.set_changed(model, formatted_field_name)
コード例 #2
0
ファイル: terrain.py プロジェクト: jwirfs-brock/atlas
def edit_tinymce_field(step, language, field_name, model):
    translation_form = world.find_translation_form(language, model)
    formatted_field_name = world.format_field_name(field_name)
    field_id = "id_%s-%s" % (translation_form['id'], formatted_field_name)
    # HACK: Disable TinyMCE because splinter can't yet deal with it
    world.browser.execute_script("tinyMCE.getInstanceById('%s').remove()" %
                                 field_id)
    world.browser.fill(
        "%s-%s" % (translation_form['id'], formatted_field_name),
        step.multiline)
    world.set_changed(model, formatted_field_name)
コード例 #3
0
ファイル: terrain.py プロジェクト: denverfoundation/storybase
def edit_translation_field_long(step, language, field_name, model):
    translation_form = world.find_translation_form(language, model)
    formatted_field_name = world.format_field_name(field_name)
    world.browser.fill("%s-%s" % (translation_form['id'], formatted_field_name), step.multiline)
コード例 #4
0
ファイル: terrain.py プロジェクト: denverfoundation/storybase
def edit_translation_field(step, language, field_name, model, field_value):
    translation_form = world.find_translation_form(language, model)
    formatted_field_name = world.format_field_name(field_name)
    world.browser.fill("%s-%s" % (translation_form['id'], formatted_field_name), field_value)
コード例 #5
0
ファイル: terrain.py プロジェクト: jwirfs-brock/atlas
def edit_translation_field_long(step, language, field_name, model):
    translation_form = world.find_translation_form(language, model)
    formatted_field_name = world.format_field_name(field_name)
    world.browser.fill(
        "%s-%s" % (translation_form['id'], formatted_field_name),
        step.multiline)
コード例 #6
0
ファイル: terrain.py プロジェクト: jwirfs-brock/atlas
def edit_translation_field(step, language, field_name, model, field_value):
    translation_form = world.find_translation_form(language, model)
    formatted_field_name = world.format_field_name(field_name)
    world.browser.fill(
        "%s-%s" % (translation_form['id'], formatted_field_name), field_value)