~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to gis/dhis-gis-geostat/mfbase/ext/air/src/NativeDD.js

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Ext JS Library 0.20
 
3
 * Copyright(c) 2006-2008, Ext JS, LLC.
 
4
 * licensing@extjs.com
 
5
 * 
 
6
 * http://extjs.com/license
 
7
 */
 
8
 
 
9
 
 
10
/**
 
11
 * @class Ext.air.DragType
 
12
 * 
 
13
 * Drag drop type constants
 
14
 * 
 
15
 * @singleton
 
16
 */
 
17
Ext.air.DragType = {
 
18
        /**
 
19
         * Constant for text data
 
20
         */
 
21
        TEXT : 'text/plain',
 
22
        /**
 
23
         * Constant for html data
 
24
         */
 
25
        HTML : 'text/html',
 
26
        /**
 
27
         * Constant for url data
 
28
         */
 
29
        URL : 'text/uri-list',
 
30
        /**
 
31
         * Constant for bitmap data
 
32
         */
 
33
        BITMAP : 'image/x-vnd.adobe.air.bitmap',
 
34
        /**
 
35
         * Constant for file list data
 
36
         */
 
37
        FILES : 'application/x-vnd.adobe.air.file-list'
 
38
};
 
39
 
 
40
 
 
41
// workaround for DD dataTransfer Clipboard not having hasFormat
 
42
 
 
43
Ext.apply(Ext.EventObjectImpl.prototype, {
 
44
        hasFormat : function(format){
 
45
                if (this.browserEvent.dataTransfer) {
 
46
                        for (var i = 0, len = this.browserEvent.dataTransfer.types.length; i < len; i++) {
 
47
                                if(this.browserEvent.dataTransfer.types[i] == format) {
 
48
                                        return true;
 
49
                                }
 
50
                        }
 
51
                }
 
52
                return false;
 
53
        },
 
54
        
 
55
        getData : function(type){
 
56
                return this.browserEvent.dataTransfer.getData(type);
 
57
        }
 
58
});
 
59
 
 
60