diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js')
-rwxr-xr-x | framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js b/framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js index 59c62cc2..511c2ab9 100755 --- a/framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js +++ b/framework/Web/Javascripts/source/prado/activecontrols/dragdrop.js @@ -1,61 +1,61 @@ -/**
- * DropContainer control
- */
-
-Prado.WebUI.DropContainer = Class.create(Prado.WebUI.CallbackControl,
-{
- onInit: function(options)
- {
- this.options = options;
- Object.extend (this.options,
- {
- onDrop: this.onDrop.bind(this)
- });
-
- Droppables.add (options.ID, this.options);
- },
-
- onDrop: function(dragElement, dropElement, event)
- {
- var elementId=dragElement.id.replace(/clone_/,"");
- var req = new Prado.CallbackRequest(this.options.EventTarget, this.options);
- var curleft = curtop = 0;
- var obj = dropElement;
- if (obj.offsetParent) {
- curleft = obj.offsetLeft
- curtop = obj.offsetTop
- while (obj = obj.offsetParent) {
- curleft += obj.offsetLeft
- curtop += obj.offsetTop
- }
- }
- var scrOfX = 0, scrOfY = 0;
- if( typeof( window.pageYOffset ) == 'number' ) {
- //Netscape compliant
- scrOfY = window.pageYOffset;
- scrOfX = window.pageXOffset;
- } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
- //DOM compliant
- scrOfY = document.body.scrollTop;
- scrOfX = document.body.scrollLeft;
- } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
- //IE6 standards compliant mode
- scrOfY = document.documentElement.scrollTop;
- scrOfX = document.documentElement.scrollLeft;
- }
- req.setCallbackParameter({
- DragElementID : elementId,
- ScreenX : event.screenX,
- ScreenY : event.screenY,
- OffsetX : event.offsetX || event.clientX - curleft + scrOfX,
- OffsetY : event.offsetY || event.clientY - curtop + scrOfY,
- ClientX : event.clientX,
- ClientY : event.clientY,
- AltKey : event.altKey,
- CtrlKey : event.ctrlKey,
- ShiftKey : event.shiftKey
- });
- req.dispatch();
-
- }
-});
+/** + * DropContainer control + */ + +Prado.WebUI.DropContainer = Class.create(Prado.WebUI.CallbackControl, +{ + onInit: function(options) + { + this.options = options; + Object.extend (this.options, + { + onDrop: this.onDrop.bind(this) + }); + + Droppables.add (options.ID, this.options); + }, + + onDrop: function(dragElement, dropElement, event) + { + var elementId=dragElement.id.replace(/clone_/,""); + var req = new Prado.CallbackRequest(this.options.EventTarget, this.options); + var curleft = curtop = 0; + var obj = dropElement; + if (obj.offsetParent) { + curleft = obj.offsetLeft + curtop = obj.offsetTop + while (obj = obj.offsetParent) { + curleft += obj.offsetLeft + curtop += obj.offsetTop + } + } + var scrOfX = 0, scrOfY = 0; + if( typeof( window.pageYOffset ) == 'number' ) { + //Netscape compliant + scrOfY = window.pageYOffset; + scrOfX = window.pageXOffset; + } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { + //DOM compliant + scrOfY = document.body.scrollTop; + scrOfX = document.body.scrollLeft; + } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { + //IE6 standards compliant mode + scrOfY = document.documentElement.scrollTop; + scrOfX = document.documentElement.scrollLeft; + } + req.setCallbackParameter({ + DragElementID : elementId, + ScreenX : event.screenX, + ScreenY : event.screenY, + OffsetX : event.offsetX || event.clientX - curleft + scrOfX, + OffsetY : event.offsetY || event.clientY - curtop + scrOfY, + ClientX : event.clientX, + ClientY : event.clientY, + AltKey : event.altKey, + CtrlKey : event.ctrlKey, + ShiftKey : event.shiftKey + }); + req.dispatch(); + + } +}); |