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

//-----------Left List-----------
function main_IftttConditionTrigger_click(that)
{
	var LeftDivId="#Main_Left-List";
	var Class = new ListCommon();
	Class.ChangeDivCss(that, LeftDivId);
	Class = new Path();
	Class.LoadPathHtml($(that).text(), 1, "main_PathIftttConditionTrigger_click(this)");
	Class = new LoadHtml();
	var Html = Class.ReadTranslateAfterOfHtml("./Plugin/IftttConditionTrigger/html/Css.html");
	Html = Html + Class.ReadTranslateAfterOfHtml("./Plugin/IftttConditionTrigger/html/UpdatePage.html");
	Html = Html + Class.ReadTranslateAfterOfHtml("./Plugin/IftttConditionTrigger/html/FirstPage.html");
	Html = Html + Class.ReadTranslateAfterOfHtml("./Plugin/IftttConditionTrigger/html/SecondPage.html");
	$("#Main_Center-Content").empty();
	$("#Main_Center-Content").append(Html);
	Class = new IftttConditionTriggerUpdatePage();
	Class.Initialization();
	Class = null;
}

//-----------Center-----------
//-----------IFTTT通知-----------
  //第1頁
function main_IftttConditionTriggerFirstPageShowPreviousPage_click()
{
	var Class = new IftttConditionTriggerFirstPage();
	Class.ShowPreviousPage();
	Class = null;
}
function main_IftttConditionTriggerFirstPageShowNextPage_click()
{
	var Class = new IftttConditionTriggerFirstPage();
	Class.ShowNextPage();
	Class = null;
}
function main_IftttConditionTriggerFirstPageChangeAllCheckbox_click(that)
{
	var DataModelId ="EventTable";
	var Bool = $(that).closest(".Row").find(":checkbox").prop("checked");
	$("#"+DataModelId).find(".DynamicRow").find(":checkbox").prop("checked",Bool);
}
function main_IftttConditionTriggerFirstPageDelete_click(that)
{
	var Class = new IftttConditionTriggerFirstPage();
	if(Class.IsTickedEvent() == false)
	{
		$(that).closest(".Column").find(".Message").eq(0).show();
		return 0;
	}
	$(that).closest(".Column").find(".Message").eq(0).hide();
	Class.DeleteEvent(that);
	Class = null;
}
function main_IftttConditionTriggerFirstPageAddNewObject_click(that)
{
	var Class = new IftttConditionTriggerFirstPage();
	Class.AddNewObject(that);
	Class = null;
}
function main_IftttConditionTriggerFirstPageEditButton_click(that)
{
	var Class = new IftttConditionTriggerFirstPage();
	Class.EditButton(that);
	Class = null;
}
function main_IftttConditionTriggerFirstPageSaveButton_click(that)
{
	var Class = new IftttConditionTriggerFirstPage();
	Class.SaveButton(that);
	Class = null;
}
  //第2頁
function main_IftttConditionTriggerSecondPageAddNewRow_click(that)
{
	var Class = new IftttConditionTriggerSecondPage();
	Class.AddNewRow(that);
	Class = null;
}
function main_IftttConditionTriggerSecondPageRemoveRow_click(that)
{
	var Class = new IftttConditionTriggerSecondPage();
	Class.RemoveRow(that);
	Class = null;
}
function main_IftttConditionTriggerSecondPageChangeAllCheckbox_click(that)
{
	var Table = $(that).closest(".Table");
	var Bool = $(that).closest(".Row").eq(0).find(":checkbox").prop("checked");
	$(Table).find(".DynamicRow").find(":checkbox").prop("checked",Bool);
}
function main_IftttConditionTriggerSecondPageConfirmButton_click(that)
{
	var Class = new IftttConditionTriggerSecondPage();
	Class.ConfirmButton(that);
	Class = null;
}
function main_IftttConditionTriggerSecondPageNoConfirmButton_click()
{
	var Class = new IftttConditionTriggerSecondPage();
	Class.NoConfirmButton();
	Class = null;
}