From 9fe5728b4385ead4a4c74eed7917d93060510cdb Mon Sep 17 00:00:00 2001 From: dolphin Date: Wed, 12 Mar 2014 09:50:08 -0700 Subject: Show ignored items when updating an experience profile --- indra/newview/llfloaterexperienceprofile.cpp | 35 +++++++++++++++++++- indra/newview/llpanelexperiencelisteditor.cpp | 2 +- indra/newview/llpanelexperiences.cpp | 2 +- .../newview/skins/default/xui/en/notifications.xml | 38 ++++++++++++++++++++++ 4 files changed, 74 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index e5574be4f0..1c01a4bb9f 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -49,6 +49,7 @@ #include "llviewerregion.h" #include "llevents.h" #include "llfloatergroups.h" +#include "llnotifications.h" #define XML_PANEL_EXPERIENCE_PROFILE "floater_experienceprofile.xml" #define TF_NAME "experience_title" @@ -85,7 +86,6 @@ #define BTN_SET_GROUP "Group_btn" - class LLExperienceHandler : public LLCommandHandler { public: @@ -722,6 +722,10 @@ void LLFloaterExperienceProfile::doSave( int success_action ) std::string url=region->getCapability("UpdateExperience"); if(url.empty()) return; + + mPackage.erase(LLExperienceCache::QUOTA); + mPackage.erase(LLExperienceCache::EXPIRES); + mPackage.erase(LLExperienceCache::AGENT_ID); LLHTTPClient::post(url, mPackage, new ExperienceUpdateResponder(getDerivedHandle())); } @@ -730,6 +734,35 @@ void LLFloaterExperienceProfile::onSaveComplete( const LLSD& content ) { LLUUID id = getExperienceId(); + if(content.has("removed")) + { + const LLSD& removed = content["removed"]; + LLSD::map_const_iterator it = removed.beginMap(); + for(/**/; it != removed.endMap(); ++it) + { + const std::string& field = it->first; + if(field == LLExperienceCache::EXPERIENCE_ID) + { + //this message should be removed by the experience api + continue; + } + const LLSD& data = it->second; + std::string error_tag = data["error_tag"].asString()+ "ExperienceProfileMessage"; + LLSD fields; + if( LLNotifications::instance().getTemplate(error_tag)) + { + fields["field"] = field; + fields["extra_info"] = data["extra_info"]; + LLNotificationsUtil::add(error_tag, fields); + } + else + { + fields["MESSAGE"]=data["en"]; + LLNotificationsUtil::add("GenericAlert", fields); + } + } + } + if(!content.has("experience_keys")) { llwarns << "LLFloaterExperienceProfile::onSaveComplete called with bad content" << llendl; diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index 374f89afad..37394936ee 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -38,7 +38,7 @@ #include "llagent.h" -static LLRegisterPanelClassWrapper t_panel_experience_list_editor("panel_experience_list_editor"); +static LLPanelInjector t_panel_experience_list_editor("panel_experience_list_editor"); LLPanelExperienceListEditor::LLPanelExperienceListEditor() diff --git a/indra/newview/llpanelexperiences.cpp b/indra/newview/llpanelexperiences.cpp index f1d6ea09ed..0d67dbf916 100644 --- a/indra/newview/llpanelexperiences.cpp +++ b/indra/newview/llpanelexperiences.cpp @@ -38,7 +38,7 @@ #include "lllayoutstack.h" -static LLRegisterPanelClassWrapper register_experiences_panel("experiences_panel"); +static LLPanelInjector register_experiences_panel("experiences_panel"); LLPanelExperiences::LLPanelExperiences( ) diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b7d5940434..e0cc2229d5 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7006,8 +7006,46 @@ Unable to acquire a new experience: yestext="OK"/> + + A change to the experience group was ignored because the owner is not a member of the selected group. + + + + The uneditable field '[field]' was ignored when updating the experience profile. + + + + Ignored changes to the field '[field]' which can only be set by the experience owner. + + + You may not set the maturity rating of an experience higher than that of the owner. + + + The following terms prevented the update of the experience profile name and/or description: [extra_info] + +