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
3daa177e
Commit
3daa177e
authored
Mar 04, 2014
by
Christophe BOULAIN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an option to ignore pjax request on some links.
parent
0e1a23f0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
jquery.pjax.js
framework/assets/pjax/jquery.pjax.js
+4
-0
ActionColumn.php
framework/grid/ActionColumn.php
+3
-0
No files found.
framework/assets/pjax/jquery.pjax.js
View file @
3daa177e
...
@@ -61,6 +61,10 @@
...
@@ -61,6 +61,10 @@
var
link
=
event
.
currentTarget
var
link
=
event
.
currentTarget
// Ignore links with data-pjax="0"
if
(
$
(
link
).
data
(
'pjax'
)
==
0
)
return
if
(
link
.
tagName
.
toUpperCase
()
!==
'A'
)
if
(
link
.
tagName
.
toUpperCase
()
!==
'A'
)
throw
"$.fn.pjax or $.pjax.click requires an anchor element"
throw
"$.fn.pjax or $.pjax.click requires an anchor element"
...
...
framework/grid/ActionColumn.php
View file @
3daa177e
...
@@ -88,6 +88,7 @@ class ActionColumn extends Column
...
@@ -88,6 +88,7 @@ class ActionColumn extends Column
$this
->
buttons
[
'view'
]
=
function
(
$url
,
$model
)
{
$this
->
buttons
[
'view'
]
=
function
(
$url
,
$model
)
{
return
Html
::
a
(
'<span class="glyphicon glyphicon-eye-open"></span>'
,
$url
,
[
return
Html
::
a
(
'<span class="glyphicon glyphicon-eye-open"></span>'
,
$url
,
[
'title'
=>
Yii
::
t
(
'yii'
,
'View'
),
'title'
=>
Yii
::
t
(
'yii'
,
'View'
),
'data-pjax'
=>
'0'
,
]);
]);
};
};
}
}
...
@@ -95,6 +96,7 @@ class ActionColumn extends Column
...
@@ -95,6 +96,7 @@ class ActionColumn extends Column
$this
->
buttons
[
'update'
]
=
function
(
$url
,
$model
)
{
$this
->
buttons
[
'update'
]
=
function
(
$url
,
$model
)
{
return
Html
::
a
(
'<span class="glyphicon glyphicon-pencil"></span>'
,
$url
,
[
return
Html
::
a
(
'<span class="glyphicon glyphicon-pencil"></span>'
,
$url
,
[
'title'
=>
Yii
::
t
(
'yii'
,
'Update'
),
'title'
=>
Yii
::
t
(
'yii'
,
'Update'
),
'data-pjax'
=>
'0'
,
]);
]);
};
};
}
}
...
@@ -104,6 +106,7 @@ class ActionColumn extends Column
...
@@ -104,6 +106,7 @@ class ActionColumn extends Column
'title'
=>
Yii
::
t
(
'yii'
,
'Delete'
),
'title'
=>
Yii
::
t
(
'yii'
,
'Delete'
),
'data-confirm'
=>
Yii
::
t
(
'yii'
,
'Are you sure to delete this item?'
),
'data-confirm'
=>
Yii
::
t
(
'yii'
,
'Are you sure to delete this item?'
),
'data-method'
=>
'post'
,
'data-method'
=>
'post'
,
'data-pjax'
=>
'0'
,
]);
]);
};
};
}
}
...
...
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