enable named views for smoke tests

This commit is contained in:
Keivan Beigi
2015-02-04 11:09:34 -08:00
parent 327802fae4
commit c1467d0ecd
3 changed files with 11 additions and 4 deletions
+6 -1
View File
@@ -1,5 +1,7 @@
module.exports = function(){
window.NzbDrone.NameViews = window.NzbDrone.NameViews || !window.NzbDrone.Production;
var regex = new RegExp('/', 'g');
var _getViewName = function(template){
@@ -11,7 +13,10 @@ module.exports = function(){
var originalOnRender = this.onRender;
this.onRender = function(){
this.$el.addClass('iv-' + _getViewName(this.template));
if(window.NzbDrone.NameViews) {
this.$el.addClass('iv-' + _getViewName(this.template));
}
if(originalOnRender) {
return originalOnRender.call(this);