tweakStores/js/admin.js

20 lines
531 B
JavaScript
Raw Normal View History

2021-11-04 10:17:26 +00:00
/*global $, dotclear */
'use strict';
$(function(){
$("#ts_copy_button").click(function() {
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");
$("#gen_xml").removeAttr("contenteditable").attr('style', style);
$("#ts_copy_button").focus();
2021-11-04 10:17:26 +00:00
alert(dotclear.ts_copied);
return false;
});
2021-11-04 10:17:26 +00:00
});