From 06ff76695288009a5f04241fc2df801001c59d91 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 2 Aug 2017 10:51:40 -0700 Subject: [PATCH] Drag zip cleaned up, marketplaces stylized, back button fixed --- interface/src/Application.cpp | 11 +++++---- interface/src/Application.h | 2 -- scripts/system/html/js/marketplacesInject.js | 16 +++++++++---- scripts/system/html/marketplaces.html | 24 +++++++++++--------- 4 files changed, 31 insertions(+), 22 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 963ef22482..90f4198383 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -229,8 +229,6 @@ static const QString FBX_EXTENSION = ".fbx"; static const QString OBJ_EXTENSION = ".obj"; static const QString AVA_JSON_EXTENSION = ".ava.json"; static const QString WEB_VIEW_TAG = "noDownload=true"; - -// temporary zip handling for Emily static const QString ZIP_EXTENSION = ".zip"; static const float MIRROR_FULLSCREEN_DISTANCE = 0.389f; @@ -264,8 +262,6 @@ const QHash Application::_acceptedExtensi { JSON_EXTENSION, &Application::importJSONFromURL }, { JS_EXTENSION, &Application::askToLoadScript }, { FST_EXTENSION, &Application::askToSetAvatarUrl }, - - // temporary zip handling for Emily { ZIP_EXTENSION, &Application::importFromZIP } }; @@ -6355,7 +6351,12 @@ void Application::addAssetToWorldSetMapping(QString filePath, QString mapping, Q qWarning(interfaceapp) << "Error downloading model: " + errorInfo; addAssetToWorldError(filenameFromPath(filePath), errorInfo); } else { - addAssetToWorldAddEntity(filePath, mapping); + // to prevent files that aren't models from being loaded into world automatically + if (filePath.endsWith(".obj") || filePath.endsWith(".fbx")) { + addAssetToWorldAddEntity(filePath, mapping); + } else { + addAssetToWorldInfoDone(filenameFromPath(filePath)); + } } request->deleteLater(); }); diff --git a/interface/src/Application.h b/interface/src/Application.h index 033cca8452..6731cd8611 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -481,8 +481,6 @@ private: bool importJSONFromURL(const QString& urlString); bool importSVOFromURL(const QString& urlString); - - // temporary zip handling for Emily bool importFromZIP(const QString& filePath); bool nearbyEntitiesAreReadyForPhysics(); diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 0fbd9a778e..92fa869242 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -65,7 +65,10 @@ // Footer actions. $("#back-button").on("click", function () { - window.history.back(); + if (window.history.state != null) window.history.back(); + // to fix back button issue when in directory + //else window.location = "http://www.highfidelity.com/marketplace"; + else window.location = "https://metaverse.highfidelity.com/marketplace?"; }); $("#all-markets").on("click", function () { EventBridge.emitWebEvent(GOTO_DIRECTORY); @@ -79,9 +82,11 @@ letUsKnow.replaceWith(letUsKnow.html()); // Add button links. + + /* Blocks not yet implemented $('#exploreBlocksMarketplace').on('click', function () { window.location = "https://vr.google.com/objects"; - }); + });*/ $('#exploreClaraMarketplace').on('click', function () { window.location = "https://clara.io/library?gameCheck=true&public=true"; }); @@ -102,7 +107,7 @@ '' );*/ $("body").append( - 'style= "bottom: 135px" ' + '

hello

' ); } @@ -345,6 +350,7 @@ if (location.href.indexOf("google.com/") !== -1) { pageType = BLOCKS; } if (location.href.indexOf("clara.io/") !== -1) { pageType = CLARA; } + //if (pageType != BLOCKS) injectCommonCode(pageType === DIRECTORY); switch (pageType) { case DIRECTORY: @@ -354,7 +360,9 @@ injectHiFiCode(); break; case BLOCKS: - injectBlocksCode(); + console.log("in Blocks"); + //injectBlocksCode(); + console.log("blocks injection"); break; case CLARA: injectClaraCode(); diff --git a/scripts/system/html/marketplaces.html b/scripts/system/html/marketplaces.html index 8c5fe15429..11c9e208ca 100644 --- a/scripts/system/html/marketplaces.html +++ b/scripts/system/html/marketplaces.html @@ -25,24 +25,26 @@

This is the default High Fidelity marketplace. Viewing and downloading content from here is fully supported in Interface.

-
- -
-
+
+ +
+
+
@@ -53,9 +55,9 @@
  • Create an account here or log in as an existing user.
  • Choose a model from the list and click “Download to High Fidelity”.
  • -
    - -
    +
    +
    +