Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
8809d422
Commit
8809d422
authored
Dec 06, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #5005: Added support to suppress loading the same CSS files in AJAX responses
parent
ca5b8745
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
yii.js
framework/assets/yii.js
+16
-1
No files found.
framework/CHANGELOG.md
View file @
8809d422
...
@@ -60,6 +60,7 @@ Yii Framework 2 Change Log
...
@@ -60,6 +60,7 @@ Yii Framework 2 Change Log
-
Enh #4643: Extra options specified in
`yii\widgets\Breadcrumbs::links`
will be treated as HTML attributes for the generated hyperlinks (qiangxue)
-
Enh #4643: Extra options specified in
`yii\widgets\Breadcrumbs::links`
will be treated as HTML attributes for the generated hyperlinks (qiangxue)
-
Enh #4739: Better display of exceptions when the response format is set as "raw" format (qiangxue)
-
Enh #4739: Better display of exceptions when the response format is set as "raw" format (qiangxue)
-
Enh #4791: Added console output support and more colors for console commands (6pblcb, samdark, klimov-paul, Ragazzo)
-
Enh #4791: Added console output support and more colors for console commands (6pblcb, samdark, klimov-paul, Ragazzo)
-
Enh #5005: Added support to suppress loading the same CSS files in AJAX responses (tof06, qiangxue)
-
Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
-
Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
-
Enh #5367: Added
`yii\grid\DataColumn::encodeLabel`
(SDKiller)
-
Enh #5367: Added
`yii\grid\DataColumn::encodeLabel`
(SDKiller)
-
Enh #5480: Added defensive code to
`yii\web\User::getIdentity()`
to avoid potential infinite recursion (qiangxue)
-
Enh #5480: Added defensive code to
`yii\web\User::getIdentity()`
to avoid potential infinite recursion (qiangxue)
...
...
framework/assets/yii.js
View file @
8809d422
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
yii
=
(
function
(
$
)
{
yii
=
(
function
(
$
)
{
var
pub
=
{
var
pub
=
{
/**
/**
* List of
script
s that can be loaded multiple times via AJAX requests. Each script can be represented
* List of
JS or CSS URL
s that can be loaded multiple times via AJAX requests. Each script can be represented
* as either an absolute URL or a relative one.
* as either an absolute URL or a relative one.
*/
*/
reloadableScripts
:
[],
reloadableScripts
:
[],
...
@@ -264,6 +264,7 @@ yii = (function ($) {
...
@@ -264,6 +264,7 @@ yii = (function ($) {
var
loadedScripts
=
$
(
'script[src]'
).
map
(
function
()
{
var
loadedScripts
=
$
(
'script[src]'
).
map
(
function
()
{
return
this
.
src
.
charAt
(
0
)
===
'/'
?
hostInfo
+
this
.
src
:
this
.
src
;
return
this
.
src
.
charAt
(
0
)
===
'/'
?
hostInfo
+
this
.
src
:
this
.
src
;
}).
toArray
();
}).
toArray
();
$
.
ajaxPrefilter
(
'script'
,
function
(
options
,
originalOptions
,
xhr
)
{
$
.
ajaxPrefilter
(
'script'
,
function
(
options
,
originalOptions
,
xhr
)
{
if
(
options
.
dataType
==
'jsonp'
)
{
if
(
options
.
dataType
==
'jsonp'
)
{
return
;
return
;
...
@@ -280,6 +281,20 @@ yii = (function ($) {
...
@@ -280,6 +281,20 @@ yii = (function ($) {
}
}
}
}
});
});
$
(
document
).
ajaxComplete
(
function
(
event
,
xhr
,
settings
)
{
var
styleSheets
=
[];
$
(
'link[rel=stylesheet]'
).
each
(
function
()
{
if
(
$
.
inArray
(
this
.
href
,
pub
.
reloadableScripts
)
!==
-
1
)
{
return
;
}
if
(
$
.
inArray
(
this
.
href
,
styleSheets
)
==
-
1
)
{
styleSheets
.
push
(
this
.
href
)
}
else
{
$
(
this
).
remove
();
}
})
});
}
}
return
pub
;
return
pub
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment