mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
rjs -> webpack
This commit is contained in:
@@ -1,38 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
define(
|
||||
function () {
|
||||
|
||||
return function () {
|
||||
|
||||
this.viewName = function () {
|
||||
if (this.template) {
|
||||
var regex = new RegExp('\/', 'g');
|
||||
|
||||
return this.template
|
||||
.toLocaleLowerCase()
|
||||
.replace('template', '')
|
||||
.replace(regex, '-');
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
var originalOnRender = this.onRender;
|
||||
|
||||
this.onRender = function () {
|
||||
|
||||
this.$el.removeClass('iv-' + this.viewName());
|
||||
this.$el.addClass('iv-' + this.viewName());
|
||||
|
||||
if (originalOnRender) {
|
||||
return originalOnRender.call(this);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
}
|
||||
);
|
||||
module.exports = function(){
|
||||
this.viewName = function(){
|
||||
if(this.template) {
|
||||
var regex = new RegExp('/', 'g');
|
||||
return this.template.toLocaleLowerCase().replace('template', '').replace(regex, '-');
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
var originalOnRender = this.onRender;
|
||||
this.onRender = function(){
|
||||
this.$el.removeClass('iv-' + this.viewName());
|
||||
this.$el.addClass('iv-' + this.viewName());
|
||||
if(originalOnRender) {
|
||||
return originalOnRender.call(this);
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
return this;
|
||||
};
|
||||
Reference in New Issue
Block a user