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
dbe18d7b
Commit
dbe18d7b
authored
Feb 05, 2014
by
Thiago Talma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements in view of changed files in Gii
parent
afa6ad5a
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 @
dbe18d7b
...
@@ -35,9 +35,10 @@ yii.gii = (function ($) {
...
@@ -35,9 +35,10 @@ yii.gii = (function ($) {
};
};
var
initPreviewDiffLinks
=
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
$modal
=
$
(
'#preview-modal'
);
var
$link
=
$
(
this
);
var
$link
=
$
(
this
);
$modal
.
find
(
'.modal-refresh'
).
attr
(
'href'
,
$link
.
prop
(
'href'
));
$modal
.
find
(
'.modal-title'
).
text
(
$link
.
data
(
'title'
));
$modal
.
find
(
'.modal-title'
).
text
(
$link
.
data
(
'title'
));
$modal
.
find
(
'.modal-body'
).
html
(
'Loading ...'
);
$modal
.
find
(
'.modal-body'
).
html
(
'Loading ...'
);
$modal
.
modal
(
'show'
);
$modal
.
modal
(
'show'
);
...
...
extensions/gii/views/default/view/files.php
View file @
dbe18d7b
...
@@ -33,7 +33,18 @@ use yii\gii\CodeFile;
...
@@ -33,7 +33,18 @@ use yii\gii\CodeFile;
</thead>
</thead>
<tbody>
<tbody>
<?php
foreach
(
$files
as
$file
)
:
?>
<?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"
>
<td
class=
"file"
>
<?=
Html
::
a
(
Html
::
encode
(
$file
->
getRelativePath
()),
[
'preview'
,
'file'
=>
$file
->
id
],
[
'class'
=>
'preview-code'
,
'data-title'
=>
$file
->
getRelativePath
()])
?>
<?=
Html
::
a
(
Html
::
encode
(
$file
->
getRelativePath
()),
[
'preview'
,
'file'
=>
$file
->
id
],
[
'class'
=>
'preview-code'
,
'data-title'
=>
$file
->
getRelativePath
()])
?>
<?php
if
(
$file
->
operation
===
CodeFile
::
OP_OVERWRITE
)
:
?>
<?php
if
(
$file
->
operation
===
CodeFile
::
OP_OVERWRITE
)
:
?>
...
@@ -70,7 +81,7 @@ use yii\gii\CodeFile;
...
@@ -70,7 +81,7 @@ use yii\gii\CodeFile;
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<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>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<p>
Please wait ...
</p>
<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