Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

Hybrid View

  1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default YUI Logger and Basic Dialog

    YUI Logger and Basic Dialog


    Originally, using borderlayout, I had my logger set a seperate tab to the main body of my pages, so I could switch back and forth to it. I decided I didn't like this, and instead, wanted to put the logger into a basic dialog so I could open and close it on demand. It wasn't that hard, and I learned how to set a global variable inside a function

    Javascript
    Code:
    YAHOO.util.myLogger = {
    	init: function() {
    		window.myLoggerDialog = null;;
    		
    		loggerDialog = document.createElement('div');
    		loggerDialog.id = 'loggerDialog';
    		loggerDialog.style.visibility = 'hidden';
    		
    		document.body.appendChild(loggerDialog);
    
    		myLoggerDialog = new YAHOO.ext.BasicDialog("loggerDialog", { 
    			modal:false,
    			autoTabs:true,
    			width:500,
    			height:300,
    			shadow:true,
    			minWidth:300,
    			minHeight:300
    		});
    
    		myLoggerDialog.header.update('Logger');
    		loggerTabs = new YAHOO.ext.TabPanel(myLoggerDialog.body.dom);
    		loggerTab = loggerTabs.addTab('logger', 'Logger');
    		myLoggerDialog.tabs = loggerTabs;
    		myLoggerDialog.tabs.activate('logger');
    		var myLogReader = new YAHOO.widget.LogReader("logger"); 
    	}
    };
    YAHOO.ext.EventManager.onDocumentReady(YAHOO.util.myLogger.init, YAHOO.util.myLogger, true);
    HTML to place in your page to trigger showing the dialog
    Code:
    <span onClick='myLoggerDialog.show(this);'>Logger</span>

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
    tryanDLS is on a distinguished road

      0  

    Default


    You could streamline this further. Creating a BasicDialog will build the internal div (hd, bd, ft) and add the css classes also. Basically all you have to do is pass the div that will contain the dialog (e.g. loggerDialog in your case)

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    Your 100% correct, and as such, I've updated the block of code

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    Can someone give me an example link to this? It sounds sweet.

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    http://whasit.com/ci/

    Actually, there you can see a bug in it too.. until you resize the logger box, it won't show a tabbar in the content panel?

  6. #6
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    Don't you want to wrap the logger?

  7. #7
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    ok, that post was made when I was still half asleep...

    actually the logger does wrap.. after you resize the dialog it's in. Maybe I need a repaint or something after I insert the logger into the tab?

  8. #8
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    Ah that's a lot better. Now it's time to clean up that text and buttons hehe. I might actually use it myself. I am sick of alerting everything.

  9. #9
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    if you end up with a better one, let me know I'm playing around trying to integrate drupal 5 beta and yui-ext

  10. #10
    Ext User
    Join Date
    Mar 2007
    Posts
    321
    Vote Rating
    0
    jbowman is on a distinguished road

      0  

    Default


    I've updated my version to use layoutdialog cutting down a few lines of code. I also finally figured out a fix for the body of the dialog not displaying correctly until after a resize.

    Code:
    YAHOO.util.myLogger = {
    	init: function() {
    		
    		window.myLoggerDialog = null;
    		
    		loggerDialog = document.createElement('div');
    		loggerDialog.id = 'loggerDialog';
    		loggerDialog.style.visibility = 'hidden';
    		
    		document.body.appendChild(loggerDialog);
    
    		myLoggerDialog = new YAHOO.ext.LayoutDialog("loggerDialog", { 
    			modal:false,
    			autoScroll:true,
    			width:500,
    			height:300,
    			shadow:true,
    			minWidth:500,
    			minHeight:300,
    			center: {
    				autoScroll:true,
    				alwaysShowTabs: false
    			}
    		});
    
    		var layout = myLoggerDialog.getLayout();
    		myLoggerDialog.beginUpdate();
    		var loggerPane = layout.add('center', new YAHOO.ext.ContentPanel('logger', {
    				fitToFrame: true,
    				autoCreate: true }));
    		myLoggerDialog.endUpdate();
    
    		myLoggerDialog.header.update('Logger');
    		var myLogReader = new YAHOO.widget.LogReader("logger");
    		myLoggerDialog.syncBodyHeight();
    	}
    };
    YAHOO.ext.EventManager.onDocumentReady(YAHOO.util.myLogger.init, YAHOO.util.myLogger, true);

Similar Threads

  1. basic dialog
    By Alidad in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 21 Nov 2008, 7:22 AM
  2. Need Help In Basic Dialog
    By tagfrisk in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 1 May 2007, 11:28 PM
  3. basic dialog basic question
    By kevinknight in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 13 Mar 2007, 10:58 AM
  4. Basic Dialog, is this possible....
    By peter_n in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 22 Dec 2006, 1:40 PM
  5. help with Basic Dialog!
    By VatsaL in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 2 Dec 2006, 2:50 PM

Thread Participants: 2