roojs-core.js
[roojs1] / Roo / Document.js
index daf4fc3..c1122ec 100644 (file)
@@ -1,81 +1,46 @@
 /*
- * Original code for Roojs - LGPL
- * <script type="text/javascript">
+ * RooJS Library 
+ * Copyright(c) 2007-2017, Roo J Solutions Ltd
+ *
+ * Licence LGPL 
+ *
  */
  
 /**
- * @class Roo.Documents
- * @extends Roo.data.Observable
+ * @class Roo.Document
+ * @extends Roo.util.Observable
+ * This is a convience class to wrap up the main document loading code.. , rather than adding Roo.onReady(......)
  * 
- * Document and interface builder class..
- * 
- * MyApp = new Roo.Document({
- *     loadingIndicator : 'loading',
- *     listeners :  Roo.Login.onLoad();
- * });
- * 
- * MyApp.on('beforeload', function() {
- *      MyApp.register()
+ * @param {Object} config the methods and properties of the 'base' class for the application.
  * 
+ *  Generic Page handler - implement this to start your app..
  * 
+ * eg.
+ *  MyProject = new Roo.Document({
+        events : {
+            'load' : true // your events..
+        },
+        listeners : {
+            'ready' : function() {
+                // fired on Roo.onReady()
+            }
+        }
  * 
  */
 Roo.Document = function(cfg) {
      
     this.addEvents({ 
-        'ready' : true,
-        'beforeload' : true, // fired after page ready, before module building.
-        'load' : true, // fired after module building
-        'authrefreshed' : true // fire on auth updated?? - should be on Login?!?!?
-        
+        'ready' : true
     });
     Roo.util.Observable.call(this,cfg);
+    
     var _this = this;
+    
     Roo.onReady(function() {
         _this.fireEvent('ready');
     },null,false);
     
-    this.on('ready', onReady, this);
-    this.on('load', onLoad, this);  
     
 }
-Roo.extend(Roo.Document, Roo.util.Observable, {
-    /**
-     * @property  buildCompleted
-     * True when the builder has completed building the interface.
-     * @type Boolean
-     */
-    buildCompleted : false,
-     /**
-     * @property  loadingIndicator
-     * ID of loading indictor element.
-     * @type String
-     */
-    loadingIndicator : false,
-    
-      
-    // protected - on Ready handler.
-    onReady :   function()
-    {
-        // kludge to fix firebug debugger
-        if (typeof(console) == 'undefined') {
-            console = { log : function() {  } };
-        }
-         
-        // init cookies..
-        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
-            
-        // link errors...
-        
-      
-       
-            
-    },
-     
-},
-   
-    
-    
-});
\ No newline at end of file
+
+Roo.extend(Roo.Document, Roo.util.Observable, {});
\ No newline at end of file