alchemy_cms 7.0.5 → 7.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +6 -1
- data/alchemy_cms.gemspec +2 -3
- data/app/assets/javascripts/alchemy/admin.js +0 -1
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +1 -1
- data/app/controllers/alchemy/admin/ingredients_controller.rb +2 -1
- data/app/models/alchemy/page/publisher.rb +14 -12
- data/app/models/alchemy/page_mutex.rb +31 -0
- data/app/models/alchemy/picture/url.rb +9 -1
- data/db/migrate/20231113104432_create_page_mutexes.rb +8 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +0 -1
- data/vendor/assets/javascripts/jquery-ui/data.js +45 -0
- data/vendor/assets/javascripts/jquery-ui/ie.js +20 -0
- data/vendor/assets/javascripts/jquery-ui/keycode.js +51 -0
- data/vendor/assets/javascripts/jquery-ui/plugin.js +49 -0
- data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +46 -0
- data/vendor/assets/javascripts/jquery-ui/safe-blur.js +27 -0
- data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +50 -0
- data/vendor/assets/javascripts/jquery-ui/unique-id.js +54 -0
- data/vendor/assets/javascripts/jquery-ui/version.js +20 -0
- data/vendor/assets/javascripts/jquery-ui/widget.js +754 -0
- data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +1268 -0
- data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +241 -0
- data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +1623 -0
- data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +931 -0
- metadata +36 -34
@@ -0,0 +1,241 @@
|
|
1
|
+
//= require jquery-ui/ie
|
2
|
+
//= require jquery-ui/version
|
3
|
+
//= require jquery-ui/widget
|
4
|
+
|
5
|
+
/*!
|
6
|
+
* jQuery UI Mouse 1.13.0
|
7
|
+
* http://jqueryui.com
|
8
|
+
*
|
9
|
+
* Copyright jQuery Foundation and other contributors
|
10
|
+
* Released under the MIT license.
|
11
|
+
* http://jquery.org/license
|
12
|
+
*/
|
13
|
+
|
14
|
+
//>>label: Mouse
|
15
|
+
//>>group: Widgets
|
16
|
+
//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
|
17
|
+
//>>docs: http://api.jqueryui.com/mouse/
|
18
|
+
|
19
|
+
( function( factory ) {
|
20
|
+
"use strict";
|
21
|
+
|
22
|
+
if ( typeof define === "function" && define.amd ) {
|
23
|
+
|
24
|
+
// AMD. Register as an anonymous module.
|
25
|
+
define( [
|
26
|
+
"jquery",
|
27
|
+
"../ie",
|
28
|
+
"../version",
|
29
|
+
"../widget"
|
30
|
+
], factory );
|
31
|
+
} else {
|
32
|
+
|
33
|
+
// Browser globals
|
34
|
+
factory( jQuery );
|
35
|
+
}
|
36
|
+
} )( function( $ ) {
|
37
|
+
"use strict";
|
38
|
+
|
39
|
+
var mouseHandled = false;
|
40
|
+
$( document ).on( "mouseup", function() {
|
41
|
+
mouseHandled = false;
|
42
|
+
} );
|
43
|
+
|
44
|
+
return $.widget( "ui.mouse", {
|
45
|
+
version: "1.13.0",
|
46
|
+
options: {
|
47
|
+
cancel: "input, textarea, button, select, option",
|
48
|
+
distance: 1,
|
49
|
+
delay: 0
|
50
|
+
},
|
51
|
+
_mouseInit: function() {
|
52
|
+
var that = this;
|
53
|
+
|
54
|
+
this.element
|
55
|
+
.on( "mousedown." + this.widgetName, function( event ) {
|
56
|
+
return that._mouseDown( event );
|
57
|
+
} )
|
58
|
+
.on( "click." + this.widgetName, function( event ) {
|
59
|
+
if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
|
60
|
+
$.removeData( event.target, that.widgetName + ".preventClickEvent" );
|
61
|
+
event.stopImmediatePropagation();
|
62
|
+
return false;
|
63
|
+
}
|
64
|
+
} );
|
65
|
+
|
66
|
+
this.started = false;
|
67
|
+
},
|
68
|
+
|
69
|
+
// TODO: make sure destroying one instance of mouse doesn't mess with
|
70
|
+
// other instances of mouse
|
71
|
+
_mouseDestroy: function() {
|
72
|
+
this.element.off( "." + this.widgetName );
|
73
|
+
if ( this._mouseMoveDelegate ) {
|
74
|
+
this.document
|
75
|
+
.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
76
|
+
.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
77
|
+
}
|
78
|
+
},
|
79
|
+
|
80
|
+
_mouseDown: function( event ) {
|
81
|
+
|
82
|
+
// don't let more than one widget handle mouseStart
|
83
|
+
if ( mouseHandled ) {
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
|
87
|
+
this._mouseMoved = false;
|
88
|
+
|
89
|
+
// We may have missed mouseup (out of window)
|
90
|
+
if ( this._mouseStarted ) {
|
91
|
+
this._mouseUp( event );
|
92
|
+
}
|
93
|
+
|
94
|
+
this._mouseDownEvent = event;
|
95
|
+
|
96
|
+
var that = this,
|
97
|
+
btnIsLeft = ( event.which === 1 ),
|
98
|
+
|
99
|
+
// event.target.nodeName works around a bug in IE 8 with
|
100
|
+
// disabled inputs (#7620)
|
101
|
+
elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
|
102
|
+
$( event.target ).closest( this.options.cancel ).length : false );
|
103
|
+
if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
|
104
|
+
return true;
|
105
|
+
}
|
106
|
+
|
107
|
+
this.mouseDelayMet = !this.options.delay;
|
108
|
+
if ( !this.mouseDelayMet ) {
|
109
|
+
this._mouseDelayTimer = setTimeout( function() {
|
110
|
+
that.mouseDelayMet = true;
|
111
|
+
}, this.options.delay );
|
112
|
+
}
|
113
|
+
|
114
|
+
if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
|
115
|
+
this._mouseStarted = ( this._mouseStart( event ) !== false );
|
116
|
+
if ( !this._mouseStarted ) {
|
117
|
+
event.preventDefault();
|
118
|
+
return true;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
// Click event may never have fired (Gecko & Opera)
|
123
|
+
if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
|
124
|
+
$.removeData( event.target, this.widgetName + ".preventClickEvent" );
|
125
|
+
}
|
126
|
+
|
127
|
+
// These delegates are required to keep context
|
128
|
+
this._mouseMoveDelegate = function( event ) {
|
129
|
+
return that._mouseMove( event );
|
130
|
+
};
|
131
|
+
this._mouseUpDelegate = function( event ) {
|
132
|
+
return that._mouseUp( event );
|
133
|
+
};
|
134
|
+
|
135
|
+
this.document
|
136
|
+
.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
137
|
+
.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
138
|
+
|
139
|
+
event.preventDefault();
|
140
|
+
|
141
|
+
mouseHandled = true;
|
142
|
+
return true;
|
143
|
+
},
|
144
|
+
|
145
|
+
_mouseMove: function( event ) {
|
146
|
+
|
147
|
+
// Only check for mouseups outside the document if you've moved inside the document
|
148
|
+
// at least once. This prevents the firing of mouseup in the case of IE<9, which will
|
149
|
+
// fire a mousemove event if content is placed under the cursor. See #7778
|
150
|
+
// Support: IE <9
|
151
|
+
if ( this._mouseMoved ) {
|
152
|
+
|
153
|
+
// IE mouseup check - mouseup happened when mouse was out of window
|
154
|
+
if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
|
155
|
+
!event.button ) {
|
156
|
+
return this._mouseUp( event );
|
157
|
+
|
158
|
+
// Iframe mouseup check - mouseup occurred in another document
|
159
|
+
} else if ( !event.which ) {
|
160
|
+
|
161
|
+
// Support: Safari <=8 - 9
|
162
|
+
// Safari sets which to 0 if you press any of the following keys
|
163
|
+
// during a drag (#14461)
|
164
|
+
if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
|
165
|
+
event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
|
166
|
+
this.ignoreMissingWhich = true;
|
167
|
+
} else if ( !this.ignoreMissingWhich ) {
|
168
|
+
return this._mouseUp( event );
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
if ( event.which || event.button ) {
|
174
|
+
this._mouseMoved = true;
|
175
|
+
}
|
176
|
+
|
177
|
+
if ( this._mouseStarted ) {
|
178
|
+
this._mouseDrag( event );
|
179
|
+
return event.preventDefault();
|
180
|
+
}
|
181
|
+
|
182
|
+
if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
|
183
|
+
this._mouseStarted =
|
184
|
+
( this._mouseStart( this._mouseDownEvent, event ) !== false );
|
185
|
+
if ( this._mouseStarted ) {
|
186
|
+
this._mouseDrag( event );
|
187
|
+
} else {
|
188
|
+
this._mouseUp( event );
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
return !this._mouseStarted;
|
193
|
+
},
|
194
|
+
|
195
|
+
_mouseUp: function( event ) {
|
196
|
+
this.document
|
197
|
+
.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
|
198
|
+
.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
|
199
|
+
|
200
|
+
if ( this._mouseStarted ) {
|
201
|
+
this._mouseStarted = false;
|
202
|
+
|
203
|
+
if ( event.target === this._mouseDownEvent.target ) {
|
204
|
+
$.data( event.target, this.widgetName + ".preventClickEvent", true );
|
205
|
+
}
|
206
|
+
|
207
|
+
this._mouseStop( event );
|
208
|
+
}
|
209
|
+
|
210
|
+
if ( this._mouseDelayTimer ) {
|
211
|
+
clearTimeout( this._mouseDelayTimer );
|
212
|
+
delete this._mouseDelayTimer;
|
213
|
+
}
|
214
|
+
|
215
|
+
this.ignoreMissingWhich = false;
|
216
|
+
mouseHandled = false;
|
217
|
+
event.preventDefault();
|
218
|
+
},
|
219
|
+
|
220
|
+
_mouseDistanceMet: function( event ) {
|
221
|
+
return ( Math.max(
|
222
|
+
Math.abs( this._mouseDownEvent.pageX - event.pageX ),
|
223
|
+
Math.abs( this._mouseDownEvent.pageY - event.pageY )
|
224
|
+
) >= this.options.distance
|
225
|
+
);
|
226
|
+
},
|
227
|
+
|
228
|
+
_mouseDelayMet: function( /* event */ ) {
|
229
|
+
return this.mouseDelayMet;
|
230
|
+
},
|
231
|
+
|
232
|
+
// These are placeholder methods, to be overriden by extending plugin
|
233
|
+
_mouseStart: function( /* event */ ) {},
|
234
|
+
_mouseDrag: function( /* event */ ) {},
|
235
|
+
_mouseStop: function( /* event */ ) {},
|
236
|
+
_mouseCapture: function( /* event */ ) {
|
237
|
+
return true;
|
238
|
+
}
|
239
|
+
} );
|
240
|
+
|
241
|
+
} );
|