aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.sortable.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.sortable.js')
-rw-r--r--ui/jquery.ui.sortable.js86
1 files changed, 43 insertions, 43 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 4093be245..2813b5681 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -59,7 +59,7 @@ $.widget("ui.sortable", $.ui.mouse, {
//Initialize mouse events for interaction
this._mouseInit();
-
+
//We're ready to go
this.ready = true
@@ -79,7 +79,7 @@ $.widget("ui.sortable", $.ui.mouse, {
_setOption: function(key, value){
if ( key === "disabled" ) {
this.options[ key ] = value;
-
+
this.widget().toggleClass( "ui-sortable-disabled", !!value );
} else {
// Don't call widget base _setOption for disable as it adds ui-state-disabled class
@@ -519,7 +519,7 @@ $.widget("ui.sortable", $.ui.mouse, {
? [options.connectWith]
: options.connectWith;
},
-
+
_getItemsAsjQuery: function(connected) {
var self = this;
@@ -692,28 +692,28 @@ $.widget("ui.sortable", $.ui.mouse, {
},
_contactContainers: function(event) {
-
- // get innermost container that intersects with item
- var innermostContainer = null, innermostIndex = null;
-
-
+
+ // get innermost container that intersects with item
+ var innermostContainer = null, innermostIndex = null;
+
+
for (var i = this.containers.length - 1; i >= 0; i--){
- // never consider a container that's located within the item itself
+ // never consider a container that's located within the item itself
if($.contains(this.currentItem[0], this.containers[i].element[0]))
continue;
if(this._intersectsWith(this.containers[i].containerCache)) {
- // if we've already found a container and it's more "inner" than this, then continue
+ // if we've already found a container and it's more "inner" than this, then continue
if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0]))
continue;
- innermostContainer = this.containers[i];
+ innermostContainer = this.containers[i];
innermostIndex = i;
-
+
} else {
- // container doesn't intersect. trigger "out" event if necessary
+ // container doesn't intersect. trigger "out" event if necessary
if(this.containers[i].containerCache.over) {
this.containers[i]._trigger("out", event, this._uiHash(this));
this.containers[i].containerCache.over = 0;
@@ -721,42 +721,42 @@ $.widget("ui.sortable", $.ui.mouse, {
}
}
-
- // if no intersecting containers found, return
- if(!innermostContainer) return;
+
+ // if no intersecting containers found, return
+ if(!innermostContainer) return;
// move the item into the container if it's not there already
if(this.containers.length === 1) {
this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
this.containers[innermostIndex].containerCache.over = 1;
- } else if(this.currentContainer != this.containers[innermostIndex]) {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top'];
- for (var j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
- var cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top'];
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- }
- }
-
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
- return;
-
- this.currentContainer = this.containers[innermostIndex];
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+ } else if(this.currentContainer != this.containers[innermostIndex]) {
+
+ //When entering a new container, we will find the item with the least distance and append our item near it
+ var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top'];
+ for (var j = this.items.length - 1; j >= 0; j--) {
+ if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
+ var cur = this.items[j][this.containers[innermostIndex].floating ? 'left' : 'top'];
+ if(Math.abs(cur - base) < dist) {
+ dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+ }
+ }
+
+ if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
+ return;
+
+ this.currentContainer = this.containers[innermostIndex];
+ itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
+ this._trigger("change", event, this._uiHash());
+ this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
+
+ //Update the placeholder
+ this.options.placeholder.update(this.currentContainer, this.placeholder);
+
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
+ }
+
+
},
_createHelper: function(event) {
backport/47801/stable30 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/l10n/zh_HK.js
blob: be070a11a564d49d7a51071add2c350807f9d01f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160