DD-84 : WIP : Add confirmation DAMA dialog when moving items in active listing
parent
273ef6a981
commit
22ee6abe0b
|
|
@ -1185,7 +1185,8 @@ bool can_move_folder_to_marketplace(const LLInventoryCategory* root_folder, LLIn
|
|||
return accept;
|
||||
}
|
||||
|
||||
bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
|
||||
// Local : perform the move at last...
|
||||
bool perform_move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
|
||||
{
|
||||
// Get the marketplace listings depth of the destination folder, exit with error if not under marketplace
|
||||
S32 depth = depth_nesting_in_marketplace(dest_folder);
|
||||
|
|
@ -1286,6 +1287,33 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol
|
|||
return true;
|
||||
}
|
||||
|
||||
// Local : Callback for the move item if DAMA required...
|
||||
bool callback_move_item_to_marketplacelistings(const LLSD& notification, const LLSD& response, LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
|
||||
{
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if (option == 0) // YES
|
||||
{
|
||||
return perform_move_item_to_marketplacelistings(inv_item, dest_folder, copy);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Public interface: Check if confirmation dialog is required (DAMA) and call it or call the move item function directly
|
||||
bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_folder, bool copy)
|
||||
{
|
||||
// Merov : Use the following weak test for testing...
|
||||
//if (LLMarketplaceData::instance().isVersionFolder(dest_folder))
|
||||
if (LLMarketplaceData::instance().getActivationState(dest_folder))
|
||||
{
|
||||
LLNotificationsUtil::add("ConfirmMerchantActiveChange", LLSD(), LLSD(), boost::bind(callback_move_item_to_marketplacelistings, _1, _2, inv_item, dest_folder, copy));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return perform_move_item_to_marketplacelistings(inv_item, dest_folder, copy);
|
||||
}
|
||||
}
|
||||
|
||||
bool move_folder_to_marketplacelistings(LLInventoryCategory* inv_cat, const LLUUID& dest_folder, bool copy)
|
||||
{
|
||||
// Check that we have adequate permission on all items being moved. Proceed if we do.
|
||||
|
|
|
|||
|
|
@ -305,7 +305,19 @@ Initialization with the Marketplace failed because of a system or network error.
|
|||
name="okbutton"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="ConfirmMerchantActiveChange"
|
||||
type="alertmodal">
|
||||
This action will change the active content of this listing. Do you want to continue?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
ignoretext="Confirm before I change an active listing on the marketplace"
|
||||
name="okcancelignore"
|
||||
notext="Cancel"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
|
|
|
|||
Loading…
Reference in New Issue