source: branches/1.2/workflow/js/htmlarea/plugins/UploadImage/popups/ImageEditor/man_image.html @ 1349

Revision 1349, 3.8 KB checked in by niltonneto, 15 years ago (diff)

Ticket #561 - Inclusão do módulo Workflow faltante nessa versão.

  • Property svn:executable set to *
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<HTML>
3<HEAD>
4<script type="text/javascript" src="jscripts/wz_jsgraphics.js"></script>
5<script type="text/javascript" src="jscripts/EditorContent.js"></script>
6<style>
7<!--
8.crop{cursor:crosshair;}
9.selection{
10    border: dotted 1px #000000;
11    position:absolute;
12    width: 0px;
13    height: 1px;
14    z-index:5;
15}
16.selectionWhite{
17    border: dotted 1px #FFFFFF;
18    position:absolute;
19    width: 0px;
20    height: 1px;
21    z-index:5;
22}
23.handleBox{
24    z-index:105;
25}
26
27-->
28</style>
29<script type="text/javascript">
30
31var t_cx = MM_findObj('cx', window.top.document);
32var t_cy = MM_findObj('cy', window.top.document);
33var t_cw = MM_findObj('cw', window.top.document);
34var t_ch = MM_findObj('ch', window.top.document);
35
36var m_sx = MM_findObj('sx', window.top.document);
37var m_sy = MM_findObj('sy', window.top.document);
38var m_w = MM_findObj('mw', window.top.document);
39var m_h = MM_findObj('mh', window.top.document);
40var m_a = MM_findObj('ma', window.top.document);
41var m_d = MM_findObj('md', window.top.document);
42
43var s_sw = MM_findObj('sw', window.top.document);
44var s_sh = MM_findObj('sh', window.top.document);
45
46var r_ra = MM_findObj('ra', window.top.document);
47
48var mode = "<? echo $action; ?>" //crop, scale, measure
49var pattern = "2x2.gif";
50
51function doSubmit(action)
52{
53    var image = escape("<? echo $path.$image; ?>");
54
55    if (action == 'crop')
56    {
57
58        var url = "load_image.php?img="+image+"&action=crop&params="+parseInt(t_cx.value)+','+parseInt(t_cy.value)+','+ parseInt(t_cw.value)+','+parseInt(t_ch.value);
59
60        //alert(url);
61        location.href = url;
62
63        //location.reload();
64    }   
65    else if (action == 'scale')
66    {
67        var url = "load_image.php?img="+image+"&action=scale&params="+parseInt(s_sw.value)+','+parseInt(s_sh.value);
68        //alert(url);
69        location.href = url;
70       
71    }
72    else if (action == 'rotate')
73    {
74        var flip = MM_findObj('flip', window.top.document);
75
76        if(flip.value == 'hoz' || flip.value == 'ver')
77            location.href = "load_image.php?img="+image+"&action=flip&params="+flip.value;
78        else if (isNaN(parseFloat(r_ra.value))==false)
79            location.href = "load_image.php?img="+image+"&action=rotate&params="+parseFloat(r_ra.value);
80    }
81    else if(action == 'save') {
82        var s_file = MM_findObj('save_filename', window.top.document);
83        var s_format = MM_findObj('save_format', window.top.document);
84        var s_quality = MM_findObj('quality',window.top.document);
85
86        var format = s_format.value.split(",");
87        if(s_file.value.length <= 0) {
88            alert('Please enter a filename to save.');
89        }
90        else
91        {
92            var filename = escape(s_file.value);
93            var quality = parseInt(s_quality.value);
94            var url = "load_image.php?img="+image+"&action=save&params="+format[0]+","+quality+"&file="+filename;
95            //alert(url);
96            location.href = url;
97        }
98    }
99}
100
101
102</script>
103</HEAD>
104
105<BODY bgcolor="#CCCCCC" onLoad="init();">
106<div id="status"></div>
107<div id="ant" class="selection" style="visibility:hidden"><IMG SRC="spacer.gif" WIDTH="0" HEIGHT="0" BORDER="0" ALT="" id="cropContent"></div>
108<table cellpadding="0" cellspacing="0" width="100%" height="100%">
109 <Tr height="100%">
110   <Td align="center" height="100%">
111   <span id="imgCanvas" class="crop"><IMG SRC="<? echo $path.$image; ?>" <? echo $dimensions; ?> BORDER=0 ALT="" id="theImage" name="theImage"></span>
112   </td>
113 </tr>
114</table>
115<script type="text/javascript">
116<!--
117
118var jg_doc = new jsGraphics("imgCanvas"); // draw directly into document
119jg_doc.setColor("#000000"); // black
120
121<?
122    if(isset($save_file) && is_file($BASE_DIR.$path.$save_file)) {
123        echo "alert('$save_file saved')";
124    }
125
126?>
127
128//-->
129</script>
130</BODY>
131</HTML>
Note: See TracBrowser for help on using the repository browser.