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
d9a31fea
Commit
d9a31fea
authored
Jul 31, 2012
by
Crisu83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgraded bootstrap.js to 2.1.0-wip and update the demo
parent
a45375e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
25 deletions
+23
-25
bootstrap.js
assets/js/bootstrap.js
+0
-0
Bootstrap.php
components/Bootstrap.php
+21
-21
SiteController.php
demo/protected/controllers/SiteController.php
+2
-4
No files found.
assets/js/bootstrap.js
0 → 100644
View file @
d9a31fea
This diff is collapsed.
Click to expand it.
components/Bootstrap.php
View file @
d9a31fea
...
@@ -9,23 +9,23 @@
...
@@ -9,23 +9,23 @@
/**
/**
* Bootstrap application component.
* Bootstrap application component.
* Used for registering Bootstrap core functionality.
*/
*/
class
Bootstrap
extends
CApplicationComponent
class
Bootstrap
extends
CApplicationComponent
{
{
// Bootstrap plugins.
// Bootstrap plugins.
const
PLUGIN_ALERT
=
'alert'
;
const
PLUGIN_ALERT
=
'alert'
;
const
PLUGIN_BUTTON
=
'button'
;
const
PLUGIN_BUTTON
=
'button'
;
const
PLUGIN_CAROUSEL
=
'carousel'
;
const
PLUGIN_CAROUSEL
=
'carousel'
;
const
PLUGIN_COLLAPSE
=
'collapse'
;
const
PLUGIN_COLLAPSE
=
'collapse'
;
const
PLUGIN_DROPDOWN
=
'dropdown'
;
const
PLUGIN_DROPDOWN
=
'dropdown'
;
const
PLUGIN_MODAL
=
'modal'
;
const
PLUGIN_MODAL
=
'modal'
;
const
PLUGIN_POPOVER
=
'popover'
;
const
PLUGIN_POPOVER
=
'popover'
;
const
PLUGIN_SCROLLSPY
=
'scrollspy'
;
const
PLUGIN_SCROLLSPY
=
'scrollspy'
;
const
PLUGIN_TAB
=
'tab'
;
const
PLUGIN_TAB
=
'tab'
;
const
PLUGIN_TOOLTIP
=
'tooltip'
;
const
PLUGIN_TOOLTIP
=
'tooltip'
;
const
PLUGIN_TRANSITION
=
'transition'
;
const
PLUGIN_TRANSITION
=
'transition'
;
const
PLUGIN_TYPEAHEAD
=
'typeahead'
;
const
PLUGIN_TYPEAHEAD
=
'typeahead'
;
// todo: add the affix plugin in version 2.1.0
/**
/**
* @var boolean whether to register the Bootstrap core CSS (bootstrap.min.css).
* @var boolean whether to register the Bootstrap core CSS (bootstrap.min.css).
...
@@ -80,16 +80,16 @@ class Bootstrap extends CApplicationComponent
...
@@ -80,16 +80,16 @@ class Bootstrap extends CApplicationComponent
if
(
Yii
::
app
()
instanceof
CConsoleApplication
)
if
(
Yii
::
app
()
instanceof
CConsoleApplication
)
return
;
return
;
if
(
$this
->
coreCss
)
if
(
$this
->
coreCss
!==
false
)
$this
->
registerCss
();
$this
->
registerC
oreC
ss
();
if
(
$this
->
responsiveCss
)
if
(
$this
->
responsiveCss
!==
false
)
$this
->
registerResponsiveCss
();
$this
->
registerResponsiveCss
();
if
(
$this
->
yiiCss
)
if
(
$this
->
yiiCss
!==
false
)
$this
->
registerYiiCss
();
$this
->
registerYiiCss
();
if
(
$this
->
enableJS
)
if
(
$this
->
enableJS
!==
false
)
$this
->
registerCoreScripts
();
$this
->
registerCoreScripts
();
parent
::
init
();
parent
::
init
();
...
@@ -98,7 +98,7 @@ class Bootstrap extends CApplicationComponent
...
@@ -98,7 +98,7 @@ class Bootstrap extends CApplicationComponent
/**
/**
* Registers the Bootstrap CSS.
* Registers the Bootstrap CSS.
*/
*/
public
function
registerCss
()
public
function
registerC
oreC
ss
()
{
{
Yii
::
app
()
->
clientScript
->
registerCssFile
(
$this
->
getAssetsUrl
()
.
'/css/bootstrap.css'
);
Yii
::
app
()
->
clientScript
->
registerCssFile
(
$this
->
getAssetsUrl
()
.
'/css/bootstrap.css'
);
}
}
...
@@ -130,7 +130,7 @@ class Bootstrap extends CApplicationComponent
...
@@ -130,7 +130,7 @@ class Bootstrap extends CApplicationComponent
*/
*/
public
function
registerCoreScripts
()
public
function
registerCoreScripts
()
{
{
$this
->
registerJS
();
$this
->
registerJS
(
Yii
::
app
()
->
clientScript
->
coreScriptPosition
);
$this
->
registerTooltip
();
$this
->
registerTooltip
();
$this
->
registerPopover
();
$this
->
registerPopover
();
}
}
...
@@ -145,7 +145,7 @@ class Bootstrap extends CApplicationComponent
...
@@ -145,7 +145,7 @@ class Bootstrap extends CApplicationComponent
/** @var CClientScript $cs */
/** @var CClientScript $cs */
$cs
=
Yii
::
app
()
->
getClientScript
();
$cs
=
Yii
::
app
()
->
getClientScript
();
$cs
->
registerCoreScript
(
'jquery'
);
$cs
->
registerCoreScript
(
'jquery'
);
$cs
->
registerScriptFile
(
$this
->
getAssetsUrl
()
.
'/js/bootstrap.
min.
js'
,
$position
);
$cs
->
registerScriptFile
(
$this
->
getAssetsUrl
()
.
'/js/bootstrap.js'
,
$position
);
}
}
/**
/**
...
@@ -331,7 +331,7 @@ class Bootstrap extends CApplicationComponent
...
@@ -331,7 +331,7 @@ class Bootstrap extends CApplicationComponent
}
}
/**
/**
* Returns the version number.
* Returns the
extension
version number.
* @return string the version
* @return string the version
*/
*/
public
function
getVersion
()
public
function
getVersion
()
...
...
demo/protected/controllers/SiteController.php
View file @
d9a31fea
...
@@ -86,12 +86,10 @@ class SiteController extends Controller
...
@@ -86,12 +86,10 @@ class SiteController extends Controller
);
);
$rawData
=
array
();
$rawData
=
array
();
for
(
$i
=
0
;
$i
<
100
;
$i
++
)
for
(
$i
=
0
;
$i
<
8
;
$i
++
)
$rawData
[]
=
array
(
'id'
=>
$i
+
1
);
$rawData
[]
=
array
(
'id'
=>
$i
+
1
);
$listDataProvider
=
new
CArrayDataProvider
(
$rawData
,
array
(
$listDataProvider
=
new
CArrayDataProvider
(
$rawData
);
'pagination'
=>
array
(
'pageSize'
=>
8
),
));
$phpLighter
=
new
CTextHighlighter
();
$phpLighter
=
new
CTextHighlighter
();
$phpLighter
->
language
=
'PHP'
;
$phpLighter
->
language
=
'PHP'
;
...
...
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