Files
doitinpoland.com/wp-content/plugins/wpml-translation-management/res/js/translation-editor/wpml-tm-editor-languages-view.js
2023-09-12 21:41:04 +02:00

27 lines
595 B
JavaScript

/*global Backbone */
var WPML_TM = WPML_TM || {};
(function () {
"use strict";
WPML_TM.editorLanguagesView = Backbone.View.extend({
tagName: 'header',
className: 'wpml-translation-header',
events: {
'click .js-button-copy-all': 'copyAll'
},
initialize: function (options) {
this.mainView = options.mainView;
},
render: function () {
var self = this;
self.$el.html(WPML_TM['templates/translation-editor/languages.html'](self.model));
},
copyAll: function () {
var copyAllTask = new WPML_TM.editorCopyAll(this.mainView);
copyAllTask.copy();
}
});
}());