Aviashow 2010
41
...shared\webengines\default_html.lrwebengine\grid.html:298: attempt to index field 'renditions' (a nil value)
...shared\webengines\default_html.lrwebengine\grid.html:298: attempt to index field 'renditions' (a nil value)
Switch View
- ...shared\webengines\default_html.lrwebengine\grid.html:298: in function 'func'
- ?: in function 'ThumbnailGridFunc'
- ...shared\webengines\default_html.lrwebengine\grid.html:318: in main chunk
- <%
- --[[ Define some variables to make locating other resources easier
- firstPage was defined in our manifest.]]
- local others = "content"
- local theRoot = "."
- local mySize = "thumb"
- %>
- <% --[[ Include the page header]] %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <% --[[ HTML page metadata and stylesheets ]] %>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
- <meta name="Keywords" content="photography,software,photos,digital darkroom,gallery,image,photographer,adobe,photoshop,lightroom" >
- <meta name="generator" content="Adobe Photoshop Lightroom" >
- <title>$model.metadata.siteTitle.value</title>
- <link rel="stylesheet" type="text/css" media="screen" title="Custom Settings" href="$others/custom.css" >
- <link rel="stylesheet" type="text/css" media="screen" title="Custom Settings" href="$theRoot/resources/css/master.css" >
- <% --[[ Scripting support for rollovers and (when previewed in Lightroom) live Update, photobin syncing ]] %>
- <script type="text/javascript">
- window.AgMode = "$mode";
- cellRolloverColor="#A1A1A1";
- cellColor="#949494";
- <% if mode == 'preview' then %>
- window.AgOnLoad = function() {
- tellLightroomWhatImagesWeAreUsing();
- setActiveImageSize( "<%= mySize %>" );
- <% if image then %>
- callCallback( "showInPhotoBin", "$image.imageID" );
- <% end %>
- }
- <% end %>
- </script>
- <script type="text/javascript" src="$theRoot/resources/js/live_update.js">
- </script>
- <% --[[ Special hacks for Internet Explorer ]] %>
- <!--[if lt IE 7.]> <script defer type="text/javascript" src="$theRoot/resources/js/pngfix.js"></script> <![endif]-->
- <!--[if gt IE 6]> <link rel="stylesheet" href="$theRoot/resources/css/ie7.css"></link> <![endif]-->
- <!--[if lt IE 7.]> <link rel="stylesheet" href="$theRoot/resources/css/ie6.css"></link> <![endif]-->
- </head>
- <% --[[ The main HTML page begins here ]] %>
- <body>
- <% --[[ experimental; get colors from kuler]] %>
- <% if model.nonCSS.showKuler then %>
- <% if mode == 'preview' then %>
- <script language="javascript">
- var coloredElements = [
- "appearance.textColor.color",
- "nonCSS.cellColor",
- "appearance.itemNumber.color",
- "appearance.body.background-color",
- "nonCSS.thumbBorderColor",
- "appearance.previewFull.background-color",
- "nonCSS.cellRolloverColor",
- "nonCSS.cellBorderColor",
- "appearance.detailText.color",
- "nonCSS.largeImageBorderColor",
- "nonCSS.sectionBorderColor"
- ];
- function hexColorCmp(aValue,bValue) {
- aValueSplit = str_split(aValue, 2);
- aValueSum = hexdec(aValueSplit[0]) + hexdec(aValueSplit[1]) + hexdec(aValueSplit[2]);
- bValueSplit = str_split(bValue, 2);
- bValueSum = hexdec(bValueSplit[0]) + hexdec(bValueSplit[1]) + hexdec(bValueSplit[2]);
- return aValueSum - bValueSum;
- }
- function statusMessage( html ) {
- document.getElementById( 'kuler_message' ).innerHTML = html;
- }
- function subStatusMessage( html ) {
- document.getElementById( 'kuler_detail' ).innerHTML = html;
- }
- function getURLContents ( url, callback ) {
- document.AgFetchResults = callback;
- callCallback( "fetchURL", url );
- }
- var colors = null;
- function parseKulerXML( xmlstring ) {
- // convert string to XML object
- var xmlobject;
- // Windows requires us to include namespace prefix when searching for tags
- // by name. Safari doesn't. And neither offers an api for searching by
- // tags including the namespace <grrrr />.
- var HACK = "";
- if (window.ActiveXObject) {
- xmlobject=new ActiveXObject("Microsoft.XMLDOM");
- xmlobject.async=false;
- xmlobject.loadXML( xmlstring );
- HACK="kuler:";
- }
- else {
- xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml");
- }
- // get a reference to the root-element "rss"
- var root = xmlobject.getElementsByTagName('rss')[0];
- // get reference to "channel" element
- var channels = root.getElementsByTagName("channel");
- // now get all "item" tags in the channel
- var items = channels[0].getElementsByTagName("item");
- if( items.length == 0 ) {
- statusMessage( "No results found. Ready." );
- return;
- }
- var myInfo = "" + items.length + " match<span id='kuler_detail'></span>:<br>";
- colors = new Array();
- for( var itemIndex = 0; itemIndex < items.length; itemIndex++ ) {
- var hexColorArray = new Array();
- colors[ itemIndex ] = hexColorArray;
- var item = items[ itemIndex ];
- // in the "item" we have a description, so get that
- var themeID = item.getElementsByTagName( HACK + 'themeID' )[0].firstChild.nodeValue;
- // we also get the "pubDate" element in the "item"
- var title = item.getElementsByTagName( 'title' )[0].firstChild.nodeValue;
- var themeSwatches = item.getElementsByTagName( HACK + 'themeSwatches' )[ 0 ];
- var swatches = themeSwatches.getElementsByTagName( HACK + 'swatch' );
- myInfo = myInfo + "<div style='margin:5px' onclick='applySwatch( " + itemIndex + " );'>";
- for( var swatchIndex = 0; swatchIndex < swatches.length; swatchIndex++ ) {
- var swatch = swatches[ swatchIndex ];
- var hexColor = swatch.getElementsByTagName( HACK + 'swatchHexColor' )[ 0 ].firstChild.nodeValue;
- myInfo = myInfo + "<span style='width:5px; background:#" + hexColor + ";'> </span>";
- hexColorArray[ swatchIndex ] = hexColor;
- }
- myInfo = myInfo + "\n";
- myInfo = myInfo + title + ": " + themeID + "</div>";
- }
- statusMessage(myInfo);
-
- }
- function applySwatch( index ) {
- subStatusMessage("<B>Applying swatch</B>")
- // use a delay, so the web view will actually display the above message before
- // starting this work, which may take a moment to complete.
- setTimeout("applySwatch0( " + index + " )", 10 );
- }
- var seed = 0;
- function applySwatch0( index ) {
- document.LR_modelManipulation = true;
- var swatches = colors[ index ];
- if( swatches == null ) {
- return;
- }
- for( var index = 0; index<coloredElements.length; index++ ) {
- var theColor = coloredElements[ index ];
- var swatchIndex = ( seed + index ) % swatches.length;
- if( theColor == null ) {
- break;
- }
- var hexColor = swatches[ swatchIndex ];
- callCallback( "updateModel", theColor, '#' + hexColor );
- }
- seed = seed + 1;
- document.LR_modelManipulation = false;
- subStatusMessage("")
- }
- function getTheme() {
- var query = document.getElementById( 'query' ).value;
- kulerURL = 'http://kuler.adobe.com/kuler/API/rss/search.cfm?searchQuery=' + query + '&startIndex=0&itemsPerPage=10'
- statusMessage( "Searching..." );
- getURLContents( kulerURL, parseKulerXML )
- }
-
- var kulerOn = false;
- function toggleKuler() {
- kulerOn = !kulerOn;
- var kulerElement = document.getElementById('kuler');
- var style = kulerElement.style;
- style.display = kulerOn ? '' : 'none';
- }
- </script>
- <table style="z-index: 2;position:absolute;top:10px;right:10px;">
- <tr>
- <td onclick="toggleKuler()" id="kulerToggler"><img src='$theRoot/kuler_blog_badge.png' width=28 height=28></td>
- <td id="kuler" style="background:white; display:none;">
- <div style="border:1px solid black; border-bottom:0; padding:5px;">
- Query: <input id='query' type='text' name='query' onkeypress="if( event.keyCode == 13 ) { getTheme(); event.keyCode=null; return false; }">
- <input type="button" onclick="getTheme(); return false;" name="button" value="Search">
- </div>
- <div style="border:1px solid black; border-top:0; padding:5px;">
- Status:
- <span id="kuler_message">Ready.</span>
- </div>
- </td>
- </tr>
- </table>
- <% end %>
- <% end %>
- <div id="wrapper_$mySize">
- <%
- local function fixUrlIfRelative( url )
- url = tostring( url ) or ""
- if string.find( url, "[a-z]+:" ) then
- -- this url starts with something like http: or mailto:, so leave it alone
- else
- -- this url is probably relative, so we need to tack on theRoot to the beginning
- -- of it, so no matter where the page we're currently viewing is placed in the
- -- output hierarchy, this link will still point to the same page
- url = theRoot .. "/" .. url;
- end
- return url
- end
- --[[ Include the identity plate during preview to enable quick live update ]]
- local includeIdentityPlate = mode == 'preview' or model.appearance.logo.display
- if includeIdentityPlate then
- local url = fixUrlIfRelative( model.metadata.homePage.value )
- %>
- <div id="model.nonCSS.idplateEnabled">
- <div class="logo"> <a href="$url"> <img width="<%= getIdentityPlateSize().width %>" height="<%= getIdentityPlateSize().height %>" class="pngDelayDisplay" src="$others/logo.png" alt="Logo"> </a> </div>
- </div>
- <%
- end --[[ End conditionalize identity plate ]]
- %>
- <% --[[ Page header titles ]] %>
- <div id="sitetitle">
- <h1 onclick="clickTarget( this, 'metadata.siteTitle.value' );" id="metadata.siteTitle.value" class="textColor">$model.metadata.siteTitle.value</h1>
- </div>
- <div id="collectionHeader">
- <h1 onclick="clickTarget( this, 'metadata.groupTitle.value' );" id="metadata.groupTitle.value" class="textColor">$model.metadata.groupTitle.value</h1>
- <p onclick="clickTarget( this, 'metadata.groupDescription.value' );" id="metadata.groupDescription.value" class="textColor">$model.metadata.groupDescription.value</p>
- </div>
- <% --[[ Main grid area ]] %>
- <div id="stage">
- <div id="index">
- <lr:ThumbnailGrid>
- <%
- --[[ Logic for putting borders around all the grid cells ]]
- local borderFunc = function( row, column )
- local result = ''
- if column == columns then result = ' borderRight' end
- if row == rows then result = result .. ' borderBottom' end
- return result
- end
- %>
- <% --[[ The grid ]] %>
- <lr:GridPhotoCell>
- <div class="thumbnail borderTopLeft<%= borderFunc( row, column ) %>" onmouseover="window.gridOn( this.parentNode, 'ID<%= image.imageID %>_thumb' );" onmouseout="window.gridOff( this.parentNode );" onclick="window.location.href='$others/<%= image.exportFilename %>_large.html'">
- <div class="itemNumber">$cellIndex</div>
- <a href="$others/<%= image.exportFilename %>_large.html" onclick="return needThumbImgLink;">
- <div style="margin-left:<%= 80 - math.floor( image.renditions.thumb.width / 2 ) %>px; margin-top:<%= 80 - math.floor( image.renditions.thumb.height / 2 ) %>px;">
- <% if model.nonCSS.dropShadows then %>
- <div class="dropShadow">
- <div class="inner">
- <% end %>
- <img src="$others/bin/images/thumb/<%= image.exportFilename %>.jpg" id="ID<%= image.imageID %>_thumb" alt="" class="thumb" />
- <% if model.nonCSS.dropShadows then %>
- </div>
- </div>
- <% end %>
- </div>
- </a> </div>
- </lr:GridPhotoCell>
- <lr:GridEmptyCell>
- <div class="emptyThumbnail borderTopLeft <%= borderFunc( row, column ) %>"></div>
- </lr:GridEmptyCell>
- <lr:GridRowEnd>
- <div class="clear">
- </div>
- </lr:GridRowEnd>
- </lr:ThumbnailGrid>
- </div>
- </div>
- <div class="clear">
- </div>
- <% --[[ Pagination section ]] %>
- <% if numGridPages > 1 then %>
- <div class="pagination">
- <ul>
- <lr:Pagination>
- <lr:CurrentPage>
- <li class="current textColor">$page</li>
- </lr:CurrentPage>
- <lr:OtherPages>
- <li class="textColor"> <a href="$link">$page</a> </li>
- </lr:OtherPages>
- <lr:PreviousEnabled>
- <li class="previous textColor"> <a class="paginationLinks" href="$link"><%= LOC "$$$/AgWPG/Templates/HTML/output/Previous=Previous" %></a> </li>
- </lr:PreviousEnabled>
- <lr:PreviousDisabled>
- <li class="previous textColor"> <%= LOC "$$$/AgWPG/Templates/HTML/output/Previous=Previous" %> </li>
- </lr:PreviousDisabled>
- <lr:NextEnabled>
- <li class="next textColor"> <a class="paginationLinks" href="$link"><%= LOC "$$$/AgWPG/Templates/HTML/output/Next=Next" %></a> </li>
- </lr:NextEnabled>
- <lr:NextDisabled>
- <li class="next textColor"> <%= LOC "$$$/AgWPG/Templates/HTML/output/Next=Next" %> </li>
- </lr:NextDisabled>
- </lr:Pagination>
- </ul>
- </div>
- <% end %>
- <% --[[ Include the page footer]] %>
- <% --[[ Contact Info ]] %>
- <div id="contact">
- <% if mode ~= 'preview' then
- local url = fixUrlIfRelative( model.metadata.contactInfo.link ) %>
- <a href="<%= url %>"> <span
- <% else %>
- <span onclick="clickTarget( this, 'metadata.contactInfo.value' );" style="text-decoration: underline;"
- <% end %>
- class="textColor" id="metadata.contactInfo.value"><%= model.metadata.contactInfo.value %></span>
- <% if mode ~= 'preview' then %>
- </a>
- <% end %>
- </div>
- <div class="clear">
- </div>
- </div>
- </body>
- </html>
-
- --[[ Define some variables to make locating other resources easier
- firstPage was defined in our manifest.]]
- local others = "content"
- local theRoot = "."
- local mySize = "thumb"
- write( [[
- ]] ) --[[ Include the page header]] write( [[
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- ]] ) --[[ HTML page metadata and stylesheets ]] write( [[
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
- <meta name="Keywords" content="photography,software,photos,digital darkroom,gallery,image,photographer,adobe,photoshop,lightroom" >
- <meta name="generator" content="Adobe Photoshop Lightroom" >
- <title>]] )write( model.metadata.siteTitle.value )write( [[</title>
- <link rel="stylesheet" type="text/css" media="screen" title="Custom Settings" href="]] )write( others )write( [[/custom.css" >
- <link rel="stylesheet" type="text/css" media="screen" title="Custom Settings" href="]] )write( theRoot )write( [[/resources/css/master.css" >
- ]] ) --[[ Scripting support for rollovers and (when previewed in Lightroom) live Update, photobin syncing ]] write( [[
- <script type="text/javascript">
- window.AgMode = "]] )write( mode )write( [[";
- cellRolloverColor="#A1A1A1";
- cellColor="#949494";
- ]] ) if mode == 'preview' then write( [[
- window.AgOnLoad = function() {
- tellLightroomWhatImagesWeAreUsing();
- setActiveImageSize( "]] )write( mySize )write( [[" );
- ]] ) if image then write( [[
- callCallback( "showInPhotoBin", "]] )write( image.imageID )write( [[" );
- ]] ) end write( [[
- }
- ]] ) end write( [[
- </script>
- <script type="text/javascript" src="]] )write( theRoot )write( [[/resources/js/live_update.js">
- </script>
- ]] ) --[[ Special hacks for Internet Explorer ]] write( [[
- <!--]] .. "[" .. [[if lt IE 7.]] .. "]" .. [[> <script defer type="text/javascript" src="]] )write( theRoot )write( [[/resources/js/pngfix.js"></script> <!]] .. "[" .. [[endif]] .. "]" .. [[-->
- <!--]] .. "[" .. [[if gt IE 6]] .. "]" .. [[> <link rel="stylesheet" href="]] )write( theRoot )write( [[/resources/css/ie7.css"></link> <!]] .. "[" .. [[endif]] .. "]" .. [[-->
- <!--]] .. "[" .. [[if lt IE 7.]] .. "]" .. [[> <link rel="stylesheet" href="]] )write( theRoot )write( [[/resources/css/ie6.css"></link> <!]] .. "[" .. [[endif]] .. "]" .. [[-->
- </head>
- ]] ) --[[ The main HTML page begins here ]] write( [[
- <body>
- ]] ) --[[ experimental; get colors from kuler]] write( [[
- ]] ) if model.nonCSS.showKuler then write( [[
- ]] ) if mode == 'preview' then write( [[
- <script language="javascript">
- var coloredElements = ]] .. "[" .. [[
- "appearance.textColor.color",
- "nonCSS.cellColor",
- "appearance.itemNumber.color",
- "appearance.body.background-color",
- "nonCSS.thumbBorderColor",
- "appearance.previewFull.background-color",
- "nonCSS.cellRolloverColor",
- "nonCSS.cellBorderColor",
- "appearance.detailText.color",
- "nonCSS.largeImageBorderColor",
- "nonCSS.sectionBorderColor"
- ]] .. "]" .. [[;
- function hexColorCmp(aValue,bValue) {
- aValueSplit = str_split(aValue, 2);
- aValueSum = hexdec(aValueSplit]] .. "[" .. [[0]] .. "]" .. [[) + hexdec(aValueSplit]] .. "[" .. [[1]] .. "]" .. [[) + hexdec(aValueSplit]] .. "[" .. [[2]] .. "]" .. [[);
- bValueSplit = str_split(bValue, 2);
- bValueSum = hexdec(bValueSplit]] .. "[" .. [[0]] .. "]" .. [[) + hexdec(bValueSplit]] .. "[" .. [[1]] .. "]" .. [[) + hexdec(bValueSplit]] .. "[" .. [[2]] .. "]" .. [[);
- return aValueSum - bValueSum;
- }
- function statusMessage( html ) {
- document.getElementById( 'kuler_message' ).innerHTML = html;
- }
- function subStatusMessage( html ) {
- document.getElementById( 'kuler_detail' ).innerHTML = html;
- }
- function getURLContents ( url, callback ) {
- document.AgFetchResults = callback;
- callCallback( "fetchURL", url );
- }
- var colors = null;
- function parseKulerXML( xmlstring ) {
- // convert string to XML object
- var xmlobject;
- // Windows requires us to include namespace prefix when searching for tags
- // by name. Safari doesn't. And neither offers an api for searching by
- // tags including the namespace <grrrr />.
- var HACK = "";
- if (window.ActiveXObject) {
- xmlobject=new ActiveXObject("Microsoft.XMLDOM");
- xmlobject.async=false;
- xmlobject.loadXML( xmlstring );
- HACK="kuler:";
- }
- else {
- xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml");
- }
- // get a reference to the root-element "rss"
- var root = xmlobject.getElementsByTagName('rss')]] .. "[" .. [[0]] .. "]" .. [[;
- // get reference to "channel" element
- var channels = root.getElementsByTagName("channel");
- // now get all "item" tags in the channel
- var items = channels]] .. "[" .. [[0]] .. "]" .. [[.getElementsByTagName("item");
- if( items.length == 0 ) {
- statusMessage( "No results found. Ready." );
- return;
- }
- var myInfo = "" + items.length + " match<span id='kuler_detail'></span>:<br>";
- colors = new Array();
- for( var itemIndex = 0; itemIndex < items.length; itemIndex++ ) {
- var hexColorArray = new Array();
- colors]] .. "[" .. [[ itemIndex ]] .. "]" .. [[ = hexColorArray;
- var item = items]] .. "[" .. [[ itemIndex ]] .. "]" .. [[;
- // in the "item" we have a description, so get that
- var themeID = item.getElementsByTagName( HACK + 'themeID' )]] .. "[" .. [[0]] .. "]" .. [[.firstChild.nodeValue;
- // we also get the "pubDate" element in the "item"
- var title = item.getElementsByTagName( 'title' )]] .. "[" .. [[0]] .. "]" .. [[.firstChild.nodeValue;
- var themeSwatches = item.getElementsByTagName( HACK + 'themeSwatches' )]] .. "[" .. [[ 0 ]] .. "]" .. [[;
- var swatches = themeSwatches.getElementsByTagName( HACK + 'swatch' );
- myInfo = myInfo + "<div style='margin:5px' onclick='applySwatch( " + itemIndex + " );'>";
- for( var swatchIndex = 0; swatchIndex < swatches.length; swatchIndex++ ) {
- var swatch = swatches]] .. "[" .. [[ swatchIndex ]] .. "]" .. [[;
- var hexColor = swatch.getElementsByTagName( HACK + 'swatchHexColor' )]] .. "[" .. [[ 0 ]] .. "]" .. [[.firstChild.nodeValue;
- myInfo = myInfo + "<span style='width:5px; background:#" + hexColor + ";'> </span>";
- hexColorArray]] .. "[" .. [[ swatchIndex ]] .. "]" .. [[ = hexColor;
- }
- myInfo = myInfo + "\n";
- myInfo = myInfo + title + ": " + themeID + "</div>";
- }
- statusMessage(myInfo);
-
- }
- function applySwatch( index ) {
- subStatusMessage("<B>Applying swatch</B>")
- // use a delay, so the web view will actually display the above message before
- // starting this work, which may take a moment to complete.
- setTimeout("applySwatch0( " + index + " )", 10 );
- }
- var seed = 0;
- function applySwatch0( index ) {
- document.LR_modelManipulation = true;
- var swatches = colors]] .. "[" .. [[ index ]] .. "]" .. [[;
- if( swatches == null ) {
- return;
- }
- for( var index = 0; index<coloredElements.length; index++ ) {
- var theColor = coloredElements]] .. "[" .. [[ index ]] .. "]" .. [[;
- var swatchIndex = ( seed + index ) % swatches.length;
- if( theColor == null ) {
- break;
- }
- var hexColor = swatches]] .. "[" .. [[ swatchIndex ]] .. "]" .. [[;
- callCallback( "updateModel", theColor, '#' + hexColor );
- }
- seed = seed + 1;
- document.LR_modelManipulation = false;
- subStatusMessage("")
- }
- function getTheme() {
- var query = document.getElementById( 'query' ).value;
- kulerURL = 'http://kuler.adobe.com/kuler/API/rss/search.cfm?searchQuery=' + query + '&startIndex=0&itemsPerPage=10'
- statusMessage( "Searching..." );
- getURLContents( kulerURL, parseKulerXML )
- }
-
- var kulerOn = false;
- function toggleKuler() {
- kulerOn = !kulerOn;
- var kulerElement = document.getElementById('kuler');
- var style = kulerElement.style;
- style.display = kulerOn ? '' : 'none';
- }
- </script>
- <table style="z-index: 2;position:absolute;top:10px;right:10px;">
- <tr>
- <td onclick="toggleKuler()" id="kulerToggler"><img src=']] )write( theRoot )write( [[/kuler_blog_badge.png' width=28 height=28></td>
- <td id="kuler" style="background:white; display:none;">
- <div style="border:1px solid black; border-bottom:0; padding:5px;">
- Query: <input id='query' type='text' name='query' onkeypress="if( event.keyCode == 13 ) { getTheme(); event.keyCode=null; return false; }">
- <input type="button" onclick="getTheme(); return false;" name="button" value="Search">
- </div>
- <div style="border:1px solid black; border-top:0; padding:5px;">
- Status:
- <span id="kuler_message">Ready.</span>
- </div>
- </td>
- </tr>
- </table>
- ]] ) end write( [[
- ]] ) end write( [[
- <div id="wrapper_]] )write( mySize )write( [[">
- ]] )
- local function fixUrlIfRelative( url )
- url = tostring( url ) or ""
- if string.find( url, "[a-z]+:" ) then
- -- this url starts with something like http: or mailto:, so leave it alone
- else
- -- this url is probably relative, so we need to tack on theRoot to the beginning
- -- of it, so no matter where the page we're currently viewing is placed in the
- -- output hierarchy, this link will still point to the same page
- url = theRoot .. "/" .. url;
- end
- return url
- end
- --[[ Include the identity plate during preview to enable quick live update ]]
- local includeIdentityPlate = mode == 'preview' or model.appearance.logo.display
- if includeIdentityPlate then
- local url = fixUrlIfRelative( model.metadata.homePage.value )
- write( [[
- <div id="model.nonCSS.idplateEnabled">
- <div class="logo"> <a href="]] )write( url )write( [["> <img width="]] )write( getIdentityPlateSize().width )write( [[" height="]] )write( getIdentityPlateSize().height )write( [[" class="pngDelayDisplay" src="]] )write( others )write( [[/logo.png" alt="Logo"> </a> </div>
- </div>
- ]] )
- end --[[ End conditionalize identity plate ]]
- write( [[
- ]] ) --[[ Page header titles ]] write( [[
- <div id="sitetitle">
- <h1 onclick="clickTarget( this, 'metadata.siteTitle.value' );" id="metadata.siteTitle.value" class="textColor">]] )write( model.metadata.siteTitle.value )write( [[</h1>
- </div>
- <div id="collectionHeader">
- <h1 onclick="clickTarget( this, 'metadata.groupTitle.value' );" id="metadata.groupTitle.value" class="textColor">]] )write( model.metadata.groupTitle.value )write( [[</h1>
- <p onclick="clickTarget( this, 'metadata.groupDescription.value' );" id="metadata.groupDescription.value" class="textColor">]] )write( model.metadata.groupDescription.value )write( [[</p>
- </div>
- ]] ) --[[ Main grid area ]] write( [[
- <div id="stage">
- <div id="index">
- ]] )do write( [[
- ]] )
- --[[ Logic for putting borders around all the grid cells ]]
- local borderFunc = function( row, column )
- local result = ''
- if column == columns then result = ' borderRight' end
- if row == rows then result = result .. ' borderBottom' end
- return result
- end
- write( [[
- ]] ) --[[ The grid ]] write( [[
- ]] )local GridPhotoCellFunc = function( cellIndex, row, column, image ) write( [[
- <div class="thumbnail borderTopLeft]] )write( borderFunc( row, column ) )write( [[" onmouseover="window.gridOn( this.parentNode, 'ID]] )write( image.imageID )write( [[_thumb' );" onmouseout="window.gridOff( this.parentNode );" onclick="window.location.href=']] )write( others )write( [[/]] )write( image.exportFilename )write( [[_large.html'">
- <div class="itemNumber">]] )write( cellIndex )write( [[</div>
- <a href="]] )write( others )write( [[/]] )write( image.exportFilename )write( [[_large.html" onclick="return needThumbImgLink;">
- <div style="margin-left:]] )write( 80 - math.floor( image.renditions.thumb.width / 2 ) )write( [[px; margin-top:]] )write( 80 - math.floor( image.renditions.thumb.height / 2 ) )write( [[px;">
- ]] ) if model.nonCSS.dropShadows then write( [[
- <div class="dropShadow">
- <div class="inner">
- ]] ) end write( [[
- <img src="]] )write( others )write( [[/bin/images/thumb/]] )write( image.exportFilename )write( [[.jpg" id="ID]] )write( image.imageID )write( [[_thumb" alt="" class="thumb" />
- ]] ) if model.nonCSS.dropShadows then write( [[
- </div>
- </div>
- ]] ) end write( [[
- </div>
- </a> </div>
- ]] )end write( [[
- ]] )local GridEmptyCellFunc = function( cellIndex, row, column ) write( [[
- <div class="emptyThumbnail borderTopLeft ]] )write( borderFunc( row, column ) )write( [["></div>
- ]] )end write( [[
- ]] )local GridRowEndFunc = function( row ) write( [[
- <div class="clear">
- </div>
- ]] )end write( [[
- ]] )LrTagFuncs.ThumbnailGridFunc( _G, GridPhotoCellFunc, GridEmptyCellFunc, GridRowStartFunc, GridRowEndFunc ) end write( [[
- </div>
- </div>
- <div class="clear">
- </div>
- ]] ) --[[ Pagination section ]] write( [[
- ]] ) if numGridPages > 1 then write( [[
- <div class="pagination">
- <ul>
- ]] ) do local LrPaginationEntries = {}
- local oldWrite = write
- write = function( w )
- table.insert( LrPaginationEntries, function() oldWrite( w ) end )
- end
- write( [[
- ]] )LrPaginationEntries.CurrentPage = function( page ) write( [[
- <li class="current textColor">]] )write( page )write( [[</li>
- ]] )end table.insert( LrPaginationEntries, 'PageNumbers' ) write( [[
- ]] )LrPaginationEntries.OtherPages = function( page, link ) write( [[
- <li class="textColor"> <a href="]] )write( link )write( [[">]] )write( page )write( [[</a> </li>
- ]] )end write( [[
- ]] )LrPaginationEntries.PreviousEnabled = function( page, link ) write( [[
- <li class="previous textColor"> <a class="paginationLinks" href="]] )write( link )write( [[">]] )write( LOC "$$$/AgWPG/Templates/HTML/output/Previous=Previous" )write( [[</a> </li>
- ]] )end table.insert( LrPaginationEntries, 'Previous' ) write( [[
- ]] )LrPaginationEntries.PreviousDisabled = function( ) write( [[
- <li class="previous textColor"> ]] )write( LOC "$$$/AgWPG/Templates/HTML/output/Previous=Previous" )write( [[ </li>
- ]] )end write( [[
- ]] )LrPaginationEntries.NextEnabled = function( page, link ) write( [[
- <li class="next textColor"> <a class="paginationLinks" href="]] )write( link )write( [[">]] )write( LOC "$$$/AgWPG/Templates/HTML/output/Next=Next" )write( [[</a> </li>
- ]] )end table.insert( LrPaginationEntries, 'Next' ) write( [[
- ]] )LrPaginationEntries.NextDisabled = function( ) write( [[
- <li class="next textColor"> ]] )write( LOC "$$$/AgWPG/Templates/HTML/output/Next=Next" )write( [[ </li>
- ]] )end write( [[
- ]] )write = oldWrite LrTagFuncs.PaginationFunc( _G, LrPaginationEntries ) end write( [[
- </ul>
- </div>
- ]] ) end write( [[
- ]] ) --[[ Include the page footer]] write( [[
- ]] ) --[[ Contact Info ]] write( [[
- <div id="contact">
- ]] ) if mode ~= 'preview' then
- local url = fixUrlIfRelative( model.metadata.contactInfo.link ) write( [[
- <a href="]] )write( url )write( [["> <span
- ]] ) else write( [[
- <span onclick="clickTarget( this, 'metadata.contactInfo.value' );" style="text-decoration: underline;"
- ]] ) end write( [[
- class="textColor" id="metadata.contactInfo.value">]] )write( model.metadata.contactInfo.value )write( [[</span>
- ]] ) if mode ~= 'preview' then write( [[
- </a>
- ]] ) end write( [[
- </div>
- <div class="clear">
- </div>
- </div>
- </body>
- </html>
- ]] )