tweakStores/js/admin.js

21 lines
473 B
JavaScript
Raw Normal View History

2021-11-04 10:17:26 +00:00
/*global $, dotclear */
'use strict';
$(function(){
$("#ts_copy_button").click(function() {
tsCopy("#gen_xml");
return false;
});
function tsCopy(element_id) {
$(element_id).attr("contenteditable", true)
.select()
.on("focus", function() {
document.execCommand('selectAll', false, null)
})
.focus()
document.execCommand("Copy");
$(element_id).removeAttr("contenteditable");
alert(dotclear.ts_copied);
}
});