Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Artifacts/clientdist/_githash_client.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0e824076e1184dd9a9734cf70b23c0f84ec54fd9
b3a397c75a352412fb341a4e7f69f2b146099a51
Binary file modified Artifacts/clientdist/clientpackage.zip
Binary file not shown.
Binary file modified Artifacts/clientdist/clientsourcepackage.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions Client/src/modules/AMCModule_ContentItem_Upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ export default class AMCApplicationItem_Content_Upload extends Common.AMCApplica
this.acceptedtypes = "";

if (this.uploadclass == "build") {
this.acceptedtypes = ".3mf";
this.acceptedtypes = itemJSON.acceptedtypes || ".3mf";
}

if (this.uploadclass == "image") {
this.acceptedtypes = ".png,.jpg";
this.acceptedtypes = itemJSON.acceptedtypes || ".png,.jpg";
}

this.state = new AMCUploadState (this.uuid);
Expand Down
1 change: 1 addition & 0 deletions Implementation/API/amc_api_constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AMC_API_KEY_UI_ITEMUPLOADFILENAME "uploadfilename"
#define AMC_API_KEY_UI_ITEMUPLOADSUCCESSEVENT "uploadsuccessevent"
#define AMC_API_KEY_UI_ITEMUPLOADFAILUREEVENT "uploadfailureevent"
#define AMC_API_KEY_UI_ITEMUPLOADACCEPTEDTYPES "acceptedtypes"
#define AMC_API_KEY_UI_ITEMVALUE "value"
#define AMC_API_KEY_UI_ITEMSORTABLE "sortable"
#define AMC_API_KEY_UI_ITEMWIDTH "width"
Expand Down
8 changes: 5 additions & 3 deletions Implementation/UI/amc_ui_module_contentitem_upload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ PUIModule_ContentUpload CUIModule_ContentUpload::makeFromXML(const pugi::xml_nod

auto successeventAttrib = xmlNode.attribute("successevent");
auto failureeventAttrib = xmlNode.attribute("failureevent");
auto acceptedtypesAttrib = xmlNode.attribute("acceptedtypes");

return std::make_shared <CUIModule_ContentUpload> (pUIModuleEnvironment->contentRegistry(), classExpression, captionExpression, successeventAttrib.as_string (), failureeventAttrib.as_string (), sItemName, sModulePath, pUIModuleEnvironment->stateMachineData ());
return std::make_shared <CUIModule_ContentUpload> (pUIModuleEnvironment->contentRegistry(), classExpression, captionExpression, successeventAttrib.as_string (), failureeventAttrib.as_string (), acceptedtypesAttrib.as_string (), sItemName, sModulePath, pUIModuleEnvironment->stateMachineData ());
}



CUIModule_ContentUpload::CUIModule_ContentUpload(CUIModule_ContentRegistry* pOwner, CUIExpression uploadClass, CUIExpression uploadCaption, const std::string& sSuccessEvent, const std::string& sFailureEvent, const std::string& sItemName, const std::string& sModulePath, PStateMachineData pStateMachineData)
: CUIModule_ContentItem(AMCCommon::CUtils::createUUID(), sItemName, sModulePath), m_UploadClass(uploadClass), m_UploadCaption (uploadCaption), m_sSuccessEvent (sSuccessEvent), m_sFailureEvent (sFailureEvent), m_pStateMachineData (pStateMachineData), m_pOwner (pOwner)
CUIModule_ContentUpload::CUIModule_ContentUpload(CUIModule_ContentRegistry* pOwner, CUIExpression uploadClass, CUIExpression uploadCaption, const std::string& sSuccessEvent, const std::string& sFailureEvent, const std::string& sAcceptedTypes, const std::string& sItemName, const std::string& sModulePath, PStateMachineData pStateMachineData)
: CUIModule_ContentItem(AMCCommon::CUtils::createUUID(), sItemName, sModulePath), m_UploadClass(uploadClass), m_UploadCaption (uploadCaption), m_sSuccessEvent (sSuccessEvent), m_sFailureEvent (sFailureEvent), m_sAcceptedTypes (sAcceptedTypes), m_pStateMachineData (pStateMachineData), m_pOwner (pOwner)
{
LibMCAssertNotNull(pStateMachineData);
LibMCAssertNotNull(pOwner);
Expand All @@ -85,6 +86,7 @@ void CUIModule_ContentUpload::addLegacyContentToJSON(CJSONWriter& writer, CJSONW
object.addString(AMC_API_KEY_UI_ITEMUPLOADFILENAME, "");
object.addString(AMC_API_KEY_UI_ITEMUPLOADSUCCESSEVENT, m_sSuccessEvent);
object.addString(AMC_API_KEY_UI_ITEMUPLOADFAILUREEVENT, m_sFailureEvent);
object.addString(AMC_API_KEY_UI_ITEMUPLOADACCEPTEDTYPES, m_sAcceptedTypes);
}


Expand Down
3 changes: 2 additions & 1 deletion Implementation/UI/amc_ui_module_contentitem_upload.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ namespace AMC {
CUIExpression m_UploadCaption;
std::string m_sSuccessEvent;
std::string m_sFailureEvent;
std::string m_sAcceptedTypes;
CUIModule_ContentRegistry* m_pOwner;

public:

static PUIModule_ContentUpload makeFromXML(const pugi::xml_node& xmlNode, const std::string& sItemName, const std::string& sModulePath, PUIModuleEnvironment pUIModuleEnvironment);

CUIModule_ContentUpload(CUIModule_ContentRegistry* pOwner, CUIExpression uploadClass, CUIExpression uploadCaption, const std::string & sSuccessEvent, const std::string& sFailureEvent, const std::string& sItemName, const std::string& sModulePath, PStateMachineData pStateMachineData);
CUIModule_ContentUpload(CUIModule_ContentRegistry* pOwner, CUIExpression uploadClass, CUIExpression uploadCaption, const std::string & sSuccessEvent, const std::string& sFailureEvent, const std::string& sAcceptedTypes, const std::string& sItemName, const std::string& sModulePath, PStateMachineData pStateMachineData);

virtual ~CUIModule_ContentUpload();

Expand Down