summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-04-18 18:44:43 -0700
committerMerov Linden <merov@lindenlab.com>2014-04-18 18:44:43 -0700
commite207c89c538ebbe43fe35f681979b332c112751e (patch)
treef0984376291166484fc13030dee0b38c3a57a734 /indra/newview
parent007a058c5fee29b70bc4ac1a4b9ff40deabdbd82 (diff)
DD-19 : WIP : Add marketplace validation modal dialog to view the log (no validation text yet)
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloatermarketplacelistings.cpp51
-rwxr-xr-xindra/newview/llfloatermarketplacelistings.h29
-rwxr-xr-xindra/newview/llviewerfloaterreg.cpp1
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_marketplace_validation.xml50
4 files changed, 128 insertions, 3 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index be48005e67..2f730d9d14 100755
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -115,6 +115,8 @@ void LLPanelMarketplaceListings::onAuditButtonClicked()
llassert(marketplacelistings_id.notNull());
LLViewerInventoryCategory* cat = gInventory.getCategory(marketplacelistings_id);
validate_marketplacelistings(cat);
+ LLSD data(LLSD::emptyMap());
+ LLFloaterReg::showInstance("marketplace_validation", data);
}
void LLPanelMarketplaceListings::onViewSortMenuItemClicked(const LLSD& userdata)
@@ -511,7 +513,7 @@ void LLFloaterMarketplaceListings::importReportResults(U32 status, const LLSD& c
}
//-----------------------------------------------------------------------------
-// LLFloaterAssociateListing()
+// LLFloaterAssociateListing
//-----------------------------------------------------------------------------
LLFloaterAssociateListing::LLFloaterAssociateListing(const LLSD& key)
@@ -575,4 +577,51 @@ void LLFloaterAssociateListing::cancel()
closeFloater();
}
+//-----------------------------------------------------------------------------
+// LLFloaterMarketplaceValidation
+//-----------------------------------------------------------------------------
+
+LLFloaterMarketplaceValidation::LLFloaterMarketplaceValidation(const LLSD& data)
+: LLModalDialog( data["message"].asString() ),
+mMessage(data["message"].asString()),
+mEditor(NULL)
+{
+}
+
+BOOL LLFloaterMarketplaceValidation::postBuild()
+{
+ childSetAction("Continue", onContinue, this);
+
+ // this displays the message
+ mEditor = getChild<LLTextEditor>("tos_text");
+ mEditor->setEnabled( FALSE );
+ mEditor->setFocus(TRUE);
+ mEditor->setValue(LLSD(mMessage));
+
+ return TRUE;
+}
+
+LLFloaterMarketplaceValidation::~LLFloaterMarketplaceValidation()
+{
+}
+
+// virtual
+void LLFloaterMarketplaceValidation::draw()
+{
+ // draw children
+ LLModalDialog::draw();
+}
+
+// static
+void LLFloaterMarketplaceValidation::onContinue( void* userdata )
+{
+ LLFloaterMarketplaceValidation* self = (LLFloaterMarketplaceValidation*) userdata;
+
+ // destroys this object
+ self->closeFloater();
+}
+
+
+
+
diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h
index f2ff58a712..0906ce30a7 100755
--- a/indra/newview/llfloatermarketplacelistings.h
+++ b/indra/newview/llfloatermarketplacelistings.h
@@ -32,6 +32,8 @@
#include "llinventoryfilter.h"
#include "llinventorypanel.h"
#include "llnotificationptr.h"
+#include "llmodaldialog.h"
+#include "lltexteditor.h"
class LLInventoryCategoriesObserver;
class LLInventoryCategoryAddedObserver;
@@ -122,9 +124,8 @@ private:
LLPanelMarketplaceListings * mPanelListings;
};
-
//-----------------------------------------------------------------------------
-// LLFloaterAssociateListing()
+// LLFloaterAssociateListing
//-----------------------------------------------------------------------------
class LLFloaterAssociateListing : public LLFloater
{
@@ -146,4 +147,28 @@ private:
LLUUID mUUID;
};
+//-----------------------------------------------------------------------------
+// LLFloaterMarketplaceValidation
+//-----------------------------------------------------------------------------
+// Note: For the moment, we just display the validation text. Eventually, we should
+// get the validation triggered on the server and display the html report.
+// *TODO : morph into an html/text window using the pattern in llfloatertos
+
+class LLFloaterMarketplaceValidation : public LLModalDialog
+{
+public:
+ LLFloaterMarketplaceValidation(const LLSD& data);
+ virtual ~LLFloaterMarketplaceValidation();
+
+ BOOL postBuild();
+
+ virtual void draw();
+
+ static void onContinue( void* userdata );
+
+private:
+ std::string mMessage;
+ LLTextEditor* mEditor;
+};
+
#endif // LL_LLFLOATERMARKETPLACELISTINGS_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index e5f19d3cce..49f1529caf 100755
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -246,6 +246,7 @@ void LLViewerFloaterReg::registerFloaters()
}
LLFloaterReg::add("media_settings", "floater_media_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMediaSettings>);
LLFloaterReg::add("marketplace_listings", "floater_marketplace_listings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMarketplaceListings>);
+ LLFloaterReg::add("marketplace_validation", "floater_marketplace_validation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMarketplaceValidation>);
LLFloaterReg::add("message_critical", "floater_critical.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTOS>);
LLFloaterReg::add("message_tos", "floater_tos.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTOS>);
LLFloaterReg::add("moveview", "floater_moveview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMove>);
diff --git a/indra/newview/skins/default/xui/en/floater_marketplace_validation.xml b/indra/newview/skins/default/xui/en/floater_marketplace_validation.xml
new file mode 100755
index 0000000000..eaaae60175
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_marketplace_validation.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ can_close="false"
+ can_minimize="false"
+ height="500"
+ layout="topleft"
+ title="MARKETPLACE VALIDATION LOG"
+ positioning="centered"
+ width="600">
+ <button
+ height="20"
+ label="Continue"
+ label_selected="Continue"
+ layout="topleft"
+ left="484"
+ name="Continue"
+ top="465"
+ width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerif"
+ height="20"
+ layout="topleft"
+ left="20"
+ name="tos_heading"
+ top="20"
+ width="552">
+ The Marketplace Validation reported the following:
+ </text>
+ <text_editor
+ type="string"
+ length="1"
+ bg_readonly_color="1 1 1 1"
+ bottom="455"
+ follows="left|top"
+ font="SansSerif"
+ layout="topleft"
+ left="20"
+ max_length="65536"
+ name="tos_text"
+ right="-20"
+ text_readonly_color="0 0 0 1"
+ top="45"
+ word_wrap="true">
+ TOS_TEXT
+ </text_editor>
+</floater>