Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
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
夏彬
yii2bootstrap
Commits
5b671bd7
Commit
5b671bd7
authored
Mar 06, 2014
by
Christophe BOULAIN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add size attribute to Modal
parent
aac13997
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
Modal.php
Modal.php
+9
-1
No files found.
CHANGELOG.md
View file @
5b671bd7
...
@@ -14,6 +14,7 @@ Yii Framework 2 bootstrap extension Change Log
...
@@ -14,6 +14,7 @@ Yii Framework 2 bootstrap extension Change Log
-
Enh #2425: Tabs widget now selects first tab if no active tab is specified (samdark)
-
Enh #2425: Tabs widget now selects first tab if no active tab is specified (samdark)
-
Chg #1459: Update Collapse to use bootstrap 3 classes (tonydspaniard)
-
Chg #1459: Update Collapse to use bootstrap 3 classes (tonydspaniard)
-
Chg #1820: Update Progress to use bootstrap 3 markup (samdark)
-
Chg #1820: Update Progress to use bootstrap 3 markup (samdark)
-
Enh #2643: Add size attribute to Modal (tof06)
2.
0.0 alpha, December 1, 2013
2.
0.0 alpha, December 1, 2013
-----------------------------
-----------------------------
...
...
Modal.php
View file @
5b671bd7
...
@@ -35,6 +35,10 @@ use yii\helpers\Html;
...
@@ -35,6 +35,10 @@ use yii\helpers\Html;
*/
*/
class
Modal
extends
Widget
class
Modal
extends
Widget
{
{
const
SIZE_LARGE
=
"modal-lg"
;
const
SIZE_SMALL
=
"modal-sm"
;
const
SIZE_DEFAULT
=
""
;
/**
/**
* @var string the header content in the modal window.
* @var string the header content in the modal window.
*/
*/
...
@@ -43,6 +47,10 @@ class Modal extends Widget
...
@@ -43,6 +47,10 @@ class Modal extends Widget
* @var string the footer content in the modal window.
* @var string the footer content in the modal window.
*/
*/
public
$footer
;
public
$footer
;
/**
* @var string the modal size. Can be MODAL_LG or MODAL_SM, or empty for default.
*/
public
$size
;
/**
/**
* @var array the options for rendering the close button tag.
* @var array the options for rendering the close button tag.
* The close button is displayed in the header of the modal window. Clicking
* The close button is displayed in the header of the modal window. Clicking
...
@@ -86,7 +94,7 @@ class Modal extends Widget
...
@@ -86,7 +94,7 @@ class Modal extends Widget
echo
$this
->
renderToggleButton
()
.
"
\n
"
;
echo
$this
->
renderToggleButton
()
.
"
\n
"
;
echo
Html
::
beginTag
(
'div'
,
$this
->
options
)
.
"
\n
"
;
echo
Html
::
beginTag
(
'div'
,
$this
->
options
)
.
"
\n
"
;
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'modal-dialog
'
])
.
"
\n
"
;
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'modal-dialog
'
.
$this
->
size
])
.
"
\n
"
;
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'modal-content'
])
.
"
\n
"
;
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'modal-content'
])
.
"
\n
"
;
echo
$this
->
renderHeader
()
.
"
\n
"
;
echo
$this
->
renderHeader
()
.
"
\n
"
;
echo
$this
->
renderBodyBegin
()
.
"
\n
"
;
echo
$this
->
renderBodyBegin
()
.
"
\n
"
;
...
...
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