Commit 98b865fd by Tuukka Kivilahti

Moya OLD -module to angular moya

1 parent 6b1db086
<router-outlet></router-outlet>
<a routerLink="/old" routerLinkActive="active">DeOldie</a>
<a routerLink="/test" routerLinkActive="active">test</a>
<a routerLink="/vip/viplist" routerLinkActive="active">viplist</a>
<a routerLink="/vip/viplist" routerLinkActive="active">viplist</a><br />
<router-outlet></router-outlet>
......@@ -10,10 +10,13 @@ import {MoyaRestModule} from "moya-angular-common";
import { RouterModule, Routes } from '@angular/router';
import {TestComponent} from "./test/test.component";
import { OldMoyaComponent } from './old-moya/old-moya.component';
import {SafePipe } from './safe.pipe';
const appRoutes: Routes = [
{ path: 'vip/viplist', component: ViplistComponent },
{ path: 'test', component: TestComponent }
{ path: 'test', component: TestComponent },
{ path: 'old', component: OldMoyaComponent }
];
......@@ -22,6 +25,8 @@ const appRoutes: Routes = [
AppComponent,
ViplistComponent,
TestComponent,
OldMoyaComponent,
SafePipe,
],
imports: [
BrowserModule,
......
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>MoyaAngular</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="/MoyaNG">
<base href="/MoyaNG/">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
......
@media print {
header,#menu,.flex1,#header_left,#header_center,#header_right,nav,#menu,.languageSelector,#leftpanel, #rightpanel, #leftpanel, #rightpanel, #toppanel
{
display: none;
}
#main {
background: none;
border: none;
}
.no_print {
display: none;
}
.printImage {
max-width: 20cm;
}
}
\ No newline at end of file
/* This is file for styling (colors and font-sizes) */
.ui-widget {
font-size: 95% !important;
}
.bgColor1.ui-layout-unit {
}
.bgColor1 .ui-layout-unit-content {
background-image: none;
}
.bgColor1 .ui-layout-unit-header {
background-image: none;
}
.missing_i18n {
color: red;
-webkit-animation-name: blinker;
-webkit-animation-duration: 1s;
-webkit-animation-timing-function: linear;
-webkit-animation-iteration-count: infinite;
-moz-animation-name: blinker;
-moz-animation-duration: 1s;
-moz-animation-timing-function: linear;
-moz-animation-iteration-count: infinite;
animation-name: blinker;
animation-duration: 1s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
@-moz-keyframes blinker {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}
@-webkit-keyframes blinker {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}
@keyframes blinker {
0% { opacity: 1.0; }
50% { opacity: 0.0; }
100% { opacity: 1.0; }
}
/* Structual stuff, like sizes, margins etc.*/
.bgColor1.ui-layout-unit {
margin: 0px;
padding: 0px;
}
.bgColor1 .ui-layout-unit-content {
margin: 0px;
padding: 0px;
}
.bgColor1 .ui-layout-unit-header {
margin: 0px;
padding: 0px;
}
#header_right {
text-align: right;
}
#header_box {
display: flex;
display: -ms-flexbox;
display: -webkit-flex;
}
#mainlayoutpanel {
margin: 10px;
padding: 10px;
}
#header_center {
position: relative;
text-align: right;
-webkit-box-flex: 1; /* OLD - iOS 6-, Safari 3.1-6 */
-moz-box-flex: 1; /* OLD - Firefox 19- */
width: 20%; /* For old syntax, otherwise collapses. */
-webkit-flex: 1; /* Chrome */
-ms-flex: 1; /* IE 10 */
flex: 1; /* NEW, Spec - Opera 12.1, Firefox 20+ */
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html class="no-js" xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:p="http://primefaces.org/ui"
xmlns:help="http://java.sun.com/jsf/composite/cditools/help"
xmlns:pe="http://primefaces.org/ui/extensions"
>
<f:view contentType="text/html" locale="#{sessionHandler.locale}">
<pe:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><h:outputText value="#{layoutView.getHeader()}" /></title>
<meta name="description" content="Lippukauppa" />
<meta name="author" content="CodeCrew ry" />
<meta http-equiv="Content-Language" content="#{sessionHandler.locale}" />
<link rel="icon" href="#{request.contextPath}/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/primelayout/css/print.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/primelayout/css/skinning.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/primelayout/css/structual.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/custom_components.css" />
<script type="text/javascript" src="#{request.contextPath}/resources/script/prime_calendar.js"></script>
<script type="text/javascript" src="#{request.contextPath}/resources/script/menufix.js"></script>
<ui:insert name="headerdata" />
<h:outputStylesheet>
.bgColor1 .ui-layout-unit-content {
background-color: #{layoutView.getLayoutProperty1('#68A3C2')};
}
.bgColor1 .ui-layout-unit-header {
background-color: #{layoutView.getLayoutProperty1('#68A3C2')};
}
</h:outputStylesheet>
</pe:head>
<h:body>
<!-- Javascript-lokalisaatiolippupuljausta -->
<h:form id="conversationKeepaliver">
<p:remoteCommand name="cdiKeepalive" onerror="PF('keepAliveDialog').show();" update=":cdiloop" actionListener="#{conversationKeepaliveView.ping()}" />
</h:form>
<p:dialog widgetVar="keepAliveDialog" showEffect="fade" hideEffect="explode" header="#{i18n['template.keepaliveError.title']}" modal="true">
<br />#{i18n['template.keepaliveError']}<br /><br />
<h:form>
<p:commandButton value="OK" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" onclick="location.reload();" />
</h:form>
</p:dialog>
<script type="text/javascript">
window.CONTEXTPATH = "#{request.contextPath}";
$(document)
.ready(
function() {
setInterval(function() {
cdiKeepalive();
}, 20000);
<ui:repeat value="#{localeSelectorView.availableLocales}" var="loc" varStatus="idx">
$(
".languageSelector .ui-button:eq(#{idx.index})")
.css(
"background",
"url('#{request.contextPath}/resources/icons/flags/#{loc.locale.language}.png') no-repeat")
.css("width", "16px").css("height",
"11px").css("padding", "0")
.css("margin-right", "5px").css(
"border-radius", "0")
</ui:repeat>
$(".languageSelector .ui-button-text").text("");
});
var apina = null;
</script>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<div class="container top">
<div style="float: left;">
<h:form id="selectLanguage">
<p:selectOneButton id="langselect" styleClass="languageSelector" value="#{sessionStore.locale}" immediate="true" converter="#{localeConverter}">
<f:selectItems value="#{localeSelectorView.availableLocales}" var="loc" itemValue="#{loc.locale}" itemLabel="#{loc.locale.displayName}" />
<p:ajax update="@all" event="change" />
</p:selectOneButton>
</h:form>
<h:link rendered="#{layoutView.manageContent}" styleClass="editorlink" value="#{i18n['layout.editTop']}" outcome="/pages/manage">
<f:param name="pagename" value="#{layoutView.pagepath}:top" />
</h:link>
</div>
<div style="float: right;">
<help:helptool />
</div>
<div style="clear: both;"> </div>
</div>
<!-- TODO: tyyleistys tähän, toisaalta tarttis tulla vaan teksti -->
<ui:insert name="title" />
<p:fieldset id="leftuserinfo" rendered="#{!sessionHandler.loggedIn}">
<div style="text-align: left; padding: 0.7em;">
<h:form>
<h:outputText rendered="#{authView.loginError}" styleClass="error" value="#{i18n['loginerror.message']}" /><br />
<p:inputText styleClass="form" id="linelogin" value="#{authView.login}" />
<p:watermark for="linelogin" value="#{i18n['login.username']}" />
<br />
<p:password styleClass="form" id="linepwd" value="#{authView.password}" />
<p:watermark for="linepwd" value="#{i18n['login.password']}" />
<br />
<br />
<p:commandButton update="messages" styleClass="button" id="onelinesubmit" action="#{authView.executeLoginAction}" ajax="false" value="#{i18n['login.submit']}" />
<br />
<br />
</h:form>
<ui:fragment rendered="#{authView.canCreateUser}">
<h:link value="#{i18n['submenu.user.create']}" outcome="/user/create" />
<br />
</ui:fragment>
<h:link value="#{i18n['submenu.auth.sendResetMail']}" outcome="/auth/sendResetMail" />
</div>
</p:fieldset>
<p:menubar rendered="#{primeMenuView.hasSecondaryMenu}" model="#{primeMenuView.secondaryMenuModel}" />
<ui:insert name="edittab" />
<ui:repeat var="cont1" value="#{menuView.getPagecontent('top')}">
<h:outputText value="#{cont1.content}" escape="false" />
</ui:repeat>
<ui:insert name="content" />
<ui:repeat var="cont1" value="#{menuView.getPagecontent('bottom')}">
<h:outputText value="#{cont1.content}" escape="false" />
</ui:repeat>
<h:link rendered="#{layoutView.manageContent}" styleClass="editorlink" value="#{i18n['layout.editBottom']}" outcome="/pages/manage">
<f:param name="pagename" value="#{layoutView.pagepath}:bottom" />
</h:link>
<h:form id="messages">
<p:growl id="growl" showDetail="true" sticky="true" widgetVar="messages_growl" />
</h:form>
<h:form>
<p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
</p:confirmDialog>
</h:form>
<script type="text/javascript">
$(function() {
if(window.self === window.top) {
var url = document.location.href.split("/MoyaWeb/", 2);
var realUrl = "/MoyaNG/old";
if(url.length > 1) {
realUrl = "/MoyaNG/old#" + url[1];
}
document.location.href = realUrl;
}
});
</script>
<c:if test="#{sessionHandler.isInDevelopmentMode()}">
<script type="text/javascript">
$('*:contains("???"):not(:has(*))').filter(
function() {
return (this.textContent || this.innerText)
.indexOf("???") === 0;
}).addClass("missing_i18n");
</script>
</c:if>
<h:outputText id="cdiloop" value="#{conversationKeepaliveView.date}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
</h:outputText>
</h:body>
</f:view>
</html>
\ No newline at end of file
......@@ -205,10 +205,13 @@
<div style="clear: both;"> </div>
</div>
<div id="inIframe" style="color: red; font-weight: bold; ">Ollaan iframessa</div>
<!-- TODO: tyyleistys tähän, toisaalta tarttis tulla vaan teksti -->
<ui:insert name="title" />
<p:menubar rendered="#{primeMenuView.hasSecondaryMenu}" model="#{primeMenuView.secondaryMenuModel}" />
......@@ -270,6 +273,12 @@
PrimeFaces.widgets.mainlayout.layout.saveCookie()
}
if(window.self !== window.top) {
$("#inIframe").show();
} else {
$("#inIframe").hide();
}
});
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!