mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
UI Cleanup - Updated Instrumentation, jQuery and Mixins subtrees.
This commit is contained in:
@@ -1,24 +1,26 @@
|
||||
module.exports = function(){
|
||||
module.exports = function() {
|
||||
|
||||
window.NzbDrone.NameViews = window.NzbDrone.NameViews || !window.NzbDrone.Production;
|
||||
|
||||
var regex = new RegExp('/', 'g');
|
||||
|
||||
var _getViewName = function(template){
|
||||
if(template) {
|
||||
var _getViewName = function(template) {
|
||||
if (template) {
|
||||
return template.toLocaleLowerCase().replace('template', '').replace(regex, '-');
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
var originalOnRender = this.onRender;
|
||||
this.onRender = function(){
|
||||
|
||||
if(window.NzbDrone.NameViews) {
|
||||
this.onRender = function() {
|
||||
|
||||
if (window.NzbDrone.NameViews) {
|
||||
this.$el.addClass('iv-' + _getViewName(this.template));
|
||||
}
|
||||
|
||||
if(originalOnRender) {
|
||||
if (originalOnRender) {
|
||||
return originalOnRender.call(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user