Paste: baidu tieba upload video test

Author: test by cat
Mode: javascript
Date: Tue, 28 May 2013 04:47:40
Plain Text |
_.Module.define({
    path:"common/component/EditorVideo",requires:["common/component/EditorVideo/EditorUrlvideo","common/component/EditorVideo/EditorLocalvideo"],sub:{
        tempHTML:['<div class="v_layer_content j_content"><ul class="v_ul clearfix"><li class="v_url_btn" ><a href="#" onclick="return false;" class="v_url_bg"></a></li><li class="v_local_btn"><a a href="#" onclick="return false;"  class="v_url_container" ></a><a href="#" onclick="return false;" class="v_local_bg" ></a></li></ul></div>'].join(""),initial:function(a){},init:function(a,c){
            var b=this,d=c.getConfig().can_local_upload;
            b.editor=c;
            b.j_con=a;
            a.html(this.tempHTML);
            b.bindEvent()
        }
        ,bindEvent:function(){
            var a=this;
            a.j_con.find(".v_url_btn").click(function(c){
                c.preventDefault();
                c.stopPropagation();
                if(a.urlVideo){
                    a.urlVideo.init(a.j_con,a.editor)
                }
                else{
                    a.urlVideo=a.use("common/component/EditorVideo/EditorUrlvideo");
                    a.urlVideo.init(a.j_con,a.editor)
                }
                
            });
            var b=a.j_con.find(".v_url_container");
            if(!window.v_con){
                window.v_con=b
            }
            if(!window.localVideo){
                window.localVideo=a.use("common/component/EditorVideo/EditorLocalvideo",b[0],a.editor)
            }
            else{
                window.localVideo.init(b[0],a.editor)
            }
            b.click(function(c){})
        }
        ,destroy:function(){
            this.j_con=null
        }
        
    }
    
});

New Annotation

Summary:
Author:
Mode:
Body: