Change some things around

This commit is contained in:
Zixaphir 2014-04-04 17:05:53 -07:00
parent 11b699a0b6
commit f6898b8c03
6 changed files with 26 additions and 51 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -366,7 +366,7 @@ UI = do ->
hoverend = (e) ->
return if e.type is 'keydown' and e.keyCode isnt 13 or e.target.nodeName is "TEXTAREA"
$.rm @el if @el.parentNode is Header.hover
$.rm @el
$.off @root, @endEvents, @hoverend
$.off d, 'keydown', @hoverend
$.off @root, 'mousemove', @hover

View File

@ -1193,10 +1193,12 @@ nav a,
opacity: .5;
}
.expanded-image > .post > .file > .fileThumb > img[data-md5],
.post > .file > .fileThumb > .full-image {
.post > .file > .fileThumb > .full-image,
.post > .file > .full-image {
display: none;
}
.expanded-image > .post > .file > .fileThumb > .full-image {
.expanded-image > .post > .file > .fileThumb > .full-image,
.expanded-image > .post > .file > .full-image {
display: block;
}
.thread > .replyContainer:last-of-type .post {

View File

@ -105,7 +105,6 @@ ImageExpand =
naturalHeight = if isVideo then 'videoHeight' else 'naturalHeight'
if img = post.file.fullImage
# Expand already-loaded/ing picture.
$.rmClass img, 'ihover'
$.addClass img, 'full-image'
img.controls = (img.parentNode isnt thumb.parentNode)
$.asap (-> img[naturalHeight]), ->

View File

@ -20,17 +20,11 @@ ImageHover =
else
Get.postFromNode @
{isVideo} = post.file
if post.file.fullImage
el = post.file.fullImage
$.rmClass el, 'full-image'
$.addClass el, 'ihover'
else
el = $.el (if isVideo then 'video' else 'img'),
className: 'ihover'
src: post.file.URL
post.file.fullImage = el
{thumb} = post.file
$.after (if isVideo and Conf['Show Controls'] then thumb.parentNode else thumb), el
el = $.el (if isVideo then 'video' else 'img'),
className: 'ihover'
src: post.file.URL
{thumb} = post.file
$.add Header.hover, el
el.dataset.fullID = post.fullID
if isVideo
el.loop = true