You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by br...@apache.org on 2016/12/17 21:21:36 UTC

[1/7] jspwiki git commit: Various HADDOCK updates & fixes

Repository: jspwiki
Updated Branches:
  refs/heads/master 014dc6707 -> 19b543113


http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp b/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp
index 5475585..8d9de58 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/Nav.jsp
@@ -51,14 +51,14 @@
     </c:set>
 
   <%-- view --%>
-  <wiki:CheckRequestContext context='info|diff|upload|rename|edit|conflict'>
+  <wiki:CheckRequestContext context='info|diff|upload|rename|edit|comment|conflict'>
   <li id="view">
     <wiki:Link page="${page}" ><fmt:message key="view.tab"/></wiki:Link>
   </li>
   </wiki:CheckRequestContext>
 
   <%-- attachment --%>
-  <wiki:CheckRequestContext context='view|info|rename|diff|rename|edit|conflict'>
+  <wiki:CheckRequestContext context='view|info|rename|diff|rename|edit|comment|conflict'>
   <wiki:PageExists>
   <li id="attach"
    class="<wiki:Permission permission='!upload'>disabled</wiki:Permission>">
@@ -71,7 +71,7 @@
   </wiki:CheckRequestContext>
 
   <%-- info --%>
-  <wiki:CheckRequestContext context='view|info|upload|rename|edit|conflict'>
+  <wiki:CheckRequestContext context='view|info|upload|rename|edit|comment|conflict'>
   <wiki:PageExists>
   <li id="info">
     <wiki:Link context="info" accessKey="i">
@@ -192,15 +192,15 @@
         <%-- Show Reader View --%>
         <li>
           <wiki:CheckVersion mode="latest">
-            <wiki:Link cssClass="reader-view">
+            <wiki:Link cssClass="interwiki">
               <wiki:Param name='skin' value='reader'/>
-              <fmt:message key='actions.showreaderview' /> <span class="icon-leanpub" ></span>
+              <fmt:message key='actions.showreaderview' />
             </wiki:Link>
           </wiki:CheckVersion>
           <wiki:CheckVersion mode="notlatest">
-            <wiki:Link cssClass="reader-view" version="${param.version}">
+            <wiki:Link cssClass="interwiki" version="${param.version}">
               <wiki:Param name='skin' value='reader'/>
-              <fmt:message key='actions.showreaderview' /> <span class="icon-leanpub" ></span>
+              <fmt:message key='actions.showreaderview' />
             </wiki:Link>
           </wiki:CheckVersion>
         </li>
@@ -216,6 +216,7 @@
         <wiki:PageType type="page">
           <li>
             <wiki:Link context="comment">
+              <span class="icon-plus"></span>
               <fmt:message key="actions.comment" />
             </wiki:Link>
           </li>

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp b/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp
index 2c57ebb..05ceafd 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/PageTab.jsp
@@ -23,8 +23,6 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
-<%--
-<%@ page import="javax.servlet.jsp.jstl.fmt.*" %><%--CHECK why is this needed --%>
 
 <fmt:setLocale value="${prefs.Language}" />
 <fmt:setBundle basename="templates.default"/>

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp b/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp
index fd52bc9..30523bd 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/PreferencesTab.jsp
@@ -71,6 +71,10 @@
         </ul>
     </span>
 
+    <wiki:Link cssClass="btn btn-danger pull-right"  page="${redirect}" >
+      <fmt:message key='prefs.cancel.submit'/>
+    </wiki:Link>
+
   </div>
 
   <c:if test="${param.tab eq 'prefs'}" >
@@ -121,7 +125,7 @@
 
   <div class="form-group">
     <label class="control-label form-col-20" for="prefSectionEditing"><fmt:message key="prefs.user.sectionediting"/></label>
-    <label class="btn btn-default" for="prefSectionEditing">
+    <label class="btn btn-default">
       <input class="" id="prefSectionEditing" name="prefSectionEditing"  data-pref="SectionEditing"
          type="checkbox" ${prefs.SectionEditing ? 'checked="checked"' : ''} >
       <fmt:message key="prefs.user.sectionediting.text"/>
@@ -131,7 +135,7 @@
   <c:if test='${not empty skins}'>
   <div class="form-group">
     <label class="control-label form-col-20" for="prefSkin"><fmt:message key="prefs.user.skin"/></label>
-    <select class="" id="prefSkin" name="prefSkin" data-pref="SkinName">
+    <select id="prefSkin" name="prefSkin" data-pref="SkinName">
       <c:forEach items="${skins}" var="i">
         <option value='${i}' ${prefs.SkinName==i ? 'selected="selected"' : ''} >${i}</option>
       </c:forEach>
@@ -143,7 +147,7 @@
   <c:set var="prefLanguage" ><c:out value="${prefs.Language}" default="<%=request.getLocale().toString()%>" /></c:set>
   <div class="form-group">
     <label class="control-label form-col-20" for="prefLanguage"><fmt:message key="prefs.user.language"/></label>
-    <select class="" id="prefLanguage" name="prefLanguage" data-pref="Language">
+    <select id="prefLanguage" name="prefLanguage" data-pref="Language">
       <c:forEach items='${languages}' var='lg'>
         <option value="<c:out value='${lg.key}'/>" ${fn:startsWith(prefLanguage,lg.key) ? 'selected="selected"' : ''} >${lg.value}</option>
       </c:forEach>
@@ -152,12 +156,13 @@
   </c:if>
 
   <div class="form-group">
+    <label class="hidden" for="prefLayout"><fmt:message key="prefs.user.layout"/></label>
     <label class="control-label form-col-20" for="prefOrientation"><fmt:message key="prefs.user.layout"/></label>
-    <select class="" id="prefLayout" name="prefLayout" data-pref="Layout">
+    <select id="prefLayout" name="prefLayout" data-pref="Layout">
       <option value='fluid' ${prefs.Layout=='fluid' ? 'selected="selected"' : ''} ><fmt:message key="prefs.user.layout.fluid"/></option>
       <option value='fixed' ${prefs.Layout=='fixed' ? 'selected="selected"' : ''} ><fmt:message key="prefs.user.layout.fixed"/></option>
     </select>
-    <select class="" id="prefOrientation" name="prefOrientation" data-pref="Orientation">
+    <select id="prefOrientation" name="prefOrientation" data-pref="Orientation">
       <option value='fav-left' ${prefs.Orientation=='fav-left' ? 'selected="selected"' : ''} ><fmt:message key="prefs.user.orientation.left"/></option>
       <option value='fav-right' ${prefs.Orientation=='fav-right' ? 'selected="selected"' : ''} ><fmt:message key="prefs.user.orientation.right"/></option>
       <%-- <option value='fav-hidden' ${prefs.Orientation=='fav-hidden' ? 'selected="selected"' : ''} ><fmt:message key="prefs.user.orientation.hidden"/></option>  --%>
@@ -166,7 +171,7 @@
 
   <div class="form-group">
     <label class="control-label form-col-20" for="prefTimeFormat"><fmt:message key="prefs.user.timeformat"/></label>
-    <select class="" id="prefTimeFormat" name="prefTimeFormat"  data-pref="DateFormat">
+    <select id="prefTimeFormat" name="prefTimeFormat"  data-pref="DateFormat">
       <c:forEach items='${timeformats}' var='tf' >
         <option value='<c:out value="${tf.key}"/>' ${prefs.DateFormat==tf.key ? 'selected="selected"' : ''} >${tf.value}</option>
       </c:forEach>
@@ -175,8 +180,8 @@
 
   <div class="form-group">
     <label class="control-label form-col-20" for="prefTimeZone"><fmt:message key="prefs.user.timezone"/></label>
-    <select class="" id='prefTimeZone' name='prefTimeZone'  data-pref="TimeZone">
-      <c:forEach items='${timezones}' var='tz'>
+    <select id="prefTimeZone" name="prefTimeZone"  data-pref="TimeZone">
+      <c:forEach items="${timezones}" var="tz">
         <option value='<c:out value="${tz.key}"/>' ${prefs.TimeZone==tz.key ? 'selected="selected"' : ''} >${tz.value}</option>
       </c:forEach>
     </select>

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp b/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp
index 41875c3..927ed10 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/ProfileTab.jsp
@@ -80,7 +80,7 @@
        <label class="control-label form-col-20" for="loginname"><fmt:message key="prefs.loginname"/></label>
 
        <wiki:UserProfile property="canChangeLoginName">
-           <input class="form-control form-col-50" type="text" name="loginname" id="loginname"
+           <input class="form-control form-col-50" type="text" name="loginname" id="loginname" required
                   size="20" value="<wiki:UserProfile property='loginname' />" />
        </wiki:UserProfile>
        <wiki:UserProfile property="!canChangeLoginName">
@@ -103,11 +103,11 @@
             <label class="control-label form-col-20" for="password0">Old</label>&nbsp;
             <input type="password" name="password0" id="password0" size="20" value="" />
        --%>
-       <input class="form-control form-col-50" type="password" name="password" id="password" size="20" value="" />
+       <input class="form-control form-col-50" type="password" name="password" id="password" size="20" value="" required/>
      </div>
      <div class="form-group">
        <label class="control-label form-col-20" for="password2"><fmt:message key="prefs.password2"/></label>
-       <input class="form-control form-col-50" type="password" name="password2" id="password2" size="20" value="" />
+       <input class="form-control form-col-50" type="password" name="password2" id="password2" size="20" value="" required/>
        <%-- extra validation ? min size, allowed chars? password-strength js routing --%>
      </div>
      </wiki:UserProfile>
@@ -116,7 +116,7 @@
      <div class="form-group">
        <label class="control-label form-col-20" for="fullname"><fmt:message key="prefs.fullname"/></label>
        <span class="dropdown form-col-50">
-         <input class="form-control" type="text" name="fullname" id="fullname" size="20"
+         <input class="form-control" type="text" name="fullname" id="fullname" size="20" required
                 value="<wiki:UserProfile property='fullname' />" />
          <ul class="dropdown-menu" data-hover-parent=".dropdown">
            <li class="dropdown-header"><fmt:message key="prefs.fullname.description"/></li>
@@ -128,7 +128,7 @@
      <div class="form-group">
        <label class="control-label form-col-20" for="email"><fmt:message key="prefs.email"/></label>
        <span class="dropdown form-col-50">
-         <input class="form-control" type="text" name="email" id="email" size="20"
+         <input class="form-control" type="email" name="email" id="email" size="20"
                 value="<wiki:UserProfile property='email' />" />
          <ul class="dropdown-menu" data-hover-parent=".dropdown">
            <li class="dropdown-header"><fmt:message key="prefs.email.description"/></li>

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/Sidebar.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/Sidebar.jsp b/jspwiki-war/src/main/webapp/templates/haddock/Sidebar.jsp
index 881b744..a5f5a9f 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/Sidebar.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/Sidebar.jsp
@@ -18,6 +18,7 @@
 --%>
 
 <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 <%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
 <fmt:setLocale value="${prefs.Language}" />
@@ -25,7 +26,12 @@
 <%@ page import="org.apache.wiki.*" %>
 
 <div class="sidebar">
-  <%--<button class="close" type="button">&times;</button>--%>
+
+  <c:set var="isweblog"><%= WikiContext.findContext( pageContext ).getPage().getAttribute( /*ATTR_ISWEBLOG*/ "weblogplugin.isweblog" ) %></c:set>
+  <c:if test="${isweblog}">
+  <wiki:Calendar pageformat="'${param.page}_blogentry_'ddMMyy'_1'"
+                 urlformat="'Wiki.jsp?page=${param.page}&weblog.startDate='ddMMyy'&weblog.days=1'"/>
+  </c:if>
 
   <wiki:Permission permission="view">
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp b/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp
index 64ee433..b3deff6 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/ViewTemplate.jsp
@@ -51,8 +51,7 @@
   <wiki:Include page="Header.jsp" />
   <wiki:Include page="Nav.jsp" />
 
-  <c:set var="sidebar"><wiki:Variable var='sidebar' /></c:set><%-- page variable setting--%>
-  <c:set var="sidebar" value="${not sidebar ? prefs.Sidebar : sidebar }" />
+  <c:set var="sidebar"><wiki:Variable var="sidebar" default="${prefs.Sidebar}" /></c:set>
   <wiki:CheckRequestContext context='login|prefs|createGroup|viewGroup|conflict'>
     <c:set var="sidebar" value="" />
   </wiki:CheckRequestContext>

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp b/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp
index 6f0dcde..2d3d1e0 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/commonheader.jsp
@@ -41,7 +41,10 @@
 <%--
 BOOTSTRAP, IE compatibility / http://getbootstrap.com/getting-started/#support-ie-compatibility-modes
 --%>
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta charset="<wiki:ContentEncoding />">
+<meta http-equiv="Content-Type" content="text/html; charset=<wiki:ContentEncoding />" />
+<meta http-equiv="x-ua-compatible" content="ie=edge" />
+<meta name="viewport" content="width=device-width, initial-scale=1">
 
 
 <%-- Localized JS; must come before any css, to avoid blocking immediate execution --%>
@@ -64,10 +67,6 @@ String.I18N.PREFIX = "javascript.";
 
 <wiki:IncludeResources type="script"/>
 
-<%--TODO:
-<!--[if lte IE 8]><script src="js/libs/selectivizr.js"></script><![endif]-->
---%>
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
 
 
 <%-- COOKIE read client preferences --%>
@@ -100,8 +99,6 @@ String.I18N.PREFIX = "javascript.";
 <wiki:IncludeResources type="jsfunction"/>
 //]]></script>
 
-<meta charset="<wiki:ContentEncoding />">
-<meta http-equiv="Content-Type" content="text/html; charset=<wiki:ContentEncoding />" />
 <link rel="search" href="<wiki:LinkTo format='url' page='Search'/>"
     title='Search <wiki:Variable var="ApplicationName" />' />
 <link rel="help"   href="<wiki:LinkTo format='url' page='TextFormattingRules'/>"

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp b/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp
index a67210b..7a79de8 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/editors/CKeditor.jsp
@@ -61,6 +61,7 @@
     String usertext = EditorManager.getEditedText(pageContext);
 
 %>
+<c:set var='context'><wiki:Variable var='requestcontext' /></c:set>
 <wiki:CheckRequestContext context="edit">
 <wiki:NoSuchPage> <%-- this is a new page, check if we're cloning --%>
 <%
@@ -157,19 +158,41 @@
 
   <div class="form-inline form-group">
 
-  <span class="cage">
-    <input class="btn btn-success" type="submit" name="ok" accesskey="s"
-           value="<fmt:message key='editor.plain.save.submit'/>"
-           title="<fmt:message key='editor.plain.save.title'/>" />
-
-      <wiki:CheckRequestContext context="edit">
-      <input class="form-control" data-hover-parent="span" type="text" size="80" maxlength="80"
-             name="changenote" id="changenote"
+    <div class="form-group dropdown">
+    <button class="btn btn-success" type="submit" name="ok" accesskey="s">
+      <fmt:message key='editor.plain.save.submit${ context == "edit" ? "" : ".comment" }'/>
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu" data-hover-parent="div">
+      <li class="dropdown-header">
+        <input class="form-control" type="text" name="changenote" id="changenote" size="80" maxlength="80"
              placeholder="<fmt:message key='editor.plain.changenote'/>"
              value="${changenote}" />
+      </li>
+      <wiki:CheckRequestContext context="comment">
+      <li class="divider" />
+      <li class="dropdown-header">
+        <fmt:message key="editor.commentsignature"/>
+      </li>
+      <li class="dropdown-header">
+        <input class="form-control" type="text" name="author" id="authorname"  size="80" maxlength="80"
+             placeholder="<fmt:message key='editor.plain.name'/>"
+             value="${author}" />
+      </li>
+      <li  class="dropdown-header">
+        <label class="btn btn-default btn-xs" for="rememberme">
+          <input type="checkbox" name="remember" id="rememberme" ${ remember ? "checked='checked'" : "" } />
+          <fmt:message key="editor.plain.remember"/>
+        </label>
+      </li>
+      <li  class="dropdown-header">
+        <input class="form-control" type="text" name="link" id="link" size="80" maxlength="80"
+               placeholder="<fmt:message key='editor.plain.email'/>"
+               value="${link}" />
+      </li>
       </wiki:CheckRequestContext>
-  </span>
-
+    </ul>
+    </div>
 
   <div class="btn-group editor-tools">
 
@@ -244,29 +267,12 @@
 
   </div>
 
-  <wiki:CheckRequestContext context="comment">
-    <div class="info">
-    <label><fmt:message key="editor.commentsignature"/></label>
-    <input class="form-control form-col-20" type="text" name="author" id="authorname"
-           placeholder="<fmt:message key='editor.plain.name'/>"
-           value="${author}" />
-    <label class="btn btn-default btn-sm" for="rememberme">
-      <input type="checkbox" name="remember" id="rememberme"
-             <%=TextUtil.isPositive((String)session.getAttribute("remember")) ? "checked='checked'" : ""%> />
-      <fmt:message key="editor.plain.remember"/>
-    </label>
-    <input class="form-control form-col-20" type="text" name="link" id="link" size="24"
-           placeholder="<fmt:message key='editor.plain.email'/>"
-           value="${link}" />
-    </div>
-  </wiki:CheckRequestContext>
-
   <div class="row edit-area livepreview previewcolumn"><%-- .livepreview  .previewcolumn--%>
-      <div class="col-50">
+      <div">
         <textarea name="htmlPageText"
              autofocus="autofocus"><%=pageAsHtml%></textarea>
       </div>
-      <div class="ajaxpreview col-50" >Preview comes here</div>
+      <div class="ajaxpreview" >Preview comes here</div>
   </div>
 
 </form>
@@ -283,7 +289,6 @@ Wiki.add("[name=htmlPageText]", function( element){
     var form = element.form,
         editor,
         preview = form.getElement(".ajaxpreview"),
-        resizer = form.getElement(".resizer"),
         resizeCookie = "editorHeight",
 
         html2markup = Wiki.getXHRPreview( editorContent, preview );

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/editors/TinyMCE.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/editors/TinyMCE.jsp b/jspwiki-war/src/main/webapp/templates/haddock/editors/TinyMCE.jsp
index 95381ce..e3af0a1 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/editors/TinyMCE.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/editors/TinyMCE.jsp
@@ -62,6 +62,7 @@
 
 %>
 
+<c:set var='context'><wiki:Variable var='requestcontext' /></c:set>
 <wiki:CheckRequestContext context="edit">
 <wiki:NoSuchPage> <%-- this is a new page, check if we're cloning --%>
 <%
@@ -162,18 +163,41 @@
 
   <div class="form-inline form-group">
 
-  <span class="cage">
-    <input class="btn btn-success" type="submit" name="ok" accesskey="s"
-           value="<fmt:message key='editor.plain.save.submit'/>"
-           title="<fmt:message key='editor.plain.save.title'/>" />
-
-      <wiki:CheckRequestContext context="edit">
-      <input class="form-control" data-hover-parent="span" type="text" size="80" maxlength="80"
-             name="changenote" id="changenote"
+    <div class="form-group dropdown">
+    <button class="btn btn-success" type="submit" name="ok" accesskey="s">
+      <fmt:message key='editor.plain.save.submit${ context == "edit" ? "" : ".comment" }'/>
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu" data-hover-parent="div">
+      <li class="dropdown-header">
+        <input class="form-control" type="text" name="changenote" id="changenote" size="80" maxlength="80"
              placeholder="<fmt:message key='editor.plain.changenote'/>"
              value="${changenote}" />
+      </li>
+      <wiki:CheckRequestContext context="comment">
+      <li class="divider" />
+      <li class="dropdown-header">
+        <fmt:message key="editor.commentsignature"/>
+      </li>
+      <li class="dropdown-header">
+        <input class="form-control" type="text" name="author" id="authorname"  size="80" maxlength="80"
+             placeholder="<fmt:message key='editor.plain.name'/>"
+             value="${author}" />
+      </li>
+      <li  class="dropdown-header">
+        <label class="btn btn-default btn-xs" for="rememberme">
+          <input type="checkbox" name="remember" id="rememberme" ${ remember ? "checked='checked'" : "" } />
+          <fmt:message key="editor.plain.remember"/>
+        </label>
+      </li>
+      <li  class="dropdown-header">
+        <input class="form-control" type="text" name="link" id="link" size="80" maxlength="80"
+               placeholder="<fmt:message key='editor.plain.email'/>"
+               value="${link}" />
+      </li>
       </wiki:CheckRequestContext>
-  </span>
+    </ul>
+    </div>
 
   <div class="btn-group editor-tools">
 
@@ -250,30 +274,13 @@
 
   </div>
 
-  <wiki:CheckRequestContext context="comment">
-    <div class="info">
-    <label><fmt:message key="editor.commentsignature"/></label>
-    <input class="form-control form-col-20" type="text" name="author" id="authorname"
-           placeholder="<fmt:message key='editor.plain.name'/>"
-           value="${author}" />
-    <label class="btn btn-default btn-sm" for="rememberme">
-      <input type="checkbox" name="remember" id="rememberme"
-             <%=TextUtil.isPositive((String)session.getAttribute("remember")) ? "checked='checked'" : ""%> />
-      <fmt:message key="editor.plain.remember"/>
-    </label>
-    <input class="form-control form-col-20" type="text" name="link" id="link" size="24"
-           placeholder="<fmt:message key='editor.plain.email'/>"
-           value="${link}" />
-    </div>
-  </wiki:CheckRequestContext>
-
 
   <div class="row edit-area livepreview previewcolumn"><%-- .livepreview  .previewcolumn--%>
-      <div class="col-50">
+      <div>
         <textarea name="htmlPageText"
              autofocus="autofocus"><%=pageAsHtml%></textarea>
       </div>
-      <div class="ajaxpreview col-50" >Preview comes here</div>
+      <div class="ajaxpreview" >Preview comes here</div>
   </div>
 
 </form>
@@ -290,7 +297,6 @@ Wiki.add("[name=htmlPageText]", function( element){
     var form = element.form,
         editor,
         preview = form.getElement(".ajaxpreview"),
-        resizer = form.getElement(".resizer"),
         resizeCookie = "editorHeight",
 
         html2markup = Wiki.getXHRPreview( editorContent, preview );

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp b/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp
index b71c204..4e0e46c 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/editors/plain.jsp
@@ -41,6 +41,7 @@
    String usertext = EditorManager.getEditedText( pageContext );
 %>
 <wiki:RequestResource type="script" resource="scripts/haddock-edit.js" />
+<c:set var='context'><wiki:Variable var='requestcontext' /></c:set>
 <wiki:CheckRequestContext context="edit">
 <wiki:NoSuchPage> <%-- this is a new page, check if we're cloning --%>
 <%
@@ -74,15 +75,8 @@
 </wiki:CheckRequestContext>
 <% if( usertext == null ) usertext = "";  %>
 
-<%-- <div style="width:100%"> <%-- Required for IE6 on Windows --%>
-
 <form method="post" accept-charset="<wiki:ContentEncoding/>"
-      action="<wiki:CheckRequestContext
-     context='edit'><wiki:EditLink format='url'/></wiki:CheckRequestContext><wiki:CheckRequestContext
-     context='comment'><wiki:CommentLink format='url'/></wiki:CheckRequestContext>"
-
-     <%--action="<wiki:Link context=${context} format='url'/>"--%>
-
+      action="<wiki:Link context='${context}' format='url'/>"
        class="editform"
           id="editform"
      enctype="application/x-www-form-urlencoded" >
@@ -96,42 +90,50 @@
        Normal user should never see this field, nor type anything in it. --%>
   <input class="hidden" type="text" name="<%=SpamFilter.getBotFieldName()%>" id="<%=SpamFilter.getBotFieldName()%>" value="" />
 
-
   <div class="snipe">
-  <div class="form-inline form-group">
-
-  <span class="cage">
-    <input class="btn btn-success" type="submit" name="ok" accesskey="s"
-           value="<fmt:message key='editor.plain.save.submit'/>" />
-
-    <wiki:CheckRequestContext context="edit">
-      <input class="form-control" data-hover-parent="span" type="text" size="80" maxlength="80"
-             name="changenote" id="changenote"
+    <div class="form-inline form-group">
+
+    <div class="form-group dropdown">
+    <button class="btn btn-success" type="submit" name="ok" accesskey="s">
+      <fmt:message key='editor.plain.save.submit${ context == "edit" ? "" : ".comment" }'/>
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu" data-hover-parent="div">
+      <li class="dropdown-header">
+        <input class="form-control" type="text" name="changenote" id="changenote" size="80" maxlength="80"
              placeholder="<fmt:message key='editor.plain.changenote'/>"
              value="${changenote}" />
-    </wiki:CheckRequestContext>
-    <wiki:CheckRequestContext context="comment">
-      <div class="commentsignature form-inline form-group" data-hover-parent="span">
-        <label><fmt:message key="editor.commentsignature"/></label>
-        <input class="form-control" type="text" name="author" id="authorname"
+      </li>
+      <wiki:CheckRequestContext context="comment">
+      <li class="divider" />
+      <li class="dropdown-header">
+        <fmt:message key="editor.commentsignature"/>
+      </li>
+      <li class="dropdown-header">
+        <input class="form-control" type="text" name="author" id="authorname"  size="80" maxlength="80"
              placeholder="<fmt:message key='editor.plain.name'/>"
              value="${author}" />
+      </li>
+      <li  class="dropdown-header">
         <label class="btn btn-default btn-xs" for="rememberme">
-          <input type="checkbox" name="remember" id="rememberme"
-            <%=TextUtil.isPositive((String)session.getAttribute("remember")) ? "checked='checked'" : ""%> />
+          <input type="checkbox" name="remember" id="rememberme" ${ remember ? "checked='checked'" : "" } />
           <fmt:message key="editor.plain.remember"/>
         </label>
-        <input class="form-control" type="text" name="link" id="link" size="24"
+      </li>
+      <li  class="dropdown-header">
+        <input class="form-control" type="text" name="link" id="link" size="80" maxlength="80"
                placeholder="<fmt:message key='editor.plain.email'/>"
                value="${link}" />
-      </div>
-    </wiki:CheckRequestContext>
-  </span>
+      </li>
+      </wiki:CheckRequestContext>
+    </ul>
+    </div>
 
   <div class="btn-group editor-tools">
 
+    <wiki:CheckRequestContext context="edit">
     <div class="btn-group sections">
-      <button class="btn btn-default"><span class="icon-bookmark"><span class="caret"></span></button>
+      <button class="btn btn-default"><span class="icon-bookmark"></span><span class="caret"></span></button>
       <ul class="dropdown-menu" data-hover-parent="div">
             <li><a>first</a></li>
             <li><a>..</a></li>
@@ -139,36 +141,40 @@
             <li><a>..</a></li>
       </ul>
     </div>
+    </wiki:CheckRequestContext>
 
-    <div class="btn-group formatting-options">
-      <button class="btn btn-default"><span class="icon-tint" /><span class="caret" /></button>
-      <ul class="dropdown-menu dropdown-menu-horizontal" data-hover-parent="div">
-        <li><a href="#" data-cmd="bold" title="<fmt:message key='editor.plain.tbB.title' />"><b>bold</b></a></li>
-        <li><a href="#" data-cmd="italic" title="<fmt:message key='editor.plain.tbI.title' />"><i>italic</i></a></li>
-        <li><a href="#" data-cmd="mono" title="<fmt:message key='editor.plain.tbMONO.title' />"><tt>mono</tt></a></li>
-        <li><a href="#" data-cmd="sub" title="<fmt:message key='editor.plain.tbSUB.title' />">a<span class="sub">sub</span></a></li>
-        <li><a href="#" data-cmd="sup" title="<fmt:message key='editor.plain.tbSUP.title' />">a<span class="sup">sup</span></a></li>
-        <li><a href="#" data-cmd="strike" title="<fmt:message key='editor.plain.tbSTRIKE.title' />"><span class="strike">strike</span></a></li>
-        <li><a href="#" data-cmd="link" title="<fmt:message key='editor.plain.tbLink.title'/>"><span class="icon-link"/></a></li>
-        <li><a href="#" data-cmd="img" title="<fmt:message key='editor.plain.tbIMG.title'/>"><span class="icon-picture"/></a></li>
-        <li><a href="#" data-cmd="plugin" title="<fmt:message key='editor.plain.tbPLUGIN.title'/>"><span class="icon-puzzle-piece"/></a></li>
-        <li><a href="#" data-cmd="font" title="<fmt:message key='editor.plain.tbFONT.title' />">Font<span class="caret" /></a></li>
-        <li><a href="#" data-cmd="chars" title="<fmt:message key='editor.plain.tbCHARS.title' />"><span class="icon-euro"/><span class="caret" /></a></li>
-
-       </ul>
-     </div>
+    <button class="btn btn-default" data-cmd="lipstick"><span class="icon-tint" /></button>
+    <button class="btn btn-default" data-cmd="find"><span class="icon-search" /></button>
 
 
     <fmt:message key='editor.plain.undo.title' var='msg'/>
     <button class="btn btn-default" data-cmd="undo" title="${msg}"><span class="icon-undo"></span></button>
     <fmt:message key='editor.plain.redo.title' var='msg'/>
     <button class="btn btn-default" data-cmd="redo" title="${msg}"><span class="icon-repeat"></span></button>
-    <button class="btn btn-default" data-cmd="find"><span class="icon-search" /></button>
 
     <div class="btn-group config">
       <%-- note: 'dropdown-toggle' is only here to style the last button properly! --%>
       <button class="btn btn-default"><span class="icon-wrench"></span><span class="caret"></span></button>
       <ul class="dropdown-menu" data-hover-parent="div">
+
+            <li>
+        <a class="slimbox-link" href="<wiki:Link format='url' page='EditPageHelp' ><wiki:Param name='skin' value='reader'/></wiki:Link>">
+          <fmt:message key="edit.tab.help" />
+        </a>
+    <%--
+      <wiki:NoSuchPage page="EditPageHelp">
+        <div class="error">
+        <fmt:message key="comment.edithelpmissing">
+        <fmt:param><wiki:EditLink page="EditPageHelp">EditPageHelp</wiki:EditLink></fmt:param>
+        </fmt:message>
+        </div>
+      </wiki:NoSuchPage>
+    --%>
+      </li>
+      <li class="divider"></li>
+
+
+
             <li>
               <a>
                 <label for="autosuggest">
@@ -236,11 +242,42 @@
     </div>
     </c:if>
 
-  </div>
+    </div>
 
-      <div class="dialog float find">
-        <div class="caption"><fmt:message key='editor.plain.find'/> &amp; <fmt:message key='editor.plain.replace'/> </div>
-        <div class="body">
+<%--
+    <div class="dialog selection dialog-horizontal formatting">
+      <div class="body">
+        <ul>
+          <li class="item" data-cmd="bold" title="<fmt:message key='editor.plain.tbB.title' />"><b>bold</b></li>
+          <li class="item" title="''{italic}''"><i>italic</i></li>
+          <li class="item" title="{{{monospaced}}}"><tt>mono</tt></li>
+
+          <li class="item" title="{{{{code}}}}"><span style="font-family:monospace;">pre</span></li>
+          <li class="item" title="[description|{pagename or url}|options]"><span class="icon-link"></span></li>
+          <li class="item" title="[{Image src='{image.jpg}'}]"><span class="icon-picture"></span></li>
+          <li class="item" title="[{Image src='{image.jpg}'}]"><span class="icon-puzzle-piece"></span></li>
+
+        <%--
+        <li><a href="#" data-cmd="bold" title="<fmt:message key='editor.plain.tbB.title' />"><b>bold</b></a></li>
+        <li><a href="#" data-cmd="italic" title="<fmt:message key='editor.plain.tbI.title' />"><i>italic</i></a></li>
+        <li><a href="#" data-cmd="mono" title="<fmt:message key='editor.plain.tbMONO.title' />"><tt>mono</tt></a></li>
+        <li><a href="#" data-cmd="sub" title="<fmt:message key='editor.plain.tbSUB.title' />">a<span class="sub">sub</span></a></li>
+        <li><a href="#" data-cmd="sup" title="<fmt:message key='editor.plain.tbSUP.title' />">a<span class="sup">sup</span></a></li>
+        <li><a href="#" data-cmd="strike" title="<fmt:message key='editor.plain.tbSTRIKE.title' />"><span class="strike">strike</span></a></li>
+        <li><a href="#" data-cmd="link" title="<fmt:message key='editor.plain.tbLink.title'/>"><span class="icon-link"/></a></li>
+        <li><a href="#" data-cmd="img" title="<fmt:message key='editor.plain.tbIMG.title'/>"><span class="icon-picture"/></a></li>
+        <li><a href="#" data-cmd="plugin" title="<fmt:message key='editor.plain.tbPLUGIN.title'/>"><span class="icon-puzzle-piece"/></a></li>
+        <li><a href="#" data-cmd="font" title="<fmt:message key='editor.plain.tbFONT.title' />">Font<span class="caret" /></a></li>
+        <li><a href="#" data-cmd="chars" title="<fmt:message key='editor.plain.tbCHARS.title' />"><span class="icon-euro"/><span class="caret" /></a></li>
+        -- % >
+        </ul>
+      </div>
+    </div>
+--%>
+
+    <div class="dialog float find">
+      <div class="caption"><fmt:message key='editor.plain.find'/> &amp; <fmt:message key='editor.plain.replace'/> </div>
+      <div class="body">
         <a class="close"">&times;</a>
         <div class="form-group">
           <span class="tbHITS"></span>
@@ -267,20 +304,20 @@
             <fmt:message key="editor.plain.regexp"/>
           </label>
         </div>
-        </div>
       </div>
+    </div>
 
 
-  <%-- is PREVIEW functionality still needed - with livepreview ?
-  <input class="btn btn-primary" type="submit" name="preview" accesskey="v"
+    <%-- is PREVIEW functionality still needed - with livepreview ?
+    <input class="btn btn-primary" type="submit" name="preview" accesskey="v"
          value="<fmt:message key='editor.plain.preview.submit'/>"
          title="<fmt:message key='editor.plain.preview.title'/>" />
-  --%>
-  <input class="btn btn-danger pull-right" type="submit" name="cancel" accesskey="q"
-         value="<fmt:message key='editor.plain.cancel.submit'/>"
-         title="<fmt:message key='editor.plain.cancel.title'/>" />
+    --%>
+    <input class="btn btn-danger pull-right" type="submit" name="cancel" accesskey="q"
+           value="<fmt:message key='editor.plain.cancel.submit'/>"
+           title="<fmt:message key='editor.plain.cancel.title'/>" />
 
-  <%--TODO: allow page rename as part of an edit session
+    <%--TODO: allow page rename as part of an edit session
     <wiki:Permission permission="rename">
     <div class="form-group form-inline">
     <label for="renameto"><fmt:message key='editor.renameto'/></label>
@@ -289,25 +326,25 @@
     <fmt:message key="info.updatereferrers"/>
     </div>
     </wiki:Permission>
-  --%>
+    --%>
 
-  </div>
+    </div>
 
     <div class="row edit-area"><%-- .livepreview  .previewcolumn--%>
-      <div class="col-50">
-        <textarea class="editor form-control" id="editorarea" name="<%=EditorManager.REQ_EDITEDTEXT%>"
-              autofocus="autofocus"
-                   rows="20" cols="80"><%= TextUtil.replaceEntities(usertext) %></textarea>
+      <div>
+        <textarea class="editor form-control snipeable"
+           <wiki:CheckRequestContext context="edit">placeholder="Add your page content here"</wiki:CheckRequestContext>
+           <wiki:CheckRequestContext context="comment">placeholder="Leave a comment"</wiki:CheckRequestContext>
+                  autofocus="autofocus"
+                  rows="20" cols="80"></textarea>
+        <textarea class="editor form-control hidden" id="editorarea" name="<%=EditorManager.REQ_EDITEDTEXT%>"
+                  rows="20" cols="80"><%= TextUtil.replaceEntities(usertext) %></textarea>
       </div>
-      <div class="ajaxpreview col-50"></div>
+      <div class="ajaxpreview empty"></div>
     </div>
-
-    <div class="resizer"
-    data-pref="editorHeight"
+    <div class="resizer" data-resize=".ajaxpreview,.snipeable" data-pref="editorHeight"
          title="<fmt:message key='editor.plain.edit.resize'/>"></div>
 
   </div><%-- end of .snipe --%>
 
-</form>
-
-<%-- </div>   ??CHECK: needed of IEx--%>
\ No newline at end of file
+</form>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/editors/wysiwyg.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/editors/wysiwyg.jsp b/jspwiki-war/src/main/webapp/templates/haddock/editors/wysiwyg.jsp
index c27ba3f..2aea0e9 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/editors/wysiwyg.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/editors/wysiwyg.jsp
@@ -54,7 +54,7 @@
 %>
 <wiki:RequestResource type="stylesheet" resource="templates/haddock/haddock-wysiwyg.css" />
 <wiki:RequestResource type="script" resource="scripts/haddock-wysiwyg.js" />
-
+<c:set var='context'><wiki:Variable var='requestcontext' /></c:set>
 <wiki:CheckRequestContext context="edit">
 <wiki:NoSuchPage> <%-- this is a new page, check if we're cloning --%>
 <%
@@ -152,19 +152,41 @@
 
   <div class="form-inline form-group">
 
-  <span class="cage">
-    <input class="btn btn-success" type="submit" name="ok" accesskey="s"
-           value="<fmt:message key='editor.plain.save.submit'/>"
-           title="<fmt:message key='editor.plain.save.title'/>" />
-
-      <wiki:CheckRequestContext context="edit">
-      <input class="form-control" data-hover-parent="span" type="text" size="80" maxlength="80"
-             name="changenote" id="changenote"
+    <div class="form-group dropdown">
+    <button class="btn btn-success" type="submit" name="ok" accesskey="s">
+      <fmt:message key='editor.plain.save.submit${ context == "edit" ? "" : ".comment" }'/>
+      <span class="caret"></span>
+    </button>
+    <ul class="dropdown-menu" data-hover-parent="div">
+      <li class="dropdown-header">
+        <input class="form-control" type="text" name="changenote" id="changenote" size="80" maxlength="80"
              placeholder="<fmt:message key='editor.plain.changenote'/>"
              value="${changenote}" />
+      </li>
+      <wiki:CheckRequestContext context="comment">
+      <li class="divider" />
+      <li class="dropdown-header">
+        <fmt:message key="editor.commentsignature"/>
+      </li>
+      <li class="dropdown-header">
+        <input class="form-control" type="text" name="author" id="authorname"  size="80" maxlength="80"
+             placeholder="<fmt:message key='editor.plain.name'/>"
+             value="${author}" />
+      </li>
+      <li  class="dropdown-header">
+        <label class="btn btn-default btn-xs" for="rememberme">
+          <input type="checkbox" name="remember" id="rememberme" ${ remember ? "checked='checked'" : "" } />
+          <fmt:message key="editor.plain.remember"/>
+        </label>
+      </li>
+      <li  class="dropdown-header">
+        <input class="form-control" type="text" name="link" id="link" size="80" maxlength="80"
+               placeholder="<fmt:message key='editor.plain.email'/>"
+               value="${link}" />
+      </li>
       </wiki:CheckRequestContext>
-  </span>
-
+    </ul>
+    </div>
 
   <div class="btn-group editor-tools">
 
@@ -241,34 +263,15 @@
 
   </div>
 
-  <wiki:CheckRequestContext context="comment">
-    <div class="info">
-    <label><fmt:message key="editor.commentsignature"/></label>
-    <input class="form-control form-col-20" type="text" name="author" id="authorname"
-           placeholder="<fmt:message key='editor.plain.name'/>"
-           value="${author}" />
-    <label class="btn btn-default btn-sm" for="rememberme">
-      <input type="checkbox" name="remember" id="rememberme"
-             <%=TextUtil.isPositive((String)session.getAttribute("remember")) ? "checked='checked'" : ""%> />
-      <fmt:message key="editor.plain.remember"/>
-    </label>
-    <input class="form-control form-col-20" type="text" name="link" id="link" size="24"
-           placeholder="<fmt:message key='editor.plain.email'/>"
-           value="${link}" />
-    </div>
-  </wiki:CheckRequestContext>
-
-
   <div class="row edit-area livepreview previewcolumn"><%-- .livepreview  .previewcolumn--%>
-      <div class="col-50">
+      <div>
         <textarea name="htmlPageText"
              autofocus="autofocus"><%=pageAsHtml%></textarea>
       </div>
-      <div class="ajaxpreview col-50">Preview comes here</div>
+      <div class="ajaxpreview">Preview comes here</div>
   </div>
 
-  <div class="resizer"
-   data-pref="editorHeight"
+  <div class="resizer" data-pref="editorHeight"
        title="<fmt:message key='editor.plain.edit.resize'/>"></div>
 
 </form>
@@ -297,16 +300,17 @@ Wiki.add("[name=htmlPageText]", function( element){
     element.mooEditable({
         dimensions:{
             x: "100%",
-            y: "100%"//Wiki.prefs.get( resizeCookie )
+            y: "100%"
         },
         extraCSS: "body{padding:.5em;}",
   		externalCSS: $("main-stylesheet").href,
   		onAttach: function(){
 
   		    editor = this;
+            Wiki.resizer(resizer, $$(editor.iframe), resizePreview );
             resizePreview();
             html2markup();
-            Wiki.resizer( editor.iframe, resizePreview );
+
   		},
   		onChange: html2markup,
   		onEditorKeyUp: html2markup,


[2/7] jspwiki git commit: Various HADDOCK updates & fixes

Posted by br...@apache.org.
http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/variables.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/variables.less b/jspwiki-war/src/main/styles/haddock/bootstrap/variables.less
index 297ef54..4db59f2 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/variables.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/variables.less
@@ -1,141 +1,146 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Variables
 // --------------------------------------------------
 
 
-// Global values
-// --------------------------------------------------
-
-// Grays
-// -------------------------
-
-@gray-darker:            lighten(#000, 13.5%); // #222
-@gray-dark:              lighten(#000, 20%);   // #333
-@gray:                   lighten(#000, 33.5%); // #555
-@gray-light:             lighten(#000, 60%);   // #999
-@gray-lighter:           lighten(#000, 93.5%); // #eee
+//== Colors
+//
+//## Gray and brand colors for use across Bootstrap.
 
-// Brand colors
-// -------------------------
+@gray-base:              #000;
+@gray-darker:            lighten(@gray-base, 13.5%); // #222
+@gray-dark:              lighten(@gray-base, 20%);   // #333
+@gray:                   lighten(@gray-base, 33.5%); // #555
+@gray-light:             lighten(@gray-base, 46.7%); // #777
+@gray-lighter:           lighten(@gray-base, 93.5%); // #eee
 
-@brand-primary:         #428bca;
+@brand-primary:         darken(#428bca, 6.5%); // #337ab7
 @brand-success:         #5cb85c;
+@brand-info:            #5bc0de;
 @brand-warning:         #f0ad4e;
 @brand-danger:          #d9534f;
-@brand-info:            #5bc0de;
 
-// Scaffolding
-// -------------------------
 
+//== Scaffolding
+//
+//## Settings for some of the most global styles.
+
+// ** Background color for `<body>`.
 @body-bg:               #fff;
+// ** Global text color on `<body>`.
 @text-color:            @gray-dark;
 
-// Links
-// -------------------------
-
+// ** Global textual link color.
 @link-color:            @brand-primary;
+// ** Link hover color set via `darken()` function.
 @link-hover-color:      darken(@link-color, 15%);
+// ** Link hover decoration.
+@link-hover-decoration: underline;
+
 
-// Typography
-// -------------------------
+//== Typography
+//
+//## Font, line-height, and color for body text, headings, and more.
 
 @font-family-sans-serif:  "Helvetica Neue", Helvetica, Arial, sans-serif;
 @font-family-serif:       Georgia, "Times New Roman", Times, serif;
+// ** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
 @font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;
 @font-family-base:        @font-family-sans-serif;
 
 @font-size-base:          14px;
-@font-size-large:         ceil(@font-size-base * 1.25); // ~18px
-@font-size-small:         ceil(@font-size-base * 0.85); // ~12px
+@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
+@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px
 
-@font-size-h1:            floor(@font-size-base * 2.6); // ~36px
-@font-size-h2:            floor(@font-size-base * 2.15); // ~30px
-@font-size-h3:            ceil(@font-size-base * 1.7); // ~24px
-@font-size-h4:            ceil(@font-size-base * 1.25); // ~18px
+@font-size-h1:            floor((@font-size-base * 2.6)); // ~36px
+@font-size-h2:            floor((@font-size-base * 2.15)); // ~30px
+@font-size-h3:            ceil((@font-size-base * 1.7)); // ~24px
+@font-size-h4:            ceil((@font-size-base * 1.25)); // ~18px
 @font-size-h5:            @font-size-base;
-@font-size-h6:            ceil(@font-size-base * 0.85); // ~12px
+@font-size-h6:            ceil((@font-size-base * 0.85)); // ~12px
 
+// ** Unit-less `line-height` for use in components like buttons.
 @line-height-base:        1.428571429; // 20/14
-@line-height-computed:    floor(@font-size-base * @line-height-base); // ~20px
+// ** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
+@line-height-computed:    floor((@font-size-base * @line-height-base)); // ~20px
 
-@headings-font-family:    @font-family-base;
+// ** By default, this inherits from the `<body>`.
+@headings-font-family:    inherit;
 @headings-font-weight:    500;
 @headings-line-height:    1.1;
 @headings-color:          inherit;
 
 
-// Iconography
-// -------------------------
+//== Iconography
+//
+//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
 
+// ** Load fonts from this directory.
 @icon-font-path:          "../fonts/";
+// ** File name for all font files.
 @icon-font-name:          "glyphicons-halflings-regular";
+// ** Element ID within SVG icon file.
+@icon-font-svg-id:        "glyphicons_halflingsregular";
 
 
-// Components
-// -------------------------
-// Based on 14px font-size and 1.428 line-height (~20px to start)
+//== Components
+//
+//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
+
+@padding-base-vertical:     6px;
+@padding-base-horizontal:   12px;
 
-@padding-base-vertical:          6px;
-@padding-base-horizontal:        12px;
+@padding-large-vertical:    10px;
+@padding-large-horizontal:  16px;
 
-@padding-large-vertical:         10px;
-@padding-large-horizontal:       16px;
+@padding-small-vertical:    5px;
+@padding-small-horizontal:  10px;
 
-@padding-small-vertical:         5px;
-@padding-small-horizontal:       10px;
+@padding-xs-vertical:       1px;
+@padding-xs-horizontal:     5px;
 
-@padding-xs-vertical:            1px;
-@padding-xs-horizontal:          5px;
+@line-height-large:         1.3333333; // extra decimals for Win 8.1 Chrome
+@line-height-small:         1.5;
 
-@line-height-large:              1.33;
-@line-height-small:              1.5;
+@border-radius-base:        4px;
+@border-radius-large:       6px;
+@border-radius-small:       3px;
 
-@border-radius-base:             4px;
-@border-radius-large:            6px;
-@border-radius-small:            3px;
+// ** Global color for active items (e.g., navs or dropdowns).
+@component-active-color:    #fff;
+// ** Global background color for active items (e.g., navs or dropdowns).
+@component-active-bg:       @brand-primary;
 
-@component-active-color:         #fff;
-@component-active-bg:            @brand-primary;
+// ** Width of the `border` for generating carets that indicate dropdowns.
+@caret-width-base:          4px;
+// ** Carets increase slightly in size for larger components.
+@caret-width-large:         5px;
 
-@caret-width-base:               4px;
-@caret-width-large:              5px;
 
-// Tables
-// -------------------------
+//== Tables
+//
+//## Customizes the `.table` component with basic values, each used across all table variations.
 
-@table-cell-padding:                 8px;
-@table-condensed-cell-padding:       5px;
+// ** Padding for `<th>`s and `<td>`s.
+@table-cell-padding:            8px;
+// ** Padding for cells in `.table-condensed`.
+@table-condensed-cell-padding:  5px;
 
-@table-bg:                           transparent; // overall background-color
-@table-bg-accent:                    #f9f9f9; // for striping
-@table-bg-hover:                     #f5f5f5;
-@table-bg-active:                    @table-bg-hover;
+// ** Default background color used for all tables.
+@table-bg:                      transparent;
+// ** Background color used for `.table-striped`.
+@table-bg-accent:               #f9f9f9;
+// ** Background color used for `.table-hover`.
+@table-bg-hover:                #f5f5f5;
+@table-bg-active:               @table-bg-hover;
 
-@table-border-color:                 #ddd; // table and cell border
+// ** Border color for table and cell borders.
+@table-border-color:            #ddd;
 
 
-// Buttons
-// -------------------------
+//== Buttons
+//
+//## For each of Bootstrap's buttons, define text, background and border color.
 
 @btn-font-weight:                normal;
 
@@ -151,6 +156,10 @@
 @btn-success-bg:                 @brand-success;
 @btn-success-border:             darken(@btn-success-bg, 5%);
 
+@btn-info-color:                 #fff;
+@btn-info-bg:                    @brand-info;
+@btn-info-border:                darken(@btn-info-bg, 5%);
+
 @btn-warning-color:              #fff;
 @btn-warning-bg:                 @brand-warning;
 @btn-warning-border:             darken(@btn-warning-bg, 5%);
@@ -159,99 +168,147 @@
 @btn-danger-bg:                  @brand-danger;
 @btn-danger-border:              darken(@btn-danger-bg, 5%);
 
-@btn-info-color:                 #fff;
-@btn-info-bg:                    @brand-info;
-@btn-info-border:                darken(@btn-info-bg, 5%);
-
 @btn-link-disabled-color:        @gray-light;
 
+// Allows for customizing button radius independently from global border radius
+@btn-border-radius-base:         @border-radius-base;
+@btn-border-radius-large:        @border-radius-large;
+@btn-border-radius-small:        @border-radius-small;
 
-// Forms
-// -------------------------
 
+//== Forms
+//
+//##
+
+// ** `<input>` background color
 @input-bg:                       #fff;
+// ** `<input disabled>` background color
 @input-bg-disabled:              @gray-lighter;
 
+// ** Text color for `<input>`s
 @input-color:                    @gray;
+// ** `<input>` border color
 @input-border:                   #ccc;
+
+// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
+// ** Default `.form-control` border radius
+// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
 @input-border-radius:            @border-radius-base;
+// ** Large `.form-control` border radius
+@input-border-radius-large:      @border-radius-large;
+// ** Small `.form-control` border radius
+@input-border-radius-small:      @border-radius-small;
+
+// ** Border color for inputs on focus
 @input-border-focus:             #66afe9;
 
-@input-color-placeholder:        @gray-light;
+// ** Placeholder text color
+@input-color-placeholder:        #999;
 
+// ** Default `.form-control` height
 @input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
+// ** Large `.form-control` height
 @input-height-large:             (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
+// ** Small `.form-control` height
 @input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
 
+// ** `.form-group` margin
+@form-group-margin-bottom:       15px;
+
 @legend-color:                   @gray-dark;
 @legend-border-color:            #e5e5e5;
 
+// ** Background color for textual input addons
 @input-group-addon-bg:           @gray-lighter;
+// ** Border color for textual input addons
 @input-group-addon-border-color: @input-border;
 
+// ** Disabled cursor for form controls and buttons.
+@cursor-disabled:                not-allowed;
+
 
-// Dropdowns
-// -------------------------
+//== Dropdowns
+//
+//## Dropdown menu container and contents.
 
+// ** Background for the dropdown menu.
 @dropdown-bg:                    #fff;
+// ** Dropdown menu `border-color`.
 @dropdown-border:                rgba(0,0,0,.15);
+// ** Dropdown menu `border-color` **for IE8**.
 @dropdown-fallback-border:       #ccc;
+// ** Divider color for between dropdown items.
 @dropdown-divider-bg:            #e5e5e5;
 
+// ** Dropdown link text color.
 @dropdown-link-color:            @gray-dark;
+// ** Hover color for dropdown links.
 @dropdown-link-hover-color:      darken(@gray-dark, 5%);
+// ** Hover background for dropdown links.
 @dropdown-link-hover-bg:         #f5f5f5;
 
+// ** Active dropdown menu item text color.
 @dropdown-link-active-color:     @component-active-color;
+// ** Active dropdown menu item background color.
 @dropdown-link-active-bg:        @component-active-bg;
 
+// ** Disabled dropdown menu item background color.
 @dropdown-link-disabled-color:   @gray-light;
 
+// ** Text color for headers within dropdown menus.
 @dropdown-header-color:          @gray-light;
 
-
-// COMPONENT VARIABLES
-// --------------------------------------------------
+// ** Deprecated `@dropdown-caret-color` as of v3.1.0
+@dropdown-caret-color:           #000;
 
 
-// Z-index master list
-// -------------------------
-// Used for a bird's eye view of components dependent on the z-axis
-// Try to avoid customizing these :)
+//-- Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+//
+// Note: These variables are not generated into the Customizer.
 
 @zindex-navbar:            1000;
 @zindex-dropdown:          1000;
-@zindex-popover:           1010;
-@zindex-tooltip:           1030;
+@zindex-popover:           1060;
+@zindex-tooltip:           1070;
 @zindex-navbar-fixed:      1030;
 @zindex-modal-background:  1040;
 @zindex-modal:             1050;
 
-// Media queries breakpoints
-// --------------------------------------------------
+
+//== Media queries breakpoints
+//
+//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
 
 // Extra small screen / phone
-// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1
+// ** Deprecated `@screen-xs` as of v3.0.1
 @screen-xs:                  480px;
+// ** Deprecated `@screen-xs-min` as of v3.2.0
 @screen-xs-min:              @screen-xs;
+// ** Deprecated `@screen-phone` as of v3.0.1
 @screen-phone:               @screen-xs-min;
 
 // Small screen / tablet
-// Note: Deprecated @screen-sm and @screen-tablet as of v3.0.1
+// ** Deprecated `@screen-sm` as of v3.0.1
 @screen-sm:                  768px;
 @screen-sm-min:              @screen-sm;
+// ** Deprecated `@screen-tablet` as of v3.0.1
 @screen-tablet:              @screen-sm-min;
 
 // Medium screen / desktop
-// Note: Deprecated @screen-md and @screen-desktop as of v3.0.1
+// ** Deprecated `@screen-md` as of v3.0.1
 @screen-md:                  992px;
 @screen-md-min:              @screen-md;
+// ** Deprecated `@screen-desktop` as of v3.0.1
 @screen-desktop:             @screen-md-min;
 
 // Large screen / wide desktop
-// Note: Deprecated @screen-lg and @screen-lg-desktop as of v3.0.1
+// ** Deprecated `@screen-lg` as of v3.0.1
 @screen-lg:                  1200px;
 @screen-lg-min:              @screen-lg;
+// ** Deprecated `@screen-lg-desktop` as of v3.0.1
 @screen-lg-desktop:          @screen-lg-min;
 
 // So media queries don't overlap when required, provide a maximum
@@ -260,31 +317,53 @@
 @screen-md-max:              (@screen-lg-min - 1);
 
 
-// Grid system
-// --------------------------------------------------
+//== Grid system
+//
+//## Define your custom responsive grid.
 
-// Number of columns in the grid system
+// ** Number of columns in the grid.
 @grid-columns:              12;
-// Padding, to be divided by two and applied to the left and right of all columns
+// ** Padding between columns. Gets divided in half for the left and right.
+@gutter: 30px;  //??missing,  used by grid.less??
 @grid-gutter-width:         30px;
-
 // Navbar collapse
-
-// Point at which the navbar becomes uncollapsed
+// ** Point at which the navbar becomes uncollapsed.
 @grid-float-breakpoint:     @screen-sm-min;
-// Point at which the navbar begins collapsing
+// ** Point at which the navbar begins collapsing.
 @grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
 
 
-// Navbar
-// -------------------------
+//== Container sizes
+//
+//## Define the maximum width of `.container` for different screen sizes.
+
+// Small screen / tablet
+@container-tablet:             (720px + @grid-gutter-width);
+// ** For `@screen-sm-min` and up.
+@container-sm:                 @container-tablet;
+
+// Medium screen / desktop
+@container-desktop:            (940px + @grid-gutter-width);
+// ** For `@screen-md-min` and up.
+@container-md:                 @container-desktop;
+
+// Large screen / wide desktop
+@container-large-desktop:      (1140px + @grid-gutter-width);
+// ** For `@screen-lg-min` and up.
+@container-lg:                 @container-large-desktop;
+
+
+//== Navbar
+//
+//##
 
 // Basics of a navbar
 @navbar-height:                    50px;
 @navbar-margin-bottom:             @line-height-computed;
 @navbar-border-radius:             @border-radius-base;
-@navbar-padding-horizontal:        floor(@grid-gutter-width / 2);
+@navbar-padding-horizontal:        floor((@grid-gutter-width / 2));
 @navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
+@navbar-collapse-max-height:       340px;
 
 @navbar-default-color:             #777;
 @navbar-default-bg:                #f8f8f8;
@@ -306,19 +385,18 @@
 
 // Navbar toggle
 @navbar-default-toggle-hover-bg:           #ddd;
-@navbar-default-toggle-icon-bar-bg:        #ccc;
+@navbar-default-toggle-icon-bar-bg:        #888;
 @navbar-default-toggle-border-color:       #ddd;
 
 
-// Inverted navbar
-//
+//=== Inverted navbar
 // Reset inverted navbar basics
-@navbar-inverse-color:                      @gray-light;
+@navbar-inverse-color:                      lighten(@gray-light, 15%);
 @navbar-inverse-bg:                         #222;
 @navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
 
 // Inverted navbar links
-@navbar-inverse-link-color:                 @gray-light;
+@navbar-inverse-link-color:                 lighten(@gray-light, 15%);
 @navbar-inverse-link-hover-color:           #fff;
 @navbar-inverse-link-hover-bg:              transparent;
 @navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
@@ -337,18 +415,18 @@
 @navbar-inverse-toggle-border-color:        #333;
 
 
-// Navs
-// -------------------------
+//== Navs
+//
+//##
 
+//=== Shared nav styles
 @nav-link-padding:                          10px 15px;
 @nav-link-hover-bg:                         @gray-lighter;
 
 @nav-disabled-link-color:                   @gray-light;
 @nav-disabled-link-hover-color:             @gray-light;
 
-@nav-open-link-hover-color:                 #fff;
-
-// Tabs
+//== Tabs
 @nav-tabs-border-color:                     #ddd;
 
 @nav-tabs-link-hover-border-color:          @gray-lighter;
@@ -360,45 +438,64 @@
 @nav-tabs-justified-link-border-color:            #ddd;
 @nav-tabs-justified-active-link-border-color:     @body-bg;
 
-// Pills
+//== Pills
 @nav-pills-border-radius:                   @border-radius-base;
 @nav-pills-active-link-hover-bg:            @component-active-bg;
 @nav-pills-active-link-hover-color:         @component-active-color;
 
 
-// Pagination
-// -------------------------
+//== Pagination
+//
+//##
 
+@pagination-color:                     @link-color;
 @pagination-bg:                        #fff;
 @pagination-border:                    #ddd;
 
+@pagination-hover-color:               @link-hover-color;
 @pagination-hover-bg:                  @gray-lighter;
+@pagination-hover-border:              #ddd;
 
-@pagination-active-bg:                 @brand-primary;
 @pagination-active-color:              #fff;
+@pagination-active-bg:                 @brand-primary;
+@pagination-active-border:             @brand-primary;
 
 @pagination-disabled-color:            @gray-light;
+@pagination-disabled-bg:               #fff;
+@pagination-disabled-border:           #ddd;
 
 
-// Pager
-// -------------------------
+//== Pager
+//
+//##
 
+@pager-bg:                             @pagination-bg;
+@pager-border:                         @pagination-border;
 @pager-border-radius:                  15px;
-@pager-disabled-color:                 @gray-light;
 
+@pager-hover-bg:                       @pagination-hover-bg;
+
+@pager-active-bg:                      @pagination-active-bg;
+@pager-active-color:                   @pagination-active-color;
+
+@pager-disabled-color:                 @pagination-disabled-color;
 
-// Jumbotron
-// -------------------------
+
+//== Jumbotron
+//
+//##
 
 @jumbotron-padding:              30px;
 @jumbotron-color:                inherit;
 @jumbotron-bg:                   @gray-lighter;
 @jumbotron-heading-color:        inherit;
-@jumbotron-font-size:            ceil(@font-size-base * 1.5);
+@jumbotron-font-size:            ceil((@font-size-base * 1.5));
+@jumbotron-heading-font-size:    ceil((@font-size-base * 4.5));
 
 
-// Form states and alerts
-// -------------------------
+//== Form states and alerts
+//
+//## Define colors for form feedback states and, by default, alerts.
 
 @state-success-text:             #3c763d;
 @state-success-bg:               #dff0d8;
@@ -417,65 +514,113 @@
 @state-danger-border:            darken(spin(@state-danger-bg, -10), 5%);
 
 
-// Tooltips
-// -------------------------
+//== Tooltips
+//
+//##
+
+// ** Tooltip max width
 @tooltip-max-width:           200px;
+// ** Tooltip text color
 @tooltip-color:               #fff;
+// ** Tooltip background color
 @tooltip-bg:                  #000;
+@tooltip-opacity:             .9;
 
+// ** Tooltip arrow width
 @tooltip-arrow-width:         5px;
+// ** Tooltip arrow color
 @tooltip-arrow-color:         @tooltip-bg;
 
 
-// Popovers
-// -------------------------
+//== Popovers
+//
+//##
+
+// ** Popover body background color
 @popover-bg:                          #fff;
+// ** Popover maximum width
 @popover-max-width:                   276px;
+// ** Popover border color
 @popover-border-color:                rgba(0,0,0,.2);
+// ** Popover fallback border color
 @popover-fallback-border-color:       #ccc;
 
+// ** Popover title background color
 @popover-title-bg:                    darken(@popover-bg, 3%);
 
+// ** Popover arrow width
 @popover-arrow-width:                 10px;
-@popover-arrow-color:                 #fff;
+// ** Popover arrow color
+@popover-arrow-color:                 @popover-bg;
 
+// ** Popover outer arrow width
 @popover-arrow-outer-width:           (@popover-arrow-width + 1);
-@popover-arrow-outer-color:           rgba(0,0,0,.25);
-@popover-arrow-outer-fallback-color:  #999;
+// ** Popover outer arrow color
+@popover-arrow-outer-color:           fadein(@popover-border-color, 5%);
+// ** Popover outer arrow fallback color
+@popover-arrow-outer-fallback-color:  darken(@popover-fallback-border-color, 20%);
 
 
-// Labels
-// -------------------------
+//== Labels
+//
+//##
 
+// ** Default label background color
 @label-default-bg:            @gray-light;
+// ** Primary label background color
 @label-primary-bg:            @brand-primary;
+// ** Success label background color
 @label-success-bg:            @brand-success;
+// ** Info label background color
 @label-info-bg:               @brand-info;
+// ** Warning label background color
 @label-warning-bg:            @brand-warning;
+// ** Danger label background color
 @label-danger-bg:             @brand-danger;
 
+// ** Default label text color
 @label-color:                 #fff;
+// ** Default text color of a linked label
 @label-link-hover-color:      #fff;
 
 
-// Modals
-// -------------------------
-@modal-inner-padding:         20px;
+//== Modals
+//
+//##
+
+// ** Padding applied to the modal body
+@modal-inner-padding:         15px;
 
+// ** Padding applied to the modal title
 @modal-title-padding:         15px;
+// ** Modal title line-height
 @modal-title-line-height:     @line-height-base;
 
+// ** Background color of modal content area
 @modal-content-bg:                             #fff;
+// ** Modal content border color
 @modal-content-border-color:                   rgba(0,0,0,.2);
+// ** Modal content border color **for IE8**
 @modal-content-fallback-border-color:          #999;
 
+// ** Modal backdrop background color
 @modal-backdrop-bg:           #000;
+// ** Modal backdrop opacity
+@modal-backdrop-opacity:      .5;
+// ** Modal header border color
 @modal-header-border-color:   #e5e5e5;
+// ** Modal footer border color
 @modal-footer-border-color:   @modal-header-border-color;
 
+@modal-lg:                    900px;
+@modal-md:                    600px;
+@modal-sm:                    300px;
+
+
+//== Alerts
+//
+//## Define alert colors, border radius, and padding.
 
-// Alerts
-// -------------------------
 @alert-padding:               15px;
 @alert-border-radius:         @border-radius-base;
 @alert-link-font-weight:      bold;
@@ -497,38 +642,75 @@
 @alert-danger-border:         @state-danger-border;
 
 
-// Progress bars
-// -------------------------
+//== Progress bars
+//
+//##
+
+// ** Background color of the whole progress component
 @progress-bg:                 #f5f5f5;
+// ** Progress bar text color
 @progress-bar-color:          #fff;
+// ** Variable for setting rounded corners on progress bar.
+@progress-border-radius:      @border-radius-base;
 
+// ** Default progress bar color
 @progress-bar-bg:             @brand-primary;
+// ** Success progress bar color
 @progress-bar-success-bg:     @brand-success;
+// ** Warning progress bar color
 @progress-bar-warning-bg:     @brand-warning;
+// ** Danger progress bar color
 @progress-bar-danger-bg:      @brand-danger;
+// ** Info progress bar color
 @progress-bar-info-bg:        @brand-info;
 
 
-// List group
-// -------------------------
-@list-group-bg:               #fff;
-@list-group-border:           #ddd;
-@list-group-border-radius:    @border-radius-base;
-
-@list-group-hover-bg:         #f5f5f5;
-@list-group-active-color:     @component-active-color;
-@list-group-active-bg:        @component-active-bg;
-@list-group-active-border:    @list-group-active-bg;
-
-@list-group-link-color:          #555;
-@list-group-link-heading-color:  #333;
-
+//== List group
+//
+//##
+
+// ** Background color on `.list-group-item`
+@list-group-bg:                 #fff;
+// ** `.list-group-item` border color
+@list-group-border:             #ddd;
+// ** List group border radius
+@list-group-border-radius:      @border-radius-base;
+
+// ** Background color of single list items on hover
+@list-group-hover-bg:           #f5f5f5;
+// ** Text color of active list items
+@list-group-active-color:       @component-active-color;
+// ** Background color of active list items
+@list-group-active-bg:          @component-active-bg;
+// ** Border color of active list elements
+@list-group-active-border:      @list-group-active-bg;
+// ** Text color for content within active list items
+@list-group-active-text-color:  lighten(@list-group-active-bg, 40%);
+
+// ** Text color of disabled list items
+@list-group-disabled-color:      @gray-light;
+// ** Background color of disabled list items
+@list-group-disabled-bg:         @gray-lighter;
+// ** Text color for content within disabled list items
+@list-group-disabled-text-color: @list-group-disabled-color;
+
+@list-group-link-color:         #555;
+@list-group-link-hover-color:   @list-group-link-color;
+@list-group-link-heading-color: #333;
+
+
+//== Panels
+//
+//##
 
-// Panels
-// -------------------------
 @panel-bg:                    #fff;
-@panel-inner-border:          #ddd;
+@panel-body-padding:          15px;
+@panel-heading-padding:       10px 15px;
+@panel-footer-padding:        @panel-heading-padding;
 @panel-border-radius:         @border-radius-base;
+
+// ** Border color for elements within panels
+@panel-inner-border:          #ddd;
 @panel-footer-bg:             #f5f5f5;
 
 @panel-default-text:          @gray-dark;
@@ -543,6 +725,10 @@
 @panel-success-border:        @state-success-border;
 @panel-success-heading-bg:    @state-success-bg;
 
+@panel-info-text:             @state-info-text;
+@panel-info-border:           @state-info-border;
+@panel-info-heading-bg:       @state-info-bg;
+
 @panel-warning-text:          @state-warning-text;
 @panel-warning-border:        @state-warning-border;
 @panel-warning-heading-bg:    @state-warning-bg;
@@ -551,34 +737,46 @@
 @panel-danger-border:         @state-danger-border;
 @panel-danger-heading-bg:     @state-danger-bg;
 
-@panel-info-text:             @state-info-text;
-@panel-info-border:           @state-info-border;
-@panel-info-heading-bg:       @state-info-bg;
 
+//== Thumbnails
+//
+//##
 
-// Thumbnails
-// -------------------------
+// ** Padding around the thumbnail image
 @thumbnail-padding:           4px;
+// ** Thumbnail background color
 @thumbnail-bg:                @body-bg;
+// ** Thumbnail border color
 @thumbnail-border:            #ddd;
+// ** Thumbnail border radius
 @thumbnail-border-radius:     @border-radius-base;
 
+// ** Custom text color for thumbnail captions
 @thumbnail-caption-color:     @text-color;
+// ** Padding around the thumbnail caption
 @thumbnail-caption-padding:   9px;
 
 
-// Wells
-// -------------------------
+//== Wells
+//
+//##
+
 @well-bg:                     #f5f5f5;
+@well-border:                 darken(@well-bg, 7%);
+
 
+//== Badges
+//
+//##
 
-// Badges
-// -------------------------
 @badge-color:                 #fff;
+// ** Linked badge text color on hover
 @badge-link-hover-color:      #fff;
 @badge-bg:                    @gray-light;
 
+// ** Badge text color in active nav link
 @badge-active-color:          @link-color;
+// ** Badge background color in active nav link
 @badge-active-bg:             #fff;
 
 @badge-font-weight:           bold;
@@ -586,16 +784,25 @@
 @badge-border-radius:         10px;
 
 
-// Breadcrumbs
-// -------------------------
-@breadcrumb-bg:               #f5f5f5;
-@breadcrumb-color:            #ccc;
-@breadcrumb-active-color:     @gray-light;
-@breadcrumb-separator:        "/";
+//== Breadcrumbs
+//
+//##
+
+@breadcrumb-padding-vertical:   8px;
+@breadcrumb-padding-horizontal: 15px;
+// ** Breadcrumb background color
+@breadcrumb-bg:                 #f5f5f5;
+// ** Breadcrumb text color
+@breadcrumb-color:              #ccc;
+// ** Text color of current page in the breadcrumb
+@breadcrumb-active-color:       @gray-light;
+// ** Textual separator for between breadcrumb elements
+@breadcrumb-separator:          "/";
 
 
-// Carousel
-// ------------------------
+//== Carousel
+//
+//##
 
 @carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
 
@@ -610,53 +817,54 @@
 @carousel-caption-color:                      #fff;
 
 
-// Close
-// ------------------------
+//== Close
+//
+//##
+
 @close-font-weight:           bold;
 @close-color:                 #000;
 @close-text-shadow:           0 1px 0 #fff;
 
 
-// Code
-// ------------------------
+//== Code
+//
+//##
+
 @code-color:                  #c7254e;
 @code-bg:                     #f9f2f4;
 
+@kbd-color:                   #fff;
+@kbd-bg:                      #333;
+
 @pre-bg:                      #f5f5f5;
 @pre-color:                   @gray-dark;
 @pre-border-color:            #ccc;
 @pre-scrollable-max-height:   340px;
 
-// Type
-// ------------------------
+
+//== Type
+//
+//##
+
+// ** Horizontal offset for forms and lists.
+@component-offset-horizontal: 180px;
+// ** Text muted color
 @text-muted:                  @gray-light;
+// ** Abbreviations and acronyms border color
 @abbr-border-color:           @gray-light;
+// ** Headings small color
 @headings-small-color:        @gray-light;
+// ** Blockquote small color
 @blockquote-small-color:      @gray-light;
+// ** Blockquote font size
+@blockquote-font-size:        (@font-size-base * 1.25);
+// ** Blockquote border color
 @blockquote-border-color:     @gray-lighter;
+// ** Page header border color
 @page-header-border-color:    @gray-lighter;
-
-// Miscellaneous
-// -------------------------
-
-// Hr border color
+// ** Width of horizontal description list titles
+@dl-horizontal-offset:        @component-offset-horizontal;
+// ** Point at which .dl-horizontal becomes horizontal
+@dl-horizontal-breakpoint:    @grid-float-breakpoint;
+// ** Horizontal line color.
 @hr-border:                   @gray-lighter;
-
-// Horizontal forms & lists
-@component-offset-horizontal: 180px;
-
-
-// Container sizes
-// --------------------------------------------------
-
-// Small screen / tablet
-@container-tablet:             ((720px + @grid-gutter-width));
-@container-sm:                 @container-tablet;
-
-// Medium screen / desktop
-@container-desktop:            ((940px + @grid-gutter-width));
-@container-md:                 @container-desktop;
-
-// Large screen / wide desktop
-@container-large-desktop:      ((1140px + @grid-gutter-width));
-@container-lg:                 @container-large-desktop;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/wells.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/wells.less b/jspwiki-war/src/main/styles/haddock/bootstrap/wells.less
new file mode 100755
index 0000000..15d072b
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/wells.less
@@ -0,0 +1,29 @@
+//
+// Wells
+// --------------------------------------------------
+
+
+// Base class
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: @well-bg;
+  border: 1px solid @well-border;
+  border-radius: @border-radius-base;
+  .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
+  blockquote {
+    border-color: #ddd;
+    border-color: rgba(0,0,0,.15);
+  }
+}
+
+// Sizes
+.well-lg {
+  padding: 24px;
+  border-radius: @border-radius-large;
+}
+.well-sm {
+  padding: 9px;
+  border-radius: @border-radius-small;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/.crunch
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/.crunch b/jspwiki-war/src/main/styles/haddock/default/.crunch
new file mode 100644
index 0000000..fea8681
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/default/.crunch
@@ -0,0 +1,123 @@
+{
+	"files": {
+		"build.less": {
+			"engines": [
+				{
+					"compiler": "less",
+					"output": "build.css",
+					"options": {
+						"compress": false,
+						"ieCompat": false,
+						"strictMath": false,
+						"strictUnits": false,
+						"javascriptEnabled": false,
+						"sourceMap": true
+					}
+				}
+			],
+			"sources": [
+				"../bootstrap/alerts.less",
+				"../bootstrap/badges.less",
+				"../bootstrap/button-groups.less",
+				"../bootstrap/buttons.less",
+				"../bootstrap/carousel.less",
+				"../bootstrap/close.less",
+				"../bootstrap/code.less",
+				"../bootstrap/dropdowns.less",
+				"../bootstrap/forms.less",
+				"../bootstrap/input-groups.less",
+				"../bootstrap/labels.less",
+				"../bootstrap/list-group.less",
+				"../bootstrap/mixins.less",
+				"../bootstrap/mixins/alerts.less",
+				"../bootstrap/mixins/background-variant.less",
+				"../bootstrap/mixins/border-radius.less",
+				"../bootstrap/mixins/buttons.less",
+				"../bootstrap/mixins/center-block.less",
+				"../bootstrap/mixins/clearfix.less",
+				"../bootstrap/mixins/forms.less",
+				"../bootstrap/mixins/gradients.less",
+				"../bootstrap/mixins/grid-framework.less",
+				"../bootstrap/mixins/grid.less",
+				"../bootstrap/mixins/hide-text.less",
+				"../bootstrap/mixins/image.less",
+				"../bootstrap/mixins/labels.less",
+				"../bootstrap/mixins/list-group.less",
+				"../bootstrap/mixins/nav-divider.less",
+				"../bootstrap/mixins/nav-vertical-align.less",
+				"../bootstrap/mixins/opacity.less",
+				"../bootstrap/mixins/pagination.less",
+				"../bootstrap/mixins/panels.less",
+				"../bootstrap/mixins/progress-bar.less",
+				"../bootstrap/mixins/reset-filter.less",
+				"../bootstrap/mixins/reset-text.less",
+				"../bootstrap/mixins/resize.less",
+				"../bootstrap/mixins/responsive-visibility.less",
+				"../bootstrap/mixins/size.less",
+				"../bootstrap/mixins/tab-focus.less",
+				"../bootstrap/mixins/table-row.less",
+				"../bootstrap/mixins/text-emphasis.less",
+				"../bootstrap/mixins/text-overflow.less",
+				"../bootstrap/mixins/vendor-prefixes.less",
+				"../bootstrap/navs.less",
+				"../bootstrap/normalize.less",
+				"../bootstrap/panels.less",
+				"../bootstrap/popovers.less",
+				"../bootstrap/progress-bars.less",
+				"../bootstrap/responsive-utilities.less",
+				"../bootstrap/scaffolding.less",
+				"../bootstrap/tables.less",
+				"../bootstrap/tooltip.less",
+				"../bootstrap/type.less",
+				"../bootstrap/utilities.less",
+				"../bootstrap/variables.less",
+				"../fontjspwiki/core.less",
+				"../fontjspwiki/font-jspwiki.less",
+				"../fontjspwiki/icons.less",
+				"../fontjspwiki/path.less",
+				"Accordion.less",
+				"Category.less",
+				"Collapsible.less",
+				"Columns.less",
+				"CommentBox.less",
+				"Dialog.less",
+				"Flip.less",
+				"GraphBar.less",
+				"ImagePlugin.less",
+				"IndexPlugin.less",
+				"Invisibles.less",
+				"RecentChangesPlugin.less",
+				"TOCPlugin.less",
+				"TableX.Filter.less",
+				"TableX.Sort.less",
+				"Tabs.less",
+				"Template.Attach.less",
+				"Template.Content.less",
+				"Template.Diff.less",
+				"Template.Edit.less",
+				"Template.Nav.less",
+				"Template.Preview.less",
+				"Template.Search.less",
+				"Template.SearchBox.less",
+				"Template.Sidebar.less",
+				"Template.UserBox.less",
+				"Template.View.less",
+				"Template.Workflow.less",
+				"Tips.less",
+				"Viewer.Carousel.less",
+				"Viewer.Slimbox.less",
+				"Viewer.less",
+				"WeblogPlugin.less",
+				"forms.less",
+				"grid.less",
+				"modals.less",
+				"pagination.less",
+				"prettify.less",
+				"print.less",
+				"tables.less",
+				"type.less",
+				"variables.less"
+			]
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/Calendar.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/Calendar.less b/jspwiki-war/src/main/styles/haddock/default/Calendar.less
deleted file mode 100644
index 03c790d..0000000
--- a/jspwiki-war/src/main/styles/haddock/default/Calendar.less
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * 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.
- *
-*/
-//
-// Section: Taglibs
-// - Stylesheet definitions for some of the JSP-tags shipped with JSPWiki.
-//
-
-/*
-Style: CalendarTag
-
-DOM structure:
-
-*/
-.calendar {
-    border:1px solid black;
-}
-.calendar td {
-    text-align:center;
-}
-.calendar .othermonth {
-    color:#707070;
-}
-.calendar .link {
-    background:@gray-light;
-}
-//.calendar tr.month ...
-//.calendar tr.weekdays ...
-.calendar .weekdays {
-    color:red;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/Dialog.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/Dialog.less b/jspwiki-war/src/main/styles/haddock/default/Dialog.less
index a9a86f0..0e8a998 100644
--- a/jspwiki-war/src/main/styles/haddock/default/Dialog.less
+++ b/jspwiki-war/src/main/styles/haddock/default/Dialog.less
@@ -151,12 +151,22 @@ DOM structure:
 
     }
 
-    &.dialog-horizontal .item { float: left; padding:0.5em; }
     &.dialog-horizontal {
         width: auto;
-        .body { padding: 0 2em 0 0.5em; } //reserve place for the .close button
+
+        .body { padding: 0 2em 0 0.5em; } //reserve space for the .close button on the right
+
+        .item {
+            float: left;
+            padding: 0.5em;
+        }
+
+        .divider {
+            float: left;
+            margin: 0 0.5em;
+            padding: 1.5em 1px 1em 0;  //1px is the width of the divider
+        }
     }
-    //&.dialog-horizontal .item:nth-child(6n) { float: none;  }
 
 }
 .dialog.chars .item { text-align:center; }
@@ -235,7 +245,8 @@ Style: .dialog.color
     	position:absolute;
 
         //FIXME: dimensions copied from forms/.form-control - should be other ways to inherit this
-        height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
+        //Make inputs at least the height of their button counterpart (base line-height + padding + border)
+        height: @input-height-base;
         padding: @padding-base-vertical @padding-base-horizontal;
         font-size: @font-size-base;
         //line-height: @line-height-base;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/Invisibles.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/Invisibles.less b/jspwiki-war/src/main/styles/haddock/default/Invisibles.less
index 8b93054..6583b82 100644
--- a/jspwiki-war/src/main/styles/haddock/default/Invisibles.less
+++ b/jspwiki-war/src/main/styles/haddock/default/Invisibles.less
@@ -24,7 +24,7 @@ Behavior: %%invisibles
 */
 .token.tab:not(:empty):before,
 .token.cr:before,
-.token.lf:before { color: @red; }
+.token.lf:before { color: @wiki-mark; text-shadow:0 1px 0 @white; }
 
 .token.tab:not(:empty):before { content: '\21B3'; }
 .token.cr:before { content: '\240D'; }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less b/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less
index 05c2f58..2faabe3 100644
--- a/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less
+++ b/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less
@@ -27,7 +27,6 @@ DOM structure:
 .recentchanges {
 
     table-layout:fixed;  // this renders faster
-    .table-hover;
 
     td {
         &:first-child:not(.date) {
@@ -37,12 +36,7 @@ DOM structure:
             border-bottom:2px solid @wiki-recentchanges-date-bg;
             padding-top:1em;
         }
-        &.changenote {
-            .small;
-            font-style:normal;
-        }
-    }
-    tr.odd td {
-        background-color:transparent;
+
     }
+
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less b/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less
index 2cd23fc..02c4616 100644
--- a/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less
+++ b/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less
@@ -33,19 +33,24 @@ Style: TableOfContentsPlugin
 DOM structure:
     (begin)
     div.toc
-        div.collapsebox
-            b.bullet xpand|clpse
-            h4#section-TOC Table Of Contents
+        div.collapsebox.panel.panel-default
+            div.panel-head
+                b.bullet xpand|clpse
+                h4#section-TOC Table Of Contents
             div.xpand|clpse
-                ul
-                    li.toclevel-1
-                    li.toclevel-2
-                    li.toclevel-3
+                div.panel-body
+                    ul
+                        li.toclevel-1
+                        li.toclevel-2
+                        li.toclevel-3
     (end)
 */
 .toc {
     width: (100% - @wiki-commentbox-width);
 
+    //when collapsed the header bottom border doubles with the bottom panel border
+    .panel-heading { border-bottom:none; }   //ugh -- for now just hide the border
+
     ul {
         .list-unstyled;
         li:hover { background:@dropdown-link-hover-bg; }
@@ -55,6 +60,7 @@ DOM structure:
     .toclevel-2 { padding-left:2.4em; }
     .toclevel-3 { padding-left:4.6em; }
 }
+//in case a TOC is added to the sidebar;  it will show the TOC of the main page
 .sidebar .toc {
     width:100%;
     .toclevel-1 { padding-left:.25em; }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/Template.Content.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/Template.Content.less b/jspwiki-war/src/main/styles/haddock/default/Template.Content.less
index 0c8119e..5699c77 100644
--- a/jspwiki-war/src/main/styles/haddock/default/Template.Content.less
+++ b/jspwiki-war/src/main/styles/haddock/default/Template.Content.less
@@ -56,8 +56,6 @@ DOM Structure:
     width:@wiki-sidebar-width;
     margin-left:-@wiki-sidebar-width;
     padding:@padding-base-horizontal;
-    //padding-left:@padding-base-horizontal;
-    //padding-right:@padding-base-horizontal;
     overflow-x:hidden;
 }
 .page, .sidebar {
@@ -121,7 +119,7 @@ We may just hide the on/off toggle in css
 	//& > h2, & > h3, & > h4,  { margin-top:0; }
 }
 .page-content {
-    padding: @padding-base-horizontal;
+    padding: @padding-base-vertical @padding-base-horizontal;
 }
 
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less b/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less
index 1263aa2..a496009 100644
--- a/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less
+++ b/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less
@@ -39,21 +39,10 @@ textarea { white-space: pre-wrap; }
     }
 
 }
-.editform input[name=changenote] {
-    position: absolute;
-    z-index: 2;  //appear on top of the button group
-    width: 480px;
-}
-
-
-.editform .commentsignature {
-    position: absolute;
-    z-index: 2;  //appear on top of the button group
-}
 
-
-.editform .open + .editor-tools  {
-    opacity:0;
+//save or post-comment button dropdown-menu : increase width of standard dropdown
+button[name=ok] + .dropdown-menu input[type=text] {
+    width: 340px;
 }
 
 .editor {
@@ -63,58 +52,111 @@ textarea { white-space: pre-wrap; }
     background: @wiki-editor-bg;
     color:inherit;
     font-size:90%;
+    border-radius:0;
 }
 
 //base styling similar to .page-content in Template.Content.less;
 .ajaxpreview {
-
-    &:empty:before {
-        content:"PREVIEW";
-    }
-
-    .hide;
-    background: @wiki-preview-bg;
-    padding: 0 0 .5em @grid-gutter-width/2; //cannot use margin here, as width=50%
+    //background: @wiki-preview-bg;
+    padding: .5em 0 .5em @grid-gutter-width/2; //cannot use margin here, as width=50%
     overflow: auto;
     //-ms-overflow-style: -ms-autohiding-scrollbar;
-    border: 2px dashed transparent;
+    //border: 2px dashed transparent;  //make space for the .loading effect
+    border: 1px solid @input-border;
+    border-left: none;
+    //.transition(background 0.2s ease-in-out);
 
     &.loading {
-        border: 2px dashed red;
+        //background: @wiki-empty-preview-bg;
+    }
+
+    &.empty {
+        .lead;
+        margin: 0; //reset .lead margin setting
+        .center;
+        background: @wiki-empty-preview-bg;
+        padding-top:2em;
     }
 }
 
-//Layout of editor and preview area
+/*
+Layout of editor and preview area
+
+HORIZONTAL SIDE BY SIDE VIEW  (.previewcolumn)
+     div.snip
+         div.toolbar
+         div.edit-area.livepreview.previewcolumn
+             div
+                div.dialog.selection
+                div {position:absolue}  => textarea-mirror
+                textarea.editor.snipeable
+                textarea#editorarea.editor.hidden
+             div.ajaxpreview
+         div.resizer[data-resize]
+
+VERTICAL VIEW
+     div.snip
+         div.toolbar
+         div.edit-area.livepreview
+             div
+                div.dialog.selection
+                div {position:absolue}  => textarea-mirror
+                textarea.editor.snipeable
+                textarea#editorarea.editor.hidden
+         div.resizer[data-resize]
+         div.ajaxpreview
 
+*/
 //default: show the editor (and preview) areas at 100%
-.edit-area  .col-50,
-.edit-area + .resizer + .ajaxpreview.col-50 { width:100%; }
+.edit-area > div,
+.ajaxpreview { width:100%; }
 
-//when livepreview is on, show the ajaxpreview area
-.edit-area.livepreview .ajaxpreview { .show; }
-.edit-area.livepreview  + .resizer + .ajaxpreview { .show; height:auto !important; }
+//when .previewcolumn (side by side) is on, set width of edit-area children to 50%
+.edit-area.livepreview.previewcolumn > div {
+    width:50%;
+    float:left;
+}
 
-//when livepreview is on AND previewcolumn (side by side) is on, set width to 50%
-.edit-area.livepreview.previewcolumn .col-50 { width:50%; float:left; }
+//only show the .ajaxpreview area when the .livepreview is on
+.edit-area:not(.livepreview) .ajaxpreview,
+.edit-area:not(.livepreview) ~ .ajaxpreview {
+    .hide;
+}
 
+.edit-area ~ .ajaxpreview {
+    height:auto !important;
+    border-left:1px solid @input-border
+}
 
 .resizer {
-    background: @wiki-resizer;
+    //background-color: @wiki-resizer;
 	cursor:row-resize;
-    width:100%;
-	height:8px;
-    line-height:8px;
-    margin-top:4px;
-    margin-bottom:.5em;
-    border-radius:4px;
+	height:.5em;//4px;
+    line-height:.5em; //4px;
+    //margin:.25em 0;
+    //border-radius:2px;
     z-index:3;
+    position:relative;
 
     &.dragging {
-        .progress-striped .progress-bar;
-        .progress.active .progress-bar;
+        //border:1px solid @input-border;
+        //.progress-striped .progress-bar;
+        //.progress.active .progress-bar;
     }
 }
 
+.comment-page {
+    height: 150px;
+    overflow-y: scroll;
+}
+.comment-page + [data-resize] {
+	cursor:row-resize;
+    background-color: @white;
+    border-top: 3px double @silver;
+    border-radius:0;
+    //fit horizontal resizer to screen width (hack to offset paddings of parent)
+    margin:4px -@padding-base-horizontal 7px -@padding-base-horizontal;
+}
 
 //CHECK: move to dropdown.less ..
 //reset bootstrap/form.less style on labels inside dropdown menu-s
@@ -122,8 +164,8 @@ textarea { white-space: pre-wrap; }
     label { font-weight: normal; }
 }
 
-.toolbar {
 
+.toolbar {
     padding-bottom: 1em;
     .btn-group {
         border:1px solid @link-color;
@@ -133,6 +175,7 @@ textarea { white-space: pre-wrap; }
 
 }
 
+
 /*
 Horizontal Dropdown Menu (based on bootstrap)
 FIXME: used a hack to fix the min-width of the default dropdown menu ; there must be a better way !
@@ -154,13 +197,26 @@ ul.dropdown-menu.dropdown-menu-horizontal {
 
 }
 
+.dropdown-size-4 {
+    width:18.2em;
+    > li {
+        display:inline-block;
+        float:left;
+        width:6em;
+        //border:1px solid red;
+        text-align:center;
+    }
+    > li:nth-child(3n+1) { clear:both;}
+}
+
+
 // icons only, or text labels ?
 // [data-cmd] { &:after { content: " " attr(data-cmd);  } }
 
 [data-cmd='find'] + .dropdown-menu {
 
     padding:5px 20px;
-    background-color: fade(@dropdown-bg,80%); //white background
+    background-color: fade(@dropdown-bg, 80%); //white background
 
     .tbHITS {
     	position:absolute;
@@ -170,6 +226,7 @@ ul.dropdown-menu.dropdown-menu-horizontal {
 
 }
 
+
 [data-cmd='color'] {
     background:url("@{imagePath}/color-wheel.png") no-repeat center;
 }
@@ -191,12 +248,10 @@ General styles to support wysiwyg editors
 
     .ajaxpreview {
         padding:1em;
-        //font-size: 90%;
         font-family: @font-family-monospace;
         white-space: pre-wrap;  //Lines are broken at newline characters, at <br>, and as necessary to fill line boxes.
-        border:1px solid silver;
+        border:1px solid @pre-border-color;
         word-wrap:normal;
-
     }
 
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/Tips.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/Tips.less b/jspwiki-war/src/main/styles/haddock/default/Tips.less
index f5172f8..6f91fc9 100644
--- a/jspwiki-war/src/main/styles/haddock/default/Tips.less
+++ b/jspwiki-war/src/main/styles/haddock/default/Tips.less
@@ -46,9 +46,10 @@ Bootstrap
 */
 
 .tip-link {
-    .category-link;
+    border-bottom: .1em dotted;
     > [class^=tip] { .hidden; }
+    &:hover { text-decoration:none; }
 }
+.tooltip-inner {
 
-@tooltip-bg: rgba(0,0,0,.7);
-@tooltip-arrow-color: rgba(0,0,0,.7);
\ No newline at end of file
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less b/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less
index c20e2be..22a555f 100644
--- a/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less
+++ b/jspwiki-war/src/main/styles/haddock/default/WeblogPlugin.less
@@ -48,14 +48,14 @@ a[href*="NewBlogEntry.jsp"] { .btn; .btn-xs; .btn-success; }
     margin:(@line-height-computed / 2) 0;
 }
 .weblogentryheading {
-    margin-top: @line-height-computed/2;
-    padding:@padding-base-vertical @padding-base-horizontal;
     .small;
-    float:right;
-    .badge;
+    position:absolute;
+    padding-top: @line-height-computed*2;
+    color:@btn-link-disabled-color;
 }
 .weblogentrytitle {
     .h1;
+    padding-bottom:(@line-height-computed );
     margin-bottom:(@line-height-computed / 2);
     border-bottom: 2px solid @pre-bg;
 
@@ -64,16 +64,22 @@ a[href*="NewBlogEntry.jsp"] { .btn; .btn-xs; .btn-success; }
 .weblogentrybody {
     .p;
     clear:both;
+    max-height:33vh;
+    overflow:auto;
 }
 .weblogentryfooter {
     .small;
     padding:@padding-base-vertical @padding-base-horizontal;
+    margin-bottom:@line-height-computed ;
     background-color:@pre-bg;
     clear:both;
 
-    a { .btn; .btn-xs; }
-    a[href*="_blogentry_"] { .btn-primary;  }
-    a[href*="_comments_"] { .btn-default;  }
+    a {
+        .btn; .btn-xs;
+        vertical-align:inherit;
+        &[href*="_blogentry_"] { .btn-primary;  }
+        &[href*="_comments_"] { .btn-default;  }
+    }
 
 }
 
@@ -124,3 +130,46 @@ div.weblogcomments
         content:"\u2014"; //&mdash;
     }
 }
+
+
+/*
+DOM Structure of <Wiki:Calendar />
+
+table.calendar
+  tbody
+    tr
+        td  a[href=<prev-month>] <<
+        td.month[colspan=5]
+        td  a[href=<next-month>] >>
+    tr
+        td.weekdays  Mon,Tue ...  Sun
+    tr
+        td.othermonth
+        td.days
+        td.link a[herf=<...startDate=ddmmyy>]
+*/
+table.calendar {
+    width: 100%;
+    .small;
+    .panel;
+
+    td { text-align:center;  }
+
+    .month { .panel-title; font-family:@wiki-logo-font-family; }
+    //tr:first-child > td:first-child, tr:first-child > td:last-child {  } //next, previous months buttons
+    .weekdays {
+        font-family:@font-family-monospace;
+        border-bottom:1px solid @silver;
+        background-color:@white;
+    }
+    //td:nth-child(6){ border-left:1px dashed @silver; }   //divider for week and weekend days
+    td:nth-child(6):not(.weekdays),
+    td:nth-child(7):not(.weekdays) {
+        background: @pre-bg;
+    }
+
+    .othermonth { color:@gray-light; /*disabled*/ }
+    //.days { }
+    .link a { .badge; }
+}
+

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/build.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/build.less b/jspwiki-war/src/main/styles/haddock/default/build.less
index 6c3ff75..5ab0796 100755
--- a/jspwiki-war/src/main/styles/haddock/default/build.less
+++ b/jspwiki-war/src/main/styles/haddock/default/build.less
@@ -18,28 +18,19 @@
     specific language governing permissions and limitations
     under the License.
 */
+
 /*
 Stylesheet: JSPWiki
     This is the JSPWiki stylesheet of the HADDOCK template.
-    Where possible, it extends from bootstrap 3.0.0.
+    Where possible, it extends from bootstrap 3.3.6.
 
     Skins : TODO
 
     Bootstrap .less files are imported unchanged, so future upgrades are easy.
-    ( ./bootstrap/<file>.less )
     In some cases, JSPWiki variants of the .less file overwrite the bootstrap styles.
     Specific JSPWikis styles are covered by dedicated .less files
     such as JSPWiki Templates, JSPWiki Plugins, JSPWiki Dynamic Styles etc.
 */
-/*!
- * Bootstrap v3.0.0
- *
- * Copyright 2013 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world by @mdo and @fat.
- */
 
 // Core variables and mixins
 @import "../bootstrap/variables.less";

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/grid.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/grid.less b/jspwiki-war/src/main/styles/haddock/default/grid.less
index 8946a6a..a093695 100644
--- a/jspwiki-war/src/main/styles/haddock/default/grid.less
+++ b/jspwiki-war/src/main/styles/haddock/default/grid.less
@@ -22,7 +22,7 @@
 
 
 // Set the container width, and override it for fixed navbars in media queries
-.container {
+.container { 
   .container-fixed();
 
   @media (min-width: @screen-sm) {

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/prettify.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/prettify.less b/jspwiki-war/src/main/styles/haddock/default/prettify.less
index 001d8da..f200d4f 100644
--- a/jspwiki-war/src/main/styles/haddock/default/prettify.less
+++ b/jspwiki-war/src/main/styles/haddock/default/prettify.less
@@ -44,7 +44,7 @@ DOM structure:
   .atn { color: #606; }  /* a markup attribute name */
   .atv { color: #080; }  /* a markup attribute value */
   .dec, .var { color: #606; }  /* a declaration; a variable name */
-  .fun { color: red; }  /* a function name */
+  .fun { color: @red; }  /* a function name */
 }
 
 // Use higher contrast and text-weight for printable form.
@@ -78,4 +78,16 @@ pre.prettylines {
     overflow: auto;
     white-space: pre;  //overwrite default 'pre-wrap'
     word-wrap: normal; //overwrite default 'break-word'
+    word-spacing: normal;
+    word-break: normal;
+
+    -moz-tab-size: 4;
+    -o-tab-size: 4;
+    tab-size: 4;
+
+    -webkit-hyphens: none;
+    -moz-hyphens: none;
+    -ms-hyphens: none;
+    hyphens: none;
+
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/type.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/type.less b/jspwiki-war/src/main/styles/haddock/default/type.less
index 599f294..1743e7e 100644
--- a/jspwiki-war/src/main/styles/haddock/default/type.less
+++ b/jspwiki-war/src/main/styles/haddock/default/type.less
@@ -67,6 +67,15 @@ h2,h3,h4 {
 .sidebar .hashlink, .sidebar .editsection, .panel-title .hashlink { .hidden; }
 
 
+.lead {
+    font-family:@wiki-logo-font-family;
+}
+//mimicing .quote in a dialog dropdown
+.dialog .lead-item {
+    .lead;
+    font-size:@font-size-base;
+}
+
 
 b, i {
     color:inherit;
@@ -113,7 +122,7 @@ br { clear: both; }
 }
 /* closing vertical connecting corner */
 .tree ul li:last-child::after {
-    height: 1em;
+    height: .95em;
 }
 
 //dl { .dl-horizontal; }
@@ -146,6 +155,20 @@ PRE and xflow:
 
 */
 
+pre {
+  //FFS: overwrite bootstrap default, which only sets the bottom margin of a PRE
+  //better is to set top & bottom margins, in case the previous dom elements is a text node
+  //  margin: (@line-height-computed / 2) 0;
+
+  //overwrite bootstratp defaults: use alpha/transparency to also support dark backgrounds.
+  //color: @pre-color;
+  background-color: fadeout(@pre-bg,50%);
+  border: 1px solid fadeout(@pre-border-color,50%);
+
+}
+.small pre {
+  font-size: (@font-size-base - 1) * 0.85; // 14px to 13px
+}
 
 //inline code: jspwiki uses <tt> ; styles copied from bootstrap/code.less
 tt {
@@ -156,6 +179,8 @@ tt {
   white-space: nowrap;
   border-radius: @border-radius-base;
 }
+
+
 //  => reuse styling of pre
 
 //list-unstyled : bootstrap
@@ -207,12 +232,14 @@ a:hover { cursor:pointer; }
 //TODO: Overrule standard small red arrow; replace by ...  FIXME
 img.outlink { display:none; }
 a.external:after {
-    content: "\279A";
+    //.sup;
+    .small;
+    content: "\279a";
     //content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPIOE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CYII=");
     //content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAMAAADXEh96AAAAB3RJTUUH0wMUEC8DV5a0ngAAAAlwSFlzAAAK8AAACvABQqw0mAAAAwBQTFRFAAAAgAAAAIAAgIAAAACAgACAAICAwMDAwNzApsrw/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////vwoKCkgICA/wAAAP8A//8AAAD//wD/AP//////9ptMMgAAAAt0Uk5T/////////////wBKTwHyAAAAG0lEQVR42mPg4voJBAxcYJoBxgMSXGAKKA6lALPeEyZVnxeBAAAAAElFTkSuQmCC);
 }
-a.attachment + a.infolink,
-a.attachment + button + a.infolink {
+a.infolink,
+button + a.infolink {
    .icon--all;
    &:after {
         margin-left:.1em;
@@ -223,19 +250,61 @@ a.attachment + button + a.infolink {
 
 
 /*
-Interwiki link
-    Reader : show pages without sidebar,minimal header/footer
-    <a class="interwiki" href="Wiki.jsp?page=XXX&skin=reader">XXX</a>
+Interwiki links
 */
-a.interwiki[href$="skin=reader"]:hover {
-    border-bottom: 1px dashed @link-hover-color;
+.interwiki-reader,
+a.interwiki[href$="skin=reader"] {
+    &::after {
+        color:@link-color;
+        .icon--all;
+        .sup;
+        content:"\f212";  //icon-leanpub
+    }
+    &:hover::after {
+        //text-decoraction:none;  //FIXME: doesnt work ...
+    }
 }
-a.interwiki[href$="skin=raw"]:hover {
-    border-bottom: 1px dotted @link-hover-color;
+.interwiki-raw,
+a.interwiki[href$="skin=raw"] {
+    &::after {
+        .icon--text();
+        content:"raw";
+    }
+    &:hover::after {
+        //text-decoraction:none;
+        background-color:@link-hover-color;
+    }
+}
+.interwiki-edit,
+a.interwiki[href*="Edit.jsp?page="] {
+    &::after {
+        .icon--text;
+        content:"edit";
+        //color:@link-color;
+        //.icon--all;
+        //.sup;
+        //content:"\f040";  //icon-pencil
+    }
+    &:hover::after {
+        //text-decoraction:none;
+        background-color:@link-hover-color;
+    }
+}
+.interwiki-group,
+a.interwiki[href*="Group.jsp?group="] {
+    &::after {
+        .icon--text;
+        content:"group";
+        //color:@link-color;
+        //.icon--all;
+        //.sup;
+        //content:"\f0c0";  //icon-group
+    }
+    &:hover::after {
+        //text-decoraction:none;
+        background-color:@link-hover-color;
+    }
 }
-
-a.reader-view > [class^="icon-"] { color:@link-color; }
-
 
 /*
 Footnotes
@@ -252,19 +321,15 @@ Images
 img {
     &.inline { .img-responsive; /*max-width:100%;*/ }
 }
-img { position:relative;}
-img:before {
-   content:"\e607  ";
-   font-family: FontJspwiki;
-   color:@red;
-}
-img:after {
-    content: "Broken Image: [" attr(alt) "]";
-    position: absolute;
-    display:inline-block; width:100%;height:100%;
-    background:@white;
-    left:20px;padding-top:.5em;
-    color:@red;
+/* broken images */
+
+.img-error {
+    &::before {
+        .icon--all;
+        content: "\e607 ";  //icon-picture
+        padding-right:.5em;
+    }
+    > span { padding-left:.5em;}
 }
 
 //img.inline
@@ -273,7 +338,7 @@ img:after {
 
 
 // Utility class to support un-scaled, scrollable images,
-.scrollable-image {
+.scrollable-img, .scrollable-image {
 
     overflow:scroll;
     img.inline { width:auto; max-width:none; }
@@ -333,7 +398,12 @@ div.dropcaps {
 
 
 //%%quote .. /%
-//.quote is replaced by <blockquote>, to reuse bootstraps styling
+//.quote is replaced by <blockquote>, to reuse bootstraps styling -- see Wiki.Behaviour.js
+//when showing the quote style in a dialog dropdown, use .quote-item -- see Wiki.Snips.js
+.dialog .quote-item {
+    border-left: 5px solid @blockquote-border-color;
+    padding-left: @line-height-computed;
+}
 
 .page-break {
     display:block;
@@ -369,8 +439,10 @@ div.dropcaps {
 //checkme: still used?
 .accesskey { text-decoration:underline; }
 
-.changenote { max-width:240px; font-style: italic; }
-
+.changenote {
+    max-width:240px;
+    .small;
+}
 .nowrap { white-space:nowrap; }
 
 [class^=tangle-] { background: @yellow; }
@@ -378,12 +450,13 @@ div.dropcaps {
 //TODO: why not use .panel iso .alert as base for these communication boxes
 .default, .success, .information, .info,  .warning, .error, .danger {
     .alert;
-    clear:both;
-    display:block;
+    //clear:both;
+    //display:block;
+    //.clearfix;
 }
 //support inline information blocks
 span.default, span.success, span.information, span.info,  span.warning, span.error, span.danger {
-    display:inline;
+    display: inline;
     padding: .05em .25em;
 }
 
@@ -400,6 +473,10 @@ td .success, td .information, td .warning, td .error { margin:0; }
 //BETTER:  td > .alert { margin:0; }
 
 
+.text-smallcaps { font-variant: small-caps; }
+
+
+
 /*
 Style: CAPTCHA tables and images
 */

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/default/variables.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/default/variables.less b/jspwiki-war/src/main/styles/haddock/default/variables.less
index a76bdea..412da0a 100644
--- a/jspwiki-war/src/main/styles/haddock/default/variables.less
+++ b/jspwiki-war/src/main/styles/haddock/default/variables.less
@@ -166,5 +166,11 @@ images/feather-small.png   wxh  162x286
 //Editor
 @wiki-editor-bg : @white;
 @wiki-preview-bg : transparent; //@white;
+@wiki-empty-preview-bg : rgba(243, 156, 18, 0.03); //@pre-bg;
 @wiki-resizer:  @btn-primary-bg;
-@wiki-editor-focus: rgba(243, 156, 18, 0.1);
\ No newline at end of file
+@wiki-editor-focus: rgba(243, 156, 18, 0.1);
+
+//Tip
+//overwrite bootstrap default style
+@tooltip-bg: rgba(0,0,0,.7);
+@tooltip-arrow-color: rgba(0,0,0,.7);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/fontjspwiki/core.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/fontjspwiki/core.less b/jspwiki-war/src/main/styles/haddock/fontjspwiki/core.less
index 33182cd..731ad03 100644
--- a/jspwiki-war/src/main/styles/haddock/fontjspwiki/core.less
+++ b/jspwiki-war/src/main/styles/haddock/fontjspwiki/core.less
@@ -26,7 +26,7 @@
 	font-weight: normal;
 	font-variant: normal;
 	text-transform: none;
-	line-height: @line-height-base;
+	line-height: 1; //@line-height-base;
 
     position:relative;
     top:.1em;
@@ -37,3 +37,14 @@
 
 	&:hover { text-decoration:none; }
 }
+.icon--text {
+    position:relative;
+    top:-0.7em;
+    font-family:@font-family-monospace;
+    font-size:65%;
+    color:@white;
+    padding:0 2px 1px;
+    margin-left:1px;
+    background-color:@link-color;
+    border-radius:@border-radius-small;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/fontjspwiki/path.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/fontjspwiki/path.less b/jspwiki-war/src/main/styles/haddock/fontjspwiki/path.less
index 9e22e64..70989a3 100644
--- a/jspwiki-war/src/main/styles/haddock/fontjspwiki/path.less
+++ b/jspwiki-war/src/main/styles/haddock/fontjspwiki/path.less
@@ -13,7 +13,7 @@
   font-style: normal;
 }
 */
-
+/*
 @font-face {
 	font-family: 'FontJspwiki';
 	src:url('fonts/FontJspwiki.eot?-y8je1z');
@@ -24,3 +24,14 @@
 	font-weight: normal;
 	font-style: normal;
 }
+*/
+@font-face {
+	font-family: 'FontJspwiki';
+	src:url('fonts/FontJspwiki.eot');
+	src:url('fonts/FontJspwiki.eot') format('embedded-opentype'),
+		url('fonts/FontJspwiki.ttf') format('truetype'),
+		url('fonts/FontJspwiki.woff') format('woff'),
+		url('fonts/FontJspwiki.svg') format('svg');
+	font-weight: normal;
+	font-style: normal;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/Comment.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/Comment.jsp b/jspwiki-war/src/main/webapp/Comment.jsp
index 4d0fb28..641727c 100644
--- a/jspwiki-war/src/main/webapp/Comment.jsp
+++ b/jspwiki-war/src/main/webapp/Comment.jsp
@@ -183,6 +183,7 @@
         }
 
         String commentText = EditorManager.getEditedText(pageContext);
+        //log.info("comment text"+commentText);
 
         //
         //  WYSIWYG editor sends us its greetings
@@ -208,7 +209,7 @@
             }
 
             Calendar cal = Calendar.getInstance();
-            SimpleDateFormat fmt = Preferences.getDateFormat( wikiContext ,  TimeFormat.DATETIME);
+            SimpleDateFormat fmt = Preferences.getDateFormat( wikiContext , TimeFormat.DATETIME);
 
             pageText.append("\n\n%%signature\n"+signature+", "+fmt.format(cal.getTime())+"\n/%");
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/DeleteGroup.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/DeleteGroup.jsp b/jspwiki-war/src/main/webapp/DeleteGroup.jsp
index 2dc7efe..827c725 100644
--- a/jspwiki-war/src/main/webapp/DeleteGroup.jsp
+++ b/jspwiki-war/src/main/webapp/DeleteGroup.jsp
@@ -14,7 +14,7 @@
     "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.  
+    under the License.
 --%>
 
 <%@ page import="org.apache.log4j.*" %>
@@ -26,7 +26,7 @@
 <%@ page errorPage="/Error.jsp" %>
 <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
 
-<%! 
+<%!
     Logger log = Logger.getLogger("JSPWiki");
 %>
 
@@ -39,7 +39,7 @@
     WikiSession wikiSession = wikiContext.getWikiSession();
     GroupManager groupMgr = wiki.getGroupManager();
     String name = request.getParameter( "group" );
-    
+
     if ( name == null )
     {
         // Group parameter was null
@@ -60,10 +60,11 @@
     }
 
     // Now, let's delete the group
-    try 
+    try
     {
         groupMgr.removeGroup( name );
-        response.sendRedirect( "." );
+        //response.sendRedirect( "." );
+        response.sendRedirect( "Group.jsp?group=" + name );
     }
     catch ( WikiSecurityException e )
     {

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/Install.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/Install.jsp b/jspwiki-war/src/main/webapp/Install.jsp
index 337e7e2..6d58bc4 100644
--- a/jspwiki-war/src/main/webapp/Install.jsp
+++ b/jspwiki-war/src/main/webapp/Install.jsp
@@ -84,7 +84,7 @@ if ( !installer.adminExists() )
   <link rel="stylesheet" media="screen, projection" type="text/css" href='<wiki:Link format="url" templatefile="jspwiki.css"/>'/>
   <wiki:IncludeResources type="stylesheet"/>
 </head>
-<body class="view">
+<body class="container">
 <div id="wikibody">
 <div id="page">
 <div id="pagecontent">
@@ -98,7 +98,7 @@ if ( !installer.adminExists() )
 <p><fmt:message key="install.jsp.intro.p3" /></p>
 
 <!-- Any messages or errors? -->
-<div class="instructions">
+<div class="help-block">
   <wiki:Messages div="information" topic="<%=Installer.INSTALL_INFO%>" prefix='<%= rb.getString( "install.jsp.install.info" )%>'/>
   <wiki:Messages div="warning" topic="<%=Installer.INSTALL_WARNING%>" prefix='<%= rb.getString( "install.jsp.install.warning" )%>'/>
   <wiki:Messages div="error" topic="<%=Installer.INSTALL_ERROR%>" prefix='<%= rb.getString( "install.jsp.install.error" )%>'/>
@@ -110,30 +110,30 @@ if ( !installer.adminExists() )
 
   <!-- Page and log directories -->
   <h3><fmt:message key="install.jsp.basics.title" /></h3>
-  <div class="block">
 
-    <label><fmt:message key="install.jsp.basics.appname.label" /></label>
-    <input type="text" name="<%=Installer.APP_NAME%>" size="20" value="<%=installer.getProperty( Installer.APP_NAME )%>"/>
-    <div class="description">
+    <label class="control-label" ><fmt:message key="install.jsp.basics.appname.label" />
+    <input class="form-control" type="text" name="<%=Installer.APP_NAME%>" size="20" value="<%=installer.getProperty( Installer.APP_NAME )%>"/>
+    </label>
+    <div class="help-block">
       <fmt:message key="install.jsp.basics.appname.desc"/>
     </div>
 
-    <br/> <label><fmt:message key="install.jsp.basics.baseurl.label" /></label>
-    <input type="text" name="<%=Installer.BASE_URL%>" size="40" value="<%=installer.getProperty( Installer.BASE_URL )%>"/>
-    <div class="description">
+    <label class="control-label" ><fmt:message key="install.jsp.basics.baseurl.label" />
+    <input class="form-control" type="url" name="<%=Installer.BASE_URL%>" size="40" value="<%=installer.getProperty( Installer.BASE_URL )%>"/>
+    </label>
+    <div class="help-block">
       <fmt:message key="install.jsp.basics.baseurl.desc" />
     </div>
 
-    <br/><label><fmt:message key="install.jsp.basics.page.storage.label" /></label>
-    <input type="text" name="<%=Installer.PAGE_DIR%>" size="40" value="<%=installer.getProperty( Installer.PAGE_DIR )%>"/>
-    <div class="description">
+    <label class="control-label" ><fmt:message key="install.jsp.basics.page.storage.label" />
+    <input class="form-control" type="text" name="<%=Installer.PAGE_DIR%>" size="40" value="<%=installer.getProperty( Installer.PAGE_DIR )%>"/>
+    </label>
+    <div class="help-block">
       <fmt:message key="install.jsp.basics.page.storage.desc" />
     </div>
 
-  </div>
 
   <h3><fmt:message key="install.jsp.security.title" /></h3>
-  <div class="block">
 
     <%
       if( validated )
@@ -141,7 +141,7 @@ if ( !installer.adminExists() )
         if ( password != null )
         {
     %>
-      <label><fmt:message key="install.jsp.security.admaccount.label" /></label>
+      <label class="control-label" ><fmt:message key="install.jsp.security.admaccount.label" /></label>
       <p><fmt:message key="install.jsp.security.admaccount.enabled" /></p>
       <div class="description">
         <fmt:message key="install.jsp.security.admaccount.enabled.desc" />
@@ -152,40 +152,38 @@ if ( !installer.adminExists() )
       else
       {
     %>
-      <label><fmt:message key="install.jsp.security.admaccount.label" /></label>
+      <label class="control-label" ><fmt:message key="install.jsp.security.admaccount.label" /></label>
       <p><fmt:message key="install.jsp.security.admaccount.notenabled" /></p>
-      <div class="description">
+      <div class="help-block">
         <fmt:message key="install.jsp.security.admaccount.notenabled.desc" />
       </div>
     <%
       }
     %>
-  </div>
 
   <h3><fmt:message key="install.jsp.adv.settings.title" /></h3>
-  <div class="block">
-    <label><fmt:message key="install.jsp.adv.settings.logfile.label" /></label>
-    <input type="text" name="<%=Installer.LOG_FILE%>" value="<%=installer.getProperty( Installer.LOG_FILE )%>" size="40"/>
-    <div class="description">
+
+    <label class="control-label" ><fmt:message key="install.jsp.adv.settings.logfile.label" />
+    <input class="form-control" type="url" name="<%=Installer.LOG_FILE%>" value="<%=installer.getProperty( Installer.LOG_FILE )%>" size="40"/>
+    </label>
+    <div class="help-block">
       <fmt:message key="install.jsp.adv.settings.logfile.desc" />
     </div> <br/>
 
-    <label><fmt:message key="install.jsp.adv.settings.workdir.label" /></label>
-    <input type="text" name="<%=Installer.WORK_DIR%>" size="40" value="<%=installer.getProperty( Installer.WORK_DIR )%>"/>
-    <div class="description">
+    <label class="control-label" ><fmt:message key="install.jsp.adv.settings.workdir.label" />
+    <input class="form-control" type="url" name="<%=Installer.WORK_DIR%>" size="40" value="<%=installer.getProperty( Installer.WORK_DIR )%>"/>
+    </label>
+    <div class="help-block">
       <fmt:message key="install.jsp.adv.settings.workdir.desc" />
     </div>
-  </div>
 
-  <br/>
-  <div class="block">
-    <div class="instructions">
+
+    <p class="help-block">
       <fmt:message key="install.jsp.instr.desc" >
         <fmt:param><%=installer.getPropertiesPath()%></fmt:param>
       </fmt:message>
-    </div>
-    <input type="submit" name="submit" value="<fmt:message key="install.jsp.instr.submit" />" />
-  </div>
+    </p>
+    <input class="btn btn-primary" type="submit" name="submit" value="<fmt:message key="install.jsp.instr.submit" />" />
 
 </form>
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/XHRMarkup2Wysiwyg.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/XHRMarkup2Wysiwyg.jsp b/jspwiki-war/src/main/webapp/XHRMarkup2Wysiwyg.jsp
new file mode 100644
index 0000000..f9bdf54
--- /dev/null
+++ b/jspwiki-war/src/main/webapp/XHRMarkup2Wysiwyg.jsp
@@ -0,0 +1,84 @@
+<%--
+    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.
+--%>
+
+<%@ page language="java" pageEncoding="UTF-8"%>
+<%@ page import="org.apache.log4j.*" %>
+<%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.render.*" %>
+<%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%!
+  public void jspInit()
+  {
+    wiki = WikiEngine.getInstance( getServletConfig() );
+  }
+  //Logger log = Logger.getLogger("XHRMarkup2Wysiwyg");
+  WikiEngine wiki;
+%>
+<%
+  WikiContext wikiContext = wiki.createContext( request, WikiContext.VIEW );
+  //WikiEngine engine = wikiContext.getEngine();
+
+  if( !wiki.getAuthorizationManager().hasAccess( wikiContext, response ) ) return;
+
+  response.setContentType("text/html; charset="+wiki.getContentEncoding() );
+  //response.setHeader( "Cache-control", "max-age=0" );
+  //response.setDateHeader( "Expires", new Date().getTime() );
+  //response.setDateHeader( "Last-Modified", new Date().getTime() );
+
+  String usertext = request.getParameter( "markupPageText" );
+
+  if( usertext != null )
+  {
+
+    RenderingManager renderingManager = new RenderingManager();
+
+    // since the WikiProperties are shared, we'll want to make our own copy of it for modifying.
+    Properties copyOfWikiProperties = new Properties();
+    copyOfWikiProperties.putAll( wiki.getWikiProperties() );
+    copyOfWikiProperties.setProperty( "jspwiki.renderingManager.renderer", WysiwygEditingRenderer.class.getName() );
+    renderingManager.initialize( wiki, copyOfWikiProperties );
+
+    String pageAsHtml;
+    try
+    {
+        pageAsHtml = renderingManager.getHTML( wikiContext, usertext );
+
+    }
+        catch( Exception e )
+    {
+        pageAsHtml = "<div class='error'>Error in converting wiki-markup to well-formed HTML <br/>" + e.toString() +  "</div>";
+
+        /*
+        java.io.StringWriter sw = new java.io.StringWriter();
+        java.io.PrintWriter pw = new java.io.PrintWriter(sw);
+        e.printStackTrace(pw);
+        pageAsHtml += "<pre>" + sw.toString() + "</pre>";
+        */
+    }
+
+   // Disable the WYSIWYG_EDITOR_MODE and reset the other properties immediately
+   // after the XHTML for wysiwyg editor has been rendered.
+   context.setVariable( RenderingManager.WYSIWYG_EDITOR_MODE, Boolean.FALSE );
+   context.setVariable( WikiEngine.PROP_RUNFILTERS,  null );
+
+
+%><%= pageAsHtml %><%
+  }
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/AttachmentTab.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/AttachmentTab.jsp b/jspwiki-war/src/main/webapp/templates/haddock/AttachmentTab.jsp
index 089a8af..e2a6ff0 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/AttachmentTab.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/AttachmentTab.jsp
@@ -42,7 +42,7 @@
         method="post"
        enctype="multipart/form-data" accept-charset="<wiki:ContentEncoding/>" >
 
-    <h4><fmt:message key="attach.add"/></h4>
+    <h4><span class="icon-paper-clip"></span> <fmt:message key="attach.add"/></h4>
     <input type="hidden" name="nextpage" value="<wiki:Link context='upload' format='url'/>" />
     <input type="hidden" name="page" value="<wiki:Variable var="pagename"/>" />
     <input type="hidden" name="action" value="upload" />

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/CommentContent.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/CommentContent.jsp b/jspwiki-war/src/main/webapp/templates/haddock/CommentContent.jsp
index 0a0b9b6..411b6204 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/CommentContent.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/CommentContent.jsp
@@ -18,11 +18,25 @@
 --%>
 
 <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
-<%@ page import="javax.servlet.jsp.jstl.fmt.*" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
 <fmt:setLocale value="${prefs.Language}" />
 <fmt:setBundle basename="templates.default"/>
-
+<%--
+   First insert the main page or the corresponding blog-entry page
+   Then a horizontal resizer
+   And finally the editor for writing the comment
+--%>
 <div class="page-content">
+  <div class="row comment-page">
+    <c:set var="mainblogpage" value="${fn:substringBefore(param.page,'_comments_')}" />
+    <c:if test="${not empty mainblogpage}">
+      <c:set var="blogentrypage" value="${fn:replace(param.page,'_comments_','_blogentry_')}" />
+      <wiki:InsertPage page="${blogentrypage}" />
+    </c:if>
+    <wiki:InsertPage />
+  </div>
+  <div data-resize=".comment-page" title="<fmt:message key='editor.plain.comment.resize'/>" ></div>
   <wiki:Editor />
 </div>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp b/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp
index 5a1f87e..0268701 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/DiffTab.jsp
@@ -37,7 +37,7 @@
       method="get" accept-charset="UTF-8">
   <input type="hidden" name="page" value="<wiki:PageName />" />
 
-  <p class="btn btn-lg btn-primary btn-block">
+  <p class="btn btn-default btn-block">
        <fmt:message key="diff.difference">
          <fmt:param>
            <select class="form-control" id="r1" name="r1" onchange="this.form.submit();" >

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp b/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp
index 896480d..1a1f1ad 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/EditTemplate.jsp
@@ -43,7 +43,7 @@
   <wiki:Include page="commonheader.jsp"/>
 </head>
 
-<body class="<wiki:Variable var='requestcontext' />" >
+<body class="context-<wiki:Variable var='requestcontext' />" >
 
 <div class="container${prefs.Layout=='fluid' ? '-fluid' : ''} ${prefs.Orientation}">
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp b/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp
index 547b374..5a2b164 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/Header.jsp
@@ -42,7 +42,7 @@
        title="<fmt:message key='actions.home.title' ><fmt:param>${frontpage}</fmt:param></fmt:message> ">apache<b>jsp&#x03C9;iki</b></a>
 
         <wiki:PageExists page="HomeMenu">
-        <ul class="dropdown-menu" data-hover-parent=".cage"  style="color:black;">
+        <ul class="dropdown-menu" data-hover-parent=".cage">
           <li class="logo-menu"><wiki:InsertPage page="HomeMenu" /></li>
         </ul>
         </wiki:PageExists>

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp b/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp
index 72d7bd4..4815fd4 100644
--- a/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp
+++ b/jspwiki-war/src/main/webapp/templates/haddock/InfoContent.jsp
@@ -263,7 +263,7 @@
   <%-- Do NOT change the order of wikiname and content, otherwise the
        servlet won't find its parts. --%>
 
-  <h4><fmt:message key="info.uploadnew"/></h4>
+  <h4><span class="icon-paper-clip"></span> <fmt:message key="info.uploadnew"/></h4>
 
     <div class="form-group">
       <label class="control-label form-col-20" for="files"><fmt:message key="attach.add.selectfile"/></label>


[3/7] jspwiki git commit: Various HADDOCK updates & fixes

Posted by br...@apache.org.
http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/normalize.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/normalize.less b/jspwiki-war/src/main/styles/haddock/bootstrap/normalize.less
index 730bce0..9dddf73 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/normalize.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/normalize.less
@@ -1,31 +1,33 @@
-/*
- *
- * 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.
- *
-*/
-/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
+/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
+
+//
+// 1. Set default font family to sans-serif.
+// 2. Prevent iOS and IE text size adjust after device orientation change,
+//    without disabling user zoom.
+//
+
+html {
+  font-family: sans-serif; // 1
+  -ms-text-size-adjust: 100%; // 2
+  -webkit-text-size-adjust: 100%; // 2
+}
+
+//
+// Remove default margin.
+//
+
+body {
+  margin: 0;
+}
 
-// ==========================================================================
 // HTML5 display definitions
 // ==========================================================================
 
 //
-// Correct `block` display not defined in IE 8/9.
+// Correct `block` display not defined for any HTML5 element in IE 8/9.
+// Correct `block` display not defined for `details` or `summary` in IE 10/11
+// and Firefox.
+// Correct `block` display not defined for `main` in IE 11.
 //
 
 article,
@@ -37,6 +39,7 @@ footer,
 header,
 hgroup,
 main,
+menu,
 nav,
 section,
 summary {
@@ -44,13 +47,16 @@ summary {
 }
 
 //
-// Correct `inline-block` display not defined in IE 8/9.
+// 1. Correct `inline-block` display not defined in IE 8/9.
+// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
 //
 
 audio,
 canvas,
+progress,
 video {
-  display: inline-block;
+  display: inline-block; // 1
+  vertical-align: baseline; // 2
 }
 
 //
@@ -64,8 +70,8 @@ audio:not([controls]) {
 }
 
 //
-// Address `[hidden]` styling not present in IE 8/9.
-// Hide the `template` element in IE, Safari, and Firefox < 22.
+// Address `[hidden]` styling not present in IE 8/9/10.
+// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
 //
 
 [hidden],
@@ -73,31 +79,6 @@ template {
   display: none;
 }
 
-// ==========================================================================
-// Base
-// ==========================================================================
-
-//
-// 1. Set default font family to sans-serif.
-// 2. Prevent iOS text size adjust after orientation change, without disabling
-//    user zoom.
-//
-
-html {
-  font-family: sans-serif; // 1
-  -ms-text-size-adjust: 100%; // 2
-  -webkit-text-size-adjust: 100%; // 2
-}
-
-//
-// Remove default margin.
-//
-
-body {
-  margin: 0;
-}
-
-// ==========================================================================
 // Links
 // ==========================================================================
 
@@ -106,19 +87,12 @@ body {
 //
 
 a {
-  background: transparent;
-}
-
-//
-// Address `outline` inconsistency between Chrome and other browsers.
-//
-
-a:focus {
-  outline: thin dotted;
+  background-color: transparent;
 }
 
 //
-// Improve readability when focused and also mouse hovered in all browsers.
+// Improve readability of focused elements when they are also in an
+// active/hover state.
 //
 
 a:active,
@@ -126,22 +100,11 @@ a:hover {
   outline: 0;
 }
 
+// Text-level semantics
 // ==========================================================================
-// Typography
-// ==========================================================================
-
-//
-// Address variable `h1` font-size and margin within `section` and `article`
-// contexts in Firefox 4+, Safari 5, and Chrome.
-//
-
-h1 {
-  font-size: 2em;
-  margin: 0.67em 0;
-}
 
 //
-// Address styling not present in IE 8/9, Safari 5, and Chrome.
+// Address styling not present in IE 8/9/10/11, Safari, and Chrome.
 //
 
 abbr[title] {
@@ -149,7 +112,7 @@ abbr[title] {
 }
 
 //
-// Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
+// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
 //
 
 b,
@@ -158,7 +121,7 @@ strong {
 }
 
 //
-// Address styling not present in Safari 5 and Chrome.
+// Address styling not present in Safari and Chrome.
 //
 
 dfn {
@@ -166,13 +129,13 @@ dfn {
 }
 
 //
-// Address differences between Firefox and other browsers.
+// Address variable `h1` font-size and margin within `section` and `article`
+// contexts in Firefox 4+, Safari, and Chrome.
 //
 
-hr {
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-  height: 0;
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
 }
 
 //
@@ -185,34 +148,6 @@ mark {
 }
 
 //
-// Correct font family set oddly in Safari 5 and Chrome.
-//
-
-code,
-kbd,
-pre,
-samp {
-  font-family: monospace, serif;
-  font-size: 1em;
-}
-
-//
-// Improve readability of pre-formatted text in all browsers.
-//
-
-pre {
-  white-space: pre-wrap;
-}
-
-//
-// Set consistent quote types.
-//
-
-q {
-  quotes: "\201C" "\201D" "\2018" "\2019";
-}
-
-//
 // Address inconsistent and variable font size in all browsers.
 //
 
@@ -240,12 +175,11 @@ sub {
   bottom: -0.25em;
 }
 
-// ==========================================================================
 // Embedded content
 // ==========================================================================
 
 //
-// Remove border when inside `a` element in IE 8/9.
+// Remove border when inside `a` element in IE 8/9/10.
 //
 
 img {
@@ -253,79 +187,91 @@ img {
 }
 
 //
-// Correct overflow displayed oddly in IE 9.
+// Correct overflow not hidden in IE 9/10/11.
 //
 
 svg:not(:root) {
   overflow: hidden;
 }
 
-// ==========================================================================
-// Figures
+// Grouping content
 // ==========================================================================
 
 //
-// Address margin not present in IE 8/9 and Safari 5.
+// Address margin not present in IE 8/9 and Safari.
 //
 
 figure {
-  margin: 0;
+  margin: 1em 40px;
 }
 
-// ==========================================================================
-// Forms
-// ==========================================================================
+//
+// Address differences between Firefox and other browsers.
+//
+
+hr {
+  box-sizing: content-box;
+  height: 0;
+}
 
 //
-// Define consistent border, margin, and padding.
+// Contain overflow in all browsers.
 //
 
-fieldset {
-  border: 1px solid #c0c0c0;
-  margin: 0 2px;
-  padding: 0.35em 0.625em 0.75em;
+pre {
+  overflow: auto;
 }
 
 //
-// 1. Correct `color` not being inherited in IE 8/9.
-// 2. Remove padding so people aren't caught out if they zero out fieldsets.
+// Address odd `em`-unit font size rendering in all browsers.
 //
 
-legend {
-  border: 0; // 1
-  padding: 0; // 2
+code,
+kbd,
+pre,
+samp {
+  font-family: monospace, monospace;
+  font-size: 1em;
 }
 
+// Forms
+// ==========================================================================
+
 //
-// 1. Correct font family not being inherited in all browsers.
-// 2. Correct font size not being inherited in all browsers.
-// 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
+// Known limitation: by default, Chrome and Safari on OS X allow very limited
+// styling of `select`, unless a `border` property is set.
+//
+
+//
+// 1. Correct color not being inherited.
+//    Known issue: affects color of disabled elements.
+// 2. Correct font properties not being inherited.
+// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
 //
 
 button,
 input,
+optgroup,
 select,
 textarea {
-  font-family: inherit; // 1
-  font-size: 100%; // 2
+  color: inherit; // 1
+  font: inherit; // 2
   margin: 0; // 3
 }
 
 //
-// Address Firefox 4+ setting `line-height` on `input` using `!important` in
-// the UA stylesheet.
+// Address `overflow` set to `hidden` in IE 8/9/10/11.
 //
 
-button,
-input {
-  line-height: normal;
+button {
+  overflow: visible;
 }
 
 //
 // Address inconsistent `text-transform` inheritance for `button` and `select`.
 // All other form control elements do not inherit `text-transform` values.
-// Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
-// Correct `select` style inheritance in Firefox 4+ and Opera.
+// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
+// Correct `select` style inheritance in Firefox.
 //
 
 button,
@@ -359,6 +305,28 @@ html input[disabled] {
 }
 
 //
+// Remove inner padding and border in Firefox 4+.
+//
+
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+  border: 0;
+  padding: 0;
+}
+
+//
+// Address Firefox 4+ setting `line-height` on `input` using `!important` in
+// the UA stylesheet.
+//
+
+input {
+  line-height: normal;
+}
+
+//
+// It's recommended that you don't attempt to style these elements.
+// Firefox's implementation doesn't respect box-sizing, padding, or width.
+//
 // 1. Address box sizing set to `content-box` in IE 8/9/10.
 // 2. Remove excess padding in IE 8/9/10.
 //
@@ -370,21 +338,30 @@ input[type="radio"] {
 }
 
 //
-// 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
-// 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
-//    (include `-moz` to future-proof).
+// Fix the cursor style for Chrome's increment/decrement buttons. For certain
+// `font-size` values of the `input`, it causes the cursor style of the
+// decrement button to change from `default` to `text`.
+//
+
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+//
+// 1. Address `appearance` set to `searchfield` in Safari and Chrome.
+// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
 //
 
 input[type="search"] {
   -webkit-appearance: textfield; // 1
-  -moz-box-sizing: content-box;
-  -webkit-box-sizing: content-box; // 2
-  box-sizing: content-box;
+  box-sizing: content-box; //2
 }
 
 //
-// Remove inner padding and search cancel button in Safari 5 and Chrome
-// on OS X.
+// Remove inner padding and search cancel button in Safari and Chrome on OS X.
+// Safari (but not Chrome) clips the cancel button when the search input has
+// padding (and `textfield` appearance).
 //
 
 input[type="search"]::-webkit-search-cancel-button,
@@ -393,26 +370,42 @@ input[type="search"]::-webkit-search-decoration {
 }
 
 //
-// Remove inner padding and border in Firefox 4+.
+// Define consistent border, margin, and padding.
 //
 
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-  border: 0;
-  padding: 0;
+fieldset {
+  border: 1px solid #c0c0c0;
+  margin: 0 2px;
+  padding: 0.35em 0.625em 0.75em;
+}
+
+//
+// 1. Correct `color` not being inherited in IE 8/9/10/11.
+// 2. Remove padding so people aren't caught out if they zero out fieldsets.
+//
+
+legend {
+  border: 0; // 1
+  padding: 0; // 2
 }
 
 //
-// 1. Remove default vertical scrollbar in IE 8/9.
-// 2. Improve readability and alignment in all browsers.
+// Remove default vertical scrollbar in IE 8/9/10/11.
 //
 
 textarea {
-  overflow: auto; // 1
-  vertical-align: top; // 2
+  overflow: auto;
+}
+
+//
+// Don't inherit the `font-weight` (applied by a rule above).
+// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
+//
+
+optgroup {
+  font-weight: bold;
 }
 
-// ==========================================================================
 // Tables
 // ==========================================================================
 
@@ -424,3 +417,8 @@ table {
   border-collapse: collapse;
   border-spacing: 0;
 }
+
+td,
+th {
+  padding: 0;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/pager.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/pager.less b/jspwiki-war/src/main/styles/haddock/bootstrap/pager.less
index b8ac4fa..41abaaa 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/pager.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/pager.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Pager pagination
 // --------------------------------------------------
@@ -28,22 +8,22 @@
   margin: @line-height-computed 0;
   list-style: none;
   text-align: center;
-  .clearfix();
+  &:extend(.clearfix all);
   li {
     display: inline;
     > a,
     > span {
       display: inline-block;
       padding: 5px 14px;
-      background-color: @pagination-bg;
-      border: 1px solid @pagination-border;
+      background-color: @pager-bg;
+      border: 1px solid @pager-border;
       border-radius: @pager-border-radius;
     }
 
     > a:hover,
     > a:focus {
       text-decoration: none;
-      background-color: @pagination-hover-bg;
+      background-color: @pager-hover-bg;
     }
   }
 
@@ -67,9 +47,8 @@
     > a:focus,
     > span {
       color: @pager-disabled-color;
-      background-color: @pagination-bg;
-      cursor: not-allowed;
+      background-color: @pager-bg;
+      cursor: @cursor-disabled;
     }
   }
-
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/pagination.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/pagination.less b/jspwiki-war/src/main/styles/haddock/bootstrap/pagination.less
index 67c2b80..31f77aa 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/pagination.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/pagination.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Pagination (multiple pages)
 // --------------------------------------------------
@@ -36,6 +16,7 @@
       padding: @padding-base-vertical @padding-base-horizontal;
       line-height: @line-height-base;
       text-decoration: none;
+      color: @pagination-color;
       background-color: @pagination-bg;
       border: 1px solid @pagination-border;
       margin-left: -1px;
@@ -59,7 +40,10 @@
   > li > span {
     &:hover,
     &:focus {
+      z-index: 2;
+      color: @pagination-hover-color;
       background-color: @pagination-hover-bg;
+      border-color: @pagination-hover-border;
     }
   }
 
@@ -68,10 +52,10 @@
     &,
     &:hover,
     &:focus {
-      z-index: 2;
+      z-index: 3;
       color: @pagination-active-color;
       background-color: @pagination-active-bg;
-      border-color: @pagination-active-bg;
+      border-color: @pagination-active-border;
       cursor: default;
     }
   }
@@ -84,9 +68,9 @@
     > a:hover,
     > a:focus {
       color: @pagination-disabled-color;
-      background-color: @pagination-bg;
-      border-color: @pagination-border;
-      cursor: not-allowed;
+      background-color: @pagination-disabled-bg;
+      border-color: @pagination-disabled-border;
+      cursor: @cursor-disabled;
     }
   }
 }
@@ -96,10 +80,10 @@
 
 // Large
 .pagination-lg {
-  .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
+  .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
 }
 
 // Small
 .pagination-sm {
-  .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
+  .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/panels.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/panels.less b/jspwiki-war/src/main/styles/haddock/bootstrap/panels.less
index 5d3e624..65aa3a8 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/panels.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/panels.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Panels
 // --------------------------------------------------
@@ -34,8 +14,43 @@
 
 // Panel contents
 .panel-body {
-  padding: 15px;
-  .clearfix();
+  padding: @panel-body-padding;
+  &:extend(.clearfix all);
+}
+
+// Optional heading
+.panel-heading {
+  padding: @panel-heading-padding;
+  border-bottom: 1px solid transparent;
+  .border-top-radius((@panel-border-radius - 1));
+
+  > .dropdown .dropdown-toggle {
+    color: inherit;
+  }
+}
+
+// Within heading, strip any `h*` tag of its default margins for spacing.
+.panel-title {
+  margin-top: 0;
+  margin-bottom: 0;
+  font-size: ceil((@font-size-base * 1.125));
+  color: inherit;
+
+  > a,
+  > small,
+  > .small,
+  > small > a,
+  > .small > a {
+    color: inherit;
+  }
+}
+
+// Optional footer (stays gray in every modifier class)
+.panel-footer {
+  padding: @panel-footer-padding;
+  background-color: @panel-footer-bg;
+  border-top: 1px solid @panel-inner-border;
+  .border-bottom-radius((@panel-border-radius - 1));
 }
 
 
@@ -45,22 +60,36 @@
 // any kind of custom content between the two.
 
 .panel {
-  > .list-group {
+  > .list-group,
+  > .panel-collapse > .list-group {
     margin-bottom: 0;
 
     .list-group-item {
       border-width: 1px 0;
+      border-radius: 0;
+    }
 
-      // Remove border radius for top one
-      &:first-child {
-        .border-top-radius(0);
+    // Add border top radius for first one
+    &:first-child {
+      .list-group-item:first-child {
+        border-top: 0;
+        .border-top-radius((@panel-border-radius - 1));
       }
-      // But keep it for the last one
-      &:last-child {
+    }
+
+    // Add border bottom radius for last one
+    &:last-child {
+      .list-group-item:last-child {
         border-bottom: 0;
+        .border-bottom-radius((@panel-border-radius - 1));
       }
     }
   }
+  > .panel-heading + .panel-collapse > .list-group {
+    .list-group-item:first-child {
+      .border-top-radius(0);
+    }
+  }
 }
 // Collapse space between when there's no additional content.
 .panel-heading + .list-group {
@@ -68,7 +97,9 @@
     border-top-width: 0;
   }
 }
-
+.list-group + .panel-footer {
+  border-top-width: 0;
+}
 
 // Tables in panels
 //
@@ -77,15 +108,67 @@
 
 .panel {
   > .table,
-  > .table-responsive > .table {
+  > .table-responsive > .table,
+  > .panel-collapse > .table {
     margin-bottom: 0;
+
+    caption {
+      padding-left: @panel-body-padding;
+      padding-right: @panel-body-padding;
+    }
+  }
+  // Add border top radius for first one
+  > .table:first-child,
+  > .table-responsive:first-child > .table:first-child {
+    .border-top-radius((@panel-border-radius - 1));
+
+    > thead:first-child,
+    > tbody:first-child {
+      > tr:first-child {
+        border-top-left-radius: (@panel-border-radius - 1);
+        border-top-right-radius: (@panel-border-radius - 1);
+
+        td:first-child,
+        th:first-child {
+          border-top-left-radius: (@panel-border-radius - 1);
+        }
+        td:last-child,
+        th:last-child {
+          border-top-right-radius: (@panel-border-radius - 1);
+        }
+      }
+    }
+  }
+  // Add border bottom radius for last one
+  > .table:last-child,
+  > .table-responsive:last-child > .table:last-child {
+    .border-bottom-radius((@panel-border-radius - 1));
+
+    > tbody:last-child,
+    > tfoot:last-child {
+      > tr:last-child {
+        border-bottom-left-radius: (@panel-border-radius - 1);
+        border-bottom-right-radius: (@panel-border-radius - 1);
+
+        td:first-child,
+        th:first-child {
+          border-bottom-left-radius: (@panel-border-radius - 1);
+        }
+        td:last-child,
+        th:last-child {
+          border-bottom-right-radius: (@panel-border-radius - 1);
+        }
+      }
+    }
   }
   > .panel-body + .table,
-  > .panel-body + .table-responsive {
+  > .panel-body + .table-responsive,
+  > .table + .panel-body,
+  > .table-responsive + .panel-body {
     border-top: 1px solid @table-border-color;
   }
-  > .table > tbody:first-child th,
-  > .table > tbody:first-child td {
+  > .table > tbody:first-child > tr:first-child th,
+  > .table > tbody:first-child > tr:first-child td {
     border-top: 0;
   }
   > .table-bordered,
@@ -103,9 +186,22 @@
         > td:last-child {
           border-right: 0;
         }
-
-        &:last-child > th,
-        &:last-child > td {
+      }
+    }
+    > thead,
+    > tbody {
+      > tr:first-child {
+        > td,
+        > th {
+          border-bottom: 0;
+        }
+      }
+    }
+    > tbody,
+    > tfoot {
+      > tr:last-child {
+        > td,
+        > th {
           border-bottom: 0;
         }
       }
@@ -118,49 +214,19 @@
 }
 
 
-// Optional heading
-.panel-heading {
-  padding: 10px 15px;
-  border-bottom: 1px solid transparent;
-  .border-top-radius(@panel-border-radius - 1);
-
-  > .dropdown .dropdown-toggle {
-    color: inherit;
-  }
-}
-
-// Within heading, strip any `h*` tag of it's default margins for spacing.
-.panel-title {
-  margin-top: 0;
-  margin-bottom: 0;
-  font-size: ceil((@font-size-base * 1.125));
-  color: inherit;
-
-  > a {
-    color: inherit;
-  }
-}
-
-// Optional footer (stays gray in every modifier class)
-.panel-footer {
-  padding: 10px 15px;
-  background-color: @panel-footer-bg;
-  border-top: 1px solid @panel-inner-border;
-  .border-bottom-radius(@panel-border-radius - 1);
-}
-
-
-// Collapsable panels (aka, accordion)
+// Collapsible panels (aka, accordion)
 //
 // Wrap a series of panels in `.panel-group` to turn them into an accordion with
 // the help of our collapse JavaScript plugin.
 
 .panel-group {
+  margin-bottom: @line-height-computed;
+
   // Tighten up margin so it's only between panels
   .panel {
     margin-bottom: 0;
     border-radius: @panel-border-radius;
-    overflow: hidden; // crop contents when collapsed
+
     + .panel {
       margin-top: 5px;
     }
@@ -168,10 +234,13 @@
 
   .panel-heading {
     border-bottom: 0;
-    + .panel-collapse .panel-body {
+
+    + .panel-collapse > .panel-body,
+    + .panel-collapse > .list-group {
       border-top: 1px solid @panel-inner-border;
     }
   }
+
   .panel-footer {
     border-top: 0;
     + .panel-collapse .panel-body {
@@ -191,12 +260,12 @@
 .panel-success {
   .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
 }
+.panel-info {
+  .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
+}
 .panel-warning {
   .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
 }
 .panel-danger {
   .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
 }
-.panel-info {
-  .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
-}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/popovers.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/popovers.less b/jspwiki-war/src/main/styles/haddock/bootstrap/popovers.less
index ed31349..3a62a64 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/popovers.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/popovers.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Popovers
 // --------------------------------------------------
@@ -31,7 +11,11 @@
   display: none;
   max-width: @popover-max-width;
   padding: 1px;
-  text-align: left; // Reset given new insertion method
+  // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.
+  // So reset our font and text properties to avoid inheriting weird values.
+  .reset-text();
+  font-size: @font-size-base;
+
   background-color: @popover-bg;
   background-clip: padding-box;
   border: 1px solid @popover-fallback-border-color;
@@ -39,25 +23,20 @@
   border-radius: @border-radius-large;
   .box-shadow(0 5px 10px rgba(0,0,0,.2));
 
-  // Overrides for proper insertion
-  white-space: normal;
-
   // Offset the popover to account for the popover arrow
-  &.top     { margin-top: -10px; }
-  &.right   { margin-left: 10px; }
-  &.bottom  { margin-top: 10px; }
-  &.left    { margin-left: -10px; }
+  &.top     { margin-top: -@popover-arrow-width; }
+  &.right   { margin-left: @popover-arrow-width; }
+  &.bottom  { margin-top: @popover-arrow-width; }
+  &.left    { margin-left: -@popover-arrow-width; }
 }
 
 .popover-title {
   margin: 0; // reset heading margin
   padding: 8px 14px;
   font-size: @font-size-base;
-  font-weight: normal;
-  line-height: 18px;
   background-color: @popover-title-bg;
   border-bottom: 1px solid darken(@popover-title-bg, 5%);
-  border-radius: 5px 5px 0 0;
+  border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;
 }
 
 .popover-content {
@@ -68,7 +47,7 @@
 //
 // .arrow is outer, .arrow:after is inner
 
-.popover .arrow {
+.popover > .arrow {
   &,
   &:after {
     position: absolute;
@@ -79,16 +58,16 @@
     border-style: solid;
   }
 }
-.popover .arrow {
+.popover > .arrow {
   border-width: @popover-arrow-outer-width;
 }
-.popover .arrow:after {
+.popover > .arrow:after {
   border-width: @popover-arrow-width;
   content: "";
 }
 
 .popover {
-  &.top .arrow {
+  &.top > .arrow {
     left: 50%;
     margin-left: -@popover-arrow-outer-width;
     border-bottom-width: 0;
@@ -103,7 +82,7 @@
       border-top-color: @popover-arrow-color;
     }
   }
-  &.right .arrow {
+  &.right > .arrow {
     top: 50%;
     left: -@popover-arrow-outer-width;
     margin-top: -@popover-arrow-outer-width;
@@ -118,7 +97,7 @@
       border-right-color: @popover-arrow-color;
     }
   }
-  &.bottom .arrow {
+  &.bottom > .arrow {
     left: 50%;
     margin-left: -@popover-arrow-outer-width;
     border-top-width: 0;
@@ -134,7 +113,7 @@
     }
   }
 
-  &.left .arrow {
+  &.left > .arrow {
     top: 50%;
     right: -@popover-arrow-outer-width;
     margin-top: -@popover-arrow-outer-width;
@@ -149,5 +128,4 @@
       bottom: -@popover-arrow-width;
     }
   }
-
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/print.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/print.less b/jspwiki-war/src/main/styles/haddock/bootstrap/print.less
index 3661ff8..66e54ab 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/print.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/print.less
@@ -1,125 +1,101 @@
-/*
- *
- * 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.
- *
-*/
-//
-// Basic print styles
-// --------------------------------------------------
-// Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
+/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
+
+// ==========================================================================
+// Print styles.
+// Inlined to avoid the additional HTTP request: h5bp.com/r
+// ==========================================================================
 
 @media print {
+    *,
+    *:before,
+    *:after {
+        background: transparent !important;
+        color: #000 !important; // Black prints faster: h5bp.com/s
+        box-shadow: none !important;
+        text-shadow: none !important;
+    }
+
+    a,
+    a:visited {
+        text-decoration: underline;
+    }
+
+    a[href]:after {
+        content: " (" attr(href) ")";
+    }
+
+    abbr[title]:after {
+        content: " (" attr(title) ")";
+    }
+
+    // Don't show links that are fragment identifiers,
+    // or use the `javascript:` pseudo protocol
+    a[href^="#"]:after,
+    a[href^="javascript:"]:after {
+        content: "";
+    }
+
+    pre,
+    blockquote {
+        border: 1px solid #999;
+        page-break-inside: avoid;
+    }
+
+    thead {
+        display: table-header-group; // h5bp.com/t
+    }
+
+    tr,
+    img {
+        page-break-inside: avoid;
+    }
+
+    img {
+        max-width: 100% !important;
+    }
+
+    p,
+    h2,
+    h3 {
+        orphans: 3;
+        widows: 3;
+    }
+
+    h2,
+    h3 {
+        page-break-after: avoid;
+    }
+
+    // Bootstrap specific changes start
 
-  * {
-    text-shadow: none !important;
-    color: #000 !important; // Black prints faster: h5bp.com/s
-    background: transparent !important;
-    box-shadow: none !important;
-  }
-
-  a,
-  a:visited {
-    text-decoration: underline;
-  }
-
-  a[href]:after {
-    content: " (" attr(href) ")";
-  }
-
-  abbr[title]:after {
-    content: " (" attr(title) ")";
-  }
-
-  // Don't show links for images, or javascript/internal links
-  a[href^="javascript:"]:after,
-  a[href^="#"]:after {
-    content: "";
-  }
-
-  pre,
-  blockquote {
-    border: 1px solid #999;
-    page-break-inside: avoid;
-  }
-
-  thead {
-    display: table-header-group; // h5bp.com/t
-  }
-
-  tr,
-  img {
-    page-break-inside: avoid;
-  }
-
-  img {
-    max-width: 100% !important;
-  }
-
-  @page {
-    margin: 2cm .5cm;
-  }
-
-  p,
-  h2,
-  h3 {
-    orphans: 3;
-    widows: 3;
-  }
-
-  h2,
-  h3 {
-    page-break-after: avoid;
-  }
-
-  // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245
-  // Once fixed, we can just straight up remove this.
-  select {
-    background: #fff !important;
-  }
-
-  // Bootstrap components
-  .navbar {
-    display: none;
-  }
-  .table {
-    td,
-    th {
-      background-color: #fff !important;
-    }
-  }
-  .btn,
-  .dropup > .btn {
-    > .caret {
-      border-top-color: #000 !important;
-    }
-  }
-  .label {
-    border: 1px solid #000;
-  }
-
-  .table {
-    border-collapse: collapse !important;
-  }
-  .table-bordered {
-    th,
-    td {
-      border: 1px solid #ddd !important;
-    }
-  }
+    // Bootstrap components
+    .navbar {
+        display: none;
+    }
+    .btn,
+    .dropup > .btn {
+        > .caret {
+            border-top-color: #000 !important;
+        }
+    }
+    .label {
+        border: 1px solid #000;
+    }
+
+    .table {
+        border-collapse: collapse !important;
+
+        td,
+        th {
+            background-color: #fff !important;
+        }
+    }
+    .table-bordered {
+        th,
+        td {
+            border: 1px solid #ddd !important;
+        }
+    }
 
+    // Bootstrap specific changes end
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/progress-bars.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/progress-bars.less b/jspwiki-war/src/main/styles/haddock/bootstrap/progress-bars.less
index f2f5640..8868a1f 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/progress-bars.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/progress-bars.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Progress bars
 // --------------------------------------------------
@@ -39,7 +19,6 @@
 }
 
 
-
 // Bar itself
 // -------------------------
 
@@ -49,7 +28,7 @@
   height: @line-height-computed;
   margin-bottom: @line-height-computed;
   background-color: @progress-bg;
-  border-radius: @border-radius-base;
+  border-radius: @progress-border-radius;
   .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
 }
 
@@ -68,18 +47,26 @@
 }
 
 // Striped bars
-.progress-striped .progress-bar {
+//
+// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
+// `.progress-bar-striped` class, which you just add to an existing
+// `.progress-bar`.
+.progress-striped .progress-bar,
+.progress-bar-striped {
   #gradient > .striped();
   background-size: 40px 40px;
 }
 
 // Call animation for the active one
-.progress.active .progress-bar {
+//
+// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
+// `.progress-bar.active` approach.
+.progress.active .progress-bar,
+.progress-bar.active {
   .animation(progress-bar-stripes 2s linear infinite);
 }
 
 
-
 // Variations
 // -------------------------
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-embed.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-embed.less b/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-embed.less
new file mode 100755
index 0000000..080a511
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-embed.less
@@ -0,0 +1,35 @@
+// Embeds responsive
+//
+// Credit: Nicolas Gallagher and SUIT CSS.
+
+.embed-responsive {
+  position: relative;
+  display: block;
+  height: 0;
+  padding: 0;
+  overflow: hidden;
+
+  .embed-responsive-item,
+  iframe,
+  embed,
+  object,
+  video {
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    height: 100%;
+    width: 100%;
+    border: 0;
+  }
+}
+
+// Modifier class for 16:9 aspect ratio
+.embed-responsive-16by9 {
+  padding-bottom: 56.25%;
+}
+
+// Modifier class for 4:3 aspect ratio
+.embed-responsive-4by3 {
+  padding-bottom: 75%;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-utilities.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-utilities.less b/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-utilities.less
index 5da13a0..b1db31d 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-utilities.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/responsive-utilities.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Responsive: Utility classes
 // --------------------------------------------------
@@ -34,7 +14,8 @@
 // For more information, see the following:
 //
 // Issue: https://github.com/twbs/bootstrap/issues/10497
-// Docs: http://getbootstrap.com/getting-started/#browsers
+// Docs: http://getbootstrap.com/getting-started/#support-ie10-width
+// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
 // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
 
 @-ms-viewport {
@@ -43,187 +24,171 @@
 
 
 // Visibility utilities
+// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
+.visible-xs,
+.visible-sm,
+.visible-md,
+.visible-lg {
+  .responsive-invisibility();
+}
+
+.visible-xs-block,
+.visible-xs-inline,
+.visible-xs-inline-block,
+.visible-sm-block,
+.visible-sm-inline,
+.visible-sm-inline-block,
+.visible-md-block,
+.visible-md-inline,
+.visible-md-inline-block,
+.visible-lg-block,
+.visible-lg-inline,
+.visible-lg-inline-block {
+  display: none !important;
+}
 
 .visible-xs {
-  .responsive-invisibility();
   @media (max-width: @screen-xs-max) {
     .responsive-visibility();
   }
-  &.visible-sm {
-    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
-      .responsive-visibility();
-    }
+}
+.visible-xs-block {
+  @media (max-width: @screen-xs-max) {
+    display: block !important;
   }
-  &.visible-md {
-    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
-      .responsive-visibility();
-    }
+}
+.visible-xs-inline {
+  @media (max-width: @screen-xs-max) {
+    display: inline !important;
   }
-  &.visible-lg {
-    @media (min-width: @screen-lg-min) {
-      .responsive-visibility();
-    }
+}
+.visible-xs-inline-block {
+  @media (max-width: @screen-xs-max) {
+    display: inline-block !important;
   }
 }
+
 .visible-sm {
-  .responsive-invisibility();
-  &.visible-xs {
-    @media (max-width: @screen-xs-max) {
-      .responsive-visibility();
-    }
-  }
   @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
     .responsive-visibility();
   }
-  &.visible-md {
-    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
-      .responsive-visibility();
-    }
+}
+.visible-sm-block {
+  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
+    display: block !important;
+  }
+}
+.visible-sm-inline {
+  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
+    display: inline !important;
   }
-  &.visible-lg {
-    @media (min-width: @screen-lg-min) {
-      .responsive-visibility();
-    }
+}
+.visible-sm-inline-block {
+  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
+    display: inline-block !important;
   }
 }
+
 .visible-md {
-  .responsive-invisibility();
-  &.visible-xs {
-    @media (max-width: @screen-xs-max) {
-      .responsive-visibility();
-    }
+  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
+    .responsive-visibility();
   }
-  &.visible-sm {
-    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
-      .responsive-visibility();
-    }
+}
+.visible-md-block {
+  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
+    display: block !important;
   }
+}
+.visible-md-inline {
   @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
-    .responsive-visibility();
+    display: inline !important;
   }
-  &.visible-lg {
-    @media (min-width: @screen-lg-min) {
-      .responsive-visibility();
-    }
+}
+.visible-md-inline-block {
+  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
+    display: inline-block !important;
   }
 }
+
 .visible-lg {
-  .responsive-invisibility();
-  &.visible-xs {
-    @media (max-width: @screen-xs-max) {
-      .responsive-visibility();
-    }
+  @media (min-width: @screen-lg-min) {
+    .responsive-visibility();
   }
-  &.visible-sm {
-    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
-      .responsive-visibility();
-    }
+}
+.visible-lg-block {
+  @media (min-width: @screen-lg-min) {
+    display: block !important;
   }
-  &.visible-md {
-    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
-      .responsive-visibility();
-    }
+}
+.visible-lg-inline {
+  @media (min-width: @screen-lg-min) {
+    display: inline !important;
   }
+}
+.visible-lg-inline-block {
   @media (min-width: @screen-lg-min) {
-    .responsive-visibility();
+    display: inline-block !important;
   }
 }
 
 .hidden-xs {
-  .responsive-visibility();
   @media (max-width: @screen-xs-max) {
     .responsive-invisibility();
   }
-  &.hidden-sm {
-    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
-      .responsive-invisibility();
-    }
-  }
-  &.hidden-md {
-    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
-      .responsive-invisibility();
-    }
-  }
-  &.hidden-lg {
-    @media (min-width: @screen-lg-min) {
-      .responsive-invisibility();
-    }
-  }
 }
 .hidden-sm {
-  .responsive-visibility();
-  &.hidden-xs {
-    @media (max-width: @screen-xs-max) {
-      .responsive-invisibility();
-    }
-  }
   @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
     .responsive-invisibility();
   }
-  &.hidden-md {
-    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
-      .responsive-invisibility();
-    }
-  }
-  &.hidden-lg {
-    @media (min-width: @screen-lg-min) {
-      .responsive-invisibility();
-    }
-  }
 }
 .hidden-md {
-  .responsive-visibility();
-  &.hidden-xs {
-    @media (max-width: @screen-xs-max) {
-      .responsive-invisibility();
-    }
-  }
-  &.hidden-sm {
-    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
-      .responsive-invisibility();
-    }
-  }
   @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
     .responsive-invisibility();
   }
-  &.hidden-lg {
-    @media (min-width: @screen-lg-min) {
-      .responsive-invisibility();
-    }
-  }
 }
 .hidden-lg {
-  .responsive-visibility();
-  &.hidden-xs {
-    @media (max-width: @screen-xs-max) {
-      .responsive-invisibility();
-    }
-  }
-  &.hidden-sm {
-    @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
-      .responsive-invisibility();
-    }
-  }
-  &.hidden-md {
-    @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
-      .responsive-invisibility();
-    }
-  }
   @media (min-width: @screen-lg-min) {
     .responsive-invisibility();
   }
 }
 
+
 // Print utilities
+//
+// Media queries are placed on the inside to be mixin-friendly.
+
+// Note: Deprecated .visible-print as of v3.2.0
 .visible-print {
   .responsive-invisibility();
-}
 
-@media print {
-  .visible-print {
+  @media print {
     .responsive-visibility();
   }
-  .hidden-print {
+}
+.visible-print-block {
+  display: none !important;
+
+  @media print {
+    display: block !important;
+  }
+}
+.visible-print-inline {
+  display: none !important;
+
+  @media print {
+    display: inline !important;
+  }
+}
+.visible-print-inline-block {
+  display: none !important;
+
+  @media print {
+    display: inline-block !important;
+  }
+}
+
+.hidden-print {
+  @media print {
     .responsive-invisibility();
   }
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/scaffolding.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/scaffolding.less b/jspwiki-war/src/main/styles/haddock/bootstrap/scaffolding.less
index 730e483..64a29c6 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/scaffolding.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/scaffolding.less
@@ -1,31 +1,16 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Scaffolding
 // --------------------------------------------------
 
 
 // Reset the box-sizing
-
-*,
+//
+// Heads up! This reset may cause conflicts with some third-party widgets.
+// For recommendations on resolving such conflicts, see
+// http://getbootstrap.com/getting-started/#third-box-sizing
+* {
+  .box-sizing(border-box);
+}
 *:before,
 *:after {
   .box-sizing(border-box);
@@ -35,7 +20,7 @@
 // Body reset
 
 html {
-  font-size: 62.5%;
+  font-size: 10px;
   -webkit-tap-highlight-color: rgba(0,0,0,0);
 }
 
@@ -67,7 +52,7 @@ a {
   &:hover,
   &:focus {
     color: @link-hover-color;
-    text-decoration: underline;
+    text-decoration: @link-hover-decoration;
   }
 
   &:focus {
@@ -76,6 +61,16 @@ a {
 }
 
 
+// Figures
+//
+// We reset this here because previously Normalize had no `figure` margins. This
+// ensures we don't break anyone's use of the element.
+
+figure {
+  margin: 0;
+}
+
+
 // Images
 
 img {
@@ -125,7 +120,7 @@ hr {
 
 // Only display content to screen readers
 //
-// See: http://a11yproject.com/posts/how-to-hide-content/
+// See: http://a11yproject.com/posts/how-to-hide-content
 
 .sr-only {
   position: absolute;
@@ -137,3 +132,30 @@ hr {
   clip: rect(0,0,0,0);
   border: 0;
 }
+
+// Use in conjunction with .sr-only to only display content when it's focused.
+// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
+// Credit: HTML5 Boilerplate
+
+.sr-only-focusable {
+  &:active,
+  &:focus {
+    position: static;
+    width: auto;
+    height: auto;
+    margin: 0;
+    overflow: visible;
+    clip: auto;
+  }
+}
+
+
+// iOS "clickable elements" fix for role="button"
+//
+// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
+// for traditionally non-focusable elements with role="button"
+// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
+
+[role="button"] {
+  cursor: pointer;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/tables.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/tables.less b/jspwiki-war/src/main/styles/haddock/bootstrap/tables.less
index 281af51..2242c03 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/tables.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/tables.less
@@ -1,32 +1,17 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Tables
 // --------------------------------------------------
 
 
 table {
-  max-width: 100%;
   background-color: @table-bg;
 }
+caption {
+  padding-top: @table-cell-padding;
+  padding-bottom: @table-cell-padding;
+  color: @text-muted;
+  text-align: left;
+}
 th {
   text-align: left;
 }
@@ -36,6 +21,7 @@ th {
 
 .table {
   width: 100%;
+  max-width: 100%;
   margin-bottom: @line-height-computed;
   // Cells
   > thead,
@@ -125,11 +111,8 @@ th {
 // Default zebra-stripe styles (alternating gray and transparent backgrounds)
 
 .table-striped {
-  > tbody > tr:nth-child(odd) {
-    > td,
-    > th {
-      background-color: @table-bg-accent;
-    }
+  > tbody > tr:nth-of-type(odd) {
+    background-color: @table-bg-accent;
   }
 }
 
@@ -140,10 +123,7 @@ th {
 
 .table-hover {
   > tbody > tr:hover {
-    > td,
-    > th {
-      background-color: @table-bg-hover;
-    }
+    background-color: @table-bg-hover;
   }
 }
 
@@ -153,7 +133,7 @@ th {
 // Reset default table behavior
 
 table col[class*="col-"] {
-  position: static; // Prevent border hiding in Firefox and IE9/10 (see https://github.com/twbs/bootstrap/issues/11623)
+  position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
   float: none;
   display: table-column;
 }
@@ -161,6 +141,7 @@ table {
   td,
   th {
     &[class*="col-"] {
+      position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
       float: none;
       display: table-cell;
     }
@@ -176,8 +157,9 @@ table {
 // Generate the contextual variants
 .table-row-variant(active; @table-bg-active);
 .table-row-variant(success; @state-success-bg);
-.table-row-variant(danger; @state-danger-bg);
+.table-row-variant(info; @state-info-bg);
 .table-row-variant(warning; @state-warning-bg);
+.table-row-variant(danger; @state-danger-bg);
 
 
 // Responsive tables
@@ -186,15 +168,16 @@ table {
 // by enabling horizontal scrolling. Only applies <768px. Everything above that
 // will display normally.
 
-@media (max-width: @screen-xs-max) {
-  .table-responsive {
+.table-responsive {
+  overflow-x: auto;
+  min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)
+
+  @media screen and (max-width: @screen-xs-max) {
     width: 100%;
     margin-bottom: (@line-height-computed * 0.75);
     overflow-y: hidden;
-    overflow-x: scroll;
     -ms-overflow-style: -ms-autohiding-scrollbar;
     border: 1px solid @table-border-color;
-    -webkit-overflow-scrolling: touch;
 
     // Tighten up spacing
     > .table {

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/theme.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/theme.less b/jspwiki-war/src/main/styles/haddock/bootstrap/theme.less
index e412b6d..fb61744 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/theme.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/theme.less
@@ -1,23 +1,8 @@
-/*
- *
- * 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.
- *
-*/
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
 
 //
 // Load core variables and mixins
@@ -27,7 +12,6 @@
 @import "mixins.less";
 
 
-
 //
 // Buttons
 // --------------------------------------------------
@@ -48,12 +32,22 @@
   &.active {
     .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
   }
+
+  &.disabled,
+  &[disabled],
+  fieldset[disabled] & {
+    .box-shadow(none);
+  }
+
+  .badge {
+    text-shadow: none;
+  }
 }
 
 // Mixin for generating new styles
 .btn-styles(@btn-color: #555) {
   #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));
-  .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners
+  .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620
   background-repeat: repeat-x;
   border-color: darken(@btn-color, 14%);
 
@@ -68,6 +62,20 @@
     background-color: darken(@btn-color, 12%);
     border-color: darken(@btn-color, 14%);
   }
+
+  &.disabled,
+  &[disabled],
+  fieldset[disabled] & {
+    &,
+    &:hover,
+    &:focus,
+    &.focus,
+    &:active,
+    &.active {
+      background-color: darken(@btn-color, 12%);
+      background-image: none;
+    }
+  }
 }
 
 // Common styles
@@ -83,10 +91,9 @@
 .btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
 .btn-primary { .btn-styles(@btn-primary-bg); }
 .btn-success { .btn-styles(@btn-success-bg); }
+.btn-info    { .btn-styles(@btn-info-bg); }
 .btn-warning { .btn-styles(@btn-warning-bg); }
 .btn-danger  { .btn-styles(@btn-danger-bg); }
-.btn-info    { .btn-styles(@btn-info-bg); }
-
 
 
 //
@@ -99,7 +106,6 @@
 }
 
 
-
 //
 // Dropdowns
 // --------------------------------------------------
@@ -117,7 +123,6 @@
 }
 
 
-
 //
 // Navbar
 // --------------------------------------------------
@@ -130,8 +135,9 @@
   @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
   .box-shadow(@shadow);
 
+  .navbar-nav > .open > a,
   .navbar-nav > .active > a {
-    #gradient > .vertical(@start-color: darken(@navbar-default-bg, 5%); @end-color: darken(@navbar-default-bg, 2%));
+    #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));
     .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));
   }
 }
@@ -143,10 +149,11 @@
 // Inverted navbar
 .navbar-inverse {
   #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);
-  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
-
+  .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257
+  border-radius: @navbar-border-radius;
+  .navbar-nav > .open > a,
   .navbar-nav > .active > a {
-    #gradient > .vertical(@start-color: @navbar-inverse-bg; @end-color: lighten(@navbar-inverse-bg, 2.5%));
+    #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));
     .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));
   }
 
@@ -163,6 +170,17 @@
   border-radius: 0;
 }
 
+// Fix active state of dropdown items in collapsed mode
+@media (max-width: @grid-float-breakpoint-max) {
+  .navbar .navbar-nav .open .dropdown-menu > .active > a {
+    &,
+    &:hover,
+    &:focus {
+      color: #fff;
+      #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
+    }
+  }
+}
 
 
 //
@@ -189,7 +207,6 @@
 .alert-danger     { .alert-styles(@alert-danger-bg); }
 
 
-
 //
 // Progress bars
 // --------------------------------------------------
@@ -211,6 +228,11 @@
 .progress-bar-warning    { .progress-bar-styles(@progress-bar-warning-bg); }
 .progress-bar-danger     { .progress-bar-styles(@progress-bar-danger-bg); }
 
+// Reset the striped class because our mixins don't do multiple gradients and
+// the above custom styles override the new `.progress-bar-striped` in v3.2.0.
+.progress-bar-striped {
+  #gradient > .striped();
+}
 
 
 //
@@ -227,8 +249,11 @@
   text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);
   #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));
   border-color: darken(@list-group-active-border, 7.5%);
-}
 
+  .badge {
+    text-shadow: none;
+  }
+}
 
 
 //
@@ -254,7 +279,6 @@
 .panel-danger > .panel-heading    { .panel-heading-styles(@panel-danger-heading-bg); }
 
 
-
 //
 // Wells
 // --------------------------------------------------

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/thumbnails.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/thumbnails.less b/jspwiki-war/src/main/styles/haddock/bootstrap/thumbnails.less
new file mode 100755
index 0000000..0713e67
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/thumbnails.less
@@ -0,0 +1,36 @@
+//
+// Thumbnails
+// --------------------------------------------------
+
+
+// Mixin and adjust the regular image class
+.thumbnail {
+  display: block;
+  padding: @thumbnail-padding;
+  margin-bottom: @line-height-computed;
+  line-height: @line-height-base;
+  background-color: @thumbnail-bg;
+  border: 1px solid @thumbnail-border;
+  border-radius: @thumbnail-border-radius;
+  .transition(border .2s ease-in-out);
+
+  > img,
+  a > img {
+    &:extend(.img-responsive);
+    margin-left: auto;
+    margin-right: auto;
+  }
+
+  // Add a hover state for linked versions only
+  a&:hover,
+  a&:focus,
+  a&.active {
+    border-color: @link-color;
+  }
+
+  // Image captions
+  .caption {
+    padding: @thumbnail-caption-padding;
+    color: @thumbnail-caption-color;
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/tooltip.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/tooltip.less b/jspwiki-war/src/main/styles/haddock/bootstrap/tooltip.less
index 9e3b297..b48d63e 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/tooltip.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/tooltip.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Tooltips
 // --------------------------------------------------
@@ -28,12 +8,14 @@
   position: absolute;
   z-index: @zindex-tooltip;
   display: block;
-  visibility: visible;
+  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
+  // So reset our font and text properties to avoid inheriting weird values.
+  .reset-text();
   font-size: @font-size-small;
-  line-height: 1.4;
+
   .opacity(0);
 
-  &.in     { .opacity(.9); }
+  &.in     { .opacity(@tooltip-opacity); }
   &.top    { margin-top:  -3px; padding: @tooltip-arrow-width 0; }
   &.right  { margin-left:  3px; padding: 0 @tooltip-arrow-width; }
   &.bottom { margin-top:   3px; padding: @tooltip-arrow-width 0; }
@@ -46,7 +28,6 @@
   padding: 3px 8px;
   color: @tooltip-color;
   text-align: center;
-  text-decoration: none;
   background-color: @tooltip-bg;
   border-radius: @border-radius-base;
 }
@@ -59,6 +40,7 @@
   border-color: transparent;
   border-style: solid;
 }
+// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
 .tooltip {
   &.top .tooltip-arrow {
     bottom: 0;
@@ -69,13 +51,15 @@
   }
   &.top-left .tooltip-arrow {
     bottom: 0;
-    left: @tooltip-arrow-width;
+    right: @tooltip-arrow-width;
+    margin-bottom: -@tooltip-arrow-width;
     border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
     border-top-color: @tooltip-arrow-color;
   }
   &.top-right .tooltip-arrow {
     bottom: 0;
-    right: @tooltip-arrow-width;
+    left: @tooltip-arrow-width;
+    margin-bottom: -@tooltip-arrow-width;
     border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
     border-top-color: @tooltip-arrow-color;
   }
@@ -102,13 +86,15 @@
   }
   &.bottom-left .tooltip-arrow {
     top: 0;
-    left: @tooltip-arrow-width;
+    right: @tooltip-arrow-width;
+    margin-top: -@tooltip-arrow-width;
     border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
     border-bottom-color: @tooltip-arrow-color;
   }
   &.bottom-right .tooltip-arrow {
     top: 0;
-    right: @tooltip-arrow-width;
+    left: @tooltip-arrow-width;
+    margin-top: -@tooltip-arrow-width;
     border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
     border-bottom-color: @tooltip-arrow-color;
   }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/type.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/type.less b/jspwiki-war/src/main/styles/haddock/bootstrap/type.less
index 5b9a791..0d4fee4 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/type.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/type.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Typography
 // --------------------------------------------------
@@ -41,9 +21,9 @@ h1, h2, h3, h4, h5, h6,
   }
 }
 
-h1,
-h2,
-h3 {
+h1, .h1,
+h2, .h2,
+h3, .h3 {
   margin-top: @line-height-computed;
   margin-bottom: (@line-height-computed / 2);
 
@@ -52,9 +32,9 @@ h3 {
     font-size: 65%;
   }
 }
-h4,
-h5,
-h6 {
+h4, .h4,
+h5, .h5,
+h6, .h6 {
   margin-top: (@line-height-computed / 2);
   margin-bottom: (@line-height-computed / 2);
 
@@ -81,8 +61,8 @@ p {
 
 .lead {
   margin-bottom: @line-height-computed;
-  font-size: floor(@font-size-base * 1.15);
-  font-weight: 200;
+  font-size: floor((@font-size-base * 1.15));
+  font-weight: 300;
   line-height: 1.4;
 
   @media (min-width: @screen-sm-min) {
@@ -94,52 +74,71 @@ p {
 // Emphasis & misc
 // -------------------------
 
-// Ex: 14px base font * 85% = about 12px
+// Ex: (12px small font / 14px base font) * 100% = about 85%
 small,
-.small  { font-size: 85%; }
+.small {
+  font-size: floor((100% * @font-size-small / @font-size-base));
+}
+
+mark,
+.mark {
+  background-color: @state-warning-bg;
+  padding: .2em;
+}
+
+// Alignment
+.text-left           { text-align: left; }
+.text-right          { text-align: right; }
+.text-center         { text-align: center; }
+.text-justify        { text-align: justify; }
+.text-nowrap         { white-space: nowrap; }
 
-// Undo browser default styling
-cite    { font-style: normal; }
+// Transformation
+.text-lowercase      { text-transform: lowercase; }
+.text-uppercase      { text-transform: uppercase; }
+.text-capitalize     { text-transform: capitalize; }
 
-// Contextual emphasis
+// Contextual colors
 .text-muted {
   color: @text-muted;
 }
 .text-primary {
-  color: @brand-primary;
-  &:hover {
-    color: darken(@brand-primary, 10%);
-  }
+  .text-emphasis-variant(@brand-primary);
+}
+.text-success {
+  .text-emphasis-variant(@state-success-text);
+}
+.text-info {
+  .text-emphasis-variant(@state-info-text);
 }
 .text-warning {
-  color: @state-warning-text;
-  &:hover {
-    color: darken(@state-warning-text, 10%);
-  }
+  .text-emphasis-variant(@state-warning-text);
 }
 .text-danger {
-  color: @state-danger-text;
-  &:hover {
-    color: darken(@state-danger-text, 10%);
-  }
+  .text-emphasis-variant(@state-danger-text);
 }
-.text-success {
-  color: @state-success-text;
-  &:hover {
-    color: darken(@state-success-text, 10%);
-  }
+
+// Contextual backgrounds
+// For now we'll leave these alongside the text classes until v4 when we can
+// safely shift things around (per SemVer rules).
+.bg-primary {
+  // Given the contrast here, this is the only class to have its color inverted
+  // automatically.
+  color: #fff;
+  .bg-variant(@brand-primary);
 }
-.text-info {
-  color: @state-info-text;
-  &:hover {
-    color: darken(@state-info-text, 10%);
-  }
+.bg-success {
+  .bg-variant(@state-success-bg);
+}
+.bg-info {
+  .bg-variant(@state-info-bg);
+}
+.bg-warning {
+  .bg-variant(@state-warning-bg);
+}
+.bg-danger {
+  .bg-variant(@state-danger-bg);
 }
-
-// Alignment
-.text-left           { text-align: left; }
-.text-right          { text-align: right; }
-.text-center         { text-align: center; }
 
 
 // Page header
@@ -153,7 +152,7 @@ cite    { font-style: normal; }
 
 
 // Lists
-// --------------------------------------------------
+// -------------------------
 
 // Unordered and Ordered lists
 ul,
@@ -177,15 +176,12 @@ ol {
 // Inline turns list items into inline-block
 .list-inline {
   .list-unstyled();
+  margin-left: -5px;
 
   > li {
     display: inline-block;
     padding-left: 5px;
     padding-right: 5px;
-
-    &:first-child {
-      padding-left: 0;
-    }
   }
 }
 
@@ -210,24 +206,28 @@ dd {
 // Defaults to being stacked without any of the below styles applied, until the
 // grid breakpoint is reached (default of ~768px).
 
-@media (min-width: @grid-float-breakpoint) {
-  .dl-horizontal {
+.dl-horizontal {
+  dd {
+    &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present
+  }
+
+  @media (min-width: @dl-horizontal-breakpoint) {
     dt {
       float: left;
-      width: (@component-offset-horizontal - 20);
+      width: (@dl-horizontal-offset - 20);
       clear: left;
       text-align: right;
       .text-overflow();
     }
     dd {
-      margin-left: @component-offset-horizontal;
-      .clearfix(); // Clear the floated `dt` if an empty `dd` is present
+      margin-left: @dl-horizontal-offset;
     }
   }
 }
 
-// MISC
-// ----
+
+// Misc
+// -------------------------
 
 // Abbreviations and acronyms
 abbr[title],
@@ -238,61 +238,62 @@ abbr[data-original-title] {
 }
 .initialism {
   font-size: 90%;
-  text-transform: uppercase;
+  .text-uppercase();
 }
 
 // Blockquotes
 blockquote {
   padding: (@line-height-computed / 2) @line-height-computed;
   margin: 0 0 @line-height-computed;
+  font-size: @blockquote-font-size;
   border-left: 5px solid @blockquote-border-color;
-  p {
-    font-size: (@font-size-base * 1.25);
-    font-weight: 300;
-    line-height: 1.25;
-  }
-  p:last-child {
-    margin-bottom: 0;
+
+  p,
+  ul,
+  ol {
+    &:last-child {
+      margin-bottom: 0;
+    }
   }
+
+  // Note: Deprecated small and .small as of v3.1.0
+  // Context: https://github.com/twbs/bootstrap/issues/11660
+  footer,
   small,
   .small {
     display: block;
+    font-size: 80%; // back to default font-size
     line-height: @line-height-base;
     color: @blockquote-small-color;
+
     &:before {
-      content: '\2014 \00A0'; // EM DASH, NBSP
+      content: '\2014 \00A0'; // em dash, nbsp
     }
   }
+}
 
-  // Float right with text-align: right
-  &.pull-right {
-    padding-right: 15px;
-    padding-left: 0;
-    border-right: 5px solid @blockquote-border-color;
-    border-left: 0;
-    p,
-    small,
-    .small {
-      text-align: right;
-    }
-    small,
-    .small {
-      &:before {
-        content: '';
-      }
-      &:after {
-        content: '\00A0 \2014'; // NBSP, EM DASH
-      }
+// Opposite alignment of blockquote
+//
+// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.
+.blockquote-reverse,
+blockquote.pull-right {
+  padding-right: 15px;
+  padding-left: 0;
+  border-right: 5px solid @blockquote-border-color;
+  border-left: 0;
+  text-align: right;
+
+  // Account for citation
+  footer,
+  small,
+  .small {
+    &:before { content: ''; }
+    &:after {
+      content: '\00A0 \2014'; // nbsp, em dash
     }
   }
 }
 
-// Quotes
-blockquote:before,
-blockquote:after {
-  content: "";
-}
-
 // Addresses
 address {
   margin-bottom: @line-height-computed;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/utilities.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/utilities.less b/jspwiki-war/src/main/styles/haddock/bootstrap/utilities.less
index ceee254..7a8ca27 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/utilities.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/utilities.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Utility classes
 // --------------------------------------------------
@@ -64,7 +44,6 @@
 
 .hidden {
   display: none !important;
-  visibility: hidden !important;
 }
 
 


[7/7] jspwiki git commit: Various HADDOCK updates & fixes

Posted by br...@apache.org.
Various HADDOCK updates & fixes

See Changelog for details


Project: http://git-wip-us.apache.org/repos/asf/jspwiki/repo
Commit: http://git-wip-us.apache.org/repos/asf/jspwiki/commit/19b54311
Tree: http://git-wip-us.apache.org/repos/asf/jspwiki/tree/19b54311
Diff: http://git-wip-us.apache.org/repos/asf/jspwiki/diff/19b54311

Branch: refs/heads/master
Commit: 19b543113f0f70efcc7e58736d1fd8d529bc3f60
Parents: 014dc67
Author: brushed <di...@gmail.com>
Authored: Sat Dec 17 22:21:21 2016 +0100
Committer: brushed <di...@gmail.com>
Committed: Sat Dec 17 22:21:21 2016 +0100

----------------------------------------------------------------------
 ChangeLog                                       |  42 +
 jspwiki-war/src/main/config/wro/wro.properties  |   4 +-
 .../src/main/java/org/apache/wiki/Release.java  |   2 +-
 .../apache/wiki/plugin/WeblogArchivePlugin.java |  28 +-
 .../org/apache/wiki/plugin/WeblogPlugin.java    |  20 +-
 .../apache/wiki/xmlrpc/MetaWeblogHandler.java   |  34 +-
 .../resources/plugin/PluginResources.properties |   1 +
 .../main/resources/templates/default.properties |  17 +-
 .../src/main/scripts/behaviors/Accordion.js     |   4 +-
 .../src/main/scripts/behaviors/AddCSS.js        |  11 +-
 .../src/main/scripts/behaviors/Columns.js       |   2 +-
 jspwiki-war/src/main/scripts/behaviors/Flip.js  |   2 +-
 .../src/main/scripts/behaviors/GraphBar.js      |   3 +-
 .../src/main/scripts/behaviors/TableX.js        |   5 +-
 .../src/main/scripts/behaviors/Viewer.js        |   4 +-
 .../src/main/scripts/dialog/Dialog.Selection.js |  41 +-
 jspwiki-war/src/main/scripts/dialog/Dialog.js   |  35 +-
 .../scripts/moo-extend/Array.NaturalSort.js     |   2 +-
 .../src/main/scripts/moo-extend/Behavior.js     |  25 +-
 .../src/main/scripts/moo-extend/Color.js        |  21 +-
 .../main/scripts/moo-extend/Element.Extend.js   |   2 +-
 .../main/scripts/moo-extend/String.Extend.js    |  15 +-
 .../src/main/scripts/moo-extend/Textarea.js     |   9 +
 .../main/scripts/wiki-edit/Snipe.Commands.js    |  16 +-
 .../main/scripts/wiki-edit/Snipe.Sections.js    | 150 ++-
 .../src/main/scripts/wiki-edit/Snipe.Snips.js   |  42 +-
 jspwiki-war/src/main/scripts/wiki-edit/Snipe.js | 317 +++---
 .../src/main/scripts/wiki-edit/Undoable.js      |   7 +-
 .../src/main/scripts/wiki-edit/Wiki.Edit.js     | 278 +++---
 .../src/main/scripts/wiki-edit/Wiki.Snips.js    | 962 +++++++++----------
 jspwiki-war/src/main/scripts/wiki/Category.js   |   4 +-
 jspwiki-war/src/main/scripts/wiki/Recents.js    |   2 +-
 .../src/main/scripts/wiki/Wiki.Behaviors.js     |  67 +-
 jspwiki-war/src/main/scripts/wiki/Wiki.js       | 130 ++-
 .../main/styles/haddock/bootstrap/.csscomb.json | 304 ++++++
 .../main/styles/haddock/bootstrap/.csslintrc    |  19 +
 .../main/styles/haddock/bootstrap/alerts.less   |  32 +-
 .../main/styles/haddock/bootstrap/badges.less   |  73 +-
 .../styles/haddock/bootstrap/bootstrap.less     |  31 +-
 .../styles/haddock/bootstrap/breadcrumbs.less   |  25 +-
 .../styles/haddock/bootstrap/button-groups.less |  91 +-
 .../main/styles/haddock/bootstrap/buttons.less  |  73 +-
 .../main/styles/haddock/bootstrap/carousel.less |  82 +-
 .../main/styles/haddock/bootstrap/close.less    |  21 +-
 .../src/main/styles/haddock/bootstrap/code.less |  38 +-
 .../haddock/bootstrap/component-animations.less |  34 +-
 .../styles/haddock/bootstrap/dropdowns.less     |  69 +-
 .../main/styles/haddock/bootstrap/forms.less    | 406 ++++++--
 .../styles/haddock/bootstrap/glyphicons.less    | 112 ++-
 .../src/main/styles/haddock/bootstrap/grid.less |  75 +-
 .../styles/haddock/bootstrap/input-groups.less  | 101 +-
 .../styles/haddock/bootstrap/jumbotron.less     |  46 +-
 .../main/styles/haddock/bootstrap/labels.less   |  22 +-
 .../styles/haddock/bootstrap/list-group.less    |  90 +-
 .../main/styles/haddock/bootstrap/media.less    |  66 ++
 .../main/styles/haddock/bootstrap/mixins.less   | 897 +----------------
 .../styles/haddock/bootstrap/mixins/alerts.less |  14 +
 .../bootstrap/mixins/background-variant.less    |   9 +
 .../haddock/bootstrap/mixins/border-radius.less |  18 +
 .../haddock/bootstrap/mixins/buttons.less       |  65 ++
 .../haddock/bootstrap/mixins/center-block.less  |   7 +
 .../haddock/bootstrap/mixins/clearfix.less      |  22 +
 .../styles/haddock/bootstrap/mixins/forms.less  |  85 ++
 .../haddock/bootstrap/mixins/gradients.less     |  59 ++
 .../bootstrap/mixins/grid-framework.less        |  91 ++
 .../styles/haddock/bootstrap/mixins/grid.less   | 122 +++
 .../haddock/bootstrap/mixins/hide-text.less     |  21 +
 .../styles/haddock/bootstrap/mixins/image.less  |  33 +
 .../styles/haddock/bootstrap/mixins/labels.less |  12 +
 .../haddock/bootstrap/mixins/list-group.less    |  30 +
 .../haddock/bootstrap/mixins/nav-divider.less   |  10 +
 .../bootstrap/mixins/nav-vertical-align.less    |   9 +
 .../haddock/bootstrap/mixins/opacity.less       |   8 +
 .../haddock/bootstrap/mixins/pagination.less    |  24 +
 .../styles/haddock/bootstrap/mixins/panels.less |  24 +
 .../haddock/bootstrap/mixins/progress-bar.less  |  10 +
 .../haddock/bootstrap/mixins/reset-filter.less  |   8 +
 .../haddock/bootstrap/mixins/reset-text.less    |  18 +
 .../styles/haddock/bootstrap/mixins/resize.less |   6 +
 .../bootstrap/mixins/responsive-visibility.less |  15 +
 .../styles/haddock/bootstrap/mixins/size.less   |  10 +
 .../haddock/bootstrap/mixins/tab-focus.less     |   9 +
 .../haddock/bootstrap/mixins/table-row.less     |  28 +
 .../haddock/bootstrap/mixins/text-emphasis.less |   9 +
 .../haddock/bootstrap/mixins/text-overflow.less |   8 +
 .../bootstrap/mixins/vendor-prefixes.less       | 227 +++++
 .../main/styles/haddock/bootstrap/modals.less   |  71 +-
 .../main/styles/haddock/bootstrap/navbar.less   | 154 +--
 .../src/main/styles/haddock/bootstrap/navs.less |  28 +-
 .../styles/haddock/bootstrap/normalize.less     | 318 +++---
 .../main/styles/haddock/bootstrap/pager.less    |  33 +-
 .../styles/haddock/bootstrap/pagination.less    |  38 +-
 .../main/styles/haddock/bootstrap/panels.less   | 217 +++--
 .../main/styles/haddock/bootstrap/popovers.less |  56 +-
 .../main/styles/haddock/bootstrap/print.less    | 216 ++---
 .../styles/haddock/bootstrap/progress-bars.less |  37 +-
 .../haddock/bootstrap/responsive-embed.less     |  35 +
 .../haddock/bootstrap/responsive-utilities.less | 253 +++--
 .../styles/haddock/bootstrap/scaffolding.less   |  72 +-
 .../main/styles/haddock/bootstrap/tables.less   |  55 +-
 .../main/styles/haddock/bootstrap/theme.less    |  90 +-
 .../styles/haddock/bootstrap/thumbnails.less    |  36 +
 .../main/styles/haddock/bootstrap/tooltip.less  |  42 +-
 .../src/main/styles/haddock/bootstrap/type.less | 213 ++--
 .../styles/haddock/bootstrap/utilities.less     |  21 -
 .../styles/haddock/bootstrap/variables.less     | 650 ++++++++-----
 .../main/styles/haddock/bootstrap/wells.less    |  29 +
 .../src/main/styles/haddock/default/.crunch     | 123 +++
 .../main/styles/haddock/default/Calendar.less   |  48 -
 .../src/main/styles/haddock/default/Dialog.less |  19 +-
 .../main/styles/haddock/default/Invisibles.less |   2 +-
 .../haddock/default/RecentChangesPlugin.less    |  10 +-
 .../main/styles/haddock/default/TOCPlugin.less  |  20 +-
 .../haddock/default/Template.Content.less       |   4 +-
 .../styles/haddock/default/Template.Edit.less   | 147 ++-
 .../src/main/styles/haddock/default/Tips.less   |   7 +-
 .../styles/haddock/default/WeblogPlugin.less    |  63 +-
 .../src/main/styles/haddock/default/build.less  |  13 +-
 .../src/main/styles/haddock/default/grid.less   |   2 +-
 .../main/styles/haddock/default/prettify.less   |  14 +-
 .../src/main/styles/haddock/default/type.less   | 145 ++-
 .../main/styles/haddock/default/variables.less  |   8 +-
 .../main/styles/haddock/fontjspwiki/core.less   |  13 +-
 .../main/styles/haddock/fontjspwiki/path.less   |  13 +-
 jspwiki-war/src/main/webapp/Comment.jsp         |   3 +-
 jspwiki-war/src/main/webapp/DeleteGroup.jsp     |  11 +-
 jspwiki-war/src/main/webapp/Install.jsp         |  62 +-
 .../src/main/webapp/XHRMarkup2Wysiwyg.jsp       |  84 ++
 .../webapp/templates/haddock/AttachmentTab.jsp  |   2 +-
 .../webapp/templates/haddock/CommentContent.jsp |  18 +-
 .../main/webapp/templates/haddock/DiffTab.jsp   |   2 +-
 .../webapp/templates/haddock/EditTemplate.jsp   |   2 +-
 .../main/webapp/templates/haddock/Header.jsp    |   2 +-
 .../webapp/templates/haddock/InfoContent.jsp    |   2 +-
 .../src/main/webapp/templates/haddock/Nav.jsp   |  15 +-
 .../main/webapp/templates/haddock/PageTab.jsp   |   2 -
 .../webapp/templates/haddock/PreferencesTab.jsp |  21 +-
 .../webapp/templates/haddock/ProfileTab.jsp     |  10 +-
 .../main/webapp/templates/haddock/Sidebar.jsp   |   8 +-
 .../webapp/templates/haddock/ViewTemplate.jsp   |   3 +-
 .../webapp/templates/haddock/commonheader.jsp   |  11 +-
 .../templates/haddock/editors/CKeditor.jsp      |  65 +-
 .../templates/haddock/editors/TinyMCE.jsp       |  64 +-
 .../webapp/templates/haddock/editors/plain.jsp  | 183 ++--
 .../templates/haddock/editors/wysiwyg.jsp       |  74 +-
 145 files changed, 5846 insertions(+), 4135 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/ChangeLog
----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 6b998e8..04ba4cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,47 @@
 2016-12-13  Dirk Frederickx (brushed AT apache DOT org)
 
+       * 2.10.3-svn-20  Various HADDOCK updates & fixes.
+
+       * JSPWiki BLOGS
+         Final update of the styling of JSPWiki's BLOGs.
+         Also the fancy weblog calendar is now back in the sidebar
+         when viewing a blog post.
+
+       * Add-Comment JSP refactored:
+         When adding a comment to a wiki-page, you will see the content of the main page
+         at the top of the editing screen,  so you know what your are commenting on.
+         Improved hover menu on the SAVE/POST button for entering the change-note and
+         comment-signature fields.
+
+       * Plain Editor:
+         Many JS improvements related to the handling of text snippets.
+         Several style updates to the editor and the auto-suggest dialogs.
+
+       * Small refactoring of the Install.jsp to fit the bootstrap framework.
+
+       * %%columns-<width>: fix the broken width parameter
+
+       * %%graphbars: fix support for HTML-color-names (chrome, FF)
+
+       * [JSPWIKI-979]: fix support for %%small {{{ preformatted text blocks }}}
+
+       * [JSPWIKI-937]: fix handling of broken image links (also for FF)
+         Fix for rendering of the attachement icon, e.g. in RecentChanges page.
+
+       * Improved visualisation of interwiki links for Edit, Raw, Reader and Groups.
+
+       * The Delete group command now gets you back to the Group view pages,  so it is
+         easier for issuing subsequent group commands. (create,edit,delete)
+
+       * Added %%maps to generate google maps viewer by simply including the address.
+
+       * Few html5 FORM improvements: required fields, email input type, ...
+
+       * Updated to bootstrap 3.3.7.
+
+
+2016-12-13  Dirk Frederickx (brushed AT apache DOT org)
+
        * 2.10.3-svn-19
 
        * JSPWIKI-1032 : Use image "src" attribute instead of "href"

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/config/wro/wro.properties
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/config/wro/wro.properties b/jspwiki-war/src/main/config/wro/wro.properties
index 1818c10..7c810dc 100644
--- a/jspwiki-war/src/main/config/wro/wro.properties
+++ b/jspwiki-war/src/main/config/wro/wro.properties
@@ -21,5 +21,5 @@ debug=true
 
 #preProcessors=cssUrlRewriting,cssImport,semicolonAppender
 preProcessors=cssImport,semicolonAppender
-postProcessors=lessCss,yuiCssMin,uglifyJs
-#postProcessors=less4j.less,cssCompressor,uglifyJs
+#postProcessors=lessCss,yuiCssMin,uglifyJs
+postProcessors=less4j,yuiCssMin,uglifyJs

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/java/org/apache/wiki/Release.java
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/java/org/apache/wiki/Release.java b/jspwiki-war/src/main/java/org/apache/wiki/Release.java
index 5b3584d..b37ef14 100644
--- a/jspwiki-war/src/main/java/org/apache/wiki/Release.java
+++ b/jspwiki-war/src/main/java/org/apache/wiki/Release.java
@@ -72,7 +72,7 @@ public final class Release {
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "19";
+    public static final String     BUILD         = "20";
 
     /**
      *  This is the generic version string you should use when printing out the version.  It is of

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogArchivePlugin.java
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogArchivePlugin.java b/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogArchivePlugin.java
index 1edd903..ef303ed 100644
--- a/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogArchivePlugin.java
+++ b/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogArchivePlugin.java
@@ -1,4 +1,4 @@
-/* 
+/*
     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
@@ -14,7 +14,7 @@
     "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.  
+    under the License.
  */
 package org.apache.wiki.plugin;
 
@@ -45,7 +45,7 @@ import org.apache.wiki.util.TextUtil;
  *  <ul>
  *  <li><b>page</b> - the page name</li>
  *  </ul>
- *  
+ *
  *  @since 1.9.21
  */
 public class WeblogArchivePlugin implements WikiPlugin
@@ -71,7 +71,7 @@ public class WeblogArchivePlugin implements WikiPlugin
         String weblogName = params.get( PARAM_PAGE );
 
         if( weblogName == null ) weblogName = context.getPage().getName();
-        
+
 
         m_monthUrlFormat = new SimpleDateFormat("'"+
                                                 context.getURL( WikiContext.VIEW, weblogName,
@@ -80,7 +80,7 @@ public class WeblogArchivePlugin implements WikiPlugin
         StringBuilder sb = new StringBuilder();
 
         sb.append( "<div class=\"weblogarchive\">\n" );
-        
+
 
         //
         //  Collect months that have blog entries
@@ -123,7 +123,6 @@ public class WeblogArchivePlugin implements WikiPlugin
             }
 
             sb.append( "</ul>\n" );
-            sb.append( "</div>\n" );
         }
         catch( ProviderException ex )
         {
@@ -131,6 +130,8 @@ public class WeblogArchivePlugin implements WikiPlugin
             sb.append("Cannot get archive: "+ex.getMessage());
         }
 
+        sb.append( "</div>\n" );
+
         return sb.toString();
     }
 
@@ -143,9 +144,9 @@ public class WeblogArchivePlugin implements WikiPlugin
 
         WeblogPlugin pl = new WeblogPlugin();
 
-        List blogEntries = pl.findBlogEntries( engine.getPageManager(),
+        List blogEntries = pl.findBlogEntries( engine,
                                                page, new Date(0L), new Date() );
-        
+
         for( Iterator i = blogEntries.iterator(); i.hasNext(); )
         {
             WikiPage p = (WikiPage) i.next();
@@ -188,7 +189,7 @@ public class WeblogArchivePlugin implements WikiPlugin
 
     }
 
-    
+
     /**
      * This is a simple comparator for ordering weblog archive entries.
      * Two dates in the same month are considered equal.
@@ -197,14 +198,14 @@ public class WeblogArchivePlugin implements WikiPlugin
         implements Comparator
     {
 
-        public int compare( Object a, Object b ) 
+        public int compare( Object a, Object b )
         {
-            if( a == null || b == null || 
+            if( a == null || b == null ||
                 !(a instanceof Calendar) || !(b instanceof Calendar) )
             {
                 throw new ClassCastException( "Invalid calendar supplied for comparison." );
             }
-                    
+
             Calendar ca = (Calendar) a;
             Calendar cb = (Calendar) b;
             if( ca.get( Calendar.YEAR ) == cb.get( Calendar.YEAR ) &&
@@ -213,7 +214,8 @@ public class WeblogArchivePlugin implements WikiPlugin
                 return 0;
             }
 
-            return cb.getTime().before( ca.getTime() ) ? 1 : -1;
+            //sort recent dates first
+            return cb.getTime().before( ca.getTime() ) ? -1 : 1;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java b/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java
index d134900..48685ff 100644
--- a/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java
+++ b/jspwiki-war/src/main/java/org/apache/wiki/plugin/WeblogPlugin.java
@@ -30,6 +30,7 @@ import java.util.Comparator;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Set;
 import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.regex.Matcher;
@@ -268,7 +269,7 @@ public class WeblogPlugin
 
         try
         {
-            List<WikiPage> blogEntries = findBlogEntries( engine.getPageManager(),
+            List<WikiPage> blogEntries = findBlogEntries( engine,
                                                           weblogName,
                                                           startTime.getTime(),
                                                           stopTime.getTime() );
@@ -375,7 +376,7 @@ public class WeblogPlugin
             author = "AnonymousCoward";
         }
 
-        buffer.append("By "+author+"&nbsp;&nbsp;");
+        buffer.append( MessageFormat.format( rb.getString("weblogentryplugin.postedby"), author));
         buffer.append( "<a href=\""+entryCtx.getURL(WikiContext.VIEW, entry.getName())+"\">"+rb.getString("weblogentryplugin.permalink")+"</a>" );
         String commentPageName = TextUtil.replaceString( entry.getName(),
                                                          "blogentry",
@@ -428,35 +429,34 @@ public class WeblogPlugin
      *  Attempts to locate all pages that correspond to the
      *  blog entry pattern.  Will only consider the days on the dates; not the hours and minutes.
      *
-     *  @param mgr A PageManager which is used to get the pages
+     *  @param engine WikiEngine which is used to get the pages
      *  @param baseName The basename (e.g. "Main" if you want "Main_blogentry_xxxx")
      *  @param start The date which is the first to be considered
      *  @param end   The end date which is the last to be considered
      *  @return a list of pages with their FIRST revisions.
      *  @throws ProviderException If something goes wrong
      */
-    public List findBlogEntries( PageManager mgr,
+    public List findBlogEntries( WikiEngine engine,
                                  String baseName, Date start, Date end )
         throws ProviderException
     {
-        Collection everyone = mgr.getAllPages();
+        PageManager mgr = engine.getPageManager();
+        Set allPages = engine.getReferenceManager().findCreated();
+
         ArrayList<WikiPage> result = new ArrayList<WikiPage>();
 
         baseName = makeEntryPage( baseName );
         SimpleDateFormat fmt = new SimpleDateFormat(DEFAULT_DATEFORMAT);
 
-        for( Iterator i = everyone.iterator(); i.hasNext(); )
+        for( Iterator i = allPages.iterator(); i.hasNext(); )
         {
-            WikiPage p = (WikiPage)i.next();
-
-            String pageName = p.getName();
+            String pageName = (String)i.next();
 
             if( pageName.startsWith( baseName ) )
             {
                 try
                 {
                     WikiPage firstVersion = mgr.getPageInfo( pageName, 1 );
-
                     Date d = firstVersion.getLastModified();
 
                     if( d.after(start) && d.before(end) )

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java b/jspwiki-war/src/main/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java
index ff2c045..42acb4e 100644
--- a/jspwiki-war/src/main/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java
+++ b/jspwiki-war/src/main/java/org/apache/wiki/xmlrpc/MetaWeblogHandler.java
@@ -1,4 +1,4 @@
-/* 
+/*
     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
@@ -14,7 +14,7 @@
     "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.  
+    under the License.
  */
 package org.apache.wiki.xmlrpc;
 
@@ -56,10 +56,10 @@ import org.apache.xmlrpc.XmlRpcException;
 public class MetaWeblogHandler
     implements WikiRPCHandler
 {
-    private static Logger log = Logger.getLogger( MetaWeblogHandler.class ); 
+    private static Logger log = Logger.getLogger( MetaWeblogHandler.class );
 
     private WikiContext m_context;
-    
+
     /**
      *  {@inheritDoc}
      */
@@ -87,13 +87,13 @@ public class MetaWeblogHandler
         {
             AuthenticationManager amm = m_context.getEngine().getAuthenticationManager();
             AuthorizationManager mgr = m_context.getEngine().getAuthorizationManager();
-        
+
             if( amm.login( m_context.getWikiSession(), m_context.getHttpRequest(), username, password ) )
             {
                 if( !mgr.checkPermission( m_context.getWikiSession(), PermissionFactory.getPagePermission( page, permission ) ))
                 {
                     throw new XmlRpcException( 1, "No permission" );
-                }   
+                }
             }
             else
             {
@@ -110,7 +110,7 @@ public class MetaWeblogHandler
     /**
      *  JSPWiki does not support categories, therefore JSPWiki
      *  always returns an empty list for categories.
-     *  
+     *
      *  @param blogid The id of the blog.
      *  @param username The username to use
      *  @param password The password
@@ -165,7 +165,7 @@ public class MetaWeblogHandler
         {
             title = pageText.substring( 0, firstLine );
         }
-            
+
         if( title.trim().length() == 0 ) title = page.getName();
 
         // Remove wiki formatting
@@ -179,7 +179,7 @@ public class MetaWeblogHandler
 
     /**
      *  Returns a list of the recent posts to this weblog.
-     *  
+     *
      *  @param blogid The id of the blog.
      *  @param username The username to use
      *  @param password The password
@@ -210,7 +210,7 @@ public class MetaWeblogHandler
         {
             WeblogPlugin plugin = new WeblogPlugin();
 
-            List<WikiPage> changed = plugin.findBlogEntries(m_context.getEngine().getPageManager(), 
+            List<WikiPage> changed = plugin.findBlogEntries(m_context.getEngine(),
                                                             blogid,
                                                             new Date(0L),
                                                             new Date());
@@ -238,13 +238,13 @@ public class MetaWeblogHandler
 
     /**
      *  Adds a new post to the blog.
-     *  
+     *
      *  @param blogid The id of the blog.
      *  @param username The username to use
      *  @param password The password
      *  @param content As per Metaweblogapi contract
      *  @param publish This parameter is ignored for JSPWiki.
-     *  @return Returns an empty string 
+     *  @return Returns an empty string
      *  @throws XmlRpcException If something goes wrong
      */
     public String newPost( String blogid,
@@ -256,7 +256,7 @@ public class MetaWeblogHandler
     {
         log.info("metaWeblog.newPost() called");
         WikiEngine engine = m_context.getEngine();
-        
+
         WikiPage page = engine.getPage( blogid );
         checkPermissions( page, username, password, "createPages" );
 
@@ -293,16 +293,16 @@ public class MetaWeblogHandler
      *  Creates an attachment and adds it to the blog.  The attachment
      *  is created into the main blog page, not the actual post page,
      *  because we do not know it at this point.
-     *  
+     *
      *  @param blogid The id of the blog.
      *  @param username The username to use
      *  @param password The password
      *  @param content As per the MetaweblogAPI contract
-     *  @return As per the MetaweblogAPI contract 
+     *  @return As per the MetaweblogAPI contract
      *  @throws XmlRpcException If something goes wrong
-     *  
+     *
      */
-    public Hashtable newMediaObject( String blogid, 
+    public Hashtable newMediaObject( String blogid,
                                      String username,
                                      String password,
                                      Hashtable content )

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/resources/plugin/PluginResources.properties
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/resources/plugin/PluginResources.properties b/jspwiki-war/src/main/resources/plugin/PluginResources.properties
index ad61c39..4902ef5 100644
--- a/jspwiki-war/src/main/resources/plugin/PluginResources.properties
+++ b/jspwiki-war/src/main/resources/plugin/PluginResources.properties
@@ -46,6 +46,7 @@ currenttimeplugin.badformat = You specified a bad format
 # WeblogEntryPlugin
 
 weblogentryplugin.newentry = <span class="icon-plus"></span> New entry
+weblogentryplugin.postedby = Posted by {0}&nbsp;&nbsp;
 weblogentryplugin.permalink = Permalink
 weblogentryplugin.addcomment = <span class="icon-plus"></span> Add new comment ({0})
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/resources/templates/default.properties
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/resources/templates/default.properties b/jspwiki-war/src/main/resources/templates/default.properties
index 2ce3437..3583e28 100644
--- a/jspwiki-war/src/main/resources/templates/default.properties
+++ b/jspwiki-war/src/main/resources/templates/default.properties
@@ -516,10 +516,11 @@ view.title.view={0}: {1}
 
 # The built-in editors also have their localized strings in this file.
 
-editor.plain.name=Your <span class='accesskey'>n</span>ame
+editor.plain.name=Name
 editor.plain.remember=Remember me?
-editor.plain.email=Homepage or email
+editor.plain.email=Link to homepage or email
 editor.plain.save.submit=Save
+editor.plain.save.submit.comment=Post Comment
 editor.plain.save.title=Save [ s ]
 editor.plain.preview.submit=Preview
 editor.plain.preview.title=Preview [ v ]
@@ -558,6 +559,7 @@ editor.plain.sneakpreview.title=Sneak Preview. \
     Click outside the textarea to refresh the sneak preview area.
 editor.plain.sidebysidepreview=Side by Side Preview
 editor.plain.edit.resize=Drag to resize the text and preview area
+editor.plain.comment.resize=Drag to resize the main page area
 
 editor.plain.tbLink.title=link - Insert wiki link
 editor.plain.tbH1.title=h1 - Insert heading1
@@ -604,6 +606,7 @@ blog.permalink=Permalink
 #
 #  The Javascript stuff
 #
+javascript.broken.image=Content unavailable! (broken link)
 javascript.sbox.clearrecent=Clear Recent Searches
 javascript.sbox.clone =Clone this page
 javascript.sbox.create =Create {0}
@@ -616,6 +619,16 @@ javascript.edit.toolbar.makeSelection=Please make first a selection.
 javascript.edit.resize=Drag to resize the text area
 javascript.edit.areyousure=Without clicking the Save button, your changes will be lost. \
     Are you sure you want to exit this page?
+javascript.preview.zone = Preview Zone
+
+javascript.dialog.character.entities = Character entities
+javascript.dialog.link.attributes = Wiki Link Attributes
+javascript.dialog.plugin = Plugin
+javascript.dialog.permission = Page Permission
+javascript.dialog.principal = Roles, Groups or Users
+javascript.dialog.styles = Additional Styles
+javascript.dialog.toc.options = TOC options
+
 
 javascript.favs.show=Click to show Favorites
 javascript.favs.hide=Click to hide Favorites

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/behaviors/Accordion.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/behaviors/Accordion.js b/jspwiki-war/src/main/scripts/behaviors/Accordion.js
index 8b24b9d..3f3fa74 100644
--- a/jspwiki-war/src/main/scripts/behaviors/Accordion.js
+++ b/jspwiki-war/src/main/scripts/behaviors/Accordion.js
@@ -131,8 +131,8 @@ var Accordion = new Class({
 
             }
 
-            toggles.push( toggle );
-            contents.push( "div".slick().wraps( pane.addClass("panel-body") ) );
+            toggles[toggles.length] = toggle;
+            contents[contents.length] = "div".slick().wraps( pane.addClass("panel-body") );
 
         }
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/behaviors/AddCSS.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/behaviors/AddCSS.js b/jspwiki-war/src/main/scripts/behaviors/AddCSS.js
index 2a8c8b5..3e3eb28 100644
--- a/jspwiki-war/src/main/scripts/behaviors/AddCSS.js
+++ b/jspwiki-war/src/main/scripts/behaviors/AddCSS.js
@@ -35,7 +35,8 @@ function AddCSS( element ){
 
     function insertStyle ( elements ){
 
-        var css = "", item;
+        var css = "",
+            item;
 
         //collect all css to be inserted
         while( item = elements.shift() ){ css += item.innerHTML; }
@@ -45,6 +46,11 @@ function AddCSS( element ){
 
         //magic to replace the inline wiki-image links to css url()
         //xss protection: remove invalid url's;  only allow url([wiki-attachement])
+
+        //tocheck: allow attached font files <a class=attachment href=xxx.woff><a class=infolink ....>
+        css = css.replace( /url\(<a class="attachment" href="([^"]+.woff)".*><\/a>\)/gi,'url(<ifont href="$1"/>)' );
+        css = css.replace( /url\(<a class="attachment" href="([^"]+.ttf)".*><\/a>\)/gi,'url(<ifont href="$1"/>)' );
+
         css = css.replace( /url\(\<[^i][^)]*\)/gi, "url(invalid)" ); //remove url(<a...)
         css = css.replace( /url\([^<][^)]*\)/gi, "url(invalid)" );  //remove url(xxx)
 
@@ -55,9 +61,10 @@ function AddCSS( element ){
         css = css.replace( /@imp@rt/g, "@import url(https://fonts.googleapis.com/css?family=");
 
         //xss protection: remove IE dynamic properties
-        css = css.replace( /expression|behavior/gi,"invalid" );
+        css = css.replace( /expression|behavior/gi, "invalid" );
 
         css = css.replace( /url\(<img class="inline" .*?src="([^"]+)[^>]*>\)/gi, "url($1)" );
+        css = css.replace( /url\(<ifont href="([^"]+)"\/>\)/gi, "url($1)" );
 
         css = css.replace( /<p>|<\/p>/gi, "" ); //jspwiki inserts <p/> for empty lines
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/behaviors/Columns.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/behaviors/Columns.js b/jspwiki-war/src/main/scripts/behaviors/Columns.js
index 881c117..5bada6c 100644
--- a/jspwiki-war/src/main/scripts/behaviors/Columns.js
+++ b/jspwiki-war/src/main/scripts/behaviors/Columns.js
@@ -56,7 +56,7 @@ function Columns(element, options){
     if( columnCount /*>0*/ ){
 
         columnCount++;
-        width = ( args[0] ) ? args[0] / columnCount + "px" : 100 / columnCount + "%";
+        width = args[0] ? args[0] + "px" : 100 / columnCount + "%";
 
         element
             .addClass("columns")

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/behaviors/Flip.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/behaviors/Flip.js b/jspwiki-war/src/main/scripts/behaviors/Flip.js
index 87073a7..e695124 100644
--- a/jspwiki-war/src/main/scripts/behaviors/Flip.js
+++ b/jspwiki-war/src/main/scripts/behaviors/Flip.js
@@ -52,7 +52,7 @@ function Flip(element, options){
             arg = args.pop();
             if( !arg.indexOf("w") /*index==0*/ ){ css.width = arg.slice(1).toInt(); }
             else if( !arg.indexOf("h") /*index==0*/ ){ css.height = arg.slice(1).toInt(); }
-            else if( arg.test(/none|default|success|info|warning|danger/ )){ frontback.push(arg); }
+            else if( arg.test(/none|default|success|info|warning|danger/ )){ frontback[frontback.length] = arg; }
 
         }
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/behaviors/GraphBar.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/behaviors/GraphBar.js b/jspwiki-war/src/main/scripts/behaviors/GraphBar.js
index 1443539..f17374b 100644
--- a/jspwiki-war/src/main/scripts/behaviors/GraphBar.js
+++ b/jspwiki-war/src/main/scripts/behaviors/GraphBar.js
@@ -136,8 +136,8 @@ var GraphBar = new Class({
 
                 }
 
+                //console.log(data, options.minv, options.maxv);
                 data = data.scale(options.minv, options.maxv)
-                console.log(data);
 
                 for( i = 0; i < len; i++){
 
@@ -245,6 +245,7 @@ var GraphBar = new Class({
             [offset + size, val + "%", (100 - val) + "%"] :
                 [offset + val / 100 * (/*offset + */ size), "100%" ];
 
+
         //then convert sizes to bar css styles
         css = css.map( function(barsize){
             return options.isHorizontal ? {width: barsize} : {height: barsize, width: 20, "vertical-align":"text-bottom"};

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/behaviors/TableX.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/behaviors/TableX.js b/jspwiki-war/src/main/scripts/behaviors/TableX.js
index 55d6cb1..2e2735a 100644
--- a/jspwiki-war/src/main/scripts/behaviors/TableX.js
+++ b/jspwiki-war/src/main/scripts/behaviors/TableX.js
@@ -102,9 +102,10 @@ var TableX = new Class({
                 if( $(r.cells[col]).get('text').trim() == fieldName ){
 
                     //take this COLUMN
-                    for( i=1; i < tlen; i++)
+                    for( i=1; i < tlen; i++){
                         //result.push( new Element('span').wraps(table.rows[i].cells[col]) );
-                        result.push( rows[i].cells[col] );
+                        result[result.length] = rows[i].cells[col];
+                    }
                     return result;
                 }
             }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/behaviors/Viewer.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/behaviors/Viewer.js b/jspwiki-war/src/main/scripts/behaviors/Viewer.js
index 494eb9f..f28db02 100644
--- a/jspwiki-war/src/main/scripts/behaviors/Viewer.js
+++ b/jspwiki-war/src/main/scripts/behaviors/Viewer.js
@@ -48,7 +48,6 @@ this.Viewer = {
         var result = {};
 
         if( typeOf(url) == "element" ){ url = url.src || url.href; }
-
         this.LIB.some( function(item){
 
             return url.test( item[0], "i" )
@@ -62,7 +61,6 @@ this.Viewer = {
         //console.log(options.type);
         if( options.type && !result[options.type] ){ return false; }
 
-
         return result;
     },
 
@@ -134,7 +132,7 @@ this.Viewer = {
             h = options.height;
 
         function preloadCallback(preload, width, height){
-                preloads.push( preload );
+                preloads[preloads.length] = preload ;
                 w = w.max(width);
                 h = h.max(height.toInt());
                 //console.log("preloads.length, w,h);

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/dialog/Dialog.Selection.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/dialog/Dialog.Selection.js b/jspwiki-war/src/main/scripts/dialog/Dialog.Selection.js
index f11146f..ac4a89a 100644
--- a/jspwiki-war/src/main/scripts/dialog/Dialog.Selection.js
+++ b/jspwiki-war/src/main/scripts/dialog/Dialog.Selection.js
@@ -70,9 +70,16 @@ Dialog.Selection = new Class({
 
     initialize:function( options ){
 
-        this.setClass(".selection",options);
-        this.selected = options.selected || "";
-        this.parent( options );
+        var self = this;
+
+        self.setClass(".selection",options);
+        self.selected = options.selected || "";
+        self.parent( options );
+
+        self.element.addEvent("click:relay(.item)", function(e){
+            e.stop();
+            self.action( this.get("title") );
+        });
 
         //console.log("Dialog.Selection ", this.element.className);
     },
@@ -107,14 +114,9 @@ Dialog.Selection = new Class({
 
         if( typeOf( content ) == "element" ){
 
-            //first move the content elements into the body and highlight the selected item
-            self.parent( content ).setValue( self.selected );
-
-            //then add the click & hover event handlers
-            self.element.addEvent("click:relay(.item)", function(e){
-                e.stop();
-                self.action( this.get("title") );
-            });
+            //first move the content elements into the body and then highlight the selected item
+            self.parent( content )
+                .setValue( self.selected );
 
         }
 
@@ -128,13 +130,24 @@ Dialog.Selection = new Class({
     */
     setValue: function( value ){
 
-        var self = this, selected = "selected", element;
+        var self = this, selected = "selected", element,
+            target = ".item[title" + self.options.match + value + "]";
+
+        /*ffs
+        if( self.hasClass("dialog-filtered") ){
 
+            if( value == "" ){
+                this.element.getElements(".item,.divider").show();
+            } else {
+                this.element.getElements(".item,.divider").hide();
+                this.element.getElements(target).show();
+            }
+        }
+        */
         element = self.get("." + selected);
         if( element ){ element.removeClass(selected); }
 
-        //console.log("Dialog.Selection setValue", value);
-        element = self.get( ".item[title" + self.options.match + value + "]" );
+        element = self.get( target );
         if( element ){ element.addClass(selected); }
 
         self[selected] = value;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/dialog/Dialog.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/dialog/Dialog.js b/jspwiki-war/src/main/scripts/dialog/Dialog.js
index 4d23e79..145b547 100644
--- a/jspwiki-war/src/main/scripts/dialog/Dialog.js
+++ b/jspwiki-war/src/main/scripts/dialog/Dialog.js
@@ -111,17 +111,17 @@ var Dialog = new Class({
 
         var self = this, el;
 
-        this.setClass(".dialog",options);
+        this.setClass(".dialog", options);
         this.setOptions( options );
 
-        console.log("Dialog.initialize"   );
+        //console.log("Dialog.initialize" );
         options = self.options;
 
         el = self.element = options.dialog || self.build(options);
 
         el.getElements(".close").addEvent("click", self.hide.bind(self) );
 
-        //make dialog draggable; only possible when el is position absolute
+        //make dialog draggable; only possible when el has an absolute position
         if( (el.getStyle("position") == "absolute") && options.draggable ){
 
             new Drag(el,{
@@ -132,7 +132,6 @@ var Dialog = new Class({
 
         self[ options.showNow ? "show": "hide"]();
 
-
     },
 
     toElement: function(){
@@ -154,10 +153,22 @@ var Dialog = new Class({
 
     },
 
+    hasClass: function(clazz){
+        return this.element.hasClass(clazz);
+    },
+
+    ifClass: function(flag, trueClass, falseClass){
+
+        var body = this.element;
+        if( body ){ body.ifClass(flag, trueClass, falseClass); }
+        return this;
+
+    },
+
     setClass: function(clazz, options){
 
+        console.log("Dialog.setClass", options.cssClass );
         options.cssClass = clazz + (options.cssClass || "");
-        console.log("Dialog.setClass ", options.cssClass );
 
     },
 
@@ -213,25 +224,15 @@ var Dialog = new Class({
 
     },
 
-    /*
-    Function: action
-        Fires the ""action"" event.
-        When the autoClose option is set, the dialog will also be hidden.
-    */
     action: function(value){
-        console.log("Dialog action: ",value," close:"+this.options.autoClose);
+        //console.log("Dialog action: ",value," close:"+this.options.autoClose);
         this.fireEvent("action", value);
         if( this.options.autoClose ){ this.hide(); }
     },
 
-    /*
-    Function: build
-        Build new dialog frame based on caption and body options.
-    */
     build: function( options ){
 
-        console.log("DIALOG build ",options.cssClass, options.styles);
-
+        //console.log("DIALOG build ",options.cssClass, options.styles);
         var element = this.element = [
             "div" + options.cssClass, {styles: options.styles}, [
                 "a.close",{ html: "&#215;"},

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/moo-extend/Array.NaturalSort.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/moo-extend/Array.NaturalSort.js b/jspwiki-war/src/main/scripts/moo-extend/Array.NaturalSort.js
index f7baac8..d91185c 100644
--- a/jspwiki-war/src/main/scripts/moo-extend/Array.NaturalSort.js
+++ b/jspwiki-war/src/main/scripts/moo-extend/Array.NaturalSort.js
@@ -138,7 +138,7 @@ Array.implement({
 
         }
 
-        //console.log("[", kmgt ? "kmgt" : dmy ? "dmy" : num ? "num" : nat ? "nat" : "no conversion", "] ");
+        console.log("[", kmgt ? "kmgt" : dmy ? "dmy" : num ? "num" : nat ? "nat" : "no conversion", "] ");
 
         return kmgt || dmy || num || nat || this.slice();
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/moo-extend/Behavior.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/moo-extend/Behavior.js b/jspwiki-war/src/main/scripts/moo-extend/Behavior.js
index bff1dab..e022326 100644
--- a/jspwiki-war/src/main/scripts/moo-extend/Behavior.js
+++ b/jspwiki-war/src/main/scripts/moo-extend/Behavior.js
@@ -65,11 +65,12 @@ var Behavior = new Class({
     update: function(){
 
         var cache = "_bhvr", updated, type, isClass, isFunction,
-            nodes, node, i = 0, j, item, behavior, options;
+            nodes, node, i = 0, j, item, behavior, options, items;
 
         while( item = this.behaviors[ i++ ] ){
 
             //console.log("BEHAVIOR ", item.once?"ONCE ":"", nodes.length, item.s, typeOf(item.b) );
+            once = [];
             options = item.o;
             behavior = item.b;
             type = typeOf(behavior);
@@ -80,27 +81,33 @@ var Behavior = new Class({
 
             if( nodes[0] ){
 
-                if( item.once ){
+                for( j=0; node = nodes[ j++ ]; ){
 
-                    if( isClass ){ new behavior(nodes, options); }
-                    else if( isFunction ){ behavior(nodes, options); }
+                    updated = node[cache] || (node[cache] = []);
 
-                } else {
+                    if ( updated.indexOf(item) < 0 ){
 
-                    for( j=0; node = nodes[ j++ ]; ){
+                        if( item.once ){
 
-                        updated = node[cache] || (node[cache] = []);
+                            once.push( node );
 
-                        if ( updated.indexOf(item) < 0 ){
+                        } else {
 
                             //if( isString ) node[behavior](options);
                             if( isClass ){ new behavior(node, options); }
                             else if( isFunction ){ behavior.call(node, node, options); }
 
-                            updated.push( item );
                         }
+                        updated.push( item );
                     }
                 }
+
+                if( once[0] ){
+                    //console.log("ONCE", item.s , once.length);
+                    if( isClass ){ new behavior($$(once), options); }
+                    else if( isFunction ){ behavior($$(once), options); }
+
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/moo-extend/Color.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/moo-extend/Color.js b/jspwiki-war/src/main/scripts/moo-extend/Color.js
index c953146..3b0dc05 100644
--- a/jspwiki-war/src/main/scripts/moo-extend/Color.js
+++ b/jspwiki-war/src/main/scripts/moo-extend/Color.js
@@ -24,7 +24,7 @@ Class: Color
     This is a minimized variant of the Color class, based Mootools.More,
     written for jspwiki.
     It adds supports for html color names. (ref. http://en.wikipedia.org/wiki/Web_colors)
-�
+
 Arguments:
     color - (mixed) A string or an array representation of a color.
 
@@ -47,9 +47,7 @@ Examples:
 
 !function(){
 
-var VGA = "black#000 green#008000 silver#c0c0c0 lime#0f0 gray#808080 olive#808000 white#fff yellow#ff0 maroon#800000 navy#000080 red#f00 blue#00f purple#800080 teal#008080 fuchsia#f0f aqua#0ff",
-    c0l0r = 'i'.slick(),
-
+var c0l0r = 'i'.slick(),
     Color = this.Color = new Type('Color', function(color){
 
     if (arguments.length >= 3){
@@ -58,16 +56,16 @@ var VGA = "black#000 green#008000 silver#c0c0c0 lime#0f0 gray#808080 olive#80800
 
     } else if (typeof color == 'string'){
 
-        if(color.test(/^[\da-f]{3,6}$/i)){ color = "#"+color; }
-        c0l0r.setStyle('color',''); //reset the template
-        color = ( VGA.test( RegExp(color+"(#\\S+)","i" ) ) ? RegExp.$1 :
-            color.match(/rgb/i) ? color.rgbToHex() :
-                c0l0r.setStyle('color',color).getStyle('color') ).hexToRgb(true);
+        c0l0r.inject(document.body);
+        color = ( color.test(/^[\da-f]{3,6}$/i) ?  ("#" + color) :
+                 c0l0r.setStyle('color',color).getComputedStyle('color').rgbToHex() ).hexToRgb(true);  //[r,g,b]
+        c0l0r.remove();
 
     }
     if(!color){ return null; }
     color.rgb = color.slice(0, 3);
     color.hex = color.rgbToHex();
+
     return Object.append(color, this);
 });
 
@@ -94,11 +92,8 @@ Color.implement({
 
     invert: function(){
 
-        return new Color(255-this[0],255-this[1],255-this[2]);
+        return new Color(255-this[0], 255-this[1], 255-this[2]);
 
-        /*return new Color(this.map(function(value){
-            return 255 - value;
-        }));*/
     }
 
 });

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/moo-extend/Element.Extend.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/moo-extend/Element.Extend.js b/jspwiki-war/src/main/scripts/moo-extend/Element.Extend.js
index e36316b..70161f1 100644
--- a/jspwiki-war/src/main/scripts/moo-extend/Element.Extend.js
+++ b/jspwiki-war/src/main/scripts/moo-extend/Element.Extend.js
@@ -358,7 +358,7 @@ Element.implement({
 
                 Array.from(this.options).each( function(option){
 
-                    if (option.defaultSelected){ values.push(option.value || option.text); }
+                    if (option.defaultSelected){ values[values.length] = option.value || option.text; }
 
                 });
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/moo-extend/String.Extend.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/moo-extend/String.Extend.js b/jspwiki-war/src/main/scripts/moo-extend/String.Extend.js
index ed5ce1b..12f34db 100644
--- a/jspwiki-war/src/main/scripts/moo-extend/String.Extend.js
+++ b/jspwiki-war/src/main/scripts/moo-extend/String.Extend.js
@@ -57,6 +57,14 @@ String.implement({
         return this.replace(/([a-z\xe0-\xfd])([A-Z\xc0-\xdd])/g,"$1 $2");
     },
 
+	//ES6 polyfill
+	startsWith: function( match ){
+		return !this.indexOf(match);
+	},
+	endsWith: function( match ){
+		return this.slice( -match.length ) == match ;
+	},
+
     /*
     Function: trunc
         Truncate a string to a maximum length
@@ -202,6 +210,9 @@ String.implement({
         > "zebra".sliceArgs( "zebra-eee-ffa" ); //returns ['eee','ffa']
         > "zebra".sliceArgs( "horse" );  //returns null
         > "zebra".sliceArgs( "zebra" );  //returns []
+        > "zebra".sliceArgs( "horse zebra-eee-ffa" ); //returns ['eee','ffa']
+        > "zebra".sliceArgs( "zebra-eee-ffa monkey" ); //returns ['eee','ffa']
+        > "zebra".sliceArgs( "horse zebra-eee-ffa monkey" ); //returns ['eee','ffa']
 
     */
     sliceArgs: function(element, regexp){
@@ -223,8 +234,8 @@ String.implement({
         Return a (string) classname to invoke the contextual colors.
 
     Example
-    >    'panel'.fetchContext( 'accordion-danger') => 'panel panel-danger'
-    >    'panel'.fetchContext( 'commentbox-success') => 'panel panel-success'
+    >    "panel".fetchContext( "accordion-danger") => 'panel panel-danger'
+    >    "panel".fetchContext( "commentbox-success") => 'panel panel-success'
 
     */
     fetchContext : function(element){

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/moo-extend/Textarea.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/moo-extend/Textarea.js b/jspwiki-war/src/main/scripts/moo-extend/Textarea.js
index 49b465a..07b1b9c 100644
--- a/jspwiki-war/src/main/scripts/moo-extend/Textarea.js
+++ b/jspwiki-war/src/main/scripts/moo-extend/Textarea.js
@@ -78,6 +78,9 @@ var Textarea = new Class({
     toElement: function(){
         return this.ta;
     },
+    focus: function(){
+        this.ta.focus();
+    },
 
     /*
     Function: getValue
@@ -86,6 +89,12 @@ var Textarea = new Class({
     getValue: function(){
         return this.ta.value;
     },
+
+    setValue: function(value){
+        this.ta.value = value;
+        this.setSelectionRange(0,0);
+        return this;
+    },
     /*
     Function: slice
         Invokes slice(..) on the value of the textarea

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Commands.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Commands.js b/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Commands.js
index 309aafb..42fba89 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Commands.js
+++ b/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Commands.js
@@ -86,7 +86,6 @@ Snipe.Commands = new Class({
             dialog,
             dialogs = options.dialogs || {};
 
-
         //add click buttons and dialogs
         container.addEvent("click:relay([" + dataCmd + "])", function(event){
 
@@ -98,6 +97,7 @@ Snipe.Commands = new Class({
             // input fields (eg checkboxes) keep the default behaviour; other click events are disabled
             if( !this.match("input") ){ event.stop(); }
 
+
         });
 
         //see if there are any dialogs linked to a button. Eg: "div.dialog.<command>"
@@ -234,9 +234,17 @@ Snipe.Commands = new Class({
 
         //console.log("Snipe.Commands: createDialog() " + command + " ",dialog );
 
-        if( typeOf(dialog) != "array" ){ dialog = [ Dialog.Selection, { body: dialog } ]; }
+        if( typeOf(dialog) != "array" ){
+
+            dialog = [ Dialog.Selection, { body: dialog } ];
+
+        }
+
+        if( !dialog[1].relativeTo ){
+
+            dialog[1].relativeTo = this.options.relativeTo || document.body;
 
-        if( !dialog[1].relativeTo ){ dialog[1].relativeTo = this.options.relativeTo || document.body; }
+        }
 
         dialog[1].autoClose = false;
 
@@ -262,7 +270,6 @@ Snipe.Commands = new Class({
             button = self.btns[command];
 
         //console.log("Snipe.Commands: openDialog() " + command + " " + activeDlg);
-
         if( activeDlg && (activeDlg != newDlg) ){ activeDlg.hide(); }
         self.activeDlg = self.dlgs[command];
 
@@ -284,7 +291,6 @@ Snipe.Commands = new Class({
             button = self.btns[command];
 
         //console.log("Snipe.Commands: closeDialog() " + command )
-
         if( self.dlgs[command] == self.activeDlg ){ self.activeDlg = null; }
 
         if( button ){ button.removeClass("active"); }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Sections.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Sections.js b/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Sections.js
index 7e2a4cb..940e483 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Sections.js
+++ b/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Sections.js
@@ -18,19 +18,18 @@
 /*eslint-env browser*/
 /*global $, Class, Events, Snipe  */
 /*
-Class: SnipEditor.Sections
-    This dialog displays the list of page sections.
+Class: Snipe.Sections
+    This class implement section based editing in Snipe.
+    Based on the selected section, the Snipe textarea will be filled with a
+    part of the full content of the main textarea.
+    At all times the main textarea will contain the full text.
 
-    (all) - allows to select all sections (auto generated)
-    start-of-page - only present when first section starts on an offset > 0
-    section1..n - section titles, with indentation level depending on their weight
+    This class keeps track for the current list of page section titles.
 
-    The set of sections is generated by the parseSections() callback handler.
-    This parser returns an array of section "descriptors":
+    The set of sections is generated by the parser() callback handler.
+    That parser returns an array of section "descriptors":
 >    [ {title:text, start:char-offset, indent:indentation-level}, ... ]
 
-    Clicking an entry triggers the updateSections() callback handler.
-    FIXME: why not fire an onAction event (similar to other dialogs)
 
 Depends:
     Snipe
@@ -38,18 +37,19 @@ Depends:
 Example:
 (start code)
     div.cage
-      div.btn.btn-link
-        span.icon-bookmark
-            span.caret
-      ul.dropdown-menu [data-sections="div"][data-hover-parent=".cage"]
-        li  a first
-        li  a ..
-        li  a.dropdown-divider
-        li  a ..
-
-
-    new Snipe.Sections( sectionDropDown, {
-        snipe: snipe,
+      div.sections
+        button.btn.btn-default
+          span.icon-bookmark
+          span.caret
+        ul.dropdown-menu[data-hover-parent="div"]
+          li  a first
+          li  a ..
+          li  a.dropdown-divider
+          li  a ..
+
+    new Snipe.Sections( snipe, {
+        main: <main textarea>
+        menu: <ul dropdownmenu>,
         parser: function(text){ .. return [[{title, start, depth}],..]; }
     });
 (end)
@@ -61,31 +61,34 @@ Snipe.Sections = new Class({
     Binds: ["show","update","action"],
 
     options: {
-        //snipe: snip-editor
+        //main
+        //menu
         //parser: function(text){ returns [[title,start,depth]..] }
         all: "( all )".localize(),
+        sections: ".sections",
         startOfPage: "Start of Page".localize()
     },
 
-    initialize: function(element, options){
+    initialize: function(snipe, options){
 
-        var self = this,
-            snipe = options.snipe;
+        var self = this;
 
-        self.container = element;
+        self.snipe = snipe;
+        self.main = options.main;
         self.parser = options.parser;
 
-        self.list = element.getElement("ul").addEvent("click:relay(a)", self.action);
+        if( options.menu ){
 
-        self.main = snipe.get("mainarea");
-        self.work = $( snipe.get("textarea") );
+            self.list = options.menu.addEvent("click:relay(a)", self.action);
 
-        snipe.addEvent( "change", self.update.debounce(500) );
+        }
 
         self.parse();
         self.action( location.search );  //url?section=0..n
-        self.show();
+        self.menu();
 
+        //finally, connect to the update event of snipe !
+        snipe.addEvent( "change", self.update );
     },
 
     /*
@@ -97,14 +100,14 @@ Snipe.Sections = new Class({
         >        0 : start-of-page (if applicable) => title=s-1 => cursor=-1
         >        1..n : page sections              => title=s0..sn => cursor=0..n
     */
-    parse: function(){
+    parse: function( ){
 
         this.sections = this.parser( this.main.value );
 
     },
 
     /*
-    Function: show
+    Function: menu
         UPDATE/RFEFRESH the section dropdown-menu.
         Highlight the current item.
 
@@ -124,97 +127,95 @@ Snipe.Sections = new Class({
                 a.indent-0.section99 Title-Section-2
     (end)
     */
-    show: function( ){
+    menu: function( ){
 
-        //console.log("Sections show",this.current, this.sections.length, this.sections[3]);
+        //console.log("menu", this.current, this.sections.length, this.sections);
 
         var data = [],
+            list = this.list,
             options = this.options,
             current = this.current,
             sections = this.sections,
 
-            addItem = function(indent,name,offset){
-
-                data.push("li" + (offset==current ? ".active" : ""),[
-                    "a.indent-" + indent + ".section" + offset, { html:name }
+            addItem = function(item, index){
+                data.push("li" + (index == current ? ".active" : ""),[
+                    "a.indent-" + item.depth + ".section" + index, { html:item.title }
                 ]);
-
             };
 
-        addItem(0, options.all ,-2);
+        if( list ){
 
-        if( sections[0] ){
+            addItem({ depth:0, title:options.all }, -2);
 
-            if( sections[0].start > 0 ){ addItem(0, options.startOfPage, -1); }
+            if( sections[0] ){
 
-            data.push( "li.divider" );
-
-            sections.each( function(item, idx){
+                if( sections[0].start > 0 ){
+                    addItem({ depth:0, title:options.startOfPage }, -1);
+                }
+                data.push( "li.divider" );
+                sections.each( addItem );
+            }
 
-                addItem( item.depth, item.title/*.trunc(36)*/, idx );
+            list.empty().adopt( data.slick() );
 
-            });
+            list.getParent().ifClass( current >= -1, "section-selected");
 
         }
 
-        this.list.empty().adopt( data.slick() );
-
     },
 
     /*
     Function: update
-        Make sure that changes to the work textarea are propagated to the main textarea.
-        This function handles the propagation of changes into the main textarea.
+        This function handles the propagation of changes from snipe to the main textarea.
+        It is triggered by a change event on snipe.
     */
     update: function(){
 
-        //console.log("****Snipe.Sections : change main");
-
         var self = this,
             main = self.main,
-            work = self.work.value,
+            work = self.snipe.get("value"),
             s = main.value;
 
         //insert \n to ensure the next section always starts on a new line.
         if( work.slice(-1) != "\n" ){ work +="\n"; }
 
         //console.log("change txta: from="+self.begin+ " end="+self.end);
-        main.value = s.slice(0, self.begin) + work  + s.slice(self.end);
+        if( work != s.slice(self.begin, self.end) ){
 
-        self.end = self.begin + work.length;
+            main.value = s.slice(0, self.begin) + work  + s.slice(self.end);
 
-        self.parse();
-        self.show();
+            self.end = self.begin + work.length;
 
+            self.parse();
+        }
+        self.menu(); //always update menu, independent of the content of main
     },
 
     /*
     Function: action
-        This function copies the selected section from the main to the work textarea.
-        It is invoked at initialization and through the dialog onAction click handler.
+        This function copies the selected section from the main to the snipe textarea.
+        It is invoked at initialization and through click handlers in the
+        section dropdown menu.
 
     Arguments:
-        item - index of selected section: all, -1, 0..n
+        item - index of selected section: all(-2), -1, 0..n
     */
-    action:function( item ){
+    action: function( item ){
 
-        //console.log("Sections: action",item);
         var self = this,
             main = self.main.value,
-            work = self.work,
             sections = self.sections,
             begin = 0,
             end = main.length;
 
         if( item ){
 
-            //item.target => event.target; this is an onclick invocation
+            //item.target => event.target; this is an onclick invocation!
             if( item.target ){ item = item.target.className; }
 
             //section-2=All, section-1=StartOfPage, section0..section99=rest
             item = ( item.match( /section=?(-?\d+)/ )||[,-2])[1].toInt();
 
-
             if( item == -1 ){
 
                 //show the Start Of Page, prior to the first real section
@@ -223,7 +224,7 @@ Snipe.Sections = new Class({
             } else if(item >= 0  && sections[item] ){
 
                 begin = sections[item].start;
-                if( sections[item+1] ){ end = sections[item+1].start; }
+                if( sections[item + 1] ){ end = sections[item + 1].start; }
 
             }
 
@@ -231,19 +232,12 @@ Snipe.Sections = new Class({
 
         }
 
-        //work.value = "";  //FIXME google chrome  43.0.2357.65 bug -- if omitted, the textarea is displayed EMPTY!! ??
-        work.value = main.slice(begin, end);
-        work.setSelectionRange(0,0); //why not go via Textarea()..., for better bw compat.
         self.begin = begin;
         self.end = end;
 
-        //section-selected class : turn bookmark icon red or blue
-        self.container.ifClass( item >= -1, "section-selected");
-
-        //update the dropdown menu, and highlight the current item
-        self.show();
-
-        work.fireEvent("change");  //needed to rerun page preview
+        //finally set the new snipe value
+        //note: this triggers a change event, and calls update()
+        self.snipe.set("value", main.slice(begin, end) );
 
         return false; //stop click event propagation
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Snips.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Snips.js b/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Snips.js
index 9ffade6..a8d3b8e 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Snips.js
+++ b/jspwiki-war/src/main/scripts/wiki-edit/Snipe.Snips.js
@@ -76,22 +76,23 @@ Snipe.Snips = new Class({
                 if( typeOf(suggest) == "string" ){
 
                     snip.suggest = {
-                        pfx: RegExp( suggest + "$" ),
+                        lback: RegExp( suggest + "$" ),
                         match: RegExp( "^" + suggest )
                     }
-                    //console.log( snip.suggest );
+
                 }
 
                 self.suggestions[cmd] = snip;
 
-            } else {
-
-                //otherwise regular snippet
+             //otherwise regular snippet
+             //} else {
 
             }
 
             //check for snip dialogs -- they have the same name as the command
-            if( snip[cmd] ){ self.dialogs[cmd] = snip[cmd]; }
+            //TODO better:  use the dialog property !
+            if( snip[cmd] ){ self.dialogs[cmd] = snip[cmd]; }  //deprecated
+            if( snip.dialog ){ self.dialogs[cmd] = snip.dialog; }
 
             snips[cmd] = snip;
 
@@ -110,7 +111,7 @@ Snipe.Snips = new Class({
 
         for( cmd in this.snips ){
 
-            if( fromStart.test( cmd + "$" ) ){ return cmd; }
+            if( fromStart.endsWith( cmd ) ){ return cmd; }
 
         }
 
@@ -120,7 +121,7 @@ Snipe.Snips = new Class({
 
     /*
     Function: matchSuggest
-        Lookup a cmd enter just in front of the caret/cursor of the workarea..
+        Lookup a cmd which matches the suggestion look-back and match reg-exps.
 
         snip.suggest => {
             start: (number) start position,
@@ -130,17 +131,12 @@ Snipe.Snips = new Class({
     */
     matchSuggest: function(){
 
-        var cmd, snip, pfx, match, result, suggest,
+        var cmd, snip, lback, match, result, suggest,
             suggestions = this.suggestions,
             workarea = this.workarea,
             caret = workarea.getSelectionRange(),
             fromStart = workarea.getFromStart();
 
-        //"selectInline", "selectBlock", "selectStartOfLine";
-
-        //var SOL = workarea.isCaretAtStartOfLine();
-        //var EOL = workarea.isCaretAtEndOfLine();
-
         for( cmd in suggestions ){
 
             snip = suggestions[cmd];
@@ -149,23 +145,23 @@ Snipe.Snips = new Class({
 
                 suggest = snip.suggest;
 
-                if( suggest.pfx ){
+                if( suggest.lback ){
 
-                    pfx = fromStart.match( suggest.pfx );
+                    lback = fromStart.match( suggest.lback );
 
-                    if( pfx ){
+                    if( lback ){
 
-                        console.log("SUGGEST Prefix ", cmd, suggest.pfx, pfx.getLast() );
-                        pfx = pfx.getLast(); //match last (x)
+                        //console.log("SUGGEST Look-Back ", cmd, suggest.lback, lback.getLast() );
+                        lback = lback.getLast(); //match last (x)
 
-                        match = workarea.slice( caret.start - pfx.length )
+                        match = workarea.slice( caret.start - lback.length )
                                          .match( suggest.match );
 
-                        console.log("SUGGEST Match ", suggest.match, match );
+                        //console.log("SUGGEST Match ", suggest.match, match );
 
                         if( match ){
 
-                            result = { pfx: pfx, match: match.getLast() } ;
+                            result = { lback: lback, match: match.getLast() } ;
 
                         }
 
@@ -251,9 +247,9 @@ Snipe.Snips = new Class({
             for( pattern in patterns ){
 
                 pos = text.lastIndexOf( pattern );
+
                 if( (pos > -1) && (text.indexOf( patterns[pattern], pos ) == -1) ){
                         return inscope;
-
                 }
             }
             return !inscope;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki-edit/Snipe.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Snipe.js b/jspwiki-war/src/main/scripts/wiki-edit/Snipe.js
index 2b090e8..19ddc5b 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Snipe.js
+++ b/jspwiki-war/src/main/scripts/wiki-edit/Snipe.js
@@ -102,7 +102,7 @@ var Snipe = new Class({
         sectionParser: function(){ return {}; }
     },
 
-    initialize: function(el, options){
+    initialize: function(element, options){
 
         options = this.setOptions(options).options;
 
@@ -117,13 +117,15 @@ var Snipe = new Class({
             The main textarea is hidden and contains always the complete document.
             On submit, the mainarea is send back to the server.
             */
-            main = self.mainarea = $(el),
-            work = main.clone().erase("name").inject( main.hide(), "before" ),
-            container = options.container || work.form,
+            //main = self.mainarea = $(el),
+            //work = main.clone().erase("name").inject( main.hide(), "before" ).addClass("snipe-work"),
+            container = options.container || $(element).form,
 
             // Augment the textarea element with extra capabilities
             // Make sure the content of the mainarea is always in sync with the workarea
-            textarea = self.textarea = new Textarea( work );
+            //textarea = self.textarea = new Textarea( work );
+            textarea = self.textarea = new Textarea( element );
+
 
         self.directsnips = new Snipe.Snips( textarea, options.directsnips );
         self.snippets    = new Snipe.Snips( textarea, options.snippets );
@@ -133,14 +135,14 @@ var Snipe = new Class({
                 //feed the find dialog with searchable content
                 get: function(){
                     var selection = textarea.getSelection();
-                    return (selection=="") ? work.value : selection;
+                    return (selection=="") ? element.value : selection;
                     //return (selection=="") ? textarea.getValue() : selection;
                 },
                 set: function(v){
                     var s = textarea.getSelectionRange();
-                    //self.fireEvent("beforeChange");
+                    self.fireEvent("beforeChange"); //make undoable
                     //textarea[ s.thin ? "setValue" : "setSelection" ](v);
-                    s.thin ? work.value = v : textarea.setSelection(v);
+                    s.thin ? element.value = v : textarea.setSelection(v);
                     self.fireEvent("change");
                 }
             }
@@ -150,8 +152,8 @@ var Snipe = new Class({
         //Commands are entered via tab-completion, button clicks, or a dialog.
         //Snipe.Commands ensures that at most one dialog is open at the same time.
         self.commands = new Snipe.Commands( container, {
-            //onOpen: function( /*command*/ ){ work.focus(); },
-            onClose: function( /*command*/ ){ work.focus(); },
+            onOpen: function( /*command*/ ){ element.focus(); },
+            onClose: function( /*command*/ ){ element.focus(); },
             onAction: self.action,
             dialogs: self.snippets.dialogs,
             relativeTo: textarea
@@ -160,7 +162,7 @@ var Snipe = new Class({
 
         self.reset();
 
-        work.addEvents({
+        element.addEvents({
 
             keydown: self.keystroke,
             keypress: self.keystroke,
@@ -171,7 +173,7 @@ var Snipe = new Class({
             click: self.suggest.debounce(),
 
             input: (function( ){
-                console.log("***Snipe: dom textarea input :");
+                //console.log("change event on input");
                 self.fireEvent("change");
             }).debounce()
 
@@ -193,7 +195,7 @@ var Snipe = new Class({
 
     */
     toElement: function(){
-        return $(this.textarea);
+        return this.textarea.toElement();
     },
 
     /*
@@ -205,7 +207,8 @@ var Snipe = new Class({
     */
     get: function(item){
 
-        return( /mainarea|textarea/.test(item) ? this[item] :
+        return( "value" == item ? this.textarea.getValue() :
+                /mainarea|textarea/.test(item) ? this[item] :
                 /snippets|directsnips|autosuggest|tabcompletion|smartpairs/.test(item) ? this.options[item] :
                 null );
 
@@ -214,6 +217,7 @@ var Snipe = new Class({
     /*
     Function: set
         Set/Reset some of the options of the snip-editor.
+        Also use to set/reset the content of the textarea. (eg section editing)
 
     Arguments:
         item - snippets|directsnips|autosuggest|tabcompletion|smartpair
@@ -223,9 +227,18 @@ var Snipe = new Class({
     */
     set: function(item, value){
 
-        if( /snippets|directsnips|autosuggest|tabcompletion|smartpairs/.test(item) ){
+        if( item == "value" ){
+
+            this.textarea.setValue( value );
+            this.fireEvent("beforeChange"); //make undoable
+            this.textarea.focus();
+
+        } else if( /snippets|directsnips|autosuggest|tabcompletion|smartpairs/.test(item) ){
+
             this.options[item] = value;
+
         }
+
         return this.fireEvent("change");
     },
 
@@ -242,7 +255,7 @@ var Snipe = new Class({
     */
     shortcut: function(e){
 
-        var key, keycmd;
+        var key, cmd;
 
         if( e.shift || e.control || e.meta || e.alt ){
 
@@ -252,14 +265,14 @@ var Snipe = new Class({
                         (e.alt ? "alt+":"") +
                           e.key,
 
-            //console.log("shortcut ",key);
-            keycmd = this.snippets.keys[key];
+            console.log("shortcut ",key);
+            cmd = this.snippets.keys[key];
 
-            if ( keycmd ){
+            if ( cmd ){
 
-                //console.log("Snipe shortcut",key,keycmd,e.code);
+                //console.log("Snipe shortcut", key, cmd, se.code);
                 e.stop();
-                this.commands.action( keycmd );
+                this.commands.action( cmd );
 
             }
         }
@@ -310,11 +323,10 @@ var Snipe = new Class({
 
         var self = this,
             txta = self.textarea,
-            //el = txta.toElement(),
             key = e.key,
             caret = txta.getSelectionRange();
 
-        txta.toElement().focus();
+        txta.focus();
 
         if( /up|down|esc/.test(key) ){
 
@@ -512,7 +524,6 @@ var Snipe = new Class({
     Function: setContext
         Store the active snip. (state)
         EG, subsequent handling of dialogs.
-        As long as a snippet is active, the textarea gets the css class {{.activeSnip}}.
 
     Arguments:
         snip - snippet object to make active
@@ -527,7 +538,6 @@ var Snipe = new Class({
 
         //console.log("Snipe.setContext",snip,suggest);
         this.context = { snip:snip, suggest:suggest };
-        this.toElement().addClass("activeSnip");
 
     },
 
@@ -538,9 +548,9 @@ var Snipe = new Class({
     */
     reset: function(){
 
-        //console.log("Snipe:reset", this.context);
-        this.context = {};
-        this.toElement().removeClass("activeSnip").focus();
+        console.log("Snipe:reset", this.context);
+        this.context = null;
+        this.textarea.focus();
         this.commands.close();
 
     },
@@ -618,11 +628,10 @@ var Snipe = new Class({
 
                 console.log( "Snipe.suggest ",suggest );
                 this.setContext( null/*snip*/, suggest );
-                return this.commands.action( suggest.cmd , suggest.pfx );
+                return this.commands.action( suggest.cmd , suggest.lback );
 
             }
-
-            this.commands.close();
+            this.reset();
         }
     },
 
@@ -630,160 +639,222 @@ var Snipe = new Class({
     /*
     Function: action
         This function executes the command action.
-        It will insert the snippet and update the selection and caret.
+        It will coordinate to get the snippet inserted and move the
+        caret to the proper position after insertion.
 
-        It looks up and processes the snippet.
-        - insert the snippet text at the caret in the textarea.
-        - when text was selected (prior to the click or keyup event):
-            - the snippet text will replace the selection
-            - the selection will be passed as a parameter into the snippet
-            - if the snippet has ONE parameter, the snippet text will be toggled:
-              i.e. remove the snippet when already present, otherwise insert the snippet
+        Actions can be triggered via:
+        - tab-completion
+        - click-event from the [data-cmd] DOM element
+        - short-cut key
+        - matched suggestion (with look-back and match strings)
 
     Arguments:
         cmd - (string) used to loopup the snippet
         args - (optional) additional snippet arguments (eg value passed via a dialog)
     */
-    action: function( cmd ){
+    action: function( cmd /*, more command arguments */ ){
 
         var self = this,
             args = Array.slice(arguments, 1),
             snip = self.snippets.get( cmd ),
-            //snippet = snip.snippet,
-            s = snip.snippet,
-            suggest = snip.suggest && self.context.suggest,
-
             txta = self.textarea,
-            caret = txta.getSelectionRange(),
-            hasCaret = !caret.thin,
-            caretStart = caret.start,
+            caret,
+            snipXL,
+            snippet = snip.suggest ? args.join() : snip.snippet,
+            suggest = snip.suggest && self.context && self.context.suggest;
+
+        function unesc(s){ return s.replace(/~\{/g, "{"); }
 
-            pfx, sel, sfx, snipArr, selectionLength,
-            /* match "pfx{selection}sfx" into ["pfx","selection","sfx"] */
-            /* do not match "pfx~{do-not-match}sfx"  */
-            snipSelection = /(^|[\S\s]*[^~])\{([^\{\}]+)\}([\S\s]*)/,
-            snipEscapeChar = /~\{/g;
+        console.log("Snipe:action ", cmd, "snippet=",snippet, "args=",args, "suggest=",suggest );
 
-        function setCaret(start,end){ txta.setSelectionRange(start, end); }
-        function removeEscapeChar(s){ return s.replace(snipEscapeChar, "{"); }
+        if( !snip ) return;
 
-        console.log("Snipe:action ", snip, s, cmd, args,suggest );
+        if( snip.event ){
+            //console.log("Snipe:action Event: ",snip.event);
+            self.fireEvent(snip.event, arguments);
 
-        if( snip ){
+        } else {
 
-            if( snip.event ){
+            self.fireEvent("beforeChange"); //make action undoable
 
-                //console.log("Snipe:action() fire-event: ",snip.event);
-                return self.fireEvent(snip.event, arguments);
+            if( suggest ){
+
+                snippet = self.suggestAction( txta, snippet, suggest.lback, suggest.match);
 
             }
 
-            this.fireEvent("beforeChange"); //CHECKME
 
-            //adjust caret based on suggestion context
-            if( suggest ){
+            /*
+            Match "pfx{=copy-selection}sfx" and replace by "pfx<selection>sfx"
+            snippet = snippet.replace(/..../, function(match, target){
+                if(selection){
+                    target = selection; selection = "";
+                }
+                return target;  //alse removing the {= and }
+            });
+            */
 
-                s = args.join();  //result of the suggest dialog
-                selectionLength = suggest.match.length;
 
-                if( s.startsWith(suggest.pfx) ){
+            /*
+            Match "pfx{selection}sfx"
 
-                    s = s.slice(suggest.pfx.length);
-                    selectionLength -= suggest.pfx.length;
+            snippet = snippet.replace( /regexp/, selection || RegExp.$1 );
 
-                } else {
+            and also handle toggle !!?
+            */
 
-                    caretStart -= suggest.pfx.length;
 
-                }
+            // match "pfx{selection}sfx" into ["pfx","selection","sfx"]
+            // do not match "pfx~{do-not-match}sfx"
+            if( snipXL = snippet.match( /(^|[\S\s]*[^~])\{([^!\{\}][^\{\}]*)\}([\S\s]*)/ ) ){
+            //if( snipXL = snippet.match( /(^|[\S\s]*[^~])\{([^\{\}]+)\}([\S\s]*)/ ) ){
+
+                //console.log("Snipe:action complex snippet 'pfx{selection}sfx' ", pfx, sel, sfx, caret.thin );
+                self.injectXL( txta,
+                               snippet,
+                               unesc( snipXL[1] ), //pfx
+                               snipXL[2],          //sel
+                               unesc( snipXL[3] )  //sfx
+                );
 
-                //move the caret according to suggest pfx and match
-                setCaret( caretStart, caretStart +  selectionLength );
-                hasCaret = selectionLength > 0;
+            } else {
+
+                //if no selection, just insert and move caret after inserted snippet
+                caret = txta.getSelectionRange();
+                snippet = unesc(snippet);
+
+                //console.log("Snipe:action simple snippet", caret.thin, snippet );
+                self.inject( txta,
+                             snippet,
+                             caret.start + (caret.thin ? snippet.length : 0),
+                             caret.thin ? 0 : snippet.length );
             }
 
-            if( (snipArr = s.match( snipSelection )) ){
+        }
 
-                pfx = removeEscapeChar( snipArr[1] );
-                sel = hasCaret ?  txta.getSelection() : snipArr[2] ;
-                sfx = removeEscapeChar( snipArr[3] );
+        self.reset();
+        self.fireEvent("change");
+        self.suggest.delay(1, self); //allow some time to finish any actions, before opening a new suggestion dialog
 
-                console.log("found a 'pfx{selection}sfx' snippet", snipArr, pfx, sel, sfx,hasCaret );
+    },
 
-                if( hasCaret ) {
+    /*
+    Function: suggestAction
+        Adjust the snippet and the caret based on the suggestion context.
+        The selection is set to the matched suggestion string, to prepare for the later
+        snippet replacement.
+        When the snippet starts with the look-back string; only the last part
+        of the matched suggestion string should be replaced by the snippet.
+        Returns a adjusted snippet.
+
+    Example:  ($==caret position)
+        [te$st] => lback = "te", match = "test",  snippet ="wiki-page"
+            Selection will become "test",  and snippet will become "wiki-page"
+        [te$st] => lback = "te", match = "test",  snippet ="team-page"
+            Selection will become "st",  and snippet will become "am-page"
+    */
+    suggestAction: function( txta, snippet, lback, match){
 
-                    if( sel.startsWith(pfx) && sel.endsWith(sfx) ){
+        var start = txta.getSelectionRange().start,
+            len = match.length;
 
-                        console.log("TOGGLE: pfx/sfx matched inside the selection",caret.start,caret.end);
-                        sel = sel.slice( pfx.length, -sfx.length );
-                        pfx = sfx = "";
+        //console.log("Snipe:suggestAction ",snippet,lback,match );
+        if( snippet.startsWith( lback ) ){
 
-                    } else if( txta.getFromStart().endsWith(pfx)
-                            && txta.getTillEnd().startsWith(sfx) ){
+            //remove the look-back part of the snippet
+            snippet = snippet.slice( lback.length );
+            len -= lback.length;
 
-                        console.log("TOGGLE: pfx/sfx matched outside the selection",caret.start,caret.end);
-                        caretStart -= pfx.length;
-                        setCaret( caretStart, caret.end + sfx.length); //enlarge the selection
-                        pfx = sfx = "";
+        } else {
 
-                    }
-                }
+            //move the cursor to the start of the match
+            start -= lback.length;
 
-                s = pfx + sel + sfx;
-                caretStart += pfx.length;
-                selectionLength = sel.length;
+        }
 
-            } else {
+        txta.setSelectionRange(start, start + len); //move the cursor
 
-                console.log("plain text snippet", hasCaret,s );
-                s = removeEscapeChar( s );
-                caretStart += hasCaret ? 0 : s.length;
-                selectionLength = hasCaret ? s.length : 0;
+        return snippet;
 
-            }
+    },
 
-            self.inject(s, caretStart, selectionLength);
-            self.reset();
+    /*
+    Function: injectXL
+        Inject a complex snippet.
+        Complex snippet match this pattern: "pfx{selection}sfx".
+        The part inside the "{..}" should be replaced by the selection.
+        If the selection has already the pfx/sfx strings,  they should be toggled.
+    Example
+        snippet: "__{bold}__", no selection
+            Snippet "__bold__" will be inserted, selection will become "bold"
+        snippet: "__{bold}__", selection:"pipo"
+            Snippet "__pipo__" will be inserted, selection will become "pipo"
+        snippet: "__{bold}__", selection:__"pipo"__
+            Snippet "pipo" will replace "__pipo__", selection will become "pipo"
+        snippet: "__{bold}__", selection:"__pipo__"
+            Snippet "pipo" will replace selection, selection will become "pipo"
+    */
+    injectXL: function( txta, snippet, pfx, sel, sfx){
+
+        var caret = txta.getSelectionRange(),
+            start = caret.start;
+
+        if( !caret.thin ) {
 
-            self.fireEvent("change");
-            //allow to finish the actions, before opening a new suggestion dialog
-            self.suggest.delay(10, self);
+            sel = txta.getSelection();
 
+            if( sel.startsWith(pfx) && sel.endsWith(sfx) ){
+
+                //console.log("TOGGLE: pfx/sfx matched inside the selection",caret.start,caret.end);
+                sel = sel.slice( pfx.length, -sfx.length );
+                pfx = sfx = "";
+
+            } else if( txta.getFromStart().endsWith(pfx)
+                    && txta.getTillEnd().startsWith(sfx) ){
+
+                //console.log("TOGGLE: pfx/sfx matched outside the selection",caret.start,caret.end);
+                start -= pfx.length;
+                txta.setSelectionRange(start , caret.end + sfx.length);
+                pfx = sfx = "";
+
+            }
         }
 
+        this.inject( txta, pfx + sel + sfx, start + pfx.length, sel.length);
+
     },
 
-    inject: function( snippet, start, selectionLength ){
+    /*
+    Function: inject
+        Replace the selection by the snippet and set a new selection.
+        Collapse leading and trailing \n characters
+        Autoindent the (multi-line) snippet.
+    */
+    inject: function( txta, snippet, start, selectionLen ){
 
-        var self = this,
-            txta = self.textarea,
-            fromStart = txta.getFromStart(),
+        var fromStart = txta.getFromStart(),
             prevline = fromStart.split(/\r?\n/).pop(),
-            indentation = prevline.match(/^\s+/);
-
-        //console.log(snippet,start,selectionLength);
+            indent = prevline.match(/^\s+/);
 
-        //process whitespace before and after the snippet
-        //collapse \n of previous line if the snippet starts with \n
         if( snippet.test(/^\n/) && ( fromStart.test( /(^|[\n\r]\s*)$/ ) ) ) {
-            //console.log("remove leading \\n", snippet);
+            //console.log("collapse leading \\n", snippet);
             snippet = snippet.slice( 1 );
             start--;
         }
 
-        //collapse \n of the next line when the snippet ends with a \n
         if( snippet.test(/\n$/) && ( txta.getTillEnd().test( /^\s*[\n\r]/ ) ) ) {
-            //console.log("remove trailing \\n", snippet);
+            //console.log("collapse trailing \\n", snippet);
             snippet = snippet.slice(0, -1);
+            start--;
         }
 
-        //finally auto-indent the snippets internal newlines \n
-        if( indentation ){
-            snippet = snippet.replace( /\n/g, "\n" + indentation[0] );
+        if( indent ){
+            //console.log("auto-indent internal newlines \n");
+            snippet = snippet.replace( /\n/g, "\n" + indent[0] );
         }
 
         txta.setSelection( snippet )
-            .setSelectionRange( start, start + selectionLength );
+            .setSelectionRange( start, start + selectionLen );
 
     },
 
@@ -801,7 +872,7 @@ var Snipe = new Class({
             el = txta.toElement();
 
         return {
-            main: this.mainarea.value,
+            //main: this.mainarea.value,
             value: el.get("value"),
             cursor: txta.getSelectionRange(),
             scrollTop: el.scrollTop,
@@ -823,7 +894,7 @@ var Snipe = new Class({
             el = txta.toElement();
 
         self.reset();
-        self.mainarea.value = state.main;
+        //self.mainarea.value = state.main;
         el.value = state.value;
         el.scrollTop = state.scrollTop;
         el.scrollLeft = state.scrollLeft;


[5/7] jspwiki git commit: Various HADDOCK updates & fixes

Posted by br...@apache.org.
http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/bootstrap.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/bootstrap.less b/jspwiki-war/src/main/styles/haddock/bootstrap/bootstrap.less
index 8a9b4a5..f0aa08f 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/bootstrap.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/bootstrap.less
@@ -1,30 +1,17 @@
-/*
- *
- * 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.
- *
-*/
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
 // Core variables and mixins
 @import "variables.less";
 @import "mixins.less";
 
-// Reset
+// Reset and dependencies
 @import "normalize.less";
 @import "print.less";
+@import "glyphicons.less";
 
 // Core CSS
 @import "scaffolding.less";
@@ -37,7 +24,6 @@
 
 // Components
 @import "component-animations.less";
-@import "glyphicons.less";
 @import "dropdowns.less";
 @import "button-groups.less";
 @import "input-groups.less";
@@ -55,6 +41,7 @@
 @import "media.less";
 @import "list-group.less";
 @import "panels.less";
+@import "responsive-embed.less";
 @import "wells.less";
 @import "close.less";
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/breadcrumbs.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/breadcrumbs.less b/jspwiki-war/src/main/styles/haddock/bootstrap/breadcrumbs.less
index cde4743..cb01d50 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/breadcrumbs.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/breadcrumbs.less
@@ -1,42 +1,25 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Breadcrumbs
 // --------------------------------------------------
 
 
 .breadcrumb {
-  padding: 8px 15px;
+  padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
   margin-bottom: @line-height-computed;
   list-style: none;
   background-color: @breadcrumb-bg;
   border-radius: @border-radius-base;
+
   > li {
     display: inline-block;
+
     + li:before {
       content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
       padding: 0 5px;
       color: @breadcrumb-color;
     }
   }
+
   > .active {
     color: @breadcrumb-active-color;
   }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/button-groups.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/button-groups.less b/jspwiki-war/src/main/styles/haddock/bootstrap/button-groups.less
index d5bec62..16db0c6 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/button-groups.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/button-groups.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Button groups
 // --------------------------------------------------
@@ -38,10 +18,6 @@
     &.active {
       z-index: 2;
     }
-    &:focus {
-      // Remove focus outline when dropdown JS adds it after closing the menu
-      outline: none;
-    }
   }
 }
 
@@ -57,18 +33,18 @@
 
 // Optional: Group multiple button groups together for a toolbar
 .btn-toolbar {
-  .clearfix();
+  margin-left: -5px; // Offset the first child's margin
+  &:extend(.clearfix all);
 
-  .btn-group {
+  .btn,
+  .btn-group,
+  .input-group {
     float: left;
   }
-  // Space out series of button groups
   > .btn,
-  > .btn-group {
-    + .btn,
-    + .btn-group {
-      margin-left: 5px;
-    }
+  > .btn-group,
+  > .input-group {
+    margin-left: 5px;
   }
 }
 
@@ -83,7 +59,7 @@
     .border-right-radius(0);
   }
 }
-// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
+// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it
 .btn-group > .btn:last-child:not(:first-child),
 .btn-group > .dropdown-toggle:not(:first-child) {
   .border-left-radius(0);
@@ -96,13 +72,13 @@
 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
   border-radius: 0;
 }
-.btn-group > .btn-group:first-child {
+.btn-group > .btn-group:first-child:not(:last-child) {
   > .btn:last-child,
   > .dropdown-toggle {
     .border-right-radius(0);
   }
 }
-.btn-group > .btn-group:last-child > .btn:first-child {
+.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
   .border-left-radius(0);
 }
 
@@ -117,9 +93,9 @@
 //
 // Remix the default button sizing classes into new ones for easier manipulation.
 
-.btn-group-xs > .btn { .btn-xs(); }
-.btn-group-sm > .btn { .btn-sm(); }
-.btn-group-lg > .btn { .btn-lg(); }
+.btn-group-xs > .btn { &:extend(.btn-xs); }
+.btn-group-sm > .btn { &:extend(.btn-sm); }
+.btn-group-lg > .btn { &:extend(.btn-lg); }
 
 
 // Split button dropdowns
@@ -177,7 +153,7 @@
 
   // Clear floats so dropdown menus can be properly placed
   > .btn-group {
-    .clearfix();
+    &:extend(.clearfix all);
     > .btn {
       float: none;
     }
@@ -197,29 +173,28 @@
     border-radius: 0;
   }
   &:first-child:not(:last-child) {
-    border-top-right-radius: @border-radius-base;
+    .border-top-radius(@btn-border-radius-base);
     .border-bottom-radius(0);
   }
   &:last-child:not(:first-child) {
-    border-bottom-left-radius: @border-radius-base;
     .border-top-radius(0);
+    .border-bottom-radius(@btn-border-radius-base);
   }
 }
 .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
   border-radius: 0;
 }
-.btn-group-vertical > .btn-group:first-child {
+.btn-group-vertical > .btn-group:first-child:not(:last-child) {
   > .btn:last-child,
   > .dropdown-toggle {
     .border-bottom-radius(0);
   }
 }
-.btn-group-vertical > .btn-group:last-child > .btn:first-child {
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
   .border-top-radius(0);
 }
 
 
-
 // Justified button groups
 // ----------------------
 
@@ -237,11 +212,33 @@
   > .btn-group .btn {
     width: 100%;
   }
+
+  > .btn-group .dropdown-menu {
+    left: auto;
+  }
 }
 
 
 // Checkbox and radio options
-[data-toggle="buttons"] > .btn > input[type="radio"],
-[data-toggle="buttons"] > .btn > input[type="checkbox"] {
-  display: none;
+//
+// In order to support the browser's form validation feedback, powered by the
+// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
+// `display: none;` or `visibility: hidden;` as that also hides the popover.
+// Simply visually hiding the inputs via `opacity` would leave them clickable in
+// certain cases which is prevented by using `clip` and `pointer-events`.
+// This way, we ensure a DOM element is visible to position the popover from.
+//
+// See https://github.com/twbs/bootstrap/pull/12794 and
+// https://github.com/twbs/bootstrap/pull/14559 for more information.
+
+[data-toggle="buttons"] {
+  > .btn,
+  > .btn-group > .btn {
+    input[type="radio"],
+    input[type="checkbox"] {
+      position: absolute;
+      clip: rect(0,0,0,0);
+      pointer-events: none;
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/buttons.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/buttons.less b/jspwiki-war/src/main/styles/haddock/bootstrap/buttons.less
index b629081..9cbb8f4 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/buttons.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/buttons.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Buttons
 // --------------------------------------------------
@@ -32,19 +12,26 @@
   font-weight: @btn-font-weight;
   text-align: center;
   vertical-align: middle;
+  touch-action: manipulation;
   cursor: pointer;
   background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
   border: 1px solid transparent;
   white-space: nowrap;
-  .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
+  .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);
   .user-select(none);
 
-  &:focus {
-    .tab-focus();
+  &,
+  &:active,
+  &.active {
+    &:focus,
+    &.focus {
+      .tab-focus();
+    }
   }
 
   &:hover,
-  &:focus {
+  &:focus,
+  &.focus {
     color: @btn-default-color;
     text-decoration: none;
   }
@@ -59,11 +46,17 @@
   &.disabled,
   &[disabled],
   fieldset[disabled] & {
-    cursor: not-allowed;
-    pointer-events: none; // Future-proof disabling of clicks
+    cursor: @cursor-disabled;
     .opacity(.65);
     .box-shadow(none);
   }
+
+  a& {
+    &.disabled,
+    fieldset[disabled] & {
+      pointer-events: none; // Future-proof disabling of clicks on `<a>` elements
+    }
+  }
 }
 
 
@@ -76,14 +69,6 @@
 .btn-primary {
   .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
 }
-// Warning appears as orange
-.btn-warning {
-  .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
-}
-// Danger and error appear as red
-.btn-danger {
-  .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
-}
 // Success appears as green
 .btn-success {
   .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
@@ -92,6 +77,14 @@
 .btn-info {
   .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
 }
+// Warning appears as orange
+.btn-warning {
+  .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
+}
+// Danger and error appear as red
+.btn-danger {
+  .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
+}
 
 
 // Link buttons
@@ -101,11 +94,11 @@
 .btn-link {
   color: @link-color;
   font-weight: normal;
-  cursor: pointer;
   border-radius: 0;
 
   &,
   &:active,
+  &.active,
   &[disabled],
   fieldset[disabled] & {
     background-color: transparent;
@@ -120,7 +113,7 @@
   &:hover,
   &:focus {
     color: @link-hover-color;
-    text-decoration: underline;
+    text-decoration: @link-hover-decoration;
     background-color: transparent;
   }
   &[disabled],
@@ -139,14 +132,14 @@
 
 .btn-lg {
   // line-height: ensure even-numbered height of button next to large input
-  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
+  .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);
 }
 .btn-sm {
   // line-height: ensure proper height of button next to small input
-  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
+  .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
 }
 .btn-xs {
-  .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
+  .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
 }
 
 
@@ -156,8 +149,6 @@
 .btn-block {
   display: block;
   width: 100%;
-  padding-left: 0;
-  padding-right: 0;
 }
 
 // Vertically space out multiple block buttons

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/carousel.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/carousel.less b/jspwiki-war/src/main/styles/haddock/bootstrap/carousel.less
index d231a7d..252011e 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/carousel.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/carousel.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Carousel
 // --------------------------------------------------
@@ -41,14 +21,40 @@
     // Account for jankitude on images
     > img,
     > a > img {
-      .img-responsive();
+      &:extend(.img-responsive);
       line-height: 1;
     }
+
+    // WebKit CSS3 transforms for supported devices
+    @media all and (transform-3d), (-webkit-transform-3d) {
+      .transition-transform(~'0.6s ease-in-out');
+      .backface-visibility(~'hidden');
+      .perspective(1000px);
+
+      &.next,
+      &.active.right {
+        .translate3d(100%, 0, 0);
+        left: 0;
+      }
+      &.prev,
+      &.active.left {
+        .translate3d(-100%, 0, 0);
+        left: 0;
+      }
+      &.next.left,
+      &.prev.right,
+      &.active {
+        .translate3d(0, 0, 0);
+        left: 0;
+      }
+    }
   }
 
   > .active,
   > .next,
-  > .prev { display: block; }
+  > .prev {
+    display: block;
+  }
 
   > .active {
     left: 0;
@@ -95,6 +101,7 @@
   color: @carousel-control-color;
   text-align: center;
   text-shadow: @carousel-text-shadow;
+  background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug
   // We can't have this transition here because WebKit cancels the carousel
   // animation if you trip this while in the middle of another animation.
 
@@ -111,7 +118,7 @@
   // Hover/focus state
   &:hover,
   &:focus {
-    outline: none;
+    outline: 0;
     color: @carousel-control-color;
     text-decoration: none;
     .opacity(.9);
@@ -124,26 +131,29 @@
   .glyphicon-chevron-right {
     position: absolute;
     top: 50%;
+    margin-top: -10px;
     z-index: 5;
     display: inline-block;
   }
   .icon-prev,
   .glyphicon-chevron-left {
     left: 50%;
+    margin-left: -10px;
   }
   .icon-next,
   .glyphicon-chevron-right {
     right: 50%;
+    margin-right: -10px;
   }
   .icon-prev,
   .icon-next {
     width:  20px;
     height: 20px;
-    margin-top: -10px;
-    margin-left: -10px;
+    line-height: 1;
     font-family: serif;
   }
 
+
   .icon-prev {
     &:before {
       content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
@@ -187,6 +197,7 @@
     // Internet Explorer 8-9 does not support clicks on elements without a set
     // `background-color`. We cannot use `filter` since that's not viewed as a
     // background color by the browser. Thus, a hack is needed.
+    // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
     //
     // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
     // set alpha transparency for the best results possible.
@@ -226,15 +237,22 @@
 
   // Scale up the controls a smidge
   .carousel-control {
-    .glyphicons-chevron-left,
-    .glyphicons-chevron-right,
+    .glyphicon-chevron-left,
+    .glyphicon-chevron-right,
     .icon-prev,
     .icon-next {
-      width: 30px;
-      height: 30px;
-      margin-top: -15px;
-      margin-left: -15px;
-      font-size: 30px;
+      width: (@carousel-control-font-size * 1.5);
+      height: (@carousel-control-font-size * 1.5);
+      margin-top: (@carousel-control-font-size / -2);
+      font-size: (@carousel-control-font-size * 1.5);
+    }
+    .glyphicon-chevron-left,
+    .icon-prev {
+      margin-left: (@carousel-control-font-size / -2);
+    }
+    .glyphicon-chevron-right,
+    .icon-next {
+      margin-right: (@carousel-control-font-size / -2);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/close.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/close.less b/jspwiki-war/src/main/styles/haddock/bootstrap/close.less
index 7912662..6d5bfe0 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/close.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/close.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Close icons
 // --------------------------------------------------
@@ -43,6 +23,7 @@
   // Additional properties for button version
   // iOS requires the button element instead of an anchor tag.
   // If you want the anchor version, it requires `href="#"`.
+  // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
   button& {
     padding: 0;
     cursor: pointer;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/code.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/code.less b/jspwiki-war/src/main/styles/haddock/bootstrap/code.less
index 8a5e9cb..a08b4d4 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/code.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/code.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Code (inline and block)
 // --------------------------------------------------
@@ -37,10 +17,26 @@ code {
   font-size: 90%;
   color: @code-color;
   background-color: @code-bg;
-  white-space: nowrap;
   border-radius: @border-radius-base;
 }
 
+// User input typically entered via keyboard
+kbd {
+  padding: 2px 4px;
+  font-size: 90%;
+  color: @kbd-color;
+  background-color: @kbd-bg;
+  border-radius: @border-radius-small;
+  box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
+
+  kbd {
+    padding: 0;
+    font-size: 100%;
+    font-weight: bold;
+    box-shadow: none;
+  }
+}
+
 // Blocks of code
 pre {
   display: block;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/component-animations.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/component-animations.less b/jspwiki-war/src/main/styles/haddock/bootstrap/component-animations.less
index 7834421..0bcee91 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/component-animations.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/component-animations.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Component animations
 // --------------------------------------------------
@@ -25,7 +5,7 @@
 // Heads up!
 //
 // We don't use the `.opacity()` mixin here since it causes a bug with text
-// fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
+// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
 
 .fade {
   opacity: 0;
@@ -37,13 +17,17 @@
 
 .collapse {
   display: none;
-  &.in {
-    display: block;
-  }
+
+  &.in      { display: block; }
+  tr&.in    { display: table-row; }
+  tbody&.in { display: table-row-group; }
 }
+
 .collapsing {
   position: relative;
   height: 0;
   overflow: hidden;
-  .transition(height .35s ease);
+  .transition-property(~"height, visibility");
+  .transition-duration(.35s);
+  .transition-timing-function(ease);
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/dropdowns.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/dropdowns.less b/jspwiki-war/src/main/styles/haddock/bootstrap/dropdowns.less
index ef3d95b..f6876c1 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/dropdowns.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/dropdowns.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Dropdown menus
 // --------------------------------------------------
@@ -30,12 +10,14 @@
   height: 0;
   margin-left: 2px;
   vertical-align: middle;
-  border-top:   @caret-width-base solid;
+  border-top:   @caret-width-base dashed;
+  border-top:   @caret-width-base solid ~"\9"; // IE8
   border-right: @caret-width-base solid transparent;
   border-left:  @caret-width-base solid transparent;
 }
 
 // The dropdown wrapper (div)
+.dropup,
 .dropdown {
   position: relative;
 }
@@ -58,6 +40,7 @@
   margin: 2px 0 0; // override default ul
   list-style: none;
   font-size: @font-size-base;
+  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
   background-color: @dropdown-bg;
   border: 1px solid @dropdown-fallback-border; // IE8 fallback
   border: 1px solid @dropdown-border;
@@ -66,6 +49,8 @@
   background-clip: padding-box;
 
   // Aligns the dropdown menu to right
+  //
+  // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
   &.pull-right {
     right: 0;
     left: auto;
@@ -120,16 +105,15 @@
   &:focus {
     color: @dropdown-link-disabled-color;
   }
-}
-// Nuke hover/focus effects
-.dropdown-menu > .disabled > a {
+
+  // Nuke hover/focus effects
   &:hover,
   &:focus {
     text-decoration: none;
     background-color: transparent;
     background-image: none; // Remove CSS gradient
     .reset-filter();
-    cursor: not-allowed;
+    cursor: @cursor-disabled;
   }
 }
 
@@ -146,6 +130,25 @@
   }
 }
 
+// Menu positioning
+//
+// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
+// menu with the parent.
+.dropdown-menu-right {
+  left: auto; // Reset the default from `.dropdown-menu`
+  right: 0;
+}
+// With v3, we enabled auto-flipping if you have a dropdown within a right
+// aligned nav component. To enable the undoing of that, we provide an override
+// to restore the default dropdown menu alignment.
+//
+// This is only for left-aligning a dropdown menu within a `.navbar-right` or
+// `.pull-right` nav component.
+.dropdown-menu-left {
+  left: 0;
+  right: auto;
+}
+
 // Dropdown section headers
 .dropdown-header {
   display: block;
@@ -153,6 +156,7 @@
   font-size: @font-size-small;
   line-height: @line-height-base;
   color: @dropdown-header-color;
+  white-space: nowrap; // as with > li > a
 }
 
 // Backdrop to catch body clicks on mobile, etc.
@@ -162,7 +166,7 @@
   right: 0;
   bottom: 0;
   top: 0;
-  z-index: @zindex-dropdown - 10;
+  z-index: (@zindex-dropdown - 10);
 }
 
 // Right aligned dropdowns
@@ -181,14 +185,15 @@
   // Reverse the caret
   .caret {
     border-top: 0;
-    border-bottom: @caret-width-base solid;
+    border-bottom: @caret-width-base dashed;
+    border-bottom: @caret-width-base solid ~"\9"; // IE8
     content: "";
   }
   // Different positioning for bottom up menu
   .dropdown-menu {
     top: auto;
     bottom: 100%;
-    margin-bottom: 1px;
+    margin-bottom: 2px;
   }
 }
 
@@ -200,8 +205,12 @@
 @media (min-width: @grid-float-breakpoint) {
   .navbar-right {
     .dropdown-menu {
-      .pull-right > .dropdown-menu();
+      .dropdown-menu-right();
+    }
+    // Necessary for overrides of the default right aligned menu.
+    // Will remove come v4 in all likelihood.
+    .dropdown-menu-left {
+      .dropdown-menu-left();
     }
   }
 }
-

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/forms.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/forms.less b/jspwiki-war/src/main/styles/haddock/bootstrap/forms.less
index 9ec2f23..9377d38 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/forms.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/forms.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Forms
 // --------------------------------------------------
@@ -31,6 +11,10 @@ fieldset {
   padding: 0;
   margin: 0;
   border: 0;
+  // Chrome and Firefox set a `min-width: min-content;` on fieldsets,
+  // so we reset that to ensure it behaves more like a standard block element.
+  // See https://github.com/twbs/bootstrap/issues/12359.
+  min-width: 0;
 }
 
 legend {
@@ -47,12 +31,17 @@ legend {
 
 label {
   display: inline-block;
+  max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
   margin-bottom: 5px;
   font-weight: bold;
 }
 
 
 // Normalize form controls
+//
+// While most of our form styles require extra classes, some basic normalization
+// is required to ensure optimum display with or without those classes to better
+// address browser inconsistencies.
 
 // Override content-box in Normalize (* isn't specific enough)
 input[type="search"] {
@@ -63,45 +52,33 @@ input[type="search"] {
 input[type="radio"],
 input[type="checkbox"] {
   margin: 4px 0 0;
-  margin-top: 1px \9; /* IE8-9 */
+  margin-top: 1px \9; // IE8-9
   line-height: normal;
 }
 
-// Set the height of select and file controls to match text inputs
 input[type="file"] {
   display: block;
 }
 
+// Make range inputs behave like textual form controls
+input[type="range"] {
+  display: block;
+  width: 100%;
+}
+
 // Make multiple select elements height not fixed
 select[multiple],
 select[size] {
   height: auto;
 }
 
-// Fix optgroup Firefox bug per https://github.com/twbs/bootstrap/issues/7611
-select optgroup {
-  font-size: inherit;
-  font-style: inherit;
-  font-family: inherit;
-}
-
-// Focus for select, file, radio, and checkbox
+// Focus for file, radio, and checkbox
 input[type="file"]:focus,
 input[type="radio"]:focus,
 input[type="checkbox"]:focus {
   .tab-focus();
 }
 
-// Fix for Chrome number input
-// Setting certain font-sizes causes the `I` bar to appear on hover of the bottom increment button.
-// See https://github.com/twbs/bootstrap/issues/8350 for more.
-input[type="number"] {
-  &::-webkit-outer-spin-button,
-  &::-webkit-inner-spin-button {
-    height: auto;
-  }
-}
-
 // Adjust output element
 output {
   display: block;
@@ -109,7 +86,6 @@ output {
   font-size: @font-size-base;
   line-height: @line-height-base;
   color: @input-color;
-  vertical-align: middle;
 }
 
 
@@ -143,11 +119,10 @@ output {
   font-size: @font-size-base;
   line-height: @line-height-base;
   color: @input-color;
-  vertical-align: middle;
   background-color: @input-bg;
   background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
   border: 1px solid @input-border;
-  border-radius: @input-border-radius;
+  border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
   .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
   .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
 
@@ -155,20 +130,29 @@ output {
   .form-control-focus();
 
   // Placeholder
-  //
-  // Placeholder text gets special styles because when browsers invalidate entire
-  // lines if it doesn't understand a selector/
   .placeholder();
 
+  // Unstyle the caret on `<select>`s in IE10+.
+  &::-ms-expand {
+    border: 0;
+    background-color: transparent;
+  }
+
   // Disabled and read-only inputs
-  // Note: HTML5 says that controls under a fieldset > legend:first-child won't
-  // be disabled if the fieldset is disabled. Due to implementation difficulty,
-  // we don't honor that edge case; we style them as disabled anyway.
+  //
+  // HTML5 says that controls under a fieldset > legend:first-child won't be
+  // disabled if the fieldset is disabled. Due to implementation difficulty, we
+  // don't honor that edge case; we style them as disabled anyway.
   &[disabled],
   &[readonly],
   fieldset[disabled] & {
-    cursor: not-allowed;
     background-color: @input-bg-disabled;
+    opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
+  }
+
+  &[disabled],
+  fieldset[disabled] & {
+    cursor: @cursor-disabled;
   }
 
   // Reset height for `textarea`s
@@ -178,13 +162,56 @@ output {
 }
 
 
+// Search inputs in iOS
+//
+// This overrides the extra rounded corners on search inputs in iOS so that our
+// `.form-control` class can properly style them. Note that this cannot simply
+// be added to `.form-control` as it's not specific enough. For details, see
+// https://github.com/twbs/bootstrap/issues/11586.
+
+input[type="search"] {
+  -webkit-appearance: none;
+}
+
+
+// Special styles for iOS temporal inputs
+//
+// In Mobile Safari, setting `display: block` on temporal inputs causes the
+// text within the input to become vertically misaligned. As a workaround, we
+// set a pixel line-height that matches the given height of the input, but only
+// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
+//
+// Note that as of 9.3, iOS doesn't support `week`.
+
+@media screen and (-webkit-min-device-pixel-ratio: 0) {
+  input[type="date"],
+  input[type="time"],
+  input[type="datetime-local"],
+  input[type="month"] {
+    &.form-control {
+      line-height: @input-height-base;
+    }
+
+    &.input-sm,
+    .input-group-sm & {
+      line-height: @input-height-small;
+    }
+
+    &.input-lg,
+    .input-group-lg & {
+      line-height: @input-height-large;
+    }
+  }
+}
+
+
 // Form groups
 //
 // Designed to help with the organization and spacing of vertical forms. For
 // horizontal forms, use the predefined grid classes.
 
 .form-group {
-    margin-bottom: 15px;
+  margin-bottom: @form-group-margin-bottom;
 }
 
 
@@ -194,14 +221,14 @@ output {
 
 .radio,
 .checkbox {
+  position: relative;
   display: block;
-  min-height: @line-height-computed; // clear the floating input if there is no label text
   margin-top: 10px;
   margin-bottom: 10px;
-  padding-left: 20px;
-  vertical-align: middle;
+
   label {
-    display: inline;
+    min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text
+    padding-left: 20px;
     margin-bottom: 0;
     font-weight: normal;
     cursor: pointer;
@@ -211,9 +238,11 @@ output {
 .radio-inline input[type="radio"],
 .checkbox input[type="checkbox"],
 .checkbox-inline input[type="checkbox"] {
-  float: left;
+  position: absolute;
   margin-left: -20px;
+  margin-top: 4px \9;
 }
+
 .radio + .radio,
 .checkbox + .checkbox {
   margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
@@ -222,6 +251,7 @@ output {
 // Radios and checkboxes on same line
 .radio-inline,
 .checkbox-inline {
+  position: relative;
   display: inline-block;
   padding-left: 20px;
   margin-bottom: 0;
@@ -236,27 +266,120 @@ output {
 }
 
 // Apply same disabled cursor tweak as for inputs
+// Some special care is needed because <label>s don't inherit their parent's `cursor`.
 //
 // Note: Neither radios nor checkboxes can be readonly.
 input[type="radio"],
-input[type="checkbox"],
-.radio,
+input[type="checkbox"] {
+  &[disabled],
+  &.disabled,
+  fieldset[disabled] & {
+    cursor: @cursor-disabled;
+  }
+}
+// These classes are used directly on <label>s
 .radio-inline,
-.checkbox,
 .checkbox-inline {
-  &[disabled],
+  &.disabled,
   fieldset[disabled] & {
-    cursor: not-allowed;
+    cursor: @cursor-disabled;
   }
 }
+// These classes are used on elements with <label> descendants
+.radio,
+.checkbox {
+  &.disabled,
+  fieldset[disabled] & {
+    label {
+      cursor: @cursor-disabled;
+    }
+  }
+}
+
+
+// Static form control text
+//
+// Apply class to a `p` element to make any string of text align with labels in
+// a horizontal form layout.
+
+.form-control-static {
+  // Size it appropriately next to real form controls
+  padding-top: (@padding-base-vertical + 1);
+  padding-bottom: (@padding-base-vertical + 1);
+  // Remove default margin from `p`
+  margin-bottom: 0;
+  min-height: (@line-height-computed + @font-size-base);
+
+  &.input-lg,
+  &.input-sm {
+    padding-left: 0;
+    padding-right: 0;
+  }
+}
+
 
 // Form control sizing
+//
+// Build on `.form-control` with modifier classes to decrease or increase the
+// height and font-size of form controls.
+//
+// The `.form-group-* form-control` variations are sadly duplicated to avoid the
+// issue documented in https://github.com/twbs/bootstrap/issues/15074.
+
 .input-sm {
-  .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
+  .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
+}
+.form-group-sm {
+  .form-control {
+    height: @input-height-small;
+    padding: @padding-small-vertical @padding-small-horizontal;
+    font-size: @font-size-small;
+    line-height: @line-height-small;
+    border-radius: @input-border-radius-small;
+  }
+  select.form-control {
+    height: @input-height-small;
+    line-height: @input-height-small;
+  }
+  textarea.form-control,
+  select[multiple].form-control {
+    height: auto;
+  }
+  .form-control-static {
+    height: @input-height-small;
+    min-height: (@line-height-computed + @font-size-small);
+    padding: (@padding-small-vertical + 1) @padding-small-horizontal;
+    font-size: @font-size-small;
+    line-height: @line-height-small;
+  }
 }
 
 .input-lg {
-  .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
+  .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
+}
+.form-group-lg {
+  .form-control {
+    height: @input-height-large;
+    padding: @padding-large-vertical @padding-large-horizontal;
+    font-size: @font-size-large;
+    line-height: @line-height-large;
+    border-radius: @input-border-radius-large;
+  }
+  select.form-control {
+    height: @input-height-large;
+    line-height: @input-height-large;
+  }
+  textarea.form-control,
+  select[multiple].form-control {
+    height: auto;
+  }
+  .form-control-static {
+    height: @input-height-large;
+    min-height: (@line-height-computed + @font-size-large);
+    padding: (@padding-large-vertical + 1) @padding-large-horizontal;
+    font-size: @font-size-large;
+    line-height: @line-height-large;
+  }
 }
 
 
@@ -264,27 +387,63 @@ input[type="checkbox"],
 //
 // Apply contextual and semantic states to individual form controls.
 
-// Warning
+.has-feedback {
+  // Enable absolute positioning
+  position: relative;
+
+  // Ensure icons don't overlap text
+  .form-control {
+    padding-right: (@input-height-base * 1.25);
+  }
+}
+// Feedback icon (requires .glyphicon classes)
+.form-control-feedback {
+  position: absolute;
+  top: 0;
+  right: 0;
+  z-index: 2; // Ensure icon is above input groups
+  display: block;
+  width: @input-height-base;
+  height: @input-height-base;
+  line-height: @input-height-base;
+  text-align: center;
+  pointer-events: none;
+}
+.input-lg + .form-control-feedback,
+.input-group-lg + .form-control-feedback,
+.form-group-lg .form-control + .form-control-feedback {
+  width: @input-height-large;
+  height: @input-height-large;
+  line-height: @input-height-large;
+}
+.input-sm + .form-control-feedback,
+.input-group-sm + .form-control-feedback,
+.form-group-sm .form-control + .form-control-feedback {
+  width: @input-height-small;
+  height: @input-height-small;
+  line-height: @input-height-small;
+}
+
+// Feedback states
+.has-success {
+  .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
+}
 .has-warning {
   .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
 }
-// Error
 .has-error {
   .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
 }
-// Success
-.has-success {
-  .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
-}
 
+// Reposition feedback icon if input has visible label above
+.has-feedback label {
 
-// Static form control text
-//
-// Apply class to a `p` element to make any string of text align with labels in
-// a horizontal form layout.
-
-.form-control-static {
-  margin-bottom: 0; // Remove default margin from `p`
+  & ~ .form-control-feedback {
+    top: (@line-height-computed + 5); // Height of the `label` and its margin
+  }
+  &.sr-only ~ .form-control-feedback {
+    top: 0;
+  }
 }
 
 
@@ -301,7 +460,6 @@ input[type="checkbox"],
 }
 
 
-
 // Inline forms
 //
 // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
@@ -316,9 +474,9 @@ input[type="checkbox"],
 .form-inline {
 
   // Kick in the inline
-  @media (min-width: @screen-sm) {
+  @media (min-width: @screen-sm-min) {
     // Inline-block all the things for "inline"
-    .form-group  {
+    .form-group {
       display: inline-block;
       margin-bottom: 0;
       vertical-align: middle;
@@ -327,28 +485,59 @@ input[type="checkbox"],
     // In navbar-form, allow folks to *not* use `.form-group`
     .form-control {
       display: inline-block;
+      width: auto; // Prevent labels from stacking above inputs in `.form-group`
+      vertical-align: middle;
+    }
+
+    // Make static controls behave like regular ones
+    .form-control-static {
+      display: inline-block;
+    }
+
+    .input-group {
+      display: inline-table;
+      vertical-align: middle;
+
+      .input-group-addon,
+      .input-group-btn,
+      .form-control {
+        width: auto;
+      }
     }
 
-    // Override `width: 100%;` when not within a `.form-group`
-    select.form-control {
-      width: auto;
+    // Input groups need that 100% width though
+    .input-group > .form-control {
+      width: 100%;
+    }
+
+    .control-label {
+      margin-bottom: 0;
+      vertical-align: middle;
     }
 
     // Remove default margin on radios/checkboxes that were used for stacking, and
-    // then undo the floating of radios and checkboxes to match (which also avoids
-    // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
+    // then undo the floating of radios and checkboxes to match.
     .radio,
     .checkbox {
       display: inline-block;
       margin-top: 0;
       margin-bottom: 0;
-      padding-left: 0;
+      vertical-align: middle;
+
+      label {
+        padding-left: 0;
+      }
     }
     .radio input[type="radio"],
     .checkbox input[type="checkbox"] {
-      float: none;
+      position: relative;
       margin-left: 0;
     }
+
+    // Re-override the feedback icon.
+    .has-feedback .form-control-feedback {
+      top: 0;
+    }
   }
 }
 
@@ -360,8 +549,9 @@ input[type="checkbox"],
 
 .form-horizontal {
 
-  // Consistent vertical alignment of labels, radios, and checkboxes
-  .control-label,
+  // Consistent vertical alignment of radios and checkboxes
+  //
+  // Labels also get some reset styles, but that is scoped to a media query below.
   .radio,
   .checkbox,
   .radio-inline,
@@ -374,7 +564,7 @@ input[type="checkbox"],
   // and other content below items
   .radio,
   .checkbox {
-    min-height: @line-height-computed + (@padding-base-vertical + 1);
+    min-height: (@line-height-computed + (@padding-base-vertical + 1));
   }
 
   // Make form groups behave like rows
@@ -382,14 +572,42 @@ input[type="checkbox"],
     .make-row();
   }
 
-  .form-control-static {
-    padding-top: (@padding-base-vertical + 1);
-  }
-
-  // Only right align form labels here when the columns stop stacking
+  // Reset spacing and right align labels, but scope to media queries so that
+  // labels on narrow viewports stack the same as a default form example.
   @media (min-width: @screen-sm-min) {
     .control-label {
       text-align: right;
+      margin-bottom: 0;
+      padding-top: (@padding-base-vertical + 1); // Default padding plus a border
+    }
+  }
+
+  // Validation states
+  //
+  // Reposition the icon because it's now within a grid column and columns have
+  // `position: relative;` on them. Also accounts for the grid gutter padding.
+  .has-feedback .form-control-feedback {
+    right: floor((@grid-gutter-width / 2));
+  }
+
+  // Form group sizes
+  //
+  // Quick utility class for applying `.input-lg` and `.input-sm` styles to the
+  // inputs and labels within a `.form-group`.
+  .form-group-lg {
+    @media (min-width: @screen-sm-min) {
+      .control-label {
+        padding-top: (@padding-large-vertical + 1);
+        font-size: @font-size-large;
+      }
+    }
+  }
+  .form-group-sm {
+    @media (min-width: @screen-sm-min) {
+      .control-label {
+        padding-top: (@padding-small-vertical + 1);
+        font-size: @font-size-small;
+      }
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/glyphicons.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/glyphicons.less b/jspwiki-war/src/main/styles/haddock/bootstrap/glyphicons.less
index 0ce6407..7bc5852 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/glyphicons.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/glyphicons.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Glyphicons for Bootstrap
 //
@@ -30,11 +10,12 @@
 // Import the fonts
 @font-face {
   font-family: 'Glyphicons Halflings';
-  src: ~"url('@{icon-font-path}@{icon-font-name}.eot')";
-  src: ~"url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype')",
-       ~"url('@{icon-font-path}@{icon-font-name}.woff') format('woff')",
-       ~"url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype')",
-       ~"url('@{icon-font-path}@{icon-font-name}.svg#glyphicons-halflingsregular') format('svg')";
+  src: url('@{icon-font-path}@{icon-font-name}.eot');
+  src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),
+       url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),
+       url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),
+       url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),
+       url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');
 }
 
 // Catchall baseclass
@@ -48,16 +29,13 @@
   line-height: 1;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
-
-  &:empty {
-    width: 1em;
-  }
 }
 
 // Individual icons
-.glyphicon-asterisk               { &:before { content: "\2a"; } }
-.glyphicon-plus                   { &:before { content: "\2b"; } }
-.glyphicon-euro                   { &:before { content: "\20ac"; } }
+.glyphicon-asterisk               { &:before { content: "\002a"; } }
+.glyphicon-plus                   { &:before { content: "\002b"; } }
+.glyphicon-euro,
+.glyphicon-eur                    { &:before { content: "\20ac"; } }
 .glyphicon-minus                  { &:before { content: "\2212"; } }
 .glyphicon-cloud                  { &:before { content: "\2601"; } }
 .glyphicon-envelope               { &:before { content: "\2709"; } }
@@ -255,3 +233,73 @@
 .glyphicon-cloud-upload           { &:before { content: "\e198"; } }
 .glyphicon-tree-conifer           { &:before { content: "\e199"; } }
 .glyphicon-tree-deciduous         { &:before { content: "\e200"; } }
+.glyphicon-cd                     { &:before { content: "\e201"; } }
+.glyphicon-save-file              { &:before { content: "\e202"; } }
+.glyphicon-open-file              { &:before { content: "\e203"; } }
+.glyphicon-level-up               { &:before { content: "\e204"; } }
+.glyphicon-copy                   { &:before { content: "\e205"; } }
+.glyphicon-paste                  { &:before { content: "\e206"; } }
+// The following 2 Glyphicons are omitted for the time being because
+// they currently use Unicode codepoints that are outside the
+// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle
+// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.
+// Notably, the bug affects some older versions of the Android Browser.
+// More info: https://github.com/twbs/bootstrap/issues/10106
+// .glyphicon-door                   { &:before { content: "\1f6aa"; } }
+// .glyphicon-key                    { &:before { content: "\1f511"; } }
+.glyphicon-alert                  { &:before { content: "\e209"; } }
+.glyphicon-equalizer              { &:before { content: "\e210"; } }
+.glyphicon-king                   { &:before { content: "\e211"; } }
+.glyphicon-queen                  { &:before { content: "\e212"; } }
+.glyphicon-pawn                   { &:before { content: "\e213"; } }
+.glyphicon-bishop                 { &:before { content: "\e214"; } }
+.glyphicon-knight                 { &:before { content: "\e215"; } }
+.glyphicon-baby-formula           { &:before { content: "\e216"; } }
+.glyphicon-tent                   { &:before { content: "\26fa"; } }
+.glyphicon-blackboard             { &:before { content: "\e218"; } }
+.glyphicon-bed                    { &:before { content: "\e219"; } }
+.glyphicon-apple                  { &:before { content: "\f8ff"; } }
+.glyphicon-erase                  { &:before { content: "\e221"; } }
+.glyphicon-hourglass              { &:before { content: "\231b"; } }
+.glyphicon-lamp                   { &:before { content: "\e223"; } }
+.glyphicon-duplicate              { &:before { content: "\e224"; } }
+.glyphicon-piggy-bank             { &:before { content: "\e225"; } }
+.glyphicon-scissors               { &:before { content: "\e226"; } }
+.glyphicon-bitcoin                { &:before { content: "\e227"; } }
+.glyphicon-btc                    { &:before { content: "\e227"; } }
+.glyphicon-xbt                    { &:before { content: "\e227"; } }
+.glyphicon-yen                    { &:before { content: "\00a5"; } }
+.glyphicon-jpy                    { &:before { content: "\00a5"; } }
+.glyphicon-ruble                  { &:before { content: "\20bd"; } }
+.glyphicon-rub                    { &:before { content: "\20bd"; } }
+.glyphicon-scale                  { &:before { content: "\e230"; } }
+.glyphicon-ice-lolly              { &:before { content: "\e231"; } }
+.glyphicon-ice-lolly-tasted       { &:before { content: "\e232"; } }
+.glyphicon-education              { &:before { content: "\e233"; } }
+.glyphicon-option-horizontal      { &:before { content: "\e234"; } }
+.glyphicon-option-vertical        { &:before { content: "\e235"; } }
+.glyphicon-menu-hamburger         { &:before { content: "\e236"; } }
+.glyphicon-modal-window           { &:before { content: "\e237"; } }
+.glyphicon-oil                    { &:before { content: "\e238"; } }
+.glyphicon-grain                  { &:before { content: "\e239"; } }
+.glyphicon-sunglasses             { &:before { content: "\e240"; } }
+.glyphicon-text-size              { &:before { content: "\e241"; } }
+.glyphicon-text-color             { &:before { content: "\e242"; } }
+.glyphicon-text-background        { &:before { content: "\e243"; } }
+.glyphicon-object-align-top       { &:before { content: "\e244"; } }
+.glyphicon-object-align-bottom    { &:before { content: "\e245"; } }
+.glyphicon-object-align-horizontal{ &:before { content: "\e246"; } }
+.glyphicon-object-align-left      { &:before { content: "\e247"; } }
+.glyphicon-object-align-vertical  { &:before { content: "\e248"; } }
+.glyphicon-object-align-right     { &:before { content: "\e249"; } }
+.glyphicon-triangle-right         { &:before { content: "\e250"; } }
+.glyphicon-triangle-left          { &:before { content: "\e251"; } }
+.glyphicon-triangle-bottom        { &:before { content: "\e252"; } }
+.glyphicon-triangle-top           { &:before { content: "\e253"; } }
+.glyphicon-console                { &:before { content: "\e254"; } }
+.glyphicon-superscript            { &:before { content: "\e255"; } }
+.glyphicon-subscript              { &:before { content: "\e256"; } }
+.glyphicon-menu-left              { &:before { content: "\e257"; } }
+.glyphicon-menu-right             { &:before { content: "\e258"; } }
+.glyphicon-menu-down              { &:before { content: "\e259"; } }
+.glyphicon-menu-up                { &:before { content: "\e260"; } }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/grid.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/grid.less b/jspwiki-war/src/main/styles/haddock/bootstrap/grid.less
index 59bd8cd..e100655 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/grid.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/grid.less
@@ -1,35 +1,19 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Grid system
 // --------------------------------------------------
 
-// Set the container width, and override it for fixed navbars in media queries
+
+// Container widths
+//
+// Set the container width, and override it for fixed navbars in media queries.
+
 .container {
   .container-fixed();
 
-  @media (min-width: @screen-sm) {
+  @media (min-width: @screen-sm-min) {
     width: @container-sm;
   }
-  @media (min-width: @screen-md) {
+  @media (min-width: @screen-md-min) {
     width: @container-md;
   }
   @media (min-width: @screen-lg-min) {
@@ -37,12 +21,30 @@
   }
 }
 
-// mobile first defaults
+
+// Fluid container
+//
+// Utilizes the mixin meant for fixed width containers, but without any defined
+// width for fluid, full width layouts.
+
+.container-fluid {
+  .container-fixed();
+}
+
+
+// Row
+//
+// Rows contain and clear the floats of your columns.
+
 .row {
   .make-row();
 }
 
+
+// Columns
+//
 // Common styles for small and large grid columns
+
 .make-grid-columns();
 
 
@@ -51,11 +53,7 @@
 // Columns, offsets, pushes, and pulls for extra small devices like
 // smartphones.
 
-.make-grid-columns-float(xs);
-.make-grid(@grid-columns, xs, width);
-.make-grid(@grid-columns, xs, pull);
-.make-grid(@grid-columns, xs, push);
-.make-grid(@grid-columns, xs, offset);
+.make-grid(xs);
 
 
 // Small grid
@@ -64,11 +62,7 @@
 // to tablets.
 
 @media (min-width: @screen-sm-min) {
-  .make-grid-columns-float(sm);
-  .make-grid(@grid-columns, sm, width);
-  .make-grid(@grid-columns, sm, pull);
-  .make-grid(@grid-columns, sm, push);
-  .make-grid(@grid-columns, sm, offset);
+  .make-grid(sm);
 }
 
 
@@ -77,11 +71,7 @@
 // Columns, offsets, pushes, and pulls for the desktop device range.
 
 @media (min-width: @screen-md-min) {
-  .make-grid-columns-float(md);
-  .make-grid(@grid-columns, md, width);
-  .make-grid(@grid-columns, md, pull);
-  .make-grid(@grid-columns, md, push);
-  .make-grid(@grid-columns, md, offset);
+  .make-grid(md);
 }
 
 
@@ -90,10 +80,5 @@
 // Columns, offsets, pushes, and pulls for the large desktop device range.
 
 @media (min-width: @screen-lg-min) {
-  .make-grid-columns-float(lg);
-  .make-grid(@grid-columns, lg, width);
-  .make-grid(@grid-columns, lg, pull);
-  .make-grid(@grid-columns, lg, push);
-  .make-grid(@grid-columns, lg, offset);
+  .make-grid(lg);
 }
-

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/input-groups.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/input-groups.less b/jspwiki-war/src/main/styles/haddock/bootstrap/input-groups.less
index a2d748c..d0763db 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/input-groups.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/input-groups.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Input groups
 // --------------------------------------------------
@@ -37,8 +17,22 @@
   }
 
   .form-control {
+    // Ensure that the input is always above the *appended* addon button for
+    // proper border colors.
+    position: relative;
+    z-index: 2;
+
+    // IE9 fubars the placeholder attribute in text inputs and the arrows on
+    // select elements in input groups. To fix it, we float the input. Details:
+    // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
+    float: left;
+
     width: 100%;
     margin-bottom: 0;
+
+    &:focus {
+      z-index: 3;
+    }
   }
 }
 
@@ -49,10 +43,14 @@
 
 .input-group-lg > .form-control,
 .input-group-lg > .input-group-addon,
-.input-group-lg > .input-group-btn > .btn { .input-lg(); }
+.input-group-lg > .input-group-btn > .btn {
+  .input-lg();
+}
 .input-group-sm > .form-control,
 .input-group-sm > .input-group-addon,
-.input-group-sm > .input-group-btn > .btn { .input-sm(); }
+.input-group-sm > .input-group-btn > .btn {
+  .input-sm();
+}
 
 
 // Display as table-cell
@@ -85,18 +83,18 @@
   text-align: center;
   background-color: @input-group-addon-bg;
   border: 1px solid @input-group-addon-border-color;
-  border-radius: @border-radius-base;
+  border-radius: @input-border-radius;
 
   // Sizing
   &.input-sm {
     padding: @padding-small-vertical @padding-small-horizontal;
     font-size: @font-size-small;
-    border-radius: @border-radius-small;
+    border-radius: @input-border-radius-small;
   }
   &.input-lg {
     padding: @padding-large-vertical @padding-large-horizontal;
     font-size: @font-size-large;
-    border-radius: @border-radius-large;
+    border-radius: @input-border-radius-large;
   }
 
   // Nuke default margins from checkboxes and radios to vertically center within.
@@ -110,8 +108,10 @@
 .input-group .form-control:first-child,
 .input-group-addon:first-child,
 .input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
 .input-group-btn:first-child > .dropdown-toggle,
-.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
   .border-right-radius(0);
 }
 .input-group-addon:first-child {
@@ -120,8 +120,10 @@
 .input-group .form-control:last-child,
 .input-group-addon:last-child,
 .input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
 .input-group-btn:last-child > .dropdown-toggle,
-.input-group-btn:first-child > .btn:not(:first-child) {
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
   .border-left-radius(0);
 }
 .input-group-addon:last-child {
@@ -132,25 +134,38 @@
 // -------------------------
 .input-group-btn {
   position: relative;
+  // Jankily prevent input button groups from wrapping with `white-space` and
+  // `font-size` in combination with `inline-block` on buttons.
+  font-size: 0;
   white-space: nowrap;
 
-  // Negative margin to only have a 1px border between the two
-  &:first-child > .btn {
-    margin-right: -1px;
+  // Negative margin for spacing, position for bringing hovered/focused/actived
+  // element above the siblings.
+  > .btn {
+    position: relative;
+    + .btn {
+      margin-left: -1px;
+    }
+    // Bring the "active" button to the front
+    &:hover,
+    &:focus,
+    &:active {
+      z-index: 2;
+    }
   }
-  &:last-child > .btn {
-    margin-left: -1px;
-  }
-}
-.input-group-btn > .btn {
-  position: relative;
-  // Jankily prevent input button groups from wrapping
-  + .btn {
-    margin-left: -4px;
+
+  // Negative margin to only have a 1px border between the two
+  &:first-child {
+    > .btn,
+    > .btn-group {
+      margin-right: -1px;
+    }
   }
-  // Bring the "active" button to the front
-  &:hover,
-  &:active {
-    z-index: 2;
+  &:last-child {
+    > .btn,
+    > .btn-group {
+      z-index: 2;
+      margin-left: -1px;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/jumbotron.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/jumbotron.less b/jspwiki-war/src/main/styles/haddock/bootstrap/jumbotron.less
index 6a5adbd..1d9b515 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/jumbotron.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/jumbotron.less
@@ -1,48 +1,35 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Jumbotron
 // --------------------------------------------------
 
 
 .jumbotron {
-  padding: @jumbotron-padding;
+  padding-top:    @jumbotron-padding;
+  padding-bottom: @jumbotron-padding;
   margin-bottom: @jumbotron-padding;
-  font-size: @jumbotron-font-size;
-  font-weight: 200;
-  line-height: (@line-height-base * 1.5);
   color: @jumbotron-color;
   background-color: @jumbotron-bg;
 
   h1,
   .h1 {
-    line-height: 1;
     color: @jumbotron-heading-color;
   }
+
   p {
-    line-height: 1.4;
+    margin-bottom: (@jumbotron-padding / 2);
+    font-size: @jumbotron-font-size;
+    font-weight: 200;
+  }
+
+  > hr {
+    border-top-color: darken(@jumbotron-bg, 10%);
   }
 
-  .container & {
+  .container &,
+  .container-fluid & {
     border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
+    padding-left:  (@grid-gutter-width / 2);
+    padding-right: (@grid-gutter-width / 2);
   }
 
   .container {
@@ -53,14 +40,15 @@
     padding-top:    (@jumbotron-padding * 1.6);
     padding-bottom: (@jumbotron-padding * 1.6);
 
-    .container & {
+    .container &,
+    .container-fluid & {
       padding-left:  (@jumbotron-padding * 2);
       padding-right: (@jumbotron-padding * 2);
     }
 
     h1,
     .h1 {
-      font-size: (@font-size-base * 4.5);
+      font-size: @jumbotron-heading-font-size;
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/labels.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/labels.less b/jspwiki-war/src/main/styles/haddock/bootstrap/labels.less
index 5a5cd81..9a5a270 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/labels.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/labels.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Labels
 // --------------------------------------------------
@@ -35,7 +15,7 @@
   border-radius: .25em;
 
   // Add hover effects, but only for links
-  &[href] {
+  a& {
     &:hover,
     &:focus {
       color: @label-link-hover-color;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/list-group.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/list-group.less b/jspwiki-war/src/main/styles/haddock/bootstrap/list-group.less
index 3a01eca..216b912 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/list-group.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/list-group.less
@@ -1,38 +1,22 @@
-/*
- *
- * 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.
- *
-*/
 //
 // List groups
 // --------------------------------------------------
 
+
 // Base class
 //
 // Easily usable on <ul>, <ol>, or <div>.
+
 .list-group {
   // No need to set list-style: none; since .list-group-item is block level
   margin-bottom: 20px;
   padding-left: 0; // reset padding because ul and ol
 }
 
+
 // Individual list items
-// -------------------------
+//
+// Use on `li`s or `div`s within the `.list-group` parent.
 
 .list-group-item {
   position: relative;
@@ -51,18 +35,16 @@
     margin-bottom: 0;
     .border-bottom-radius(@list-group-border-radius);
   }
-
-  // Align badges within list items
-  > .badge {
-    float: right;
-  }
-  > .badge + .badge {
-    margin-right: 5px;
-  }
 }
 
-// Linked list items
-a.list-group-item {
+
+// Interactive list items
+//
+// Use anchor or button elements instead of `li`s or `div`s to create interactive items.
+// Includes an extra `.active` modifier class for showing selected items.
+
+a.list-group-item,
+button.list-group-item {
   color: @list-group-link-color;
 
   .list-group-item-heading {
@@ -73,8 +55,33 @@ a.list-group-item {
   &:hover,
   &:focus {
     text-decoration: none;
+    color: @list-group-link-hover-color;
     background-color: @list-group-hover-bg;
   }
+}
+
+button.list-group-item {
+  width: 100%;
+  text-align: left;
+}
+
+.list-group-item {
+  // Disabled state
+  &.disabled,
+  &.disabled:hover,
+  &.disabled:focus {
+    background-color: @list-group-disabled-bg;
+    color: @list-group-disabled-color;
+    cursor: @cursor-disabled;
+
+    // Force color to inherit for custom content
+    .list-group-item-heading {
+      color: inherit;
+    }
+    .list-group-item-text {
+      color: @list-group-disabled-text-color;
+    }
+  }
 
   // Active class on item itself, not parent
   &.active,
@@ -86,17 +93,32 @@ a.list-group-item {
     border-color: @list-group-active-border;
 
     // Force color to inherit for custom content
-    .list-group-item-heading {
+    .list-group-item-heading,
+    .list-group-item-heading > small,
+    .list-group-item-heading > .small {
       color: inherit;
     }
     .list-group-item-text {
-      color: lighten(@list-group-active-bg, 40%);
+      color: @list-group-active-text-color;
     }
   }
 }
 
+
+// Contextual variants
+//
+// Add modifier classes to change text and background color on individual items.
+// Organizationally, this must come after the `:hover` states.
+
+.list-group-item-variant(success; @state-success-bg; @state-success-text);
+.list-group-item-variant(info; @state-info-bg; @state-info-text);
+.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
+.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
+
+
 // Custom content options
-// -------------------------
+//
+// Extra classes for creating well-formatted content within `.list-group-item`s.
 
 .list-group-item-heading {
   margin-top: 0;

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/media.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/media.less b/jspwiki-war/src/main/styles/haddock/bootstrap/media.less
new file mode 100755
index 0000000..8c835e8
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/media.less
@@ -0,0 +1,66 @@
+.media {
+  // Proper spacing between instances of .media
+  margin-top: 15px;
+
+  &:first-child {
+    margin-top: 0;
+  }
+}
+
+.media,
+.media-body {
+  zoom: 1;
+  overflow: hidden;
+}
+
+.media-body {
+  width: 10000px;
+}
+
+.media-object {
+  display: block;
+
+  // Fix collapse in webkit from max-width: 100% and display: table-cell.
+  &.img-thumbnail {
+    max-width: none;
+  }
+}
+
+.media-right,
+.media > .pull-right {
+  padding-left: 10px;
+}
+
+.media-left,
+.media > .pull-left {
+  padding-right: 10px;
+}
+
+.media-left,
+.media-right,
+.media-body {
+  display: table-cell;
+  vertical-align: top;
+}
+
+.media-middle {
+  vertical-align: middle;
+}
+
+.media-bottom {
+  vertical-align: bottom;
+}
+
+// Reset margins on headings for tighter default spacing
+.media-heading {
+  margin-top: 0;
+  margin-bottom: 5px;
+}
+
+// Media list variation
+//
+// Undo default ul/ol styles
+.media-list {
+  padding-left: 0;
+  list-style: none;
+}


[4/7] jspwiki git commit: Various HADDOCK updates & fixes

Posted by br...@apache.org.
http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins.less
index 38d51cc..e6f9fe6 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins.less
@@ -1,865 +1,40 @@
-/*
- *
- * 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.
- *
-*/
-//
 // Mixins
 // --------------------------------------------------
 
-
 // Utilities
-// -------------------------
-
-// Clearfix
-// Source: http://nicolasgallagher.com/micro-clearfix-hack/
-//
-// For modern browsers
-// 1. The space content is one way to avoid an Opera bug when the
-//    contenteditable attribute is included anywhere else in the document.
-//    Otherwise it causes space to appear at the top and bottom of elements
-//    that are clearfixed.
-// 2. The use of `table` rather than `block` is only necessary if using
-//    `:before` to contain the top-margins of child elements.
-.clearfix() {
-  &:before,
-  &:after {
-    content: " "; // 1
-    display: table; // 2
-  }
-  &:after {
-    clear: both;
-  }
-}
-
-// WebKit-style focus
-.tab-focus() {
-  // Default
-  outline: thin dotted;
-  // WebKit
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-
-// Center-align a block level element
-.center-block() {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-// Sizing shortcuts
-.size(@width; @height) {
-  width: @width;
-  height: @height;
-}
-.square(@size) {
-  .size(@size; @size);
-}
-
-// Placeholder text
-.placeholder(@color: @input-color-placeholder) {
-  &:-moz-placeholder            { color: @color; } // Firefox 4-18
-  &::-moz-placeholder           { color: @color;   // Firefox 19+
-                                  opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
-  &:-ms-input-placeholder       { color: @color; } // Internet Explorer 10+
-  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome
-}
-
-// Text overflow
-// Requires inline-block or block for proper styling
-.text-overflow() {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-
-// CSS image replacement
-//
-// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
-// mixins being reused as classes with the same name, this doesn't hold up. As
-// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note
-// that we cannot chain the mixins together in Less, so they are repeated.
-//
-// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
-
-// Deprecated as of v3.0.1 (will be removed in v4)
-.hide-text() {
-  font: ~"0/0" a;
-  color: transparent;
-  text-shadow: none;
-  background-color: transparent;
-  border: 0;
-}
-// New mixin to use as of v3.0.1
-.text-hide() {
-  .hide-text();
-}
-
-
-
-// CSS3 PROPERTIES
-// --------------------------------------------------
-
-// Single side border-radius
-.border-top-radius(@radius) {
-  border-top-right-radius: @radius;
-   border-top-left-radius: @radius;
-}
-.border-right-radius(@radius) {
-  border-bottom-right-radius: @radius;
-     border-top-right-radius: @radius;
-}
-.border-bottom-radius(@radius) {
-  border-bottom-right-radius: @radius;
-   border-bottom-left-radius: @radius;
-}
-.border-left-radius(@radius) {
-  border-bottom-left-radius: @radius;
-     border-top-left-radius: @radius;
-}
-
-// Drop shadows
-.box-shadow(@shadow) {
-  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
-          box-shadow: @shadow;
-}
-
-// Transitions
-.transition(@transition) {
-  -webkit-transition: @transition;
-          transition: @transition;
-}
-.transition-property(@transition-property) {
-  -webkit-transition-property: @transition-property;
-          transition-property: @transition-property;
-}
-.transition-delay(@transition-delay) {
-  -webkit-transition-delay: @transition-delay;
-          transition-delay: @transition-delay;
-}
-.transition-duration(@transition-duration) {
-  -webkit-transition-duration: @transition-duration;
-          transition-duration: @transition-duration;
-}
-.transition-transform(@transition) {
-  -webkit-transition: -webkit-transform @transition;
-     -moz-transition: -moz-transform @transition;
-       -o-transition: -o-transform @transition;
-          transition: transform @transition;
-}
-
-// Transformations
-.rotate(@degrees) {
-  -webkit-transform: rotate(@degrees);
-      -ms-transform: rotate(@degrees); // IE9+
-          transform: rotate(@degrees);
-}
-.scale(@ratio) {
-  -webkit-transform: scale(@ratio);
-      -ms-transform: scale(@ratio); // IE9+
-          transform: scale(@ratio);
-}
-.translate(@x; @y) {
-  -webkit-transform: translate(@x, @y);
-      -ms-transform: translate(@x, @y); // IE9+
-          transform: translate(@x, @y);
-}
-.skew(@x; @y) {
-  -webkit-transform: skew(@x, @y);
-      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
-          transform: skew(@x, @y);
-}
-.translate3d(@x; @y; @z) {
-  -webkit-transform: translate3d(@x, @y, @z);
-          transform: translate3d(@x, @y, @z);
-}
-
-.rotateX(@degrees) {
-  -webkit-transform: rotateX(@degrees);
-      -ms-transform: rotateX(@degrees); // IE9+
-          transform: rotateX(@degrees);
-}
-.rotateY(@degrees) {
-  -webkit-transform: rotateY(@degrees);
-      -ms-transform: rotateY(@degrees); // IE9+
-          transform: rotateY(@degrees);
-}
-.perspective(@perspective) {
-  -webkit-perspective: @perspective;
-     -moz-perspective: @perspective;
-          perspective: @perspective;
-}
-.perspective-origin(@perspective) {
-  -webkit-perspective-origin: @perspective;
-     -moz-perspective-origin: @perspective;
-          perspective-origin: @perspective;
-}
-.transform-origin(@origin) {
-  -webkit-transform-origin: @origin;
-     -moz-transform-origin: @origin;
-          transform-origin: @origin;
-}
-
-// Animations
-.animation(@animation) {
-  -webkit-animation: @animation;
-          animation: @animation;
-}
-
-// Backface visibility
-// Prevent browsers from flickering when using CSS 3D transforms.
-// Default value is `visible`, but can be changed to `hidden`
-.backface-visibility(@visibility){
-  -webkit-backface-visibility: @visibility;
-     -moz-backface-visibility: @visibility;
-          backface-visibility: @visibility;
-}
-
-// Box sizing
-.box-sizing(@boxmodel) {
-  -webkit-box-sizing: @boxmodel;
-     -moz-box-sizing: @boxmodel;
-          box-sizing: @boxmodel;
-}
-
-// User select
-// For selecting text on the page
-.user-select(@select) {
-  -webkit-user-select: @select;
-     -moz-user-select: @select;
-      -ms-user-select: @select; // IE10+
-       -o-user-select: @select;
-          user-select: @select;
-}
-
-// Resize anything
-.resizable(@direction) {
-  resize: @direction; // Options: horizontal, vertical, both
-  overflow: auto; // Safari fix
-}
-
-// CSS3 Content Columns
-.content-columns(@column-count; @column-gap: @grid-gutter-width) {
-  -webkit-column-count: @column-count;
-     -moz-column-count: @column-count;
-          column-count: @column-count;
-  -webkit-column-gap: @column-gap;
-     -moz-column-gap: @column-gap;
-          column-gap: @column-gap;
-}
-
-// Optional hyphenation
-.hyphens(@mode: auto) {
-  word-wrap: break-word;
-  -webkit-hyphens: @mode;
-     -moz-hyphens: @mode;
-      -ms-hyphens: @mode; // IE10+
-       -o-hyphens: @mode;
-          hyphens: @mode;
-}
-
-// Opacity
-.opacity(@opacity) {
-  opacity: @opacity;
-  // IE8 filter
-  @opacity-ie: (@opacity * 100);
-  filter: ~"alpha(opacity=@{opacity-ie})";
-}
-
-
-
-// GRADIENTS
-// --------------------------------------------------
-
-#gradient {
-
-  // Horizontal gradient, from left to right
-  //
-  // Creates two color stops, start and end, by specifying a color and position for each color stop.
-  // Color stops are not available in IE9 and below.
-  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
-    background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+
-    background-image:  linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
-    background-repeat: repeat-x;
-    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
-  }
-
-  // Vertical gradient, from top to bottom
-  //
-  // Creates two color stops, start and end, by specifying a color and position for each color stop.
-  // Color stops are not available in IE9 and below.
-  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
-    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+
-    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
-    background-repeat: repeat-x;
-    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
-  }
-
-  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
-    background-repeat: repeat-x;
-    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
-    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
-  }
-  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
-    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
-    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
-    background-repeat: no-repeat;
-    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
-  }
-  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
-    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
-    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
-    background-repeat: no-repeat;
-    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
-  }
-  .radial(@inner-color: #555; @outer-color: #333) {
-    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
-    background-image: radial-gradient(circle, @inner-color, @outer-color);
-    background-repeat: no-repeat;
-  }
-  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
-    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
-    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
-  }
-}
-
-// Reset filters for IE
-//
-// When you need to remove a gradient background, do not forget to use this to reset
-// the IE filter for IE9 and below.
-.reset-filter() {
-  filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
-}
-
-
-
-// Retina images
-//
-// Short retina mixin for setting background-image and -size
-
-.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
-  background-image: url("@{file-1x}");
-
-  @media
-  only screen and (-webkit-min-device-pixel-ratio: 2),
-  only screen and (   min--moz-device-pixel-ratio: 2),
-  only screen and (     -o-min-device-pixel-ratio: 2/1),
-  only screen and (        min-device-pixel-ratio: 2),
-  only screen and (                min-resolution: 192dpi),
-  only screen and (                min-resolution: 2dppx) {
-    background-image: url("@{file-2x}");
-    background-size: @width-1x @height-1x;
-  }
-}
-
-
-// Responsive image
-//
-// Keep images from scaling beyond the width of their parents.
-
-.img-responsive(@display: block;) {
-  display: @display;
-  max-width: 100%; // Part 1: Set a maximum relative to the parent
-  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
-}
-
-
-// COMPONENT MIXINS
-// --------------------------------------------------
-
-// Horizontal dividers
-// -------------------------
-// Dividers (basically an hr) within dropdowns and nav lists
-.nav-divider(@color: #e5e5e5) {
-  height: 1px;
-  margin: ((@line-height-computed / 2) - 1) 0;
-  overflow: hidden;
-  background-color: @color;
-}
-
-// Panels
-// -------------------------
-.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
-  border-color: @border;
-
-  & > .panel-heading {
-    color: @heading-text-color;
-    background-color: @heading-bg-color;
-    border-color: @heading-border;
-
-    + .panel-collapse .panel-body {
-      border-top-color: @border;
-    }
-  }
-  & > .panel-footer {
-    + .panel-collapse .panel-body {
-      border-bottom-color: @border;
-    }
-  }
-}
-
-// Alerts
-// -------------------------
-.alert-variant(@background; @border; @text-color) {
-  background-color: @background;
-  border-color: @border;
-  color: @text-color;
-
-  hr {
-    border-top-color: darken(@border, 5%);
-  }
-  .alert-link {
-    color: darken(@text-color, 10%);
-  }
-}
-
-// Tables
-// -------------------------
-.table-row-variant(@state; @background) {
-  // Exact selectors below required to override `.table-striped` and prevent
-  // inheritance to nested tables.
-  .table {
-    > thead,
-    > tbody,
-    > tfoot {
-      > tr > .@{state},
-      > .@{state} > td,
-      > .@{state} > th {
-        background-color: @background;
-      }
-    }
-  }
-
-  // Hover states for `.table-hover`
-  // Note: this is not available for cells or rows within `thead` or `tfoot`.
-  .table-hover > tbody {
-    > tr > .@{state}:hover,
-    > .@{state}:hover > td,
-    > .@{state}:hover > th {
-      background-color: darken(@background, 5%);
-    }
-  }
-}
-
-// Button variants
-// -------------------------
-// Easily pump out default styles, as well as :hover, :focus, :active,
-// and disabled options for all buttons
-.button-variant(@color; @background; @border) {
-  color: @color;
-  background-color: @background;
-  border-color: @border;
-
-  &:hover,
-  &:focus,
-  &:active,
-  &.active,
-  .open .dropdown-toggle& {
-    color: @color;
-    background-color: darken(@background, 8%);
-        border-color: darken(@border, 12%);
-  }
-  &:active,
-  &.active,
-  .open .dropdown-toggle& {
-    background-image: none;
-  }
-  &.disabled,
-  &[disabled],
-  fieldset[disabled] & {
-    &,
-    &:hover,
-    &:focus,
-    &:active,
-    &.active {
-      background-color: @background;
-          border-color: @border;
-    }
-  }
-
-  .badge {
-    color: @background;
-    background-color: #fff;
-  }
-}
-
-// Button sizes
-// -------------------------
-.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
-  padding: @padding-vertical @padding-horizontal;
-  font-size: @font-size;
-  line-height: @line-height;
-  border-radius: @border-radius;
-}
-
-// Pagination
-// -------------------------
-.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {
-  > li {
-    > a,
-    > span {
-      padding: @padding-vertical @padding-horizontal;
-      font-size: @font-size;
-    }
-    &:first-child {
-      > a,
-      > span {
-        .border-left-radius(@border-radius);
-      }
-    }
-    &:last-child {
-      > a,
-      > span {
-        .border-right-radius(@border-radius);
-      }
-    }
-  }
-}
-
-// Labels
-// -------------------------
-.label-variant(@color) {
-  background-color: @color;
-  &[href] {
-    &:hover,
-    &:focus {
-      background-color: darken(@color, 10%);
-    }
-  }
-}
-
-// Navbar vertical align
-// -------------------------
-// Vertically center elements in the navbar.
-// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
-.navbar-vertical-align(@element-height) {
-  margin-top: ((@navbar-height - @element-height) / 2);
-  margin-bottom: ((@navbar-height - @element-height) / 2);
-}
-
-// Progress bars
-// -------------------------
-.progress-bar-variant(@color) {
-  background-color: @color;
-  .progress-striped & {
-    #gradient > .striped();
-  }
-}
-
-// Responsive utilities
-// -------------------------
-// More easily include all the states for responsive-utilities.less.
-.responsive-visibility() {
-  display: block !important;
-  table&  { display: table; }
-  tr&     { display: table-row !important; }
-  th&,
-  td&     { display: table-cell !important; }
-}
-
-.responsive-invisibility() {
-    &,
-  tr&,
-  th&,
-  td& { display: none !important; }
-}
-
-
-// Grid System
-// -----------
-
-// Centered container element
-.container-fixed() {
-  margin-right: auto;
-  margin-left: auto;
-  padding-left:  (@grid-gutter-width / 2);
-  padding-right: (@grid-gutter-width / 2);
-  .clearfix();
-}
-
-// Creates a wrapper for a series of columns
-.make-row(@gutter: @grid-gutter-width) {
-  margin-left:  (@gutter / -2);
-  margin-right: (@gutter / -2);
-  .clearfix();
-}
-
-// Generate the extra small columns
-.make-xs-column(@columns; @gutter: @grid-gutter-width) {
-  position: relative;
-  float: left;
-  width: percentage((@columns / @grid-columns));
-  // Prevent columns from collapsing when empty
-  min-height: 1px;
-  // Inner gutter via padding
-  padding-left:  (@gutter / 2);
-  padding-right: (@gutter / 2);
-}
-
-// Generate the small columns
-.make-sm-column(@columns; @gutter: @grid-gutter-width) {
-  position: relative;
-  // Prevent columns from collapsing when empty
-  min-height: 1px;
-  // Inner gutter via padding
-  padding-left:  (@gutter / 2);
-  padding-right: (@gutter / 2);
-
-  // Calculate width based on number of columns available
-  @media (min-width: @screen-sm-min) {
-    float: left;
-    width: percentage((@columns / @grid-columns));
-  }
-}
-
-// Generate the small column offsets
-.make-sm-column-offset(@columns) {
-  @media (min-width: @screen-sm-min) {
-    margin-left: percentage((@columns / @grid-columns));
-  }
-}
-.make-sm-column-push(@columns) {
-  @media (min-width: @screen-sm-min) {
-    left: percentage((@columns / @grid-columns));
-  }
-}
-.make-sm-column-pull(@columns) {
-  @media (min-width: @screen-sm-min) {
-    right: percentage((@columns / @grid-columns));
-  }
-}
-
-// Generate the medium columns
-.make-md-column(@columns; @gutter: @grid-gutter-width) {
-  position: relative;
-  // Prevent columns from collapsing when empty
-  min-height: 1px;
-  // Inner gutter via padding
-  padding-left:  (@gutter / 2);
-  padding-right: (@gutter / 2);
-
-  // Calculate width based on number of columns available
-  @media (min-width: @screen-md-min) {
-    float: left;
-    width: percentage((@columns / @grid-columns));
-  }
-}
-
-// Generate the medium column offsets
-.make-md-column-offset(@columns) {
-  @media (min-width: @screen-md-min) {
-    margin-left: percentage((@columns / @grid-columns));
-  }
-}
-.make-md-column-push(@columns) {
-  @media (min-width: @screen-md) {
-    left: percentage((@columns / @grid-columns));
-  }
-}
-.make-md-column-pull(@columns) {
-  @media (min-width: @screen-md-min) {
-    right: percentage((@columns / @grid-columns));
-  }
-}
-
-// Generate the large columns
-.make-lg-column(@columns; @gutter: @grid-gutter-width) {
-  position: relative;
-  // Prevent columns from collapsing when empty
-  min-height: 1px;
-  // Inner gutter via padding
-  padding-left:  (@gutter / 2);
-  padding-right: (@gutter / 2);
-
-  // Calculate width based on number of columns available
-  @media (min-width: @screen-lg-min) {
-    float: left;
-    width: percentage((@columns / @grid-columns));
-  }
-}
-
-// Generate the large column offsets
-.make-lg-column-offset(@columns) {
-  @media (min-width: @screen-lg-min) {
-    margin-left: percentage((@columns / @grid-columns));
-  }
-}
-.make-lg-column-push(@columns) {
-  @media (min-width: @screen-lg-min) {
-    left: percentage((@columns / @grid-columns));
-  }
-}
-.make-lg-column-pull(@columns) {
-  @media (min-width: @screen-lg-min) {
-    right: percentage((@columns / @grid-columns));
-  }
-}
-
-
-// Framework grid generation
-//
-// Used only by Bootstrap to generate the correct number of grid classes given
-// any value of `@grid-columns`.
-
-.make-grid-columns() {
-  // Common styles for all sizes of grid columns, widths 1-12
-  .col(@index) when (@index = 1) { // initial
-    @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
-    .col(@index + 1, @item);
-  }
-  .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
-    @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
-    .col(@index + 1, ~"@{list}, @{item}");
-  }
-  .col(@index, @list) when (@index > @grid-columns) { // terminal
-    @{list} {
-      position: relative;
-      // Prevent columns from collapsing when empty
-      min-height: 1px;
-      // Inner gutter via padding
-      padding-left:  (@grid-gutter-width / 2);
-      padding-right: (@grid-gutter-width / 2);
-    }
-  }
-  .col(1); // kickstart it
-}
-
-.make-grid-columns-float(@class) {
-  .col(@index) when (@index = 1) { // initial
-    @item: ~".col-@{class}-@{index}";
-    .col(@index + 1, @item);
-  }
-  .col(@index, @list) when (@index =< @grid-columns) { // general
-    @item: ~".col-@{class}-@{index}";
-    .col(@index + 1, ~"@{list}, @{item}");
-  }
-  .col(@index, @list) when (@index > @grid-columns) { // terminal
-    @{list} {
-      float: left;
-    }
-  }
-  .col(1); // kickstart it
-}
-
-.calc-grid(@index, @class, @type) when (@type = width) and (@index > 0) {
-  .col-@{class}-@{index} {
-    width: percentage((@index / @grid-columns));
-  }
-}
-.calc-grid(@index, @class, @type) when (@type = push) {
-  .col-@{class}-push-@{index} {
-    left: percentage((@index / @grid-columns));
-  }
-}
-.calc-grid(@index, @class, @type) when (@type = pull) {
-  .col-@{class}-pull-@{index} {
-    right: percentage((@index / @grid-columns));
-  }
-}
-.calc-grid(@index, @class, @type) when (@type = offset) {
-  .col-@{class}-offset-@{index} {
-    margin-left: percentage((@index / @grid-columns));
-  }
-}
-
-// Basic looping in LESS
-.make-grid(@index, @class, @type) when (@index >= 0) {
-  .calc-grid(@index, @class, @type);
-  // next iteration
-  .make-grid(@index - 1, @class, @type);
-}
-
-
-// Form validation states
-//
-// Used in forms.less to generate the form validation CSS for warnings, errors,
-// and successes.
-
-.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
-  // Color the label and help text
-  .help-block,
-  .control-label,
-  .radio,
-  .checkbox,
-  .radio-inline,
-  .checkbox-inline  {
-    color: @text-color;
-  }
-  // Set the border and box shadow on specific inputs to match
-  .form-control {
-    border-color: @border-color;
-    .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
-    &:focus {
-      border-color: darken(@border-color, 10%);
-      @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
-      .box-shadow(@shadow);
-    }
-  }
-  // Set validation states also for addons
-  .input-group-addon {
-    color: @text-color;
-    border-color: @border-color;
-    background-color: @background-color;
-  }
-}
-
-// Form control focus state
-//
-// Generate a customized focus state and for any input with the specified color,
-// which defaults to the `@input-focus-border` variable.
-//
-// We highly encourage you to not customize the default value, but instead use
-// this to tweak colors on an as-needed basis. This aesthetic change is based on
-// WebKit's default styles, but applicable to a wider range of browsers. Its
-// usability and accessibility should be taken into account with any change.
-//
-// Example usage: change the default blue border and shadow to white for better
-// contrast against a dark gray background.
-
-.form-control-focus(@color: @input-border-focus) {
-  @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
-  &:focus {
-    border-color: @color;
-    outline: 0;
-    .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
-  }
-}
-
-// Form control sizing
-//
-// Relative text size, padding, and border-radii changes for form controls. For
-// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
-// element gets special love because it's special, and that's a fact!
-
-.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
-  height: @input-height;
-  padding: @padding-vertical @padding-horizontal;
-  font-size: @font-size;
-  line-height: @line-height;
-  border-radius: @border-radius;
-
-  select& {
-    height: @input-height;
-    line-height: @input-height;
-  }
-
-  textarea& {
-    height: auto;
-  }
-}
+@import "mixins/hide-text.less";
+@import "mixins/opacity.less";
+@import "mixins/image.less";
+@import "mixins/labels.less";
+@import "mixins/reset-filter.less";
+@import "mixins/resize.less";
+@import "mixins/responsive-visibility.less";
+@import "mixins/size.less";
+@import "mixins/tab-focus.less";
+@import "mixins/reset-text.less";
+@import "mixins/text-emphasis.less";
+@import "mixins/text-overflow.less";
+@import "mixins/vendor-prefixes.less";
+
+// Components
+@import "mixins/alerts.less";
+@import "mixins/buttons.less";
+@import "mixins/panels.less";
+@import "mixins/pagination.less";
+@import "mixins/list-group.less";
+@import "mixins/nav-divider.less";
+@import "mixins/forms.less";
+@import "mixins/progress-bar.less";
+@import "mixins/table-row.less";
+
+// Skins
+@import "mixins/background-variant.less";
+@import "mixins/border-radius.less";
+@import "mixins/gradients.less";
+
+// Layout
+@import "mixins/clearfix.less";
+@import "mixins/center-block.less";
+@import "mixins/nav-vertical-align.less";
+@import "mixins/grid-framework.less";
+@import "mixins/grid.less";

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/alerts.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/alerts.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/alerts.less
new file mode 100755
index 0000000..396196f
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/alerts.less
@@ -0,0 +1,14 @@
+// Alerts
+
+.alert-variant(@background; @border; @text-color) {
+  background-color: @background;
+  border-color: @border;
+  color: @text-color;
+
+  hr {
+    border-top-color: darken(@border, 5%);
+  }
+  .alert-link {
+    color: darken(@text-color, 10%);
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/background-variant.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/background-variant.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/background-variant.less
new file mode 100755
index 0000000..a85c22b
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/background-variant.less
@@ -0,0 +1,9 @@
+// Contextual backgrounds
+
+.bg-variant(@color) {
+  background-color: @color;
+  a&:hover,
+  a&:focus {
+    background-color: darken(@color, 10%);
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/border-radius.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/border-radius.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/border-radius.less
new file mode 100755
index 0000000..ca05dbf
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/border-radius.less
@@ -0,0 +1,18 @@
+// Single side border-radius
+
+.border-top-radius(@radius) {
+  border-top-right-radius: @radius;
+   border-top-left-radius: @radius;
+}
+.border-right-radius(@radius) {
+  border-bottom-right-radius: @radius;
+     border-top-right-radius: @radius;
+}
+.border-bottom-radius(@radius) {
+  border-bottom-right-radius: @radius;
+   border-bottom-left-radius: @radius;
+}
+.border-left-radius(@radius) {
+  border-bottom-left-radius: @radius;
+     border-top-left-radius: @radius;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/buttons.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/buttons.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/buttons.less
new file mode 100755
index 0000000..b294d8c
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/buttons.less
@@ -0,0 +1,65 @@
+// Button variants
+//
+// Easily pump out default styles, as well as :hover, :focus, :active,
+// and disabled options for all buttons
+
+.button-variant(@color; @background; @border) {
+  color: @color;
+  background-color: @background;
+  border-color: @border;
+
+  &:focus,
+  &.focus {
+    color: @color;
+    background-color: darken(@background, 10%);
+        border-color: darken(@border, 25%);
+  }
+  &:hover {
+    color: @color;
+    background-color: darken(@background, 10%);
+        border-color: darken(@border, 12%);
+  }
+  &:active,
+  &.active,
+  .open > .dropdown-toggle& {
+    color: @color;
+    background-color: darken(@background, 10%);
+        border-color: darken(@border, 12%);
+
+    &:hover,
+    &:focus,
+    &.focus {
+      color: @color;
+      background-color: darken(@background, 17%);
+          border-color: darken(@border, 25%);
+    }
+  }
+  &:active,
+  &.active,
+  .open > .dropdown-toggle& {
+    background-image: none;
+  }
+  &.disabled,
+  &[disabled],
+  fieldset[disabled] & {
+    &:hover,
+    &:focus,
+    &.focus {
+      background-color: @background;
+          border-color: @border;
+    }
+  }
+
+  .badge {
+    color: @background;
+    background-color: @color;
+  }
+}
+
+// Button sizes
+.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
+  padding: @padding-vertical @padding-horizontal;
+  font-size: @font-size;
+  line-height: @line-height;
+  border-radius: @border-radius;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/center-block.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/center-block.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/center-block.less
new file mode 100755
index 0000000..d18d6de
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/center-block.less
@@ -0,0 +1,7 @@
+// Center-align a block level element
+
+.center-block() {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/clearfix.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/clearfix.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/clearfix.less
new file mode 100755
index 0000000..3f7a382
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/clearfix.less
@@ -0,0 +1,22 @@
+// Clearfix
+//
+// For modern browsers
+// 1. The space content is one way to avoid an Opera bug when the
+//    contenteditable attribute is included anywhere else in the document.
+//    Otherwise it causes space to appear at the top and bottom of elements
+//    that are clearfixed.
+// 2. The use of `table` rather than `block` is only necessary if using
+//    `:before` to contain the top-margins of child elements.
+//
+// Source: http://nicolasgallagher.com/micro-clearfix-hack/
+
+.clearfix() {
+  &:before,
+  &:after {
+    content: " "; // 1
+    display: table; // 2
+  }
+  &:after {
+    clear: both;
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/forms.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/forms.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/forms.less
new file mode 100755
index 0000000..6f55ed9
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/forms.less
@@ -0,0 +1,85 @@
+// Form validation states
+//
+// Used in forms.less to generate the form validation CSS for warnings, errors,
+// and successes.
+
+.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
+  // Color the label and help text
+  .help-block,
+  .control-label,
+  .radio,
+  .checkbox,
+  .radio-inline,
+  .checkbox-inline,
+  &.radio label,
+  &.checkbox label,
+  &.radio-inline label,
+  &.checkbox-inline label  {
+    color: @text-color;
+  }
+  // Set the border and box shadow on specific inputs to match
+  .form-control {
+    border-color: @border-color;
+    .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
+    &:focus {
+      border-color: darken(@border-color, 10%);
+      @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
+      .box-shadow(@shadow);
+    }
+  }
+  // Set validation states also for addons
+  .input-group-addon {
+    color: @text-color;
+    border-color: @border-color;
+    background-color: @background-color;
+  }
+  // Optional feedback icon
+  .form-control-feedback {
+    color: @text-color;
+  }
+}
+
+
+// Form control focus state
+//
+// Generate a customized focus state and for any input with the specified color,
+// which defaults to the `@input-border-focus` variable.
+//
+// We highly encourage you to not customize the default value, but instead use
+// this to tweak colors on an as-needed basis. This aesthetic change is based on
+// WebKit's default styles, but applicable to a wider range of browsers. Its
+// usability and accessibility should be taken into account with any change.
+//
+// Example usage: change the default blue border and shadow to white for better
+// contrast against a dark gray background.
+.form-control-focus(@color: @input-border-focus) {
+  @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
+  &:focus {
+    border-color: @color;
+    outline: 0;
+    .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
+  }
+}
+
+// Form control sizing
+//
+// Relative text size, padding, and border-radii changes for form controls. For
+// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
+// element gets special love because it's special, and that's a fact!
+.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
+  height: @input-height;
+  padding: @padding-vertical @padding-horizontal;
+  font-size: @font-size;
+  line-height: @line-height;
+  border-radius: @border-radius;
+
+  select& {
+    height: @input-height;
+    line-height: @input-height;
+  }
+
+  textarea&,
+  select[multiple]& {
+    height: auto;
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/gradients.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/gradients.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/gradients.less
new file mode 100755
index 0000000..0b88a89
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/gradients.less
@@ -0,0 +1,59 @@
+// Gradients
+
+#gradient {
+
+  // Horizontal gradient, from left to right
+  //
+  // Creates two color stops, start and end, by specifying a color and position for each color stop.
+  // Color stops are not available in IE9 and below.
+  .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
+    background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
+    background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12
+    background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
+    background-repeat: repeat-x;
+    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
+  }
+
+  // Vertical gradient, from top to bottom
+  //
+  // Creates two color stops, start and end, by specifying a color and position for each color stop.
+  // Color stops are not available in IE9 and below.
+  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
+    background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Safari 5.1-6, Chrome 10+
+    background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent);  // Opera 12
+    background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
+    background-repeat: repeat-x;
+    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
+  }
+
+  .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
+    background-repeat: repeat-x;
+    background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
+    background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12
+    background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
+  }
+  .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
+    background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
+    background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
+    background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
+    background-repeat: no-repeat;
+    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
+  }
+  .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
+    background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
+    background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
+    background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
+    background-repeat: no-repeat;
+    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
+  }
+  .radial(@inner-color: #555; @outer-color: #333) {
+    background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
+    background-image: radial-gradient(circle, @inner-color, @outer-color);
+    background-repeat: no-repeat;
+  }
+  .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
+    background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
+    background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
+    background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/grid-framework.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/grid-framework.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/grid-framework.less
new file mode 100755
index 0000000..8c23eed
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/grid-framework.less
@@ -0,0 +1,91 @@
+// Framework grid generation
+//
+// Used only by Bootstrap to generate the correct number of grid classes given
+// any value of `@grid-columns`.
+
+.make-grid-columns() {
+  // Common styles for all sizes of grid columns, widths 1-12
+  .col(@index) { // initial
+    @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
+    .col((@index + 1), @item);
+  }
+  .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
+    @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
+    .col((@index + 1), ~"@{list}, @{item}");
+  }
+  .col(@index, @list) when (@index > @grid-columns) { // terminal
+    @{list} {
+      position: relative;
+      // Prevent columns from collapsing when empty
+      min-height: 1px;
+      // Inner gutter via padding
+      padding-left:  ceil((@grid-gutter-width / 2));
+      padding-right: floor((@grid-gutter-width / 2));
+    }
+  }
+  .col(1); // kickstart it
+}
+
+.float-grid-columns(@class) {
+  .col(@index) { // initial
+    @item: ~".col-@{class}-@{index}";
+    .col((@index + 1), @item);
+  }
+  .col(@index, @list) when (@index =< @grid-columns) { // general
+    @item: ~".col-@{class}-@{index}";
+    .col((@index + 1), ~"@{list}, @{item}");
+  }
+  .col(@index, @list) when (@index > @grid-columns) { // terminal
+    @{list} {
+      float: left;
+    }
+  }
+  .col(1); // kickstart it
+}
+
+.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
+  .col-@{class}-@{index} {
+    width: percentage((@index / @grid-columns));
+  }
+}
+.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
+  .col-@{class}-push-@{index} {
+    left: percentage((@index / @grid-columns));
+  }
+}
+.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
+  .col-@{class}-push-0 {
+    left: auto;
+  }
+}
+.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
+  .col-@{class}-pull-@{index} {
+    right: percentage((@index / @grid-columns));
+  }
+}
+.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
+  .col-@{class}-pull-0 {
+    right: auto;
+  }
+}
+.calc-grid-column(@index, @class, @type) when (@type = offset) {
+  .col-@{class}-offset-@{index} {
+    margin-left: percentage((@index / @grid-columns));
+  }
+}
+
+// Basic looping in LESS
+.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
+  .calc-grid-column(@index, @class, @type);
+  // next iteration
+  .loop-grid-columns((@index - 1), @class, @type);
+}
+
+// Create grid for specific class
+.make-grid(@class) {
+  .float-grid-columns(@class);
+  .loop-grid-columns(@grid-columns, @class, width);
+  .loop-grid-columns(@grid-columns, @class, pull);
+  .loop-grid-columns(@grid-columns, @class, push);
+  .loop-grid-columns(@grid-columns, @class, offset);
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/grid.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/grid.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/grid.less
new file mode 100755
index 0000000..df496d0
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/grid.less
@@ -0,0 +1,122 @@
+// Grid system
+//
+// Generate semantic grid columns with these mixins.
+
+// Centered container element
+.container-fixed(@gutter: @grid-gutter-width) {
+  margin-right: auto;
+  margin-left: auto;
+  padding-left:  floor((@gutter / 2));
+  padding-right: ceil((@gutter / 2));
+  &:extend(.clearfix all);
+}
+
+// Creates a wrapper for a series of columns
+.make-row(@gutter: @grid-gutter-width) {
+  margin-left:  ceil((@gutter / -2));
+  margin-right: floor((@gutter / -2));
+  &:extend(.clearfix all);
+}
+
+// Generate the extra small columns
+.make-xs-column(@columns; @gutter: @grid-gutter-width) {
+  position: relative;
+  float: left;
+  width: percentage((@columns / @grid-columns));
+  min-height: 1px;
+  padding-left:  (@gutter / 2);
+  padding-right: (@gutter / 2);
+}
+.make-xs-column-offset(@columns) {
+  margin-left: percentage((@columns / @grid-columns));
+}
+.make-xs-column-push(@columns) {
+  left: percentage((@columns / @grid-columns));
+}
+.make-xs-column-pull(@columns) {
+  right: percentage((@columns / @grid-columns));
+}
+
+// Generate the small columns
+.make-sm-column(@columns; @gutter: @grid-gutter-width) {
+  position: relative;
+  min-height: 1px;
+  padding-left:  (@gutter / 2);
+  padding-right: (@gutter / 2);
+
+  @media (min-width: @screen-sm-min) {
+    float: left;
+    width: percentage((@columns / @grid-columns));
+  }
+}
+.make-sm-column-offset(@columns) {
+  @media (min-width: @screen-sm-min) {
+    margin-left: percentage((@columns / @grid-columns));
+  }
+}
+.make-sm-column-push(@columns) {
+  @media (min-width: @screen-sm-min) {
+    left: percentage((@columns / @grid-columns));
+  }
+}
+.make-sm-column-pull(@columns) {
+  @media (min-width: @screen-sm-min) {
+    right: percentage((@columns / @grid-columns));
+  }
+}
+
+// Generate the medium columns
+.make-md-column(@columns; @gutter: @grid-gutter-width) {
+  position: relative;
+  min-height: 1px;
+  padding-left:  (@gutter / 2);
+  padding-right: (@gutter / 2);
+
+  @media (min-width: @screen-md-min) {
+    float: left;
+    width: percentage((@columns / @grid-columns));
+  }
+}
+.make-md-column-offset(@columns) {
+  @media (min-width: @screen-md-min) {
+    margin-left: percentage((@columns / @grid-columns));
+  }
+}
+.make-md-column-push(@columns) {
+  @media (min-width: @screen-md-min) {
+    left: percentage((@columns / @grid-columns));
+  }
+}
+.make-md-column-pull(@columns) {
+  @media (min-width: @screen-md-min) {
+    right: percentage((@columns / @grid-columns));
+  }
+}
+
+// Generate the large columns
+.make-lg-column(@columns; @gutter: @grid-gutter-width) {
+  position: relative;
+  min-height: 1px;
+  padding-left:  (@gutter / 2);
+  padding-right: (@gutter / 2);
+
+  @media (min-width: @screen-lg-min) {
+    float: left;
+    width: percentage((@columns / @grid-columns));
+  }
+}
+.make-lg-column-offset(@columns) {
+  @media (min-width: @screen-lg-min) {
+    margin-left: percentage((@columns / @grid-columns));
+  }
+}
+.make-lg-column-push(@columns) {
+  @media (min-width: @screen-lg-min) {
+    left: percentage((@columns / @grid-columns));
+  }
+}
+.make-lg-column-pull(@columns) {
+  @media (min-width: @screen-lg-min) {
+    right: percentage((@columns / @grid-columns));
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/hide-text.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/hide-text.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/hide-text.less
new file mode 100755
index 0000000..2bb84a3
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/hide-text.less
@@ -0,0 +1,21 @@
+// CSS image replacement
+//
+// Heads up! v3 launched with only `.hide-text()`, but per our pattern for
+// mixins being reused as classes with the same name, this doesn't hold up. As
+// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
+//
+// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
+
+// Deprecated as of v3.0.1 (has been removed in v4)
+.hide-text() {
+  font: ~"0/0" a;
+  color: transparent;
+  text-shadow: none;
+  background-color: transparent;
+  border: 0;
+}
+
+// New mixin to use as of v3.0.1
+.text-hide() {
+  .hide-text();
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/image.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/image.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/image.less
new file mode 100755
index 0000000..f233cb3
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/image.less
@@ -0,0 +1,33 @@
+// Image Mixins
+// - Responsive image
+// - Retina image
+
+
+// Responsive image
+//
+// Keep images from scaling beyond the width of their parents.
+.img-responsive(@display: block) {
+  display: @display;
+  max-width: 100%; // Part 1: Set a maximum relative to the parent
+  height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
+}
+
+
+// Retina image
+//
+// Short retina mixin for setting background-image and -size. Note that the
+// spelling of `min--moz-device-pixel-ratio` is intentional.
+.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
+  background-image: url("@{file-1x}");
+
+  @media
+  only screen and (-webkit-min-device-pixel-ratio: 2),
+  only screen and (   min--moz-device-pixel-ratio: 2),
+  only screen and (     -o-min-device-pixel-ratio: 2/1),
+  only screen and (        min-device-pixel-ratio: 2),
+  only screen and (                min-resolution: 192dpi),
+  only screen and (                min-resolution: 2dppx) {
+    background-image: url("@{file-2x}");
+    background-size: @width-1x @height-1x;
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/labels.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/labels.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/labels.less
new file mode 100755
index 0000000..9f7a67e
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/labels.less
@@ -0,0 +1,12 @@
+// Labels
+
+.label-variant(@color) {
+  background-color: @color;
+
+  &[href] {
+    &:hover,
+    &:focus {
+      background-color: darken(@color, 10%);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/list-group.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/list-group.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/list-group.less
new file mode 100755
index 0000000..03aa190
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/list-group.less
@@ -0,0 +1,30 @@
+// List Groups
+
+.list-group-item-variant(@state; @background; @color) {
+  .list-group-item-@{state} {
+    color: @color;
+    background-color: @background;
+
+    a&,
+    button& {
+      color: @color;
+
+      .list-group-item-heading {
+        color: inherit;
+      }
+
+      &:hover,
+      &:focus {
+        color: @color;
+        background-color: darken(@background, 5%);
+      }
+      &.active,
+      &.active:hover,
+      &.active:focus {
+        color: #fff;
+        background-color: @color;
+        border-color: @color;
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/nav-divider.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/nav-divider.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/nav-divider.less
new file mode 100755
index 0000000..feb1e9e
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/nav-divider.less
@@ -0,0 +1,10 @@
+// Horizontal dividers
+//
+// Dividers (basically an hr) within dropdowns and nav lists
+
+.nav-divider(@color: #e5e5e5) {
+  height: 1px;
+  margin: ((@line-height-computed / 2) - 1) 0;
+  overflow: hidden;
+  background-color: @color;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/nav-vertical-align.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/nav-vertical-align.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/nav-vertical-align.less
new file mode 100755
index 0000000..d458c78
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/nav-vertical-align.less
@@ -0,0 +1,9 @@
+// Navbar vertical align
+//
+// Vertically center elements in the navbar.
+// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
+
+.navbar-vertical-align(@element-height) {
+  margin-top: ((@navbar-height - @element-height) / 2);
+  margin-bottom: ((@navbar-height - @element-height) / 2);
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/opacity.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/opacity.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/opacity.less
new file mode 100755
index 0000000..33ed25c
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/opacity.less
@@ -0,0 +1,8 @@
+// Opacity
+
+.opacity(@opacity) {
+  opacity: @opacity;
+  // IE8 filter
+  @opacity-ie: (@opacity * 100);
+  filter: ~"alpha(opacity=@{opacity-ie})";
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/pagination.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/pagination.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/pagination.less
new file mode 100755
index 0000000..618804f
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/pagination.less
@@ -0,0 +1,24 @@
+// Pagination
+
+.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
+  > li {
+    > a,
+    > span {
+      padding: @padding-vertical @padding-horizontal;
+      font-size: @font-size;
+      line-height: @line-height;
+    }
+    &:first-child {
+      > a,
+      > span {
+        .border-left-radius(@border-radius);
+      }
+    }
+    &:last-child {
+      > a,
+      > span {
+        .border-right-radius(@border-radius);
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/panels.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/panels.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/panels.less
new file mode 100755
index 0000000..49ee10d
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/panels.less
@@ -0,0 +1,24 @@
+// Panels
+
+.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
+  border-color: @border;
+
+  & > .panel-heading {
+    color: @heading-text-color;
+    background-color: @heading-bg-color;
+    border-color: @heading-border;
+
+    + .panel-collapse > .panel-body {
+      border-top-color: @border;
+    }
+    .badge {
+      color: @heading-bg-color;
+      background-color: @heading-text-color;
+    }
+  }
+  & > .panel-footer {
+    + .panel-collapse > .panel-body {
+      border-bottom-color: @border;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/progress-bar.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/progress-bar.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/progress-bar.less
new file mode 100755
index 0000000..f07996a
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/progress-bar.less
@@ -0,0 +1,10 @@
+// Progress bars
+
+.progress-bar-variant(@color) {
+  background-color: @color;
+
+  // Deprecated parent class requirement as of v3.2.0
+  .progress-striped & {
+    #gradient > .striped();
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/reset-filter.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/reset-filter.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/reset-filter.less
new file mode 100755
index 0000000..68cdb5e
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/reset-filter.less
@@ -0,0 +1,8 @@
+// Reset filters for IE
+//
+// When you need to remove a gradient background, do not forget to use this to reset
+// the IE filter for IE9 and below.
+
+.reset-filter() {
+  filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/reset-text.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/reset-text.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/reset-text.less
new file mode 100755
index 0000000..58dd4d1
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/reset-text.less
@@ -0,0 +1,18 @@
+.reset-text() {
+  font-family: @font-family-base;
+  // We deliberately do NOT reset font-size.
+  font-style: normal;
+  font-weight: normal;
+  letter-spacing: normal;
+  line-break: auto;
+  line-height: @line-height-base;
+  text-align: left; // Fallback for where `start` is not supported
+  text-align: start;
+  text-decoration: none;
+  text-shadow: none;
+  text-transform: none;
+  white-space: normal;
+  word-break: normal;
+  word-spacing: normal;
+  word-wrap: normal;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/resize.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/resize.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/resize.less
new file mode 100755
index 0000000..3acd3af
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/resize.less
@@ -0,0 +1,6 @@
+// Resize anything
+
+.resizable(@direction) {
+  resize: @direction; // Options: horizontal, vertical, both
+  overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/responsive-visibility.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/responsive-visibility.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/responsive-visibility.less
new file mode 100755
index 0000000..ecf1e97
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/responsive-visibility.less
@@ -0,0 +1,15 @@
+// Responsive utilities
+
+//
+// More easily include all the states for responsive-utilities.less.
+.responsive-visibility() {
+  display: block !important;
+  table&  { display: table !important; }
+  tr&     { display: table-row !important; }
+  th&,
+  td&     { display: table-cell !important; }
+}
+
+.responsive-invisibility() {
+  display: none !important;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/size.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/size.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/size.less
new file mode 100755
index 0000000..a8be650
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/size.less
@@ -0,0 +1,10 @@
+// Sizing shortcuts
+
+.size(@width; @height) {
+  width: @width;
+  height: @height;
+}
+
+.square(@size) {
+  .size(@size; @size);
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/tab-focus.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/tab-focus.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/tab-focus.less
new file mode 100755
index 0000000..d12d236
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/tab-focus.less
@@ -0,0 +1,9 @@
+// WebKit-style focus
+
+.tab-focus() {
+  // WebKit-specific. Other browsers will keep their default outline style.
+  // (Initially tried to also force default via `outline: initial`,
+  // but that seems to erroneously remove the outline in Firefox altogether.)
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/table-row.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/table-row.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/table-row.less
new file mode 100755
index 0000000..0f287f1
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/table-row.less
@@ -0,0 +1,28 @@
+// Tables
+
+.table-row-variant(@state; @background) {
+  // Exact selectors below required to override `.table-striped` and prevent
+  // inheritance to nested tables.
+  .table > thead > tr,
+  .table > tbody > tr,
+  .table > tfoot > tr {
+    > td.@{state},
+    > th.@{state},
+    &.@{state} > td,
+    &.@{state} > th {
+      background-color: @background;
+    }
+  }
+
+  // Hover states for `.table-hover`
+  // Note: this is not available for cells or rows within `thead` or `tfoot`.
+  .table-hover > tbody > tr {
+    > td.@{state}:hover,
+    > th.@{state}:hover,
+    &.@{state}:hover > td,
+    &:hover > .@{state},
+    &.@{state}:hover > th {
+      background-color: darken(@background, 5%);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/text-emphasis.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/text-emphasis.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/text-emphasis.less
new file mode 100755
index 0000000..9e8a77a
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/text-emphasis.less
@@ -0,0 +1,9 @@
+// Typography
+
+.text-emphasis-variant(@color) {
+  color: @color;
+  a&:hover,
+  a&:focus {
+    color: darken(@color, 10%);
+  }
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/text-overflow.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/text-overflow.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/text-overflow.less
new file mode 100755
index 0000000..c11ad2f
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/text-overflow.less
@@ -0,0 +1,8 @@
+// Text overflow
+// Requires inline-block or block for proper styling
+
+.text-overflow() {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/vendor-prefixes.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/vendor-prefixes.less b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/vendor-prefixes.less
new file mode 100755
index 0000000..2b5e74b
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/mixins/vendor-prefixes.less
@@ -0,0 +1,227 @@
+// Vendor Prefixes
+//
+// All vendor mixins are deprecated as of v3.2.0 due to the introduction of
+// Autoprefixer in our Gruntfile. They have been removed in v4.
+
+// - Animations
+// - Backface visibility
+// - Box shadow
+// - Box sizing
+// - Content columns
+// - Hyphens
+// - Placeholder text
+// - Transformations
+// - Transitions
+// - User Select
+
+
+// Animations
+.animation(@animation) {
+  -webkit-animation: @animation;
+       -o-animation: @animation;
+          animation: @animation;
+}
+.animation-name(@name) {
+  -webkit-animation-name: @name;
+          animation-name: @name;
+}
+.animation-duration(@duration) {
+  -webkit-animation-duration: @duration;
+          animation-duration: @duration;
+}
+.animation-timing-function(@timing-function) {
+  -webkit-animation-timing-function: @timing-function;
+          animation-timing-function: @timing-function;
+}
+.animation-delay(@delay) {
+  -webkit-animation-delay: @delay;
+          animation-delay: @delay;
+}
+.animation-iteration-count(@iteration-count) {
+  -webkit-animation-iteration-count: @iteration-count;
+          animation-iteration-count: @iteration-count;
+}
+.animation-direction(@direction) {
+  -webkit-animation-direction: @direction;
+          animation-direction: @direction;
+}
+.animation-fill-mode(@fill-mode) {
+  -webkit-animation-fill-mode: @fill-mode;
+          animation-fill-mode: @fill-mode;
+}
+
+// Backface visibility
+// Prevent browsers from flickering when using CSS 3D transforms.
+// Default value is `visible`, but can be changed to `hidden`
+
+.backface-visibility(@visibility) {
+  -webkit-backface-visibility: @visibility;
+     -moz-backface-visibility: @visibility;
+          backface-visibility: @visibility;
+}
+
+// Drop shadows
+//
+// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
+// supported browsers that have box shadow capabilities now support it.
+
+.box-shadow(@shadow) {
+  -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
+          box-shadow: @shadow;
+}
+
+// Box sizing
+.box-sizing(@boxmodel) {
+  -webkit-box-sizing: @boxmodel;
+     -moz-box-sizing: @boxmodel;
+          box-sizing: @boxmodel;
+}
+
+// CSS3 Content Columns
+.content-columns(@column-count; @column-gap: @grid-gutter-width) {
+  -webkit-column-count: @column-count;
+     -moz-column-count: @column-count;
+          column-count: @column-count;
+  -webkit-column-gap: @column-gap;
+     -moz-column-gap: @column-gap;
+          column-gap: @column-gap;
+}
+
+// Optional hyphenation
+.hyphens(@mode: auto) {
+  word-wrap: break-word;
+  -webkit-hyphens: @mode;
+     -moz-hyphens: @mode;
+      -ms-hyphens: @mode; // IE10+
+       -o-hyphens: @mode;
+          hyphens: @mode;
+}
+
+// Placeholder text
+.placeholder(@color: @input-color-placeholder) {
+  // Firefox
+  &::-moz-placeholder {
+    color: @color;
+    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
+  }
+  &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
+  &::-webkit-input-placeholder  { color: @color; } // Safari and Chrome
+}
+
+// Transformations
+.scale(@ratio) {
+  -webkit-transform: scale(@ratio);
+      -ms-transform: scale(@ratio); // IE9 only
+       -o-transform: scale(@ratio);
+          transform: scale(@ratio);
+}
+.scale(@ratioX; @ratioY) {
+  -webkit-transform: scale(@ratioX, @ratioY);
+      -ms-transform: scale(@ratioX, @ratioY); // IE9 only
+       -o-transform: scale(@ratioX, @ratioY);
+          transform: scale(@ratioX, @ratioY);
+}
+.scaleX(@ratio) {
+  -webkit-transform: scaleX(@ratio);
+      -ms-transform: scaleX(@ratio); // IE9 only
+       -o-transform: scaleX(@ratio);
+          transform: scaleX(@ratio);
+}
+.scaleY(@ratio) {
+  -webkit-transform: scaleY(@ratio);
+      -ms-transform: scaleY(@ratio); // IE9 only
+       -o-transform: scaleY(@ratio);
+          transform: scaleY(@ratio);
+}
+.skew(@x; @y) {
+  -webkit-transform: skewX(@x) skewY(@y);
+      -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
+       -o-transform: skewX(@x) skewY(@y);
+          transform: skewX(@x) skewY(@y);
+}
+.translate(@x; @y) {
+  -webkit-transform: translate(@x, @y);
+      -ms-transform: translate(@x, @y); // IE9 only
+       -o-transform: translate(@x, @y);
+          transform: translate(@x, @y);
+}
+.translate3d(@x; @y; @z) {
+  -webkit-transform: translate3d(@x, @y, @z);
+          transform: translate3d(@x, @y, @z);
+}
+.rotate(@degrees) {
+  -webkit-transform: rotate(@degrees);
+      -ms-transform: rotate(@degrees); // IE9 only
+       -o-transform: rotate(@degrees);
+          transform: rotate(@degrees);
+}
+.rotateX(@degrees) {
+  -webkit-transform: rotateX(@degrees);
+      -ms-transform: rotateX(@degrees); // IE9 only
+       -o-transform: rotateX(@degrees);
+          transform: rotateX(@degrees);
+}
+.rotateY(@degrees) {
+  -webkit-transform: rotateY(@degrees);
+      -ms-transform: rotateY(@degrees); // IE9 only
+       -o-transform: rotateY(@degrees);
+          transform: rotateY(@degrees);
+}
+.perspective(@perspective) {
+  -webkit-perspective: @perspective;
+     -moz-perspective: @perspective;
+          perspective: @perspective;
+}
+.perspective-origin(@perspective) {
+  -webkit-perspective-origin: @perspective;
+     -moz-perspective-origin: @perspective;
+          perspective-origin: @perspective;
+}
+.transform-origin(@origin) {
+  -webkit-transform-origin: @origin;
+     -moz-transform-origin: @origin;
+      -ms-transform-origin: @origin; // IE9 only
+          transform-origin: @origin;
+}
+
+
+// Transitions
+
+.transition(@transition) {
+  -webkit-transition: @transition;
+       -o-transition: @transition;
+          transition: @transition;
+}
+.transition-property(@transition-property) {
+  -webkit-transition-property: @transition-property;
+          transition-property: @transition-property;
+}
+.transition-delay(@transition-delay) {
+  -webkit-transition-delay: @transition-delay;
+          transition-delay: @transition-delay;
+}
+.transition-duration(@transition-duration) {
+  -webkit-transition-duration: @transition-duration;
+          transition-duration: @transition-duration;
+}
+.transition-timing-function(@timing-function) {
+  -webkit-transition-timing-function: @timing-function;
+          transition-timing-function: @timing-function;
+}
+.transition-transform(@transition) {
+  -webkit-transition: -webkit-transform @transition;
+     -moz-transition: -moz-transform @transition;
+       -o-transition: -o-transform @transition;
+          transition: transform @transition;
+}
+
+
+// User select
+// For selecting text on the page
+
+.user-select(@select) {
+  -webkit-user-select: @select;
+     -moz-user-select: @select;
+      -ms-user-select: @select; // IE10+
+          user-select: @select;
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/modals.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/modals.less b/jspwiki-war/src/main/styles/haddock/bootstrap/modals.less
index 4e2b6da..767ce36 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/modals.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/modals.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Modals
 // --------------------------------------------------
@@ -35,21 +15,29 @@
 // Container that the modal scrolls within
 .modal {
   display: none;
-  overflow: auto;
-  overflow-y: scroll;
+  overflow: hidden;
   position: fixed;
   top: 0;
   right: 0;
   bottom: 0;
   left: 0;
-  z-index: @zindex-modal-background;
+  z-index: @zindex-modal;
+  -webkit-overflow-scrolling: touch;
+
+  // Prevent Chrome on Windows from adding a focus outline. For details, see
+  // https://github.com/twbs/bootstrap/pull/10951.
+  outline: 0;
 
   // When fading in the modal, animate it to slide down
   &.fade .modal-dialog {
     .translate(0, -25%);
     .transition-transform(~"0.3s ease-out");
   }
-  &.in .modal-dialog { .translate(0, 0)}
+  &.in .modal-dialog { .translate(0, 0) }
+}
+.modal-open .modal {
+  overflow-x: hidden;
+  overflow-y: auto;
 }
 
 // Shell div to position the modal with bottom padding
@@ -57,7 +45,6 @@
   position: relative;
   width: auto;
   margin: 10px;
-  z-index: (@zindex-modal-background + 10);
 }
 
 // Actual modal
@@ -70,7 +57,7 @@
   .box-shadow(0 3px 9px rgba(0,0,0,.5));
   background-clip: padding-box;
   // Remove focus outline from opened modal
-  outline: none;
+  outline: 0;
 }
 
 // Modal background
@@ -80,11 +67,11 @@
   right: 0;
   bottom: 0;
   left: 0;
-  z-index: (@zindex-modal-background - 10);
+  z-index: @zindex-modal-background;
   background-color: @modal-backdrop-bg;
   // Fade for backdrop
   &.fade { .opacity(0); }
-  &.in { .opacity(.5); }
+  &.in { .opacity(@modal-backdrop-opacity); }
 }
 
 // Modal header
@@ -92,7 +79,7 @@
 .modal-header {
   padding: @modal-title-padding;
   border-bottom: 1px solid @modal-header-border-color;
-  min-height: (@modal-title-padding + @modal-title-line-height);
+  &:extend(.clearfix all);
 }
 // Close icon
 .modal-header .close {
@@ -114,11 +101,10 @@
 
 // Footer (for actions)
 .modal-footer {
-  margin-top: 15px;
-  padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding;
+  padding: @modal-inner-padding;
   text-align: right; // right align buttons
   border-top: 1px solid @modal-footer-border-color;
-  .clearfix(); // clear it in case folks use .pull-* classes on buttons
+  &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
 
   // Properly space out buttons
   .btn + .btn {
@@ -135,15 +121,30 @@
   }
 }
 
-// Scale up the modal
-@media screen and (min-width: @screen-sm-min) {
+// Measure scrollbar width for padding body during modal show/hide
+.modal-scrollbar-measure {
+  position: absolute;
+  top: -9999px;
+  width: 50px;
+  height: 50px;
+  overflow: scroll;
+}
 
+// Scale up the modal
+@media (min-width: @screen-sm-min) {
+  // Automatically set modal's width for larger viewports
   .modal-dialog {
-    width: 600px;
+    width: @modal-md;
     margin: 30px auto;
   }
   .modal-content {
     .box-shadow(0 5px 15px rgba(0,0,0,.5));
   }
 
+  // Modal sizes
+  .modal-sm { width: @modal-sm; }
+}
+
+@media (min-width: @screen-md-min) {
+  .modal-lg { width: @modal-lg; }
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/navbar.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/navbar.less b/jspwiki-war/src/main/styles/haddock/bootstrap/navbar.less
index b17969e..6d751bb 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/navbar.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/navbar.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Navbars
 // --------------------------------------------------
@@ -35,7 +15,7 @@
   border: 1px solid transparent;
 
   // Prevent floats from breaking the navbar
-  .clearfix();
+  &:extend(.clearfix all);
 
   @media (min-width: @grid-float-breakpoint) {
     border-radius: @navbar-border-radius;
@@ -49,7 +29,7 @@
 // styling of responsive aspects.
 
 .navbar-header {
-  .clearfix();
+  &:extend(.clearfix all);
 
   @media (min-width: @grid-float-breakpoint) {
     float: left;
@@ -68,13 +48,12 @@
 // content for the user's viewport.
 
 .navbar-collapse {
-  max-height: 340px;
   overflow-x: visible;
   padding-right: @navbar-padding-horizontal;
   padding-left:  @navbar-padding-horizontal;
   border-top: 1px solid transparent;
   box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
-  .clearfix();
+  &:extend(.clearfix all);
   -webkit-overflow-scrolling: touch;
 
   &.in {
@@ -108,19 +87,33 @@
   }
 }
 
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  .navbar-collapse {
+    max-height: @navbar-collapse-max-height;
+
+    @media (max-device-width: @screen-xs-min) and (orientation: landscape) {
+      max-height: 200px;
+    }
+  }
+}
+
 
 // Both navbar header and collapse
 //
 // When a container is present, change the behavior of the header and collapse.
 
-.container > .navbar-header,
-.container > .navbar-collapse {
-  margin-right: -@navbar-padding-horizontal;
-  margin-left:  -@navbar-padding-horizontal;
+.container,
+.container-fluid {
+  > .navbar-header,
+  > .navbar-collapse {
+    margin-right: -@navbar-padding-horizontal;
+    margin-left:  -@navbar-padding-horizontal;
 
-  @media (min-width: @grid-float-breakpoint) {
-    margin-right: 0;
-    margin-left:  0;
+    @media (min-width: @grid-float-breakpoint) {
+      margin-right: 0;
+      margin-left:  0;
+    }
   }
 }
 
@@ -172,14 +165,20 @@
   padding: @navbar-padding-vertical @navbar-padding-horizontal;
   font-size: @font-size-large;
   line-height: @line-height-computed;
+  height: @navbar-height;
 
   &:hover,
   &:focus {
     text-decoration: none;
   }
 
+  > img {
+    display: block;
+  }
+
   @media (min-width: @grid-float-breakpoint) {
-    .navbar > .container & {
+    .navbar > .container &,
+    .navbar > .container-fluid & {
       margin-left: -@navbar-padding-horizontal;
     }
   }
@@ -202,6 +201,12 @@
   border: 1px solid transparent;
   border-radius: @border-radius-base;
 
+  // We remove the `outline` here, but later compensate by attaching `:hover`
+  // styles to `:focus`.
+  &:focus {
+    outline: 0;
+  }
+
   // Bars
   .icon-bar {
     display: block;
@@ -221,7 +226,7 @@
 
 // Navbar nav links
 //
-// Builds on top of the `.nav` components with it's own modifier class to make
+// Builds on top of the `.nav` components with its own modifier class to make
 // the nav the full height of the horizontal nav (above 768px).
 
 .navbar-nav {
@@ -269,26 +274,10 @@
         padding-bottom: @navbar-padding-vertical;
       }
     }
-
-    &.navbar-right:last-child {
-      margin-right: -@navbar-padding-horizontal;
-    }
   }
 }
 
 
-// Component alignment
-//
-// Repurpose the pull utilities as their own navbar utilities to avoid specificity
-// issues with parents and chaining. Only do this when the navbar is uncollapsed
-// though so that navbar contents properly stack and align in mobile.
-
-@media (min-width: @grid-float-breakpoint) {
-  .navbar-left  { .pull-left(); }
-  .navbar-right { .pull-right(); }
-}
-
-
 // Navbar form
 //
 // Extension of the `.form-inline` with some extra flavor for optimum display in
@@ -309,6 +298,10 @@
   .form-group {
     @media (max-width: @grid-float-breakpoint-max) {
       margin-bottom: 5px;
+
+      &:last-child {
+        margin-bottom: 0;
+      }
     }
   }
 
@@ -324,11 +317,6 @@
     padding-top: 0;
     padding-bottom: 0;
     .box-shadow(none);
-
-    // Outdent the form if last child to line up with content down the page
-    &.navbar-right:last-child {
-      margin-right: -@navbar-padding-horizontal;
-    }
   }
 }
 
@@ -342,16 +330,11 @@
 }
 // Menu position and menu caret support for dropups via extra dropup class
 .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+  margin-bottom: 0;
+  .border-top-radius(@navbar-border-radius);
   .border-bottom-radius(0);
 }
 
-// Right aligned menus need alt position
-.navbar-nav.pull-right > li > .dropdown-menu,
-.navbar-nav > li > .dropdown-menu.pull-right {
-  left: auto;
-  right: 0;
-}
-
 
 // Buttons in navbars
 //
@@ -380,14 +363,31 @@
     float: left;
     margin-left: @navbar-padding-horizontal;
     margin-right: @navbar-padding-horizontal;
+  }
+}
 
-    // Outdent the form if last child to line up with content down the page
-    &.navbar-right:last-child {
+
+// Component alignment
+//
+// Repurpose the pull utilities as their own navbar utilities to avoid specificity
+// issues with parents and chaining. Only do this when the navbar is uncollapsed
+// though so that navbar contents properly stack and align in mobile.
+//
+// Declared after the navbar components to ensure more specificity on the margins.
+
+@media (min-width: @grid-float-breakpoint) {
+  .navbar-left  { .pull-left(); }
+  .navbar-right {
+    .pull-right();
+    margin-right: -@navbar-padding-horizontal;
+
+    ~ .navbar-right {
       margin-right: 0;
     }
   }
 }
 
+
 // Alternate navbars
 // --------------------------------------------------
 
@@ -508,6 +508,20 @@
     }
   }
 
+  .btn-link {
+    color: @navbar-default-link-color;
+    &:hover,
+    &:focus {
+      color: @navbar-default-link-hover-color;
+    }
+    &[disabled],
+    fieldset[disabled] & {
+      &:hover,
+      &:focus {
+        color: @navbar-default-link-disabled-color;
+      }
+    }
+  }
 }
 
 // Inverse navbar
@@ -629,4 +643,18 @@
     }
   }
 
+  .btn-link {
+    color: @navbar-inverse-link-color;
+    &:hover,
+    &:focus {
+      color: @navbar-inverse-link-hover-color;
+    }
+    &[disabled],
+    fieldset[disabled] & {
+      &:hover,
+      &:focus {
+        color: @navbar-inverse-link-disabled-color;
+      }
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/navs.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/navs.less b/jspwiki-war/src/main/styles/haddock/bootstrap/navs.less
index 11c85fe..a3d11b1 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/navs.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/navs.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Navs
 // --------------------------------------------------
@@ -30,7 +10,7 @@
   margin-bottom: 0;
   padding-left: 0; // Override default ul/ol
   list-style: none;
-  .clearfix();
+  &:extend(.clearfix all);
 
   > li {
     position: relative;
@@ -56,7 +36,7 @@
         color: @nav-disabled-link-hover-color;
         text-decoration: none;
         background-color: transparent;
-        cursor: not-allowed;
+        cursor: @cursor-disabled;
       }
     }
   }
@@ -111,7 +91,7 @@
       }
     }
 
-    // Active state, and it's :hover to override normal :hover
+    // Active state, and its :hover to override normal :hover
     &.active > a {
       &,
       &:hover,
@@ -182,7 +162,7 @@
 
   > li {
     float: none;
-     > a {
+    > a {
       text-align: center;
       margin-bottom: 5px;
     }


[6/7] jspwiki git commit: Various HADDOCK updates & fixes

Posted by br...@apache.org.
http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki-edit/Undoable.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Undoable.js b/jspwiki-war/src/main/scripts/wiki-edit/Undoable.js
index 8adf99b..047739c 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Undoable.js
+++ b/jspwiki-war/src/main/scripts/wiki-edit/Undoable.js
@@ -23,10 +23,9 @@ Class: UndoRedo
     Abstract class implements a simple undo/redo stack to save and restore
     the state of an "undo-able" object.
     The object needs to provide a {{getState()}} and a {{putState(obj)}} methods.
-    Prior to any changes, it should fire a "berforChange" event.
+    Prior to any changes, it should fire a "beforeChange" event.
     The undo and redo event trigger the corresponding actions.
 
-
 Options:
     maxundo - integer , maximal size of the undo and redo stack (default 20)
     redo - (optional) DOM element, will get a click handler to the redo() function
@@ -70,7 +69,7 @@ function swap(from, to){
 
     if( from[0] ){
 
-        to.push( this.getState() ); //current state
+        to[to.length] = this.getState(); //current state
         this.putState( from.pop() ); //new state
 
     }
@@ -102,7 +101,7 @@ this.Undoable = new Class({
 
                 //console.log("Undoable beforeChange:", undo.length);
 
-                undo.push( state || self.getState() );
+                undo[undo.length]= state || self.getState();
                 self.redo = [];
 
                 if( undo[maxundo] ){ undo.shift(); }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js b/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js
index 88e8a30..52ca266 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js
+++ b/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Edit.js
@@ -23,7 +23,7 @@ Class: Wiki.Edit
     Wiki.Edit implements the JSPWiki plain editor, with support
     for JSPWIki's markup, suggestion popups, ajax based page preview, etc...
 
-    It uses an enhanced textarea based on the [Snipe] class.
+    It uses [Snipe] to enhance the plain textarea.
 */
 
 /*eslint-env browser*/
@@ -31,199 +31,207 @@ Class: Wiki.Edit
 
 !function( wiki ){
 
-var editform,
-    textarea,
-    snipe,
-    preview,
-    previewcache,
-    isLivePreview,
-    sectionsDropDown;
 
-wiki.add("#editform", function( element ){
+wiki.add("textarea#editorarea", function( main ){
 
-    editform = element;
-    textarea = getFormElement(".editor");
-    preview = getFormElement(".ajaxpreview");
-    isLivePreview = getFormElement("[data-cmd=livepreview]") || {};
+    var form = main.form, snipe, preview;
 
-    onbeforeunload( );
+    function getFormElem( selector ){  return form.getElement( selector );  }
 
-    if(!textarea) return;
+    onbeforeunload( window, main );
 
-    snipe = new Snipe( textarea, {
+    if( snipe = getFormElem("textarea.snipeable") ){
 
-        container: editform,
-        undoBtns: {
-            undo: getFormElement("[data-cmd=undo]"),
-            redo: getFormElement("[data-cmd=redo]")
-        },
-        snippets: wiki.Snips,
-        directsnips: wiki.DirectSnips,
-        onChange: livepreview.debounce(500)
+        snipe = new Snipe( snipe, {
+            container: form,
+            undoBtns: {
+                undo: getFormElem("[data-cmd=undo]"),
+                redo: getFormElem("[data-cmd=redo]")
+            },
+            snippets: wiki.Snips,
+            directsnips: wiki.DirectSnips
+        });
 
-    });
+        wiki.configPrefs(form, function(cmd, isChecked){
+            snipe.set(cmd, isChecked);
+        });
 
-    if( sectionsDropDown = getFormElement(".sections") ){
+        if( preview = getFormElem(".ajaxpreview") ){
 
-        new Snipe.Sections( sectionsDropDown, {
-           snipe: snipe,
-           parser: jspwikiSectionParser  //callback
+            snipe.addEvent("change", livepreview.pass([
+                preview,
+                getFormElem("[data-cmd=livepreview]") || {}
+            ], snipe));
+
+        }
+
+        new Snipe.Sections( snipe, {
+            main: main,
+            menu: getFormElem(".sections > ul"),
+            parser: jspwikiSectionParser
         });
+
     }
 
-    wiki.configPrefs( editform, function(cmd, isChecked){
-        snipe.set(cmd, isChecked); //and snipe will fire the change event
-    });
+});
 
-    wiki.resizer( snipe.toElement(), function(h){ preview.setStyle("height", h); });
 
-});
+/*
+Function: onbeforeunload
+    Install an onbeforeunload handler, which is called prior to unloading the page.
+    The user will get a warning in case the textarea was changed, without saving.
 
+    The onbeforeunload handler then gets removed on regular exit of the page.
 
-    /*
-    Function: getFormElement
-        Helper function : lookup first matching descendant DOM element from the editform
-    */
-    function getFormElement( selector ){
+*/
+function onbeforeunload( window, main ){
 
-        return editform.getElement( selector );
+    window.onbeforeunload = function(){
 
-    }
+        if( main.value != main.defaultValue ){
+
+            return "edit.areyousure".localize();
+
+        }
+    };
+
+    main.form.addEvent("submit", function(){
 
-    /*
-    Function: onbeforeunload
-        Install an onbeforeunload handler, which is called ""before"" the page unloads.
-        The user gets a warning in case the textarea was changed, without saving.
+        window.onbeforeunload = null;
 
-        The onbeforeunload handler then gets removed on regular exit of the page.
+    });
+}
 
-        wiki.editOBU(textarea);
 
-    */
-    function onbeforeunload( ){
+   /*
+Function: livepreview
+    Linked as onChange handler to Snipe.
+    Make AJAX call to the wiki server to convert the contents of the textarea
+    (wiki markup) to HTML.
+*/
 
-        window.onbeforeunload = function(){
+function livepreview(preview, previewToggle){
 
-            if( textarea.value != textarea.defaultValue ){
+    var content = this.get("value").trim(),
+        isEmpty = content == "",
+        name, link;
 
-                return "edit.areyousure".localize();
+    //console.log("**** change event", new Date().getSeconds() );
 
-            }
-        };
+    function updateWiki( hasBeenUpdated ){
 
-        editform.addEvent("submit", function(){
-            window.onbeforeunload = null;
-        });
-    }
+        preview.ifClass(!hasBeenUpdated, "loading");
+        if( hasBeenUpdated ){ wiki.update(); }
 
+    }
 
-   /*
-    Function: livepreview
-        Linked as onChange handler to the SnipEditor.
-        Make AJAX call to the backend to convert the contents of the textarea
-        (wiki markup) to HTML.
-        TODO: should work bothways. wysiwyg <-> wikimarkup
+    if( !previewToggle.checked ){
 
-    */
-    function livepreview( ){
+        //reset the preview area
+        if( preview.cache ){
+            preview.empty();
+            preview.cache = null;
+        }
 
-        var text = snipe.toElement().get("value"),
-            loading = "loading";
+    } else if( preview.cache != content ){
 
-        console.log("**** change event", new Date().getSeconds() );
+        preview.cache = content;
 
-        if( !isLivePreview.checked ){
+        preview.ifClass( isEmpty, "empty" );
 
-            //cleanup the preview area
-            console.log("cleanup");
-            if( previewcache ){
-                preview.empty();
-                previewcache = null;
-            }
+        if( isEmpty ){
 
-        } else if( previewcache != text ){
+            preview.innerHTML =  "preview.zone".localize();
+            return;
 
-            previewcache = text;
-            //return preview.set("html",preview.get("html")+" Lorem ipsum"); //test code
+        }
 
-            //console.log("**** invoke Request.HTML ",previewcache, wiki.XHRPreview)
-            new Request.HTML({
-                url: wiki.XHRPreview,
-                data: {
-                    page: wiki.PageName,
-                    wikimarkup: text
-                },
-                update: preview,
-                onRequest: function(){ preview.addClass(loading); },
-                onComplete: function(){
+        if( wiki.Context == "comment" ){
 
-                    preview.removeClass(loading);
-                    wiki.update();
+            name = $("authorname").value || wiki.UserName || "AnonymousCoward";
+            link = $("link").value;
+            if( link ){ name = "[{0}|{1}]".xsubs(name, link); }
 
-                }
-            }).send();
+            //add the comment signature to the preview;  simulating Comment.jsp
+            content += "\n\n%%signature\n{0}, [\\{CurrentTimePlugin}]\n/%\n".xsubs( name );
 
         }
-    }
 
-    /*
-    Function: jspwikiSectionParser
-        Convert a jspwiki-markup page into an array of page sections.
-        Sections are marked by jspwiki headers:  !, !!  or !!!
+        //return preview.set("html",preview.get("html")+" Lorem ipsum"); //test code
+
+        //console.log("**** invoke Request.HTML ",previewcache, wiki.XHRPreview)
+        new Request.HTML({
+            url: wiki.XHRPreview,
+            data: {
+                page: wiki.PageName,
+                wikimarkup: content
+            },
+            update: preview,
+            onRequest: updateWiki,
+            onComplete: updateWiki.pass(true)
 
-        This function is used as a callback for [Snip.Sections]
+        }).send();
+
+    }
+}
 
-    Returns:
-        This function returns a array of objects [{title, start, depth}]
-        title - (string) plain title of the section (no wiki markup)
-        start - (number) offset within the text string where this section starts
-        depth - (number) nesting level of the section 0,1...n
-    */
-    function jspwikiSectionParser( text ){
+/*
+Function: jspwikiSectionParser
+    Convert a jspwiki-markup page into an array of page sections.
+    Sections are marked by jspwiki headers:  !, !!  or !!!
 
-        var result = [],
-            DELIM = "\u00a4",
+    This function is used as a callback for [Snip.Sections]
 
-            tt = text
+Returns:
+    This function returns a array of objects [{title, start, depth}]
+    title - (string) plain title of the section (no wiki markup)
+    start - (number) offset within the text string where this section starts
+    depth - (number) nesting level of the section 0,1...n
+*/
+function jspwikiSectionParser( text ){
 
-                // mask confusing header markup inside a {{{ ... }}} but keep length of the text unchanged!
-                .replace(/\{\{\{([\s\S]*?)\}\}\}/g, function(match){
-                    return match.replace( /^!/mg, " " );
-                })
+    var result = [],
+        DELIM = "\u00a4",
 
-                // break string up into array of headers and section-bodies :
-                // [0] : text prior to the first header
-                // [1,odd] : header markup !, !! or !!!
-                // [2,even] : remainder of the section, starting with header title
-                .replace( /^([!]{1,3})/mg, DELIM + "$1" + DELIM )
+        tt = text
 
-                .split(DELIM),
+            // mask confusing header markup inside a {{{ ... }}} but keep length of the text unchanged!
+            .replace(/\{\{\{([\s\S]*?)\}\}\}/g, function(match){
+                return match.replace( /^!/mg, " " );
+            })
 
-            pos = tt.shift().length,  //get length of the first element, prior to first section
-            count = tt.length,
-            i, hlen, title;
+            // break string up into array of headers and section-bodies :
+            // [0] : text prior to the first header
+            // [1,odd] : header markup !, !! or !!!
+            // [2,even] : remainder of the section, starting with header title
+            .replace( /^([!]{1,3})/mg, DELIM + "$1" + DELIM )
 
-        for( i = 0; i < count; i = i + 2 ){
+            .split(DELIM),
 
-            hlen = tt[i].length;
-            //take first line
-            title = tt[i + 1].split(/[\r\n]/)[0]
+        pos = tt.shift().length,  //get length of the first element, prior to first section
+        count = tt.length,
+        i, hlen, title;
 
-                //remove unescaped(~) inline wiki markup __,"",{{,}}, %%(*), /%
-                .replace(/(^|[^~])(__|""|\{\{|\}\}|%%\([^\)]+\)|%%\S+\s|%%\([^\)]+\)|\/%)/g, "$1")
+    for( i = 0; i < count; i = i + 2 ){
 
-                //and remove wiki-markup escape chars ~
-                .replace(/~([^~])/g, "$1");
+        hlen = tt[i].length;
+        //take first line
+        title = tt[i + 1].split(/[\r\n]/)[0]
 
-            //depth: convert length of header markup (!!!,!!,!) into #depth-level:  3,2,1 => 0,1,2
-            result.push({ title: title, start: pos, depth: 3 - hlen });
-            pos += hlen + tt[i + 1].length;
+            //remove unescaped(~) inline wiki markup __,"",{{,}}, %%(*), /%
+            .replace(/(^|[^~])(__|""|\{\{|\}\}|%%\([^\)]+\)|%%\S+\s|%%\([^\)]+\)|\/%)/g, "$1")
 
-        }
+            //and remove wiki-markup escape chars ~
+            .replace(/~([^~])/g, "$1");
 
-        return result;
+        //depth: convert length of header markup (!!!,!!,!) into #depth-level:  3,2,1 => 0,1,2
+        result[ i/2 ] = { title: title, start: pos, depth: 3 - hlen };
+        pos += hlen + tt[i + 1].length;
 
     }
 
+    return result;
+
+}
 
 }( Wiki );

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js b/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js
index 917e0bc..fe1a1ce 100644
--- a/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js
+++ b/jspwiki-war/src/main/scripts/wiki-edit/Wiki.Snips.js
@@ -29,554 +29,532 @@ Wiki.DirectSnips = {
     '[' : ']',
     '{' : '}',
     "'" : {
-        snippet: "'",
-        scope: {
-            "[{" : "}]"  //plugin parameters
-          }
+    snippet: "'",
+    scope: {
+        "[{" : "}]"  //plugin parameters
+      }
     }
 };
 
 /*
 Function: snippets
 
-        Definitions for the JSPWiki editor commands.
+    Definitions for the JSPWiki editor commands.
 */
 
 Wiki.Snips = {
 
-        // Snipe predefined commands
-        find: { key: "f" },
-        undo: { event: "undo" },
-        redo: { event: "redo" },
-
-        // Configuration commands
-        wysiwyg: { event: 'config' },
-        smartpairs: { event: 'config' },
-        livepreview: { event: 'config' },
-        autosuggest: { event: 'config' },
-        tabcompletion: { event: 'config' },
-        previewcolumn: { event: 'config' },
-
-
-        // Simple shortcuts
-        br: {
-            key: "shift+enter",
-            snippet: "\\\\\n"
-        },
-        hr: "\n----\n",
-        lorem: "This is just some sample. Don\u2019t even bother reading it; you will just waste your time. Why do you keep reading? Do I have to use Lorem Ipsum to stop you? OK, here goes: Lorem ipsum dolor sit amet, consectetur adipi sicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Still reading? Gosh, you\u2019re impossible. I\u2019ll stop here to spare you.",
-        Lorem: { alias: "lorem" },
-
-
-        // simple inline tab completion commands
-        bold:   { key: "b", snippet: "__{bold}__" },
-        italic: { key: "i", snippet: "''{italic}''" },
-
-        mono:   { key: "m", snippet: "{{{monospaced text}}} " },
-        sub:    "%%sub {subscript text}/% ",
-        sup:    "%%sup {superscript text}/% ",
-        strike: "%%strike {strikethrough text}/% ",
-
-        // simple block tab completion commands
-        quote:  "\n%%quote\n{Quoted text}\n/%\n",
-        dl:     "\n;{term}:definition-text ",
-        pre:    "\n{{{\n{some preformatted block}\n}}}\n",
-        code:   "\n%%prettify \n{{{\n{/* some code block */}\n}}}\n/%\n",
-        table:  "\n||{heading-1} ||heading-2\n|cell11     |cell12\n|cell21     |cell22\n",
-        t: { alias: "table" },
-
-        me: { alias: "sign"},
-        sign: function(){
-            var name = Wiki.UserName || 'UserName';
-            return "\n\\\\ &mdash;" + name + ", "+ new Date().toISOString() + "\\\\ \n";
-        },
-
-        hDlg: {
-            suggest: { pfx:"(^|\n)([!]{1,3})$", match:"^([!]{1,3})(?:[^!])"},
-            hDlg: [Dialog.Selection, {
-                match: "=",  //exact match
-                body: {
-                    "!!!": "<span style='font-size:30px;xline-height:1;'>Header</span>",
-                    "!!": "<span style='font-size:24px;xline-height:30px;'>Title</span>",
-                    "!": "<span style='font-size:18px;xline-height:30px;'>Sub-title</span>",
-                    "{text}": "Normal Paragraph"
-                }
-            }]
-        },
-
-        now: { alias: "date" },
-        date: function( ){
-            return new Date().toISOString()+' ';
-            //return "[{Date value='" + d.toISOString() + "' }]"
-            //return "[{Date " + d.toISOString() + " }]"
-        },
-
-        tabs: {
-            nScope: {
-                "%%(":")",
-                "%%tabbedSection":"/%"
-            },
-            snippet:"%%tabbedSection \n%%tab-{tabTitle1}\ntab content 1\n/%\n%%tab-tabTitle2\ntab content 2\n/%\n/%\n "
-        },
-
-        img: "\n[{Image src='{img.jpg}' width='400px' height='300px' align='left' }]\n ",
-
-        imgSrcDlg:{
-            scope: { "[{Image":"}]" },
-            suggest: { pfx:"src='([^']*)'?$", match: "^([^']*)" },
-            imgSrcDlg: [ Dialog.Selection, {
-
-                caption: "Image Source",
-                onOpen: function( dialog ){
-
-                    var key = dialog.getValue();
-
-                    if( !key || (key.trim()=='') ){ key = Wiki.PageName + '/'; }
-
-                    Wiki.jsonrpc("/search/suggestions", [key, 30], function( result ){
-
-                        //console.log('jsonrpc result', result );
-                        if( result[1] /*length>1*/ ){
-
-                            dialog.setBody( result );
-
-                        } else {
-
-                            dialog.hide();
-
-                        }
-                    });
-                }
-            }]
-        },
-
-        imgAlignDlg: {
-            scope: { "[{Image":"}]" },
-            suggest: "align='\\w+'",
-            imgAlignDlg: "left|center|right"
+    // Snipe predefined commands
+    find: { key: "f" },
+    undo: { event: "undo" },
+    redo: { event: "redo" },
+
+    // Configuration commands
+    wysiwyg: { event: 'config' },
+    smartpairs: { event: 'config' },
+    livepreview: { event: 'config' },
+    autosuggest: { event: 'config' },
+    tabcompletion: { event: 'config' },
+    previewcolumn: { event: 'config' },
+
+
+    // Simple shortcuts
+    br: {
+        key: "shift+enter",
+        snippet: "\\\\\n"
+    },
+    hr: "\n----\n",
+    lorem: "This is just some sample. Don\u2019t even bother reading it; you will just waste your time. Why do you keep reading? Do I have to use Lorem Ipsum to stop you? OK, here goes: Lorem ipsum dolor sit amet, consectetur adipi sicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Still reading? Gosh, you\u2019re impossible. I\u2019ll stop here to spare you.",
+    Lorem: { alias: "lorem" },
+
+
+    // simple inline tab completion commands
+    bold:   { key: "b", snippet: "__{bold}__" },
+    italic: { key: "i", snippet: "''{italic}''" },
+
+    mono:   { key: "m", snippet: "{{{monospaced text}}} " },
+    sub:    "%%sub {subscript text}/% ",
+    sup:    "%%sup {superscript text}/% ",
+    strike: "%%strike {strikethrough text}/% ",
+
+    // simple block tab completion commands
+    quote:  "\n%%quote\n{Quoted text}\n/%\n",
+    dl:     "\n;{term}:definition-text ",
+    def: { alias: "dl" },
+    pre:    "\n{{{\n{some preformatted block}\n}}}\n",
+    code:   "\n%%prettify \n{{{\n{/* some code block */}\n}}}\n/%\n",
+    table:  "\n||{heading-1} ||heading-2\n|cell11     |cell12\n|cell21     |cell22\n",
+
+    me: { alias: "sign"},
+    sign: function(){
+        var name = Wiki.UserName || 'UserName';
+        return "\n%%signature\n" + name + ", "+ new Date().toISOString() + "\n/%\n";
+    },
+
+    now: { alias: "date" },
+    date: function( ){
+
+        //FIXME: better use the date&time preference
+        return new Date().toISOString()+' ';
+
+        //return "[{Date value='" + d.toISOString() + "' }]"
+        //return "[{Date " + d.toISOString() + " }]"
+    },
+
+    tabs: {
+        nScope: {
+        "%%(":")",
+        "%%tabbedSection":"/%"
         },
-
-        font: {
-            nScope: { "%%(":")" },
-            snippet: "%%(font-family:{font};) body /% "
-        },
-
-        fontDlg: {
-            scope: { "%%(":")" },
-            suggest: { pfx: "font-family:([^;\\)\\n\\r]*)$", match:"^([^;\\)\\n\\r]*)" },
-            fontDlg: [Dialog.Font, {}]
+        snippet:"%%tabbedSection \n%%tab-{tabTitle1}\ntab content 1\n/%\n%%tab-tabTitle2\ntab content 2\n/%\n/%\n "
+    },
+
+    img: "\n[{Image src='{img.jpg}' width='400px' height='300px' align='left' }]\n ",
+
+    imgSrcDlg:{
+        scope: { "[{Image":"}]" },
+        suggest: { lback:"src='([^']*)'?$", match: "^([^']*)" },
+        imgSrcDlg: Wiki.pageDialog("Image", "/search/suggestions")
+    },
+
+    imgAlignDlg: {
+        scope: { "[{Image":"}]" },
+        suggest: "align='\\w+'",
+        imgAlignDlg: "left|center|right"
+    },
+
+    font: {
+        nScope: { "%%(":")" },
+        snippet: "%%(font-family:{font};) body /% "
+    },
+
+    fontDlg: {
+        scope: { "%%(":")" },
+        suggest: {
+        lback: "font-family:([^;\\)\\n\\r]*)$",
+        match:"^([^;\\)\\n\\r]*)"
         },
+        fontDlg: [Dialog.Font, {}]
+    },
 
-        color: "%%(color:{#000000}; background:#ffffff;) {some text} /%",
+    color: "%%(color:{#000000}; background:#ffffff;) ${some text} /%",
 
-        colorDlg: {
-            scope: { '%%(': ')' },
-            suggest:"#[0-9a-fA-F]{0,6}",
-            colorDlg: [ Dialog.Color , {} ]
-         },
+    colorDlg: {
+        scope: { '%%(': ')' },
+        //  /\B#(?:[0-9a-f]{3}){1,2}\b/i
+        suggest:"\B#(?:[0-9a-f]{3}){1,2}\b",
+        colorDlg: [ Dialog.Color , {} ]
+     },
 
-        symbol: { alias: "chars" },
-        chars: "&entity;",
+    symbol: { alias: "chars" },
+    chars: "&entity;",
 
-        charsDlg: {
-            suggest: '&\\w+;?',
-            charsDlg: [ Dialog.Chars, { caption:"Special Chars".localize() }]
+    charsDlg: {
+        suggest: {
+        lback: /&\w*;?$/,
+        match: /^&\w*;?/
         },
-
-        icon: "%%icon-{}search /%",
-        iconDlg: {
-            scope: { "%%":"/%" },
-            suggest: "icon-\\S*",
-            iconDlg: [Dialog.Selection, {
-                cssClass:".dialog-horizontal",
-                body:{
-                    "icon-search":"<div class='icon-search'></div>",
-                    "icon-user":"<div class='icon-user'></div>",
-                    "icon-home":"<div class='icon-home'></div>",
-                    "icon-refresh":"<div class='icon-refresh'></div>",
-                    "icon-repeat":"<div class='icon-repeat'></div>",
-                    "icon-bookmark":"<div class='icon-bookmark'></div>",
-                    "icon-tint":"<div class='icon-tint'></div>",
-                    "icon-plus":"<div class='icon-plus'></div>",
-                    "icon-external-link":"<div class='icon-external-link'></div>",
-
-                    "icon-signin":"<div class='icon-signin'></div>",
-                    "icon-signout":"<div class='icon-signout'></div>",
-                    "icon-rss":"<div class='icon-rss'></div>",
-                    "icon-wrench":"<div class='icon-wrench'></div>",
-                    "icon-filter":"<div class='icon-filter'></div>",
-                    "icon-link":"<div class='icon-link'></div>",
-                    "icon-paper-clip":"<div class='icon-paper-clip'></div>",
-                    "icon-undo":"<div class='icon-undo'></div>",
-                    "icon-euro":"<div class='icon-euro'></div>",
-                    "icon-slimbox":"<div class='icon-slimbox'></div>",
-                    "icon-picture":"<div class='icon-picture'></div>",
-                    "icon-columns":"<div class='icon-columns'></div>"
-                }
-            }]
+        dialog: [ Dialog.Chars, {
+            caption:"dialog.character.entities".localize()
+        }]
+    },
+
+    icon: "%%icon-{!search} /%",
+    iconDlg: {
+        scope: { "%%":"/%" },
+        suggest: "icon-\\S*",
+        iconDlg: [Dialog.Selection, {
+        cssClass:".dialog-horizontal",
+        body:{
+            "icon-search":"<div class='icon-search'></div>",
+            "icon-user":"<div class='icon-user'></div>",
+            "icon-home":"<div class='icon-home'></div>",
+            "icon-refresh":"<div class='icon-refresh'></div>",
+            "icon-repeat":"<div class='icon-repeat'></div>",
+            "icon-bookmark":"<div class='icon-bookmark'></div>",
+            "icon-tint":"<div class='icon-tint'></div>",
+            "icon-plus":"<div class='icon-plus'></div>",
+            "icon-external-link":"<div class='icon-external-link'></div>",
+
+            "icon-signin":"<div class='icon-signin'></div>",
+            "icon-signout":"<div class='icon-signout'></div>",
+            "icon-rss":"<div class='icon-rss'></div>",
+            "icon-wrench":"<div class='icon-wrench'></div>",
+            "icon-filter":"<div class='icon-filter'></div>",
+            "icon-link":"<div class='icon-link'></div>",
+            "icon-paper-clip":"<div class='icon-paper-clip'></div>",
+            "icon-undo":"<div class='icon-undo'></div>",
+            "icon-euro":"<div class='icon-euro'></div>",
+            "icon-slimbox":"<div class='icon-slimbox'></div>",
+            "icon-picture":"<div class='icon-picture'></div>",
+            "icon-columns":"<div class='icon-columns'></div>"
+        }
+        }]
+    },
+
+    contextText: {
+        scope: { "%%":"/%" },
+        suggest: {
+        lback: /%%text-(\w*)$/,
+        //match: "^default|success|info|warning|danger|capitalize|lowercase|uppercase|smallcaps"
+        match: /^\w*/
         },
-
-        contextText: {
-            scope: { "%%":"/%" },
-            suggest: {pfx: "%%text-(\\w*)$", match: "^default|success|info|warning|danger" },
-            contextText: [Dialog.Selection, {
-                cssClass:".dialog-horizontal",
-                body:{
-                    primary:"<span class='text-primary'>primary</span>",
-                    success:"<span class='text-success'>success</span>",
-                    info:"<span class='text-info'>info</span>",
-                    warning:"<span class='text-warning'>warning</span>",
-                    danger:"<span class='text-danger'>danger</span>"
-                }
-            }]
+        contextText: [Dialog.Selection, {
+        cssClass:".dialog-horizontal",
+        body:{
+            primary:"<span class='text-primary'>primary</span>",
+            success:"<span class='text-success'>success</span>",
+            info:"<span class='text-info'>info</span>",
+            warning:"<span class='text-warning'>warning</span>",
+            danger:"<span class='text-danger'>danger</span>",
+            "":"",
+            capitalize:"<span class='text-capitalize'>capitalize</span>",
+            lowercase:"<span class='text-lowercase'>lowercase</span>",
+            uppercase:"<span class='text-uppercase'>uppercase</span>",
+            smallcaps:"<span class='text-smallcaps'>Small Caps</span>"
+        }
+        }]
+    },
+
+    contextBG: {
+        scope: { "%%":"/%" },
+        suggest: {
+        //lback: /%%(default|success|info|warning|error)$/,
+        //match: /^\w+/
+        lback: /%%(\w*)$/,
+        match: /^(default|success|info|warning|error)/
         },
-
-        contextBG: {
-            scope: { "%%":"/%" },
-            suggest: {pfx:"%%(default|success|info|warning|error)$", match:"^default|success|info|warning|error"},
-            contextBG: [Dialog.Selection, {
-                cssClass:".dialog-horizontal",
-                body:{
-                    "default":"<span class='default'>default</span>",
-                    success:"<span class='success'>success</span>",
-                    info:"<span class='info'>info</span>",
-                    warning:"<span class='warning'>warning</span>",
-                    error:"<span class='error'>error</span>"
-                }
-            }]
+        contextBG: [Dialog.Selection, {
+        cssClass:".dialog-horizontal",
+        body:{
+            "default":"<span class='default'>default</span>",
+            success:"<span class='success'>success</span>",
+            info:"<span class='info'>info</span>",
+            warning:"<span class='warning'>warning</span>",
+            error:"<span class='error'>error</span>"
+        }
+        }]
+    },
+
+    labelDlg: {
+        scope: { "%%":"/%" },
+        suggest: {
+        lback: /%%label-(\w*)$/,
+        //match: "^default|success|info|warning|danger"
+        match: /^\w*/
         },
+        labelDlg: [Dialog.Selection, {
+        cssClass:".dialog-horizontal",
+        body:{
+            "default":"<span class='label label-default'>default</span>",
+            primary:"<span class='label label-primary'>primary</span>",
+            success:"<span class='label label-success'>success</span>",
+            info:"<span class='label label-info'>info</span>",
+            warning:"<span class='label label-warning'>warning</span>",
+            danger:"<span class='label label-danger'>danger</span>"
+        }
+        }]
+    },
+
+    listDlg: {
+        scope: { "%%list-":"/%" },
+        suggest: {lback: "list-(?:[\\w-]+-)?(\\w*)$", match: "^\\w*" },
+        listDlg: [Dialog.Selection, {
+        cssClass:".dialog-horizontal",
+        body: "nostyle|unstyled|hover|group"
+        }]
+    },
+
+    tableDlg: {
+        scope: { "%%table-":"/%" },
+        suggest: {lback: "table-(?:[\\w-]+-)?(\\w*)$", match: "^\\w*" },
+        tableDlg: [Dialog.Selection, {
+        cssClass:".dialog-horizontal",
+        body: "sort|filter|striped|bordered|hover|condensed|fit"
+        }]
+    },
+
+    cssDlg: {
+        scope: { "%%":"/%" },
+        suggest: {lback:"%%([\\da-zA-Z-_]*)$", match:"^[\\da-zA-Z-_]+"},
+        cssDlg: [Dialog.Selection, {
+        caption: "dialog.styles".localize(),
+        cssClass: ".dialog-filtered",
+        body: {
+        "(css:value;)":"any css definitions",
+        "default":"Contextual <span class='info'>backgrounds</span>",
+        "text-{default}":"Contextual colors and other text styles",
+        "label-{default}":"<span class='label label-success'>Contextual labels</span>",
+        "badge":"Badges <span class='badge'>007</span>",
+        //"btn-default":"<span class='btn btn-xs btn-default'>Buttons</span>",
+        "collapse":"<b class='bullet'></b>Collapsible lists",
+        "list-{nostyle}":"List styles",
+        "table-{fit}":"Table styles",
+        "":"",
+        "add-css":"Add CSS",
+        alert: "Alert Box",
+        "accordion\n!Tab1\n{body1}\n!Tab2\nbody2\n": "Accordion",  //leftAccordion, rightAccordion, pillsAccordion, accordion-primary...
+        category: "<span class='category-link'>Category Link</span>",
+        carousel: "Carousel viewer",
+        columns: "Multi-column layout",
+        commentbox: "Comment Box",
+        graphBar: "Graph Bars",
+        lead:"<span class='lead-item'>LEAD text</span>",
+        "pills\n!Tab1\n{body1}\n!Tab2\nbody2\n":"Pills",
+        prettify: "Prettify syntax highlighter",
+        progress:"Progress Bars",
+        quote: "<div class='quote-item'>Quoted paragraph</div>",
+        scrollable: "Scrollable <span style='font-family:monospace; white-space:pre;'>preformatted</span> block",
+        "scrollable-image": "Scrollable Wide Images",
+        //reflection: "Image with reflection",
+        "under-construction":"<span class='under-construction small' style='display:inline-block;height:auto;margin-bottom:0'/>",
+        slimbox: "Slimbox viewer <span class='icon-slimbox'></span>",
+        "tabs\n!Tab1\n{body1}\n!Tab2\nbody2\n":"Tabs",
+        viewer: "Media viewer"
+
+        //"drop-caps":"Drop Caps",
+        //xflow:"wide content with scroll bars"
+        }
+        }]
+    },
 
-        labelDlg: {
-            scope: { "%%":"/%" },
-            suggest: {pfx: "%%label-(\\w*)$", match: "^default|success|info|warning|danger" },
-            labelDlg: [Dialog.Selection, {
-                cssClass:".dialog-horizontal",
-                body:{
-                    "default":"<span class='label label-default'>default</span>",
-                    primary:"<span class='label label-primary'>primary</span>",
-                    success:"<span class='label label-success'>success</span>",
-                    info:"<span class='label label-info'>info</span>",
-                    warning:"<span class='label label-warning'>warning</span>",
-                    danger:"<span class='label label-danger'>danger</span>"
-                }
-            }]
-        },
+    link: {
+        key:'l',
+        wysiwyg:'createlink',
+        snippet: "[description|{pagename or url}|link-attributes] "
+    },
 
-        listDlg: {
-            scope: { "%%list-":"/%" },
-            suggest: {pfx: "list-(?:[\\w-]+-)?(\\w*)$", match: "^\\w*" },
-            listDlg: [Dialog.Selection, {
-                cssClass:".dialog-horizontal",
-                body: "nostyle|unstyled|hover|group"
-            }]
-        },
 
-        tableDlg: {
-            scope: { "%%table-":"/%" },
-            suggest: {pfx: "table-(?:[\\w-]+-)?(\\w*)$", match: "^\\w*" },
-            tableDlg: [Dialog.Selection, {
-                cssClass:".dialog-horizontal",
-                body: "sort|filter|striped|bordered|hover|condensed|fit"
-            }]
+    linkPart3:{
+        suggest: {
+        lback: "\\[(?:[^\\|\\]]+\\|[^\\|\\]]+\\|)([^\\|\\[\\]\\n\\r]*)$",
+        match: "^[^\\|\\]\\n\\r]*"
         },
+        linkPart3: [ Dialog.Selection, {
+
+        caption: "dialog.link.attributes".localize(),
+        body: {
+            "link-attributes": "<i>no attributes</i>",
+            //"class='category'": "<span class='category-link'>Category Link</span>",
+            "class='viewer'": "Embedded Viewer",
+            "class='slimbox'": "Add a Slimbox Link <span class='icon-slimbox'/> ",
+            "class='slimbox-link'": "Change to Slimbox Link <span class='icon-slimbox'/> ",
+            "divider1": "",
+            "class='btn btn-primary'": "Button style (normal)",
+            "class='btn btn-xs btn-primary'": "Button style (small)",
+            "divider2": "",
+            "target='_blank'": "Open link in new tab"
+        }
+        }]
 
-        cssDlg: {
-            scope: { "%%":"/%" },
-            suggest: {pfx:"%%([\\da-zA-Z-_]*)$", match:"^[\\da-zA-Z-_]+"},
-            cssDlg: {
-                "(css:value;)":"any css definitions",
-                "default":"contextual backgrounds",
-                "text-default":"contextual text color",
-                "label-default":"<span class='label label-default'>contextual labels</span>",
-                "badge":"badges <span class='badge'>13</span>",
-                //"btn-default":"<span class='btn btn-xs btn-default'>Buttons</span>",
-                "collapse":"collapsable lists",
-                "list-nostyle":"list styles",
-                //progress:"Progress Bars",
-                "table-fit":"table styles",
-                "":"",
-                "add-css":"Add CSS",
-                alert: "Alert Box",
-                accordion: "Accordion",  //leftAccordion, rightAccordion, pillsAccordion, accordion-primary...
-                category: "Category Links",
-                carousel: "Carousel",
-                columns: "Multi-column layout",
-                commentbox: "Comment Box",
-                //graphBar
-                pills:"Pills",
-                prettify: "Prettify syntax highlighter",
-                scrollable: "Scrollable Preformatted block",
-                "scrollable-image": "Scrollable Wide Images",
-                //reflection: "Image with reflection",
-                slimbox: "Slimbox Viewer <span class='icon-slimbox'></span>",
-                //"under-construction": "<div class='under-construction'> </div>",
-                tabs:"Tabs",
-                viewer: "Media Viewer"
-
-//block styles
-//                quote:"<div class='quote'>Quoted paragraph</div>",
-//                lead:"<span class='lead'>LEAD text</span>",
-//                "drop-caps":"Drop Caps",
-                //xflow:"wide content with scroll bars"
-            }
-        },
+    },
 
-        link: {
-            key:'l',
-            wysiwyg:'createlink',
-            snippet: "[description|{pagename or url}|options] "
+    linkDlg: {
+        //match [link],  do not match [{, [[
+        //do not include the [ in the matched string
+        suggest: {
+        lback: /\[([^\|\[{\]\n\r]*)$/,
+        match: /^([^\|\[{\]\n\r]*)(?:[\]\n\r])/
         },
+        linkDlg: Wiki.pageDialog("Wiki Link", "/search/suggestions")
 
+    },
 
-        linkPart3:{
-            suggest: {
-                pfx: "\\[(?:[^\\|\\]]+\\|[^\\|\\]]+\\|)([^\\|\\[\\]\\n\\r]*)$",
-                match: "^[^\\|\\]\\n\\r]*"
-            },
-            linkPart3: {
-                //"class='category'": "Category link",
-                "class='viewer'": "Embedded Viewer",
-                "class='slimbox'": "Add a Slimbox Link <span class='icon-slimbox'/> ",
-                "class='slimbox-link'": "Change to Slimbox Link <span class='icon-slimbox'/> ",
-                "divide1": "",
-                "class='btn btn-primary'": "Button style (normal)",
-                "class='btn btn-xs btn-primary'": "Button style (small)",
-                "divide2": "",
-                "target='_blank'": "Open link in new tab"
-            }
-
+    linkPart2: {
+        //match [description|link], [description|link|...
+        //do not match [{, [[
+        //do not include the [ in the matched string
+        suggest: {
+        lback: /\[(?:[^\|\]]+\|)([^\|\[{\]\n\r]*)$/,
+        match: /^([^\|\[{\]\n\r]*)(?:[\]\|\n\r])/
         },
+        linkPart2: Wiki.pageDialog("Wiki Link", "/search/suggestions")
+    },
 
-        linkDlg: {
-
-            //match [description|link], [link] or [link,  do not match [{, [[
-            //match '[' + 'any char except \n, [, { or ]' at end of the string
-            //note: do not include the [ in the matched string
-            suggest: {
-                pfx: "\\[(?:[^\\|\\]]+\\|)?([^\\|\\[{\\]\\n\\r]*)$",
-                match: "^([^\\|\\[{\\]\\n\\r]*)(?:\\]|\\|)"
-            },
-
-            linkDlg: [ Dialog.Selection, {
 
-                caption: "Wiki Link",
-                onOpen: function( dialog ){
+    variableDlg: {
+        scope:{ '[{$':'}]'},
+        suggest: "\\w+",
+        variableDlg: "applicationname|baseurl|encoding|inlinedimages|interwikilinks|jspwikiversion|loginstatus|uptime|pagename|pageprovider|pageproviderdescription|page-styles|requestcontext|totalpages|username"
+    },
 
-                    var //dialog = this,
-                        key = dialog.getValue();
+    // Page access rights
+    allow: { alias: "acl" },
+    acl: "\n[{ALLOW {permission} principal }]\n",
 
-                    //if empty link, than fetch list of attachments of this page
-                    if( !key || (key.trim()=='') ){ key = Wiki.PageName + "/"; }
+    permission: {
+        scope:{ '[{ALLOW':'}]'},
+        suggest: { lback:"ALLOW (\\w*)$", match:"^\\w+" },
+        permission: [Dialog.Selection, {
+            caption: "dialog.permission".localize(),
+            cssClass:".dialog-horizontal",
+            body:"view|edit|modify|comment|rename|upload|delete"
+        }]
+    },
+    principal: {
+        scope:{ '[{ALLOW':'}]'},
+        suggest: { lback:"ALLOW \\w+ (?:[\\w,]+,)?(\\w*)$", match:"^\\w*" },
 
-                    Wiki.jsonrpc("/search/suggestions", [key, 30], function( result ){
+        principal: [ Dialog.Selection, {
 
-                        //console.log("jsonrpc result", result );
-                        if( result[0] /* length > 0 */ ){
+        caption: "dialog.principal".localize(),
+        onOpen: function( dialog ){
 
-                            dialog.setBody( result );
+            new Request({
+            url: Wiki.XHRPreview,
+            data: { page: Wiki.PageName, wikimarkup: "[{Groups}]" },
+            onSuccess: function(responseText){
 
-                        } else {
+                var body = "Anonymous|Asserted|Authenticated|All";
+                responseText = responseText.replace( /<[^>]+>/g,'').replace(/\s*,\s*/g,'|' ).trim();
+                if(responseText != ""){ body = body + '||' + responseText; }
 
-                            dialog.hide();
+                dialog.setBody(body);
 
-                        }
-                    });
-                }
-            }]
-        },
-
-        variableDlg: {
-            scope:{ '[{$':'}]'},
-            suggest: "\\w+",
-            variableDlg: "applicationname|baseurl|encoding|inlinedimages|interwikilinks|jspwikiversion|loginstatus|uptime|pagename|pageprovider|pageproviderdescription|page-styles|requestcontext|totalpages|username"
-        },
+            }
+            }).send();
 
-        // Page access rights
-        allow: { alias: "acl" },
-        acl: "\n[{ALLOW {permission} principal }]\n",
-
-        permission: {
-            scope:{ '[{ALLOW':'}]'},
-            suggest: { pfx:"ALLOW (\\w*)$", match:"^\\w+" },
-            permission: [Dialog.Selection, {
-                cssClass:".dialog-horizontal",
-                body:"view|edit|modify|comment|rename|upload|delete"
-            }]
+        }
+        }]
+
+    },
+
+    toc: {
+        nScope: { "[{":"}]" },
+        snippet:"\n[~{TableOfContents }]\n"
+    },
+
+    tocParams: {
+        scope:{ '[{TableOfContents':'}]'},
+        suggest: "\\s",
+        tocParams: [Dialog.Selection, {
+            caption: "dialog.toc.options".localize(),
+            body:{
+            " title='{Page contents}' ":"title",
+            " numbered='true' ":"numbered",
+            " prefix='{Chap. }' ":"chapter prefix"
+            }
+        }]
+    },
+
+    plugin: "\n[{{plugin} \n{=body}\n}]\n",
+
+    pluginDlg: {
+        //match [{plugin}]  do not match [[{
+        //match '[{' + 'any char except \n, or }]' at end of the string
+        //note: do not include the [ in the matched string
+        suggest: {
+            lback: "(^|[^\\[])\\[{(\\w*)(?:\\|\\])?$",
+            //lback: "(^|[^\\[])\\[{([^\\[\\]\\n\\r]*)(?:\\|\\])?$",
+            match: "^([^\\[\\]\\n\\r]*)\\}\\]"
         },
-        principal: {
-            scope:{ '[{ALLOW':'}]'},
-            suggest: { pfx:"ALLOW \\w+ (?:[\\w,]+,)?(\\w*)$", match:"^\\w*" },
-
-            principal: [ Dialog.Selection, {
+        pluginDlg: [ Dialog.Selection, {
+        caption: "dialog.plugin".localize(),
+        body: {
+        "ALLOW {permission} principal ": "Page Access Rights <span class='icon-unlock-alt' />",
+        "SET {name}='value'":"Set a Wiki variable",
+        "${varname}":"Get a Wiki variable",
+        "If name='{value}' page='pagename' exists='true' contains='regexp'\n\nbody\n":"IF plugin",
+        "SET alias='{pagename}'":"Set Page Alias",
+        "SET page-styles='prettify-nonum table-condensed-fit'":"Set Page Styles",
+        "SET sidebar='off'":"Hide Sidebar",
+        //"Table":"Advanced Tables",
+        //"Groups":"View all Wiki Groups",
+        "":"",
+        "Counter":"Insert a simple counter",
+        "PageViewPlugin":"Count Views of this page",
+        "CurrentTimePlugin format='yyyy mmm-dd'":"Insert Current Time",
+        "Denounce":"Denounce a link",
+        "Image src='{image.jpg}'":"Insert an Image <span class='icon-picture'></span>",
+        "IndexPlugin":"Index of all pages",
+
+        "InsertPage page='{pagename}'":"Insert another Page",
+        "ListLocksPlugin":"List page locks",
+        "RecentChangesPlugin":"Displays the recent changed pages",
+        "ReferredPagesPlugin page='{pagename}' type='local|external|attachment' depth='1..8' include='regexp' exclude='regexp'":"Incoming Links (referred pages)",
+        "ReferringPagesPlugin page='{pagename}' separator=',' include='regexp' exclude='regexp'":"Outgoing Links (referring pages)",
+        "Search query='{Janne}' max='10'":"Insert a Search query",
+        "TableOfContents ":"Table Of Contents ",
+        "UndefinedPagesPlugin":"List pages that are missing",
+        "UnusedPagesPlugin":"List pages that have been orphaned",
+        "WeblogArchivePlugin":"Displays a list of older weblog entries",
+        "WeblogEntryPlugin":"Makes a new weblog entry",
+        "WeblogPlugin page='{pagename}' startDate='300604' days='30' maxEntries='30' allowComments='false'":"Builds a weblog"
+        }
+        }]
 
-                caption: "Roles, Groups or Users",
-                onOpen: function( dialog ){
+    },
 
-                    new Request({
-                        url: Wiki.XHRPreview,
-                        data: { page: Wiki.PageName, wikimarkup: "[{Groups}]" },
-                        onSuccess: function(responseText){
 
-                            var body = "Anonymous|Asserted|Authenticated|All";
-                            responseText = responseText.replace( /<[^>]+>/g,'').replace(/\s*,\s*/g,'|' ).trim();
-                            if(responseText != ""){ body = body + '||' + responseText; }
+    lipstick: {
 
-                            dialog.setBody(body);
+        key: "control+enter",
+        snippet: "{format}",
+        nscope: { "[":"]" },
 
-                        }
-                    }).send();
+        suggest: function(textarea, caret /*, fromStart*/){
 
-                }
-            }]
+            return caret.thin ? null : { lback: "", match: textarea.getSelection() };
 
+        },
 
+        lipstick: [Dialog.Selection, {
 
-        },
+        cssClass: ".dialog-horizontal",
 
-        toc: {
-            nScope: { "[{":"}]" },
-            snippet:"\n[~{TableOfContents }]\n"
-        },
+        onBeforeOpen: function( dialog ){
 
-        tocParams: {
-            scope:{ '[{TableOfContents':'}]'},
-            suggest: "\\s",
-            tocParams: [Dialog.Selection, {
-                caption: "TOC options",
-                body:{
-                " title='{Page contents}' ":"title",
-                " numbered='true' ":"numbered",
-                " prefix='{Chap. }' ":"chapter prefix"
-                }
-            }]
-        },
+            var body = {},
+            textarea = dialog.options.relativeTo,
+            caret = textarea.getSelectionRange();
 
-        plugin: "\n[{{plugin}}]\n",
-
-        pluginDlg: {
-            //match [{plugin}]  do not match [[{
-            //match '[{' + 'any char except \n, or }]' at end of the string
-            //note: do not include the [ in the matched string
-            suggest: {
-                pfx: "(^|[^\\[])\\[{(\\w*)(?:\\|\\])?$",
-                //pfx: "(^|[^\\[])\\[{([^\\[\\]\\n\\r]*)(?:\\|\\])?$",
-                match: "^([^\\[\\]\\n\\r]*)\\}\\]"
-            },
-            pluginDlg: [ Dialog.Selection, {
-                caption: "Plugin",
-                body: {
-                "ALLOW {permission} principal ": "Page Access Rights <span class='icon-unlock-alt' />",
-                "SET {name}='value'":"Set a Wiki variable",
-                "${varname}":"Get a Wiki variable",
-                "If name='{value}' page='pagename' exists='true' contains='regexp'\n\nbody\n":"IF plugin",
-                "SET alias='${pagename}'":"Set Page Alias",
-                "SET page-styles='prettify-nonum table-condensed-fit'":"Set Page Styles",
-                "SET sidebar='off'":"Hide Sidebar",
-                //"Table":"Advanced Tables",
-                //"Groups":"View all Wiki Groups",
-                "":"",
-                "Counter":"Insert a simple counter",
-                "PageViewPlugin":"Count Views of this page",
-                "CurrentTimePlugin format='yyyy mmm-dd'":"Insert Current Time",
-                "Denounce":"Denounce a link",
-                "Image src='${image.jpg}'":"Insert an Image <span class='icon-picture'></span>",
-                "IndexPlugin":"Index of all pages",
-
-                "InsertPage page='${pagename}'":"Insert another Page",
-                "ListLocksPlugin":"List page locks",
-                "RecentChangesPlugin":"Displays the recent changed pages",
-                "ReferredPagesPlugin page='{pagename}' type='local|external|attachment' depth='1..8' include='regexp' exclude='regexp'":"Incoming Links (referred pages)",
-                "ReferringPagesPlugin page='{pagename}' separator=',' include='regexp' exclude='regexp'":"Outgoing Links (referring pages)",
-                "Search query='{Janne}' max='10'":"Insert a Search query",
-                "TableOfContents ":"Table Of Contents ",
-                "UndefinedPagesPlugin":"List pages that are missing",
-                "UnusedPagesPlugin":"List pages that have been orphaned",
-                "WeblogArchivePlugin":"Displays a list of older weblog entries",
-                "WeblogEntryPlugin":"Makes a new weblog entry",
-                "WeblogPlugin page='{pagename}' startDate='300604' days='30' maxEntries='30' allowComments='false'":"Builds a weblog"
-                }
-            }]
+            if( textarea.isCaretAtStartOfLine() ){
+                Object.append(body, {
+                    "\n{!!!}": "<span title='header'>H1</span>",
+                    "\n{!!}": "<span title='title'>H2</span>",
+                    "\n{!}": "<span title='sub-title'>H3</span>",
+                    "\n* {list item}": "<span class='icon-list-ul'/>",
+                    "\n# {list-item}": "<span class='icon-list-ol'/>",
+                    "divider-sol": ""
+                });
+            }
 
-        },
+            Object.append(body, {
+                "__{bold}__": "<span style='font-family:serif;'><b>B</b></span>",
+                "''{italic}''": "<span style='font-family:serif;'><i>I</i></span>",
+                "{{{monospaced}}} ": "<tt>&lt;/&gt;</tt>",
+                "{{{{code}}}}": "<span class='small' style='font-family:monospace;'>code</span>",
+                "divider1": "",
+                "[{link}]": "<span class='icon-link'/>",
+                //"[description|{link}|options]": "<span class='icon-link'/>",
+                "[{Image src='{image.jpg}'}]": "<span class='icon-picture'/>",
+                "[{{plugin}}]": "<span class='icon-puzzle-piece'></span>",
+                "%%style {body} /%":"<span style='font-family:monospace;'>%%</span>",
+                "divider2": "",
+                "%%(font-family:{font};) body /%":"<span style='font-family:serif;'>A</span><span style='font-family:sans-serif'>a</span>",
+                "&{entity};" : "<span style='font-family:cursive;'>&amp;</span>",
+                //"%%sub {subscript}/% ": "a<span class='sub'>n</span>",
+                //"%%sup {superscript}/% ": "a<span class='sup'>m</span>",
+                //"%%strike {strikethrough}/% ":"<span class='strike'>S</span>",
+                //"divider3": "",
+                "[{ALLOW {permission} principal }]":"<span class='icon-unlock-alt'></span>",
+                "\\\\\n":"<b>&para;</b>"
+            });
+
+            if( textarea.isCaretAtStartOfLine()
+            &&  textarea.isCaretAtEndOfLine()
+            &&  textarea.slice(caret.start,caret.end-1).indexOf("\n") > -1 ){
+                Object.append(body, {
+                "divider-code": "",
+                    "\n%%prettify\n{{{\n/* code block */\n{code}\n}}}\n/%\n": "<span class='small' style='font-family:monospace;'>code block</span>",
+                    "\n%%prettify\n{{{\n{pretiffied code block}\n}}}/%\n": "<span class='small pun' style='font-family:monospace;'>prettify</span>",
+                    "\n%%scrollable\n{{{\n{code block}\n}}}/%\n": "<span class='small' style='font-family:monospace;'>scrollable-code</span>"
+                });
+            }
 
-        selectBlock: {
-            suggest: function(workarea, caret /*, fromStart*/){
-
-                var selection = workarea.getSelection();
-
-                if( !caret.thin
-                  && workarea.isCaretAtStartOfLine()
-                  && workarea.isCaretAtEndOfLine()
-                  && selection.slice(0,-1).indexOf("\n") > -1 ){
-
-                     //console.log("got block selection" );
-                     return { pfx:"", match:workarea.getSelection() }
-                }
-            },
-
-            selectBlock: [Dialog.Selection, {
-                cssClass: ".dialog-horizontal",
-                body:{
-                    "\n{{{\n{code block}\n}}}\n": "<span style='font-family:monospace;'>code</span>",
-                    "\n%%scrollable\n{{{\n{code block}\n}}}/%\n": "<span style='font-family:monospace;'>scrollable-code</span>",
-                    "\n%%prettify\n{{{\n{pretiffied code block}\n}}}/%\n": "<span class='pun' style='font-family:monospace;'>prettify</span>"
-                }
-            }]
-        },
+            dialog.setBody(body);
 
-        selectStartOfLine: {
-            suggest: function(workarea, caret/*, fromStart*/ ){
-
-                var selection = workarea.getSelection();
-
-                if( !caret.thin
-                  && workarea.isCaretAtStartOfLine()
-                  && workarea.isCaretAtEndOfLine() ){
-
-                     //console.log("got start of line selection", caret);
-                     return { pfx:"", match:selection }
-                }
-            },
-
-            selectStartOfLine: [Dialog.Selection, {
-                cssClass: ".dialog-horizontal",
-                body:{
-                    "\n!!!{header}": "H1",
-                    "\n!!{header}": "H2",
-                    "\n!{header}": "H3",
-                    "__{bold}__": "<b>bold</b>",
-                    "''{italic}''": "<i>italic</i>",
-                    "{{{monospaced text}}} ": "<tt>mono</tt>",
-                    "{{{{code}}}}\n": "<span style='font-family:monospace;'>code</span>",
-                    "[description|{link}|options]": "<span class='icon-link'/>",
-                    "[{Image src='${image.jpg}'}]": "<span class='icon-picture'/>",
-                    "\n[{{plugin}}]\n": "<span class='icon-puzzle-piece'></span>"
-                }
-            }]
-        },
-        //Commands triggered by the selection of substrings:
-        //    lowest priority vs. other snippets
-        selectInline: {
-            suggest: function(workarea, caret/*, fromStart*/ ){
-
-                if(!caret.thin){
-                     //console.log("got selection", caret);
-                     return { pfx:"", match:workarea.getSelection() }
-                }
-            },
-
-            selectInline: [Dialog.Selection, {
-                cssClass: ".dialog-horizontal",
-                body:{
-                    "__{bold}__":"<b>bold</b>",
-                    "''{italic}''":"<i>italic</i>",
-                    "{{{monospaced text}}}":"<tt>mono</tt>",
-                    "{{{{code}}}}\n": "<span style='font-family:monospace;'>code</span>",
-                    "[description|{pagename or url}|options]":"<span class='icon-link'/>",
-                    "[{Image src='{image.jpg}'}]":"<span class='icon-picture'/>"
-                }
-            }]
         }
-
+        }]
+    }
 }
-

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki/Category.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki/Category.js b/jspwiki-war/src/main/scripts/wiki/Category.js
index 805dc06..da24d8c 100644
--- a/jspwiki-war/src/main/scripts/wiki/Category.js
+++ b/jspwiki-war/src/main/scripts/wiki/Category.js
@@ -61,7 +61,9 @@ Wiki.Category = function(element, pagename, xhrURL){
             url: xhrURL, //+"?page="+pagename,
             data: { page: decodeURIComponent(pagename) },
             update: popup,
-            onSuccess: function(){ popup.swapClass("loading", "active"); }
+            onSuccess: function(){
+                popup.swapClass("loading", "active");
+            }
         }).send();
     }
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki/Recents.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki/Recents.js b/jspwiki-war/src/main/scripts/wiki/Recents.js
index e9eab57..a9624c6 100644
--- a/jspwiki-war/src/main/scripts/wiki/Recents.js
+++ b/jspwiki-war/src/main/scripts/wiki/Recents.js
@@ -109,7 +109,7 @@ Wiki.Recents = new Class({
         if( items.indexOf( value ) < 0 ){
 
             //insert new item at the start of the list, and cap list on max 10 items
-            if( items.unshift(value) > 9){ items = items.slice(0, 9); }
+            items = [value].concat( items.slice(0, 8) );
             self.fireEvent("change", [self.items = items] );
 
         }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki/Wiki.Behaviors.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki/Wiki.Behaviors.js b/jspwiki-war/src/main/scripts/wiki/Wiki.Behaviors.js
index 69320d7..3f4a65a 100644
--- a/jspwiki-war/src/main/scripts/wiki/Wiki.Behaviors.js
+++ b/jspwiki-war/src/main/scripts/wiki/Wiki.Behaviors.js
@@ -67,6 +67,27 @@ var TheSlimbox, T = TableX;
 
 
 /*
+Behavior: Broken images
+    Replace broken image browser icons
+*/
+wiki.once( "img", function(imgs){
+
+    imgs.addEvent("error", function(){
+
+        var img = $(this);
+        [ "span.danger.img-error", {
+            text: "broken.image".localize() //Broken Image!
+        }, [
+            "span", { text: img.alt || img.src }
+            ]
+        ].slick().replaces(img);
+
+    });
+
+});
+
+
+/*
 Behavior: GraphBars, Progress-bars
 
 %%progress 50 /%
@@ -88,13 +109,13 @@ wiki.add("*[class^=progress]", function(element){
         maxv = RegExp.$2;
     }
 
-    ( element.get("tag") + clazz + "-maxv" + maxv ).slick().wraps(element);
+    ( element.get("tag") + clazz + "-minv0-maxv" + maxv  ).slick().wraps(element);
     element.className = "gBar";
 
 
 /*
-%%progress-red-striped 50/%  =>  %%graphBars-progress-red-striped-maxv100 %%gBar 50/% /%
-%%progress-red-striped 50/75 /%  =>  %%graphBars-progress-red-striped-maxv75 %%gBar 50/% /%
+%%progress-red-striped 50/%  =>  %%graphBars-progress-red-striped-minv0-maxv100 %%gBar 50/% /%
+%%progress-red-striped 50/75 /%  =>  %%graphBars-progress-red-striped-minv0-maxv75 %%gBar 50/% /%
 
 */
 
@@ -207,7 +228,7 @@ Behavior: Viewer
 >     %%viewer [link to youtube, vimeo, some-wiki-page, http://some-external-site ..] /%
 >     [description | url to youtube... | class="viewer"]
 */
-    .add("a.viewer, div.viewer a", function( a ){
+    .add("a.viewer, div.viewer a, span.viewer a", function( a ){
 
         Viewer.preload(a.href, { width: 800, height: 600 }, function( element ){
 
@@ -218,6 +239,18 @@ Behavior: Viewer
 
         });
 
+    })
+    .add("div.maps, span.maps", function( map ){
+
+        var address = map.get("text").trim(),
+            url = "https://maps.google.com/maps?q=" +encodeURIComponent( address );
+
+        Viewer.preload(url, { width: 800, height: 600 }, function( element ){
+
+            element.addClass("viewport").replaces(map);
+
+        });
+
     });
 
 
@@ -278,12 +311,14 @@ function filterJSPWikiLinks(element){
         element.getElements( element.match(".slimbox-attachments") ?
             "a[href].attachment" :
             // otherwise,  catch several different cases in one go
+            //    img:not([href$=/attachment_small.png]):not(.outlink)  ::jspwiki small icons
             //    img:not([src$=/attachment_small.png]):not(.outlink)  ::jspwiki small icons
             //    a[href].attachment,
             //    a[href].external,
             //    a[href].wikipage,
             //    a[href].interwiki
-            "img:not([src$=/attachment_small.png]):not(.outlink),a[href].attachment,a[href].external,a[href].wikipage, a[href].interwiki"
+            //    .recentchanges td:not(:nth-child(3)) a:first-child
+            "img:not([href$=/attachment_small.png]):not([src$=/attachment_small.png]):not(.outlink),a[href].attachment,a[href].external,a[href].wikipage, a[href].interwiki, .recentchanges td:not(:nth-child(3n)) a:first-child"
         );
 }
 
@@ -411,7 +446,7 @@ Behavior:Columns
 
 >    %%columns(-width) .. /%
 */
-    .add( "div[class~=columns]", Columns, { prefix: "columns" } )
+    .add( "div[class^=columns]", Columns, { prefix: "columns" } )
 
 /*
 Dynamic Style: Code-Prettifier
@@ -428,18 +463,19 @@ Example:
 >    }}} /%
 
 */
-    .add("div.prettify pre, div.prettify code", function(element){
+    .add("div.prettify:not(.prettyprint) pre, div.prettify:not(.prettyprint) code", function(element){
 
         element.addClass("prettyprint");
 
         //brute-force line-number injection
-        "pre.prettylines".slick({
+        "div".slick().wraps(element).grab(
+            "pre.prettylines".slick({
 
-            html: element.innerHTML.trim().split("\n").map( function(line, i){
-                return i + 1; }
-            ).join("\n")
+                html: element.innerHTML.trim().split("\n").map( function(line, i){
+                    return i + 1; }
+                ).join("\n")
 
-        }).inject(element, "before");
+            }),"top");
 
     })
     .add("[class~=prettify-nonum] pre, [class~=prettify-nonum] code", function(element){
@@ -510,7 +546,7 @@ Behavior: Table behaviors
                 ztoa: "sort.descending"
             }, String.localize);
 
-        while( args[0] ){
+        while( args && args[0] ){
 
             arg = args.shift();
 
@@ -655,7 +691,7 @@ Behavior: DropCaps
 
         var content, node = element.firstChild;
 
-        if( node.nodeType == 3 ){   // this is a text-node
+        if( node.nodeType == 3 ){   // aha, this is a text-node
 
             content = node.textContent.trim();
             node.textContent = content.slice(1);  //remove first character
@@ -675,7 +711,6 @@ Behavior: Add-CSS
     .add(".add-css", AddCSS)
 
 
-
 /*
 Behavior: Invisibles
     Show hidden characters such as tabs and line breaks.
@@ -692,7 +727,7 @@ CSS:
 .token.lf:before { content: '\240A'; }
 (end)
 */
-    .add(".invisibles pre", function(element){
+    .add(".invisibles pre, .reveal pre", function(element){
 
         var token = "<span class='token {0}'>$&</span>";
 

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/scripts/wiki/Wiki.js
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/scripts/wiki/Wiki.js b/jspwiki-war/src/main/scripts/wiki/Wiki.js
index 841c39c..7455244 100644
--- a/jspwiki-war/src/main/scripts/wiki/Wiki.js
+++ b/jspwiki-war/src/main/scripts/wiki/Wiki.js
@@ -77,8 +77,6 @@ var Wiki = {
 
             .add( "[accesskey]", Accesskey )
 
-            //.add("input[placeholder]", function(element){ element.placeholderX(); })
-
             //toggle effect:  toggle .active class on this element when clicking toggle element
             //.add("[data-toggle]", "onToggle", {attr:"data-toggle"})
             .add( "[data-toggle]", function(element){
@@ -94,24 +92,30 @@ var Wiki = {
 
             //generate modal confirmation boxes, eg prompting to execute
             //an unrecoverable action such as deleting a page or attachment
-            //.add("[data-toggle]", "onModal", {attr:"data-modal"})
+            //.add("[data-modal]", "onModal", {attr:"data-modal"})
             .add( "[data-modal]", function(element){
                 element.onModal( element.get("data-modal") );
             })
 
-            //hover effects: show/hide this element when hovering over its parent element
+            //hover effects: show/hide this element when hovering over the parent element
             //.add("[data-toggle]", "onHover", {attr:"data-hover-parent"})
             .add( "[data-hover-parent]", function(element){
                 element.onHover( element.get("data-hover-parent") );
             })
 
+            //resize the "data-resize" elements when dragging this element
+            //.add( "[data-resize]", wiki.resizer.bind(wiki) )
+            .add( "[data-resize]", function(element){
+                wiki.resizer(element, $$(element.get("data-resize")) );
+            })
+
             //make navigation bar sticky (simulate position:sticky; )
             //.add(".sticky", "onSticky" )
             .add( ".sticky", function(element){
                 element.onSticky();
             })
 
-            //highlight previous search query in cookie or referrer page
+            //highlight previous search query retreived from a cookie or referrer page
             .add( ".page-content", function(element){
 
                 var previousQuery = "PrevQuery";
@@ -178,13 +182,18 @@ var Wiki = {
 
     caniuse: function( body ){
 
+        //Is not really needed anymore,  since we added a css "hack" to workaround an IE bug
+        //Still kept here as a placeholder for future feature-sniffing
+
+
         //Modernizr.addTest('flexbox', testAllProps('flexBasis', '1px', true));
         var hasNativeFlex = document.createElement('b');
 
         hasNativeFlex.style.cssText = "flex-basis:1px;";
-        if(!!hasNativeFlex.style.length){
+        if( hasNativeFlex.style.length ){
             body.addClass("can-flex");
-        };
+        }
+
 
     },
 
@@ -218,6 +227,7 @@ var Wiki = {
 
 
         //wiki.url = null;  //CHECK:  why this is needed?
+        //console.log( wiki.prefs.get("SectionEditing") , wiki.EditPermission ,wiki.Context );
         if( wiki.prefs.get("SectionEditing") && wiki.EditPermission && (wiki.Context != "preview") ){
 
             wiki.addEditLinks( wiki.toUrl( wiki.PageName, true ) );
@@ -337,8 +347,8 @@ var Wiki = {
 
     /*
     Function: dropdowns
-        Parse wikipages such ase MoreMenu, HomeMenu to act as bootstrap
-        compatible dropdown menu items.
+        Parse special wikipages such ase MoreMenu, HomeMenu
+        and format them as bootstrap compatible dropdown menus.
     */
     dropdowns: function(){
 
@@ -366,18 +376,18 @@ var Wiki = {
 
         /* (deprecated) "pre-HADDOCK" moremenu style
               Consists of a list of links, with \\ delimitters
-              Each <p> becomes a set of li, one for each link
-              The block is terminated with a divider, if more <p's> are coming
+              Each <p> becomes a set of <li>, one for each link
+              The block is terminated with a divider, if more <p>'s are coming
         */
         $$( "ul.dropdown-menu > li.more-menu > p" ).each( function(element){
 
             var parentLi = element.getParent();
 
             element.getElements('a').each( function(link){
-                ['li',[link]].slick().inject(parentLi, "before");
+                ["li",[link]].slick().inject(parentLi, "before");
             });
-            if( element.getNext('p *,hr') ){
-                'li.divider'.slick().inject(parentLi, "before") ;
+            if( element.getNext("p *,hr") ){
+                "li.divider".slick().inject(parentLi, "before") ;
             }
             element.dispose();
 
@@ -390,7 +400,9 @@ var Wiki = {
         Returns the list of all section headers, excluding the header of the Table Of Contents.
     */
     getSections: function(){
+
         return $$(".page-content [id^=section]:not(#section-TOC)");
+
     },
 
     /*
@@ -500,7 +512,9 @@ var Wiki = {
 
         //Persist the selected editor type in the pref cookie
         form.getElements("a.editor-type").addEvent("click", function(){
+
             wiki.prefs.set("editor", this.get("text"));
+
         });
 
     },
@@ -544,7 +558,6 @@ var Wiki = {
 
             }
         }
-
     },
 
     getXHRPreview: function( getContent, previewElement ){
@@ -575,7 +588,7 @@ var Wiki = {
     },
 
     /*
-    Function: resizer
+    Behavior: resizer
         Resize the target element, by dragging a .resizer handle.
         Multiple elements can be resized via the callback.
         The .resizer element can specify a prefs cookie to retrieve/store the height.
@@ -590,38 +603,86 @@ var Wiki = {
         textarea - resizable textarea (DOM element)
         preview - preview (DOM element)
     */
-    resizer: function( target, callback ){
+    /*
+    wiki.add(".resizer",function(element){...}
+
+
+    [data-resize] : resize target,  can be multiple elements
+
+    div.resizer[data-resize=".pagecontent"] => for add-comment sections
+    div.resizer[data-resize=".ajaxpreview,.snipeable"][data-pref=editorHeight]
+    */
+    resizer: function( handle, targets, dragCallback ){
+
+        var pref = handle.get("data-pref"),
+            prefs = this.prefs,
+            target;
 
-        var prefs = this.prefs,
-            handle = document.getElement(".resizer"),
-            pref = handle.getAttribute("data-pref"),
-            h;
+        function showDragState(add){ handle.ifClass(add, "dragging"); }
 
-        function helpdragging(add){ handle.ifClass(add, "dragging"); }
+        if( !targets[0] ){ return; }
 
-        //targets.setStyle(height, options.initial || "100%" );
+        //set the initial size of the targets
         if( pref ){
-            h = prefs.get(pref) || 300;
-            target.setStyle("height", h );
-            callback( h );
+            targets.setStyle("height", prefs.get(pref) || 300 );
         }
 
+        target = targets.pop();
+
         target.makeResizable({
             handle: handle,
             modifiers: { x: null },
             onDrag: function(){
-                h = this.value.now.y;
-                callback(h);
-                if(pref){ prefs.set(pref, h); }
+                var h = this.value.now.y;
+                if( pref ){ prefs.set(pref, h); }
+                if( targets ){ targets.setStyle("height", h); }
+                if( dragCallback ){ dragCallback(h); }
             },
-            onBeforeStart: helpdragging.pass(true),
-            onComplete: helpdragging.pass(false),
-            onCancel: helpdragging.pass(false)
+            onBeforeStart: showDragState.pass(true),
+            onComplete: showDragState.pass(false),
+            onCancel: showDragState.pass(false)
         });
 
     },
 
 
+    pageDialog: function( caption, method ){
+
+        var wiki = this;
+
+        return [ Dialog.Selection, {
+
+            caption: caption,
+
+            onOpen: function( dialog ){
+
+                var key = dialog.getValue();
+
+                //if empty link, than fetch list of attachments of the open page
+                if( !key || (key.trim()=='') ){
+
+                    key = wiki.PageName + "/";
+
+                }
+
+                wiki.jsonrpc( method, [key, 30], function( result ){
+
+                    //console.log("jsonrpc result", result, !!result[0] );
+                    if( result[0] /* length > 0 */ ){
+
+                        dialog.setBody( result );
+
+                    } else {
+
+                        dialog.hide();
+
+                    }
+                });
+            }
+        }];
+
+    },
+
     /*
     Function: jsonrpc
         Generic json-rpc routines to talk to the backend jspwiki-engine.
@@ -652,10 +713,11 @@ var Wiki = {
                 url: this.JsonUrl + method,
                 //method:"post"     //defaults to "POST"
                 //urlEncoded: true, //content-type header = www-form-urlencoded + encoding
-                //encoding: utf-8,
+                //encoding: "utf-8",
+                //encoding: "ISO-8859-1",
                 onSuccess: function( responseText ){
 
-                    //console.log(responseText, JSON.parse( responseText ) );
+                    console.log(responseText, JSON.parse( responseText ), responseText.charCodeAt(8),responseText.codePointAt(8), (encodeURIComponent(responseText)), encodeURIComponent("�"), encodeURIComponent("�")  );
                     callback( JSON.parse( responseText ) )
 
                 },

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/.csscomb.json
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/.csscomb.json b/jspwiki-war/src/main/styles/haddock/bootstrap/.csscomb.json
new file mode 100755
index 0000000..40695a4
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/.csscomb.json
@@ -0,0 +1,304 @@
+{
+  "always-semicolon": true,
+  "block-indent": 2,
+  "color-case": "lower",
+  "color-shorthand": true,
+  "element-case": "lower",
+  "eof-newline": true,
+  "leading-zero": false,
+  "remove-empty-rulesets": true,
+  "space-after-colon": 1,
+  "space-after-combinator": 1,
+  "space-before-selector-delimiter": 0,
+  "space-between-declarations": "\n",
+  "space-after-opening-brace": "\n",
+  "space-before-closing-brace": "\n",
+  "space-before-colon": 0,
+  "space-before-combinator": 1,
+  "space-before-opening-brace": 1,
+  "strip-spaces": true,
+  "unitless-zero": true,
+  "vendor-prefix-align": true,
+  "sort-order": [
+    [
+      "position",
+      "top",
+      "right",
+      "bottom",
+      "left",
+      "z-index",
+      "display",
+      "float",
+      "width",
+      "min-width",
+      "max-width",
+      "height",
+      "min-height",
+      "max-height",
+      "-webkit-box-sizing",
+      "-moz-box-sizing",
+      "box-sizing",
+      "-webkit-appearance",
+      "padding",
+      "padding-top",
+      "padding-right",
+      "padding-bottom",
+      "padding-left",
+      "margin",
+      "margin-top",
+      "margin-right",
+      "margin-bottom",
+      "margin-left",
+      "overflow",
+      "overflow-x",
+      "overflow-y",
+      "-webkit-overflow-scrolling",
+      "-ms-overflow-x",
+      "-ms-overflow-y",
+      "-ms-overflow-style",
+      "clip",
+      "clear",
+      "font",
+      "font-family",
+      "font-size",
+      "font-style",
+      "font-weight",
+      "font-variant",
+      "font-size-adjust",
+      "font-stretch",
+      "font-effect",
+      "font-emphasize",
+      "font-emphasize-position",
+      "font-emphasize-style",
+      "font-smooth",
+      "-webkit-hyphens",
+      "-moz-hyphens",
+      "hyphens",
+      "line-height",
+      "color",
+      "text-align",
+      "-webkit-text-align-last",
+      "-moz-text-align-last",
+      "-ms-text-align-last",
+      "text-align-last",
+      "text-emphasis",
+      "text-emphasis-color",
+      "text-emphasis-style",
+      "text-emphasis-position",
+      "text-decoration",
+      "text-indent",
+      "text-justify",
+      "text-outline",
+      "-ms-text-overflow",
+      "text-overflow",
+      "text-overflow-ellipsis",
+      "text-overflow-mode",
+      "text-shadow",
+      "text-transform",
+      "text-wrap",
+      "-webkit-text-size-adjust",
+      "-ms-text-size-adjust",
+      "letter-spacing",
+      "-ms-word-break",
+      "word-break",
+      "word-spacing",
+      "-ms-word-wrap",
+      "word-wrap",
+      "-moz-tab-size",
+      "-o-tab-size",
+      "tab-size",
+      "white-space",
+      "vertical-align",
+      "list-style",
+      "list-style-position",
+      "list-style-type",
+      "list-style-image",
+      "pointer-events",
+      "-ms-touch-action",
+      "touch-action",
+      "cursor",
+      "visibility",
+      "zoom",
+      "flex-direction",
+      "flex-order",
+      "flex-pack",
+      "flex-align",
+      "table-layout",
+      "empty-cells",
+      "caption-side",
+      "border-spacing",
+      "border-collapse",
+      "content",
+      "quotes",
+      "counter-reset",
+      "counter-increment",
+      "resize",
+      "-webkit-user-select",
+      "-moz-user-select",
+      "-ms-user-select",
+      "-o-user-select",
+      "user-select",
+      "nav-index",
+      "nav-up",
+      "nav-right",
+      "nav-down",
+      "nav-left",
+      "background",
+      "background-color",
+      "background-image",
+      "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
+      "filter:progid:DXImageTransform.Microsoft.gradient",
+      "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
+      "filter",
+      "background-repeat",
+      "background-attachment",
+      "background-position",
+      "background-position-x",
+      "background-position-y",
+      "-webkit-background-clip",
+      "-moz-background-clip",
+      "background-clip",
+      "background-origin",
+      "-webkit-background-size",
+      "-moz-background-size",
+      "-o-background-size",
+      "background-size",
+      "border",
+      "border-color",
+      "border-style",
+      "border-width",
+      "border-top",
+      "border-top-color",
+      "border-top-style",
+      "border-top-width",
+      "border-right",
+      "border-right-color",
+      "border-right-style",
+      "border-right-width",
+      "border-bottom",
+      "border-bottom-color",
+      "border-bottom-style",
+      "border-bottom-width",
+      "border-left",
+      "border-left-color",
+      "border-left-style",
+      "border-left-width",
+      "border-radius",
+      "border-top-left-radius",
+      "border-top-right-radius",
+      "border-bottom-right-radius",
+      "border-bottom-left-radius",
+      "-webkit-border-image",
+      "-moz-border-image",
+      "-o-border-image",
+      "border-image",
+      "-webkit-border-image-source",
+      "-moz-border-image-source",
+      "-o-border-image-source",
+      "border-image-source",
+      "-webkit-border-image-slice",
+      "-moz-border-image-slice",
+      "-o-border-image-slice",
+      "border-image-slice",
+      "-webkit-border-image-width",
+      "-moz-border-image-width",
+      "-o-border-image-width",
+      "border-image-width",
+      "-webkit-border-image-outset",
+      "-moz-border-image-outset",
+      "-o-border-image-outset",
+      "border-image-outset",
+      "-webkit-border-image-repeat",
+      "-moz-border-image-repeat",
+      "-o-border-image-repeat",
+      "border-image-repeat",
+      "outline",
+      "outline-width",
+      "outline-style",
+      "outline-color",
+      "outline-offset",
+      "-webkit-box-shadow",
+      "-moz-box-shadow",
+      "box-shadow",
+      "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity",
+      "-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
+      "opacity",
+      "-ms-interpolation-mode",
+      "-webkit-transition",
+      "-moz-transition",
+      "-ms-transition",
+      "-o-transition",
+      "transition",
+      "-webkit-transition-delay",
+      "-moz-transition-delay",
+      "-ms-transition-delay",
+      "-o-transition-delay",
+      "transition-delay",
+      "-webkit-transition-timing-function",
+      "-moz-transition-timing-function",
+      "-ms-transition-timing-function",
+      "-o-transition-timing-function",
+      "transition-timing-function",
+      "-webkit-transition-duration",
+      "-moz-transition-duration",
+      "-ms-transition-duration",
+      "-o-transition-duration",
+      "transition-duration",
+      "-webkit-transition-property",
+      "-moz-transition-property",
+      "-ms-transition-property",
+      "-o-transition-property",
+      "transition-property",
+      "-webkit-transform",
+      "-moz-transform",
+      "-ms-transform",
+      "-o-transform",
+      "transform",
+      "-webkit-transform-origin",
+      "-moz-transform-origin",
+      "-ms-transform-origin",
+      "-o-transform-origin",
+      "transform-origin",
+      "-webkit-animation",
+      "-moz-animation",
+      "-ms-animation",
+      "-o-animation",
+      "animation",
+      "-webkit-animation-name",
+      "-moz-animation-name",
+      "-ms-animation-name",
+      "-o-animation-name",
+      "animation-name",
+      "-webkit-animation-duration",
+      "-moz-animation-duration",
+      "-ms-animation-duration",
+      "-o-animation-duration",
+      "animation-duration",
+      "-webkit-animation-play-state",
+      "-moz-animation-play-state",
+      "-ms-animation-play-state",
+      "-o-animation-play-state",
+      "animation-play-state",
+      "-webkit-animation-timing-function",
+      "-moz-animation-timing-function",
+      "-ms-animation-timing-function",
+      "-o-animation-timing-function",
+      "animation-timing-function",
+      "-webkit-animation-delay",
+      "-moz-animation-delay",
+      "-ms-animation-delay",
+      "-o-animation-delay",
+      "animation-delay",
+      "-webkit-animation-iteration-count",
+      "-moz-animation-iteration-count",
+      "-ms-animation-iteration-count",
+      "-o-animation-iteration-count",
+      "animation-iteration-count",
+      "-webkit-animation-direction",
+      "-moz-animation-direction",
+      "-ms-animation-direction",
+      "-o-animation-direction",
+      "animation-direction"
+    ]
+  ]
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/.csslintrc
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/.csslintrc b/jspwiki-war/src/main/styles/haddock/bootstrap/.csslintrc
new file mode 100755
index 0000000..005b862
--- /dev/null
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/.csslintrc
@@ -0,0 +1,19 @@
+{
+  "adjoining-classes": false,
+  "box-sizing": false,
+  "box-model": false,
+  "compatible-vendor-prefixes": false,
+  "floats": false,
+  "font-sizes": false,
+  "gradients": false,
+  "important": false,
+  "known-properties": false,
+  "outline-none": false,
+  "qualified-headings": false,
+  "regex-selectors": false,
+  "shorthand": false,
+  "text-indent": false,
+  "unique-headings": false,
+  "universal-selector": false,
+  "unqualified-attributes": false
+}

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/alerts.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/alerts.less b/jspwiki-war/src/main/styles/haddock/bootstrap/alerts.less
index 8da200a..c4199db 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/alerts.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/alerts.less
@@ -1,23 +1,3 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Alerts
 // --------------------------------------------------
@@ -38,6 +18,7 @@
     // Specified for the h4 to prevent conflicts of changing @headings-color
     color: inherit;
   }
+
   // Provide class for links that match alerts
   .alert-link {
     font-weight: @alert-link-font-weight;
@@ -48,17 +29,19 @@
   > ul {
     margin-bottom: 0;
   }
+
   > p + p {
     margin-top: 5px;
   }
 }
 
-// Dismissable alerts
+// Dismissible alerts
 //
 // Expand the right padding and account for the close button's positioning.
 
-.alert-dismissable {
- padding-right: (@alert-padding + 20);
+.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
+.alert-dismissible {
+  padding-right: (@alert-padding + 20);
 
   // Adjust close link position
   .close {
@@ -76,12 +59,15 @@
 .alert-success {
   .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
 }
+
 .alert-info {
   .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
 }
+
 .alert-warning {
   .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
 }
+
 .alert-danger {
   .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
 }

http://git-wip-us.apache.org/repos/asf/jspwiki/blob/19b54311/jspwiki-war/src/main/styles/haddock/bootstrap/badges.less
----------------------------------------------------------------------
diff --git a/jspwiki-war/src/main/styles/haddock/bootstrap/badges.less b/jspwiki-war/src/main/styles/haddock/bootstrap/badges.less
index 8dc0616..6ee16dc 100755
--- a/jspwiki-war/src/main/styles/haddock/bootstrap/badges.less
+++ b/jspwiki-war/src/main/styles/haddock/bootstrap/badges.less
@@ -1,29 +1,9 @@
-/*
- *
- * 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.
- *
-*/
 //
 // Badges
 // --------------------------------------------------
 
 
-// Base classes
+// Base class
 .badge {
   display: inline-block;
   min-width: 10px;
@@ -32,7 +12,7 @@
   font-weight: @badge-font-weight;
   color: @badge-color;
   line-height: @badge-line-height;
-  vertical-align: baseline;
+  vertical-align: middle;
   white-space: nowrap;
   text-align: center;
   background-color: @badge-bg;
@@ -48,24 +28,39 @@
     position: relative;
     top: -1px;
   }
-}
 
-// Hover state, but only for links
-a.badge {
-  &:hover,
-  &:focus {
-    color: @badge-link-hover-color;
-    text-decoration: none;
-    cursor: pointer;
+  .btn-xs &,
+  .btn-group-xs > .btn & {
+    top: 0;
+    padding: 1px 5px;
   }
-}
 
-// Account for counters in navs
-a.list-group-item.active > .badge,
-.nav-pills > .active > a > .badge {
-  color: @badge-active-color;
-  background-color: @badge-active-bg;
-}
-.nav-pills > li > a > .badge {
-  margin-left: 3px;
+  // Hover state, but only for links
+  a& {
+    &:hover,
+    &:focus {
+      color: @badge-link-hover-color;
+      text-decoration: none;
+      cursor: pointer;
+    }
+  }
+
+  // Account for badges in navs
+  .list-group-item.active > &,
+  .nav-pills > .active > a > & {
+    color: @badge-active-color;
+    background-color: @badge-active-bg;
+  }
+
+  .list-group-item > & {
+    float: right;
+  }
+
+  .list-group-item > & + & {
+    margin-right: 5px;
+  }
+
+  .nav-pills > li > a > & {
+    margin-left: 3px;
+  }
 }