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
04d8ed31
Commit
04d8ed31
authored
Feb 05, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2327 from thiagotalma/master
Improvements in exhibition of the changed files in Gii.
parents
b8235c71
7ddb6e8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
gii.js
extensions/gii/assets/gii.js
+2
-1
files.php
extensions/gii/views/default/view/files.php
+13
-2
No files found.
extensions/gii/assets/gii.js
View file @
04d8ed31
...
...
@@ -35,9 +35,10 @@ yii.gii = (function ($) {
};
var
initPreviewDiffLinks
=
function
()
{
$
(
'.preview-code,
.diff-code
'
).
on
(
'click'
,
function
()
{
$
(
'.preview-code,
.diff-code, .modal-refresh
'
).
on
(
'click'
,
function
()
{
var
$modal
=
$
(
'#preview-modal'
);
var
$link
=
$
(
this
);
$modal
.
find
(
'.modal-refresh'
).
attr
(
'href'
,
$link
.
prop
(
'href'
));
$modal
.
find
(
'.modal-title'
).
text
(
$link
.
data
(
'title'
));
$modal
.
find
(
'.modal-body'
).
html
(
'Loading ...'
);
$modal
.
modal
(
'show'
);
...
...
extensions/gii/views/default/view/files.php
View file @
04d8ed31
...
...
@@ -33,7 +33,18 @@ use yii\gii\CodeFile;
</thead>
<tbody>
<?php
foreach
(
$files
as
$file
)
:
?>
<tr
class=
"
<?=
$file
->
operation
?>
"
>
<?php
if
(
$file
->
operation
===
CodeFile
::
OP_OVERWRITE
)
{
$trClass
=
'warning'
;
}
elseif
(
$file
->
operation
===
CodeFile
::
OP_SKIP
)
{
$trClass
=
'active'
;
}
elseif
(
$file
->
operation
===
CodeFile
::
OP_CREATE
)
{
$trClass
=
'success'
;
}
else
{
$trClass
=
''
;
}
?>
<tr
class=
"
<?=
"
$file->operation
$trClass
"
?>
"
>
<td
class=
"file"
>
<?=
Html
::
a
(
Html
::
encode
(
$file
->
getRelativePath
()),
[
'preview'
,
'file'
=>
$file
->
id
],
[
'class'
=>
'preview-code'
,
'data-title'
=>
$file
->
getRelativePath
()])
?>
<?php
if
(
$file
->
operation
===
CodeFile
::
OP_OVERWRITE
)
:
?>
...
...
@@ -70,7 +81,7 @@ use yii\gii\CodeFile;
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
Modal title
</h4>
<h4
><a
class=
"modal-refresh glyphicon glyphicon-refresh"
href=
"#"
></a>
<span
class=
"modal-title"
>
Modal title
</span>
</h4>
</div>
<div
class=
"modal-body"
>
<p>
Please wait ...
</p>
...
...
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