source: trunk/plugins/ImageManager/manager.php @ 770

Last change on this file since 770 was 770, checked in by ray, 13 years ago

Ticket #980 ImageManager? color format bug

  • Property svn:keywords set to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
File size: 6.7 KB
RevLine 
[111]1<?php
[43]2/**
3 * The main GUI for the ImageManager.
[677]4 * @author $Author$
5 * @version $Id$
[43]6 * @package ImageManager
7 */
8
9        require_once('config.inc.php');
10        require_once('ddt.php');
11        require_once('Classes/ImageManager.php');
12       
13        $manager = new ImageManager($IMConfig);
14        $dirs = $manager->getDirs();
15
16?>
17<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
18
19<html>
20<head>
21        <title>Insert Image</title>
[256]22  <script type="text/javascript">
23    // temporary. An ImageManager rewrite will take care of this kludge.
24    _backend_url = "<?php print $IMConfig['backend_url']; ?>";
25    _resized_prefix = "<?php echo $IMConfig['resized_prefix']; ?>";
26    _resized_dir = "<?php echo $IMConfig['resized_dir']; ?>";
27  </script>
[43]28  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
[256]29 <link href="<?php print $IMConfig['base_url'];?>assets/manager.css" rel="stylesheet" type="text/css" />
30<script type="text/javascript" src="../../popups/popup.js"></script>
[252]31<script type="text/javascript" src="assets/popup.js"></script>
[700]32<script type="text/javascript" src="../../modules/ColorPicker/ColorPicker.js"></script>
[111]33<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/dialog.js"></script>
[43]34<script type="text/javascript">
35/*<![CDATA[*/
36        if(window.opener)
[60]37                HTMLArea = window.opener.HTMLArea;
[43]38
[111]39        var thumbdir = "<?php echo $IMConfig['thumbnail_dir']; ?>";
40        var base_url = "<?php echo $manager->getImagesURL(); ?>";
[43]41/*]]>*/
42</script>
[111]43<script type="text/javascript" src="<?php print $IMConfig['base_url'];?>assets/manager.js"></script>
[43]44</head>
45<body>
[493]46
[111]47<form action="<?php print $IMConfig['backend_url'] ?>" id="uploadForm" method="post" enctype="multipart/form-data">
[43]48
[48]49<input type="hidden" name="__plugin" value="ImageManager">
50<input type="hidden" name="__function" value="images">
[43]51
[256]52<fieldset>
53  <legend>Image Manager</legend>
54  <table width="100%">
55    <tr>
56      <th><label for="dirPath">Directory</label></th>
57      <td>
58        <select name="dir" class="dirWidth" id="dirPath" onchange="updateDir(this)">
59          <option value="/">/</option>
60          <?php
61            foreach($dirs as $relative=>$fullpath)
62            {
63              ?>
64              <option value="<?php echo rawurlencode($relative); ?>"><?php echo $relative; ?></option>
65              <?php
66            }
67          ?>
68        </select>
69      </td>
70      <td>
71        <a href="#" onclick="javascript: goUpDir();" title="Directory Up"><img src="<?php print $IMConfig['base_url']; ?>img/btnFolderUp.gif" height="15" width="15" alt="Directory Up" /></a>
72
73        <?php
74          if($IMConfig['safe_mode'] == false && $IMConfig['allow_new_dir'])
75          {
76            ?>
77            <a href="#" onclick="newFolder();" title="New Folder"><img src="<?php print $IMConfig['base_url']; ?>img/btnFolderNew.gif" height="15" width="15" alt="New Folder" /></a>
78            <?php
79          }
80          ?>
81      </td>
82    </tr>
83    <?php
84      if($IMConfig['allow_upload'] == TRUE)
85      {
86        ?>
87        <tr>
88          <th align="left">Upload:</th>
89          <td colspan="2">
90            <input type="file" name="upload" id="upload" />
91            <input name="Upload" type="submit" id="Upload" value="Upload" onclick="doUpload();" />
92          </td>
93        </tr>
94        <?php
95      }
96    ?>
97
98  </table>
99
100  <div id="messages" style="display: none;"><span id="message"></span><img SRC="<?php print $IMConfig['base_url']; ?>img/dots.gif" width="22" height="12" alt="..." /></div>
101
102  <iframe src="<?php print $IMConfig['backend_url']; ?>__function=images" name="imgManager" id="imgManager" class="imageFrame" scrolling="auto" title="Image Selection" frameborder="0"></iframe>
103
[43]104</fieldset>
[256]105
[43]106<!-- image properties -->
[256]107
[447]108<table  border="0" cellspacing="0" cellpadding="0" width="100%">
[256]109  <tr>
110    <th align="left">Description:</th>
111    <td colspan="6">
[447]112      <input type="text" id="f_alt" style="width:95%"/>
[256]113    </td>
[447]114    <td rowspan="4" width="100" height="100" valign="middle" style="padding:4px;background-color:#CCC;border:1px inset;">
115      <img src="" id="f_preview" />
116    </td>
[256]117  </tr>
118
119  <tr>
120    <th align="left">Width:</th>
121    <td >
122      <input id="f_width" type="text" name="f_width" size="4" onchange="javascript:checkConstrains('width');" />
123    </td>
124    <td rowspan="2">
125      <div  style="position:relative">
126        <img src="<?php print $IMConfig['base_url']; ?>img/locked.gif" id="imgLock" width="25" height="32" alt="Constrained Proportions" valign="middle" /><input type="checkbox" id="constrain_prop" checked="checked" onclick="javascript:toggleConstrains(this);" style="position:absolute;top:8px;left:0px;" />
127      </div>
128    </td>
129    <th align="left">Margin:</th>
130    <td colspan="3">
131      <input name="f_margin" type="text" id="f_margin" size="3" />
132      px </td>
133  </tr>
134
135  <tr>
136    <th align="left">Height:</th>
137    <td>
138      <input name="f_height" type="text" id="f_height" size="4" />
139    </td>
140    <th align="left">Padding:</th>
141    <td>
142      <input name="f_padding" type="text" id="f_padding" size="3" />
143      px </td>
144    <th align="left">Color:</th>
145    <td>
146      <input name="f_backgroundColor" type="text" id="f_backgroundColor" size="7" />
[770]147     
[256]148    </td>
149  </tr>
150
151
152  <tr>
[524]153    <th align="left">Alignment:</th>
[256]154    <td colspan="2">
155      <select size="1" id="f_align"  title="Positioning of this image">
156        <option value=""                             >Not set</option>
157        <option value="left"                         >Left</option>
158        <option value="right"                        >Right</option>
159        <option value="texttop"                      >Texttop</option>
160        <option value="absmiddle"                    >Absmiddle</option>
161        <option value="baseline" selected="selected" >Baseline</option>
162        <option value="absbottom"                    >Absbottom</option>
163        <option value="bottom"                       >Bottom</option>
164        <option value="middle"                       >Middle</option>
165        <option value="top"                          >Top</option>
166      </select>
167    </td>
168    <th align="left">Border:</th>
169    <td>
170      <input name="f_border" type="text" id="f_border" size="3" />
171      px </td>
172    <th align="left">Color:</th>
173    <td>
174      <input name="f_borderColor" type="text" id="f_borderColor" size="7" />
[770]175     
[256]176    </td>
177  </tr>
178
179</table>
180
181<div style="text-align: right;">
182  <hr />
183  <button type="button" class="buttons" onclick="return refresh();">Refresh</button>
184  <button type="button" class="buttons" onclick="return onOK();">OK</button>
185  <button type="button" class="buttons" onclick="return onCancel();">Cancel</button>
186</div>
187
188<!--// image properties -->
189<input type="hidden" id="orginal_width" />
190<input type="hidden" id="orginal_height" />
191<input type="hidden" id="f_url" class="largelWidth" value="" />
[43]192</form>
193</body>
[256]194</html>
Note: See TracBrowser for help on using the repository browser.