Class(function(extend, using, self){
    extend("pages/page");
    using("lib/jquery.min.js");

    self.create_room_ref = null;
    self.initPage = function () {
        this.log_trace("create-room bindRoomId  start");
        this.bindRoomId();
        this.log_trace("create-room bindRoomId  end");

        this.log_trace("create-room bindCreateNumber  start");
        this.bindCreateNumber();
        this.log_trace("create-room bindCreateNumber  end");

    };
    // 获取房间id并显示
    self.bindRoomId = function () {
        var id = this.create_room_ref.get_zone_id();
        $(".popup-box .c-room-number").text(id);
    }
    // 获取可以创建的房间数量并显示
    self.bindCreateNumber = function () {
        var number = this.create_room_ref.get_zone_num();
        $(".popup-box .c-create-number ").text(number);
    }

    self.initEvent = function(){
        var that = this;
        $(document).delegate(".btn-box button:first", "click", function () {
            that.create_room_ref.btn_create_zone_click();
        });
    }

    self.func(function(curData){

        this.create_room_ref = curData;//createzone;
        this.sup().construct(curData);

        this.initPage();
        this.initEvent();
    })
})
//
//Audio.CreateRoom = Audio.CreateRoom || {
//    create_room_ref: null,
//    initPage: function () {
//        Audio.log_trace(createzone, "create-room bindRoomId  start");
//        this.bindRoomId();
//        Audio.log_trace(createzone, "create-room bindRoomId  end");
//
//        Audio.log_trace(createzone, "create-room bindCreateNumber  start");
//        this.bindCreateNumber();
//        Audio.log_trace(createzone, "create-room bindCreateNumber  end");
//
//    },/* 获取房间id并显示 */
//    bindRoomId: function () {
//        var id = this.create_room_ref.get_zone_id();
//        $(".popup-box .c-room-number").text(id);
//    },/* 获取可以创建的房间数量并显示 */
//    bindCreateNumber: function () {
//        var number = this.create_room_ref.get_zone_num();
//        $(".popup-box .c-create-number ").text(number);
//    }
//};

//(function () {
//    $(document).delegate(".btn-box button:first", "click", function () {
//        Audio.CreateRoom.create_room_ref.btn_create_zone_click();
//    });
//})();
//
//window.onload = function () { Audio.CreateRoom.create_room_ref = createzone; Audio.CreateRoom.initPage(); }