--- /dev/null
+ \r
+ EditAreaLoader.prototype.start_resize_area= function(){\r
+ var d=document,a,div,width,height,father;\r
+ \r
+ d.onmouseup= editAreaLoader.end_resize_area;\r
+ d.onmousemove= editAreaLoader.resize_area;\r
+ editAreaLoader.toggle(editAreaLoader.resize["id"]); \r
+ \r
+ a = editAreas[editAreaLoader.resize["id"]]["textarea"];\r
+ div = d.getElementById("edit_area_resize");\r
+ if(!div){\r
+ div= d.createElement("div");\r
+ div.id="edit_area_resize";\r
+ div.style.border="dashed #888888 1px";\r
+ }\r
+ width = a.offsetWidth -2;\r
+ height = a.offsetHeight -2;\r
+ \r
+ div.style.display = "block";\r
+ div.style.width = width+"px";\r
+ div.style.height = height+"px";\r
+ father= a.parentNode;\r
+ father.insertBefore(div, a);\r
+ \r
+ a.style.display="none";\r
+ \r
+ editAreaLoader.resize["start_top"]= calculeOffsetTop(div);\r
+ editAreaLoader.resize["start_left"]= calculeOffsetLeft(div); \r
+ };\r
+ \r
+ EditAreaLoader.prototype.end_resize_area= function(e){\r
+ var d=document,div,a,width,height;\r
+ \r
+ d.onmouseup="";\r
+ d.onmousemove=""; \r
+ \r
+ div = d.getElementById("edit_area_resize"); \r
+ a= editAreas[editAreaLoader.resize["id"]]["textarea"];\r
+ width = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);\r
+ height = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);\r
+ if(editAreaLoader.isIE==6){\r
+ width-=2;\r
+ height-=2; \r
+ }\r
+ a.style.width = width+"px";\r
+ a.style.height = height+"px";\r
+ div.style.display = "none";\r
+ a.style.display = "inline";\r
+ a.selectionStart = editAreaLoader.resize["selectionStart"];\r
+ a.selectionEnd = editAreaLoader.resize["selectionEnd"];\r
+ editAreaLoader.toggle(editAreaLoader.resize["id"]);\r
+ \r
+ return false;\r
+ };\r
+ \r
+ EditAreaLoader.prototype.resize_area= function(e){ \r
+ var allow,newHeight,newWidth;\r
+ allow = editAreas[editAreaLoader.resize["id"]]["settings"]["allow_resize"];\r
+ if(allow=="both" || allow=="y")\r
+ {\r
+ newHeight = Math.max(20, getMouseY(e)- editAreaLoader.resize["start_top"]);\r
+ document.getElementById("edit_area_resize").style.height= newHeight+"px";\r
+ }\r
+ if(allow=="both" || allow=="x")\r
+ {\r
+ newWidth= Math.max(20, getMouseX(e)- editAreaLoader.resize["start_left"]);\r
+ document.getElementById("edit_area_resize").style.width= newWidth+"px";\r
+ }\r
+ \r
+ return false;\r
+ };\r
+ \r
+ editAreaLoader.waiting_loading["resize_area.js"]= "loaded";\r