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 2015/06/22 22:11:44 UTC

svn commit: r1686927 [8/11] - in /jspwiki/trunk: ./ jspwiki-war/src/main/config/wro/ jspwiki-war/src/main/java/org/apache/wiki/ jspwiki-war/src/main/resources/templates/ jspwiki-war/src/main/scripts/behaviors/ jspwiki-war/src/main/scripts/dialog/ jspwi...

Modified: jspwiki/trunk/jspwiki-war/src/main/scripts/wiki/Wiki.js
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/scripts/wiki/Wiki.js?rev=1686927&r1=1686926&r2=1686927&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/scripts/wiki/Wiki.js (original)
+++ jspwiki/trunk/jspwiki-war/src/main/scripts/wiki/Wiki.js Mon Jun 22 20:11:42 2015
@@ -21,307 +21,278 @@
 
 
 /*jshint forin:false, noarg:true, noempty:true, undef:true, unused:true, plusplus:false, immed:false, browser:true, mootools:true */
-/*global HighlightQuery, HighlightAccesskey, Behavior, FileUpload, TabbedSection */
+/*global HighlightQuery, Behavior */
 /*exported  Wiki */
 
-
 /*
 Script: wiki.js
     Javascript routines to support JSPWiki, a JSP-based WikiWiki clone.
-
 License:
     http://www.apache.org/licenses/LICENSE-2.0
-
 Since:
-    v.2.9.0
-
+    v.2.10.0
 Dependencies:
     Based on http://mootools.net/ v1.4.5
-    * mootools-core.js : v1.4.5 excluding the Compatibility module
-    * mootools-more.js : v1.4.0.1 including...
-        Class.Binds, Element.Shortcuts, Fx.Accordion, Drag, Drag.Move, Hash.Cookie, Tips
-
-
+    * mootools-core.js : v1.5.1 excluding the Compatibility module
+    * mootools-more.js : v1.5.1 including...
+        Class.Binds, Hash, Element.Shortcuts, Fx.Elements, Fx.Accordion, Drag,
+        Drag.Move, Hash.Cookie, Swiff
 Core Wiki Routines:
     *    [Wiki] object (page parms, UserPrefs and setting focus)
     *    [WikiSlimbox]
     *    [SearchBox]: remember 10 most recent search topics
-
 Depends on :
-
-    mooxtend.js
-    behavior.js
-    color.js
-    localize.js
-
-    cookie.flag.js
-    collapsible.js
-
-    file-upload.js
-    graph-bar.js
-    Highlight.Query.js
-    Highlight.Accesskey.js
-    observer.js
-    placeholder.js
-    reflect.js
-    viewer.js
-    viewer.slimbox.js
-    viewer.carousel.js
-    tablextend.js  => TableStuff  (sortable, filters, zebra-stripes,  ?select&calculate)
-    tabs.js => TabbedSection => Tabs
-
-
-    wiki.js
-    wiki.category.js
-    wiki.d-styles
-    wiki.navigate.js
-    wiki.recent-search.js
-    wiki.search-box.js
-    wiki.search.js
-
-    wiki.prefs.js
-    wiki.admin.js
-
-    wiki.edit
-        dialog.js
-        snip-editor.js
-        textarea.js
-        undoable.js
+    moo-extend/Behaviour.js
+    moo-extend/Element.Extend.js
+    moo-extend/Array.Extend.js
+    moo-extend/String.js
+    moo-extend/HighlightQuery.js
+    moo-extend/Acceskey.js
+    moo-extend/Form.File.js
+    moo-extend/Form.MultipleFile.js
+    moo-extend/Request.js
+    wiki/Navigate.js
+    wiki/Recents.js
+    wiki/FindPages.js
+    wiki/Search.js
+    wiki/Prefs.js
 */
-
 //"use strict";
 
 /*
 Class: Wiki
     Javascript support functions for jspwiki.  (singleton)
-
 */
 var Wiki = {
 
     initialize: function(){
 
-        var behavior = new Behavior(),
-            wiki = this,
-            prefs = new Hash.Cookie('JSPWikiUserPrefs', {path:wiki.BasePath, duration:20});
+        var wiki = this,
+            behavior = new Behavior(),
+            m,
+            implement = function(object, methods){
 
-        wiki.add = behavior.add.bind(behavior);
-        wiki.once = behavior.once.bind(behavior);
-        wiki.update = behavior.update.bind(behavior);
-
-        //wiki.get = function(name){ return wiki.prefs.get(name); };
-        wiki.get = prefs.get.bind(prefs);
-        //wiki.set = function(name,value){ return wiki.prefs.set(name,value); };
-        wiki.set = prefs.set.bind(prefs);
-        wiki.erase = prefs.erase.bind(prefs);
-
-        //FIXME : link dom elements with behaviors
-        //wiki.add('input[placeholder]', function(element){ element.placeholderX(); })
-
-            //.add('input[autofocus],textarea[autofocus]', function(element){ element.focus(); })
-            //wiki.add('input:autofocus,textarea:autofocus', function(element){
-            //    console.log('autofocus', element);
-            //    element.focus();
-            //})
-
-        if( !('autofocus' in document.createElement('input') ) ){
-            wiki.add('input[autofocus=autofocus], textarea[autofocus=autofocus]', function(element){
-                console.log('autofocus', element);
-                //CHECKME
-                //    plain.jsp            'wikiText' OK 
-                //    login.jsp            'j_username' OK
-                //    prefs/profile        'loginname' 
-                //    prefs/prefs        'assertedName' OK
-                //    find                 'query2'  OK
-                return this.isVisible() && element.focus();
-            });
-        }
+                while( m = methods.pop() ){
+                    wiki[m] = object[m].bind(object);
+                }
+
+            };
 
+        implement(behavior, ["add", "once", "update"]);
 
-        wiki.add( '*[accesskey]', Accesskey )
+        wiki.add( "[accesskey]", Accesskey )
 
-            .add('*[data-toggle]', function(element){
+            //.add("input[placeholder]", function(element){ element.placeholderX(); })
 
-                element.onToggle( element.get('data-toggle') /*, 'active'*/ );
+            //.add("[data-toggle]", "onToggle", {attr:"data-toggle"})
+            .add( "[data-toggle]", function(element){
+                element.onToggle( element.get("data-toggle") );
+            })
+
+            //generate modal confirmation boxes, eg prompting to execute
+            //unrecoverable actions such as deleting a page or attachment
+            .add( "[data-modal]", function(element){
+                element.onModal( element.get("data-modal") );
+            })
+
+            //add hover effects: show/hide this element when hovering over its parent element
+            .add( "[data-hover-parent]", function(element){
+                element.onHover( element.get("data-hover-parent") );
+            })
 
+            //make navigation bar sticky (simulate position:sticky; )
+            .add( ".sticky", function( element ){
+                element.onSticky();
             })
 
-            .add('*[data-hover-parent]', function(element){
+            // Highlight previous search-query (in cookie) or referrer page's search query
+            .add( ".page-content", function(element){
 
-                element.onHover( element.get('data-hover-parent') /*, 'active'*/ );
+                var previousQuery = "PrevQuery",
+                    prefs = wiki.prefs;
+
+                HighlightQuery( element, prefs.get(previousQuery) );
+                prefs.erase(previousQuery);
 
             })
 
-            .add('.searchbox .dropdown-menu', function(element){
+            .add( ".searchbox .dropdown-menu", function(element){
+
+                var recentSearch = "RecentSearch", prefs = wiki.prefs;
 
-                var recentsCookie = 'RecentSearch';
-                
                 //activate Recent Searches functionality
                 new wiki.Recents( element, {
-                    items: wiki.get(recentsCookie),
+                    items: prefs.get(recentSearch),
                     onChange: function( items ){
-                        items ? wiki.set(recentsCookie, items) : wiki.erase(recentsCookie);
+                        items ? prefs.set(recentSearch, items) : prefs.erase(recentSearch);
                     }
                 });
 
                 //activate Quick Navigation functionality
-                new wiki.Findpages(element,{
+                new wiki.Findpages(element, {
+
                     rpc: function(value, callback){
-                        Wiki.ajaxJsonCall('/search/pages',[value,'16'], callback); 
+                        wiki.jsonrpc("/search/pages", [value, 16], callback);
                     },
-                    toUrl: wiki.toUrl.bind(wiki)
+                    toUrl: wiki.toUrl.bind( wiki ),
+                    allowClone: function(){
+                        return /view|preview|info|attach/.test( wiki.Context );
+                    }
                 });
 
             })
 
-            .add('#searchform2', function( form ){
+            .add( "#searchform2", function( form ){
 
                 wiki.search = new wiki.Search( form, {
                     xhrURL: wiki.XHRSearch,
-                    onComplete: function(){ 
-                        //console.log(form.query.get('value')); 
-                        wiki.set('PrevQuery', form.query.get('value')); 
+                    onComplete: function(){
+                        //console.log(form.query.get("value"));
+                        wiki.prefs.set("PrevQuery", form.query.get("value"));
                     }
                 });
 
             })
 
-            //.add('#uploadForm input[type=file]', Form.Upload, { 
-            .add('#files', Form.File, { 
-                max:1,  //CHECK: jspwiki v.2.10.x seems to only support 1 upload-file at a time ?? 
+            .add( "#files", Form.File, {
+
+                //TODO: jspwiki v.2.10.x seems now to only support 1 upload-file at a time
+                max: 1,
                 rpc: function(progressid, callback){
-                    Wiki.ajaxJsonCall('/progressTracker',[progressId], callback); 
-                },
+                    wiki.jsonrpc("/progressTracker", [progressid], callback);
+                }
+
             });
 
-        window.addEvent('domready', wiki.domready.bind(wiki) );
+        window.addEvent( "domready", wiki.domready.bind(wiki) );
 
     },
 
     /*
     Function: domready
-        After the DOM is fully loaded,
-        - initialize the main wiki properties (meta data, prefs cookie, ...)
-        - once all behavior's are defined, call the update() to initiate them all
-          (activation of all dynamic styles)
-        - final actions:
-            - HighLight words in case the referrer page was a search query
-            - when the 'referrer' url (previous page) contains a "section=" parameter,
-              scroll the wiki page to the right section
-            - invoke periodical url hash parser
-
+        After the DOM is fully loaded:
+        - initialize the meta data wiki properties
+        - initialize the section Links
+        - when the "referrer" url (previous page) contains a "section=" parameter,
+          scroll the wiki page to the right section
+        - (FIXME) invoke periodical url hash parser
     */
     domready: function(){
 
         var wiki = this;
 
-        wiki.getMeta();
-
-        wiki.url = null;  //??check why this is needed
+        wiki.meta();
+        wiki.prefs = new Hash.Cookie("JSPWikiUserPrefs", {
+            path: wiki.BasePath,
+            duration: 20
+        });
 
-        if ( wiki.Context!='preview' && wiki.EditPermission && (wiki.get('SectionEditing')) ){
+        //wiki.url = null;  //CHECK:  why this is needed?
+        if( wiki.prefs.get("SectionEditing") && wiki.EditPermission && (wiki.Context != "preview") ){
+            wiki.addEditLinks( wiki.toUrl( wiki.PageName, true ) );
+        }
 
-            wiki.addEditLinks( wiki.toUrl(wiki.PageName,true) );
+        wiki.srcollTo( ( document.referrer.match( /\&section=(\d+)$/ ) || [-1])[0] );
 
-        }
+        wiki.update();  // initialize all registered behaviors
 
-        wiki.scrollToSection( (document.referrer.match( /\&section=(\d+)$/ )||[-1])[0] );
+        //FIXME: -- check bootstrap router concept, or History class
+        //wiki.parseHash.periodical(500);
+        wiki.autofocus();
 
-        // Highlight previous search-query (in cookie) or referrer page's search query
-        HighlightQuery( $('pagecontent'), wiki.get('PrevQuery') );
-        wiki.erase('PrevQuery');
+    },
 
-        // initialize all the element behaviors
-        wiki.update();
+    autofocus: function(){
 
-        //todo -- check bootstrap router concept
-        //wiki.parseHash.periodical(500);
+        var els, element;
 
-        /*
-        wiki.jsonrpc("system.listMethods",[],function(result){
-            wiki.rpcRegister = result;
-            console.log("rpcRegister",result);
-        });
-        */
+        if( !("autofocus" in document.createElement("input") ) ){
+            // editor/plain.jsp  textarea#wikiText
+            // login.jsp         input#j_username
+            // prefs/prefs       input#assertedName
+            // find              input#query2
+            els = $$("input[autofocus=autofocus], textarea[autofocus=autofocus]");
+            while( els[0] ){
+                element = els.shift();
+                //console.log("autofocus", element, element.autofocus, element.isVisible(), element.offsetWidth, element.offsetHeight, "$", element.getStyle("display"), "$");
+                if( element.isVisible() ){
+                    element.focus();
+                    return;
+                }
+            }
+        }
 
     },
 
     /*
-    Function: getMeta
+    Function: meta
         Read all the "meta" dom elements, prefixed with "wiki",
         and add them as properties to the wiki object.
         EG  <meta name="wikiContext">  becomes  wiki.Context
- 
         * wikiContext : jspwiki requestcontext variable (view, edit, info, ...)
         * wikiBaseUrl
         * wikiPageUrl: page url template with dummy pagename "%23%24%25"
         * wikiEditUrl : edit page url
-        * wikiJsonUrl : JSON-RPC url
+        * wikiJsonUrl : JSON-RPC / AJAX url
         * wikiPageName : pagename without blanks
         * wikiUserName
         * wikiTemplateUrl : path of the jsp template
         * wikiApplicationName
         * wikiEditPermission
-
     */
-    getMeta: function(){
+    meta: function(){
 
         var url,
             wiki = this,
             host = location.host;
 
-        $$('meta[name^=wiki]').each( function(el){
-            wiki[el.get('name').slice(4)] = el.get('content')||'';
+        $$("meta[name^=wiki]").each( function(el){
+            wiki[el.get("name").slice(4)] = el.get("content") || "";
         });
-        
+
         // BasePath: if JSPWiki is installed in the root, then we have to make sure that
         // the cookie-cutter works properly here.
         url = wiki.BaseUrl;
-        url = url ? url.slice( url.indexOf(host) + host.length, -1 ) : '';
-        wiki.BasePath = ( url /*===''*/ ) ? url : '/';
+        url = url ? url.slice( url.indexOf(host) + host.length, -1 ) : "";
+        wiki.BasePath = ( url /*===""*/ ) ? url : "/";
         //console.log("basepath: " + wiki.BasePath);
 
     },
 
     /*
     Function: getSections
-        Returns a list of all section headers, excluding the header of the Table Of Contents.
-
+        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)');
-
+        return $$(".page-content [id^=section]:not(#section-TOC)");
     },
 
     /*
-    Function: scrollToSection
+    Function: srcollTo
         Scrolls the page to the section previously being edited - if any
         Section counting starts at 1??
     */
-    scrollToSection:function( index ){
-
-        //console.log("SCROLL to section", index, ", Number of sections:",this.getSections().length );
+    srcollTo: function( index ){
 
+        //console.log("Scroll to section ", index, ", Number of sections:", this.getSections().length );
         var element = this.getSections()[index], pos;
 
         if( element ){
-
             pos = element.getPosition();
             window.scrollTo(pos.x, pos.y);
-
         }
 
     },
 
     /*
     Property: toUrl
-        Turn a wiki pagename into a full wiki-url
+        Convert a wiki pagename to a full wiki-url.
+        Use the correct url template: view(default), edit-url or clone-url
     */
     toUrl: function(pagename, isEdit, isClone){
 
-        var url = isClone ? this.CloneUrl : isEdit ? this.EditUrl : this.PageUrl;
-
-        return url.replace(/%23%24%25/, this.cleanPageName(pagename) );
+        var urlTemplate = isClone ? this.CloneUrl : isEdit ? this.EditUrl : this.PageUrl;
+        return urlTemplate.replace(/%23%24%25/, this.cleanPageName(pagename) );
 
     },
 
@@ -331,22 +302,21 @@ var Wiki = {
     */
     toPageName: function(url){
 
-        var s = this.PageUrl.escapeRegExp().replace(/%23%24%25/, '(.+)');
-        return ( url.match( RegExp(s) ) || [,false] )[1];
+        var s = this.PageUrl.escapeRegExp().replace(/%23%24%25/, "(.+)");
+        return ( url.match( RegExp(s) ) || [0, false] )[1];
 
     },
 
     /*
     Property: cleanPageName
-        Remove all not-allowed chars from a *candidate* pagename.
-        Trim repeated whitespace, allow letters, digits and punctuation chars: ()&+,-=._$
-        Ref. org.apache.wiki.parser.MarkupParser.cleanPageName()
+        Remove all not-allowed chars from a pagename.
+        Trim all whitespace, allow letters, digits and punctuation chars: ()&+, -=._$
+        Mirror of org.apache.wiki.parser.MarkupParser.cleanPageName()
     */
-    cleanPageName: function(p){
+    cleanPageName: function( pagename ){
 
-        //return p.clean().replace(/[^0-9A-Za-z\u00C0-\u1FFF\u2800-\uFFFD()&+,-=._$ ]/g, '');
         //\w is short for [A-Z_a-z0-9_]
-        return p.clean().replace(/[^\w\u00C0-\u1FFF\u2800-\uFFFD()&+,=.$ ]/g, '');
+        return pagename.clean().replace(/[^\w\u00C0-\u1FFF\u2800-\uFFFD()&+, =.$ ]/g, "");
 
     },
 
@@ -354,7 +324,6 @@ var Wiki = {
     Function: parseHash
         Periodic validation of #hash to ensure hidden screen sections are displayed.
         (eg tabs, accordions, ...)
-
     FIXME:
         Add handling of BACK button for tabs ??
         Use concept of ROUTER from backbone ??
@@ -363,105 +332,126 @@ var Wiki = {
 
         var h = location.hash;
 
-        if(this.url && this.url == location.href ){ return; }
+        if( this.url == location.href ){ return; }
         this.url = location.href;
-
-        if( !h /*|| h===''*/ ){ return; }
+        if( !h /*|| h===""*/ ){ return; }
         h = $( h.slice(1) );
-
-
-        while( typeOf( h ) == 'element' ){
-
-            if( h.hasClass('hidetab') ){
-
-                TabbedSection.click.apply($('menu-' + h.id));
-
-            } else if( h.hasClass('tab') ){
-
-                /* accordion -- need to find accordion toggle object */
-                h.fireEvent('onShow');
-
-/*            } else if( !h.isVisible() ){
-                //alert('not visible'+el.id);
+/*
+        //if( h.isVisible() ) return;
+        //arr=this.getParents(...);  //tabs, accordion, pills, collapsible, ...
+        while( typeOf( h ) == "element" ){
+            if( h.hasClass("hidetab") ){
+                TabbedSection.click.apply($("menu-" + h.id));
+            } else if( h.hasClass("tab") ){
+                // accordion -- need to find accordion toggle object
+                h.fireEvent("onShow");
+            } else if( !h.isVisible() ){
+                //alert("not visible"+el.id);
                 //fixme need to find the correct toggler
                 el.show(); //eg collapsedBoxes: fixme
-*/
             }
             h = h.getParent();
         }
-
-        location = location.href; /* now jump to the #hash */
+        location = location.href; // now jump to the #hash
+*/
     },
 
-
-  /*
+    /*
     Function: addEditLinks
-        Inject Section Edit links.
-        Todo: should better move server side
+        Add to each Section title (h2/h3/h4) a quick edit link.
+        FFS: should better move server side
     */
     addEditLinks: function( url ){
 
-        var description = 'quick.edit'.localize();
+        var description = "quick.edit".localize();
 
-        url = url + (url.contains('?') ? '&' : '?') + 'section=';
+        url = url + (url.contains("?") ? "&" : "?") + "section=";
 
         this.getSections().each( function(element, index){
 
-            element.grab('a.edit-section'.slick({ html:description, href:url+index }));
+            element.grab("a.edit-section".slick({ html: description, href: url+index }));
 
         });
 
     },
 
-
     /*
     Function: jsonrpc
         Generic json-rpc routines to talk to the backend jspwiki-engine.
-
     Note:
         Uses the JsonUrl which is read from the meta element "WikiJsonUrl"
-        {{{ <meta name="wikiJsonUrl" content='/JSPWiki-pipo/JSON-RPC' /> }}}
-
+        {{{ <meta name="wikiJsonUrl" content="/JSPWiki-pipo/JSON-RPC" /> }}}
     Supported rpc calls:
-    	- {{ajax/users/<userId>}} gets the details of the current user id
-        - {{ajax/search/pages/<text>}} gets the list of pagenames with partial match
-        - {{ajax/search/suggestions/<text>}} gets the list of pagenames with partial match
-        - {{ajax/progressTracker/<id>}} get a progress indicator of attachment upload
-
+        - {{search.findPages}} gets the list of pagenames with partial match
+        - {{progressTracker.getProgress}} get a progress indicator of attachment upload
+        - {{search.getSuggestions}} gets the list of pagenames with partial match
     Example:
         (start code)
-        Wiki.ajaxJsonCall('/search/pages,[Janne,20]', function(result){
+        //Wiki.ajaxJsonCall('/search/pages,[Janne,20]', function(result){
+        Wiki.jsonrpc("search.findPages", ["Janne", 20], function(result){
             //do something with the resulting json object
         });
         (end)
-
-    jsonid : 1e4, //seed
+    */
+    //jsonid: 1e4, //seed -- not used anymore
     jsonrpc: function(method, params, callback){
 
-        if(this.JsonUrl){
+        if( this.JsonUrl ){
 
+            console.log(method, JSON.stringify(params) );
+
+    		//NOTE:  this is half a JSON rpc ... responseText is JSON formatted
+            new Request({
+    			url: this.JsonUrl + method,
+	    		//method:"post"     //defaults to "POST"
+                //urlEncoded: true, //content-type header = www-form-urlencoded + encoding
+                //encoding: utf-8,
+                onSuccess: function( responseText ){
+
+                    //var x = JSON.decode( responseText );
+                    //console.log(x.length,responseText,x);
+                    callback( JSON.parse( responseText ) )
+
+                },
+                onError: function(error){
+                    //console.log(error);
+                    throw new Error("Wiki rpc error: " + error);
+                    callback( null );
+                }
+
+    		}).send( "params=" + params );
+
+            /* obsolete
             new Request.JSON({
-                url: this.JsonUrl,
-                data: JSON.encode({ 
+                //url: this.JsonUrl,
+                url: this.JsonUrl + method,
+                data: JSON.encode({     //FFS ECMASCript5; JSON.stringify() ok >IE8
                     //jsonrpc:'2.0', //CHECK
-                    id: this.jsonid++, 
-                    method: method, 
-                    params: params 
+                    id: this.jsonid++,
+                    method: method,
+                    params: params
                 }),
-                method: 'post',
-                onSuccess: function(r){ 
-                    if(r.error) console.log(r.error);
-                    callback(r.result); 
+                method: "post",
+                onSuccess: function( response ){
+                    if( response.error ){
+                        throw new Error("Wiki servier rpc error: " + response.error);
+                        callback(null);
+                    } else {
+                        callback( response.result );
+                    }
                 },
-                onError: function(e){
-                    console.log(e); 
+                onError: function(error){
+                    //console.log(error);
+                    throw new Error("Wiki rpc error: "+error);
                     callback(null);
+
                 }
             }).send();
+            */
 
         }
+
     }
-    */
 
 };
 

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Accordion.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Accordion.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Accordion.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Accordion.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,87 @@
+/*
+ *
+ * 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.
+ *
+*/
+/*
+Style: Accordion, TabbedAccordion, LeftAccordion, RightAccordion, AccordionPills
+
+DOM structure:
+(start code)
+    ...
+    //accordion
+    div.panel-group.accordion : panel headings are toggles
+        div.panel.panel-default
+            div.panel-heading.actie
+            div  => fx.accordion collapsible content
+                div.panel-body
+        div.panel.panel-default
+            div.panel-heading  => toggle
+            div  => fx.accordion collapsible content
+                div.panel-body
+
+    //tabbedAccordion : tab toggles, panels without border
+    ul.nav.nav-tabs
+        li
+            a
+    div.panel-group.tabbedAccordion
+        div.active  => fx.accordion collapsible content
+            div.panel-body
+        div  => fx.accordion collapsible content
+            div.panel-body
+
+    //leftAccordion : pill-toggles, panels with border
+    ul.nav.nav-pills.pull-left
+        li
+            a
+    div.panel-group.leftAccordion
+        div  => fx.accordion collapsible content
+            div.panel.panel-default.panel-body
+        div  => fx.accordion collapsible content
+            div.panel.panel-default.panel-body
+
+    //rightAccordion : pill-toggles, panels with border
+    ul.nav.nav-pills.pull-right
+        li
+            a
+    div.panel-group.leftAccordion
+        div  => fx.accordion collapsible content
+            div.panel.panel-default.panel-body
+        div  => fx.accordion collapsible content
+            div.panel.panel-default.panel-body
+
+(end)
+*/
+//inherit accordion layouts from bootstrap/panels.less, and bootstrap/navs.less
+
+//accordion toggles do not have embedded link elements, so no automatic pointer cursor
+[class^=accordion] .panel-heading { cursor:pointer; }
+
+//CHECKME: overwrite panel-group margin-bottom
+[class^=accordion] { margin-bottom:  @line-height-computed; }
+
+[class^=rightAccordion], [class^=leftAccordion] {
+
+    .panel { margin:0 .25em; } //put some space between accordion pills and the panel
+
+    .clearfix;  //small panels with many pills may clash with subsequent elements
+
+}
+
+[class^=pillsAccordion] .panel { margin:.25em 0;  }
+

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Calendar.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Calendar.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Calendar.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Calendar.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,48 @@
+/*
+ *
+ * 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

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Category.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Category.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Category.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Category.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,125 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: Category
+
+Wiki markup:
+    %%category [JSPWikiStyles] /%
+
+DOM structure before:
+    (start code)
+    span.category
+        a.wikipage Category-Page
+    (end)
+
+DOM structure after:
+    (start code)
+    div|span.category
+        span
+            a.wikipage.categorylink[href=".."] Category-Page
+            div.popup (.hidden|.loading|.active)
+                div.title
+                    a.wikipage[href=".."]Category-Page
+                ul
+                    li
+                        a.hover
+                br
+                a.morelink ..and x more
+                br
+    (end)
+*/
+.category-link {
+    border-bottom:2px solid @wiki-category-link-color;
+    &:hover, &:focus { text-decoration:none; }
+}
+
+/*
+Style: cage
+   Used to capture absolute positioned popups, popovers, tootips, tips ... and
+   automatically positions them relative to the visible part of the .cage
+DOM Structure:
+(start code)
+    span.cage
+      button xx
+       div.popup ...
+(end)
+*/
+.cage { position:relative; }
+
+
+/*
+Style: Popup
+    Reusable popup dialog box, with a list of hoverable links
+    IEx fallback using the half-transparent background image tip.png => fixme
+*/
+.popup {
+    position:absolute;
+    z-index:10;
+    background:@black;
+    background:@tooltip-bg;
+    border-radius:@border-radius-base;
+    .box-shadow( 2px 2px 4px @tooltip-bg );
+    _width:240px;
+
+    color:@white;
+    padding:0;
+
+    .transition(all 1s ease);
+    .opacity(0);
+    visibility:hidden;
+
+    ul { .list-unstyled; }
+    a {
+        display: block;
+        padding: 0.1em .75em;
+        color: @white;
+        text-decoration: none;
+        text-shadow: 1px 1px 0 @tooltip-bg;
+
+        &:hover {
+            background:@black;
+            background:fade(@tooltip-bg,25%);
+            border-radius:@border-radius-base;
+            _background-color:@black;
+        }
+    }
+
+    &.loading {
+        height:1em; overflow:hidden;
+        .progress-striped .progress-bar;
+        .progress.active .progress-bar;
+    }
+}
+.category:hover .popup.loading,
+.category:hover .popup.active {
+    .opacity(.9);
+    visibility:visible;
+}
+
+.category .popup {
+
+    margin-top:3px;  //slightly move popup down with 3px under the category-link
+
+    //FIXME: remove this from AJAXCategory.jsp
+    .categoryTitle { .hide; }
+
+}
+

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Collapsible.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Collapsible.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Collapsible.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Collapsible.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,153 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: Collapsible
+    Generic support for Collapsible.List, Collapsible.Box
+
+DOM structure:
+(start code)
+    li
+        b.bullet
+        .. content ..
+    li
+        b.bullet(.clpse)(.xpand)
+        ul
+            li .. content ..
+            li .. content ..
+(end)
+*/
+.bullet {
+    display:inline-block;
+    outline:0;
+    float:left;
+    width:2em;
+    line-height:1.4; //heuristic, for vertical
+
+    // triangular bullets
+    width:0;
+    height:0;
+    border:.4em solid transparent;
+    border-radius: @border-radius-base; //smooth edges
+    border-left-color: @text-color;
+    border-right: none;
+    margin: .3em .9em .3em .7em;
+
+    &.clpse {
+        cursor: pointer;
+        border-left-color: @link-color;
+        &:hover { border-left-color: @link-hover-color; }
+    }
+    &.xpand {
+        cursor: pointer;
+        border: .4em solid transparent; //reset
+        border-top-color: @link-color;
+        border-bottom: none;
+        margin: .5em .6em .5em .6em;
+        &:hover { border-top-color: @link-hover-color; }
+    }
+
+}
+.xpand, .clpse { overflow:hidden; }
+
+
+// CHECKME: Make sure to print collapsed items as if they were not collapsed
+//move to print.less
+@media print {
+    div.clpse {
+        display:block;
+        height:auto !important;
+        //width:auto !important;
+    }
+}
+
+
+/*
+TODO: Experimental - css3 animation iso mootools tween.
+div.xpand { .transition(all .5s ease); height:auto; }
+div.clpse { .transition(all .5s ease); height:0; }
+*/
+
+
+/*
+Style: Collapsible.List
+>   %%collapse
+
+DOM structure:
+(start code)
+div.collapse
+    ul
+        li
+            b.bullet
+            .. li-text ..
+        li
+            b.bullet(.xpand)(.clpse)
+            .. li-text ..
+            ul.xpand|clpse
+                li ..collapsible content ..
+                li ..collapsible content ..
+(end)
+*/
+.collapse {
+
+    > ul, > ol { margin-left:-2em; }  // first ul/ol, shift left to create space for the bullets
+    ul, ol { list-style:none;  }
+
+    //li:not(.xpand), li:not(.clpse) { list-style:auto; .bullet {display:none;} }
+    li { white-space:nowrap; overflow:hidden; }  //assume li-items fit on one line
+
+}
+
+
+/*
+Style: Collapsible-Box
+>   %%collapsebox
+>   %%collapsebox-closed
+
+DOM structure:
+(start code)
+    //before
+    div.collapsebox
+        b.bullet.xpand|clpse'[click='...']
+        h1-4  title
+        .. collapsible content ..
+
+    //after
+    div.panel.panel-default
+        div.panel-heading
+            b.bullet.xpand|clpse[onclick="..."]
+            h4.panel-title title
+        div.panel-body.xpand|clpse
+            .. collapsible content ..
+(end)
+*/
+//re-use bootstrap/panels.less
+div[class^=collapsebox] {
+
+    > .panel-heading { padding-left:0; } //remove some left space next to the bullet
+
+    //coloured collapseboxes get white bullets
+    &:not(.panel-default) .bullet {
+        &.xpand, &.xpand:hover { border-top-color: @white; }
+        &.clpse, &.clpse:hover { border-left-color: @white; }
+    }
+}
+
+

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Columns.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Columns.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Columns.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Columns.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,43 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: Columns
+
+Wiki-markup:
+>    %%columns ... /%
+
+DOM structure:
+
+*/
+.columns {
+    .clearfix;
+    //  *width:100%; //ie6,ie7 hack
+
+    .col {
+        float:left;
+        padding:0 0.5em 0.5em 0;
+    }
+}
+
+//ie6 and lower hack
+//  * html .columns {  width:100%; }
+//ie7 hack
+//  *:first-child+html .columns { width:100%; }

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/CommentBox.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/CommentBox.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/CommentBox.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/CommentBox.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,50 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: Commentbox
+    Left floating comment box, with or without caption.
+
+DOM structure:
+    (start code)
+
+    // Based on bootstrap/panel.less
+    div.panel.panel-default(.panel-primary.panel-success.panel-info.panel-warning.panel-danger)
+      div.panel-header
+        h2.panel-title
+      div.panel-body
+      div.panel-footer
+    (end)
+*/
+
+.commentbox {
+
+    float:right;
+    //clear:right; //float subsequent boxes next to each-other
+    width: @wiki-commentbox-width;
+    margin:0 0 .5em .5em;
+    .small;
+
+}
+//need to avoid clash with floating 'handing' element, eg commentboxes, etc.
+h2, h3, h4 { clear:right; }
+
+//fixme
+.collapsebox  { clear:right; }
\ No newline at end of file

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Dialog.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Dialog.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Dialog.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Dialog.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,250 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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: dialog
+	CSSdefs for the Mootools dialog plugin
+
+DOM structure:
+(start code)
+	div.dialog
+		a.close
+		div.caption ...  //optional, + drag handle
+		div.body ...
+		div.buttons      //optional
+			div.btn ...
+		div.resize
+(end)
+*/
+
+/* Dialog main container */
+.dialog {
+
+	position:absolute;
+	.hide;
+	z-index: 10;
+
+    //inherit from .dropdown-menu
+    background-color: fade(@dropdown-bg,90%);
+    border: 1px solid @dropdown-fallback-border; // IE8 fallback
+    border: 1px solid @dropdown-border;
+    border-radius: @border-radius-base;
+    .box-shadow(0 6px 12px rgba(0,0,0,.175));
+    background-clip: padding-box;
+
+    min-width: 160px;
+
+    .caption {
+
+    	text-align: center;
+    	font-family: @wiki-logo-font-family;
+    	letter-spacing:1px;
+
+        padding:0.5em;
+
+	    white-space: nowrap;
+    	overflow: hidden;
+        border-bottom: 1px solid @dropdown-border;
+    }
+
+    //overwrite some bootstrap/close.less settings
+    .close {
+        position:absolute;
+        top:0;
+        right:0;
+
+        padding:0.25em 0.5em;
+
+    	font-family: @wiki-logo-font-family;
+    	font-weight: normal;
+        .opacity(1);
+
+        //.transition(all .5s ease);
+
+        &:hover {
+            font-weight: bolder;
+            //.rotate(-180deg);
+        }
+    }
+
+    .body {
+        padding:0.5em;
+	    .user-select(none);
+    }
+
+    .btn-group {
+        text-align:center;
+        padding:0.5em;
+    }
+
+}
+
+/*
+Style: Dialog.Selection, Dialog.Font, Dialog.Chars
+
+DOM structure:
+(start code)
+	div.dialog
+		a.close
+		div.caption ...  //optional, + drag handle
+		div.body ...
+
+		div.buttons      //optional
+			div.btn ...
+		div.resize
+(end)
+*/
+.dialog.selection {
+
+    .body {
+        padding: 0.25em 0 0 0;
+        overflow: scroll;
+        max-height: 300px;
+
+        ul {
+            .list-unstyled;
+            margin:0;
+        }
+        .item {
+            cursor:pointer;
+        	padding:0.25em 1em;
+            white-space:nowrap;
+
+            &:hover {
+                //inherit from dropdown-menu
+                //color: @dropdown-link-hover-color;
+                background-color: fade(@dropdown-link-hover-bg,75%);
+            }
+        }
+
+       .divider {
+            .nav-divider(@dropdown-divider-bg);
+        }
+
+        .selected {
+            //inherit from .dropdown-menu > .active > a
+            color: @dropdown-link-active-color;
+            text-decoration: none;
+            outline: 0;
+            background-color: @dropdown-link-active-bg;
+    	    .user-select(none);
+
+    	    &:hover { background-color: @dropdown-link-active-bg; }
+        }
+
+    }
+
+    &.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
+    }
+    //&.dialog-horizontal .item:nth-child(6n) { float: none;  }
+
+}
+.dialog.chars .item { text-align:center; }
+
+
+/*
+Style: .dialog.color
+*/
+@dialog-color-size: 256px;
+
+.dialog.color {
+
+    //#color display
+    .caption span {
+    	padding:0 1.5em;
+	    border-radius: 1em;
+	    color:#000;
+	    background-color:#fff;
+	    cursor:text;
+	    font-family: @font-family-monospace;
+    }
+    .body {
+	    position:relative; /*restrict cursor movement*/
+    	margin: 1em;
+    	width: @dialog-color-size;
+	    height: @dialog-color-size;
+	    cursor: crosshair;
+	    background:url('@{imagePath}/hue-wheel.png') no-repeat center center;
+
+        /* Hue wheel */
+        //background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
+        //border-radius: 50%
+
+        //background-size: cover;
+
+    }
+    .cursor {
+    	position:absolute;
+	    background:url('@{imagePath}/cursor.gif') no-repeat;
+    	margin:-4px; /*half of height x weight */
+	    height:9px;
+    	left:@dialog-color-size/2; /* init at middle of img - mandatory for Drag */
+	    top:@dialog-color-size/2; /* init at middle of img - mandatory for Drag */
+	    width:9px;
+	    z-index:901;
+    }
+    .zone, {
+	    height:100%;
+    	width:100%;
+    }
+    /*
+    .resize {
+    	position:absolute;
+     	bottom:2px;
+	    right:2px;
+    	height: 0;
+	    width: 0;
+    	cursor: se-resize;
+	    opacity:0.5;
+        border-style: solid;
+        border-width: 0 0 16px 16px;
+        border-color: transparent transparent rgba(0,0,0,.2) transparent;
+    }
+    */
+
+    .btn-group { margin-top:-1em;}
+
+}
+
+
+.dialog.find {
+
+    .body { padding:1em; }
+
+    .tbHITS {
+    	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)
+        padding: @padding-base-vertical @padding-base-horizontal;
+        font-size: @font-size-base;
+        //line-height: @line-height-base;
+
+	    right: @padding-base-horizontal;
+	    color: @input-color;
+
+	    span { color: @red; }
+
+    }
+
+}

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Flip.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Flip.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Flip.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Flip.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,97 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: Flip
+    Animation style to support vertical and horizontal flipping.
+
+Wiki-markup:
+(start)
+%%flip-h300-w500-red-blue
+Front
+----
+Back
+/%
+(end)
+
+DOM structure:
+(start)
+div.flip-container
+  div.flip|.flop
+    div.face
+        ..front face..
+    div.face
+        ..back face
+(end)
+
+Credit:
+    http://desandro.github.io/3dtransforms/docs/card-flip.html
+    http://davidwalsh.name/css-flip
+*/
+.flip-container {
+    width: 100%;
+    height: 150px;
+    position: relative;
+    .perspective(800px);
+
+    .flip, .flop {
+        width: 100%;
+        height: 100%;
+        position: absolute;
+
+        transform-style: preserve-3d;
+        .transition( transform 1s; );
+
+        .face {
+            display: block;
+            position: absolute;
+            width: 100%;
+            height: 100%;
+            overflow: scroll;
+            .backface-visibility(hidden);
+
+            &:first-child {
+                z-index: 2; //above back panel
+            }
+            &:last-child {
+                //background: @blue;
+            }
+        }
+    }
+
+    .flip {
+        .transform-origin(right center); //slide flip
+		.face:last-child { .rotateY( 180deg ); }
+    }
+    &:hover .flip, .flip.flipped {
+        //.rotateY( -180deg );
+        transform: translateX( -100% ) rotateY( -180deg ); //slide flip
+    }
+
+    .flop {
+		.transform-origin( center top ); //slide flip
+		.face:last-child { .rotateX( 180deg ); }
+    }
+    &:hover .flop, .flop.flipped {
+    	//.rotateX( -180deg );
+        transform: translateY( 100% ) rotateX( -180deg ); //slide flip
+    }
+
+}

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/GraphBar.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/GraphBar.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/GraphBar.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/GraphBar.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,92 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+GraphBar
+
+DOM Structure
+(start code)
+    // horizontal bar
+    span.graphBar[style="border-left-width: 85px;"]x
+    span.gBar 150
+
+    // vertical bar
+    div[style="height: 77px; position: relative;"]
+       span.graphBar[style="border-color: rgb(255, 0, 0);
+                    border-bottom-width: 20px;
+                    position: absolute;
+                    width: 20px;
+                    bottom: 0px;]
+       span[style="position: relative; top: 40px;] 20
+
+    // progress bar
+    span.graphBar[style="border-color:red; border-left-width: 20px;"]x
+    span.graphBar[style="border-color:blue; border-left-width: 300px; margin-left: -1ex;"]x
+    span.gBar 100
+(end)
+
+BOOTSTRAP
+(start code)
+    // original DOM-structure
+    div.graphBar-(options)
+        span.gbBar 100
+
+    //becomes, based on BOOTSTRAP
+    //horizontal bar
+    span.gb-group(.striped.active)[width:125px]
+      span.gb-bar[style="background:blue;width:40%"]
+    span.gBar 100
+
+    //vertical bar
+    span.gb-group(.striped.active)(.vertical)[heigh:125px]
+      span.gb-bar[style="background:blue;height:100%;width:100%"]
+    span.gBar 100
+
+    //progress bar
+    span.gb-group[width:125px]
+      span.gb-bar[style="background:blue;width:40%"]
+      span.gb-bar[style="background:red;width:60%"]
+    span.gbBar 100
+(end)
+*/
+
+.gb-group {
+    .progress;
+    display: inline-block;
+    vertical-align: middle;
+
+    margin: 0 .5em .25em 0;
+    width: 320px; //default size
+    &.vertical {
+        width: @line-height-computed;
+        .gb-bar { width:100%; }
+    }
+}
+.gb-bar { .progress-bar;  }
+.striped > .gb-bar { .progress-striped .progress-bar; }
+.active > .gb-bar { .progress.active .progress-bar; }
+
+
+//Repeated styles from bootstrap/progress-bars.less
+//.gb-bar has equal priority, so the order matters to overwrite the background-color!
+.progress-bar-success { .progress-bar-variant(@progress-bar-success-bg); }
+.progress-bar-info    { .progress-bar-variant(@progress-bar-info-bg); }
+.progress-bar-warning { .progress-bar-variant(@progress-bar-warning-bg); }
+.progress-bar-danger  { .progress-bar-variant(@progress-bar-danger-bg); }

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/ImagePlugin.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/ImagePlugin.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/ImagePlugin.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/ImagePlugin.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,42 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: ImagePlugin
+
+DOM Structure:
+    (start code)
+    <table border="0" class="imageplugin" align="left|right|center">
+        <tr><td><img src="img.jpg" height="200px" width="200px" /></td></tr>
+    </table>
+    (end)
+*/
+.imageplugin {
+
+    margin:.5em 0;
+
+    img { border: 0; }
+    caption { font-size:90%; }
+
+    * {
+        padding:0;
+        margin:0;
+    }
+}
\ No newline at end of file

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/IndexPlugin.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/IndexPlugin.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/IndexPlugin.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/IndexPlugin.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,56 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: IndexPlugin
+
+DOM structure:
+    (start code)
+    div.index
+        div.header
+            a[href="#A"] A
+            -
+            a[href="#B"] B
+            -
+        span.section
+            a[name="A"] A
+        div.body
+            a (, a)
+
+    (end)
+
+*/
+.index {
+
+    .header {
+        .btn; .btn-primary;
+        font-size:125%;
+        a { color:inherit; }
+        .box-shadow(1px 1px 8px @brand-primary);
+    }
+
+    > .section {
+        .h1;
+        display:block;
+        margin-top: @line-height-computed;
+        margin-bottom: (@line-height-computed / 2);
+    }
+
+}
\ No newline at end of file

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/RecentChangesPlugin.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,24 @@
+/*
+Style: RecentChangesPlugin
+
+DOM structure:
+
+*/
+.recentchanges {
+
+    table-layout:fixed;  // this renders faster
+    .table-hover;
+
+    td {
+        vertical-align:top;
+    }
+    td.date {
+        vertical-align:bottom;
+        background-color:@wiki-recentchanges-date-bg;
+    	border-radius: @border-radius-base;        
+        border:none;
+    }
+    tr.odd td {
+        background-color:transparent;
+    }
+}

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TOCPlugin.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,67 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: TableOfContentsPlugin
+
+    When a TOC plugin is invoked multiple times, only the first one renders the
+    collapsible table of contents box.
+    All subsequent invocations of the TOC plugin render a link to the toc. (a.toc)
+    This link has little use; so we just hide it.
+
+    Typical use-case: have a LeftMenu with a call of the TOC plugin.
+    When the main wiki-page already contains a TOC, the plugin only generates
+    a toc link (a.toc)
+
+DOM structure:
+    (begin)
+    div.toc
+        div.collapsebox
+            b.bullet xpand|clpse
+            h4#section-TOC Table Of Contents
+            div.xpand|clpse
+                ul
+                    li.toclevel-1
+                    li.toclevel-2
+                    li.toclevel-3
+    (end)
+*/
+.toc {
+    width:60%;
+
+    ul {
+        .list-unstyled;
+        li:hover { background:@dropdown-link-hover-bg; }
+        margin-bottom:0;
+    }
+    .toclevel-1 { padding-left:1.2em }
+    .toclevel-2 { padding-left:2.4em; }
+    .toclevel-3 { padding-left:4.6em; }
+}
+.sidebar .toc {
+    width:100%;
+    .toclevel-1 { padding-left:.25em; }
+    .toclevel-2 { padding-left:.5em; }
+    .toclevel-3 { padding-left:.75em; }
+}
+
+//Multiple occurrences of the TOC plugin are rendered as links (a.toc)
+a.toc { .hide; }
+

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TableX.Filter.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TableX.Filter.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TableX.Filter.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TableX.Filter.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,47 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Dynamic Style: Table Filters
+
+Wiki markup:
+    %%table-filter  ..table.. /%
+
+DOM structure:
+    div.table-filter
+        div.filter-input
+            input[type=search][placeholder=..]
+            span.icon-filter.btn  //predefined filter shortcuts
+        table
+            tr
+                th
+            tr.visible
+                td.highlight  //type.less
+                td
+*/
+.filter-input {
+
+    input {
+        width: 40%;
+        padding-right: 1.5em;
+        //&:focus ~ .icon-filter { .hide; }
+    }
+    .icon-filter { left: -1.5em; }
+}

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TableX.Sort.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TableX.Sort.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TableX.Sort.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/TableX.Sort.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,66 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Dynamic Style: Sortable Tables
+
+Wiki markup:
+    %%sortable  ..table.. /%
+
+DOM structure:
+    div.sortable
+        table
+            tr
+                th.sort | th.up | th.down
+            tr
+                td
+                td
+*/
+.sortable {
+
+    th {
+        position:relative;
+        cursor:pointer;
+        padding-right:13px !important; //make room for the up/down arrows
+
+        &:hover { background-color: @wiki-hover; }
+
+        //arrow to indicate the sort-direction
+        &:after {
+            .caret();
+            content:""; //needed to display the caret ico of :after or :before pseudo
+            visibility:hidden;
+        }
+        &:hover:after { visibility:visible; }
+
+        &.up:after,
+        &.down:after,
+        &.down:hover:after {
+            visibility:visible;
+            opacity:0.4;  //lighter color for the sorted column
+        }
+        &.up:after  {
+            border-top: 0;
+            border-bottom: @caret-width-base solid; //flip arrow direction
+        }
+
+    }
+
+}

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Tabs.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Tabs.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Tabs.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Tabs.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,48 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: TabbedSections, Tabs, Pills
+
+DOM structure:  ( based on Bootstrap conventions, without [data-toggle=tab] )
+(start code)
+    ul.nav.nav-tabs(.nav-pills)
+        li
+            a FirstTab
+        li
+            a SecondTab
+        li
+            a ThirdTab
+
+    div.tab-content
+        div.tab-pane.active[id="FirstTab"] ...
+        div.tab-pane[id="SecondTab"] ...
+        div.tab-pane[id="ThirdTab"] ...
+(end)
+*/
+
+//inherit from bootstrap/navs.less
+.tab-content {
+
+    margin-bottom:@line-height-computed; //tabs could use some more bottom margin
+
+    .tab-pane { .panel-body; } //inherit padding of a panel body
+
+}

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Attach.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Attach.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Attach.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Attach.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,110 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: Attachments
+
+DOM Structure:
+(start code)
+form#uploadform
+    ul.list-group
+        li.droppable
+            label
+                span.canDragAndDrop
+            input[type="file"][disabled=""][name="file0"][id=""]
+            a.hidden.delete.btn.btn-danger Delete
+        li.active
+            span file-name-1
+            input.done[type="file"][name="file1"][id=""]
+            a Delete
+        li.active
+            span file-name-2
+            input.done[type="file"][name="file2"][id=""]
+            a Delete
+    (end)
+*/
+
+#uploadform ul.list-group {
+
+    margin-bottom:0;
+    vertical-align:top;
+
+    //hide the input[type=file] elements, they will be invoke to Form.Upload.js
+    li input[type=file] {
+        position:absolute;
+        top:0;
+        right:0;
+        width:100%;height:100%;
+        cursor:pointer;
+        opacity:0;
+    }
+
+    li.droppable {
+        color: @list-group-active-color;
+        background-color: @list-group-active-bg;
+        border-color: @list-group-active-border;
+        text-align:center;
+
+        * { color: inherit; }
+
+        &.disabled { .btn.disabled; }
+
+        &.active {
+            .progress-striped .progress-bar;
+            .progress.active .progress-bar;
+        }
+    }
+    a.delete { position:relative; z-index:2; } //should be on top of the input block
+    b { .label; .label-info; margin-left:1em; }
+
+}
+
+form.legacy .canDragAndDrop { .hide; }
+
+
+.attachtype {
+    line-height: 1.6;
+    font-size: 11px;
+    padding-left: 20px;
+
+    background-repeat:no-repeat;
+    background-position:0 0;
+    background-image:url("@{imagePath}/attach-strip.png");
+
+}
+
+#attach-gif  { background-position:0 -112px; }
+#attach-png  { background-position:0 -112px; }
+#attach-bmp  { background-position:0 -112px; }
+#attach-jpg  { background-position:0 -112px; }
+#attach-jpeg { background-position:0 -112px; }
+#attach-text { background-position:0 -16px;  }
+#attach-txt  { background-position:0 -16px;  }
+#attach-zip  { background-position:0 -128px; }
+#attach-jar  { background-position:0 -128px; }
+#attach-tar  { background-position:0 -128px; }
+#attach-pdf  { background-position:0 -80px;  }
+#attach-doc  { background-position:0 -32px;  }
+#attach-xls  { background-position:0 -48px;  }
+#attach-ppt  { background-position:0 -64px;  }
+#attach-swf  { background-position:0 -96px;  }
+#attach-mov  { background-position:0 -160px; }
+#attach-mp3  { background-position:0 -144px; }
+#attach-wav  { background-position:0 -144px; }

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Content.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Content.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Content.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Content.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,117 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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: Main Content
+
+    Uses a minimal grid-system to display/hide the sidebar left from the main page container.
+    The sidebar slides in/out at the left, via a css transition, by adding/removing
+    .active to the main content container. (adding .active, makes the sidebar visible)
+
+    The div.page element comes first in the DOM tree, before the div.sidebar.
+
+    TODO: [stack sidebar ico small devices]
+
+DOM Structure:
+(start code)
+    div.content[.active]
+        div.page
+        	div.page-content
+        	div.page-footer
+        div.sidebar
+(end)
+*/
+
+.content {
+    //position:relative;  => dont, otherwise suggestion dialogs are clipped
+    padding:0;
+    overflow:hidden;
+    clear:both;
+    .clearfix();
+}
+.page, .sidebar {
+    //box-sizing: border-box;  // width% now includes border & padding : already default in bootstrap
+   .transition(all 300ms);
+}
+
+.page {
+    float:right;
+    width:100%;
+}
+.sidebar {
+    float:left;
+    width:@wiki-sidebar-width;
+    margin-left:-@wiki-sidebar-width;
+    overflow-x:hidden;
+}
+
+/* FIXME
+.fav-right {
+    .page    { float:left; }
+    .sidebar { float:right; margin-left:0; margin-right:-@wiki-sidebar-width;}
+}
+.fav-hidden {
+    .sidebar { .hide();  }
+}
+*/
+
+.content.active {
+    .page { width:100%-@wiki-sidebar-width; }
+    .sidebar { margin-left:0; }
+}
+
+.sidebar { background:@wiki-sidebar-bg; padding:@padding-base-horizontal;  }
+.content { background: @wiki-page-bg; }
+
+.page-content, .sidebar, .ajaxpreview {
+	.clearfix;
+	& > h2, & > h3, & > h4,  { margin-top:0; }
+}
+
+.page-content { margin:0 0 0 @padding-base-horizontal; }
+
+/*
+Section: page-footer
+
+DOM Structure:
+(start code)
+	This page (revision-999) was last changed on
+    a[href="/Diff.jsp?page=Main&amp;r1=634&amp;r2=633"] 17-May-2013 19:36
+    by
+    a.wikipage page-author
+    a.feed[title='RSS feed for page Main'] &nbsp;
+    a.caretup[href="#top"][title="Go to top"] &laquo;
+(end)
+*/
+.page-footer {
+	display:block;
+	padding:.5em 0 0 0;
+    background:@wiki-page-bg;
+    text-align:right;
+}
+
+//reverse direction caret
+.caret-up {
+	.caret;
+    border-top: 0;
+    border-bottom: @caret-width-base solid;
+    content: "";
+}
+

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Diff.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Diff.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Diff.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Diff.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,95 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Style: DiffContent.jsp
+    CSS classes for the DIFF Providers "Traditional" and "External"
+
+DOM Structure:
+Traditional Diff provider
+    (start code)
+    div.collapsebox
+    h4
+    div.diffbody
+        table.diff
+            tr
+                td.diff
+            tr
+                td.diffadd
+            tr
+                td.diffrem
+(end)
+*/
+
+.diffbody {
+    margin:  (@line-height-computed/2);
+    table { width: 100%; }
+}
+
+/* .diffnote equals .information */
+.diffadd, .diffrem { font-family:@font-family-monospace; }
+.diffadd { background:@wiki-diff-add; }
+.diffrem { background:@wiki-diff-delete; text-decoration:line-through; }
+
+//td.diff    {  } //todo: diff information lines take page background
+
+
+/*
+Contextual Diff Provider
+(start code)
+    div.diffbody
+        div.diffnote
+        div.wikitext
+            ..
+            <br/>
+            a[name=change-1]
+                font[color=xxx]
+                    a.diff-insertion
+                strike
+                    font[color=xxx]
+                        a.diff-deletion
+            a.diff-nextprev[href=change-2]>>
+            ..
+            a.diff-nextprev[href=change-1]>>
+            a[name=change-2]
+            a.diff-nextprev[href=change-3]>>
+
+(end)
+*/
+.diffnote { margin:  (@line-height-computed/2) 0; }
+
+.diff-wikitext {
+    font-family:@font-family-monospace;
+    overflow:auto;
+    background-color: @pre-bg;
+    white-space:pre;
+
+    a[name^=change] { text-decoration:none; }
+    span { color:@text-color; }
+}
+
+.diff-insertion { background:@wiki-diff-add; }
+.diff-deletion { background:@wiki-diff-delete; }
+.diff-nextprev {
+    .btn;
+    .btn-default;
+    .btn-xs;  //xtra small
+    background:transparent;
+}

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Edit.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,150 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+/*
+Edit.jsp, EditContent.jsp, CommentContent.jsp, plain.jsp
+
+*/
+
+//should be part of normalise.less ; help also FF to set default to pre-wrap!
+textarea { white-space: pre-wrap; }
+
+//highlight  editor focus fields,  to catch attention to the cursor
+.editform, .dialog.find {
+
+    input[type="text"]:focus, textarea:focus {
+        background:@highlight;
+
+        //get rid of the default bootstrap highlight -- see forms.less and mixins/form-control-focus
+        //outline:0;
+        .box-shadow(none);
+        border: 1px solid @input-border;
+    }
+
+}
+.editform input[name=changenote] {
+    position: absolute;
+    z-index: 2;  //appear on top of the button group
+    width: 480px;
+}
+.editform .open + .editor-tools  {
+    opacity:0;
+}
+
+.editor {
+    font-family: @font-family-monospace;
+    padding: .5em;
+	resize: none !important; // disable resizable textareas in Webkit
+    background: @wiki-editor-bg;
+}
+
+//base styling similar to .page-content in Template.Content.less;
+.ajaxpreview {
+    .hide;
+    background: @wiki-preview-bg;
+    overflow: scroll;
+    padding: .5em 0 .5em @grid-gutter-width/2; //cannot use margin here, as width=50%
+
+    &.loading {
+        .progress-striped .progress-bar;
+        .progress.active .progress-bar;
+    }
+}
+
+//Layout of editor and preview area
+
+//default: show the editor (and preview) areas at 100%
+.edit-area  .col-50,
+.edit-area + .resizer + .ajaxpreview.col-50 { 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 livepreview is on AND previewcolumn (side by side) is on, set width to 50%
+.edit-area.livepreview.previewcolumn .col-50 { width:50%; float:left; }
+
+
+.resizer {
+    background: @wiki-resizer;
+	cursor:row-resize;
+    width:100%;
+	height:8px;
+    line-height:8px;
+    margin-top:4px;
+    margin-bottom:.5em;
+    border-radius:4px;
+    z-index:3;
+
+    &.dragging {
+        .progress-striped .progress-bar;
+        .progress.active .progress-bar;
+    }
+}
+
+
+//CHECK: move to dropdown.less ..
+//reset bootstrap/form.less style on labels inside dropdown menu-s
+.dropdown-menu {
+    max-height:400px;
+    overflow:scroll;
+    label { font-weight:normal; }
+}
+
+.toolbar {
+
+    padding-bottom: 1em;
+    .btn-group {
+        border:1px solid @link-color;
+	    border-radius:@border-radius-base;
+    }
+    .btn-link:hover { text-decoration:none; }
+
+}
+
+// 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
+
+    .tbHITS {
+    	position:absolute;
+	    right:1.5em;
+	    color:#999;
+    }
+
+}
+
+[data-cmd='color'] {
+    background:url("@{imagePath}/color-wheel.png") no-repeat center;
+}
+
+/* Section command button and dropdown */
+.section-selected > .btn { color:@red; }  //red section button (bookmark) when a section is selected
+
+[data-sections] {
+    //.indent-0 { }
+    .indent-1 { text-indent:.5em; }
+    .indent-2 { text-indent:1em; }
+}
+

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Nav.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Nav.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Nav.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Nav.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,89 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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: Page Navigation
+	Uses bootstrap styling with navigation pills, and a dropdown-menu.
+
+DOM Structure:
+(start code)
+div.row
+	ul.nav.nav-pills.pull-left
+		li
+			a.logo
+
+	ul.nav.nav-pills.pull-right
+		li.menu
+			a Menu
+    	li
+    		a Attach
+    	li
+    		a Info
+    	li[.disabled]
+    		a Edit
+    	li
+    		More
+    		span.caret
+    		ul.dropdown-menu.pull-right
+    			...
+
+(end)
+*/
+
+// ref. http://updates.html5rocks.com/2012/08/Stick-your-landings-position-sticky-lands-in-WebKit
+/*
+Note: avoid page-bump when sticky become 'fixed', by adding a spacer with its height
+
+(start code)
+    div.sticky(.stickyOn)
+        .. content ..
+        div.sticky-spacer[style="height:.."] //height calculated by js - same as content
+(end)
+
+*/
+.sticky {
+    display:block;
+
+    + .sticky-spacer { .hide; }
+
+    .pagename {
+        font-size: @wiki-logo-font-size;
+        line-height: 1;
+        .opacity(0);
+        .transition(all .5s ease);
+    }
+}
+
+.stickyOn {
+    top: 0;
+    z-index: 5;
+    position: fixed;
+    background: @dropdown-bg;
+    .opacity(.9);
+    .box-shadow(0 9px 12px -9px rgba(0,0,0,.175));
+
+    + .sticky-spacer { .show; }
+
+    .pagename { .opacity(1); }
+}
+
+//More-menu - add padding to unstyled lists, for proper menu look&feel
+.more-menu ul.list-unstyled { padding: 3px 20px;}
+

Added: jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Preview.less
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Preview.less?rev=1686927&view=auto
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Preview.less (added)
+++ jspwiki/trunk/jspwiki-war/src/main/styles/haddock/default/Template.Preview.less Mon Jun 22 20:11:42 2015
@@ -0,0 +1,28 @@
+/*
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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"); fyou 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.
+*/
+// also used by the SneakPreview section in plain.jsp
+.preview-content {
+
+    //background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAF0lEQVQIHWNgwAESK2/5YJUanBJApwIAjZ8OAdbRWgIAAAAASUVORK5CYII=) repeat;
+	#gradient .striped(@color: rgba(87,179,215,.05); @angle: 135deg);
+	background-size:10px 10px;
+
+}