fix javascript errors with ie

This commit is contained in:
Sebastian Sdorra
2012-06-29 14:23:47 +02:00
parent 3108776974
commit 149c8b4dfe
4 changed files with 6 additions and 8 deletions

View File

@@ -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());

View File

@@ -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);
}
/**

View File

@@ -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;

View File

@@ -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);
}
},