Opened 14 years ago

Closed 10 years ago

#708 closed defect (invalid)

HQ Resolution Fix/patch for Xinha/ImageManager

Reported by: Rolf Owned by: yermol
Priority: normal Milestone:
Component: Plugin_ImageManager Version: trunk
Severity: normal Keywords:
Cc:

Description

This makes the ImageManager? resize to show more pictures inside the iframe if the resolution on the client pc is good.

Ofcorse you need to copy plugins/ImageManager/assets/manager.css to plugins/ImageManager/assets/managerHQ.css and edit it to fit the screen.

Changed this in plugins/ImageManager/assets/managerHQ.css:

form { padding: 0px;  margin: 0 auto; width: 1150px;}
[...]
.imageFrame { width: 100%; height: 550px; margin: 0 auto; margin-top: 1em; background-color: White;}

Changes in plugins/ImageManager/manager.php:

[...]
 <link href="<?php print $IMConfig['base_url'];?>assets/manager<?=($_COOKIE["HQ"])?"HQ":""; ?>.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../popups/popup.js"></script>
<script type="text/javascript" src="assets/popup.js"></script>
<script type="text/javascript" src="../../popups/color_picker.js"></script>
<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script>

<script type="text/javascript">
 var today = new Date();
 var expire = new Date();
if ((screen.width>=1200) && (screen.height>=900))
{
 <? if (!$_COOKIE["HQ"]) { ?>
 alert('High resolution detected ('+screen.width+'x'+screen.height+'). Setting HQ Cookie..');
 expire.setTime(today.getTime() + 3600000*24*5);
 document.cookie = "HQ=1" + ";expires="+expire.toGMTString();
 document.location=document.location;
<? } ?>
} else {
 <? if ($_COOKIE["HQ"]) { ?>
 alert('Resolution changed! ('+screen.width+'x'+screen.height+'). Deleting HQ Cookie..');
 expire.setTime(today.getTime() - 1);
 document.cookie = "HQ=0" + ";expires="+expire.toGMTString();
 document.location=document.location;
<? } ?>
}
</script>
[...]

The plugins/ImageManager/editor.php could be changed to:

//      window.resizeTo(673, 531);  * old
        window.resizeTo((screen.width*0.9), (screen.height*0.9));

The plugins/ImageManager/assets/editor.css could be:

[...]
               #tools
                {
                        width: 100%;
[...]
               #toolbar
                {
                        width: 53px;
                        height: 100%;
[...]

                #contents
                {
                        width: 100%;
                        height: 100%;
                        position: absolute;
                        left: 64px; top: 51px;
                }

                #editor
                {
                        width: 100%;
                        height: 100%;
                }
[...]
#bottom
{
        position: relative;
        top: 100%;
}

Change History (1)

comment:1 Changed 10 years ago by gogo

  • Resolution set to invalid
  • Status changed from new to closed

I'm not fussed on this one...

  • It's very old now, been sitting around for years.
  • It takes one arbitrary sizing and turns it into another arbitrary sizing.
  • I have a huge screen, I wouldn't want the image manager taking it all up without my say so.
  • ImageManager? either needs to be updated to use Xinha.Dialog, or replaced with something like a combination of Mootools FileManager and Ajax Image Editor which if combined would be totally kickass.

I guess if somebody wanted to, they could make this behaviour configurable (default to off), do the CSS properly (don't make a whole new file, just add a class to the body or something), and resubmit it and I'll commit.

Note: See TracTickets for help on using tickets.