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.

  1. #1
    Sencha User Akujin's Avatar
    Join Date
    Apr 2011
    Location
    Philadelphia
    Posts
    7
    Vote Rating
    1
    Akujin will become famous soon enough

      0  

    Default Ext.ux.SWFUpload

    Ext.ux.SWFUpload



    GitHub SWFUpload.js
    PHP Code:
    /* 
    * SWFUpload adapter for Ext
     * Author: Chris Alfano (chris@devnuts.com) - Sep 06,2009
     * Author: Henry Paradiz (henry@devnuts.com) - June 17, 2011 - Upgraded to Ext 4
     * 
     * See SWFUpload documentation: http://demo.swfupload.org/Documentation/#settingsobject
     */
     
     // REQUIRES THIS EXTERNAL FILE:     //name: 'SWFUpload'
        //,URL: '/jslib/SWFUpload/swfupload.js' // need to figure out how to dynamically load this with Extjs4
     
     
    Ext.define('Ext.ux.SWFUpload', {
        
    extend'Ext.Component'

        
    ,config: {
            
    autoStarttrue
            
    ,debugModefalse
            
    ,targetUrl'/media/json/upload'
            
    ,fieldName'mediaFile'
            
    ,swfUrl'/jslib/SWFUpload/Flash/swfupload.swf'
            
    ,swfUploadCfg: {}
            ,
    relayCookiesfalse
            
    ,baseParams: []
            ,
    progressBarfalse
            
    ,file_size_limit"16 MB"
            
    ,file_types'*.jpg; *.jpeg; *.png; *.gif; *.JPG; *.JPEG; *.PNG; *.GIF'
            
    ,file_types_description'Media'
            
    ,button_width100
            
    ,button_height22
            
    ,button_image_url'/img/icons/blank_upload_button.png'
            
    ,scopenull
            
    ,button_actionSWFUpload.BUTTON_ACTION.SELECT_FILES
        
    }
        ,
    constructor: function(config) {
            
    this.initConfig(config);
            return 
    this.callParent(arguments);
        }
        ,
    initComponent: function() {
        
            if(!
    this.relayCookies)
                
    this.relayCookies = ['s'];
        
            
    // init error state
            
    this.errorOccurred false
        
            
    // generate ID for SWFUpload container
            
    this.flashContainerId Ext.id(null'swfupload');
            
            
    // register custom events
            
    this.addEvents({
                
    'ready'true
                
    ,'queueError'true
                
    ,'filesSelected'true
                
    ,'fileQueued'true
                
    ,'uploadError'true
                
    ,'uploadStarted'true
                
    ,'uploadProgress'true
                
    ,'uploadComplete'true
                
    ,'uploadResponse'true
                
    ,'allUploadsComplete'true
            
    });
        
            
    // call parent
            
    this.callParent(arguments);
            
        }
        ,
    onRender: function(containerposition) {
        
            
    // call parent
            
    this.callParent(arguments);
        
            
    this.photoUploaderSpan this.el.createChild({
                
    tag'span'
                
    ,idthis.flashContainerId
                
    ,style'margin: 2px'
            
    });


            var 
    params Ext.apply({},this.baseParams);
            
    Ext.each(this.relayCookies, function(cookieName) {
                
    params[cookieName] = Ext.util.Cookies.get(cookieName)
            });
            

            
    // create SWF uploader
            
    var config this.getConfig(params);
            
    //console.log('Creating with %o', config);
            
    this.SWFUpload = new SWFUpload(config);
        }
        ,
    setPostParams: function(params) {
            
            for(var 
    field in params)
            {
                
    this.addPostParam(fieldparams[field]);
            }
            
        }
        
        ,
    addPostParam: function(fieldvalue)
        {
            
    this.SWFUpload.addPostParam(fieldvalue);
        }
        
        
        ,
    getConfig: function(params) {
            
            return 
    Ext.apply({
                
    // backend settings
                
    debugthis.debugMode
                
    ,upload_urlthis.targetUrl
                
    ,file_post_namethis.fieldName
                
    ,flash_urlthis.swfUrl
                
    ,post_paramsparams
                            
                
    // trigger settings
                
    ,button_placeholder_idthis.flashContainerId
                
    ,button_window_mode SWFUpload.WINDOW_MODE.TRANSPARENT
                
    ,button_widththis.button_width
                
    ,button_heightthis.button_height
                
    ,button_image_urlthis.button_image_url
                
    ,button_text_left_padding20
                
    ,button_text_top_padding2
                
    ,button_actionthis.button_action
        
                
    ,file_size_limitthis.file_size_limit
                
    ,file_typesthis.file_types
                
    ,file_types_descriptionthis.types_description
                
    ,file_upload_limit"0"
                
                
    // event handlers
                
    ,swfupload_loaded_handlerExt.bind(function() {
                
                    if(
    false!==this.fireEvent('ready') &&ampthis.progressBar)
                    {
                        
    this.progressBar.updateProgress(0'Ready to upload media'false);
                        
    this.progressBar.enable();
                    }
                    
                },
    this)
                
                ,
    file_queue_error_handlerExt.bind(function(fileerrorCodeerrorMessage) {
                    
                    
    this.errorOccurred true;
                
                    if(
    false!==this.fireEvent('queueError'fileerrorCodeerrorMessage))
                    {
                        
    Ext.Msg.alert('Upload Failed''This file cannot be uploaded:<br><br>'+errorMessage);
                    }
                                    
                },
    this)
                
                ,
    upload_error_handlerExt.bind(function(fileerrorCodeerrorMessage) {
                    
                    
    this.errorOccurred true;
                
                    if(
    false!==this.fireEvent('uploadError'fileerrorCodeerrorMessage))
                    {
                        
    Ext.Msg.alert('Upload Failed''An error occured while uploading your file:<br><br>'+errorMessage);
                    }
                    
                },
    this)
                
                ,
    file_dialog_complete_handlerExt.bind(function(numFilesSelectednumFilesQueuedqueueTotal) {
                    
                    
    // reset error state
                    
    this.errorOccurred false;
                
                    if(
    false!==this.fireEvent('filesSelected'numFilesSelectednumFilesQueuedqueueTotal) &&ampthis.progressBar)
                    {
                        if(
    numFilesQueued)
                            
    this.progressBar.updateProgress(0'Preparing to upload '+queueTotal+(queueTotal>1?' files...':' file...'), false);
                        else
                            
    this.progressBar.updateProgress(0'Ready to upload media'false);
                    }
                    
                    if(
    this.autoStart)
                    {
                        try {
                            if (
    numFilesSelected &gt0) {
                                
    this.SWFUpload.startUpload();
                            }
                            
                        } catch (
    ex) {
                            
    this.SWFUpload.debug(ex);
                        }
                    }
                    
                },
    this)
                
                ,
    file_queued_handlerExt.bind(function(file) {
                
                    
    this.fireEvent('fileQueued'file);
                
                },
    this)
                
                ,
    upload_start_handlerExt.bind(function(file) {
                    
                    
    // skip during errors
                    
    if(this.errorOccurred)
                    {
                        return;
                    }
                
                    if(
    false!==this.fireEvent('uploadStarted',file) &&ampthis.progressBar)
                    {
                        
    this.progressBar.updateProgress(0'Uploading ' file.namefalse);
                    }
                                    
                },
    this)
                
                ,
    upload_progress_handlerExt.bind(function(filebytesLoadedbytesTotal) {
                    
                    
    // skip during errors
                    
    if(this.errorOccurred)
                    {
                        return;
                    }
                
                    if(
    false!==this.fireEvent('uploadProgress'filebytesLoadedbytesTotal) &&ampthis.progressBar)
                    {
                        
    this.progressBar.updateProgress(bytesLoaded bytesTotal'Uploading ' file.nametrue);
                    }

                },
    this)
                
                ,
    upload_success_handlerExt.bind(function(fileresponseTextreceivedResponse) {
                    
                    
    // skip during errors
                    
    if(this.errorOccurred)
                    {
                        return;
                    }
                
                    
    this.fireEvent('uploadResponse'fileresponseTextreceivedResponse);
                    
                    if(
    this.debugMode)
                    {
                        
    console.log('Received upload response for %s: %o'file.nameresponseText);
                    }
                    
                },
    this)
                
                
                ,
    upload_complete_handlerExt.bind(function(file) {
                    
                    
    // skip during errors
                    
    if(this.errorOccurred)
                    {
                        return;
                    }
                
                    if(
    false!==this.fireEvent('uploadComplete'file) &&ampthis.progressBar)
                    {
                        
    this.progressBar.updateProgress(1'Finished uploading ' file.nametrue);
                        
    this.progressBar.el.frame();
                    }
                        
                    if (
    this.SWFUpload.getStats().files_queued == 0)
                    {
                        if(
    false!==this.fireEvent('allUploadsComplete') &&ampthis.progressBar)
                        {
                            
    this.progressBar.updateText('Finished uploading all files. Ready to upload media');
                        }
                    }
                    else
                    {
                        
    // start next file
                        
    if(this.autoStart)
                        {
                            
    this.SWFUpload.startUpload();
                        }
                    }
                    
                },
    this)
                
                
            }, 
    this.swfUploadCfg);
            
        }
        
        ,
    getStats: function() {
        
            return 
    this.SWFUpload.getStats();
        
        }
        
        ,
    getFile: function(index) {
        
            return 
    this.SWFUpload.getFile(index);
        
        }
        ,
    cancelUpload: function(index,triggerErrorEvent) {
            if (
    triggerErrorEvent !== false) {
                
    triggerErrorEvent true;
            }
        
            return 
    this.SWFUpload.cancelUpload(index);
        }
        ,
    startUpload: function(index) {
        
            return 
    this.SWFUpload.startUpload(index);
        
        }
    }); 
    Lead Developer at Jarvus Innovations
    GitHub

  2. #2
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460
    Vote Rating
    0
    Mycoding is on a distinguished road

      0  

    Default


    It's really needed.
    Thanks.

    Could you be so kind to place one simple sample of working?

  3. #3
    Sencha User Akujin's Avatar
    Join Date
    Apr 2011
    Location
    Philadelphia
    Posts
    7
    Vote Rating
    1
    Akujin will become famous soon enough

      0  

    Default


    Here's two instances being assigned references in some object. Could be anything.
    PHP Code:
    this.frontUploaderSWF Ext.create('Ext.ux.SWFUpload', {
                
    renderToartworkBox.frontUploadBtn
                
    ,config: {
                    
    autoStarttrue
                    
    ,debugModefalse
                    
    ,targetUrl'/artwork/json/upload'
                    
    ,fieldName'Front'
                    
    ,file_size_limit"50 MB"
                    
    ,file_types'*'
                    
    ,file_types_description'Front T-Shirt Artwork'
                    
    ,button_width158
                    
    ,button_height55
                    
    ,button_image_url'/img/buttons/upload-front.png'
                    
    ,button_actionSWFUpload.BUTTON_ACTION.SELECT_FILE
                
    }
                ,
    listeners: {
                    
    scopethis
                    
    ,ready: function() {
                        
    //this.onReady('front');
                    
    }
                    ,
    uploadStarted: function(file) {  //start
                        
    this.frontArtwork null;
                        
    this.frontArtworkUploading true;
                        
    this.updateFrontArtwork();

                        
    artworkBox.frontProgressBar.setWidth(0);
                        
    artworkBox.frontProgressCt.show(true);
                        
    artworkBox.frontUploadedFile.show(true);
                    }
                    ,
    uploadProgress: function(filebytesLoadedbytesTotal) { //progress
                        
    artworkBox.frontProgressBar.setWidth(parseInt((bytesLoaded bytesTotal) * 100) + '%');
                    }
                    ,
    uploadComplete: function(file) {  //finish
                        
    artworkBox.frontProgressBar.setWidth('100%');
                        
    artworkBox.frontProgressCt.hide({
                            
    listeners: {
                                
    afteranimate: function() {
                                    
    artworkBox.frontProgressBar.setWidth(0);
                                }
                            }
                        });
                    }
                    ,
    uploadError: function(fileerrorCodeerrorMessage) { //error
                        
    console.info(file,errorCodeerrorMessage);
                        
    this.frontArtworkUploading false;
                    }
                    ,
    uploadResponse: function(fileresponseTextreceivedResponse) { //file upload response
                        
    var Ext.decode(responseText);
                        
                        if(
    r.success)
                        {
                            
    this.frontArtwork Ext.ModelManager.create(r.data.Front'DWD.model.Artwork');
                            
    this.updateFrontArtwork();
                        }
                        else
                        {
                            
    Ext.Msg.alert('Upload failed'r.message r.message 'Your upload failed, please try again later or contact support');
                        }
                        
                        
    this.frontArtworkUploading false;
                    }
                }
            });
            
            
    this.backUploaderSWF Ext.create('Ext.ux.SWFUpload', {
                
    renderToartworkBox.backUploadBtn
                
    ,config: {
                    
    autoStarttrue
                    
    ,debugModefalse
                    
    ,targetUrl'/artwork/json/upload'
                    
    ,fieldName'Back'
                    
    ,file_size_limit"50 MB"
                    
    ,file_types'*'
                    
    ,file_types_description'Back T-Shirt Artwork'    
                    
    ,button_width158
                    
    ,button_height55
                    
    ,button_image_url'/img/buttons/upload-back.png'
                    
    ,button_actionSWFUpload.BUTTON_ACTION.SELECT_FILE
                
    }
                ,
    listeners: {
                    
    scopethis
                    
    ,ready: function() {
                        
    //this.onReady('back');
                    
    }
                    ,
    uploadStarted: function(file) {  //start
                        
    this.backArtwork null;
                        
    this.backArtworkUploading true;
                        
    this.updateBackArtwork();

                        
    artworkBox.backProgressBar.setWidth(0);
                        
    artworkBox.backProgressCt.show(true);
                        
    artworkBox.backUploadedFile.show(true);
                    }
                    ,
    uploadProgress: function(filebytesLoadedbytesTotal) { //progress
                        
    artworkBox.backProgressBar.setWidth(parseInt((bytesLoaded bytesTotal) * 100) + '%');
                    }
                    ,
    uploadComplete: function(file) {  //finish
                        
    artworkBox.backProgressBar.setWidth('100%');
                        
    artworkBox.backProgressCt.hide({
                            
    listeners: {
                                
    afteranimate: function() {
                                    
    artworkBox.backProgressBar.setWidth(0);
                                }
                            }
                        });
                    }
                    ,
    uploadError: function(fileerrorCodeerrorMessage) { //error
                        
    console.info(file,errorCodeerrorMessage);
                        
    this.backArtworkUploading false;
                    }
                    ,
    uploadResponse: function(fileresponseTextreceivedResponse) { //file upload response
                        
    var Ext.decode(responseText);
                        
                        if(
    r.success)
                        {
                            
    this.backArtwork Ext.ModelManager.create(r.data.Back'DWD.model.Artwork');
                            
                            
    this.updateBackArtwork();
                        }
                        else
                        {
                            
    Ext.Msg.alert('Upload failed'r.message r.message 'Your upload failed, please try again later or contact support');
                        }
                        
                        
    this.backArtworkUploading false;
                    }
                }
            });
        } 

  4. #4
    Sencha User Mycoding's Avatar
    Join Date
    May 2010
    Location
    Russia, Volgograd
    Posts
    460
    Vote Rating
    0
    Mycoding is on a distinguished road

      0  

    Default


    Thanks a lot.
    As only I will have time I will test it.

    It is odd that in ExtJS 3 and 4 there are not actionscript uploader and some more actionscript extentions like:
    video,audio players, ...
    I also like HTML5 but in fact it is really needed actionscript decisions.
    So developers have to find some code or to develop it by themselves.(and it is not stable and take time)
    I wish in ExtJS some actionscript extentions will appear.

Thread Participants: 1