2 EditAreaLoader.prototype.start_resize_area= function(){
\r
3 var d=document,a,div,width,height,father;
\r
5 d.onmouseup= editAreaLoader.end_resize_area;
\r
6 d.onmousemove= editAreaLoader.resize_area;
\r
7 editAreaLoader.toggle(editAreaLoader.resize["id"]);
\r
9 a = editAreas[editAreaLoader.resize["id"]]["textarea"];
\r
10 div = d.getElementById("edit_area_resize");
\r
12 div= d.createElement("div");
\r
13 div.id="edit_area_resize";
\r
14 div.style.border="dashed #888888 1px";
\r
16 width = a.offsetWidth -2;
\r
17 height = a.offsetHeight -2;
\r
19 div.style.display = "block";
\r
20 div.style.width = width+"px";
\r
21 div.style.height = height+"px";
\r
22 father= a.parentNode;
\r
23 father.insertBefore(div, a);
\r
25 a.style.display="none";
\r
27 editAreaLoader.resize["start_top"]= calculeOffsetTop(div);
\r
28 editAreaLoader.resize["start_left"]= calculeOffsetLeft(div);
\r
31 EditAreaLoader.prototype.end_resize_area= function(e){
\r
32 var d=document,div,a,width,height;
\r
37 div = d.getElementById("edit_area_resize");
\r
38 a= editAreas[editAreaLoader.resize["id"]]["textarea"];
\r
39 width = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);
\r
40 height = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);
\r
41 if(editAreaLoader.isIE==6){
\r
45 a.style.width = width+"px";
\r
46 a.style.height = height+"px";
\r
47 div.style.display = "none";
\r
48 a.style.display = "inline";
\r
49 a.selectionStart = editAreaLoader.resize["selectionStart"];
\r
50 a.selectionEnd = editAreaLoader.resize["selectionEnd"];
\r
51 editAreaLoader.toggle(editAreaLoader.resize["id"]);
\r
56 EditAreaLoader.prototype.resize_area= function(e){
\r
57 var allow,newHeight,newWidth;
\r
58 allow = editAreas[editAreaLoader.resize["id"]]["settings"]["allow_resize"];
\r
59 if(allow=="both" || allow=="y")
\r
61 newHeight = Math.max(20, getMouseY(e)- editAreaLoader.resize["start_top"]);
\r
62 document.getElementById("edit_area_resize").style.height= newHeight+"px";
\r
64 if(allow=="both" || allow=="x")
\r
66 newWidth= Math.max(20, getMouseX(e)- editAreaLoader.resize["start_left"]);
\r
67 document.getElementById("edit_area_resize").style.width= newWidth+"px";
\r
73 editAreaLoader.waiting_loading["resize_area.js"]= "loaded";
\r