void LLSidepanelInventorySubpanel::onSaveButtonClicked()
{
	save();
	setIsEditing(FALSE);
	refresh();
	updateVerbs();
}
void LLSidepanelItemInfo::refresh()
{
	LLViewerInventoryItem* item = findItem();
	if(item)
	{
		refreshFromItem(item);
		updateVerbs();
		return;
	}
	else
	{
		if (getIsEditing())
		{
			setIsEditing(FALSE);
		}
	}

	if (!getIsEditing())
	{
		const std::string no_item_names[]={
			"LabelItemName",
			"LabelItemDesc",
			"LabelCreatorName",
			"LabelOwnerName",
			"CheckOwnerModify",
			"CheckOwnerCopy",
			"CheckOwnerTransfer",
			"CheckShareWithGroup",
			"CheckEveryoneCopy",
			"CheckNextOwnerModify",
			"CheckNextOwnerCopy",
			"CheckNextOwnerTransfer",
			"CheckPurchase",
			"RadioSaleType",
			"Edit Cost"
		};

		for(size_t t=0; t<LL_ARRAY_SIZE(no_item_names); ++t)
		{
			childSetEnabled(no_item_names[t],false);
		}
		
		const std::string hide_names[]={
			"BaseMaskDebug",
			"OwnerMaskDebug",
			"GroupMaskDebug",
			"EveryoneMaskDebug",
			"NextMaskDebug"
		};
		for(size_t t=0; t<LL_ARRAY_SIZE(hide_names); ++t)
		{
			childSetVisible(hide_names[t],false);
		}
	}

	if (!item)
	{
		const std::string no_edit_mode_names[]={
			"BtnCreator",
			"BtnOwner",
		};
		for(size_t t=0; t<LL_ARRAY_SIZE(no_edit_mode_names); ++t)
		{
			childSetEnabled(no_edit_mode_names[t],false);
		}
	}

	updateVerbs();
}
void LLSidepanelInventorySubpanel::onEditButtonClicked()
{
	setIsEditing(TRUE);
	refresh();
	updateVerbs();
}
void LLSidepanelInventorySubpanel::dirty()
{
	mIsDirty = TRUE;
	setIsEditing(FALSE);
}