From 3d612445264ba1a5f76917aee78217b92b04543b Mon Sep 17 00:00:00 2001 From: David Petersen Date: Sat, 26 Mar 2011 15:23:08 -0400 Subject: Tabs: Deprecate abort method. Fixes #7133 Tabs: Deprecate abort method --- ui/jquery.ui.tabs.js | 52 +++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 39f1b537b..617e84848 100755 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -337,7 +337,9 @@ $.widget( "ui.tabs", { o.selected = self.anchors.index( el ); - self.abort(); + if ( self.xhr ) { + self.xhr.abort(); + } // if tab may be closed if ( o.collapsible ) { @@ -413,7 +415,9 @@ $.widget( "ui.tabs", { _destroy: function() { var o = this.options; - this.abort(); + if ( this.xhr ) { + this.xhr.abort(); + } this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); @@ -604,7 +608,9 @@ $.widget( "ui.tabs", { url = $.data( a, "load.tabs" ), eventData = self._ui( self.anchors[ index ], self.panels[ index ] ); - this.abort(); + if ( this.xhr ) { + this.xhr.abort(); + } // not remote if ( !url ) { @@ -634,6 +640,17 @@ $.widget( "ui.tabs", { self.element.find( self._sanitizeSelector( a.hash ) ).html( response ); }) .complete( function( jqXHR, status ) { + if ( status === "abort" ) { + // stop possibly running animations + self.element.queue( [] ); + self.panels.stop( false, true ); + + // "tabs" queue must not contain more than two elements, + // which are the callbacks for the latest clicked tab... + self.element.queue( "tabs", self.element.queue( "tabs" ).splice( -2, 2 ) ); + + delete this.xhr; + } // take care of tab labels self._cleanup(); @@ -647,26 +664,6 @@ $.widget( "ui.tabs", { return this; }, - abort: function() { - // stop possibly running animations - this.element.queue( [] ); - this.panels.stop( false, true ); - - // "tabs" queue must not contain more than two elements, - // which are the callbacks for the latest clicked tab... - this.element.queue( "tabs", this.element.queue( "tabs" ).splice( -2, 2 ) ); - - // terminate pending requests from other tabs - if ( this.xhr ) { - this.xhr.abort(); - delete this.xhr; - } - - // take care of tab labels - this._cleanup(); - return this; - }, - url: function( index, url ) { this.anchors.eq( index ).data( "load.tabs", url ); return this; @@ -749,6 +746,15 @@ if ( $.uiBackCompat !== false ) { } }); }( jQuery, jQuery.ui.tabs.prototype ) ); + + // abort method + (function( $, prototype ) { + prototype.abort = function() { + if ( this.xhr ) { + this.xhr.abort(); + } + }; + }( jQuery, jQuery.ui.tabs.prototype ) ); } })( jQuery ); -- cgit v1.2.3 ='add-integration-tests-for-deleting-a-file-copied-from-a-share'>add-integration-tests-for-deleting-a-file-copied-from-a-share Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework/middleware/sessionmiddlewaretest.php
blob: 13e558bf21ae49f8618a9aadb9229bcce9268a09 (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