Changeset 23074 for extensions
- Timestamp:
- Jun 6, 2013, 2:29:14 PM (11 years ago)
- Location:
- extensions/automatic_size
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/automatic_size/main.inc.php
r23033 r23074 66 66 if ($size) 67 67 { 68 // echo $type.' => '.$size[0].' x '.$size[1].'<br>';69 68 if ($size[0] <= $available_size[0] and $size[1] <= $available_size[1]) 70 69 { … … 128 127 'ALT_IMG' => $element_info['file'], 129 128 'COOKIE_PATH' => cookie_path(), 129 'asize_width_margin' => isset($conf['automatic_size_width_margin']) ? $conf['automatic_size_width_margin'] : 12, 130 'asize_height_margin' => isset($conf['automatic_size_height_margin']) ? $conf['automatic_size_height_margin'] : 40, 130 131 ) 131 132 ); … … 141 142 $pattern = '#\{foreach from=\$current\.unique_derivatives#'; 142 143 $replacement = ' 143 <span class="switchCheck"id="aSizeChecked"{if !$is_automatic_size} style="visibility:hidden"{/if}>✔ </span> <a id="aSize" href="{$ASIZE_URL}" title="{$ASIZE_TITLE}" data-checked="{if $is_automatic_size}yes{else}no{/if}">{\'Automatic\'|@translate}</a>144 <span id="aSizeChecked"{if !$is_automatic_size} style="visibility:hidden"{/if}>✔ </span> <a id="aSize" href="{$ASIZE_URL}" title="{$ASIZE_TITLE}" data-checked="{if $is_automatic_size}yes{else}no{/if}">{\'Automatic\'|@translate}</a> 144 145 <br><br> 145 146 {foreach from=$current.unique_derivatives'; -
extensions/automatic_size/picture_js.tpl
r23022 r23074 3 3 if (jQuery("#theImage").size() > 0) { 4 4 function save_available_size() { 5 var width = jQuery("#theImage").width(); 5 var width = jQuery("#theImage").width() 6 width -= {/literal}{$asize_width_margin}{literal}; 6 7 7 8 var docHeight = "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight; 8 9 var offset = jQuery("#theImage").offset(); 9 var bottomMargin = 40;10 var height = docHeight - Math.ceil(offset.top) - bottomMargin;10 var height = docHeight - Math.ceil(offset.top); 11 height -= {/literal}{$asize_height_margin}{literal}; 11 12 12 13 document.cookie= 'available_size='+width+'x'+height+';path={/literal}{$COOKIE_PATH}{literal}';
Note: See TracChangeset
for help on using the changeset viewer.