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
49550706
Commit
49550706
authored
Apr 27, 2012
by
Crisu83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added public method for registering Bootstrap JS
parent
569cb820
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
Bootstrap.php
components/Bootstrap.php
+16
-7
No files found.
components/Bootstrap.php
View file @
49550706
...
@@ -83,7 +83,7 @@ class Bootstrap extends CApplicationComponent
...
@@ -83,7 +83,7 @@ class Bootstrap extends CApplicationComponent
$this
->
registerYiiCss
();
$this
->
registerYiiCss
();
if
(
$this
->
enableJS
)
if
(
$this
->
enableJS
)
$this
->
registerCore
Plugin
s
();
$this
->
registerCore
Script
s
();
}
}
/**
/**
...
@@ -116,18 +116,27 @@ class Bootstrap extends CApplicationComponent
...
@@ -116,18 +116,27 @@ class Bootstrap extends CApplicationComponent
}
}
/**
/**
* Registers the core JavaScript
plugins
.
* Registers the core JavaScript.
* @since 0.9.8
* @since 0.9.8
*/
*/
public
function
registerCorePlugins
()
public
function
registerCoreScripts
()
{
$this
->
registerJS
();
$this
->
registerTooltip
();
$this
->
registerPopover
();
}
/**
* Registers the Bootstrap JavaScript.
* @param int $position the position of the JavaScript code.
* @see CClientScript::registerScriptFile
*/
public
function
registerJS
(
$position
=
CClientScript
::
POS_HEAD
)
{
{
/** @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'
);
$cs
->
registerScriptFile
(
$this
->
getAssetsUrl
()
.
'/js/bootstrap.min.js'
,
$position
);
$this
->
registerTooltip
();
$this
->
registerPopover
();
}
}
/**
/**
...
...
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