Changeset 70

Show
Ignore:
Timestamp:
13-12-10 11:48:16 (3 years ago)
Author:
s.h.sikkema@…
Message:

Changed jumbar layout to simple iframe for modules

Location:
jumpbar/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • jumpbar/trunk/grails-app/taglib/jumpbar/JumpbarTagLib.groovy

    r31 r70  
    66    def link = {attr, body -> 
    77        out << """ 
    8         <a href="${createLink(action:'jump', controller: 'jumpbar', plugin:'jumpbar', params:[linkDest:"$attr.linkDest", linkText: "$attr.linkText", frameSource: "$attr.frameSource", pageTitle: "$attr.pageTitle"])} ">${body()}</a> 
     8        <a href="${createLink(action:'jump', controller: 'jumpbar', plugin:'jumpbar', params:[frameSource: "$attr.frameSource", pageTitle: "$attr.pageTitle"])} ">${body()}</a> 
    99        """ 
    1010    } 
  • jumpbar/trunk/grails-app/views/jumpbar/jump.gsp

    r68 r70  
    55      <title>${pageTitle}</title> 
    66 
    7       %{--<g:javascript library="jquery" plugin="jquery"/>--}% 
    87      <meta name="layout" content="main" /> 
    98      <style type="text/css"> 
    109 
    11         /*body {*/ 
    12             /*margin: 0;*/ 
    13         /*}*/ 
    14  
    15         /*#jumpBar {*/ 
    16             /*height: 20px;*/ 
    17             /*width:100%;*/ 
    18             /*background-color: gray;*/ 
    19         /*}*/ 
    20  
    2110        #contentIFrame { 
    22             border: 0; 
    23             height: auto; 
    24             width: 100%; 
     11          border: 0; 
     12          height: 0; 
     13          width: 100%; 
    2514        } 
    2615 
     
    3120       (function($) { 
    3221 
    33            var fnSetIFrameHeight = function() { 
     22         var oldIFrameHeight = -52; // For some reason, the iFrame will initially be set 52px to tall. Does not happen when resizing. Need to figure out and fix this... 
    3423 
    35                $('#contentIFrame').height($(window).height() - $('#header').css('padding-top').replace('px','') - $('#footer').height() - $('#content').css('padding-top').replace('px','') - 100); 
    36            } 
     24         var fnSetIFrameHeight = function() { 
    3725 
    38            $(document).ready(fnSetIFrameHeight); 
     26           // Set content frame height to fill all space left, but at least 200px 
     27           $('#contentIFrame').height( Math.max(200,$(window).height() - $('body').height() + oldIFrameHeight)); 
     28         } 
    3929 
    40            $(window).resize(fnSetIFrameHeight); 
     30         $(document).ready(fnSetIFrameHeight); 
     31 
     32         $(window).resize(function(){oldIFrameHeight = $('#contentIFrame').height();fnSetIFrameHeight()}); 
    4133 
    4234       })(jQuery); 
     
    4638  </head> 
    4739  <body> 
    48   %{--<div id="jumpBar">--}% 
    49       %{--<a href=${linkDest}>${linkText}</a>--}% 
    50   %{--</div>--}% 
    5140  <iframe id="contentIFrame" src=${frameSource}>Your browser does not support iFrames.</iframe> 
    5241  </body> 
  • jumpbar/trunk/JumpbarGrailsPlugin.groovy

    r31 r70  
    11class JumpbarGrailsPlugin { 
    22    // the plugin version 
    3     def version = "0.1.2" 
     3    def version = "0.1.4" 
    44    // the version or versions of Grails the plugin is designed for 
    55    def grailsVersion = "1.3.4 > *"