YAHOO.namespace("mapper.dialog");

// 地図にタグを追加するためのダイアログ
YAHOO.mapper.dialog.BlogPartsDialog = function(el, userConfig) {
	YAHOO.mapper.dialog.BlogPartsDialog.superclass.constructor.call(this, el, userConfig);
}

// 継承
YAHOO.extend(YAHOO.mapper.dialog.BlogPartsDialog, YAHOO.widget.Dialog);

// キャンセルすると呼ばれる関数
YAHOO.mapper.dialog.BlogPartsDialog.prototype.handleCancel = function() {
  this.cancel();
}

// 初期化メソッド
YAHOO.mapper.dialog.BlogPartsDialog.prototype.init = function(el, userConfig) {
	YAHOO.mapper.dialog.BlogPartsDialog.superclass.init.call(this, el/*, userConfig*/);  // Note that we don't pass the user config in here yet because we only want it executed once, at the lowest subclass level
	this.cfg.applyConfig( { width : "500px",
	                        fixedcenter : true,
	                        visible : false, 
	                        constraintoviewport : true,
	                        buttons : [ { text:"閉じる", handler:this.handleCancel } ],
	                        lazyload: true,
	                        effect: { effect:YAHOO.widget.ContainerEffect.FADE,
	                                  duration:0.5 } }, true);
	
	this.render();
}

// 入力チェック
YAHOO.mapper.dialog.BlogPartsDialog.prototype.validate = function() {
  return true;
}

