diff --git a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.changesetpanel.js b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.changesetpanel.js index 1d0aeebf8a..7e5dd0fb8e 100644 --- a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.changesetpanel.js +++ b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.changesetpanel.js @@ -117,7 +117,7 @@ Sonia.repository.ChangesetPanel = Ext.extend(Ext.Panel, { }, showCommit: function(){ - if ( console ){ + if ( debug ){ console.debug('open commit for ' + this.revision); } this.openPanel(this.createCommitPanel()); @@ -126,7 +126,7 @@ Sonia.repository.ChangesetPanel = Ext.extend(Ext.Panel, { }, showDiff: function(){ - if ( console ){ + if ( debug ){ console.debug('open diff for ' + this.revision); } this.openPanel(this.createDiffPanel()); @@ -135,7 +135,7 @@ Sonia.repository.ChangesetPanel = Ext.extend(Ext.Panel, { }, downloadRawDiff: function(){ - if ( console ){ + if ( debug ){ console.debug('open raw diff for ' + this.revision); } window.open(this.createDiffUrl()); diff --git a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.js b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.js index 0c3dad29f8..1ed840a02b 100644 --- a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.js +++ b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.js @@ -83,9 +83,7 @@ Sonia.repository.createUrl = function(type, name){ } Sonia.repository.createUrlFromObject = function(repository){ - var url = Sonia.repository.createUrl(repository.type, repository.name); - console.debug(url); - return url; + return Sonia.repository.createUrl(repository.type, repository.name); } /** diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.global.js b/scm-webapp/src/main/webapp/resources/js/sonia.global.js index 6d23c35b92..25b8cb1db0 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.global.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.global.js @@ -29,7 +29,7 @@ * */ // enable debug mode, if console is available -var debug = typeof console != 'undefined'; +var debug = typeof console != 'undefined' && typeof console.debug != 'undefined'; var state = null; var admin = false; diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js index db6e6dd56c..a04f2dea25 100644 --- a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js +++ b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js @@ -523,7 +523,7 @@ Sonia.scm.Main = Ext.extend(Ext.util.Observable, { css.rel = 'stylesheet'; css.type = 'text/css'; css.href = url; - document.head.appendChild(css); + document.getElementsByTagName('head')[0].appendChild(css); this.stylesheets.push(url); } },