mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-04 18:20:14 +00:00
bug5802: removed Qualtrics feedback form integration and corresponding Feedback links
This commit is contained in:
1 parent
affe522012
commit
3705925668
12 files changed
+6
-189
No files matched your search
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN" "http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
|
||||
<module>
|
||||
<inherits name='com.sap.sailing.gwt.home.HomeBase'/>
|
||||
<inherits name='com.sap.sse.gwt.Qualtrics'/>
|
||||
<inherits name='com.sap.sailing.gwt.home.HomeBase'/>
|
||||
<entry-point class="com.sap.sailing.gwt.home.shared.SwitchingEntryPoint" />
|
||||
</module>
|
||||
-12
@@ -22,7 +22,6 @@ import com.sap.sailing.gwt.home.shared.SwitchingEntryPoint;
|
||||
import com.sap.sailing.gwt.home.shared.app.PlaceNavigation;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sse.gwt.client.controls.languageselect.LanguageSelector;
|
||||
import com.sap.sse.gwt.qualtrics.Qualtrics;
|
||||
import com.sap.sse.gwt.shared.ClientConfiguration;
|
||||
import com.sap.sse.gwt.shared.DebugConstants;
|
||||
|
||||
@@ -34,7 +33,6 @@ public class Footer extends Composite {
|
||||
|
||||
@UiField AnchorElement whatsNewAnchor;
|
||||
@UiField AnchorElement supportAnchor;
|
||||
@UiField AnchorElement feedbackAnchor;
|
||||
@UiField LanguageSelector languageSelector;
|
||||
@UiField DivElement copyrightDiv;
|
||||
@UiField AnchorElement imprintAnchorLink;
|
||||
@@ -60,26 +58,16 @@ public class Footer extends Composite {
|
||||
}
|
||||
}
|
||||
});
|
||||
Event.sinkEvents(feedbackAnchor, Event.ONCLICK);
|
||||
Event.setEventListener(feedbackAnchor, event->{
|
||||
if (Event.ONCLICK == event.getTypeInt()) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
Qualtrics.triggerIntercepts();
|
||||
}
|
||||
});
|
||||
if (!ClientConfiguration.getInstance().isBrandingActive()) {
|
||||
copyrightDiv.getStyle().setDisplay(NONE);
|
||||
languageSelector.setLabelText(StringMessages.INSTANCE.whitelabelFooterLanguage());
|
||||
supportAnchor.getStyle().setDisplay(Display.NONE);
|
||||
feedbackAnchor.getStyle().setDisplay(Display.NONE);
|
||||
whatsNewAnchor.getStyle().setDisplay(Display.NONE);
|
||||
imprintAnchorLink.getStyle().setDisplay(Display.NONE);
|
||||
privacyAnchorLink.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
copyrightDiv.setAttribute(DebugConstants.DEBUG_ID_ATTRIBUTE, "copyrightDiv");
|
||||
supportAnchor.setAttribute(DEBUG_ID_ATTRIBUTE, "supportAnchor");
|
||||
feedbackAnchor.setAttribute(DEBUG_ID_ATTRIBUTE, "feedbackAnchor");
|
||||
whatsNewAnchor.setAttribute(DEBUG_ID_ATTRIBUTE, "whatsNewAnchor");
|
||||
imprintAnchorLink.setAttribute(DEBUG_ID_ATTRIBUTE, "imprintAnchorLink");
|
||||
privacyAnchorLink.setAttribute(DEBUG_ID_ATTRIBUTE, "privacyAnchorLink");
|
||||
|
||||
-3
@@ -23,9 +23,6 @@
|
||||
<a ui:field="supportAnchor" href="https://support.sapsailing.com" target="_blank" class="{local_res.css.sitefooter_links_link}">
|
||||
<ui:text from='{i18n.footerSupport}' />
|
||||
</a>
|
||||
<a ui:field="feedbackAnchor" href="" class="{local_res.css.sitefooter_links_link}">
|
||||
<ui:text from='{i18n.footerFeedback}' />
|
||||
</a>
|
||||
<a ui:field="mobileUi" href="HomeMobile.html"
|
||||
class="{local_res.css.sitefooter_links_link} {res.mediaCss.showonsmall} {res.mediaCss.hideonmedium} {res.mediaCss.hideonlarge}">
|
||||
Mobile
|
||||
|
||||
-11
@@ -21,7 +21,6 @@ import com.sap.sailing.gwt.home.mobile.app.MobilePlacesNavigator;
|
||||
import com.sap.sailing.gwt.home.shared.SwitchingEntryPoint;
|
||||
import com.sap.sailing.gwt.ui.client.StringMessages;
|
||||
import com.sap.sse.gwt.client.controls.languageselect.LanguageSelector;
|
||||
import com.sap.sse.gwt.qualtrics.Qualtrics;
|
||||
import com.sap.sse.gwt.shared.ClientConfiguration;
|
||||
|
||||
/**
|
||||
@@ -35,7 +34,6 @@ public class Footer extends Composite {
|
||||
|
||||
@UiField Anchor whatsNewLinkUi;
|
||||
@UiField AnchorElement supportAnchor;
|
||||
@UiField AnchorElement feedbackAnchor;
|
||||
@UiField LanguageSelector languageSelector;
|
||||
@UiField DivElement copyrightDiv;
|
||||
@UiField AnchorElement imprintAnchorLink;
|
||||
@@ -58,19 +56,10 @@ public class Footer extends Composite {
|
||||
}
|
||||
}
|
||||
});
|
||||
Event.sinkEvents(feedbackAnchor, Event.ONCLICK);
|
||||
Event.setEventListener(feedbackAnchor, event->{
|
||||
if (Event.ONCLICK == event.getTypeInt()) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
Qualtrics.setExplicitTrigger(true);
|
||||
}
|
||||
});
|
||||
if (!ClientConfiguration.getInstance().isBrandingActive()) {
|
||||
copyrightDiv.getStyle().setDisplay(NONE);
|
||||
languageSelector.setLabelText(StringMessages.INSTANCE.whitelabelFooterLanguage());
|
||||
supportAnchor.getStyle().setDisplay(Display.NONE);
|
||||
feedbackAnchor.getStyle().setDisplay(Display.NONE);
|
||||
whatsNewLinkUi.getElement().getStyle().setDisplay(Display.NONE);
|
||||
imprintAnchorLink.getStyle().setDisplay(Display.NONE);
|
||||
}
|
||||
|
||||
-8
@@ -15,10 +15,6 @@
|
||||
<a ui:field="imprintAnchorLink">
|
||||
<ui:text from='{i18n.footerLegal}' />
|
||||
</a>
|
||||
<!-- <a href="http://www.sap.com/about/legal/impressum.html?campaigncode=CRM-XH21-OSP-Sailing" -->
|
||||
<!-- title="{i18n.footerLegal}"> -->
|
||||
<!-- <ui:text from='{i18n.footerLegal}' /> -->
|
||||
<!-- </a> -->
|
||||
|
|
||||
<a href="https://www.sap.com/about/legal/privacy.html?campaigncode=CRM-XH21-OSP-Sailing"
|
||||
title="{i18n.footerPrivacy}">
|
||||
@@ -30,10 +26,6 @@
|
||||
<ui:text from='{i18n.footerSupport}' />
|
||||
</a>
|
||||
|
|
||||
<a ui:field="feedbackAnchor" href="" title="{i18n.footerFeedback}">
|
||||
<ui:text from='{i18n.footerFeedback}' />
|
||||
</a>
|
||||
|
|
||||
<a ui:field="desktopUi" href="HomeDesktop.html" title="Desktop">
|
||||
Desktop
|
||||
</a>
|
||||
|
||||
+3
-5
@@ -15,12 +15,10 @@
|
||||
<inherits name='com.google.gwt.maps.Maps' />
|
||||
<!-- Highcharts API -->
|
||||
<inherits name="com.sap.sse.gwt.Highcharts_Autoinject" />
|
||||
<!-- Qualtrics Feedback -->
|
||||
<inherits name="com.sap.sse.gwt.Qualtrics" />
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='com.sap.sailing.gwt.ui.raceboard.RaceBoardEntryPoint'/>
|
||||
<!-- module containing locale configuration -->
|
||||
<inherits name='com.sap.sailing.gwt.common.SailingLocalesAllPermutations' />
|
||||
<!-- module containing locale configuration -->
|
||||
<inherits name='com.sap.sailing.gwt.common.SailingLocalesAllPermutations' />
|
||||
<inherits name='com.sap.sailing.gwt.ui.SourceCommon' />
|
||||
<inherits name='com.sap.sailing.gwt.ui.SourceClient' />
|
||||
<inherits name='com.sap.sailing.gwt.ui.SourceShared' />
|
||||
@@ -28,6 +26,6 @@
|
||||
<inherits name="com.sap.sailing.gwt.ui.SourceRaceboard"/>
|
||||
<inherits name="com.sap.sailing.gwt.ui.SourceLeaderboard" />
|
||||
<inherits name="com.sap.sailing.gwt.ui.SourceAdminConsole" />
|
||||
<inherits name='com.sap.sailing.gwt.settings.Settings'/>
|
||||
<inherits name='com.sap.sailing.gwt.settings.Settings'/>
|
||||
<inherits name='com.sap.sse.gwt.CommonControlCSS_Autoinject'/>
|
||||
</module>
|
||||
@@ -69,7 +69,6 @@ Export-Package: com.google.gwt.user.client.rpc.core.java.util,
|
||||
com.sap.sse.gwt.dispatch.shared.commands,
|
||||
com.sap.sse.gwt.dispatch.shared.exceptions,
|
||||
com.sap.sse.gwt.linker,
|
||||
com.sap.sse.gwt.qualtrics,
|
||||
com.sap.sse.gwt.resources,
|
||||
com.sap.sse.gwt.server,
|
||||
com.sap.sse.gwt.server.filestorage,
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
package com.sap.sse.gwt.qualtrics;
|
||||
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.ScriptInjector;
|
||||
import com.google.gwt.dom.client.AnchorElement;
|
||||
import com.google.gwt.dom.client.DivElement;
|
||||
import com.google.gwt.dom.client.Document;
|
||||
|
||||
/**
|
||||
* Convenience class to inject Qualtrics script content. To use a Qualtrics survey in your entry point, inherit the
|
||||
* {@code com.sap.sse.gwt.Qualtrics} module which has an entry point that injects the script code needed. Then, if your
|
||||
* Qualtrics "Intercept" is setup of for an explicit JavaScript trigger, invoke the {@link #triggerIntercepts()} method
|
||||
* to trigger them.
|
||||
* <p>
|
||||
* The Qualtrics loading code can be copied from the Qualtrics dashboard
|
||||
* (see, e.g., <a href="https://sapdemo.eu.qualtrics.com/">https://sapdemo.eu.qualtrics.com/</a>) in the category
|
||||
* "Settings / Deployment" where the Javascript snippet can be found. Copy it to the {@code resources/qualtrics.js}
|
||||
* file, stripping off the HTML comments and the <script> tag surrounding it. Copy the project ID that you find
|
||||
* in the <div> element's {@code id} field at the bottom of the snippet as well as in your Qualtrics dashboard's
|
||||
* URL parameter {@code ContextZone} into the file {@code resources/qualtricsProjectId.txt}. In your Qualtrics dashboard
|
||||
* under "Settings" find the "Manage Project / Project Options" drop-down menu and set the "Project Loading Options"
|
||||
* to "Manually Load Project."<p>
|
||||
*
|
||||
* An example UiBinder usage with an {@link AnchorElement} can look like this:
|
||||
*
|
||||
* <pre>
|
||||
* @UiField AnchorElement feedbackAnchor;
|
||||
* ...
|
||||
* Event.sinkEvents(feedbackAnchor, Event.ONCLICK);
|
||||
* Event.setEventListener(feedbackAnchor, event -> {
|
||||
* if (Event.ONCLICK == event.getTypeInt()) {
|
||||
* event.preventDefault();
|
||||
* event.stopPropagation();
|
||||
* Qualtrics.triggerIntercepts();
|
||||
* }
|
||||
* });
|
||||
* </pre>
|
||||
*
|
||||
* In your {@code .gwt.ui} file things would then look something like this:
|
||||
*
|
||||
* <pre>
|
||||
* <a ui:field="feedbackAnchor" href="" title="{i18n.footerFeedback}">
|
||||
* <ui:text from='{i18n.footerFeedback}' />
|
||||
* </a>
|
||||
* </pre>
|
||||
*
|
||||
* @author Axel Uhl (D043530)
|
||||
*
|
||||
*/
|
||||
public final class Qualtrics {
|
||||
public static QualtricsRessource QUALTRICS_RESSOURCES = GWT.create(QualtricsRessource.class);
|
||||
|
||||
private static boolean isInjected = false;
|
||||
|
||||
protected Qualtrics() {
|
||||
}
|
||||
|
||||
/**
|
||||
* inject minimal js required for Qualtrics survey
|
||||
*/
|
||||
static void ensureInjected(final String projectId) {
|
||||
if (!isInjected) {
|
||||
ScriptInjector.fromString(QUALTRICS_RESSOURCES.qualtricsLoadingCode().getText()).setWindow(ScriptInjector.TOP_WINDOW).inject();
|
||||
// Now produce the following div:
|
||||
// <div id='ZN_7WmsxxHQyCeUivX'><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>
|
||||
final DivElement div = Document.get().createDivElement();
|
||||
div.setId(projectId);
|
||||
div.setInnerHTML("<!--DO NOT REMOVE-CONTENTS PLACED HERE-->");
|
||||
isInjected = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this, e.g., in your "onclick" handler for your anchor, link or button to trigger the Qualtrics Intercepts
|
||||
* loaded for your page that are configured for explicit JavaScript invocation.
|
||||
*/
|
||||
public static native void triggerIntercepts() /*-{
|
||||
$wnd.QSI.API.unload();
|
||||
$wnd.QSI.API.load();
|
||||
$wnd.QSI.API.run();
|
||||
}-*/;
|
||||
|
||||
public static native void unload() /*-{
|
||||
$wnd.QSI.API.unload();
|
||||
}-*/;
|
||||
|
||||
public static native void load() /*-{
|
||||
$wnd.QSI.API.load();
|
||||
}-*/;
|
||||
|
||||
public static native void run() /*-{
|
||||
$wnd.QSI.API.run();
|
||||
}-*/;
|
||||
|
||||
public static native void setExplicitTrigger(boolean trigger) /*-{
|
||||
$wnd.QSI.triggerExplicitly = trigger ? 1 : 0;
|
||||
$wnd.QSI.API.unload();
|
||||
$wnd.QSI.API.load();
|
||||
$wnd.QSI.API.run();
|
||||
}-*/;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.sap.sse.gwt.qualtrics;
|
||||
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.sap.sse.gwt.shared.ClientConfiguration;
|
||||
|
||||
public class QualtricsInjectingEntryPoint implements EntryPoint {
|
||||
@Override
|
||||
public void onModuleLoad() {
|
||||
if (ClientConfiguration.getInstance().isBrandingActive()) {
|
||||
GWT.log("Inject Qualtrics");
|
||||
Qualtrics.ensureInjected(/* project ID */ "ZN_7WmsxxHQyCeUivX");
|
||||
} else {
|
||||
GWT.log("Qualtrics not injected because debranding is active");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.sap.sse.gwt.qualtrics;
|
||||
|
||||
import com.google.gwt.resources.client.ClientBundle;
|
||||
import com.google.gwt.resources.client.TextResource;
|
||||
|
||||
/**
|
||||
* Encapsulates the embedding information of a Qualtrics project. Copy the JavaScript part of your deployment code
|
||||
* as found in your Qualtrics project's Settings/Deployment section, without the <script> tags and the HTML comment
|
||||
* tags surrounding it, into the {@code resources/qualtrics.js} file and place the project ID, as found, e.g., in the
|
||||
* {@code ContextZone} URL parameter in your Qualtrics dashboard page or at the end of the deployment HTML snippet
|
||||
* in the {@code id} attribute of the {@code div} tag shown there, into the file {@code resources/qualtricsProjectId.txt}.
|
||||
* Then see the {@link Qualtrics} class for how to use in your GWT project.
|
||||
*
|
||||
* @author Axel Uhl (D043530)
|
||||
*
|
||||
*/
|
||||
public interface QualtricsRessource extends ClientBundle {
|
||||
@Source("resources/qualtrics.js")
|
||||
TextResource qualtricsLoadingCode();
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/* BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET */
|
||||
(function(){var g=function(e,h,f,g){
|
||||
this.get=function(a){for(var a=a+"=",c=document.cookie.split(";"),b=0,e=c.length;b<e;b++){for(var d=c[b];" "==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};
|
||||
this.set=function(a,c){var b="",b=new Date;b.setTime(b.getTime()+6048E5);b="; expires="+b.toGMTString();document.cookie=a+"="+c+b+"; path=/; "};
|
||||
this.check=function(){var a=this.get(f);if(a)a=a.split(":");else if(100!=e)"v"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(":"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case "v":return!1;case "r":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(":")),!c}return!0};
|
||||
this.go=function(){if(this.check()){var a=document.createElement("script");a.type="text/javascript";a.src=g;document.body&&document.body.appendChild(a)}};
|
||||
this.start=function(){var t=this;"complete"!==document.readyState?window.addEventListener?window.addEventListener("load",function(){t.go()},!1):window.attachEvent&&window.attachEvent("onload",function(){t.go()}):t.go()};};
|
||||
try{(new g(100,"r","QSI_S_ZN_7WmsxxHQyCeUivX","https://zn7wmsxxhqyceuivx-sapdemo.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_7WmsxxHQyCeUivX")).start()}catch(i){}})();
|
||||
/* END WEBSITE FEEDBACK SNIPPET */
|
||||
@@ -1,5 +1,7 @@
|
||||
# Including Qualtrics Survey in Web Application
|
||||
|
||||
This article is deprecated. With bug 5802 we have removed the Qualtrics feedback facility from the solution again.
|
||||
|
||||
## Qualtrics Configuration
|
||||
|
||||
The Qualtrics configuration should be visible under [https://sapdemo.eu.qualtrics.com/Q/MyProjectsSection](https://sapdemo.eu.qualtrics.com/Q/MyProjectsSection), but sometimes it's not. Sometimes, only the survey itself with its evaluation reports can be seen there. The special link [https://sapdemo.eu.qualtrics.com/siui/#/projects/ZN_7WmsxxHQyCeUivX/creatives/list-view](https://sapdemo.eu.qualtrics.com/siui/#/projects/ZN_7WmsxxHQyCeUivX/creatives/list-view) may help to get to the relevant configuration content. Get in touch with thomas.esser@sap.com for questions around getting an account. See [here](https://www.qualtrics.com/support/website-app-feedback/common-use-cases/single-page-application/) for documentation.
|
||||
|
||||
Reference in new issue
Block a user