Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / docs / source / ProgressBarPager.html
index 16c7d87..9e5ed3b 100644 (file)
@@ -1,10 +1,10 @@
-<html>\r
-<head>\r
-  <title>The source code</title>\r
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body  onload="prettyPrint();">\r
+<html>
+<head>
+  <title>The source code</title>
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body  onload="prettyPrint();">
     <pre class="prettyprint lang-js"><div id="cls-Ext.ux.ProgressBarPager"></div>/**
 * @class Ext.ux.ProgressBarPager
 * @extends Object 
@@ -42,41 +42,30 @@ Ext.ux.ProgressBarPager  = Ext.extend(Object, {
        },
        //public
        init : function (parent) {
-               
-               if(parent.displayInfo){
-                       this.parent = parent;
-                       var ind  = parent.items.indexOf(parent.displayItem);
-                       parent.remove(parent.displayItem, true);
-                       this.progressBar = new Ext.ProgressBar({
-                               text    : this.defaultText,
-                               width   : this.progBarWidth,
-                               animate :  this.defaultAnimCfg
-                       });                                     
-                  
-                       parent.displayItem = this.progressBar;
-                       
-                       parent.add(parent.displayItem); 
-                       parent.doLayout();
-                       Ext.apply(parent, this.parentOverrides);                
-                       
-                       this.progressBar.on('render', function(pb) {
-                               pb.el.applyStyles('cursor:pointer');
-
-                               pb.el.on('click', this.handleProgressBarClick, this);
-                       }, this);
-                       
-               
-                       // Remove the click handler from the 
-                       this.progressBar.on({
-                               scope         : this,
-                               beforeDestroy : function() {
-                                       this.progressBar.el.un('click', this.handleProgressBarClick, this);     
-                               }
-                       });     
-                                               
-               }
-                 
-       },
+        
+        if(parent.displayInfo){
+            this.parent = parent;
+            var ind  = parent.items.indexOf(parent.displayItem);
+            parent.remove(parent.displayItem, true);
+            this.progressBar = new Ext.ProgressBar({
+                text    : this.defaultText,
+                width   : this.progBarWidth,
+                animate :  this.defaultAnimCfg
+            });                 
+           
+            parent.displayItem = this.progressBar;
+            
+            parent.add(parent.displayItem); 
+            parent.doLayout();
+            Ext.apply(parent, this.parentOverrides);        
+            
+            this.progressBar.on('render', function(pb) {
+                pb.mon(pb.getEl().applyStyles('cursor:pointer'), 'click', this.handleProgressBarClick, this);
+            }, this, {single: true});
+                        
+        }
+          
+    },
        // private
        // This method handles the click for the progress bar
        handleProgressBarClick : function(e){
@@ -120,6 +109,6 @@ Ext.ux.ProgressBarPager  = Ext.extend(Object, {
 });
 Ext.preg('progressbarpager', Ext.ux.ProgressBarPager);
 
-</pre>    \r
-</body>\r
+</pre>
+</body>
 </html>
\ No newline at end of file