/**
 * Created with JetBrains WebStorm.
 * User: dfwang
 * Date: 14-7-7
 * Time: 上午10:37
 * To change this template use File | Settings | File Templates.
 */
define(function(require, exports) {
    var commands =   require('editor/assert/js/utils/commands').commands;
    var AppContext=require('../../../../share/assert/js/appcontext').AppContext;
    fabric.Video.prototype.showEditDialog=function(opt, finishcallback){
        var _that = this,phtml='',tablecot=null;
        //opt &&(this.path = opt);
        //finishcallback && (this.callback = finishcallback);

        var info = null;
        //如果是新建添加一个rid
        if (!_that.rid) {
            info = {
                "src": opt.source.replace("/media","media"),
                "title": "视频",
                "des": "",
                "type": 'dir'
            };
            //push到Relation中避免重复创建
            _that.rid = Global.CurrentSlide.c.addRelationInfo(info);
            _that.setRelInfo(info);
        }
        finishcallback && finishcallback.call(_that,null);
    }
    fabric.Video.prototype.showEditButton = function(opt,finishcallback){
        commands.usePropertyCtrlArea('video');
    }
    fabric.Video.prototype.hidePropertyButton = function(){
        commands.usePropertyCtrlArea(null);
    }
})
