TitleV2.3.90 Some Javascript bugfixes
Date28-Feb-2006 18:01:08 EET
Versionv2.3.90
SubmitterDirk Frederickx
Bug criticalitySeriousBug
Browser versionsafari
Bug statusClosedBug
PageProvider used
Servlet Containertomcat
Operating System
URLjspwiki.org
Java version
Updated based on v2.3.90. Added a few css items.

Plse do following fixes to the jspwiki-common.js and have collapsable lists and recent-searches working properly - i hope ;-)

commonheader.jsp#

The loadBrowserSpecificCSS(...) should be called BEFORE any other js routine. So plse move that block before :

  <script type="text/javascript">
  Wiki.loadBrowserSpecificCSS("<wiki:BaseURL/>","<wiki:TemplateDir/>","<wiki:Variable var="pagename" />");
  </script>

  <%-- Here we define the "run when the page loads" -script. --%>
  <script type="text/javascript">
  function runOnLoad()
   { 
    .....

typo in Wiki.getPageName #

Cause Pagename is different from PageName.
   Wiki.getPageName = function() { return this.PageName; } 

typo in Collapse.initialise (to many arguments)#

  delete  Collapsable.initialise = function( domID, className, cookieName )
  add     Collapsable.initialise = function( domID, cookieName )

Collapsable lists#

Collapsable lists in the favorites section do not work properly. Plse add following 3 lines to the jspwiki.css, in the section 920


/* +++ 920 Collapsable lists +++ */
div.collapse ul,
div.collapse ol          { margin-left: 1.5em; padding:0; }
div.collapse * ul,
div.collapse * ol        { margin-left:0 ; padding-left: 1.5em; }
     
div.collapse li          { list-style: none; position: relative; }

/* relative to the containing LI */     
.collapseBullet,
.collapseOpen,
.collapseClose           { position: absolute; /*### can be removed left: -1.5em; ### */
                           font-weight: bold; color: blue;
                           font-family: Verdana, sans-serif; }
.collapseOpen,
.collapseClose           { cursor: pointer; }

.collapseOpen:hover,
.collapseClose:hover     { background: #FF9933; color: white; }

/* #### Add these lines pls #### */
.collapse .collapseBullet,
.collapse .collapseOpen,
.collapse .collapseClose { left: -1.5em !important; right: auto !important; }

PageInfo#

The InfoContent.jsp is missing a revision history table for attachments (used to be there in the past) You can see this when clicking the attachement paper-clip for attachments with multiple versions. Please insert following after line 349 in InfoContent.jsp based on code from line 159-209

Anyway, this jsp looks very messy, some refactoring may be useful in the future.

  <!-- *** -->
  <wiki:CheckVersion mode="notfirst">

  <div id="versionhistory" class="zebra-table">

  <table class="wikitable">

    <tr>
      <th>Version</th>
      <th>Date</th>
      <th>Author</th>
      <th>Size</th>
      <%-- <th>Changes ...</th> --%>
    </tr>

    <wiki:HistoryIterator id="currentPage">
    <% if( (start == -1)  ||
           ((currentPage.getVersion() >= start) && (currentPage.getVersion() < start+size)) )
       {
     %>
    <tr>
      <td>
        <wiki:LinkTo version="<%=Integer.toString(currentPage.getVersion())%>">
          <wiki:PageVersion/>
        </wiki:LinkTo>
      </td>

      <td><wiki:PageDate format="<%= prefDateFormat %>" /></td>
      <td><wiki:Author /></td>
      <td><wiki:PageSize /></td>
    </tr>
    <% } %>
    </wiki:HistoryIterator>
  </table>
  </div> <%-- versionhistory --%>
  </wiki:CheckVersion>
  <!-- *** -->

jspwiki_printcss#

Printing is not working 100% since v2.3.x template changes. Here is a proposal :

/* Webpage stuff */
#applicationlogo,
#companylogo,
.searchbox,
.breadcrumbs,
#actionsTop,
#actionsBottom,
#favorites,
.tabmenu       { display: none; }


/* Wild guess */
body           { font-size: 10pt; }

/* Show links as normal text (maybe show urls at the bottom of the page) */

a              { text-decoration: none; }

/* Give the content what it deserves. */
#header,
.pagename,
#footer,
#page          { width: 100%; margin: 0; float: none; clear: both; position: static; }
#footer        { margin-top: 1em; }

/* More to come. */

One more CSS thing, related to definition lists.#

I noticed that definition lists are not rendered properly.

Here you see the problem
the description text is not indented and the definition title is not highlighted.
Suggested addition to the jspwiki.css
/* add these lines in the 220 List and bullets block */
dl dt                    { font-weight: bold; font-size: 1.2em; }
dl dd                    { margin-left: 3em; }

-- DF

Thanks Dirk! Good work, as usual :)

I'll add these asap...

-- JanneJalkanen


Fixed in 2.3.98

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-10) was last changed on 12-Apr-2006 00:15 by Janne Jalkanen