You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/04/15 23:39:46 UTC
svn commit: r1673966 [24/31] - in /isis/site/trunk/content/docs: ./
css/asciidoctor/ css/font-awesome/4.3.0/css/ css/font-awesome/4.3.0/fonts/
css/font-awesome/4.3.0/less/ css/font-awesome/4.3.0/scss/ css/foundation/
css/foundation/5.5.1/ getting-start...
Added: isis/site/trunk/content/docs/user-guide/user-guide-how-tos-derived-members.html
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/docs/user-guide/user-guide-how-tos-derived-members.html?rev=1673966&view=auto
==============================================================================
--- isis/site/trunk/content/docs/user-guide/user-guide-how-tos-derived-members.html (added)
+++ isis/site/trunk/content/docs/user-guide/user-guide-how-tos-derived-members.html Wed Apr 15 21:39:44 2015
@@ -0,0 +1,833 @@
+<!doctype html>
+
+<html class="no-js" lang="en">
+
+<head>
+
+ <meta charset="utf-8"/>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+
+
+
+ <title>User Guide: How-tos: Derived Members</title>
+
+
+
+ <!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+
+ or more contributor license agreements. See the NOTICE file
+
+ distributed with this work for additional information
+
+ regarding copyright ownership. The ASF licenses this file
+
+ to you under the Apache License, Version 2.0 (the
+
+ "License"); you may not use this file except in compliance
+
+ with the License. You may obtain a copy of the License at
+
+
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+
+
+ Unless required by applicable law or agreed to in writing,
+
+ software distributed under the License is distributed on an
+
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+
+ KIND, either express or implied. See the License for the
+
+ specific language governing permissions and limitations
+
+ under the License.
+
+ -->
+
+
+
+ <!-- No caching headers -->
+
+ <meta http-equiv="cache-control" content="no-cache" />
+
+ <meta http-equiv="pragma" content="no-cache" />
+
+ <meta http-equiv="expires" content="-1" />
+
+
+
+
+
+ <link rel="stylesheet" href="../css/foundation/5.5.1/foundation.css"/>
+
+ <script src="../js/foundation/5.5.1/vendor/modernizr.js"></script>
+
+
+
+ <link href="../css/asciidoctor/stylesheets/foundation-potion.css" rel="stylesheet">
+
+
+
+ <link href="../css/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
+
+
+
+ <style type="text/css">
+
+ #forkongithub a{
+
+ display: none;
+
+ background:#090;
+
+ color:#fff;
+
+ text-decoration:none;
+
+ font-family:arial, sans-serif;
+
+ text-align:center;
+
+ font-weight:bold;
+
+ padding:5px 40px;
+
+ font-size:1rem;
+
+ line-height:2rem;
+
+ position:relative;
+
+ transition:0.5s;
+
+ }
+
+ #forkongithub a:hover{
+
+ background:#0D0;
+
+ color:#fff;
+
+ }
+
+ #forkongithub a::before,
+
+ #forkongithub a::after{
+
+ content:"";width:100%;
+
+ display:block;
+
+ position:fixed;
+
+ top:1px;
+
+ left:0;
+
+ height:1px;
+
+ background:#fff;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a::after{
+
+ bottom:1px;
+
+ top:auto;
+
+ }
+
+ @media screen and (min-width:768px){
+
+ #forkongithub{
+
+ position:fixed;
+
+ display:block;
+
+ top:0;
+
+ right:0;
+
+ width:250px;
+
+ overflow:hidden;
+
+ height:250px;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a{
+
+ display:inherit;
+
+ width:250px;
+
+ position:fixed;
+
+ font-size:small;
+
+ top:40px;
+
+ right:-60px;
+
+ transform:rotate(45deg);
+
+ -webkit-transform:rotate(45deg);
+
+ -ms-transform:rotate(45deg);
+
+ box-shadow:4px 4px 10px rgba(0,0,0,0.8);
+
+ }
+
+ }
+
+ </style>
+
+
+
+ <style>
+
+ body {
+
+ position: relative;
+
+ }
+
+
+
+ body div#toc li,
+
+ body div#toc2 li {
+
+ list-style-type: none;
+
+ }
+
+
+
+ div#doc-content {
+
+ margin-top: 30px;
+
+ }
+
+
+
+ body div#toc li.active-region:before,
+
+ body div#toc2 li.active-region:before {
+
+ content: "\00BB \0020";
+
+ margin-left: -12px;
+
+ }
+
+
+
+ body div#toc li a.active,
+
+ body div#toc2 li a.active {
+
+ color: red;
+
+ }
+
+
+
+ body div#toc.toc,
+
+ body div#toc.toc2 {
+
+ position: fixed;
+
+ left: auto;
+
+ padding-top: 120px;
+
+ z-index: auto;
+
+ background-color: white;
+
+ border-left-color: #eee;
+
+ border-left-style: solid;
+
+ border-right: none;
+
+ }
+
+ </style>
+
+
+
+</head>
+
+<body>
+
+
+
+ <span id="forkongithub">
+
+ <a href="https://github.com/apache/isis">Fork me on GitHub</a>
+
+ </span>
+
+
+
+<div class="row">
+
+
+
+ <div class="fixed contain-to-grid">
+
+ <nav class="top-bar" data-topbar role="navigation">
+
+ <ul class="title-area">
+
+ <li class="name">
+
+ <h1>
+
+ <a href="/index.html">Apache Isis™</a>
+
+ </h1>
+
+ </li>
+
+ <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
+
+ <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
+
+ </ul>
+
+
+
+ <section class="top-bar-section">
+
+ <ul class="right">
+
+
+
+ <li class="has-form">
+
+ <FORM class="searchbox navbar-form navbar-right" id="searchbox_012614087480249044419:dn-q5gtwxya" action="http://www.google.com/cse">
+
+ <div class="row collapse">
+
+ <input type="hidden" name="cx" value="012614087480249044419:dn-q5gtwxya">
+
+ <INPUT type="hidden" name="cof" value="FORID:0">
+
+ <INPUT class="form-control" name="q" type="text" placeholder="Search">
+
+ </div>
+
+ </FORM>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ <!-- Left Nav Section -->
+
+ <ul class="left">
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >Demos</b></a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/elevator-pitch/isis-in-pictures.html">Screenshots</a></li>
+
+ <li><a href="/intro/tutorials/screencasts.html">Screencasts <img src="/images/tv_show-25.png"></a></li>
+
+ <li><a href="/intro/powered-by/powered-by.html">Powered by</a></li>
+
+ <li><a href="http://isisdemo.mmyco.co.uk/" target="_blank">Online Demo</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li><a href="/documentation">Documentation</a></li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Downloads</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/getting-started/simpleapp-archetype.html">Isis (Maven archetype)</a></li>
+
+ <li><a href="/download.html">Isis (downloads)</a></li>
+
+ <li><a href="http://www.isisaddons.org" target="_blank">Isis Add-ons (not ASF)</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Help</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/support.html">Mailing Lists</a></li>
+
+ <li><a href="http://isis.markmail.org/search/?q=" target="_blank">Mailing List Archives</a></li>
+
+ <li><a href="https://issues.apache.org/jira/browse/ISIS" target="_blank">JIRA</a></li>
+
+ <li><a href="http://github.com/apache/isis" target="_blank">Github mirror</a></li>
+
+ <li><a href="http://stackoverflow.com/questions/tagged/isis" target="_blank">Stack Overflow</a></li>
+
+ <li><a href="/contributors/contributing.html">How to contribute</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >@ASF</a>
+
+ <ul class="dropdown">
+
+ <li>
+
+ <a href="http://www.apache.org/" target="_blank">Apache Homepage <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/licenses/" target="_blank">Licenses <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/security/" target="_blank">Security <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="{{base}}more-thanks.html">More thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ </section>
+
+ </nav>
+
+ </div>
+
+</div>
+
+
+
+<div class="row">
+
+ <div class="large-8 medium-8 columns">
+
+
+
+ <div id="doc-content">
+
+ <div id="preamble">
+<div class="sectionbody">
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_derived_property">Derived Property</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+<div class="sect1">
+<h2 id="_derived_collection">Derived Collection</h2>
+<div class="sectionbody">
+<div class="sidebarblock">
+<div class="content">
+<div class="title">Inlining query-only repository action</div>
+<div class="paragraph">
+<p>While derived properties and derived collections typically "walk the graph" to associated objects, there is nothing to prevent the returned value being the result of invoking a repository (domain service) action.</p>
+</div>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">Customer</span> {
+ ...
+ public <span class="predefined-type">List</span><Order> getMostRecentOrders() {
+ <span class="keyword">return</span> orderRepo.findMostRecentOrders(<span class="local-variable">this</span>, <span class="integer">5</span>);
+ }
+}</code></pre>
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_trigger_on_property_change">Trigger on property change</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+<div class="sect1">
+<h2 id="_trigger_on_collection_change">Trigger on collection change</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+
+ </div>
+
+
+
+ <hr>
+
+ <footer>
+
+ <p class="small">
+
+ Copyright © 2010~2015 The Apache Software Foundation, licensed under the Apache License, v2.0.
+
+ <br/>
+
+ Apache, the Apache feather logo, Apache Isis, and the Apache Isis project logo are all trademarks of The Apache Software Foundation.
+
+ </p>
+
+ </footer>
+
+
+
+ </div>
+
+
+
+ <div class="large-4 medium-4 columns">
+
+ <!-- the 'hide' class is removed by Javascript -->
+
+ <div id="toc" class="toc2 hide">
+
+ <ul class="sectlevel1">
+<li><a href="#_derived_property">Derived Property</a></li>
+<li><a href="#_derived_collection">Derived Collection</a></li>
+<li><a href="#_trigger_on_property_change">Trigger on property change</a></li>
+<li><a href="#_trigger_on_collection_change">Trigger on collection change</a></li>
+</ul>
+
+ </div>
+
+ </div>
+
+</div>
+
+
+
+
+
+ <script src="../js/foundation/5.5.1/vendor/jquery.js"></script>
+
+ <script src="../js/foundation/5.5.1/foundation.min.js"></script>
+
+
+
+
+
+<script type="text/javascript">
+
+ $(document).foundation();
+
+
+
+ $(document).ready(function(){
+
+ // Cache selectors
+
+ var lastId,
+
+ topMenu = $("div#toc ul"),
+
+ topMenuHeight = 70,
+
+
+
+ menuItems = topMenu.find("a"),
+
+ menuItemsHrefs = menuItems.map(function(){
+
+ var item = $($(this).attr("href"));
+
+ if (item.length) { return item; }
+
+ });
+
+
+
+ // Bind click handler to menu items to scroll animation
+
+ menuItems.click(function(e){
+
+ var href = $(this).attr("href"),
+
+ offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
+
+ $('html, body').stop().animate({
+
+ scrollTop: offsetTop
+
+ }, 300);
+
+
+
+ e.preventDefault();
+
+ });
+
+
+
+ // Bind to scroll of window
+
+ $( window ).scroll(function(){
+
+
+
+ // Get container scroll position
+
+ var fromTop = $(this).scrollTop()+topMenuHeight;
+
+
+
+ var cur = menuItemsHrefs.map(function(){
+
+ if ($(this).offset().top < fromTop)
+
+ return this;
+
+ });
+
+
+
+ // Get the id of the current element
+
+ cur = cur[cur.length-1];
+
+
+
+ var id = cur && cur.length ? cur[0].id : "";
+
+
+
+ //console.log("id = " + id + ", lastId = " + lastId);
+
+
+
+ if (lastId !== id && id) {
+
+ scrollTo(id);
+
+ }
+
+ });
+
+
+
+ scrollTo = function(id) {
+
+ lastId = id;
+
+
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ menuItems
+
+ .parents("ul").hide();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .addClass("active");
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parent().children("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("li").addClass("active-region");
+
+
+
+ }
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ var syncMenuItem;
+
+ if(window.location.hash!=="") {
+
+ var menuItemFor = $.grep(menuItems, function(e) {
+
+ return e.hash === window.location.hash;
+
+ });
+
+ console.log(menuItemFor);
+
+ if(menuItemFor.length === 1) {
+
+ syncMenuItem = menuItemFor[0];
+
+ }
+
+ }
+
+
+
+ if(!syncMenuItem){
+
+ syncMenuItem = menuItems[0];
+
+ }
+
+
+
+ $("#toc").removeClass("hide");
+
+
+
+ $(syncMenuItem).click();
+
+
+
+ });
+
+
+
+
+
+</script>
+
+
+
+
+
+</body>
+
+</html>
\ No newline at end of file
Added: isis/site/trunk/content/docs/user-guide/user-guide-how-tos-drop-downs-and-defaults.html
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/docs/user-guide/user-guide-how-tos-drop-downs-and-defaults.html?rev=1673966&view=auto
==============================================================================
--- isis/site/trunk/content/docs/user-guide/user-guide-how-tos-drop-downs-and-defaults.html (added)
+++ isis/site/trunk/content/docs/user-guide/user-guide-how-tos-drop-downs-and-defaults.html Wed Apr 15 21:39:44 2015
@@ -0,0 +1,857 @@
+<!doctype html>
+
+<html class="no-js" lang="en">
+
+<head>
+
+ <meta charset="utf-8"/>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+
+
+
+ <title>User Guide: How-tos: Business Rules</title>
+
+
+
+ <!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+
+ or more contributor license agreements. See the NOTICE file
+
+ distributed with this work for additional information
+
+ regarding copyright ownership. The ASF licenses this file
+
+ to you under the Apache License, Version 2.0 (the
+
+ "License"); you may not use this file except in compliance
+
+ with the License. You may obtain a copy of the License at
+
+
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+
+
+ Unless required by applicable law or agreed to in writing,
+
+ software distributed under the License is distributed on an
+
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+
+ KIND, either express or implied. See the License for the
+
+ specific language governing permissions and limitations
+
+ under the License.
+
+ -->
+
+
+
+ <!-- No caching headers -->
+
+ <meta http-equiv="cache-control" content="no-cache" />
+
+ <meta http-equiv="pragma" content="no-cache" />
+
+ <meta http-equiv="expires" content="-1" />
+
+
+
+
+
+ <link rel="stylesheet" href="../css/foundation/5.5.1/foundation.css"/>
+
+ <script src="../js/foundation/5.5.1/vendor/modernizr.js"></script>
+
+
+
+ <link href="../css/asciidoctor/stylesheets/foundation-potion.css" rel="stylesheet">
+
+
+
+ <link href="../css/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
+
+
+
+ <style type="text/css">
+
+ #forkongithub a{
+
+ display: none;
+
+ background:#090;
+
+ color:#fff;
+
+ text-decoration:none;
+
+ font-family:arial, sans-serif;
+
+ text-align:center;
+
+ font-weight:bold;
+
+ padding:5px 40px;
+
+ font-size:1rem;
+
+ line-height:2rem;
+
+ position:relative;
+
+ transition:0.5s;
+
+ }
+
+ #forkongithub a:hover{
+
+ background:#0D0;
+
+ color:#fff;
+
+ }
+
+ #forkongithub a::before,
+
+ #forkongithub a::after{
+
+ content:"";width:100%;
+
+ display:block;
+
+ position:fixed;
+
+ top:1px;
+
+ left:0;
+
+ height:1px;
+
+ background:#fff;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a::after{
+
+ bottom:1px;
+
+ top:auto;
+
+ }
+
+ @media screen and (min-width:768px){
+
+ #forkongithub{
+
+ position:fixed;
+
+ display:block;
+
+ top:0;
+
+ right:0;
+
+ width:250px;
+
+ overflow:hidden;
+
+ height:250px;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a{
+
+ display:inherit;
+
+ width:250px;
+
+ position:fixed;
+
+ font-size:small;
+
+ top:40px;
+
+ right:-60px;
+
+ transform:rotate(45deg);
+
+ -webkit-transform:rotate(45deg);
+
+ -ms-transform:rotate(45deg);
+
+ box-shadow:4px 4px 10px rgba(0,0,0,0.8);
+
+ }
+
+ }
+
+ </style>
+
+
+
+ <style>
+
+ body {
+
+ position: relative;
+
+ }
+
+
+
+ body div#toc li,
+
+ body div#toc2 li {
+
+ list-style-type: none;
+
+ }
+
+
+
+ div#doc-content {
+
+ margin-top: 30px;
+
+ }
+
+
+
+ body div#toc li.active-region:before,
+
+ body div#toc2 li.active-region:before {
+
+ content: "\00BB \0020";
+
+ margin-left: -12px;
+
+ }
+
+
+
+ body div#toc li a.active,
+
+ body div#toc2 li a.active {
+
+ color: red;
+
+ }
+
+
+
+ body div#toc.toc,
+
+ body div#toc.toc2 {
+
+ position: fixed;
+
+ left: auto;
+
+ padding-top: 120px;
+
+ z-index: auto;
+
+ background-color: white;
+
+ border-left-color: #eee;
+
+ border-left-style: solid;
+
+ border-right: none;
+
+ }
+
+ </style>
+
+
+
+</head>
+
+<body>
+
+
+
+ <span id="forkongithub">
+
+ <a href="https://github.com/apache/isis">Fork me on GitHub</a>
+
+ </span>
+
+
+
+<div class="row">
+
+
+
+ <div class="fixed contain-to-grid">
+
+ <nav class="top-bar" data-topbar role="navigation">
+
+ <ul class="title-area">
+
+ <li class="name">
+
+ <h1>
+
+ <a href="/index.html">Apache Isis™</a>
+
+ </h1>
+
+ </li>
+
+ <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
+
+ <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
+
+ </ul>
+
+
+
+ <section class="top-bar-section">
+
+ <ul class="right">
+
+
+
+ <li class="has-form">
+
+ <FORM class="searchbox navbar-form navbar-right" id="searchbox_012614087480249044419:dn-q5gtwxya" action="http://www.google.com/cse">
+
+ <div class="row collapse">
+
+ <input type="hidden" name="cx" value="012614087480249044419:dn-q5gtwxya">
+
+ <INPUT type="hidden" name="cof" value="FORID:0">
+
+ <INPUT class="form-control" name="q" type="text" placeholder="Search">
+
+ </div>
+
+ </FORM>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ <!-- Left Nav Section -->
+
+ <ul class="left">
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >Demos</b></a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/elevator-pitch/isis-in-pictures.html">Screenshots</a></li>
+
+ <li><a href="/intro/tutorials/screencasts.html">Screencasts <img src="/images/tv_show-25.png"></a></li>
+
+ <li><a href="/intro/powered-by/powered-by.html">Powered by</a></li>
+
+ <li><a href="http://isisdemo.mmyco.co.uk/" target="_blank">Online Demo</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li><a href="/documentation">Documentation</a></li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Downloads</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/getting-started/simpleapp-archetype.html">Isis (Maven archetype)</a></li>
+
+ <li><a href="/download.html">Isis (downloads)</a></li>
+
+ <li><a href="http://www.isisaddons.org" target="_blank">Isis Add-ons (not ASF)</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Help</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/support.html">Mailing Lists</a></li>
+
+ <li><a href="http://isis.markmail.org/search/?q=" target="_blank">Mailing List Archives</a></li>
+
+ <li><a href="https://issues.apache.org/jira/browse/ISIS" target="_blank">JIRA</a></li>
+
+ <li><a href="http://github.com/apache/isis" target="_blank">Github mirror</a></li>
+
+ <li><a href="http://stackoverflow.com/questions/tagged/isis" target="_blank">Stack Overflow</a></li>
+
+ <li><a href="/contributors/contributing.html">How to contribute</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >@ASF</a>
+
+ <ul class="dropdown">
+
+ <li>
+
+ <a href="http://www.apache.org/" target="_blank">Apache Homepage <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/licenses/" target="_blank">Licenses <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/security/" target="_blank">Security <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="{{base}}more-thanks.html">More thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ </section>
+
+ </nav>
+
+ </div>
+
+</div>
+
+
+
+<div class="row">
+
+ <div class="large-8 medium-8 columns">
+
+
+
+ <div id="doc-content">
+
+ <div id="preamble">
+<div class="sectionbody">
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_for_properties">For Properties</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_choices_for_property">Choices for Property</h3>
+
+</div>
+<div class="sect2">
+<h3 id="_auto_complete_for_property">Auto-complete for property</h3>
+
+</div>
+<div class="sect2">
+<h3 id="_default_for_property">Default for property</h3>
+
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_for_action_parameters">For Action Parameters</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_choices_for_action_parameter">Choices for action parameter</h3>
+
+</div>
+<div class="sect2">
+<h3 id="_dependent_choices_for_action_params">Dependent choices for action params</h3>
+
+</div>
+<div class="sect2">
+<h3 id="_auto_complete_for_action_param">Auto-complete for action param</h3>
+
+</div>
+<div class="sect2">
+<h3 id="_default_for_action_param">Default for action param</h3>
+
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_for_both_properties_and_action_parameters">For both Properties and Action Parameters</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_drop_down_for_limited_number_of_instances">Drop-down for limited number of instances</h3>
+
+</div>
+<div class="sect2">
+<h3 id="_auto_complete_repository_based">Auto-complete (repository-based)</h3>
+
+</div>
+</div>
+</div>
+
+ </div>
+
+
+
+ <hr>
+
+ <footer>
+
+ <p class="small">
+
+ Copyright © 2010~2015 The Apache Software Foundation, licensed under the Apache License, v2.0.
+
+ <br/>
+
+ Apache, the Apache feather logo, Apache Isis, and the Apache Isis project logo are all trademarks of The Apache Software Foundation.
+
+ </p>
+
+ </footer>
+
+
+
+ </div>
+
+
+
+ <div class="large-4 medium-4 columns">
+
+ <!-- the 'hide' class is removed by Javascript -->
+
+ <div id="toc" class="toc2 hide">
+
+ <ul class="sectlevel1">
+<li><a href="#_for_properties">For Properties</a>
+<ul class="sectlevel2">
+<li><a href="#_choices_for_property">Choices for Property</a></li>
+<li><a href="#_auto_complete_for_property">Auto-complete for property</a></li>
+<li><a href="#_default_for_property">Default for property</a></li>
+</ul>
+</li>
+<li><a href="#_for_action_parameters">For Action Parameters</a>
+<ul class="sectlevel2">
+<li><a href="#_choices_for_action_parameter">Choices for action parameter</a></li>
+<li><a href="#_dependent_choices_for_action_params">Dependent choices for action params</a></li>
+<li><a href="#_auto_complete_for_action_param">Auto-complete for action param</a></li>
+<li><a href="#_default_for_action_param">Default for action param</a></li>
+</ul>
+</li>
+<li><a href="#_for_both_properties_and_action_parameters">For both Properties and Action Parameters</a>
+<ul class="sectlevel2">
+<li><a href="#_drop_down_for_limited_number_of_instances">Drop-down for limited number of instances</a></li>
+<li><a href="#_auto_complete_repository_based">Auto-complete (repository-based)</a></li>
+</ul>
+</li>
+</ul>
+
+ </div>
+
+ </div>
+
+</div>
+
+
+
+
+
+ <script src="../js/foundation/5.5.1/vendor/jquery.js"></script>
+
+ <script src="../js/foundation/5.5.1/foundation.min.js"></script>
+
+
+
+
+
+<script type="text/javascript">
+
+ $(document).foundation();
+
+
+
+ $(document).ready(function(){
+
+ // Cache selectors
+
+ var lastId,
+
+ topMenu = $("div#toc ul"),
+
+ topMenuHeight = 70,
+
+
+
+ menuItems = topMenu.find("a"),
+
+ menuItemsHrefs = menuItems.map(function(){
+
+ var item = $($(this).attr("href"));
+
+ if (item.length) { return item; }
+
+ });
+
+
+
+ // Bind click handler to menu items to scroll animation
+
+ menuItems.click(function(e){
+
+ var href = $(this).attr("href"),
+
+ offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
+
+ $('html, body').stop().animate({
+
+ scrollTop: offsetTop
+
+ }, 300);
+
+
+
+ e.preventDefault();
+
+ });
+
+
+
+ // Bind to scroll of window
+
+ $( window ).scroll(function(){
+
+
+
+ // Get container scroll position
+
+ var fromTop = $(this).scrollTop()+topMenuHeight;
+
+
+
+ var cur = menuItemsHrefs.map(function(){
+
+ if ($(this).offset().top < fromTop)
+
+ return this;
+
+ });
+
+
+
+ // Get the id of the current element
+
+ cur = cur[cur.length-1];
+
+
+
+ var id = cur && cur.length ? cur[0].id : "";
+
+
+
+ //console.log("id = " + id + ", lastId = " + lastId);
+
+
+
+ if (lastId !== id && id) {
+
+ scrollTo(id);
+
+ }
+
+ });
+
+
+
+ scrollTo = function(id) {
+
+ lastId = id;
+
+
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ menuItems
+
+ .parents("ul").hide();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .addClass("active");
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parent().children("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("li").addClass("active-region");
+
+
+
+ }
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ var syncMenuItem;
+
+ if(window.location.hash!=="") {
+
+ var menuItemFor = $.grep(menuItems, function(e) {
+
+ return e.hash === window.location.hash;
+
+ });
+
+ console.log(menuItemFor);
+
+ if(menuItemFor.length === 1) {
+
+ syncMenuItem = menuItemFor[0];
+
+ }
+
+ }
+
+
+
+ if(!syncMenuItem){
+
+ syncMenuItem = menuItems[0];
+
+ }
+
+
+
+ $("#toc").removeClass("hide");
+
+
+
+ $(syncMenuItem).click();
+
+
+
+ });
+
+
+
+
+
+</script>
+
+
+
+
+
+</body>
+
+</html>
\ No newline at end of file
Added: isis/site/trunk/content/docs/user-guide/user-guide-how-tos-entity-relationships.html
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/docs/user-guide/user-guide-how-tos-entity-relationships.html?rev=1673966&view=auto
==============================================================================
--- isis/site/trunk/content/docs/user-guide/user-guide-how-tos-entity-relationships.html (added)
+++ isis/site/trunk/content/docs/user-guide/user-guide-how-tos-entity-relationships.html Wed Apr 15 21:39:44 2015
@@ -0,0 +1,799 @@
+<!doctype html>
+
+<html class="no-js" lang="en">
+
+<head>
+
+ <meta charset="utf-8"/>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+
+
+
+ <title>User Guide: How-tos: Entity Relationships</title>
+
+
+
+ <!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+
+ or more contributor license agreements. See the NOTICE file
+
+ distributed with this work for additional information
+
+ regarding copyright ownership. The ASF licenses this file
+
+ to you under the Apache License, Version 2.0 (the
+
+ "License"); you may not use this file except in compliance
+
+ with the License. You may obtain a copy of the License at
+
+
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+
+
+ Unless required by applicable law or agreed to in writing,
+
+ software distributed under the License is distributed on an
+
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+
+ KIND, either express or implied. See the License for the
+
+ specific language governing permissions and limitations
+
+ under the License.
+
+ -->
+
+
+
+ <!-- No caching headers -->
+
+ <meta http-equiv="cache-control" content="no-cache" />
+
+ <meta http-equiv="pragma" content="no-cache" />
+
+ <meta http-equiv="expires" content="-1" />
+
+
+
+
+
+ <link rel="stylesheet" href="../css/foundation/5.5.1/foundation.css"/>
+
+ <script src="../js/foundation/5.5.1/vendor/modernizr.js"></script>
+
+
+
+ <link href="../css/asciidoctor/stylesheets/foundation-potion.css" rel="stylesheet">
+
+
+
+ <link href="../css/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
+
+
+
+ <style type="text/css">
+
+ #forkongithub a{
+
+ display: none;
+
+ background:#090;
+
+ color:#fff;
+
+ text-decoration:none;
+
+ font-family:arial, sans-serif;
+
+ text-align:center;
+
+ font-weight:bold;
+
+ padding:5px 40px;
+
+ font-size:1rem;
+
+ line-height:2rem;
+
+ position:relative;
+
+ transition:0.5s;
+
+ }
+
+ #forkongithub a:hover{
+
+ background:#0D0;
+
+ color:#fff;
+
+ }
+
+ #forkongithub a::before,
+
+ #forkongithub a::after{
+
+ content:"";width:100%;
+
+ display:block;
+
+ position:fixed;
+
+ top:1px;
+
+ left:0;
+
+ height:1px;
+
+ background:#fff;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a::after{
+
+ bottom:1px;
+
+ top:auto;
+
+ }
+
+ @media screen and (min-width:768px){
+
+ #forkongithub{
+
+ position:fixed;
+
+ display:block;
+
+ top:0;
+
+ right:0;
+
+ width:250px;
+
+ overflow:hidden;
+
+ height:250px;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a{
+
+ display:inherit;
+
+ width:250px;
+
+ position:fixed;
+
+ font-size:small;
+
+ top:40px;
+
+ right:-60px;
+
+ transform:rotate(45deg);
+
+ -webkit-transform:rotate(45deg);
+
+ -ms-transform:rotate(45deg);
+
+ box-shadow:4px 4px 10px rgba(0,0,0,0.8);
+
+ }
+
+ }
+
+ </style>
+
+
+
+ <style>
+
+ body {
+
+ position: relative;
+
+ }
+
+
+
+ body div#toc li,
+
+ body div#toc2 li {
+
+ list-style-type: none;
+
+ }
+
+
+
+ div#doc-content {
+
+ margin-top: 30px;
+
+ }
+
+
+
+ body div#toc li.active-region:before,
+
+ body div#toc2 li.active-region:before {
+
+ content: "\00BB \0020";
+
+ margin-left: -12px;
+
+ }
+
+
+
+ body div#toc li a.active,
+
+ body div#toc2 li a.active {
+
+ color: red;
+
+ }
+
+
+
+ body div#toc.toc,
+
+ body div#toc.toc2 {
+
+ position: fixed;
+
+ left: auto;
+
+ padding-top: 120px;
+
+ z-index: auto;
+
+ background-color: white;
+
+ border-left-color: #eee;
+
+ border-left-style: solid;
+
+ border-right: none;
+
+ }
+
+ </style>
+
+
+
+</head>
+
+<body>
+
+
+
+ <span id="forkongithub">
+
+ <a href="https://github.com/apache/isis">Fork me on GitHub</a>
+
+ </span>
+
+
+
+<div class="row">
+
+
+
+ <div class="fixed contain-to-grid">
+
+ <nav class="top-bar" data-topbar role="navigation">
+
+ <ul class="title-area">
+
+ <li class="name">
+
+ <h1>
+
+ <a href="/index.html">Apache Isis™</a>
+
+ </h1>
+
+ </li>
+
+ <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
+
+ <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
+
+ </ul>
+
+
+
+ <section class="top-bar-section">
+
+ <ul class="right">
+
+
+
+ <li class="has-form">
+
+ <FORM class="searchbox navbar-form navbar-right" id="searchbox_012614087480249044419:dn-q5gtwxya" action="http://www.google.com/cse">
+
+ <div class="row collapse">
+
+ <input type="hidden" name="cx" value="012614087480249044419:dn-q5gtwxya">
+
+ <INPUT type="hidden" name="cof" value="FORID:0">
+
+ <INPUT class="form-control" name="q" type="text" placeholder="Search">
+
+ </div>
+
+ </FORM>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ <!-- Left Nav Section -->
+
+ <ul class="left">
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >Demos</b></a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/elevator-pitch/isis-in-pictures.html">Screenshots</a></li>
+
+ <li><a href="/intro/tutorials/screencasts.html">Screencasts <img src="/images/tv_show-25.png"></a></li>
+
+ <li><a href="/intro/powered-by/powered-by.html">Powered by</a></li>
+
+ <li><a href="http://isisdemo.mmyco.co.uk/" target="_blank">Online Demo</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li><a href="/documentation">Documentation</a></li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Downloads</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/getting-started/simpleapp-archetype.html">Isis (Maven archetype)</a></li>
+
+ <li><a href="/download.html">Isis (downloads)</a></li>
+
+ <li><a href="http://www.isisaddons.org" target="_blank">Isis Add-ons (not ASF)</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Help</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/support.html">Mailing Lists</a></li>
+
+ <li><a href="http://isis.markmail.org/search/?q=" target="_blank">Mailing List Archives</a></li>
+
+ <li><a href="https://issues.apache.org/jira/browse/ISIS" target="_blank">JIRA</a></li>
+
+ <li><a href="http://github.com/apache/isis" target="_blank">Github mirror</a></li>
+
+ <li><a href="http://stackoverflow.com/questions/tagged/isis" target="_blank">Stack Overflow</a></li>
+
+ <li><a href="/contributors/contributing.html">How to contribute</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >@ASF</a>
+
+ <ul class="dropdown">
+
+ <li>
+
+ <a href="http://www.apache.org/" target="_blank">Apache Homepage <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/licenses/" target="_blank">Licenses <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/security/" target="_blank">Security <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="{{base}}more-thanks.html">More thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ </section>
+
+ </nav>
+
+ </div>
+
+</div>
+
+
+
+<div class="row">
+
+ <div class="large-8 medium-8 columns">
+
+
+
+ <div id="doc-content">
+
+ <div id="preamble">
+<div class="sectionbody">
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_mapping_mandatory_and_optional_properties">Mapping Mandatory and Optional Properties</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+<div class="sect1">
+<h2 id="_managed_1_m_bidirectional_relationships">Managed 1:m bidirectional relationships</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+
+ </div>
+
+
+
+ <hr>
+
+ <footer>
+
+ <p class="small">
+
+ Copyright © 2010~2015 The Apache Software Foundation, licensed under the Apache License, v2.0.
+
+ <br/>
+
+ Apache, the Apache feather logo, Apache Isis, and the Apache Isis project logo are all trademarks of The Apache Software Foundation.
+
+ </p>
+
+ </footer>
+
+
+
+ </div>
+
+
+
+ <div class="large-4 medium-4 columns">
+
+ <!-- the 'hide' class is removed by Javascript -->
+
+ <div id="toc" class="toc2 hide">
+
+ <ul class="sectlevel1">
+<li><a href="#_mapping_mandatory_and_optional_properties">Mapping Mandatory and Optional Properties</a></li>
+<li><a href="#_managed_1_m_bidirectional_relationships">Managed 1:m bidirectional relationships</a></li>
+</ul>
+
+ </div>
+
+ </div>
+
+</div>
+
+
+
+
+
+ <script src="../js/foundation/5.5.1/vendor/jquery.js"></script>
+
+ <script src="../js/foundation/5.5.1/foundation.min.js"></script>
+
+
+
+
+
+<script type="text/javascript">
+
+ $(document).foundation();
+
+
+
+ $(document).ready(function(){
+
+ // Cache selectors
+
+ var lastId,
+
+ topMenu = $("div#toc ul"),
+
+ topMenuHeight = 70,
+
+
+
+ menuItems = topMenu.find("a"),
+
+ menuItemsHrefs = menuItems.map(function(){
+
+ var item = $($(this).attr("href"));
+
+ if (item.length) { return item; }
+
+ });
+
+
+
+ // Bind click handler to menu items to scroll animation
+
+ menuItems.click(function(e){
+
+ var href = $(this).attr("href"),
+
+ offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
+
+ $('html, body').stop().animate({
+
+ scrollTop: offsetTop
+
+ }, 300);
+
+
+
+ e.preventDefault();
+
+ });
+
+
+
+ // Bind to scroll of window
+
+ $( window ).scroll(function(){
+
+
+
+ // Get container scroll position
+
+ var fromTop = $(this).scrollTop()+topMenuHeight;
+
+
+
+ var cur = menuItemsHrefs.map(function(){
+
+ if ($(this).offset().top < fromTop)
+
+ return this;
+
+ });
+
+
+
+ // Get the id of the current element
+
+ cur = cur[cur.length-1];
+
+
+
+ var id = cur && cur.length ? cur[0].id : "";
+
+
+
+ //console.log("id = " + id + ", lastId = " + lastId);
+
+
+
+ if (lastId !== id && id) {
+
+ scrollTo(id);
+
+ }
+
+ });
+
+
+
+ scrollTo = function(id) {
+
+ lastId = id;
+
+
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ menuItems
+
+ .parents("ul").hide();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .addClass("active");
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parent().children("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("li").addClass("active-region");
+
+
+
+ }
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ var syncMenuItem;
+
+ if(window.location.hash!=="") {
+
+ var menuItemFor = $.grep(menuItems, function(e) {
+
+ return e.hash === window.location.hash;
+
+ });
+
+ console.log(menuItemFor);
+
+ if(menuItemFor.length === 1) {
+
+ syncMenuItem = menuItemFor[0];
+
+ }
+
+ }
+
+
+
+ if(!syncMenuItem){
+
+ syncMenuItem = menuItems[0];
+
+ }
+
+
+
+ $("#toc").removeClass("hide");
+
+
+
+ $(syncMenuItem).click();
+
+
+
+ });
+
+
+
+
+
+</script>
+
+
+
+
+
+</body>
+
+</html>
\ No newline at end of file
Added: isis/site/trunk/content/docs/user-guide/user-guide-how-tos-error-handling.html
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/docs/user-guide/user-guide-how-tos-error-handling.html?rev=1673966&view=auto
==============================================================================
--- isis/site/trunk/content/docs/user-guide/user-guide-how-tos-error-handling.html (added)
+++ isis/site/trunk/content/docs/user-guide/user-guide-how-tos-error-handling.html Wed Apr 15 21:39:44 2015
@@ -0,0 +1,799 @@
+<!doctype html>
+
+<html class="no-js" lang="en">
+
+<head>
+
+ <meta charset="utf-8"/>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+
+
+
+ <title>User Guide: How-tos: Error Handling</title>
+
+
+
+ <!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+
+ or more contributor license agreements. See the NOTICE file
+
+ distributed with this work for additional information
+
+ regarding copyright ownership. The ASF licenses this file
+
+ to you under the Apache License, Version 2.0 (the
+
+ "License"); you may not use this file except in compliance
+
+ with the License. You may obtain a copy of the License at
+
+
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+
+
+ Unless required by applicable law or agreed to in writing,
+
+ software distributed under the License is distributed on an
+
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+
+ KIND, either express or implied. See the License for the
+
+ specific language governing permissions and limitations
+
+ under the License.
+
+ -->
+
+
+
+ <!-- No caching headers -->
+
+ <meta http-equiv="cache-control" content="no-cache" />
+
+ <meta http-equiv="pragma" content="no-cache" />
+
+ <meta http-equiv="expires" content="-1" />
+
+
+
+
+
+ <link rel="stylesheet" href="../css/foundation/5.5.1/foundation.css"/>
+
+ <script src="../js/foundation/5.5.1/vendor/modernizr.js"></script>
+
+
+
+ <link href="../css/asciidoctor/stylesheets/foundation-potion.css" rel="stylesheet">
+
+
+
+ <link href="../css/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
+
+
+
+ <style type="text/css">
+
+ #forkongithub a{
+
+ display: none;
+
+ background:#090;
+
+ color:#fff;
+
+ text-decoration:none;
+
+ font-family:arial, sans-serif;
+
+ text-align:center;
+
+ font-weight:bold;
+
+ padding:5px 40px;
+
+ font-size:1rem;
+
+ line-height:2rem;
+
+ position:relative;
+
+ transition:0.5s;
+
+ }
+
+ #forkongithub a:hover{
+
+ background:#0D0;
+
+ color:#fff;
+
+ }
+
+ #forkongithub a::before,
+
+ #forkongithub a::after{
+
+ content:"";width:100%;
+
+ display:block;
+
+ position:fixed;
+
+ top:1px;
+
+ left:0;
+
+ height:1px;
+
+ background:#fff;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a::after{
+
+ bottom:1px;
+
+ top:auto;
+
+ }
+
+ @media screen and (min-width:768px){
+
+ #forkongithub{
+
+ position:fixed;
+
+ display:block;
+
+ top:0;
+
+ right:0;
+
+ width:250px;
+
+ overflow:hidden;
+
+ height:250px;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a{
+
+ display:inherit;
+
+ width:250px;
+
+ position:fixed;
+
+ font-size:small;
+
+ top:40px;
+
+ right:-60px;
+
+ transform:rotate(45deg);
+
+ -webkit-transform:rotate(45deg);
+
+ -ms-transform:rotate(45deg);
+
+ box-shadow:4px 4px 10px rgba(0,0,0,0.8);
+
+ }
+
+ }
+
+ </style>
+
+
+
+ <style>
+
+ body {
+
+ position: relative;
+
+ }
+
+
+
+ body div#toc li,
+
+ body div#toc2 li {
+
+ list-style-type: none;
+
+ }
+
+
+
+ div#doc-content {
+
+ margin-top: 30px;
+
+ }
+
+
+
+ body div#toc li.active-region:before,
+
+ body div#toc2 li.active-region:before {
+
+ content: "\00BB \0020";
+
+ margin-left: -12px;
+
+ }
+
+
+
+ body div#toc li a.active,
+
+ body div#toc2 li a.active {
+
+ color: red;
+
+ }
+
+
+
+ body div#toc.toc,
+
+ body div#toc.toc2 {
+
+ position: fixed;
+
+ left: auto;
+
+ padding-top: 120px;
+
+ z-index: auto;
+
+ background-color: white;
+
+ border-left-color: #eee;
+
+ border-left-style: solid;
+
+ border-right: none;
+
+ }
+
+ </style>
+
+
+
+</head>
+
+<body>
+
+
+
+ <span id="forkongithub">
+
+ <a href="https://github.com/apache/isis">Fork me on GitHub</a>
+
+ </span>
+
+
+
+<div class="row">
+
+
+
+ <div class="fixed contain-to-grid">
+
+ <nav class="top-bar" data-topbar role="navigation">
+
+ <ul class="title-area">
+
+ <li class="name">
+
+ <h1>
+
+ <a href="/index.html">Apache Isis™</a>
+
+ </h1>
+
+ </li>
+
+ <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
+
+ <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
+
+ </ul>
+
+
+
+ <section class="top-bar-section">
+
+ <ul class="right">
+
+
+
+ <li class="has-form">
+
+ <FORM class="searchbox navbar-form navbar-right" id="searchbox_012614087480249044419:dn-q5gtwxya" action="http://www.google.com/cse">
+
+ <div class="row collapse">
+
+ <input type="hidden" name="cx" value="012614087480249044419:dn-q5gtwxya">
+
+ <INPUT type="hidden" name="cof" value="FORID:0">
+
+ <INPUT class="form-control" name="q" type="text" placeholder="Search">
+
+ </div>
+
+ </FORM>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ <!-- Left Nav Section -->
+
+ <ul class="left">
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >Demos</b></a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/elevator-pitch/isis-in-pictures.html">Screenshots</a></li>
+
+ <li><a href="/intro/tutorials/screencasts.html">Screencasts <img src="/images/tv_show-25.png"></a></li>
+
+ <li><a href="/intro/powered-by/powered-by.html">Powered by</a></li>
+
+ <li><a href="http://isisdemo.mmyco.co.uk/" target="_blank">Online Demo</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li><a href="/documentation">Documentation</a></li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Downloads</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/getting-started/simpleapp-archetype.html">Isis (Maven archetype)</a></li>
+
+ <li><a href="/download.html">Isis (downloads)</a></li>
+
+ <li><a href="http://www.isisaddons.org" target="_blank">Isis Add-ons (not ASF)</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Help</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/support.html">Mailing Lists</a></li>
+
+ <li><a href="http://isis.markmail.org/search/?q=" target="_blank">Mailing List Archives</a></li>
+
+ <li><a href="https://issues.apache.org/jira/browse/ISIS" target="_blank">JIRA</a></li>
+
+ <li><a href="http://github.com/apache/isis" target="_blank">Github mirror</a></li>
+
+ <li><a href="http://stackoverflow.com/questions/tagged/isis" target="_blank">Stack Overflow</a></li>
+
+ <li><a href="/contributors/contributing.html">How to contribute</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >@ASF</a>
+
+ <ul class="dropdown">
+
+ <li>
+
+ <a href="http://www.apache.org/" target="_blank">Apache Homepage <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/licenses/" target="_blank">Licenses <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/security/" target="_blank">Security <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="{{base}}more-thanks.html">More thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ </section>
+
+ </nav>
+
+ </div>
+
+</div>
+
+
+
+<div class="row">
+
+ <div class="large-8 medium-8 columns">
+
+
+
+ <div id="doc-content">
+
+ <div id="preamble">
+<div class="sectionbody">
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_raise_message_errors_to_users">Raise message/errors to users</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+<div class="sect1">
+<h2 id="_exception_recognizers">Exception Recognizers</h2>
+<div class="sectionbody">
+
+</div>
+</div>
+
+ </div>
+
+
+
+ <hr>
+
+ <footer>
+
+ <p class="small">
+
+ Copyright © 2010~2015 The Apache Software Foundation, licensed under the Apache License, v2.0.
+
+ <br/>
+
+ Apache, the Apache feather logo, Apache Isis, and the Apache Isis project logo are all trademarks of The Apache Software Foundation.
+
+ </p>
+
+ </footer>
+
+
+
+ </div>
+
+
+
+ <div class="large-4 medium-4 columns">
+
+ <!-- the 'hide' class is removed by Javascript -->
+
+ <div id="toc" class="toc2 hide">
+
+ <ul class="sectlevel1">
+<li><a href="#_raise_message_errors_to_users">Raise message/errors to users</a></li>
+<li><a href="#_exception_recognizers">Exception Recognizers</a></li>
+</ul>
+
+ </div>
+
+ </div>
+
+</div>
+
+
+
+
+
+ <script src="../js/foundation/5.5.1/vendor/jquery.js"></script>
+
+ <script src="../js/foundation/5.5.1/foundation.min.js"></script>
+
+
+
+
+
+<script type="text/javascript">
+
+ $(document).foundation();
+
+
+
+ $(document).ready(function(){
+
+ // Cache selectors
+
+ var lastId,
+
+ topMenu = $("div#toc ul"),
+
+ topMenuHeight = 70,
+
+
+
+ menuItems = topMenu.find("a"),
+
+ menuItemsHrefs = menuItems.map(function(){
+
+ var item = $($(this).attr("href"));
+
+ if (item.length) { return item; }
+
+ });
+
+
+
+ // Bind click handler to menu items to scroll animation
+
+ menuItems.click(function(e){
+
+ var href = $(this).attr("href"),
+
+ offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
+
+ $('html, body').stop().animate({
+
+ scrollTop: offsetTop
+
+ }, 300);
+
+
+
+ e.preventDefault();
+
+ });
+
+
+
+ // Bind to scroll of window
+
+ $( window ).scroll(function(){
+
+
+
+ // Get container scroll position
+
+ var fromTop = $(this).scrollTop()+topMenuHeight;
+
+
+
+ var cur = menuItemsHrefs.map(function(){
+
+ if ($(this).offset().top < fromTop)
+
+ return this;
+
+ });
+
+
+
+ // Get the id of the current element
+
+ cur = cur[cur.length-1];
+
+
+
+ var id = cur && cur.length ? cur[0].id : "";
+
+
+
+ //console.log("id = " + id + ", lastId = " + lastId);
+
+
+
+ if (lastId !== id && id) {
+
+ scrollTo(id);
+
+ }
+
+ });
+
+
+
+ scrollTo = function(id) {
+
+ lastId = id;
+
+
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ menuItems
+
+ .parents("ul").hide();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .addClass("active");
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parent().children("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("li").addClass("active-region");
+
+
+
+ }
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ var syncMenuItem;
+
+ if(window.location.hash!=="") {
+
+ var menuItemFor = $.grep(menuItems, function(e) {
+
+ return e.hash === window.location.hash;
+
+ });
+
+ console.log(menuItemFor);
+
+ if(menuItemFor.length === 1) {
+
+ syncMenuItem = menuItemFor[0];
+
+ }
+
+ }
+
+
+
+ if(!syncMenuItem){
+
+ syncMenuItem = menuItems[0];
+
+ }
+
+
+
+ $("#toc").removeClass("hide");
+
+
+
+ $(syncMenuItem).click();
+
+
+
+ });
+
+
+
+
+
+</script>
+
+
+
+
+
+</body>
+
+</html>
\ No newline at end of file
Added: isis/site/trunk/content/docs/user-guide/user-guide-how-tos-i18n.html
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/docs/user-guide/user-guide-how-tos-i18n.html?rev=1673966&view=auto
==============================================================================
--- isis/site/trunk/content/docs/user-guide/user-guide-how-tos-i18n.html (added)
+++ isis/site/trunk/content/docs/user-guide/user-guide-how-tos-i18n.html Wed Apr 15 21:39:44 2015
@@ -0,0 +1,780 @@
+<!doctype html>
+
+<html class="no-js" lang="en">
+
+<head>
+
+ <meta charset="utf-8"/>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+
+
+
+ <title>User Guide: How-tos: i18n</title>
+
+
+
+ <!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+
+ or more contributor license agreements. See the NOTICE file
+
+ distributed with this work for additional information
+
+ regarding copyright ownership. The ASF licenses this file
+
+ to you under the Apache License, Version 2.0 (the
+
+ "License"); you may not use this file except in compliance
+
+ with the License. You may obtain a copy of the License at
+
+
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+
+
+ Unless required by applicable law or agreed to in writing,
+
+ software distributed under the License is distributed on an
+
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+
+ KIND, either express or implied. See the License for the
+
+ specific language governing permissions and limitations
+
+ under the License.
+
+ -->
+
+
+
+ <!-- No caching headers -->
+
+ <meta http-equiv="cache-control" content="no-cache" />
+
+ <meta http-equiv="pragma" content="no-cache" />
+
+ <meta http-equiv="expires" content="-1" />
+
+
+
+
+
+ <link rel="stylesheet" href="../css/foundation/5.5.1/foundation.css"/>
+
+ <script src="../js/foundation/5.5.1/vendor/modernizr.js"></script>
+
+
+
+ <link href="../css/asciidoctor/stylesheets/foundation-potion.css" rel="stylesheet">
+
+
+
+ <link href="../css/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
+
+
+
+ <style type="text/css">
+
+ #forkongithub a{
+
+ display: none;
+
+ background:#090;
+
+ color:#fff;
+
+ text-decoration:none;
+
+ font-family:arial, sans-serif;
+
+ text-align:center;
+
+ font-weight:bold;
+
+ padding:5px 40px;
+
+ font-size:1rem;
+
+ line-height:2rem;
+
+ position:relative;
+
+ transition:0.5s;
+
+ }
+
+ #forkongithub a:hover{
+
+ background:#0D0;
+
+ color:#fff;
+
+ }
+
+ #forkongithub a::before,
+
+ #forkongithub a::after{
+
+ content:"";width:100%;
+
+ display:block;
+
+ position:fixed;
+
+ top:1px;
+
+ left:0;
+
+ height:1px;
+
+ background:#fff;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a::after{
+
+ bottom:1px;
+
+ top:auto;
+
+ }
+
+ @media screen and (min-width:768px){
+
+ #forkongithub{
+
+ position:fixed;
+
+ display:block;
+
+ top:0;
+
+ right:0;
+
+ width:250px;
+
+ overflow:hidden;
+
+ height:250px;
+
+ z-index: 9999;
+
+ }
+
+ #forkongithub a{
+
+ display:inherit;
+
+ width:250px;
+
+ position:fixed;
+
+ font-size:small;
+
+ top:40px;
+
+ right:-60px;
+
+ transform:rotate(45deg);
+
+ -webkit-transform:rotate(45deg);
+
+ -ms-transform:rotate(45deg);
+
+ box-shadow:4px 4px 10px rgba(0,0,0,0.8);
+
+ }
+
+ }
+
+ </style>
+
+
+
+ <style>
+
+ body {
+
+ position: relative;
+
+ }
+
+
+
+ body div#toc li,
+
+ body div#toc2 li {
+
+ list-style-type: none;
+
+ }
+
+
+
+ div#doc-content {
+
+ margin-top: 30px;
+
+ }
+
+
+
+ body div#toc li.active-region:before,
+
+ body div#toc2 li.active-region:before {
+
+ content: "\00BB \0020";
+
+ margin-left: -12px;
+
+ }
+
+
+
+ body div#toc li a.active,
+
+ body div#toc2 li a.active {
+
+ color: red;
+
+ }
+
+
+
+ body div#toc.toc,
+
+ body div#toc.toc2 {
+
+ position: fixed;
+
+ left: auto;
+
+ padding-top: 120px;
+
+ z-index: auto;
+
+ background-color: white;
+
+ border-left-color: #eee;
+
+ border-left-style: solid;
+
+ border-right: none;
+
+ }
+
+ </style>
+
+
+
+</head>
+
+<body>
+
+
+
+ <span id="forkongithub">
+
+ <a href="https://github.com/apache/isis">Fork me on GitHub</a>
+
+ </span>
+
+
+
+<div class="row">
+
+
+
+ <div class="fixed contain-to-grid">
+
+ <nav class="top-bar" data-topbar role="navigation">
+
+ <ul class="title-area">
+
+ <li class="name">
+
+ <h1>
+
+ <a href="/index.html">Apache Isis™</a>
+
+ </h1>
+
+ </li>
+
+ <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
+
+ <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
+
+ </ul>
+
+
+
+ <section class="top-bar-section">
+
+ <ul class="right">
+
+
+
+ <li class="has-form">
+
+ <FORM class="searchbox navbar-form navbar-right" id="searchbox_012614087480249044419:dn-q5gtwxya" action="http://www.google.com/cse">
+
+ <div class="row collapse">
+
+ <input type="hidden" name="cx" value="012614087480249044419:dn-q5gtwxya">
+
+ <INPUT type="hidden" name="cof" value="FORID:0">
+
+ <INPUT class="form-control" name="q" type="text" placeholder="Search">
+
+ </div>
+
+ </FORM>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ <!-- Left Nav Section -->
+
+ <ul class="left">
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >Demos</b></a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/elevator-pitch/isis-in-pictures.html">Screenshots</a></li>
+
+ <li><a href="/intro/tutorials/screencasts.html">Screencasts <img src="/images/tv_show-25.png"></a></li>
+
+ <li><a href="/intro/powered-by/powered-by.html">Powered by</a></li>
+
+ <li><a href="http://isisdemo.mmyco.co.uk/" target="_blank">Online Demo</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li><a href="/documentation">Documentation</a></li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Downloads</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/intro/getting-started/simpleapp-archetype.html">Isis (Maven archetype)</a></li>
+
+ <li><a href="/download.html">Isis (downloads)</a></li>
+
+ <li><a href="http://www.isisaddons.org" target="_blank">Isis Add-ons (not ASF)</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#">Help</a>
+
+ <ul class="dropdown">
+
+ <li><a href="/support.html">Mailing Lists</a></li>
+
+ <li><a href="http://isis.markmail.org/search/?q=" target="_blank">Mailing List Archives</a></li>
+
+ <li><a href="https://issues.apache.org/jira/browse/ISIS" target="_blank">JIRA</a></li>
+
+ <li><a href="http://github.com/apache/isis" target="_blank">Github mirror</a></li>
+
+ <li><a href="http://stackoverflow.com/questions/tagged/isis" target="_blank">Stack Overflow</a></li>
+
+ <li><a href="/contributors/contributing.html">How to contribute</a></li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li class="has-dropdown">
+
+ <a href="#" >@ASF</a>
+
+ <ul class="dropdown">
+
+ <li>
+
+ <a href="http://www.apache.org/" target="_blank">Apache Homepage <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/licenses/" target="_blank">Licenses <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/security/" target="_blank">Security <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ <li>
+
+ <a href="{{base}}more-thanks.html">More thanks <i class="icon-share-alt"></i></a>
+
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ </ul>
+
+
+
+ </section>
+
+ </nav>
+
+ </div>
+
+</div>
+
+
+
+<div class="row">
+
+ <div class="large-8 medium-8 columns">
+
+
+
+ <div id="doc-content">
+
+ <div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+
+ </div>
+
+
+
+ <hr>
+
+ <footer>
+
+ <p class="small">
+
+ Copyright © 2010~2015 The Apache Software Foundation, licensed under the Apache License, v2.0.
+
+ <br/>
+
+ Apache, the Apache feather logo, Apache Isis, and the Apache Isis project logo are all trademarks of The Apache Software Foundation.
+
+ </p>
+
+ </footer>
+
+
+
+ </div>
+
+
+
+ <div class="large-4 medium-4 columns">
+
+ <!-- the 'hide' class is removed by Javascript -->
+
+ <div id="toc" class="toc2 hide">
+
+
+
+ </div>
+
+ </div>
+
+</div>
+
+
+
+
+
+ <script src="../js/foundation/5.5.1/vendor/jquery.js"></script>
+
+ <script src="../js/foundation/5.5.1/foundation.min.js"></script>
+
+
+
+
+
+<script type="text/javascript">
+
+ $(document).foundation();
+
+
+
+ $(document).ready(function(){
+
+ // Cache selectors
+
+ var lastId,
+
+ topMenu = $("div#toc ul"),
+
+ topMenuHeight = 70,
+
+
+
+ menuItems = topMenu.find("a"),
+
+ menuItemsHrefs = menuItems.map(function(){
+
+ var item = $($(this).attr("href"));
+
+ if (item.length) { return item; }
+
+ });
+
+
+
+ // Bind click handler to menu items to scroll animation
+
+ menuItems.click(function(e){
+
+ var href = $(this).attr("href"),
+
+ offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1;
+
+ $('html, body').stop().animate({
+
+ scrollTop: offsetTop
+
+ }, 300);
+
+
+
+ e.preventDefault();
+
+ });
+
+
+
+ // Bind to scroll of window
+
+ $( window ).scroll(function(){
+
+
+
+ // Get container scroll position
+
+ var fromTop = $(this).scrollTop()+topMenuHeight;
+
+
+
+ var cur = menuItemsHrefs.map(function(){
+
+ if ($(this).offset().top < fromTop)
+
+ return this;
+
+ });
+
+
+
+ // Get the id of the current element
+
+ cur = cur[cur.length-1];
+
+
+
+ var id = cur && cur.length ? cur[0].id : "";
+
+
+
+ //console.log("id = " + id + ", lastId = " + lastId);
+
+
+
+ if (lastId !== id && id) {
+
+ scrollTo(id);
+
+ }
+
+ });
+
+
+
+ scrollTo = function(id) {
+
+ lastId = id;
+
+
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ menuItems
+
+ .parents("ul").hide();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .addClass("active");
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parent().children("ul").show();
+
+
+
+ menuItems
+
+ .filter("[href=#"+id+"]")
+
+ .parents("li").addClass("active-region");
+
+
+
+ }
+
+ menuItems
+
+ .removeClass("active");
+
+
+
+ menuItems
+
+ .parents()
+
+ .removeClass("active-region");
+
+
+
+ var syncMenuItem;
+
+ if(window.location.hash!=="") {
+
+ var menuItemFor = $.grep(menuItems, function(e) {
+
+ return e.hash === window.location.hash;
+
+ });
+
+ console.log(menuItemFor);
+
+ if(menuItemFor.length === 1) {
+
+ syncMenuItem = menuItemFor[0];
+
+ }
+
+ }
+
+
+
+ if(!syncMenuItem){
+
+ syncMenuItem = menuItems[0];
+
+ }
+
+
+
+ $("#toc").removeClass("hide");
+
+
+
+ $(syncMenuItem).click();
+
+
+
+ });
+
+
+
+
+
+</script>
+
+
+
+
+
+</body>
+
+</html>
\ No newline at end of file