2021-11-04 10:17:26 +00:00
|
|
|
/*global $, dotclear */
|
|
|
|
'use strict';
|
|
|
|
|
2023-01-06 08:31:44 +00:00
|
|
|
Object.assign(dotclear.msg, dotclear.getData('ts_copied'));
|
|
|
|
|
2021-11-04 10:17:26 +00:00
|
|
|
$(function(){
|
|
|
|
$("#ts_copy_button").click(function() {
|
2021-11-06 14:37:56 +00:00
|
|
|
var style = $("#gen_xml").attr('style');
|
|
|
|
$("#gen_xml").attr('style', '').attr("contenteditable", true)
|
2021-11-04 10:17:26 +00:00
|
|
|
.select()
|
|
|
|
.on("focus", function() {
|
|
|
|
document.execCommand('selectAll', false, null)
|
|
|
|
})
|
|
|
|
.focus()
|
|
|
|
document.execCommand("Copy");
|
2021-11-06 14:37:56 +00:00
|
|
|
$("#gen_xml").removeAttr("contenteditable").attr('style', style);
|
|
|
|
$("#ts_copy_button").focus();
|
|
|
|
|
2023-01-06 08:31:44 +00:00
|
|
|
alert(dotclear.msg.alert);
|
2021-11-06 14:37:56 +00:00
|
|
|
return false;
|
|
|
|
});
|
2021-11-04 10:17:26 +00:00
|
|
|
});
|