-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#193): include room ui as java application page
- Loading branch information
1 parent
a47432c
commit 02281f6
Showing
21 changed files
with
138 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,3 +95,25 @@ jar { | |
task runExecutableJar(type: JavaExec) { | ||
classpath = files(tasks.jar) | ||
} | ||
|
||
task downloadJavascriptDependencies() { | ||
ext.downloadFile = { localPath, remoteURL -> | ||
def f = new File(localPath) | ||
if (!f.exists()) { | ||
new URL(remoteURL).withInputStream{ i -> f.withOutputStream{ it << i }} | ||
} | ||
} | ||
|
||
doLast { | ||
// https://github.com/vuejs/ | ||
downloadFile('./src/html/common/vue/vue.global.prod.js', 'https://unpkg.com/[email protected]/dist/vue.global.prod.js') | ||
|
||
// https://github.com/intlify/vue-i18n | ||
downloadFile('./src/html/common/vue/vue-i18n.global.prod.js', 'https://unpkg.com/[email protected]/dist/vue-i18n.global.prod.js') | ||
|
||
// https://github.com/axios/axios | ||
downloadFile('./src/html/common/vue/axios.min.js', 'https://unpkg.com/[email protected]/dist/axios.min.js') | ||
} | ||
} | ||
|
||
jar.dependsOn(downloadJavascriptDependencies) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.eurofurence.regsys.web.pages; | ||
|
||
import jakarta.servlet.ServletContext; | ||
import jakarta.servlet.ServletException; | ||
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import jakarta.servlet.http.HttpSession; | ||
import org.eurofurence.regsys.backend.Strings; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
|
||
public class RoomsPage extends Page { | ||
@Override | ||
public String handleRequest() throws ServletException { | ||
refreshSessionTimeout(); | ||
|
||
HashMap<String, Object> veloContext = new HashMap<>(); | ||
|
||
veloContext.put("navbar", getNavbarForm()); | ||
veloContext.put("page", this); | ||
|
||
return Page.renderTemplate(getServletContext(), "html.vm", veloContext); | ||
} | ||
|
||
@Override | ||
protected String getPageTitle() { | ||
return Strings.roomsPage.pageTitle; | ||
} | ||
|
||
@Override | ||
public String getPageTemplateFile() { | ||
return "rooms.vm"; | ||
} | ||
|
||
@Override | ||
public ArrayList<String> getHeaderJsFileList() { | ||
ArrayList<String> lst = new ArrayList<>(); | ||
lst.add("js/rooms_js.vm"); | ||
return lst; | ||
} | ||
|
||
@Override | ||
public void initialize(ServletContext servletContext, HttpServletRequest request, HttpServletResponse response, HttpSession session) { | ||
super.initialize(servletContext, request, response, session); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<script src="../vue/vue.global.prod.js"></script> | ||
<script src="../vue/vue-i18n.global.prod.js"></script> | ||
<script src="../vue/axios.min.js"></script> | ||
<script src="../vue/rooms/index.js" type="module"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#parse( "strings/rooms.strings.vm" ) | ||
<td class="contentbox"> | ||
#parse( "local/localmessage.vm" ) | ||
|
||
<div class="pageheader">$strRoomManagementTitle</div> | ||
<hr class="contentbox"/> | ||
|
||
<noscript><b>$strJavascriptDisabled</b> $strPleaseEnableJavascript</noscript> | ||
<div id="app"></div> | ||
</td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Strings used in the room management template wrapper | ||
#set( $strRoomManagementTitle = "Manage Rooms")## | ||
#set( $strJavascriptDisabled = "Javascript is disabled!")## | ||
#set( $strPleaseEnableJavascript = "Please enable it to use this page.")## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Strings used in the room management template wrapper | ||
#set( $strRoomManagementTitle = "Zimmerverwaltung")## | ||
#set( $strJavascriptDisabled = "Javascript ist deaktiviert!")## | ||
#set( $strPleaseEnableJavascript = "Bitte einschalten, um diese Seite zu benutzen.")## |