diff options
author | patdenice <patdenice@piwigo.org> | 2011-04-12 11:12:51 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-04-12 11:12:51 +0000 |
commit | a740ef91e6689f86011b70c7bbe2589abf78ae6b (patch) | |
tree | bb4a6deb7395b0f545bb760cf34f093e910f1cff /plugins/LocalFilesEditor/editarea/resize_area.js | |
parent | bb7c28f86febddd376ee0400807507991a2d7b48 (diff) |
feature:2262
Replace editarea by Codemirror:
http://codemirror.net
git-svn-id: http://piwigo.org/svn/trunk@10307 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/LocalFilesEditor/editarea/resize_area.js')
-rw-r--r-- | plugins/LocalFilesEditor/editarea/resize_area.js | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/plugins/LocalFilesEditor/editarea/resize_area.js b/plugins/LocalFilesEditor/editarea/resize_area.js deleted file mode 100644 index 191e8cec1..000000000 --- a/plugins/LocalFilesEditor/editarea/resize_area.js +++ /dev/null @@ -1,73 +0,0 @@ -
- EditAreaLoader.prototype.start_resize_area= function(){
- var d=document,a,div,width,height,father;
-
- d.onmouseup= editAreaLoader.end_resize_area;
- d.onmousemove= editAreaLoader.resize_area;
- editAreaLoader.toggle(editAreaLoader.resize["id"]);
-
- a = editAreas[editAreaLoader.resize["id"]]["textarea"];
- div = d.getElementById("edit_area_resize");
- if(!div){
- div= d.createElement("div");
- div.id="edit_area_resize";
- div.style.border="dashed #888888 1px";
- }
- width = a.offsetWidth -2;
- height = a.offsetHeight -2;
-
- div.style.display = "block";
- div.style.width = width+"px";
- div.style.height = height+"px";
- father= a.parentNode;
- father.insertBefore(div, a);
-
- a.style.display="none";
-
- editAreaLoader.resize["start_top"]= calculeOffsetTop(div);
- editAreaLoader.resize["start_left"]= calculeOffsetLeft(div);
- };
-
- EditAreaLoader.prototype.end_resize_area= function(e){
- var d=document,div,a,width,height;
-
- d.onmouseup="";
- d.onmousemove="";
-
- div = d.getElementById("edit_area_resize");
- a= editAreas[editAreaLoader.resize["id"]]["textarea"];
- width = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);
- height = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);
- if(editAreaLoader.isIE==6){
- width-=2;
- height-=2;
- }
- a.style.width = width+"px";
- a.style.height = height+"px";
- div.style.display = "none";
- a.style.display = "inline";
- a.selectionStart = editAreaLoader.resize["selectionStart"];
- a.selectionEnd = editAreaLoader.resize["selectionEnd"];
- editAreaLoader.toggle(editAreaLoader.resize["id"]);
-
- return false;
- };
-
- EditAreaLoader.prototype.resize_area= function(e){
- var allow,newHeight,newWidth;
- allow = editAreas[editAreaLoader.resize["id"]]["settings"]["allow_resize"];
- if(allow=="both" || allow=="y")
- {
- newHeight = Math.max(20, getMouseY(e)- editAreaLoader.resize["start_top"]);
- document.getElementById("edit_area_resize").style.height= newHeight+"px";
- }
- if(allow=="both" || allow=="x")
- {
- newWidth= Math.max(20, getMouseX(e)- editAreaLoader.resize["start_left"]);
- document.getElementById("edit_area_resize").style.width= newWidth+"px";
- }
-
- return false;
- };
-
- editAreaLoader.waiting_loading["resize_area.js"]= "loaded";
|