Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap 3
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap 3
Commits
fbcae8c3
Commit
fbcae8c3
authored
Mar 14, 2012
by
Crisu83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed BootButton to create buttons instead of inputs (fixes #22)
parent
ed699265
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
Crisu.xml
.idea/dictionaries/Crisu.xml
+1
-0
Bootstrap.php
components/Bootstrap.php
+2
-1
BootButton.php
widgets/BootButton.php
+12
-4
No files found.
.idea/dictionaries/Crisu.xml
View file @
fbcae8c3
...
...
@@ -6,6 +6,7 @@
<w>
navbar
</w>
<w>
scrollspy
</w>
<w>
tabbable
</w>
<w>
typeahead
</w>
<w>
uneditable
</w>
<w>
unstyled
</w>
</words>
...
...
components/Bootstrap.php
View file @
fbcae8c3
...
...
@@ -13,7 +13,7 @@
*/
class
Bootstrap
extends
CApplicationComponent
{
//
The Bootstrap core
plugins.
//
Bootstrap
plugins.
const
PLUGIN_ALERT
=
'alert'
;
const
PLUGIN_BUTTON
=
'button'
;
const
PLUGIN_CAROUSEL
=
'carousel'
;
...
...
@@ -39,6 +39,7 @@ class Bootstrap extends CApplicationComponent
public
$responsiveCss
=
false
;
/**
* @var boolean whether to register jQuery and the Bootstrap JavaScript.
* @since 0.9.10
*/
public
$enableJS
=
true
;
/**
...
...
widgets/BootButton.php
View file @
fbcae8c3
...
...
@@ -192,10 +192,12 @@ class BootButton extends BootWidget
return
CHtml
::
htmlButton
(
$this
->
label
,
$this
->
htmlOptions
);
case
self
::
FN_SUBMIT
:
return
CHtml
::
submitButton
(
$this
->
label
,
$this
->
htmlOptions
);
$this
->
htmlOptions
[
'type'
]
=
'submit'
;
return
CHtml
::
htmlButton
(
$this
->
label
,
$this
->
htmlOptions
);
case
self
::
FN_RESET
:
return
CHtml
::
resetButton
(
$this
->
label
,
$this
->
htmlOptions
);
$this
->
htmlOptions
[
'type'
]
=
'reset'
;
return
CHtml
::
htmlButton
(
$this
->
label
,
$this
->
htmlOptions
);
case
self
::
FN_SUBMITLINK
:
return
CHtml
::
linkButton
(
$this
->
label
,
$this
->
htmlOptions
);
...
...
@@ -204,10 +206,16 @@ class BootButton extends BootWidget
return
CHtml
::
ajaxLink
(
$this
->
label
,
$this
->
url
,
$this
->
ajaxOptions
,
$this
->
htmlOptions
);
case
self
::
FN_AJAXBUTTON
:
return
CHtml
::
ajaxButton
(
$this
->
label
,
$this
->
url
,
$this
->
ajaxOptions
,
$this
->
htmlOptions
);
$this
->
ajaxOptions
[
'url'
]
=
$this
->
url
;
$this
->
htmlOptions
[
'ajax'
]
=
$this
->
ajaxOptions
;
return
CHtml
::
htmlButton
(
$this
->
label
,
$this
->
htmlOptions
);
case
self
::
FN_AJAXSUBMIT
:
return
CHtml
::
ajaxSubmitButton
(
$this
->
label
,
$this
->
ajaxOptions
,
$this
->
htmlOptions
);
$this
->
ajaxOptions
[
'type'
]
=
'POST'
;
$this
->
ajaxOptions
[
'url'
]
=
$this
->
url
;
$this
->
htmlOptions
[
'type'
]
=
'submit'
;
$this
->
htmlOptions
[
'ajax'
]
=
$this
->
ajaxOptions
;
return
CHtml
::
htmlButton
(
$this
->
label
,
$this
->
htmlOptions
);
default
:
case
self
::
FN_LINK
:
...
...
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