//-----------Top Path-----------
  //路徑鈕 註冊的function
function main_PathMqttModule_click(that)
{
	var Class = new Path();
	Class.ClearTheDivOfTheTail(that, "#Main_Top-Path");
	$("#Main_Left-List").css("display", "block");
	Class = new MqttModuleSecondPage();
	Class.NoConfirmButton();
	Class = null;
}

//-----------Left List-----------
function main_MqttModule_click(that)
{
	var LeftDivId="#Main_Left-List";
	var Class = new ListCommon();
	Class.ChangeDivCss(that, LeftDivId);
	Class = new Path();
	Class.LoadPathHtml($(that).text(), 1, "main_PathMqttModule_click(this)");
	Class = new LoadHtml();
	var Html = Class.GetVariableTranslationHtml(Global_MqttModuleCssHtml);
	Html = Html + Class.GetVariableTranslationHtml(Global_MqttModuleUpdatePageHtml);
	Html = Html + Class.GetVariableTranslationHtml(Global_MqttModuleFirstPageHtml);
	Html = Html + Class.GetVariableTranslationHtml(Global_MqttModuleSecondPageHtml);
	$("#Main_Center-Content").empty();
	$("#Main_Center-Content").append(Html);
	Class = new MqttModuleUpdatePage();
	Class.Initialization();
	Class = null;
}
//-----------Center-----------
//__________MQTT模組__________
  //第一頁
function main_MqttModuleSaveButton_click(that)
{
	var Class = new MqttModuleFirstPage();
	Class.SaveButton(that);
	Class = null;
}
function main_MqttModuleChangeAllCheckbox_click(that)
{
	var DataModelId = $(that).closest(".Table").attr("id");
	var Bool = $(that).closest(".Row").find(":checkbox").prop("checked");
	$("#"+DataModelId).find(".DynamicRow").find(":checkbox").prop("checked",Bool);
}
function main_MqttModuleAddNewRow_click(that)
{
	var Class = new MqttModuleFirstPage();
	Class.ModuleAddNewRow(that);
	Class = null;
}
function main_MqttModuleCopyDialogEnabled_click(that, Event)
{
	var Class = new MqttModuleFirstPage();
	if(Class.IsTickedModule() == false)
	{
		$(that).closest(".Column").find(".Message").eq(0).show();
		return 0;
	}
	$(that).closest(".Column").find(".Message").eq(0).hide();
	Class.CopyDialogEnabled(Event);
	Class = null;
}
function main_MqttModuleClearDialogEnabled_click(Event)
{
	var Class = new MqttModuleFirstPage();
	Class.ClearDialogEnabled(Event);
	Class = null;
}
function main_MqttModuleDeleteModule_click(that)
{
	var Class = new MqttModuleFirstPage();
	if(Class.IsTickedModule() == false)
	{
		$(that).closest(".Column").find(".Message").eq(0).show();
		return 0;
	}
	$(that).closest(".Column").find(".Message").eq(0).hide();
	Class.DeleteModule();
	Class = null;
}
function main_MqttModuleShowPreviousPage_click()
{
	var Class = new MqttModuleFirstPage();
	Class.ShowPreviousPage();
	Class = null;
}
function main_MqttModuleShowNextPage_click()
{
	var Class = new MqttModuleFirstPage();
	Class.ShowNextPage();
	Class = null;
}
function main_MqttModuleCopyModule_click()
{
	$(".Dialog").eq(0).find(".Message").show();
	var Class = new MqttModuleFirstPage();
	Class.CopyModule();
	Class = null;
}
function main_MqttModuleCopyDialogDisabled_click()
{
	var Class = new MqttModuleFirstPage();
	Class.CopyDialogDisabled();
	Class = null;
}
function main_MqttModuleClearDialogDisabled_click()
{
	var Class = new MqttModuleFirstPage();
	Class.ClearDialogDisabled();
	Class = null;
}
function main_MqttModuleSettingButton_click(that)
{
	var Class = new MqttModuleFirstPage();
	Class.EditButton(that);
	Class = null;
}
function main_MqttModuleClearAllModule_click(that)
{
	var Class = new MqttModuleFirstPage();
	Class.ClearAllModule(that);
	Class = null;
}

//第二頁
function main_MqttModuleConfirmButton_click(that)
{
	var Class = new MqttModuleSecondPage();
	Class.ConfirmButton(that);
	Class = null;
}
function main_MqttModuleNoConfirmButton_click()
{
	var Class = new MqttModuleSecondPage();
	Class.NoConfirmButton();
	Class = null;
}
function main_MqttModuleRetainCheckbox_click(that)
{
	var Class = new MqttModuleSecondPage();
	Class.RetainCheckbox(that);
	Class = null;
}
function main_MqttModuleShowColumn_click()
{
	var Class = new MqttModuleSecondPage();
	Class.ShowColumn();
	Class = null;
}
function main_MqttModuleHideColumn_click()
{
	var Class = new MqttModuleSecondPage();
	Class.HideColumn();
	Class = null;
}
function main_MqttModuleProduceTable_click(that)
{
	var Class = new MqttModuleSecondPage();
	Class.ProduceTable(that);
	Class = null;
}
function main_MqttModuleDeleteButton_click(that)
{
	var Class = new MqttModuleSecondPage();
	Class.DeleteButton(that);
	Class = null;
}
function main_MqttModuleDeleteTableButton_click()
{
	var Class = new MqttModuleSecondPage();
	Class.DeleteTableButton();
	Class = null;
}
function main_MqttModuleDeleteTable_click(that)
{
	$(".Dialog").eq(2).find(".Message").show();
	var Class = new MqttModuleSecondPage();
	Class.DeleteTable(that);
	Class = null;
}
function main_MqttModuleNotDeleteTableButton_click(that)
{
	var Class = new MqttModuleSecondPage();
	Class.NotDeleteTableButton(that);
	Class = null;
}