Ignore:
Timestamp:
05/04/05 07:08:32 (15 years ago)
Author:
niko
Message:

#225
several ImageManager? fixes, see #225 for details

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/ImageManager/editor.php

    r60 r111  
    2121        <title></title> 
    2222<script type="text/javascript"> 
    23 _backend_url = "<? print $IMConfig['backend_url']; ?>"; 
     23_backend_url = "<?php print $IMConfig['backend_url']; ?>"; 
    2424</script> 
    25         <link href="<? print $IMConfig['base_url'];?>assets/editor.css" rel="stylesheet" type="text/css" />      
    26 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/slider.js"></script> 
    27 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/popup.js"></script> 
     25        <link href="<?php print $IMConfig['base_url'];?>assets/editor.css" rel="stylesheet" type="text/css" />   
     26<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/slider.js"></script> 
     27<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/popup.js"></script> 
    2828<script type="text/javascript"> 
    2929/*<![CDATA[*/ 
     
    3434/*]]>*/ 
    3535</script> 
    36 <script type="text/javascript" src="<? print $IMConfig['base_url'];?>assets/editor.js"></script> 
     36<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/editor.js"></script> 
    3737</head> 
    3838 
    3939<body> 
    4040<div id="indicator"> 
    41 <img src="<? print $IMConfig['base_url'];?>img/spacer.gif" id="indicator_image" height="20" width="20" alt="" /> 
     41<img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" id="indicator_image" height="20" width="20" alt="" /> 
    4242</div> 
    4343<div id="tools"> 
     
    4848                        <label for="cw">Width:</label><input type="text" id="cw" class="textInput" onchange="updateMarker('crop')"/> 
    4949                        <label for="ch">Height:</label><input type="text" id="ch" class="textInput" onchange="updateMarker('crop')"/> 
    50                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     50                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    5151                </div>   
    52                 <a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
    53                 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>           
     52                <a href="javascript: editor.doSubmit('crop');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
     53                <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>                
    5454        </div>   
    5555        <div id="tools_scale" style="display:none;"> 
    5656                <div id="tool_inputs"> 
    5757                        <label for="sw">Width:</label><input type="text" id="sw" class="textInput" onchange="checkConstrains('width')"/> 
    58                         <a href="javascript:toggleConstraints();" title="Lock"><img src="<? print $IMConfig['base_url'];?>img/islocked2.gif" id="scaleConstImg" height="14" width="8" alt="Lock" class="div" /></a><label for="sh">Height:</label> 
     58                        <a href="javascript:toggleConstraints();" title="Lock"><img src="<?php print $IMConfig['base_url'];?>img/islocked2.gif" id="scaleConstImg" height="14" width="8" alt="Lock" class="div" /></a><label for="sh">Height:</label> 
    5959                        <input type="text" id="sh" class="textInput" onchange="checkConstrains('height')"/> 
    6060                        <input type="checkbox" id="constProp" value="1" checked="checked" onclick="toggleConstraints()"/> 
    6161                        <label for="constProp">Constrain Proportions</label> 
    62                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     62                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    6363                </div>   
    64                 <a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
    65                 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>           
     64                <a href="javascript: editor.doSubmit('scale');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
     65                <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>                
    6666        </div>   
    6767        <div id="tools_rotate" style="display:none;"> 
     
    8282         </select> 
    8383                        <label for="ra">Angle:</label><input type="text" id="ra" class="textInput" /> 
    84                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     84                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    8585                </div>   
    86                 <a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
    87                 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>           
     86                <a href="javascript: editor.doSubmit('rotate');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
     87                <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>                
    8888        </div>           
    8989        <div id="tools_measure" style="display:none;"> 
     
    9191                        <label>X:</label><input type="text" class="measureStats" id="sx" /> 
    9292                        <label>Y:</label><input type="text" class="measureStats" id="sy" /> 
    93                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     93                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    9494                        <label>W:</label><input type="text" class="measureStats" id="mw" /> 
    9595                        <label>H:</label><input type="text" class="measureStats" id="mh" /> 
    96                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     96                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    9797                        <label>A:</label><input type="text" class="measureStats" id="ma" />              
    9898                        <label>D:</label><input type="text" class="measureStats" id="md" />              
    99                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     99                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    100100                        <button type="button" onclick="editor.reset();" >Clear</button> 
    101101                </div>   
     
    103103        <div id="tools_save" style="display:none;"> 
    104104                <div id="tool_inputs"> 
    105                         <label for="save_filename">Filename:</label><input type="text" id="save_filename" value="<? echo $editor->getDefaultSaveFile();?>"/> 
     105                        <label for="save_filename">Filename:</label><input type="text" id="save_filename" value="<?php echo $editor->getDefaultSaveFile();?>"/> 
    106106                        <select name="format" id="save_format" style="margin-left: 10px; vertical-align: middle;" onchange="updateFormat(this)"> 
    107107            <option value="" selected>Image Format</option> 
     
    111111            <option value="jpeg,35">JPEG Low</option> 
    112112            <option value="png">PNG</option> 
    113                         <? if($editor->isGDGIFAble() != -1) { ?> 
     113                        <?php if($editor->isGDGIFAble() != -1) { ?> 
    114114            <option value="gif">GIF</option> 
    115                         <? } ?> 
     115                        <?php } ?> 
    116116         </select> 
    117117                        <label>Quality:</label> 
     
    120120                                <td> 
    121121                                        <div id="slidercasing">  
    122                                 <div id="slidertrack" style="width:100px"><img src="<? print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 
    123             <div id="sliderbar" style="left:85px" onmousedown="captureStart();"><img src="<? print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 
     122                                <div id="slidertrack" style="width:100px"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 
     123            <div id="sliderbar" style="left:85px" onmousedown="captureStart();"><img src="<?php print $IMConfig['base_url'];?>img/spacer.gif" width="1" height="1" border="0" alt="track"></div> 
    124124                        </div>   
    125125                                </td> 
     
    127127                        </table>                                 
    128128                        <input type="text" id="quality" onchange="updateSlider(this.value)" style="width: 2em;" value="85"/> 
    129                         <img src="<? print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
     129                        <img src="<?php print $IMConfig['base_url'];?>img/div.gif" height="30" width="2" class="div" alt="|" /> 
    130130                </div>   
    131                 <a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="<? print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
    132                 <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<? print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>           
     131                <a href="javascript: editor.doSubmit('save');" class="buttons" title="OK"><img src="<?php print $IMConfig['base_url'];?>img/btn_ok.gif" height="30" width="30" alt="OK" /></a> 
     132                <a href="javascript: editor.reset();" class="buttons" title="Cancel"><img src="<?php print $IMConfig['base_url'];?>img/btn_cancel.gif" height="30" width="30" alt="Cancel" /></a>                
    133133        </div>   
    134134</div> 
    135135<div id="toolbar"> 
    136 <a href="javascript:toggle('crop')" id="icon_crop" title="Crop"><img src="<? print $IMConfig['base_url'];?>img/crop.gif" height="20" width="20" alt="Crop" /><span>Crop</span></a> 
    137 <a href="javascript:toggle('scale')" id="icon_scale" title="Resize"><img src="<? print $IMConfig['base_url'];?>img/scale.gif" height="20" width="20" alt="Resize" /><span>Resize</span></a> 
    138 <a href="javascript:toggle('rotate')" id="icon_rotate" title="Rotate"><img src="<? print $IMConfig['base_url'];?>img/rotate.gif" height="20" width="20" alt="Rotate" /><span>Rotate</span></a> 
    139 <a href="javascript:toggle('measure')" id="icon_measure" title="Measure"><img src="<? print $IMConfig['base_url'];?>img/measure.gif" height="20" width="20" alt="Measure" /><span>Measure</span></a> 
    140 <a href="javascript: toggleMarker();" title="Marker"><img id="markerImg" src="<? print $IMConfig['base_url'];?>img/t_black.gif" height="20" width="20" alt="Marker" /><span>Marker</span></a> 
    141 <a href="javascript:toggle('save')" id="icon_save" title="Save"><img src="<? print $IMConfig['base_url'];?>img/save.gif" height="20" width="20" alt="Save" /><span>Save</span></a> 
     136<a href="javascript:toggle('crop')" id="icon_crop" title="Crop"><img src="<?php print $IMConfig['base_url'];?>img/crop.gif" height="20" width="20" alt="Crop" /><span>Crop</span></a> 
     137<a href="javascript:toggle('scale')" id="icon_scale" title="Resize"><img src="<?php print $IMConfig['base_url'];?>img/scale.gif" height="20" width="20" alt="Resize" /><span>Resize</span></a> 
     138<a href="javascript:toggle('rotate')" id="icon_rotate" title="Rotate"><img src="<?php print $IMConfig['base_url'];?>img/rotate.gif" height="20" width="20" alt="Rotate" /><span>Rotate</span></a> 
     139<a href="javascript:toggle('measure')" id="icon_measure" title="Measure"><img src="<?php print $IMConfig['base_url'];?>img/measure.gif" height="20" width="20" alt="Measure" /><span>Measure</span></a> 
     140<a href="javascript: toggleMarker();" title="Marker"><img id="markerImg" src="<?php print $IMConfig['base_url'];?>img/t_black.gif" height="20" width="20" alt="Marker" /><span>Marker</span></a> 
     141<a href="javascript:toggle('save')" id="icon_save" title="Save"><img src="<?php print $IMConfig['base_url'];?>img/save.gif" height="20" width="20" alt="Save" /><span>Save</span></a> 
    142142</div> 
    143143<div id="contents"> 
    144 <iframe src="<? print $IMConfig['backend_url']; ?>__function=editorFrame&img=<? if(isset($_GET['img'])) echo rawurlencode($_GET['img']); ?>" name="editor" id="editor"  scrolling="auto" title="Image Editor" frameborder="0"></iframe> 
     144<iframe src="<?php print $IMConfig['backend_url']; ?>__function=editorFrame&img=<?php if(isset($_GET['img'])) echo rawurlencode($_GET['img']); ?>" name="editor" id="editor"  scrolling="auto" title="Image Editor" frameborder="0"></iframe> 
    145145</div> 
    146146<div id="bottom"></div> 
Note: See TracChangeset for help on using the changeset viewer.