[IMP]check if interval presents then first stop that.
authorVidhin Mehta (OpenERP) <vme@tinyerp.com>
Mon, 29 Oct 2012 12:02:13 +0000 (17:32 +0530)
committerVidhin Mehta (OpenERP) <vme@tinyerp.com>
Mon, 29 Oct 2012 12:02:13 +0000 (17:32 +0530)
bzr revid: vme@tinyerp.com-20121029120213-61uy6frqo0ormdc6

addons/web/static/src/js/chrome.js

index 2478ae9..821ed2d 100644 (file)
@@ -302,6 +302,8 @@ instance.web.favicon = instance.web.Loading.include({
     
     //when time interval is known than start favicon can be used.
     start_favicon: function(second, options){
+        if(!this.interval)
+            this.stop_favicon();
         var count = 0;
         var self = this;
         this.interval = setInterval(function(){
@@ -318,6 +320,7 @@ instance.web.favicon = instance.web.Loading.include({
         $('link[type="image/x-icon"]').attr('href', this.original_favi.attr("href"));
         $('head').append(this.original_favi);
         document.title = this.old_title;
+        this.interval = null;
     },
     
     loading_title:function(percentage){