Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ggw 369/export import structures #4349

Open
wants to merge 32 commits into
base: future/GGW
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ccbcf4b
Ad import export structures buttons
brianbrix Oct 1, 2024
4661655
Ad import export structures buttons
brianbrix Oct 2, 2024
da65a34
Ad import export structures buttons
brianbrix Oct 2, 2024
af64f8b
Ad import export structures buttons
brianbrix Oct 3, 2024
5e96f3f
Ad import export structures buttons
brianbrix Oct 4, 2024
26fd0d7
Ad import export structures buttons
brianbrix Oct 4, 2024
8897dda
Ad import export structures buttons
brianbrix Oct 4, 2024
35e7f55
Add import export structures buttons
brianbrix Oct 6, 2024
0c38bc1
Import button color
brianbrix Oct 8, 2024
d13e4a0
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
e35889c
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
b14ca23
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
23f05c2
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
b5c2f77
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
cddc9f2
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
a7d570d
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
64710e5
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
4efac49
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
ac17a61
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
a368cf5
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
a925a5c
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
6bda795
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
964d352
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
82f28d0
GGW-369: Resolve project saving ajax issue
brianbrix Nov 6, 2024
26c05ba
GGW-369: Structures section styling
brianbrix Nov 7, 2024
32b470b
GGW-369: Structures section styling
brianbrix Nov 7, 2024
b188988
GGW-369: Structures section styling
brianbrix Nov 7, 2024
516e766
GGW-369: Structures section styling
brianbrix Nov 7, 2024
42d6ea9
GGW-369: Structures section styling
brianbrix Nov 7, 2024
4e3d3ed
GGW-369: Structures section styling
brianbrix Nov 7, 2024
7ca9109
GGW-369 arrange colors
jdeanquin-dg Nov 11, 2024
bf2927a
GGW-369 arrange colors
jdeanquin-dg Nov 11, 2024
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
30 changes: 16 additions & 14 deletions amp/WEB-INF/src/org/dgfoundation/amp/onepager/OnePagerApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* @author mihai
*/
public class OnePagerApp extends AuthenticatedWebApplication {

public static boolean IS_DEVELOPMENT_MODE = false;

private static Logger logger = Logger.getLogger(OnePagerApp.class);
Expand Down Expand Up @@ -73,47 +73,48 @@ public void init() {
IS_DEVELOPMENT_MODE = true;
}


//getResourceSettings().setStripJavaScriptCommentsAndWhitespace(true);
//getResourceSettings().setAddLastModifiedTimeToResourceReferenceUrl(true);
//TODO:
//TODO:1.5
//TODO:
/*
*
if (true) {
*
if (true) {
ResourceMount.mountWicketResources("script", this);

ResourceMount mount = new ResourceMount();
//.setResourceVersionProvider(new RevisionVersionProvider());


LinkedList<ResourceSpec> csslist = new LinkedList<ResourceSpec>();
//csslist.add(new ResourceSpec(YuiLib.class, "calendar/assets/skins/sam/calendar.css"));
//csslist.add(new ResourceSpec(new ResourceReference("TEMPLATE/ampTemplate/css_2/amp-wicket.css")));


LinkedList<ResourceSpec> jslist = new LinkedList<ResourceSpec>();
jslist.add(new ResourceSpec(JQueryBehavior.class, JQueryBehavior.JQUERY_FILE_NAME));
//jslist.add(new ResourceSpec(AutoCompleteBehavior.class, "wicket-autocomplete.js"));
jslist.add(new ResourceSpec(AbstractDefaultAjaxBehavior.class, "wicket-ajax.js"));
jslist.add(new ResourceSpec(IHeaderContributor.class, "wicket-event.js"));
jslist.add(new ResourceSpec(AmpSubsectionFeaturePanel.class, "subsectionSlideToggle.js"));
jslist.add(new ResourceSpec(AmpStructuresFormSectionFeature.class, "gisPopup.js"));
// jslist.add(new ResourceSpec(YuiLib.class, "yahoo/yahoo-min.js"));
// jslist.add(new ResourceSpec(YuiLib.class, "yahoodomevent/yahoo-dom-event.js"));
// jslist.add(new ResourceSpec(YuiLib.class, "yahoo/yahoo-min.js"));
// jslist.add(new ResourceSpec(YuiLib.class, "yahoodomevent/yahoo-dom-event.js"));
// jslist.add(new ResourceSpec(YuiLib.class, "yuiloader.js")); //can't use the min version, because the normal one will be included too
// jslist.add(new ResourceSpec(YuiLib.class, "calendar/calendar-min.js"));
// jslist.add(new ResourceSpec(DatePicker.class, "wicket-date.js"));
jslist.add(new ResourceSpec(AbstractDefaultAjaxBehavior.class, "wicket-ajax-debug.js"));
jslist.add(new ResourceSpec(AmpAjaxBehavior.class, "translationsOnDocumentReady.js"));
jslist.add(new ResourceSpec(AmpActivityFormFeature.class, "previewLogframe.js"));
jslist.add(new ResourceSpec(AmpActivityFormFeature.class, "saveNavigationPanel.js"));

mount.clone()
.setPath("/style/all-23.css")
.addResourceSpecs(csslist)
.mount(this);

mount.clone()
.setPath("/style/all-2.js")
.addResourceSpecs(jslist)
Expand Down Expand Up @@ -219,16 +220,17 @@ public void setAuthenticationManager(AuthenticationManager authenticationManager
@Override
protected WebResponse newWebResponse(WebRequest webRequest, HttpServletResponse httpServletResponse) {
return new ServletWebResponse((ServletWebRequest) webRequest, httpServletResponse) {

@Override
public void flush() {
// Add the X-Frame-Options header
try {
getContainerResponse().flushBuffer();
} catch (SocketException e) {
logger.warn("Socket exception encountered, ignoring", e);
} catch (IOException e) {
// Socket Exception can be wrapped by a container specific exception.
// So we check the cause of the container exception
Throwable rootCause = null != e.getCause() ? e.getCause() : e;
// Check if the root cause is a SocketException
Throwable rootCause = (e.getCause() != null) ? e.getCause() : e;
if (rootCause instanceof SocketException) {
logger.warn("Socket exception encountered, ignoring.", rootCause);
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.dgfoundation.amp.onepager;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class XFrameOptionsFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {
// Initialization code if needed
}

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
HttpServletResponse httpResponse = (HttpServletResponse) response;
httpResponse.setHeader("Access-Control-Allow-Origin", "*");
httpResponse.setHeader("X-Frame-Options", "SAMEORIGIN");
chain.doFilter(request, response);
}

@Override
public void destroy() {
// Cleanup code if needed
}
}
Loading