Skip to content
Permalink
Browse files

enlargit fixes and improvments

- use browsable galleries for log entries view; fixes #283
- add title to log entry viewpictures
- removed inner shadow
- allow longer titles
  • Loading branch information...
following5 committed Aug 9, 2013
1 parent a09ed40 commit f202b9685ceb0d9efafe382b79f57573eda3fe76

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -152,6 +152,7 @@ function enl_init()
if (enl_ui.search(/enlarge/) != -1)
{
enl_imglist[enl_i].title = '';
enl_imglist[enl_i].saveClassName = enl_imglist[enl_i].className;
if (enl_isie) enl_imglist[enl_i].galleryimg = 'no';
if (!enl_imglist[enl_i].id) enl_imglist[enl_i].id = 'enl_autoid'+enl_i;
enl_setcur(enl_imglist[enl_i],enl_pluscur,'pointer','hand');
@@ -388,6 +389,7 @@ function enl_getnext(enl_imgid,enl_prvnxt)
function enl_mkborder(enl_imgid)
{
enl_img = enl_geto(enl_imgid);
enl_img.className = ''; // removes the OC image shadow
enl_brdclone = enl_geto(enl_imgid+"brd");
if (enl_wheelnav) enl_wheelenable(enl_brdclone);
if (enl_titlebar && enl_brdsize < enl_btnheight+4)
@@ -419,6 +421,7 @@ function enl_delborder(enl_imgid)
enl_hide(enl_brdm);
enl_setpos(enl_brdm,-5000,0);
if (enl_shadow) enl_delshadow(enl_imgid);
enl_img.className = enl_img.saveClassName; // restores the OC image shadow
}

// -------- main functions -------
@@ -949,7 +952,7 @@ function enl_mktitlebar(enl_imgid)
}
enl_gettitle = enl_orig.alt;
if (!enl_gettitle) enl_gettitle='';
if (enl_gettitle.length > Math.round(enl_maxwidth*0.08)) enl_gettitle = enl_gettitle.substring(0, Math.round(enl_maxwidth*0.08)-2)+'...';
if (enl_gettitle.length > Math.round(enl_maxwidth*0.1)) enl_gettitle = enl_gettitle.substring(0, Math.round(enl_maxwidth*0.1)-2)+'...';
enl_title.innerHTML = enl_gettitle;
enl_title.style.width = enl_maxwidth+'px';
enl_btns.appendChild(enl_title);
@@ -80,7 +80,7 @@
{/if}

{* the position of the following image is the anchor for enlargit activity: *}
<a name="piclink" href="{$pictureItem.url}" onclick="enlarge(document.getElementById('pic{$pictureItem.id}'))" style="cursor:pointer">{$pictureItem.title|escape}<img id="pic{$pictureItem.id}" src="resource2/ocstyle/images/misc/empty.png" longdesc="{$pictureItem.url}" /></a>
<a name="piclink" href="{$pictureItem.url}" onclick="enlarge(document.getElementById('pic{$pictureItem.id}'))" style="cursor:pointer">{$pictureItem.title|escape}<img id="pic{$pictureItem.id}" class="enlargegroup{$logItem.id}" src="resource2/ocstyle/images/misc/empty.png" longdesc="{$pictureItem.url}" title="{$pictureItem.title|replace:"'":"´"|replace:'"':'´´'}" alt="{$pictureItem.title|replace:"'":"´"|replace:'"':'´´'}" /></a> {* ' in title would cause enlargit and IE errors, even if escaped *}
{if $pictureItem.spoiler}
({t}Spoiler{/t})
{/if}

0 comments on commit f202b96

Please sign in to comment.
You can’t perform that action at this time.