/////////////////////////////////////////////
// Edit Blog Select /////
////////////////////////////////////////////////////////////////////////
// Breeze Website Builder
// Copyright Silver Dolphin Solutions, LLC, Edward Lemmers, P.E.
// For licensing, see license.txt.
// Created:	7/14/2017	ELL

var param_array = {'popup_msg_type' : 1, 'status_msg' : '', 'popup_timeout' : -1};
var popup_msg = new PopupMsg(param_array);

window.parent.document.title = document.title;

function OpenHelpWindow()
{
	window.open(http + "breezewebsitebuilder.com/docs/cms/help.html#important", "Help", "scrollbars=1,resizable=1,status=0,toolbar=0,menubar=0,location=0,height=700,width=800");
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
function AddRemoveAttrib(attrib, btn)
{
	var action = "add";
	if (btn.className == "button_sub_level_1_add")	{
		btn.className = "button_sub_level_1_remove";
	}
	else	{
		btn.className = "button_sub_level_1_add";
		action = "remove";
	}
	
	$.post( "save_important_css.php", { style_sheet: style_sheet, class: class_str, attribute: attrib, action: action } ).done(CompleteAddRemoveAttrib) ;
}
function CompleteAddRemoveAttrib(data)
{
	popup_msg.top_offset = 100;
	popup_msg.left_offset = 320;
	popup_msg.popup_msg_type = 1;
	popup_msg.popup_timeout = 2000;
	if (data == 1)
		popup_msg.status_msg = EDIT_CSS_UPDATE_COMPLETE_MSG;
	else
		popup_msg.status_msg = JS_MENU_STYLES_ERROR_SAVING_RECORD_ERR;
	popup_msg.ShowPopupMsg();
}

function ChangeSort(sort_alpha)
{
	var attrib_sort_method = 0;
	if (sort_alpha === true)
		attrib_sort_method = 1;

	window.location = "manage_important_css.php?style_sheet=" + style_sheet + "&attrib_sort_method=" + attrib_sort_method + "&class=" + class_str;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
function ResizeWorkspace(mainWidth, mainHeight, menuWidth, headerHeight) {

}

function DisplayNotSavedMessage(btn)	{
	// Needed to complete call when deleting unsaved border area.
	window.parent.SetWorkSavedNotSaved(true);
	window.parent.next_btn = btn;
	window.parent.DoNextClick();
}