Skip to content

Commit

Permalink
Merge pull request #141 from xdoo/_#78
Browse files Browse the repository at this point in the history
 #78 merged
  • Loading branch information
Robert Jasny authored Jan 31, 2018
2 parents fd08431 + 6f78533 commit 30bd767
Show file tree
Hide file tree
Showing 12 changed files with 267 additions and 323 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"paper-collapse-item": "Collaborne/paper-collapse-item#^2.0.3",
"iron-ajax": "PolymerElements/iron-ajax#^2.0.5",
"paper-toast": "PolymerElements/paper-toast#^2.0.0",
"nebula-i18n": "arsnebula/nebula-i18n#^2.0.1",
"nebula-i18n": "arsnebula/nebula-i18n#^2.0.2",
"fetch": "^2.0.3",
"vaadin-grid": "vaadin/vaadin-grid#^4.0.0",
"vaadin-material-theme": "vaadin/vaadin-material-theme#^0.3.0",
Expand Down
23 changes: 0 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@
<!-- GENERATOR pattern: src/[DOMAINNAME]-app.html -->
<link rel="import" href="src/animad-app.html">

<!-- load additional components -->
<link rel="import" href="/bower_components/paper-toast/paper-toast.html">
<link rel="import" href="src/common-security/common-security-init.html">

<!-- Add any global styles for body, document, etc. -->
<style>
body {
Expand All @@ -103,28 +99,9 @@
background-color: #eeeeee;
}

#global_error_toast {
--paper-toast-background-color: red;
}

</style>
</head>
<body>
<!-- TODO add toasts for error, warning, success -->
<paper-toast
id="global_success_toast"
always-on-top>
</paper-toast>
<paper-toast
id="global_warning_toast"
always-on-top>
</paper-toast>
<paper-toast
id="global_error_toast"
duration=10000
always-on-top>
</paper-toast>
<common-security-init id="animad_security"></common-security-init>
<!-- GENERATOR pattern: <[DOMAINNAME]-app> -->
<animad-app></animad-app>
<noscript>
Expand Down
4 changes: 3 additions & 1 deletion polymer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
],
"extraDependencies": [
"manifest.json",
"bower_components/webcomponentsjs/*.js"
"bower_components/webcomponentsjs/*.js",
"bower_components/webcomponentsjs/*.map",
"bower_components/fetch/fetch.js"
],
"lint": {
"rules": ["polymer-2"]
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<resources>
<resource>
<directory>build/es6-bundled</directory>
<directory>build/es5-bundled</directory>
<targetPath>static</targetPath>
</resource>
</resources>
Expand Down
42 changes: 36 additions & 6 deletions src/animad-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
<!-- Polyfill for dropdowns -->
<link rel="import" href="../bower_components/neon-animation/web-animations.html">

<link rel="import" href="common-security/common-security-init.html">
<link rel="import" href="../bower_components/paper-toast/paper-toast.html">



<!-- GENERATOR pattern: [DOMAINNAME]-[ENTITYNAME]-view.html -->
<!-- GENERATOR hier müssen alle modellierten views rein-->
<link rel="lazy-import" href="animad-keepers-view.html">
Expand Down Expand Up @@ -76,9 +81,33 @@
color: #aa00ff;
font-weight: bold;
}


#global_error_toast {
--paper-toast-background-color: red;
}

</style>

<app-location route="{{route}}" url-space-regex="^[[rootPath]]">
<common-security-init id="animad_security" load-url="http://demo7906595.mockable.io/permissions"></common-security-init>

<!-- TODO add toasts for error, warning, success -->
<paper-toast
id="global_success_toast"
always-on-top>
</paper-toast>
<paper-toast
id="global_warning_toast"
always-on-top>
</paper-toast>
<paper-toast
id="global_error_toast"
duration=10000
always-on-top>
</paper-toast>


<app-location route="{{route}}" url-space-regex="^[[rootPath]]" use-hash-as-path>
</app-location>

<app-route route="{{route}}" pattern="[[rootPath]]:page" data="{{routeData}}" tail="{{subroute}}">
Expand All @@ -94,6 +123,7 @@
id="locales"
file="animad_locales"
path="/locales"
send-cookies="true"
resources="{{resources}}">
</nebula-resources>

Expand Down Expand Up @@ -121,20 +151,20 @@
</paper-item>
<paper-item>
<iron-icon icon="animad-icons:panda"></iron-icon>
<a name="animals-view" href="[[rootPath]]animals-view">Animals</a>
<a name="animals-view" href="#[[rootPath]]animals-view">Animals</a>
</paper-item>
<paper-item>
<iron-icon icon="animad-icons:basecamp"></iron-icon>
<a name="enclosures-view" href="[[rootPath]]enclosures-view">Enclosures</a>
<a name="enclosures-view" href="#[[rootPath]]enclosures-view">Enclosures</a>
</paper-item>
<paper-item>
<iron-icon icon="animad-icons:basecamp"></iron-icon>
<a name="security-view" href="[[rootPath]]security-view">Security</a>
<a name="security-view" href="#[[rootPath]]security-view">Security</a>
</paper-item>
<paper-item>
<iron-icon icon="animad-icons:lightbulb-on"></iron-icon>
<a name="security-view" href="[[rootPath]]keepers-formsamples-view">Keepers Forms</a>
</paper-item>
<a name="keepers-formsamples-view" href="#[[rootPath]]keepers-formsamples-view">Keepers Forms</a>
</paper-item>
</iron-selector>
</div>
</app-drawer>
Expand Down
7 changes: 0 additions & 7 deletions src/animad-security-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

<link rel="import" href="common-security/common-security-authorize.html">
<link rel="import" href="common-security/common-security-check.html">
<link rel="import" href="common-security/secure-paper-input.html">

<link rel="import" href="shared-styles.html">

Expand Down Expand Up @@ -42,12 +41,6 @@ <h1>Security view</h1>
value="{{prefill}}"></paper-input>
</p>

<!-- Beispiel 3-->
<p>
<secure-paper-input id="readonly-example" permission="RESOURCE3" label="Feld ist readonly, außer bei Permission=RESOURCE3"
value="Vorbefüllung"></secure-paper-input>
</p>

<br>
<br>
<paper-button raised>Submit</paper-button>
Expand Down
Loading

0 comments on commit 30bd767

Please sign in to comment.