first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
/*globals labels */
(function () {
TaxonomyTranslation.views.TableView = Backbone.View.extend({
template: WPML_core[ 'templates/taxonomy-translation/table.html' ],
tag: 'div',
termsView: {},
model: TaxonomyTranslation.models.Taxonomy,
initialize: function ( data, options ) {
this.type = options.type;
},
render: function () {
if ( ! TaxonomyTranslation.classes.taxonomy.get( "taxonomy" ) ) {
return false;
}
var self = this,
langs = TaxonomyTranslation.data.activeLanguages,
count = self.isTermTable() ? TaxonomyTranslation.data.termRowsCollection.length : 1,
tax = self.model.get( 'taxonomy' ),
firstColumnHeading = self.isTermTable() ? labels.firstColumnHeading.replace( '%taxonomy%', TaxonomyTranslation.data.taxonomies[ tax ].singularLabel ) : '';
this.$el.html(self.template({
langs: langs,
tableType: self.type,
count: count,
firstColumnHeading: firstColumnHeading,
mode: TaxonomyTranslation.mainView.mode
}));
return self;
},
isTermTable: function () {
return this.type === 'terms';
},
clear: function () {
}
});
})(TaxonomyTranslation);