UI Cleanup - Updated Instrumentation, jQuery and Mixins subtrees.

This commit is contained in:
Taloth Saldono
2015-02-13 22:06:20 +01:00
parent 44928c8f64
commit 70bfad4e6a
24 changed files with 716 additions and 490 deletions
+8 -6
View File
@@ -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);
}