edit_event: copy event to clipboard button
This commit is contained in:
@@ -276,6 +276,21 @@ function checkFields(){
|
||||
}
|
||||
}
|
||||
|
||||
function copyEventToClipboard(){
|
||||
var text = $('textarea[name="excerpt"]').val()+"\n";
|
||||
text += $('textarea[name="user_excerpt"]').val()+"\n";
|
||||
text += $('textarea[name="topic"]').val()+"\n\n";
|
||||
text += $('textarea[name="content"]').val()+"\n";
|
||||
|
||||
text = '<textarea style="none" id="clipboard">' + text + '</textarea>';
|
||||
$('body').append(text);
|
||||
|
||||
var copyText = document.getElementById('clipboard');
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999);
|
||||
document.execCommand("copy");
|
||||
}
|
||||
|
||||
$(document).ready(
|
||||
function(){
|
||||
initRegions(region);
|
||||
|
||||
@@ -182,3 +182,5 @@ msgstr "Auszug ist zu lang. Für längeren Text bitte das Feld «aktuelle Themen
|
||||
msgid "label_excerpt_extension_too_long"
|
||||
msgstr "Auszug ist zu lang. Für längeren Text bitte das Feld «aktuelle Themen» verwenden."
|
||||
|
||||
msgid "button_copy_to_clipboard"
|
||||
msgstr "in Zwischenablage kopieren"
|
||||
|
||||
@@ -175,3 +175,6 @@ msgstr "excerpt is too long. for longer text please use the field «Current Topi
|
||||
msgid "label_excerpt_extension_too_long"
|
||||
msgstr "excerpt is too long. for longer text please use the field «Current Topics»"
|
||||
|
||||
msgid "button_copy_to_clipboard"
|
||||
msgstr "copy to clipboard"
|
||||
|
||||
|
||||
@@ -123,6 +123,8 @@
|
||||
<button type="submit"><TMPL_VAR .loc.button_download></button>
|
||||
</form>
|
||||
</TMPL_IF>
|
||||
|
||||
<button onclick="copyEventToClipboard();"><TMPL_VAR .loc.button_copy_to_clipboard></button>
|
||||
</TMPL_UNLESS>
|
||||
|
||||
<!--
|
||||
|
||||
Reference in New Issue
Block a user