fix tags locale

This commit is contained in:
antelle 2016-08-25 00:05:08 +03:00
parent 413bee8530
commit abdaa0b99c
1 changed files with 7 additions and 2 deletions

View File

@ -25,8 +25,7 @@ var MenuModel = Backbone.Model.extend({
this.colorsSection = new MenuSectionModel([{ locTitle: 'menuColors', icon: 'bookmark', shortcut: Keys.DOM_VK_C,
cls: 'menu__item-colors', filterKey: 'color', filterValue: true }]);
this.colorsItem = this.colorsSection.get('items').models[0];
var defTags = [{ locTitle: 'tags', icon: 'tags', defaultItem: true,
disabled: { header: Locale.menuAlertNoTags, body: Locale.menuAlertNoTagsBody, icon: 'tags' } }];
var defTags = [this._getDefaultTagItem()];
this.tagsSection = new MenuSectionModel(defTags);
this.tagsSection.set({ scrollable: true, drag: true });
this.tagsSection.defaultItems = defTags;
@ -98,6 +97,12 @@ var MenuModel = Backbone.Model.extend({
}
}));
});
this.tagsSection.defaultItems[0] = this._getDefaultTagItem();
},
_getDefaultTagItem: function() {
return { title: Format.capFirst(Locale.tags), icon: 'tags', defaultItem: true,
disabled: { header: Locale.menuAlertNoTags, body: Locale.menuAlertNoTagsBody, icon: 'tags' } };
},
setMenu: function(type) {