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

29 lines
558 B
JavaScript

/*global Backbone, tmEditorStrings */
var WPML_TM = WPML_TM || {};
(function () {
"use strict";
WPML_TM.editorSectionView = Backbone.View.extend({
tagName: 'div',
className: 'postbox',
events: {
'click .handlediv': 'showHideSection',
'click .hndle': 'showHideSection'
},
render: function (field) {
var self = this;
self.$el.html(WPML_TM['templates/translation-editor/section.html']({
section: field,
labels: tmEditorStrings
}));
},
showHideSection: function () {
this.$el.toggleClass('closed');
}
});
}());