JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix resolution on full-width images
[wfpl-cms.git] / admin_pages.html
index c7ac728..593b5c0 100644 (file)
@@ -62,6 +62,7 @@
        <script>
                window.cke_wfpl_images = {
                        images: ~wfpl_images_json~,
+                       full_width: ~wfpl_image_width_full~,
                        small_width: ~wfpl_image_width_small~,
                        thumb_width: ~wfpl_image_width_thumb~,
                        next_id: 0,
                                break;
                        }
                        code += '<div class="wfpl_i"'
-                       src = image.src;
+                       src =
+                               image.src.substr(0, image.src.length - 4)
+                               + 'w'
+                               + window.cke_wfpl_images[align == 'full' ? 'full_width' : 'small_width']
+                               + image.src.substr(image.src.length - 4);
                        if (image.caption == '') {
                                caption = '&nbsp;';
                        } else {
                                caption = enc_html(image.caption);
                        }
-                       if (align != 'full') {
-                               src =
-                                       src.substr(0, src.length - 4)
-                                       + 'w' + window.cke_wfpl_images.small_width
-                                       + src.substr(src.length - 4);
-                       }
                        code += ' style="background-image: url(/' + src + ');';
                        code += ' padding-top: ' + image.aspect;
                        code += '">&nbsp</div>' + caption;