Simpler imgExpand.resize().
This commit is contained in:
parent
9302cbe628
commit
032374911c
@ -2506,7 +2506,8 @@
|
|||||||
g.callbacks.push(imgExpand.node);
|
g.callbacks.push(imgExpand.node);
|
||||||
imgExpand.dialog();
|
imgExpand.dialog();
|
||||||
$.bind(window, 'resize', imgExpand.resize);
|
$.bind(window, 'resize', imgExpand.resize);
|
||||||
return imgExpand.resize();
|
imgExpand.style = $.addStyle("body.fitheight img[md5] + img { max-height: " + d.body.clientHeight + "px }");
|
||||||
|
return imgExpand.style.className = 'height';
|
||||||
},
|
},
|
||||||
node: function(root) {
|
node: function(root) {
|
||||||
var a, thumb;
|
var a, thumb;
|
||||||
@ -2616,12 +2617,7 @@
|
|||||||
return $.prepend(delform, controls);
|
return $.prepend(delform, controls);
|
||||||
},
|
},
|
||||||
resize: function(e) {
|
resize: function(e) {
|
||||||
var style;
|
return imgExpand.style.innerHTML = "body.fitheight img[md5] + img { max-height: " + d.body.clientHeight + "px }";
|
||||||
if (style = $('style.height', d.head)) {
|
|
||||||
$.rm(style);
|
|
||||||
}
|
|
||||||
style = $.addStyle("body.fitheight img[md5] + img { max-height: " + d.body.clientHeight + "px }");
|
|
||||||
return style.className = 'height';
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
firstRun = {
|
firstRun = {
|
||||||
|
|||||||
@ -1884,7 +1884,8 @@ imgExpand =
|
|||||||
g.callbacks.push imgExpand.node
|
g.callbacks.push imgExpand.node
|
||||||
imgExpand.dialog()
|
imgExpand.dialog()
|
||||||
$.bind window, 'resize', imgExpand.resize
|
$.bind window, 'resize', imgExpand.resize
|
||||||
imgExpand.resize()
|
imgExpand.style = $.addStyle "body.fitheight img[md5] + img { max-height: #{d.body.clientHeight}px }"
|
||||||
|
imgExpand.style.className = 'height'
|
||||||
|
|
||||||
node: (root) ->
|
node: (root) ->
|
||||||
return unless thumb = $ 'img[md5]', root
|
return unless thumb = $ 'img[md5]', root
|
||||||
@ -1956,15 +1957,13 @@ imgExpand =
|
|||||||
imgExpand.cb.typeChange.call select
|
imgExpand.cb.typeChange.call select
|
||||||
$.bind select, 'change', $.cb.value
|
$.bind select, 'change', $.cb.value
|
||||||
$.bind select, 'change', imgExpand.cb.typeChange
|
$.bind select, 'change', imgExpand.cb.typeChange
|
||||||
$.bind $('input', controls), 'click', imgExpand.cb.all
|
$.bind $('input', controls), 'click', imgExpand.cb.all
|
||||||
|
|
||||||
delform = $ 'form[name=delform]'
|
delform = $ 'form[name=delform]'
|
||||||
$.prepend delform, controls
|
$.prepend delform, controls
|
||||||
|
|
||||||
resize: (e) ->
|
resize: (e) ->
|
||||||
$.rm style if style = $ 'style.height', d.head
|
imgExpand.style.innerHTML = "body.fitheight img[md5] + img { max-height: #{d.body.clientHeight}px }"
|
||||||
style = $.addStyle "body.fitheight img[md5] + img { max-height: #{d.body.clientHeight}px }"
|
|
||||||
style.className = 'height'
|
|
||||||
|
|
||||||
firstRun =
|
firstRun =
|
||||||
init: ->
|
init: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user