Browse Source

Merge remote-tracking branch 'upstream/master' into add-tests

tags/2.0.0-alpha
Suralc 11 years ago
parent
commit
02c92fea93
  1. 5
      README.md
  2. 3
      apps/advanced/backend/config/AppAsset.php
  3. 1
      apps/advanced/backend/config/params.php
  4. 4
      apps/advanced/backend/controllers/SiteController.php
  5. 61
      apps/advanced/backend/views/layouts/main.php
  6. 52
      apps/advanced/backend/views/site/index.php
  7. 8
      apps/advanced/backend/views/site/login.php
  8. 73
      apps/advanced/backend/web/css/site.css
  9. 1
      apps/advanced/console/config/params.php
  10. 3
      apps/advanced/frontend/config/AppAsset.php
  11. 1
      apps/advanced/frontend/config/params.php
  12. 10
      apps/advanced/frontend/controllers/SiteController.php
  13. 49
      apps/advanced/frontend/views/layouts/main.php
  14. 8
      apps/advanced/frontend/views/site/about.php
  15. 15
      apps/advanced/frontend/views/site/contact.php
  16. 52
      apps/advanced/frontend/views/site/index.php
  17. 13
      apps/advanced/frontend/views/site/login.php
  18. 10
      apps/advanced/frontend/views/site/requestPasswordResetToken.php
  19. 8
      apps/advanced/frontend/views/site/resetPassword.php
  20. 8
      apps/advanced/frontend/views/site/signup.php
  21. 73
      apps/advanced/frontend/web/css/site.css
  22. 2
      apps/basic/config/AppAsset.php
  23. 21
      apps/basic/config/web.php
  24. 9
      apps/basic/controllers/SiteController.php
  25. 48
      apps/basic/views/layouts/main.php
  26. 3
      apps/basic/views/site/about.php
  27. 20
      apps/basic/views/site/contact.php
  28. 29
      apps/basic/views/site/error.php
  29. 52
      apps/basic/views/site/index.php
  30. 12
      apps/basic/views/site/login.php
  31. 72
      apps/basic/web/css/site.css
  32. 2
      apps/basic/web/index.php
  33. 193
      docs/guide/active-record.md
  34. 138
      docs/guide/apps-advanced.md
  35. 142
      docs/guide/apps-basic.md
  36. 6
      docs/guide/bootstrap-widgets.md
  37. 69
      docs/guide/bootstrap.md
  38. 98
      docs/guide/configuration.md
  39. 9
      docs/guide/debugger.md
  40. 20
      docs/guide/index.md
  41. 13
      docs/guide/installation.md
  42. 2
      extensions/jui/yii/jui/DialogAsset.php
  43. 45
      framework/yii/YiiBase.php
  44. 12
      framework/yii/assets/yii.activeForm.js
  45. 78
      framework/yii/assets/yii.gridView.js
  46. 2
      framework/yii/base/Action.php
  47. 2
      framework/yii/base/Application.php
  48. 2
      framework/yii/base/Controller.php
  49. 2
      framework/yii/base/InlineAction.php
  50. 18
      framework/yii/base/Model.php
  51. 25
      framework/yii/base/UnknownClassException.php
  52. 4
      framework/yii/base/View.php
  53. 26
      framework/yii/bootstrap/AffixAsset.php
  54. 26
      framework/yii/bootstrap/AlertAsset.php
  55. 2
      framework/yii/bootstrap/BootstrapAsset.php
  56. 8
      framework/yii/bootstrap/BootstrapPluginAsset.php
  57. 26
      framework/yii/bootstrap/ButtonAsset.php
  58. 29
      framework/yii/bootstrap/ButtonDropdown.php
  59. 7
      framework/yii/bootstrap/ButtonGroup.php
  60. 26
      framework/yii/bootstrap/CarouselAsset.php
  61. 26
      framework/yii/bootstrap/CollapseAsset.php
  62. 26
      framework/yii/bootstrap/DropdownAsset.php
  63. 6
      framework/yii/bootstrap/Modal.php
  64. 26
      framework/yii/bootstrap/ModalAsset.php
  65. 74
      framework/yii/bootstrap/Nav.php
  66. 154
      framework/yii/bootstrap/NavBar.php
  67. 4
      framework/yii/bootstrap/Progress.php
  68. 24
      framework/yii/bootstrap/ResponsiveAsset.php
  69. 26
      framework/yii/bootstrap/ScrollspyAsset.php
  70. 26
      framework/yii/bootstrap/TabAsset.php
  71. 26
      framework/yii/bootstrap/TooltipAsset.php
  72. 26
      framework/yii/bootstrap/TypeaheadAsset.php
  73. 17
      framework/yii/bootstrap/Widget.php
  74. 24
      framework/yii/bootstrap/assets.php
  75. 2
      framework/yii/bootstrap/assets/css/bootstrap-glyphicons.css
  76. 1109
      framework/yii/bootstrap/assets/css/bootstrap-responsive.css
  77. 9
      framework/yii/bootstrap/assets/css/bootstrap-responsive.min.css
  78. 7154
      framework/yii/bootstrap/assets/css/bootstrap.css
  79. 8
      framework/yii/bootstrap/assets/css/bootstrap.min.css
  80. BIN
      framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.eot
  81. BIN
      framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.otf
  82. 175
      framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.svg
  83. BIN
      framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.ttf
  84. BIN
      framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.woff
  85. BIN
      framework/yii/bootstrap/assets/img/glyphicons-halflings-white.png
  86. BIN
      framework/yii/bootstrap/assets/img/glyphicons-halflings.png
  87. 117
      framework/yii/bootstrap/assets/js/bootstrap-affix.js
  88. 99
      framework/yii/bootstrap/assets/js/bootstrap-alert.js
  89. 105
      framework/yii/bootstrap/assets/js/bootstrap-button.js
  90. 207
      framework/yii/bootstrap/assets/js/bootstrap-carousel.js
  91. 167
      framework/yii/bootstrap/assets/js/bootstrap-collapse.js
  92. 169
      framework/yii/bootstrap/assets/js/bootstrap-dropdown.js
  93. 247
      framework/yii/bootstrap/assets/js/bootstrap-modal.js
  94. 114
      framework/yii/bootstrap/assets/js/bootstrap-popover.js
  95. 162
      framework/yii/bootstrap/assets/js/bootstrap-scrollspy.js
  96. 144
      framework/yii/bootstrap/assets/js/bootstrap-tab.js
  97. 361
      framework/yii/bootstrap/assets/js/bootstrap-tooltip.js
  98. 60
      framework/yii/bootstrap/assets/js/bootstrap-transition.js
  99. 335
      framework/yii/bootstrap/assets/js/bootstrap-typeahead.js
  100. 1988
      framework/yii/bootstrap/assets/js/bootstrap.js
  101. Some files were not shown because too many files have changed in this diff Show More

5
README.md

@ -9,7 +9,10 @@ If you are looking for a production-ready PHP framework, please use
Yii 2.0 is still under heavy development. We may make significant changes
without prior notices. **Yii 2.0 is not ready for production use yet.**
[![Build Status](https://secure.travis-ci.org/yiisoft/yii2.png)](http://travis-ci.org/yiisoft/yii2) [![Dependency Status](https://www.versioneye.com/php/yiisoft:yii2/dev-master/badge.png)](https://www.versioneye.com/php/yiisoft:yii2/dev-master)
[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2/v/stable.png)](https://packagist.org/packages/yiisoft/yii2)
[![Total Downloads](https://poser.pugx.org/yiisoft/yii2/downloads.png)](https://packagist.org/packages/yiisoft/yii2)
[![Build Status](https://secure.travis-ci.org/yiisoft/yii2.png)](http://travis-ci.org/yiisoft/yii2)
[![Dependency Status](https://www.versioneye.com/php/yiisoft:yii2/dev-master/badge.png)](https://www.versioneye.com/php/yiisoft:yii2/dev-master)
DIRECTORY STRUCTURE

3
apps/advanced/backend/config/AppAsset.php

@ -6,6 +6,7 @@
*/
namespace backend\config;
use yii\web\AssetBundle;
/**
@ -23,6 +24,6 @@ class AppAsset extends AssetBundle
);
public $depends = array(
'yii\web\YiiAsset',
'yii\bootstrap\ResponsiveAsset',
'yii\bootstrap\BootstrapAsset',
);
}

1
apps/advanced/backend/config/params.php

@ -1,5 +1,4 @@
<?php
return array(
'adminEmail' => 'admin@example.com',
);

4
apps/advanced/backend/controllers/SiteController.php

@ -17,7 +17,7 @@ class SiteController extends Controller
{
$model = new LoginForm();
if ($model->load($_POST) && $model->login()) {
return $this->redirect(array('site/index'));
return $this->goHome();
} else {
return $this->render('login', array(
'model' => $model,
@ -28,6 +28,6 @@ class SiteController extends Controller
public function actionLogout()
{
Yii::$app->user->logout();
return $this->redirect(array('site/index'));
return $this->goHome();
}
}

61
apps/advanced/backend/views/layouts/main.php

@ -1,7 +1,8 @@
<?php
use backend\config\AppAsset;
use yii\helpers\Html;
use yii\widgets\Menu;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
/**
@ -19,45 +20,45 @@ AppAsset::register($this);
<?php $this->head(); ?>
</head>
<body>
<div class="container">
<?php $this->beginBody(); ?>
<div class="masthead">
<h3 class="muted">My Company</h3>
<div class="navbar fullwidth">
<div class="navbar-inner">
<div class="container">
<?php echo Menu::widget(array(
'options' => array('class' => 'nav'),
'items' => array(
array('label' => 'Home', 'url' => array('/site/index')),
Yii::$app->user->isGuest ?
array('label' => 'Login', 'url' => array('/site/login')) :
array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout')),
<?php
NavBar::begin(array(
'brandLabel' => 'My Company',
'brandUrl' => Yii::$app->homeUrl,
'options' => array(
'class' => 'navbar-inverse navbar-fixed-top',
),
)); ?>
</div>
</div>
</div>
<!-- /.navbar -->
</div>
));
$menuItems = array(
array('label' => 'Home', 'url' => array('/site/index')),
);
if (Yii::$app->user->isGuest) {
$menuItems[] = array('label' => 'Login', 'url' => array('/site/login'));
} else {
$menuItems[] = array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout'));
}
echo Nav::widget(array(
'options' => array('class' => 'navbar-nav pull-right'),
'items' => $menuItems,
));
NavBar::end();
?>
<div class="container">
<?php echo Breadcrumbs::widget(array(
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : array(),
)); ?>
<?php echo $content; ?>
</div>
<hr>
<div class="footer">
<p>&copy; My Company <?php echo date('Y'); ?></p>
<p>
<?php echo Yii::powered(); ?>
Template by <a href="http://twitter.github.io/bootstrap/">Twitter Bootstrap</a>
</p>
<footer class="footer">
<div class="container">
<p class="pull-left">&copy; My Company <?php echo date('Y'); ?></p>
<p class="pull-right"><?php echo Yii::powered(); ?></p>
</div>
</footer>
<?php $this->endBody(); ?>
</div>
</body>
</html>
<?php $this->endPage(); ?>

52
apps/advanced/backend/views/site/index.php

@ -2,46 +2,52 @@
/**
* @var yii\base\View $this
*/
$this->title = 'Welcome';
$this->title = 'My Yii Application';
?>
<div class="site-index">
<div class="jumbotron">
<h1>Welcome!</h1>
<h1>Congratulations!</h1>
<p class="lead">You have successfully created your Yii-powered application.</p>
<p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus
commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<a class="btn btn-large btn-success" href="http://www.yiiframework.com">Get started with Yii</a>
<p><a class="btn btn-large btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>
</div>
<hr>
<div class="body-content">
<!-- Example row of columns -->
<div class="row-fluid">
<div class="span4">
<div class="row">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.
Donec sed odio dui. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation &raquo;</a></p>
</div>
<div class="span4">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.
Donec sed odio dui. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum &raquo;</a></p>
</div>
<div class="span4">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta
felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum
massa.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions &raquo;</a></p>
</div>
</div>
</div>
</div>

8
apps/advanced/backend/views/site/login.php

@ -10,11 +10,14 @@ use yii\widgets\ActiveForm;
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-login">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>Please fill out the following fields to login:</p>
<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal'))); ?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(array('id' => 'login-form')); ?>
<?php echo $form->field($model, 'username')->textInput(); ?>
<?php echo $form->field($model, 'password')->passwordInput(); ?>
<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
@ -22,3 +25,6 @@ $this->params['breadcrumbs'][] = $this->title;
<?php echo Html::submitButton('Login', array('class' => 'btn btn-primary')); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>

73
apps/advanced/backend/web/css/site.css

@ -1,78 +1,19 @@
body {
padding-top: 20px;
padding-bottom: 60px;
padding-top: 70px;
}
/* Custom container */
.container {
margin: 0 auto;
max-width: 1000px;
.footer {
border-top: 1px solid #ddd;
margin-top: 30px;
padding-top: 15px;
padding-bottom: 30px;
}
.container > hr {
margin: 60px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
margin: 80px 0;
text-align: center;
background-color: transparent;
}
.jumbotron h1 {
font-size: 100px;
line-height: 1;
}
.jumbotron .lead {
font-size: 24px;
line-height: 1.25;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
/* Customize the navbar links to be fill the entire space of the .navbar */
.navbar.fullwidth .navbar-inner {
padding: 0;
}
.navbar.fullwidth .nav {
margin: 0;
display: table;
width: 100%;
}
.navbar.fullwidth .nav li {
display: table-cell;
width: 1%;
float: none;
}
.navbar.fullwidth .nav li a {
font-weight: bold;
text-align: center;
border-left: 1px solid rgba(255, 255, 255, .75);
border-right: 1px solid rgba(0, 0, 0, .1);
}
.navbar.fullwidth .nav li:first-child a {
border-left: 0;
border-radius: 3px 0 0 3px;
}
.navbar.fullwidth .nav li:last-child a {
border-right: 0;
border-radius: 0 3px 3px 0;
}

1
apps/advanced/console/config/params.php

@ -1,5 +1,4 @@
<?php
return array(
'adminEmail' => 'admin@example.com',
);

3
apps/advanced/frontend/config/AppAsset.php

@ -6,6 +6,7 @@
*/
namespace frontend\config;
use yii\web\AssetBundle;
/**
@ -23,6 +24,6 @@ class AppAsset extends AssetBundle
);
public $depends = array(
'yii\web\YiiAsset',
'yii\bootstrap\ResponsiveAsset',
'yii\bootstrap\BootstrapAsset',
);
}

1
apps/advanced/frontend/config/params.php

@ -1,5 +1,4 @@
<?php
return array(
'adminEmail' => 'admin@example.com',
);

10
apps/advanced/frontend/controllers/SiteController.php

@ -30,7 +30,7 @@ class SiteController extends Controller
{
$model = new LoginForm();
if ($model->load($_POST) && $model->login()) {
return $this->redirect(array('site/index'));
return $this->goHome();
} else {
return $this->render('login', array(
'model' => $model,
@ -41,7 +41,7 @@ class SiteController extends Controller
public function actionLogout()
{
Yii::$app->user->logout();
return $this->redirect(array('site/index'));
return $this->goHome();
}
public function actionContact()
@ -68,7 +68,7 @@ class SiteController extends Controller
$model->setScenario('signup');
if ($model->load($_POST) && $model->save()) {
if (Yii::$app->getUser()->login($model)) {
$this->redirect('index');
return $this->goHome();
}
}
@ -84,7 +84,7 @@ class SiteController extends Controller
if ($model->load($_POST) && $model->validate()) {
if ($this->sendPasswordResetEmail($model->email)) {
Yii::$app->getSession()->setFlash('success', 'Check your email for further instructions.');
$this->redirect('index');
return $this->goHome();
} else {
Yii::$app->getSession()->setFlash('error', 'There was an error sending email.');
}
@ -108,7 +108,7 @@ class SiteController extends Controller
$model->scenario = 'resetPassword';
if ($model->load($_POST) && $model->save()) {
Yii::$app->getSession()->setFlash('success', 'New password was saved.');
$this->redirect('index');
return $this->goHome();
}
return $this->render('resetPassword', array(

49
apps/advanced/frontend/views/layouts/main.php

@ -1,7 +1,8 @@
<?php
use frontend\config\AppAsset;
use yii\helpers\Html;
use yii\widgets\Menu;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\widgets\Alert;
@ -20,15 +21,15 @@ AppAsset::register($this);
<?php $this->head(); ?>
</head>
<body>
<div class="container">
<?php $this->beginBody(); ?>
<div class="masthead">
<h3 class="muted">My Company</h3>
<div class="navbar fullwidth">
<div class="navbar-inner">
<div class="container">
<?php
NavBar::begin(array(
'brandLabel' => 'My Company',
'brandUrl' => Yii::$app->homeUrl,
'options' => array(
'class' => 'navbar-inverse navbar-fixed-top',
),
));
$menuItems = array(
array('label' => 'Home', 'url' => array('/site/index')),
array('label' => 'About', 'url' => array('/site/about')),
@ -37,40 +38,32 @@ AppAsset::register($this);
if (Yii::$app->user->isGuest) {
$menuItems[] = array('label' => 'Signup', 'url' => array('/site/signup'));
$menuItems[] = array('label' => 'Login', 'url' => array('/site/login'));
}
else {
} else {
$menuItems[] = array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout'));
}
echo Menu::widget(array(
'options' => array('class' => 'nav'),
echo Nav::widget(array(
'options' => array('class' => 'navbar-nav pull-right'),
'items' => $menuItems,
));
NavBar::end();
?>
</div>
</div>
</div>
<!-- /.navbar -->
</div>
<div class="container">
<?php echo Breadcrumbs::widget(array(
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : array(),
)); ?>
<?php echo Alert::widget()?>
<?php echo $content; ?>
</div>
<hr>
<div class="footer">
<p>&copy; My Company <?php echo date('Y'); ?></p>
<p>
<?php echo Yii::powered(); ?>
Template by <a href="http://twitter.github.io/bootstrap/">Twitter Bootstrap</a>
</p>
<footer class="footer">
<div class="container">
<p class="pull-left">&copy; My Company <?php echo date('Y'); ?></p>
<p class="pull-right"><?php echo Yii::powered(); ?></p>
</div>
</footer>
<?php $this->endBody(); ?>
</div>
</body>
</html>
<?php $this->endPage(); ?>

8
apps/advanced/frontend/views/site/about.php

@ -1,16 +1,16 @@
<?php
use yii\helpers\Html;
/**
* @var yii\base\View $this
*/
$this->title = 'About';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-about">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>
This is the About page. You may modify the following file to customize its content:
</p>
<p>This is the About page. You may modify the following file to customize its content:</p>
<code><?php echo __FILE__; ?></code>
</div>

15
apps/advanced/frontend/views/site/contact.php

@ -11,24 +11,29 @@ use yii\captcha\Captcha;
$this->title = 'Contact';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-contact">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
</p>
<?php $form = ActiveForm::begin(array(
'options' => array('class' => 'form-horizontal'),
'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')),
)); ?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(array('id' => 'contact-form')); ?>
<?php echo $form->field($model, 'name')->textInput(); ?>
<?php echo $form->field($model, 'email')->textInput(); ?>
<?php echo $form->field($model, 'subject')->textInput(); ?>
<?php echo $form->field($model, 'body')->textArea(array('rows' => 6)); ?>
<?php echo $form->field($model, 'verifyCode')->widget(Captcha::className(), array(
'options' => array('class' => 'input-medium'),
'options' => array('class' => 'form-control'),
'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
)); ?>
<div class="form-actions">
<?php echo Html::submitButton('Submit', array('class' => 'btn btn-primary')); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>

52
apps/advanced/frontend/views/site/index.php

@ -2,46 +2,52 @@
/**
* @var yii\base\View $this
*/
$this->title = 'Welcome';
$this->title = 'My Yii Application';
?>
<div class="site-index">
<div class="jumbotron">
<h1>Welcome!</h1>
<h1>Congratulations!</h1>
<p class="lead">You have successfully created your Yii-powered application.</p>
<p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus
commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<a class="btn btn-large btn-success" href="http://www.yiiframework.com">Get started with Yii</a>
<p><a class="btn btn-large btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>
</div>
<hr>
<div class="body-content">
<!-- Example row of columns -->
<div class="row-fluid">
<div class="span4">
<div class="row">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.
Donec sed odio dui. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation &raquo;</a></p>
</div>
<div class="span4">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.
Donec sed odio dui. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum &raquo;</a></p>
</div>
<div class="span4">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta
felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum
massa.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions &raquo;</a></p>
</div>
</div>
</div>
</div>

13
apps/advanced/frontend/views/site/login.php

@ -10,17 +10,24 @@ use yii\widgets\ActiveForm;
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-login">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>Please fill out the following fields to login:</p>
<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal'))); ?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(array('id' => 'login-form')); ?>
<?php echo $form->field($model, 'username')->textInput(); ?>
<?php echo $form->field($model, 'password')->passwordInput(); ?>
<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
<div style="color:#999;margin:1em 0">
If you forgot your password you can <?php echo Html::a('reset it', array('site/request-password-reset'))?>.
</div>
<div class="form-actions">
<?php echo Html::submitButton('Login', array('class' => 'btn btn-primary')); ?>
</div>
<?php ActiveForm::end(); ?>
<p>If you forgot your password you can <?php echo Html::a('reset it', array('site/request-password-reset'))?>.</p>
</div>
</div>
</div>

10
apps/advanced/frontend/views/site/requestPasswordResetToken.php

@ -5,18 +5,24 @@ use yii\widgets\ActiveForm;
/**
* @var yii\base\View $this
* @var yii\widgets\ActiveForm $form
* @var frontend\models\User $model
* @var common\models\User $model
*/
$this->title = 'Request password reset';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-request-password-reset">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>Please fill out your email. A link to reset password will be sent there.</p>
<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal'))); ?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(array('id' => 'request-password-reset-form')); ?>
<?php echo $form->field($model, 'email')->textInput(); ?>
<div class="form-actions">
<?php echo Html::submitButton('Send', array('class' => 'btn btn-primary')); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>

8
apps/advanced/frontend/views/site/resetPassword.php

@ -10,13 +10,19 @@ use yii\widgets\ActiveForm;
$this->title = 'Reset password';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-reset-password">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>Please choose your new password:</p>
<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal'))); ?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(array('id' => 'reset-password-form')); ?>
<?php echo $form->field($model, 'password')->passwordInput(); ?>
<div class="form-actions">
<?php echo Html::submitButton('Save', array('class' => 'btn btn-primary')); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>

8
apps/advanced/frontend/views/site/signup.php

@ -10,11 +10,14 @@ use yii\widgets\ActiveForm;
$this->title = 'Signup';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-signup">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>Please fill out the following fields to signup:</p>
<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal'))); ?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(array('id' => 'form-signup')); ?>
<?php echo $form->field($model, 'username')->textInput(); ?>
<?php echo $form->field($model, 'email')->textInput(); ?>
<?php echo $form->field($model, 'password')->passwordInput(); ?>
@ -22,3 +25,6 @@ $this->params['breadcrumbs'][] = $this->title;
<?php echo Html::submitButton('Signup', array('class' => 'btn btn-primary')); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
</div>

73
apps/advanced/frontend/web/css/site.css

@ -1,78 +1,19 @@
body {
padding-top: 20px;
padding-bottom: 60px;
padding-top: 70px;
}
/* Custom container */
.container {
margin: 0 auto;
max-width: 1000px;
.footer {
border-top: 1px solid #ddd;
margin-top: 30px;
padding-top: 15px;
padding-bottom: 30px;
}
.container > hr {
margin: 60px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
margin: 80px 0;
text-align: center;
background-color: transparent;
}
.jumbotron h1 {
font-size: 100px;
line-height: 1;
}
.jumbotron .lead {
font-size: 24px;
line-height: 1.25;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
/* Customize the navbar links to be fill the entire space of the .navbar */
.navbar.fullwidth .navbar-inner {
padding: 0;
}
.navbar.fullwidth .nav {
margin: 0;
display: table;
width: 100%;
}
.navbar.fullwidth .nav li {
display: table-cell;
width: 1%;
float: none;
}
.navbar.fullwidth .nav li a {
font-weight: bold;
text-align: center;
border-left: 1px solid rgba(255, 255, 255, .75);
border-right: 1px solid rgba(0, 0, 0, .1);
}
.navbar.fullwidth .nav li:first-child a {
border-left: 0;
border-radius: 3px 0 0 3px;
}
.navbar.fullwidth .nav li:last-child a {
border-right: 0;
border-radius: 0 3px 3px 0;
}

2
apps/basic/config/AppAsset.php

@ -24,6 +24,6 @@ class AppAsset extends AssetBundle
);
public $depends = array(
'yii\web\YiiAsset',
'yii\bootstrap\ResponsiveAsset',
'yii\bootstrap\BootstrapAsset',
);
}

21
apps/basic/config/web.php

@ -1,23 +1,18 @@
<?php
return array(
$config = array(
'id' => 'bootstrap',
'basePath' => dirname(__DIR__),
'preload' => array('debug'),
'modules' => array(
'debug' => array(
'class' => 'yii\debug\Module',
'enabled' => YII_DEBUG && YII_ENV_DEV,
),
),
'components' => array(
'cache' => array(
'class' => 'yii\caching\FileCache',
),
'user' => array(
'class' => 'yii\web\User',
'identityClass' => 'app\models\User',
),
'errorHandler' => array(
'errorAction' => 'site/error',
),
'log' => array(
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => array(
@ -30,3 +25,11 @@ return array(
),
'params' => require(__DIR__ . '/params.php'),
);
if (YII_ENV_DEV) {
$config['preload'][] = 'debug';
$config['modules']['debug'] = 'yii\debug\Module';
$config['modules']['gii'] = 'yii\gii\Module';
}
return $config;

9
apps/basic/controllers/SiteController.php

@ -12,9 +12,12 @@ class SiteController extends Controller
public function actions()
{
return array(
'error' => array(
'class' => 'yii\web\ErrorAction',
),
'captcha' => array(
'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => YII_ENV_DEV ? 'testme' : null,
'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
),
);
}
@ -28,7 +31,7 @@ class SiteController extends Controller
{
$model = new LoginForm();
if ($model->load($_POST) && $model->login()) {
return $this->redirect(array('site/index'));
return $this->goHome();
} else {
return $this->render('login', array(
'model' => $model,
@ -39,7 +42,7 @@ class SiteController extends Controller
public function actionLogout()
{
Yii::$app->user->logout();
return $this->redirect(array('site/index'));
return $this->goHome();
}
public function actionContact()

48
apps/basic/views/layouts/main.php

@ -1,6 +1,7 @@
<?php
use yii\helpers\Html;
use yii\widgets\Menu;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
/**
@ -19,15 +20,16 @@ app\config\AppAsset::register($this);
</head>
<body>
<?php $this->beginBody(); ?>
<div class="container">
<div class="masthead">
<h3 class="muted">My Company</h3>
<div class="navbar fullwidth">
<div class="navbar-inner">
<div class="container">
<?php echo Menu::widget(array(
'options' => array('class' => 'nav'),
<?php
NavBar::begin(array(
'brandLabel' => 'My Company',
'brandUrl' => Yii::$app->homeUrl,
'options' => array(
'class' => 'navbar-inverse navbar-fixed-top',
),
));
echo Nav::widget(array(
'options' => array('class' => 'navbar-nav pull-right'),
'items' => array(
array('label' => 'Home', 'url' => array('/site/index')),
array('label' => 'About', 'url' => array('/site/about')),
@ -36,28 +38,24 @@ app\config\AppAsset::register($this);
array('label' => 'Login', 'url' => array('/site/login')) :
array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout')),
),
)); ?>
</div>
</div>
</div>
<!-- /.navbar -->
</div>
));
NavBar::end();
?>
<div class="container">
<?php echo Breadcrumbs::widget(array(
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : array(),
)); ?>
<?php echo $content; ?>
<hr>
<div class="footer">
<p>&copy; My Company <?php echo date('Y'); ?></p>
<p>
<?php echo Yii::powered(); ?>
Template by <a href="http://twitter.github.io/bootstrap/">Twitter Bootstrap</a>
</p>
</div>
<footer class="footer">
<div class="container">
<p class="pull-left">&copy; My Company <?php echo date('Y'); ?></p>
<p class="pull-right"><?php echo Yii::powered(); ?></p>
</div>
</footer>
<?php $this->endBody(); ?>
</body>
</html>

3
apps/basic/views/site/about.php

@ -7,6 +7,7 @@ use yii\helpers\Html;
$this->title = 'About';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-about">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>
@ -14,4 +15,4 @@ $this->params['breadcrumbs'][] = $this->title;
</p>
<code><?php echo __FILE__; ?></code>
</div>

20
apps/basic/views/site/contact.php

@ -11,30 +11,38 @@ use yii\captcha\Captcha;
$this->title = 'Contact';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-contact">
<h1><?php echo Html::encode($this->title); ?></h1>
<?php if (Yii::$app->session->hasFlash('contactFormSubmitted')): ?>
<div class="alert alert-success">
Thank you for contacting us. We will respond to you as soon as possible.
</div>
<?php return; endif; ?>
<?php else: ?>
<p>
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
</p>
<?php $form = ActiveForm::begin(array(
'options' => array('class' => 'form-horizontal', 'id' => 'contact-form'),
'fieldConfig' => array('inputOptions' => array('class' => 'input-xlarge')),
)); ?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(array('id' => 'contact-form')); ?>
<?php echo $form->field($model, 'name')->textInput(); ?>
<?php echo $form->field($model, 'email')->textInput(); ?>
<?php echo $form->field($model, 'subject')->textInput(); ?>
<?php echo $form->field($model, 'body')->textArea(array('rows' => 6)); ?>
<?php echo $form->field($model, 'verifyCode')->widget(Captcha::className(), array(
'options' => array('class' => 'input-medium'),
'options' => array('class' => 'form-control'),
'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
)); ?>
<div class="form-actions">
<?php echo Html::submitButton('Submit', array('class' => 'btn btn-primary')); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>
<?php endif; ?>
</div>

29
apps/basic/views/site/error.php

@ -0,0 +1,29 @@
<?php
use yii\helpers\Html;
/**
* @var yii\base\View $this
* @var string $name
* @var string $message
* @var Exception $exception
*/
$this->title = $name;
?>
<div class="site-error">
<h1><?php echo Html::encode($this->title); ?></h1>
<div class="alert alert-danger">
<?php echo nl2br(Html::encode($message)); ?>
</div>
<p>
The above error occurred while the Web server was processing your request.
</p>
<p>
Please contact us if you think this is a server error. Thank you.
</p>
</div>

52
apps/basic/views/site/index.php

@ -2,46 +2,52 @@
/**
* @var yii\base\View $this
*/
$this->title = 'Welcome';
$this->title = 'My Yii Application';
?>
<div class="site-index">
<div class="jumbotron">
<h1>Welcome!</h1>
<h1>Congratulations!</h1>
<p class="lead">You have successfully created your Yii-powered application.</p>
<p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus
commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<a class="btn btn-large btn-success" href="http://www.yiiframework.com">Get started with Yii</a>
<p><a class="btn btn-large btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>
</div>
<hr>
<div class="body-content">
<!-- Example row of columns -->
<div class="row-fluid">
<div class="span4">
<div class="row">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.
Donec sed odio dui. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation &raquo;</a></p>
</div>
<div class="span4">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod.
Donec sed odio dui. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum &raquo;</a></p>
</div>
<div class="span4">
<div class="col-lg-4">
<h2>Heading</h2>
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta
felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum
massa.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.</p>
<p><a class="btn" href="#">View details &raquo;</a></p>
<p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions &raquo;</a></p>
</div>
</div>
</div>
</div>

12
apps/basic/views/site/login.php

@ -10,11 +10,14 @@ use yii\widgets\ActiveForm;
$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-login">
<h1><?php echo Html::encode($this->title); ?></h1>
<p>Please fill out the following fields to login:</p>
<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal', 'id' => 'login-form'))); ?>
<div class="row">
<div class="col-lg-3">
<?php $form = ActiveForm::begin(array('id' => 'login-form')); ?>
<?php echo $form->field($model, 'username')->textInput(); ?>
<?php echo $form->field($model, 'password')->passwordInput(); ?>
<?php echo $form->field($model, 'rememberMe')->checkbox(); ?>
@ -22,3 +25,10 @@ $this->params['breadcrumbs'][] = $this->title;
<?php echo Html::submitButton('Login', array('class' => 'btn btn-primary')); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
<div class="col-lg-5" style="color:#999;margin:1em;padding-top:60px">
You may login with <strong>admin/admin</strong> or <strong>demo/demo</strong>.<br>
To modify the username/password, please check out the code <code>app\models\User::$users</code>.
</div>
</div>
</div>

72
apps/basic/web/css/site.css

@ -1,78 +1,20 @@
body {
padding-top: 20px;
padding-bottom: 60px;
padding-top: 70px;
}
/* Custom container */
.container {
margin: 0 auto;
max-width: 1000px;
.footer {
border-top: 1px solid #ddd;
margin-top: 30px;
padding-top: 15px;
padding-bottom: 30px;
}
.container > hr {
margin: 60px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
margin: 80px 0;
text-align: center;
}
.jumbotron h1 {
font-size: 100px;
line-height: 1;
}
.jumbotron .lead {
font-size: 24px;
line-height: 1.25;
background-color: transparent;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
/* Supporting marketing content */
.marketing {
margin: 60px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
/* Customize the navbar links to be fill the entire space of the .navbar */
.navbar.fullwidth .navbar-inner {
padding: 0;
}
.navbar.fullwidth .nav {
margin: 0;
display: table;
width: 100%;
}
.navbar.fullwidth .nav li {
display: table-cell;
width: 1%;
float: none;
}
.navbar.fullwidth .nav li a {
font-weight: bold;
text-align: center;
border-left: 1px solid rgba(255, 255, 255, .75);
border-right: 1px solid rgba(0, 0, 0, .1);
}
.navbar.fullwidth .nav li:first-child a {
border-left: 0;
border-radius: 3px 0 0 3px;
}
.navbar.fullwidth .nav li:last-child a {
border-right: 0;
border-radius: 0 3px 3px 0;
}

2
apps/basic/web/index.php

@ -1,6 +1,6 @@
<?php
// comment out the following line to disable debug mode
// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

193
docs/guide/active-record.md

@ -2,18 +2,21 @@ Active Record
=============
ActiveRecord implements the [Active Record design pattern](http://en.wikipedia.org/wiki/Active_record).
The idea is that an ActiveRecord object is associated with a row in a database table so object properties are mapped
to columns of the corresponding database row. For example, a `Customer` object is associated with a row in the
`tbl_customer` table.
The idea is that an [[ActiveRecord]] object is associated with a row in a database table and its attributes are mapped
to the columns of the corresponding table columns. Reading an ActiveRecord attribute is equivalent to accessing
the corresponding table column. For example, a `Customer` object is associated with a row in the
`tbl_customer` table, and its `name` attribute is mapped to the `name` column in the `tbl_customer` table.
To get the value of the `name` column in the table row, you can simply use the expression `$customer->name`,
just like reading an object property.
Instead of writing raw SQL statements to access the data in the table, you can call intuitive methods available in the
corresponding ActiveRecord class to achieve the same goals. For example, calling [[save()]] would insert or update a row
in the underlying table:
Instead of writing raw SQL statements to perform database queries, you can call intuitive methods provided
by ActiveRecord to achieve the same goals. For example, calling [[ActiveRecord::save()|save()]] would
insert or update a row in the associated table of the ActiveRecord class:
```php
$customer = new Customer();
$customer->name = 'Qiang';
$customer->save();
$customer->save(); // a new row is inserted into tbl_customer
```
@ -24,7 +27,9 @@ To declare an ActiveRecord class you need to extend [[\yii\db\ActiveRecord]] and
implement the `tableName` method like the following:
```php
class Customer extends \yii\db\ActiveRecord
use yii\db\ActiveRecord;
class Customer extends ActiveRecord
{
/**
* @return string the name of the table associated with this ActiveRecord class.
@ -52,8 +57,6 @@ return array(
'dsn' => 'mysql:host=localhost;dbname=testdb',
'username' => 'demo',
'password' => 'demo',
// turn on schema caching to improve performance in production mode
// 'schemaCacheDuration' => 3600,
),
),
);
@ -62,19 +65,22 @@ return array(
Please read the [Database basics](database-basics.md) section to learn more on how to configure
and use database connections.
> Tip: To use a different database connection, you may override the [[ActiveRecord::getDb()]] method.
You may create a base ActiveRecord class and override its [[ActiveRecord::getDb()]] method. You
then extend from this base class for all those ActiveRecord classes that need to use the same
DB connection.
Getting Data from Database
--------------------------
There are two ActiveRecord methods for getting data from database:
Querying Data from Database
---------------------------
- [[find()]]
- [[findBySql()]]
There are two ActiveRecord methods for querying data from database:
They both return an [[ActiveQuery]] instance. Coupled with various query methods provided
by [[ActiveQuery]], ActiveRecord supports very flexible and powerful data retrieval approaches.
- [[ActiveRecord::find()]]
- [[ActiveRecord::findBySql()]]
The followings are some examples,
They both return an [[ActiveQuery]] instance which extends from [[Query]] and thus supports
the same set of flexible and powerful DB query methods. The followings are some examples,
```php
// to retrieve all *active* customers and order them by their ID:
@ -101,8 +107,10 @@ $count = Customer::find()
->count();
// to return customers in terms of arrays rather than `Customer` objects:
$customers = Customer::find()->asArray()->all();
// each $customers element is an array of name-value pairs
$customers = Customer::find()
->asArray()
->all();
// each element of $customers is an array of name-value pairs
// to index the result by customer IDs:
$customers = Customer::find()->indexBy('id')->all();
@ -115,9 +123,9 @@ Accessing Column Data
ActiveRecord maps each column of the corresponding database table row to an *attribute* in the ActiveRecord
object. An attribute is like a regular object property whose name is the same as the corresponding column
name and is case sensitive.
name and is case-sensitive.
To read the value of a column, we can use the following expression:
To read the value of a column, you can use the following expression:
```php
// "id" is the name of a column in the table associated with $customer ActiveRecord object
@ -126,28 +134,29 @@ $id = $customer->id;
$id = $customer->getAttribute('id');
```
We can get all column values through the [[attributes]] property:
You can get all column values through the [[ActiveRecord::attributes]] property:
```php
$values = $customer->attributes;
```
Saving Data to Database
-----------------------
Manipulating Data in Database
-----------------------------
ActiveRecord provides the following methods to insert, update and delete data in the database:
- [[save()]]
- [[insert()]]
- [[update()]]
- [[delete()]]
- [[updateCounters()]]
- [[updateAll()]]
- [[updateAllCounters()]]
- [[deleteAll()]]
Note that [[updateAll()]], [[updateAllCounters()]] and [[deleteAll()]] apply to the whole database
- [[ActiveRecord::save()|save()]]
- [[ActiveRecord::insert()|insert()]]
- [[ActiveRecord::update()|update()]]
- [[ActiveRecord::delete()|delete()]]
- [[ActiveRecord::updateCounters()|updateCounters()]]
- [[ActiveRecord::updateAll()|updateAll()]]
- [[ActiveRecord::updateAllCounters()|updateAllCounters()]]
- [[ActiveRecord::deleteAll()|deleteAll()]]
Note that [[ActiveRecord::updateAll()|updateAll()]], [[ActiveRecord::updateAllCounters()|updateAllCounters()]]
and [[ActiveRecord::deleteAll()|deleteAll()]] are static methods and apply to the whole database
table, while the rest of the methods only apply to the row associated with the ActiveRecord object.
The followings are some examples:
@ -163,25 +172,25 @@ $customer->save(); // equivalent to $customer->insert();
$customer = Customer::find($id);
$customer->email = 'james@example.com';
$customer->save(); // equivalent to $customer->update();
// Note that model attributes will be validated first and
// model will not be saved unless it's valid.
// to delete an existing customer record
$customer = Customer::find($id);
$customer->delete();
// to increment the age of all customers by 1
// to increment the age of ALL customers by 1
Customer::updateAllCounters(array('age' => 1));
```
Getting Relational Data
-----------------------
Querying Relational Data
------------------------
Using ActiveRecord you can expose relationships as properties. For example, with an appropriate declaration,
`$customer->orders` can return an array of `Order` objects which represent the orders placed by the specified customer.
You can use ActiveRecord to query the relational data of a table. The relational data returned can
be accessed like a property of the ActiveRecord object associated with the primary table.
For example, with an appropriate relation declaration, by accessing `$customer->orders` you may obtain
an array of `Order` objects which represent the orders placed by the specified customer.
To declare a relationship, define a getter method which returns an [[ActiveRelation]] object. For example,
To declare a relation, define a getter method which returns an [[ActiveRelation]] object. For example,
```php
class Customer extends \yii\db\ActiveRecord
@ -201,11 +210,10 @@ class Order extends \yii\db\ActiveRecord
}
```
Within the getter methods above, we call [[hasMany()]] or [[hasOne()]] methods to
create a new [[ActiveRelation]] object. The [[hasMany()]] method declares
a one-many relationship. For example, a customer has many orders. And the [[hasOne()]]
method declares a many-one or one-one relationship. For example, an order has one customer.
Both methods take two parameters:
The methods [[ActiveRecord::hasMany()]] and [[ActiveRecord::hasOne()]] used in the above
are used to model the many-one relationship and one-one relationship in a relational database.
For example, a customer has many orders, and an order has one customer.
Both methods take two parameters and return an [[ActiveRelation]] object:
- `$class`: the name of the class of the related model(s). If specified without
a namespace, the namespace of the related model class will be taken from the declaring class.
@ -214,22 +222,30 @@ Both methods take two parameters:
while the values of the array are the names of the columns from the declaring class.
It is a good practice to define relationships based on table foreign keys.
After declaring relationships getting relational data is as easy as accessing
a component property that is defined by the getter method:
After declaring relations, getting relational data is as easy as accessing a component property
that is defined by the corresponding getter method:
```php
// the orders of a customer
$customer = Customer::find($id);
// get the orders of a customer
$customer = Customer::find(1);
$orders = $customer->orders; // $orders is an array of Order objects
```
Behind the scene, the above code executes the following two SQL queries, one for each line of code:
// the customer of the first order
$customer2 = $orders[0]->customer; // $customer == $customer2
```sql
SELECT * FROM tbl_customer WHERE id=1;
SELECT * FROM tbl_order WHERE customer_id=1;
```
Because [[ActiveRelation]] extends from [[ActiveQuery]], it has the same query building methods,
which allows us to customize the query for retrieving the related objects.
For example, we may declare a `bigOrders` relationship which returns orders whose
subtotal exceeds certain amount:
> Tip: If you access the expression `$customer->orders` again, will it perform the second SQL query again?
Nope. The SQL query is only performed the first time when this expression is accessed. Any further
accesses will only return the previously fetched results that are cached internally. If you want to re-query
the relational data, simply unset the existing one first: `unset($customer->orders);`.
Sometimes, you may want to pass parameters to a relational query. For example, instead of returning
all orders of a customer, you may want to return only big orders whose subtotal exceeds a specified amount.
To do so, declare a `bigOrders` relation with the following getter method:
```php
class Customer extends \yii\db\ActiveRecord
@ -243,8 +259,22 @@ class Customer extends \yii\db\ActiveRecord
}
```
Remember that `hasMany()` returns an [[ActiveRelation]] object which extends from [[ActiveQuery]]
and thus supports the same set of querying methods as [[ActiveQuery]].
With the above declaration, if you access `$customer->bigOrders`, it will only return the orders
whose subtotal is greater than 100. To specify a different threshold value, use the following code:
```php
$orders = $customer->getBigOrders(200)->all();
```
Relations with Pivot Table
--------------------------
Sometimes, two tables are related together via an intermediary table called
[pivot table](http://en.wikipedia.org/wiki/Pivot_table). To declare such relationships, we can customize
[pivot table](http://en.wikipedia.org/wiki/Pivot_table). To declare such relations, we can customize
the [[ActiveRelation]] object by calling its [[ActiveRelation::via()]] or [[ActiveRelation::viaTable()]]
method.
@ -283,7 +313,10 @@ class Order extends \yii\db\ActiveRecord
```
When you access the related objects the first time, behind the scene ActiveRecord performs a DB query
Lazy and Eager Loading
----------------------
As described earlier, when you access the related objects the first time, ActiveRecord will perform a DB query
to retrieve the corresponding data and populate it into the related objects. No query will be performed
if you access the same related objects again. We call this *lazy loading*. For example,
@ -296,9 +329,7 @@ $orders = $customer->orders;
$orders2 = $customer->orders;
```
Lazy loading is very convenient to use. However, it may suffer from performance
issue in the following scenario:
Lazy loading is very convenient to use. However, it may suffer from a performance issue in the following scenario:
```php
// SQL executed: SELECT * FROM tbl_customer LIMIT 100
@ -313,12 +344,12 @@ foreach ($customers as $customer) {
How many SQL queries will be performed in the above code, assuming there are more than 100 customers in
the database? 101! The first SQL query brings back 100 customers. Then for each customer, a SQL query
is performed to bring back the customer's orders.
is performed to bring back the orders of that customer.
To solve the above performance problem, you can use the so-called *eager loading* approach by calling [[ActiveQuery::with()]]:
```php
// SQL executed: SELECT * FROM tbl_customer LIMIT 100
// SQL executed: SELECT * FROM tbl_customer LIMIT 100;
// SELECT * FROM tbl_orders WHERE customer_id IN (1,2,...)
$customers = Customer::find()->limit(100)
->with('orders')->all();
@ -333,7 +364,7 @@ foreach ($customers as $customer) {
As you can see, only two SQL queries are needed for the same task.
Sometimes, you may want to customize the relational queries on the fly. It can be
Sometimes, you may want to customize the relational queries on the fly. This can be
done for both lazy loading and eager loading. For example,
```php
@ -357,8 +388,8 @@ Working with Relationships
ActiveRecord provides the following two methods for establishing and breaking a
relationship between two ActiveRecord objects:
- [[link()]]
- [[unlink()]]
- [[ActiveRecord::link()|link()]]
- [[ActiveRecord::unlink()|unlink()]]
For example, given a customer and a new order, we can use the following code to make the
order owned by the customer:
@ -378,9 +409,9 @@ Data Input and Validation
-------------------------
ActiveRecord inherits data validation and data input features from [[\yii\base\Model]]. Data validation is called
automatically when `save()` is performed and is canceling saving in case attributes aren't valid.
automatically when `save()` is performed. If data validation fails, the saving operation will be cancelled.
For more details refer to [Model](model.md) section of the guide.
For more details refer to the [Model](model.md) section of this guide.
Life Cycles of an ActiveRecord Object
@ -419,7 +450,7 @@ Finally when calling [[delete()]] to delete an ActiveRecord, we will have the fo
Scopes
------
A scope is a method that customizes a given [[ActiveQuery]] object. Scope methods are defined
A scope is a method that customizes a given [[ActiveQuery]] object. Scope methods are static and are defined
in the ActiveRecord classes. They can be invoked through the [[ActiveQuery]] object that is created
via [[find()]] or [[findBySql()]]. The following is an example:
@ -466,12 +497,16 @@ $customers = Customer::find()->olderThan(50)->all();
The parameters should follow after the `$query` parameter when defining the scope method, and they
can take default values like shown above.
Atomic operations and scenarios
-------------------------------
Transactional operations
------------------------
When a few DB operations are related and are executed
TODO: FIXME: WIP, TBD, https://github.com/yiisoft/yii2/issues/226
Imagine situation where you have to save something related to the main model in [[beforeSave()]],
,
[[afterSave()]], [[beforeDelete()]] and/or [[afterDelete()]] life cycle methods. Developer may come
to the solution of overriding ActiveRecord [[save()]] method with database transaction wrapping or
even using transaction in controller action, which is strictly speaking doesn't seems to be a good
@ -596,6 +631,16 @@ class ProductController extends \yii\web\Controller
}
```
Optimistic Locks
----------------
TODO
Dirty Attributes
----------------
TODO
See also
--------

138
docs/guide/apps-advanced.md

@ -0,0 +1,138 @@
Advanced application template
=============================
This template is for large projects developed in teams where backend is divided from frontend, application is deployed
to multiple servers etc. This application template also goes a bit further regarding features and provides essential
database, signup and password restore out of the box.
Directory structure
-------------------
The root directory contains the following subdirectories:
- `backend` - backend web application.
- `common` - files common to all applications.
- `console` - console application.
- `environments` - environment configs.
- `frontend` - frontend web application.
Root directory contains a set of files.
- `.gitignore` contains a list of directories ignored by git version system. If you need something never get to your source
code repository, add it there.
- `composer.json` - Composer config described in detail below.
- `init` - initialization script described in "Composer config described in detail below".
- `init.bat` - same for Windows.
- `LICENSE.md` - license info. Put your project license there. Especially when opensourcing.
- `README.md` - basic info about installing template. Consider replacing it with information about your project and its
installation.
- `requirements.php` - Yii requirements checker.
- `yii` - console application bootstrap.
- `yii.bat` - same for Windows.
Applications
------------
There are three applications in advanced template: frontend, backend and console. Frontend is typically what is presented
to end user, the project itself. Backend is admin panel, analytics and such functionality. Console is typically used for
cron jobs and low-level server management. Also it's used during application deployment and handles migrations and assets.
There's also a `common` directory that contains files used by more than one application. For example, `User` model.
frontend and backend are both web applications and both contain `web` directory. That's the webroot you should point your
webserver to.
Each application has its own namespace and alias corresponding to its name. Same applies to common directory.
Configuration and environments
------------------------------
There are multiple problems with straightforward approach to configuration:
- Each team member has its own configuration options. Commiting such config will affect other team members.
- Production database password and API keys should not end up in repository.
- There are multiple servers: development, testing, production. Each should have its own configuration.
- Defining all configuration options for each case is very repetitive and takes too much time to maintain.
In order to solve these issues Yii introduces environments concept that is very simple. Each environment is represented
by a set of files under `environments` directory. `init` command is used to switch between these. What is really does is
just copying everything from environment directory over the root directory where all applications are.
Typically environment contains application bootstrap files such as `index.php` and config files postfixed with
`-local.php`. These are added to `.gitignore` and never added to source code repository.
In order to avoid duplication configurations are overrding each other. For example, frontend reads configuration in the
following order:
- `frontend/config/main.php`
- `frontend/config/main-local.php`
Parameters are read in the following order:
- `common/config/params.php`
- `common/config/params-local.php`
- `frontend/config/params.php`
- `frontend/config/params-local.php`
The later config file overrides the former.
Another difference is that most application component configurations are moved to params. Since params are read from
`common` as well it allows you to specify database connection in one file and it will be then used for all applications.
Configuring Composer
--------------------
After application template is installed it's a good idea to adjust defaul `composer.json` that can be found in the root
directory:
```javascript
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Application Template",
"keywords": ["yii", "framework", "advanced", "application template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"require": {
"php": ">=5.3.0",
"yiisoft/yii2": "dev-master",
"yiisoft/yii2-composer": "dev-master"
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\InstallHandler::setPermissions"
]
},
"extra": {
"yii-install-writable": [
"backend/runtime",
"backend/web/assets",
"console/runtime",
"console/migrations",
"frontend/runtime",
"frontend/web/assets"
]
}
}
```
First we're updating basic information. Change `name`, `description`, `keywords`, `homepage` and `support` to match
your project.
Now the interesting part. You can add more packages your application needs to `require` section.
For example, to use markdown helper you need to add `michelf/php-markdown`. All these packages are coming from
[packagist.org](https://packagist.org/) so feel free to browse the website for useful code.
After your `composer.json` is changed you can run `php composer.phar update`, wait till packages are downloaded and
installed and then just use them. Autoloading of classes will be handled automatically.

142
docs/guide/apps-basic.md

@ -0,0 +1,142 @@
Basic application template
==========================
This template is a perfect fit for small projects or learning Yii2.
The application has four pages: the homepage, the about page, the contact page and the login page.
The contact page displays a contact form that users can fill in to submit their inquiries to the webmaster,
and the login page allows users to be authenticated before accessing privileged contents.
Directory structure
-------------------
The basic application does not divide application directories much. Here's the basic structure:
- `commands` - console controllers.
- `config` - configuration.
- `controllers` - web controllers.
- `models` - application models.
- `runtime` - logs, states, file cache.
- `views` - view templates.
- `web` - webroot.
Root directory contains a set of files.
- `.gitignore` contains a list of directories ignored by git version system. If you need something never get to your source
code repository, add it there.
- `codeception.yml` - Codeception config.
- `composer.json` - Composer config described in detail below.
- `LICENSE.md` - license info. Put your project license there. Especially when opensourcing.
- `README.md` - basic info about installing template. Consider replacing it with information about your project and its
installation.
- `requirements.php` - Yii requirements checker.
- `yii` - console application bootstrap.
- `yii.bat` - same for Windows.
### config
This directory contains configuration files:
- `AppAsset.php` - definition of application assets such as CSS, JavaScript etc. Check [Managing assets](assets.md) for
details.
- `console.php` - console application configuration.
- `params.php` - common application parameters.
- `web.php` - web application configuration.
- `web-test.php` - web application configuration used when running functional tests.
All these files except `AppAsset.php` are returning arrays used to configure corresponding application properties. Check
[Configuration](configuration.md) guide section for details.
### views
Views directory contains templates your application is using. In the basic template there are:
```
layouts
main.php
site
about.php
contact.php
error.php
index.php
login.php
```
`layouts` contains HTML layouts i.e. page markup except content: doctype, head section, main menu, footer etc.
The rest are typically controller views. By convention these are located in subdirectories matching controller id. For
`SiteController` views are under `site`. Names of the views themselves are typically match controller action names.
Partials are often named starting with underscore.
### web
Directory is a webroot. Typically a webserver is pointed into it.
```
assets
css
index.php
index-test.php
```
`assets` contains published asset files such as CSS, JavaScript etc. Publishing process is automatic so you don't need
to do anything with this directory other than making sure Yii has enough permissions to write to it.
`css` contains plain CSS files and is useful for global CSS that isn't going to be compressed or merged by assets manager.
`index.php` is the main web application bootstrap and is the central entry point for it. `index-test.php` is the entry
point for functional testing.
Configuring Composer
--------------------
After application template is installed it's a good idea to adjust defaul `composer.json` that can be found in the root
directory:
```javascript
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Application Template",
"keywords": ["yii", "framework", "basic", "application template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"require": {
"php": ">=5.3.0",
"yiisoft/yii2": "dev-master",
"yiisoft/yii2-composer": "dev-master"
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\InstallHandler::setPermissions"
]
},
"extra": {
"yii-install-writable": [
"runtime",
"web/assets"
],
"yii-install-executable": [
"yii"
]
}
}
```
First we're updating basic information. Change `name`, `description`, `keywords`, `homepage` and `support` to match
your project.
Now the interesting part. You can add more packages your application needs to `require` section.
For example, to use markdown helper you need to add `michelf/php-markdown`. All these packages are coming from
[packagist.org](https://packagist.org/) so feel free to browse the website for useful code.
After your `composer.json` is changed you can run `php composer.phar update`, wait till packages are downloaded and
installed and then just use them. Autoloading of classes will be handled automatically.

6
docs/guide/bootstrap-widgets.md

@ -0,0 +1,6 @@
Twitter Bootstrap widgets
=========================
Overview
--------

69
docs/guide/bootstrap.md

@ -1,69 +0,0 @@
Bootstrap with Yii
==================
Yii provides a few ready-to-use application templates. Based on your needs, you may
choose one of them to bootstrap your project.
In the following, we describe how to get started with the "Yii 2 Basic Application Template".
### Install via Composer
If you do not have [Composer](http://getcomposer.org/), you may download it from
[http://getcomposer.org/](http://getcomposer.org/) or run the following command on Linux/Unix/MacOS:
~~~
curl -s http://getcomposer.org/installer | php
~~~
You can then install the Bootstrap Application using the following command:
~~~
php composer.phar create-project --stability=dev yiisoft/yii2-app-basic yii-basic
~~~
Now you should be able to access the Bootstrap Application using the URL `http://localhost/yii-basic/web/`,
assuming `yii-basic` is directly under the document root of your Web server.
As you can see, the application has four pages: the homepage, the about page,
the contact page and the login page. The contact page displays a contact
form that users can fill in to submit their inquiries to the webmaster,
and the login page allows users to be authenticated before accessing privileged contents.
The following diagram shows the directory structure of this application.
~~~
yii-basic/
yii yii command line script for Unix/Linux
yii.bat yii command line script for Windows
requirements.php the requirement checker script
commands/ containing customized yii console commands
config/ containing configuration files
console.php the console application configuration
main.php the Web application configuration
controllers/ containing controller class files
SiteController.php the default controller class
vendor/ containing third-party extensions and libraries
models/ containing model class files
User.php the User model
LoginForm.php the form model for 'login' action
ContactForm.php the form model for 'contact' action
runtime/ containing temporarily generated files
views/ containing controller view and layout files
layouts/ containing layout view files
main.php the base layout shared by all pages
site/ containing view files for the 'site' controller
about.php the view for the 'about' action
contact.php the view for the 'contact' action
index.php the view for the 'index' action
login.php the view for the 'login' action
web/ containing Web-accessible resources
index.php Web application entry script file
assets/ containing published resource files
css/ containing CSS files
~~~
TBD

98
docs/guide/configuration.md

@ -0,0 +1,98 @@
Configuration
=============
In Yii application and majority of components have sensible defaults so it's unlikely you spend lots of time configuring
it. Still there are some mandatory options such as database connection you should set up.
How application is configured depends on application template but there are some genral principles applying in any case.
Configuring options in bootstrap file
-------------------------------------
For each application in Yii there is at least one bootstrap file. For web applications it's typically `index.php`, for
console applications it's `yii`. Both are doing nearly the same job:
1. Setting common constants.
2. Including Yii itself.
3. Including Composer autoloader.
4. Reading config file into `$config`.
5. Creating new application instance using `$config` and running it.
Bootstrap file is not the part of framework but your application so it's OK to adjust it to fit your application. Typical
adjustments are the value of `YII_DEBUG` that should never be `true` on production and the way config is read.
Configuring application instance
--------------------------------
It was mentioned above that application is configured in bootstrap file when its instance is created. Config is typically
stored in a PHP file in `/config` directory of the application and looks like the following:
```php
<?php
return array(
'id' => 'applicationId',
'basePath' => dirname(__DIR__),
'components' => array(
// ...
),
'params' => require(__DIR__ . '/params.php'),
);
```
In the above array keys are names of application properties. Depending on application type you can check properies of
either `\yii\web\Application` or `\yii\console\Application`. Both are extended from `\yii\base\Application`.
> Note that you can configure not only public class properties but anything accessible via setter. For example, to
configure runtime path you can use key named `runtimePath`. There's no such property in the application class but
since there's a corresponding setter named `setRuntimePath` it will be properly configured.
Configuring application components
----------------------------------
Majority of Yii functionality are application components. These are attached to application via its `components` property:
```php
<?php
return array(
'id' => 'applicationId',
'basePath' => dirname(__DIR__),
'components' => array(
'cache' => array(
'class' => 'yii\caching\FileCache',
),
'user' => array(
'identityClass' => 'app\models\User',
),
'errorHandler' => array(
'errorAction' => 'site/error',
),
'log' => array(
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => array(
array(
'class' => 'yii\log\FileTarget',
'levels' => array('error', 'warning'),
),
),
),
),
// ...
);
```
In the above four components are configured: `cache`, `user`, `errorHandler`, `log`. Each entry key is a component ID
and the value is the configuration array. ID is used to access the component like `\Yii::$app->myComponent`.
Configuration array has one special key named `class` that sets component class. The rest of the keys and values are used
to configure component properties in the same way as top-level keys are used to configure application properties.
Each application has predefined set of the components. In case of configuring one of these `class` key is omitted and
application default class is used instead. You can check `registerCoreComponents` method of the application you are using
to get a list of component IDs and corresponding classes.
Note that Yii is smart enough to configure the component when it's actually used i.e. if `cache` is never used it will
not be instantiated and configured at all.
Setting component defaults classwide
------------------------------------
TBD

9
docs/guide/debugger.md

@ -0,0 +1,9 @@
Debug toolbar and debugger
==========================
Overview
--------
Creating your own panels
------------------------

20
docs/guide/index.md

@ -7,9 +7,15 @@ Getting started
===============
- [Installation](installation.md)
- [Bootstrap with Yii](bootstrap.md)
- [Configuration](configuration.md)
Application templates
=====================
- [Basic](apps-basic.md)
- [Advanced](apps-advanced.md)
- [Creating your own application template](apps-own.md)
Base concepts
=============
@ -41,17 +47,26 @@ Security and access control
- [Security](security.md)
- Role based access control
Data providers, lists and grids
===============================
- Overview
- Data providers
- Grids
- Lists
Toolbox
=======
- [Automatic Code Generation](gii.md)
- Debug toolbar
- [Debug toolbar and debugger](debugger.md)
- [Error Handling](error.md)
- [Logging](logging.md)
More
====
- [Bootstrap widgets](bootstrap-widgets.md)
- [Form](form.md)
- [Model validation reference](validation.md)
- [Caching](caching.md)
@ -60,5 +75,6 @@ More
- [Theming](theming.md)
- [Console Application](console.md)
- [Performance Tuning](performance.md)
- [Managing assets](assets.md)
- [Testing](testing.md)
- [Upgrading from 1.1 to 2.0](upgrade-from-v1.md)

13
docs/guide/installation.md

@ -4,7 +4,15 @@ Installation
Installing via Composer
-----------------------
The recommended way of installing Yii is by using Composer package manager.
The recommended way of installing Yii is by using [Composer](http://getcomposer.org/) package manager. If you do not
have it, you may download it from [http://getcomposer.org/](http://getcomposer.org/) or run the following command:
```
curl -s http://getcomposer.org/installer | php
```
Yii provides a few ready-to-use application templates. Based on your needs, you may choose one of them to bootstrap
your project.
There are two application templates available:
@ -12,7 +20,8 @@ There are two application templates available:
- [advanced](https://github.com/yiisoft/yii2-app-advanced) that is a set of frontend, backend, console, common
(shared code) and environments support.
Please refer to installation instructions on these pages.
Please refer to installation instructions on these pages. To read more about ideas behing these application templates and
proposed usage refer to [basic application template](apps-basic.md) and [advanced application template](apps-advanced.md).
Installing from zip
-------------------

2
extensions/jui/yii/jui/DialogAsset.php

@ -22,6 +22,6 @@ class DialogAsset extends AssetBundle
'yii\jui\CoreAsset',
'yii\jui\ButtonAsset',
'yii\jui\DraggableAsset',
'yii\jui\Resizable',
'yii\jui\ResizableAsset',
);
}

45
framework/yii/YiiBase.php

@ -9,7 +9,6 @@ namespace yii;
use yii\base\Exception;
use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
use yii\base\UnknownClassException;
use yii\log\Logger;
/**
@ -69,11 +68,6 @@ class YiiBase
*/
public static $classMap = array();
/**
* @var boolean whether to search PHP include_path when autoloading unknown classes.
* You may want to turn this off if you are also using autoloaders from other libraries.
*/
public static $enableIncludePath = false;
/**
* @var \yii\console\Application|\yii\web\Application the application instance
*/
public static $app;
@ -338,23 +332,17 @@ class YiiBase
* 3. If the class is named in PEAR style (e.g. `PHPUnit_Framework_TestCase`),
* it will attempt to include the file associated with the corresponding path alias
* (e.g. `@PHPUnit/Framework/TestCase.php`);
* 4. Search PHP include_path for the actual class file if [[enableIncludePath]] is true;
* 5. Return false so that other autoloaders have chance to include the class file.
*
* @param string $className class name
* @return boolean whether the class has been loaded successfully
* @throws InvalidConfigException if the class file does not exist
* @throws UnknownClassException if the class does not exist in the class file
* @param string $className the fully qualified class name without a leading backslash "\"
*/
public static function autoload($className)
{
$className = ltrim($className, '\\');
if (isset(self::$classMap[$className])) {
$classFile = self::$classMap[$className];
if ($classFile[0] === '@') {
$classFile = static::getAlias($classFile);
}
include($classFile);
} else {
// follow PSR-0 to determine the class file
if (($pos = strrpos($className, '\\')) !== false) {
@ -365,32 +353,13 @@ class YiiBase
$path = str_replace('_', '/', $className) . '.php';
}
// try via path alias first
// try loading via path alias
if (strpos($path, '/') !== false) {
$fullPath = static::getAlias('@' . $path, false);
if ($fullPath !== false && is_file($fullPath)) {
$classFile = $fullPath;
}
}
// search include_path
if (!isset($classFile) && self::$enableIncludePath && ($fullPath = stream_resolve_include_path($path)) !== false) {
$classFile = $fullPath;
}
if (!isset($classFile)) {
// return false to let other autoloaders to try loading the class
return false;
$classFile = static::getAlias('@' . $path, false);
if ($classFile !== false && is_file($classFile)) {
include($classFile);
}
}
include($classFile);
if (class_exists($className, false) || interface_exists($className, false) ||
function_exists('trait_exists') && trait_exists($className, false)) {
return true;
} else {
throw new UnknownClassException("Unable to find '$className' in file: $classFile");
}
}
@ -567,7 +536,7 @@ class YiiBase
*/
public static function powered()
{
return 'Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a>.';
return 'Powered by <a href="http://www.yiiframework.com/" rel="external">Yii Framework</a>';
}
/**

12
framework/yii/assets/yii.activeForm.js

@ -83,7 +83,7 @@
var settings = $.extend({}, defaults, options || {});
if (settings.validationUrl === undefined) {
settings.validationUrl = $form.attr('action');
settings.validationUrl = $form.prop('action');
}
$.each(attributes, function (i) {
attributes[i] = $.extend({value: getValue($form, this)}, attributeDefaults, this);
@ -291,13 +291,13 @@
// If the validation is triggered by form submission, ajax validation
// should be done only when all inputs pass client validation
var $button = data.submitObject,
extData = '&' + data.settings.ajaxVar + '=' + $form.attr('id');
if ($button && $button.length && $button.attr('name')) {
extData += '&' + $button.attr('name') + '=' + $button.attr('value');
extData = '&' + data.settings.ajaxVar + '=' + $form.prop('id');
if ($button && $button.length && $button.prop('name')) {
extData += '&' + $button.prop('name') + '=' + $button.prop('value');
}
$.ajax({
url: data.settings.validationUrl,
type: $form.attr('method'),
type: $form.prop('method'),
data: $form.serialize() + extData,
dataType: 'json',
success: function (msgs) {
@ -380,7 +380,7 @@
var getValue = function ($form, attribute) {
var $input = findInput($form, attribute);
var type = $input.attr('type');
var type = $input.prop('type');
if (type === 'checkbox' || type === 'radio') {
return $input.filter(':checked').val();
} else {

78
framework/yii/assets/yii.gridView.js

@ -0,0 +1,78 @@
/**
* Yii GridView widget.
*
* This is the JavaScript widget used by the yii\grid\GridView widget.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
(function ($) {
$.fn.yiiGridView = function (method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || !method) {
return methods.init.apply(this, arguments);
} else {
$.error('Method ' + method + ' does not exist on jQuery.yiiGridView');
return false;
}
};
var defaults = {
};
var methods = {
init: function (options) {
return this.each(function () {
var $e = $(this);
var settings = $.extend({}, defaults, options || {});
$e.data('yiiGridView', {
settings: settings
});
});
},
setSelectionColumn: function (options) {
var $grid = $(this);
var data = $grid.data('yiiGridView');
data.selectionColumn = options.name;
if (!options.multiple) {
return;
}
$grid.on('click.yiiGridView', "input[name='" + options.checkAll + "']", function () {
$grid.find("input[name='" + options.name + "']:enabled").prop('checked', this.checked);
});
$grid.on('click.yiiGridView', "input[name='" + options.name + "']:enabled", function () {
var all = $grid.find("input[name='" + options.name + "']").length == $grid.find("input[name='" + options.name + "']:checked").length;
$grid.find("input[name='" + options.checkAll + "']").prop('checked', all);
});
},
getSelectedRows: function () {
var $grid = $(this);
var data = $grid.data('yiiGridView');
var keys = [];
if (data.selectionColumn) {
$grid.find("input[name='" + data.selectionColumn + "']:checked").each(function () {
keys.push($(this).parent().closest('tr').data('key'));
});
}
return keys;
},
destroy: function () {
return this.each(function () {
$(window).unbind('.yiiGridView');
$(this).removeData('yiiGridView');
});
},
data: function() {
return this.data('yiiGridView');
}
};
})(window.jQuery);

2
framework/yii/base/Action.php

@ -77,7 +77,7 @@ class Action extends Component
throw new InvalidConfigException(get_class($this) . ' must define a "run()" method.');
}
$args = $this->controller->bindActionParams($this, $params);
Yii::info('Running action: ' . get_class($this) . '::run()', __METHOD__);
Yii::trace('Running action: ' . get_class($this) . '::run()', __METHOD__);
if (Yii::$app->requestedParams === null) {
Yii::$app->requestedParams = $args;
}

2
framework/yii/base/Application.php

@ -169,7 +169,7 @@ abstract class Application extends Module
public function registerErrorHandlers()
{
if (YII_ENABLE_ERROR_HANDLER) {
ini_set('display_errors', 0);
//ini_set('display_errors', 0);
set_exception_handler(array($this, 'handleException'));
set_error_handler(array($this, 'handleError'), error_reporting());
if ($this->memoryReserveSize > 0) {

2
framework/yii/base/Controller.php

@ -281,7 +281,7 @@ class Controller extends Component
* - an absolute path (e.g. "/main"): the layout name starts with a slash. The actual layout file will be
* looked for under the [[Application::layoutPath|layout path]] of the application;
* - a relative path (e.g. "main"): the actual layout layout file will be looked for under the
* [[Module::viewPath|view path]] of the context module.
* [[Module::layoutPath|layout path]] of the context module.
*
* If the layout name does not contain a file extension, it will use the default one `.php`.
*

2
framework/yii/base/InlineAction.php

@ -46,7 +46,7 @@ class InlineAction extends Action
public function runWithParams($params)
{
$args = $this->controller->bindActionParams($this, $params);
Yii::info('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
if (Yii::$app->requestedParams === null) {
Yii::$app->requestedParams = $args;
}

18
framework/yii/base/Model.php

@ -8,8 +8,11 @@
namespace yii\base;
use Yii;
use ArrayAccess;
use ArrayObject;
use ArrayIterator;
use ReflectionClass;
use IteratorAggregate;
use yii\helpers\Inflector;
use yii\validators\RequiredValidator;
use yii\validators\Validator;
@ -42,7 +45,7 @@ use yii\validators\Validator;
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class Model extends Component implements \IteratorAggregate, \ArrayAccess
class Model extends Component implements IteratorAggregate, ArrayAccess
{
/**
* @event ModelEvent an event raised at the beginning of [[validate()]]. You may set
@ -184,7 +187,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
*/
public function formName()
{
$reflector = new \ReflectionClass($this);
$reflector = new ReflectionClass($this);
return $reflector->getShortName();
}
@ -196,7 +199,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
*/
public function attributes()
{
$class = new \ReflectionClass($this);
$class = new ReflectionClass($this);
$names = array();
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
$name = $property->getName();
@ -568,7 +571,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
public function onUnsafeAttribute($name, $value)
{
if (YII_DEBUG) {
\Yii::info("Failed to set unsafe attribute '$name' in '" . get_class($this) . "'.", __METHOD__);
Yii::trace("Failed to set unsafe attribute '$name' in '" . get_class($this) . "'.", __METHOD__);
}
}
@ -608,9 +611,6 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
return array();
}
$attributes = array();
if (isset($scenarios[$scenario]['attributes']) && is_array($scenarios[$scenario]['attributes'])) {
$scenarios[$scenario] = $scenarios[$scenario]['attributes'];
}
foreach ($scenarios[$scenario] as $attribute) {
if ($attribute[0] !== '!') {
$attributes[] = $attribute;
@ -630,11 +630,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
if (!isset($scenarios[$scenario])) {
return array();
}
if (isset($scenarios[$scenario]['attributes']) && is_array($scenarios[$scenario]['attributes'])) {
$attributes = $scenarios[$scenario]['attributes'];
} else {
$attributes = $scenarios[$scenario];
}
foreach ($attributes as $i => $attribute) {
if ($attribute[0] === '!') {
$attributes[$i] = substr($attribute, 1);

25
framework/yii/base/UnknownClassException.php

@ -1,25 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\base;
/**
* UnknownClassException represents an exception caused by accessing an unknown class.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class UnknownClassException extends Exception
{
/**
* @return string the user-friendly name of this exception
*/
public function getName()
{
return \Yii::t('yii', 'Unknown Class');
}
}

4
framework/yii/base/View.php

@ -269,7 +269,7 @@ class View extends Component
$renderer = $this->renderers[$ext];
$output = $renderer->render($this, $viewFile, $params);
} else {
Yii::info("Rendering view file: $viewFile", __METHOD__);
Yii::trace("Rendering view file: $viewFile", __METHOD__);
$output = $this->renderPhpFile($viewFile, $params);
}
$this->afterRender($viewFile, $output);
@ -577,7 +577,7 @@ class View extends Component
$bundle = $am->getBundle($name);
$this->assetBundles[$name] = false;
$bundle->registerAssets($this);
$this->assetBundles[$name] = true;
$this->assetBundles[$name] = $bundle;
} elseif ($this->assetBundles[$name] === false) {
throw new InvalidConfigException("A circular dependency is detected for bundle '$name'.");
}

26
framework/yii/bootstrap/AffixAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class AffixAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-affix.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

26
framework/yii/bootstrap/AlertAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class AlertAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-alert.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

2
framework/yii/bootstrap/BootstrapAsset.php

@ -6,6 +6,7 @@
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
@ -17,5 +18,6 @@ class BootstrapAsset extends AssetBundle
public $sourcePath = '@yii/bootstrap/assets';
public $css = array(
'css/bootstrap.css',
'css/bootstrap-glyphicons.css',
);
}

8
framework/yii/bootstrap/TransitionAsset.php → framework/yii/bootstrap/BootstrapPluginAsset.php

@ -6,20 +6,22 @@
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class TransitionAsset extends AssetBundle
class BootstrapPluginAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-transition.js',
'js/bootstrap.js',
);
public $depends = array(
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
'yii\bootstrap\BootstrapAsset',
);
}

26
framework/yii/bootstrap/ButtonAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class ButtonAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-button.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

29
framework/yii/bootstrap/ButtonDropdown.php

@ -46,7 +46,7 @@ class ButtonDropdown extends Widget
/**
* @var array the HTML attributes of the button.
*/
public $buttonOptions = array();
public $options = array();
/**
* @var array the configuration array for [[Dropdown]].
*/
@ -58,24 +58,11 @@ class ButtonDropdown extends Widget
/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
*/
public function init()
{
parent::init();
Html::addCssClass($this->options, 'btn-group');
}
/**
* Renders the widget.
*/
public function run()
{
echo Html::beginTag('div', $this->options) . "\n";
echo $this->renderButton() . "\n";
echo $this->renderDropdown() . "\n";
echo Html::endTag('div') . "\n";
echo $this->renderButton() . "\n" . $this->renderDropdown();
$this->registerPlugin('button');
}
@ -85,21 +72,21 @@ class ButtonDropdown extends Widget
*/
protected function renderButton()
{
Html::addCssClass($this->buttonOptions, 'btn');
Html::addCssClass($this->options, 'btn');
if ($this->split) {
$tag = 'button';
$options = $this->buttonOptions;
$this->buttonOptions['data-toggle'] = 'dropdown';
Html::addCssClass($this->buttonOptions, 'dropdown-toggle');
$options = $this->options;
$this->options['data-toggle'] = 'dropdown';
Html::addCssClass($this->options, 'dropdown-toggle');
$splitButton = Button::widget(array(
'label' => '<span class="caret"></span>',
'encodeLabel' => false,
'options' => $this->buttonOptions,
'options' => $this->options,
));
} else {
$tag = 'a';
$this->label .= ' <span class="caret"></span>';
$options = $this->buttonOptions;
$options = $this->options;
if (!isset($options['href'])) {
$options['href'] = '#';
}

7
framework/yii/bootstrap/ButtonGroup.php

@ -18,7 +18,7 @@ use yii\helpers\Html;
* ```php
* // a button group with items configuration
* echo ButtonGroup::::widget(array(
* 'items' => array(
* 'buttons' => array(
* array('label' => 'A'),
* array('label' => 'B'),
* )
@ -26,7 +26,7 @@ use yii\helpers\Html;
*
* // button group with an item as a string
* echo ButtonGroup::::widget(array(
* 'items' => array(
* 'buttons' => array(
* Button::widget(array('label' => 'A')),
* array('label' => 'B'),
* )
@ -60,7 +60,6 @@ class ButtonGroup extends Widget
public function init()
{
parent::init();
$this->clientOptions = false;
Html::addCssClass($this->options, 'btn-group');
}
@ -70,7 +69,7 @@ class ButtonGroup extends Widget
public function run()
{
echo Html::tag('div', $this->renderButtons(), $this->options);
$this->registerPlugin('button');
BootstrapAsset::register($this->getView());
}
/**

26
framework/yii/bootstrap/CarouselAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class CarouselAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-carousel.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

26
framework/yii/bootstrap/CollapseAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class CollapseAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-collapse.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

26
framework/yii/bootstrap/DropdownAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class DropdownAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-dropdown.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

6
framework/yii/bootstrap/Modal.php

@ -88,6 +88,8 @@ class Modal extends Widget
echo $this->renderToggleButton() . "\n";
echo Html::beginTag('div', $this->options) . "\n";
echo Html::beginTag('div', array('class' => 'modal-dialog')) . "\n";
echo Html::beginTag('div', array('class' => 'modal-content')) . "\n";
echo $this->renderHeader() . "\n";
echo $this->renderBodyBegin() . "\n";
}
@ -99,6 +101,8 @@ class Modal extends Widget
{
echo "\n" . $this->renderBodyEnd();
echo "\n" . $this->renderFooter();
echo "\n" . Html::endTag('div'); // modal-content
echo "\n" . Html::endTag('div'); // modal-dialog
echo "\n" . Html::endTag('div');
$this->registerPlugin('modal');
@ -195,7 +199,7 @@ class Modal extends Widget
protected function initOptions()
{
$this->options = array_merge(array(
'class' => 'modal hide',
'class' => 'modal fade',
), $this->options);
Html::addCssClass($this->options, 'modal');

26
framework/yii/bootstrap/ModalAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class ModalAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-modal.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

74
framework/yii/bootstrap/Nav.php

@ -7,6 +7,7 @@
namespace yii\bootstrap;
use Yii;
use yii\base\InvalidConfigException;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
@ -21,9 +22,8 @@ use yii\helpers\Html;
* 'items' => array(
* array(
* 'label' => 'Home',
* 'url' => '/',
* 'url' => array('site/index'),
* 'linkOptions' => array(...),
* 'active' => true,
* ),
* array(
* 'label' => 'Dropdown',
@ -63,7 +63,7 @@ class Nav extends Widget
* - linkOptions: array, optional, the HTML attributes of the item's link.
* - options: array, optional, the HTML attributes of the item container (LI).
* - active: boolean, optional, whether the item should be on active state or not.
* - dropdown: array|string, optional, the configuration array for creating a [[Dropdown]] widget,
* - items: array|string, optional, the configuration array for creating a [[Dropdown]] widget,
* or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus.
*/
public $items = array();
@ -71,6 +71,26 @@ class Nav extends Widget
* @var boolean whether the nav items labels should be HTML-encoded.
*/
public $encodeLabels = true;
/**
* @var boolean whether to automatically activate items according to whether their route setting
* matches the currently requested route.
* @see isItemActive
*/
public $activateItems = true;
/**
* @var string the route used to determine if a menu item is active or not.
* If not set, it will use the route of the current request.
* @see params
* @see isItemActive
*/
public $route;
/**
* @var array the parameters used to determine if a menu item is active or not.
* If not set, it will use `$_GET`.
* @see route
* @see isItemActive
*/
public $params;
/**
@ -79,6 +99,12 @@ class Nav extends Widget
public function init()
{
parent::init();
if ($this->route === null && Yii::$app->controller !== null) {
$this->route = Yii::$app->controller->getRoute();
}
if ($this->params === null) {
$this->params = $_GET;
}
Html::addCssClass($this->options, 'nav');
}
@ -124,7 +150,13 @@ class Nav extends Widget
$url = Html::url(ArrayHelper::getValue($item, 'url', '#'));
$linkOptions = ArrayHelper::getValue($item, 'linkOptions', array());
if (ArrayHelper::getValue($item, 'active')) {
if (isset($item['active'])) {
$active = ArrayHelper::remove($item, 'active', false);
} else {
$active = $this->isItemActive($item);
}
if ($active) {
Html::addCssClass($options, 'active');
}
@ -144,4 +176,38 @@ class Nav extends Widget
return Html::tag('li', Html::a($label, $url, $linkOptions) . $items, $options);
}
/**
* Checks whether a menu item is active.
* This is done by checking if [[route]] and [[params]] match that specified in the `url` option of the menu item.
* When the `url` option of a menu item is specified in terms of an array, its first element is treated
* as the route for the item and the rest of the elements are the associated parameters.
* Only when its route and parameters match [[route]] and [[params]], respectively, will a menu item
* be considered active.
* @param array $item the menu item to be checked
* @return boolean whether the menu item is active
*/
protected function isItemActive($item)
{
if (isset($item['url']) && is_array($item['url']) && isset($item['url'][0])) {
$route = $item['url'][0];
if ($route[0] !== '/' && Yii::$app->controller) {
$route = Yii::$app->controller->module->getUniqueId() . '/' . $route;
}
if (ltrim($route, '/') !== $this->route) {
return false;
}
unset($item['url']['#']);
if (count($item['url']) > 1) {
foreach (array_splice($item['url'], 1) as $name => $value) {
if (!isset($this->params[$name]) || $this->params[$name] != $value) {
return false;
}
}
}
return true;
}
return false;
}
}

154
framework/yii/bootstrap/NavBar.php

@ -7,55 +7,27 @@
namespace yii\bootstrap;
use yii\base\InvalidConfigException;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
/**
* NavBar renders a navbar HTML component.
*
* For example:
* Any content enclosed between the [[begin()]] and [[end()]] calls of NavBar
* is treated as the content of the navbar. You may use widgets such as [[Nav]]
* or [[\yii\widgets\Menu]] to build up such content. For example,
*
* ```php
* echo NavBar::widget(array(
* 'brandLabel' => 'NavBar Test',
* 'items' => array(
* // a Nav widget
* array(
* // defaults to Nav anyway.
* 'class' => 'yii\bootstrap\Nav',
* // widget configuration
* 'options' => array(
* 'items' => array(
* array(
* 'label' => 'Home',
* 'url' => '/',
* 'options' => array('class' => 'active'),
* ),
* array(
* 'label' => 'Dropdown',
* 'content' => new Dropdown(array(
* use yii\bootstrap\NavBar;
* use yii\widgets\Menu;
*
* NavBar::begin(array('brandLabel' => 'NavBar Test'));
* echo Nav::widget(array(
* 'items' => array(
* array(
* 'label' => 'DropdownA',
* 'url' => '#',
* ),
* array(
* 'label' => 'DropdownB',
* 'url' => '#'
* ),
* )
* ),
* ),
* )
* ),
* ),
* // you can also use strings
* '<form class="navbar-search pull-left" action="">' .
* '<input type="text" class="search-query" placeholder="Search">' .
* '</form>',
* array('label' => 'Home', 'url' => array('/site/index')),
* array('label' => 'About', 'url' => array('/site/about')),
* ),
* ));
* NavBar::end();
* ```
*
* @see http://twitter.github.io/bootstrap/components.html#navbar
@ -65,7 +37,11 @@ use yii\helpers\Html;
class NavBar extends Widget
{
/**
* @var string the text of the brand.
* @var boolean whether to enable a collapsing responsive navbar.
*/
public $responsive = true;
/**
* @var string the text of the brand. Note that this is not HTML-encoded.
* @see http://twitter.github.io/bootstrap/components.html#navbar
*/
public $brandLabel;
@ -78,26 +54,6 @@ class NavBar extends Widget
* @var array the HTML attributes of the brand link.
*/
public $brandOptions = array();
/**
* @var array list of menu items in the navbar widget. Each array element represents a single
* menu item with the following structure:
*
* ```php
* array(
* // optional, the menu item class type of the widget to render. Defaults to "Nav" widget.
* 'class' => 'Menu item class type',
* // required, the configuration options of the widget.
* 'options' => array(...),
* ),
* // optionally, you can pass a string
* '<form class="navbar-search pull-left" action="">' .
* '<input type="text" class="search-query span2" placeholder="Search">' .
* '</form>',
* ```
*
* Optionally, you can also use a plain string instead of an array element.
*/
public $items = array();
/**
@ -108,69 +64,30 @@ class NavBar extends Widget
parent::init();
$this->clientOptions = false;
Html::addCssClass($this->options, 'navbar');
Html::addCssClass($this->brandOptions, 'brand');
}
Html::addCssClass($this->brandOptions, 'navbar-brand');
/**
* Renders the widget.
*/
public function run()
{
echo Html::beginTag('div', $this->options);
echo $this->renderItems();
echo Html::endTag('div');
if (self::$responsive) {
ResponsiveAsset::register($this->getView());
} else {
BootstrapAsset::register($this->getView());
if ($this->responsive) {
echo Html::beginTag('div', array('class' => 'container'));
echo $this->renderToggleButton();
echo Html::beginTag('div', array('class' => 'nav-collapse collapse navbar-responsive-collapse'));
}
if ($this->brandLabel !== null) {
echo Html::a($this->brandLabel, $this->brandUrl, $this->brandOptions);
}
/**
* Renders the items.
* @return string the rendering items.
*/
protected function renderItems()
{
$items = array();
foreach ($this->items as $item) {
$items[] = $this->renderItem($item);
}
$contents = implode("\n", $items);
$brand = Html::a($this->brandLabel, $this->brandUrl, $this->brandOptions);
if (self::$responsive) {
CollapseAsset::register($this->getView());
$contents = Html::tag('div',
$this->renderToggleButton() .
$brand . "\n" .
Html::tag('div', $contents, array('class' => 'nav-collapse collapse navbar-collapse')),
array('class' => 'container'));
} else {
$contents = $brand . "\n" . $contents;
}
return Html::tag('div', $contents, array('class' => 'navbar-inner'));
}
/**
* Renders a item. The item can be a string, a custom class or a Nav widget (defaults if no class specified.
* @param mixed $item the item to render. If array, it is assumed the configuration of a widget being `class`
* required and if not specified, then defaults to `yii\bootstrap\Nav`.
* @return string the rendering result.
* @throws InvalidConfigException
* Renders the widget.
*/
protected function renderItem($item)
public function run()
{
if (is_string($item)) {
return $item;
if ($this->responsive) {
echo Html::endTag('div');
echo Html::endTag('div');
}
$config = ArrayHelper::getValue($item, 'options', array());
$config['clientOptions'] = false;
$class = ArrayHelper::getValue($item, 'class', 'yii\bootstrap\Nav');
return $class::widget($config);
echo Html::endTag('div');
BootstrapPluginAsset::register($this->getView());
}
/**
@ -179,14 +96,11 @@ class NavBar extends Widget
*/
protected function renderToggleButton()
{
$items = array();
for ($i = 0; $i < 3; $i++) {
$items[] = Html::tag('span', '', array('class' => 'icon-bar'));
}
return Html::a(implode("\n", $items), null, array(
'class' => 'btn btn-navbar',
$bar = Html::tag('span', '', array('class' => 'icon-bar'));
return Html::button("{$bar}\n{$bar}\n{$bar}", array(
'class' => 'navbar-toggle',
'data-toggle' => 'collapse',
'data-target' => 'div.navbar-collapse',
'data-target' => '.navbar-responsive-collapse',
));
}
}

4
framework/yii/bootstrap/Progress.php

@ -105,12 +105,8 @@ class Progress extends Widget
echo Html::beginTag('div', $this->options) . "\n";
echo $this->renderProgress() . "\n";
echo Html::endTag('div') . "\n";
if (self::$responsive) {
ResponsiveAsset::register($this->getView());
} else {
BootstrapAsset::register($this->getView());
}
}
/**
* Renders the progress.

24
framework/yii/bootstrap/ResponsiveAsset.php

@ -1,24 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class ResponsiveAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $css = array(
'css/bootstrap-responsive.css',
);
public $depends = array(
'yii\bootstrap\BootstrapAsset',
);
}

26
framework/yii/bootstrap/ScrollspyAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class ScrollspyAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-scrollspy.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

26
framework/yii/bootstrap/TabAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class TabAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-tab.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

26
framework/yii/bootstrap/TooltipAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class TooltipAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-tooltip.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

26
framework/yii/bootstrap/TypeaheadAsset.php

@ -1,26 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace yii\bootstrap;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class TypeaheadAsset extends AssetBundle
{
public $sourcePath = '@yii/bootstrap/assets';
public $js = array(
'js/bootstrap-typeahead.js',
);
public $depends = array(
'yii\bootstrap\TransitionAsset',
'yii\bootstrap\BootstrapAsset',
'yii\web\JqueryAsset',
);
}

17
framework/yii/bootstrap/Widget.php

@ -21,10 +21,6 @@ use yii\helpers\Json;
class Widget extends \yii\base\Widget
{
/**
* @var boolean whether to use the responsive version of Bootstrap.
*/
public static $responsive = true;
/**
* @var array the HTML attributes for the widget container tag.
*/
public $options = array();
@ -63,16 +59,11 @@ class Widget extends \yii\base\Widget
*/
protected function registerPlugin($name)
{
$id = $this->options['id'];
$view = $this->getView();
if (self::$responsive) {
ResponsiveAsset::register($view);
} else {
BootstrapAsset::register($view);
}
/** @var \yii\web\AssetBundle $assetClass */
$assetClass = 'yii\bootstrap\\' . ucfirst($name) . 'Asset';
$assetClass::register($view);
BootstrapPluginAsset::register($view);
$id = $this->options['id'];
if ($this->clientOptions !== false) {
$options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);

24
framework/yii/bootstrap/assets.php

@ -1,24 +0,0 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
return array(
yii\bootstrap\BootstrapAsset::className(),
yii\bootstrap\ResponsiveAsset::className(),
yii\bootstrap\DropdownAsset::className(),
yii\bootstrap\TransitionAsset::className(),
yii\bootstrap\AffixAsset::className(),
yii\bootstrap\AlertAsset::className(),
yii\bootstrap\ButtonAsset::className(),
yii\bootstrap\CarouselAsset::className(),
yii\bootstrap\CollapseAsset::className(),
yii\bootstrap\ModalAsset::className(),
yii\bootstrap\PopoverAsset::className(),
yii\bootstrap\TooltipAsset::className(),
yii\bootstrap\ScrollspyAsset::className(),
yii\bootstrap\TabAsset::className(),
yii\bootstrap\TypeaheadAsset::className(),
);

2
framework/yii/bootstrap/assets/css/bootstrap-glyphicons.css vendored

File diff suppressed because one or more lines are too long

1109
framework/yii/bootstrap/assets/css/bootstrap-responsive.css vendored

File diff suppressed because it is too large Load Diff

9
framework/yii/bootstrap/assets/css/bootstrap-responsive.min.css vendored

File diff suppressed because one or more lines are too long

7154
framework/yii/bootstrap/assets/css/bootstrap.css vendored

File diff suppressed because it is too large Load Diff

8
framework/yii/bootstrap/assets/css/bootstrap.min.css vendored

File diff suppressed because one or more lines are too long

BIN
framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.eot

Binary file not shown.

BIN
framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.otf

Binary file not shown.

175
framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.svg

@ -0,0 +1,175 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata></metadata>
<defs>
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
<font-face units-per-em="1200" ascent="960" descent="-240" />
<missing-glyph horiz-adv-x="500" />
<glyph />
<glyph />
<glyph unicode="&#xd;" />
<glyph unicode=" " />
<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" />
<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" />
<glyph unicode="&#x20ac;" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-63 -32t-65.5 -67t-50 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-207 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" />
<glyph unicode="&#x2212;" d="M200 400h900v300h-900v-300z" />
<glyph unicode="&#x2709;" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" />
<glyph unicode="&#x270f;" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" />
<glyph unicode="&#xe000;" horiz-adv-x="500" d="M0 0z" />
<glyph unicode="&#xe001;" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" />
<glyph unicode="&#xe002;" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" />
<glyph unicode="&#xe003;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" />
<glyph unicode="&#xe005;" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" />
<glyph unicode="&#xe006;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447z" />
<glyph unicode="&#xe007;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" />
<glyph unicode="&#xe008;" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" />
<glyph unicode="&#xe009;" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" />
<glyph unicode="&#xe010;" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe011;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe012;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe013;" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" />
<glyph unicode="&#xe014;" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" />
<glyph unicode="&#xe015;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" />
<glyph unicode="&#xe016;" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 299q-120 -77 -261 -77q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" />
<glyph unicode="&#xe017;" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" />
<glyph unicode="&#xe018;" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" />
<glyph unicode="&#xe019;" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" />
<glyph unicode="&#xe020;" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" />
<glyph unicode="&#xe021;" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" />
<glyph unicode="&#xe022;" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" />
<glyph unicode="&#xe023;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 600q0 -176 125 -301.5t302 -125.5t302 125.5t125 301.5 q0 177 -125 302t-302 125t-302 -125t-125 -302zM500 500v400h100v-300h200v-100h-300z" />
<glyph unicode="&#xe024;" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" />
<glyph unicode="&#xe025;" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" />
<glyph unicode="&#xe026;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 600q0 -176 125 -301.5t302 -125.5t302 125.5t125 301.5 q0 177 -125 302t-302 125t-302 -125t-125 -302zM350 600h150v300h200v-300h150l-250 -300z" />
<glyph unicode="&#xe027;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 600q0 -176 125 -301.5t302 -125.5t302 125.5t125 301.5 q0 177 -125 302t-302 125t-302 -125t-125 -302zM350 600h150v-300h200v300h150l-250 300z" />
<glyph unicode="&#xe028;" d="M0 25v475l200 700h800q199 -700 200 -700v-475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" />
<glyph unicode="&#xe029;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 601q0 -176 125 -301.5t302 -125.5t302 125.5t125 301.5 q0 177 -125 302t-302 125t-302 -125t-125 -302zM500 397v401l297 -200z" />
<glyph unicode="&#xe030;" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" />
<glyph unicode="&#xe031;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" />
<glyph unicode="&#xe032;" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" />
<glyph unicode="&#xe033;" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" />
<glyph unicode="&#xe034;" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" />
<glyph unicode="&#xe035;" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v275v25q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" />
<glyph unicode="&#xe036;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" />
<glyph unicode="&#xe037;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" />
<glyph unicode="&#xe038;" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 108 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" />
<glyph unicode="&#xe039;" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" />
<glyph unicode="&#xe040;" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" />
<glyph unicode="&#xe041;" d="M1 700v475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" />
<glyph unicode="&#xe042;" d="M2 700v475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" />
<glyph unicode="&#xe043;" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" />
<glyph unicode="&#xe044;" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" />
<glyph unicode="&#xe045;" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" />
<glyph unicode="&#xe046;" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" />
<glyph unicode="&#xe047;" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391q67 -181 82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140 l116 -317h-340z" />
<glyph unicode="&#xe048;" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 13.5t-49 14v71h471q76 0 145.5 -37.5t115 -111.5t45.5 -167q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129 q0 -84 -59 -156.5t-142 -111t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" />
<glyph unicode="&#xe049;" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" />
<glyph unicode="&#xe050;" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " />
<glyph unicode="&#xe051;" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" />
<glyph unicode="&#xe052;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
<glyph unicode="&#xe053;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
<glyph unicode="&#xe054;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe055;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe056;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe057;" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" />
<glyph unicode="&#xe058;" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" />
<glyph unicode="&#xe059;" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" />
<glyph unicode="&#xe060;" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " />
<glyph unicode="&#xe062;" d="M219 725q0 -116 60 -249q65 -114 158.5 -231.5t154.5 -178.5l61 -61q22 25 59.5 69t132 167t163.5 231q70 142 70 258q0 117 -57.5 218.5t-156.5 161t-216 59.5q-116 0 -215 -61t-156.5 -163.5t-57.5 -219.5zM431 752q0 92 64.5 157t156.5 65t157 -65t65 -157t-65 -156.5 t-157 -64.5t-156.5 64.5t-64.5 156.5z" />
<glyph unicode="&#xe063;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 600q0 -176 125 -301.5t302 -125.5v854q-177 0 -302 -125t-125 -302z " />
<glyph unicode="&#xe064;" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 138.5t-64 210.5zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" />
<glyph unicode="&#xe065;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM994 1015l114 -113l113 113l-21 85l-92 28z" />
<glyph unicode="&#xe066;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" />
<glyph unicode="&#xe067;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l566 567l-136 137l-430 -431l-147 147z" />
<glyph unicode="&#xe068;" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" />
<glyph unicode="&#xe069;" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe070;" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe071;" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" />
<glyph unicode="&#xe072;" d="M200 0l900 550l-900 550v-1100z" />
<glyph unicode="&#xe073;" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
<glyph unicode="&#xe074;" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
<glyph unicode="&#xe075;" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" />
<glyph unicode="&#xe076;" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" />
<glyph unicode="&#xe077;" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" />
<glyph unicode="&#xe078;" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" />
<glyph unicode="&#xe079;" d="M136 550v1l551 550l198 -197l-352 -353l352 -353l-198 -198z" />
<glyph unicode="&#xe080;" d="M315 198l198 -198l552 550l-1 1l-551 550l-198 -197l353 -353z" />
<glyph unicode="&#xe081;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" />
<glyph unicode="&#xe082;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM300 500h600v200h-600v-200z" />
<glyph unicode="&#xe083;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM247 459l212 -212l141 141l141 -141l213 212l-142 141l142 142l-213 212 l-141 -142l-141 142l-212 -212l141 -142z" />
<glyph unicode="&#xe084;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" />
<glyph unicode="&#xe085;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM364 700h143q4 0 11.5 -1t11 -0.5t6.5 3t3 8.5t1 11t3.5 8.5t3.5 6t5.5 4 t6.5 2.5t9 1.5t9 0.5h11.5h12.5q19 0 30 -10t11 -26q0 -21 -4.5 -27.5t-26.5 -21.5q-5 -1 -12.5 -3.5t-27 -13.5t-34 -27t-26.5 -46.5t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 46t31 69t14 93.5q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5 t-53.5 -74.5t-19 -114zM500 300h200v100h-200v-100z" />
<glyph unicode="&#xe086;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200 v100h-200v-100z" />
<glyph unicode="&#xe087;" d="M0 500v200h194q15 60 36 104.5t55.5 86t88 69t126.5 40.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h6h165h32v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206 h200v-206q149 48 201 206h-201v200h200q-25 74 -76 127.5t-124 76.5v-204h-200v203q-75 -24 -130 -77.5t-79 -125.5h209v-200h-210z" />
<glyph unicode="&#xe088;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 600q0 -176 125 -301.5t302 -125.5t302 125.5t125 301.5 q0 177 -125 302t-302 125t-302 -125t-125 -302zM384 465l135 135l-135 135l81 81l135 -135l135 135l81 -81l-135 -135l135 -135l-81 -81l-135 136l-135 -136z" />
<glyph unicode="&#xe089;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 600q0 -176 125 -301.5t302 -125.5t302 125.5t125 301.5 q0 177 -125 302t-302 125t-302 -125t-125 -302zM350 537l113 113l87 -87l204 204l113 -113l-317 -317z" />
<glyph unicode="&#xe090;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 600q0 -119 66 -225l586 587q-105 65 -225 65q-177 0 -302 -125 t-125 -302zM381 235q104 -62 219 -62q177 0 302 125.5t125 301.5q0 117 -62 219z" />
<glyph unicode="&#xe091;" d="M0 547l600 453v-300h600v-300h-600v-301z" />
<glyph unicode="&#xe092;" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" />
<glyph unicode="&#xe093;" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" />
<glyph unicode="&#xe094;" d="M104 600h296v600h300v-600h298l-449 -600z" />
<glyph unicode="&#xe095;" d="M0 200q5 105 27 193t68 167t113 135t166.5 91.5t225.5 42.5v271l600 -453l-600 -448v301q-94 -2 -182.5 -20t-170.5 -52.5t-147 -92.5t-100 -135z" />
<glyph unicode="&#xe096;" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" />
<glyph unicode="&#xe097;" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -142l-295 -294l129 -130h-400z" />
<glyph unicode="&#xe101;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-33 14.5h-207q-20 0 -32 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" />
<glyph unicode="&#xe102;" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111v6t-1 15t-3 18l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6h-111v-100z M100 0h400v400h-400v-400zM200 900q-3 0 14 48t35 96l18 47l214 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" />
<glyph unicode="&#xe103;" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" />
<glyph unicode="&#xe104;" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-4 -23 -14 -51.5t-20 -49t-24 -49.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5 t30.5 2.5t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5 t8 -43t6 -39.5t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" />
<glyph unicode="&#xe105;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" />
<glyph unicode="&#xe106;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM119 600q37 -48 65.5 -82.5t84 -93t118.5 -100t126 -60.5l37 141 q-107 18 -178.5 101.5t-71.5 193.5q0 85 46 158q-97 -83 -227 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59.5 69t-43.5 68l-15 26zM780 161l38 145q22 15 45 34t45.5 43.5t40.5 44.5t40.5 49.5t34 44.5t32 44t24.5 34q-83 113 -139 175l38 146 q68 -54 132.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" />
<glyph unicode="&#xe107;" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 33 -48 36t-48 -29l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" />
<glyph unicode="&#xe108;" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" />
<glyph unicode="&#xe109;" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" />
<glyph unicode="&#xe110;" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" />
<glyph unicode="&#xe111;" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" />
<glyph unicode="&#xe112;" d="M100 600v200h300v-250v-26v-55.5t3.5 -50t11 -47.5t22 -37t35.5 -31.5t53.5 -18t74.5 -7.5t74.5 8t53.5 18.5t35.5 32t22 38t11 48t3.5 49.5v54v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5 t-89 96.5t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" />
<glyph unicode="&#xe113;" d="M-1 410l198 -198l353 353l353 -353l198 198l-550 552z" />
<glyph unicode="&#xe114;" d="M99 797l551 -551l550 551l-198 198l-353 -352l-352 352z" />
<glyph unicode="&#xe115;" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-199l300 -283l299 283h-200v600h-796z" />
<glyph unicode="&#xe116;" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50q0 -21 -14.5 -35.5 t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" />
<glyph unicode="&#xe117;" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" />
<glyph unicode="&#xe118;" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" />
<glyph unicode="&#xe119;" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" />
<glyph unicode="&#xe120;" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" />
<glyph unicode="&#xe121;" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" />
<glyph unicode="&#xe122;" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe123;" d="M74 350q0 21 13.5 35.5t33.5 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-22 -9 -63 -23 t-167.5 -37t-251.5 -23t-245.5 20.5t-178.5 41.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" />
<glyph unicode="&#xe124;" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" />
<glyph unicode="&#xe125;" d="M0 200v600h200v-600h-200zM300 275v400q0 37 20 63l145 196l96 198q14 28 38 48t51 20h50q39 0 69.5 -40.5t30.5 -84.5v-150l-28 -125h328q39 0 69.5 -40.5t30.5 -84.5v-100q0 -43 -29 -74l-238 -344q-37 -57 -83 -57h-250q-7 0 -41.5 25t-66.5 50l-31 25h-61 q-100 0 -100 75z" />
<glyph unicode="&#xe126;" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q123 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63z" />
<glyph unicode="&#xe127;" d="M8 200v600h200v-600h-200zM308 275q0 -13 83 -94t90 -81h341q15 0 28.5 19.5t20.5 41.5l130 339h107q84 0 138.5 39t54.5 111t-53.5 110t-138.5 38h-302l85 121q11 15 10.5 34t-13.5 32l-110 112q-22 22 -53 6l-362 -230q-6 -4 -15.5 -10.5t-25 -26t-15.5 -36.5v-525z M408 289v503l339 236l86 -83l-147 -183q-17 -23 -5 -47q2 -3 4 -5.5t4 -4t5.5 -2.5t5 -1.5t6 -1t6.5 -0.5h7.5h6.5h457q22 0 30.5 -25t-0.5 -50t-30 -25h-203q-15 0 -28.5 -20t-19.5 -41l-131 -339h-293z" />
<glyph unicode="&#xe128;" d="M-101 651q0 -72 55 -111t139 -39h107l130 -339q6 -21 19.5 -41t29.5 -20h341q8 0 94 80.5t86 93.5v526q0 17 -15 35.5t-30 27.5l-15 10l-365 230q-32 14 -54 -6l-109 -113q-13 -13 -13.5 -32t10.5 -34l85 -121q-101 1 -302 1q-85 0 -139 -38t-54 -110zM-1 601v100h476 h6.5h7.5t6.5 0.5t6.5 1t5.5 1.5t5 2.5l4 4t3.5 5.5q13 24 -5 46l-145 184l87 83l343 -237v-502l-107 -89h-293l-131 339q-6 20 -19.5 40.5t-28.5 20.5h-222zM1000 201v600h200v-600h-200z" />
<glyph unicode="&#xe129;" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6v7.5v7v456q0 22 25 31t50 -0.5t25 -30.5v-203q0 -15 20 -28.5t41 -19.5l339 -131v-293l-89 -100h-503zM400 0v200h600v-200h-600z" />
<glyph unicode="&#xe130;" d="M1 585q-15 -31 7 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM76 565l237 339h503 l89 -100v-294l-340 -130q-21 -7 -40.5 -20.5t-19.5 -28.5v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" />
<glyph unicode="&#xe131;" d="M22 600q0 157 77.5 290.5t210.5 210.5t290 77t290 -77t210.5 -210.5t77.5 -290.5t-77.5 -290t-210.5 -210.5t-290 -77.5t-290 77.5t-210.5 210.5t-77.5 290zM298 500h300v-194l402 294l-402 299v-198h-300v-201z" />
<glyph unicode="&#xe132;" d="M22 600q0 157 77.5 290.5t210.5 210.5t290 77t290 -77t210.5 -210.5t77.5 -290.5t-77.5 -290t-210.5 -210.5t-290 -77.5t-290 77.5t-210.5 210.5t-77.5 290zM200 600l400 -294v194h300v201h-298v198z" />
<glyph unicode="&#xe133;" d="M22 600q0 157 77.5 290.5t210.5 210.5t290 77t290 -77t210.5 -210.5t77.5 -290.5t-77.5 -290t-210.5 -210.5t-290 -77.5t-290 77.5t-210.5 210.5t-77.5 290zM302 599h197v-300h201v300h194l-294 401z" />
<glyph unicode="&#xe134;" d="M22 600q0 157 77.5 290.5t210.5 210.5t290 77t290 -77t210.5 -210.5t77.5 -290.5t-77.5 -290t-210.5 -210.5t-290 -77.5t-290 77.5t-210.5 210.5t-77.5 290zM306 602l294 -402l298 402h-197v300h-201v-300h-194z" />
<glyph unicode="&#xe135;" d="M24 600q0 154 78 287t211 211t287 78t287 -78t211 -211t78 -287t-78 -287t-211 -211t-287 -78t-287 78t-211 211t-78 287zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60q12 0 23 -5.5t23 -15t20 -13.5q16 -8 34 -15t40 -14.5t34 -12.5q22 -8 53 -31.5 t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49.5t20.5 62.5q-14 9 -37.5 9t-35.5 7q-14 8 -49 15.5t-52 18.5q-9 0 -39.5 -0.5t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12 q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5 t34 22.5q-6 17 10 36q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 41 1 44q31 -13 58.5 -14.5t39.5 3.5l11 4q6 36 -17 53.5t-64 28.5t-56 23q-20 -3 -37 1q-16 -13 -37.5 -21.5t-34 -12t-44 -8.5t-38.5 -6 q-15 -3 -45.5 0.5t-45.5 -2.5q-22 -8 -52.5 -27t-33.5 -34q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -17 8 -41.5t16.5 -44.5t9.5 -24q-9 2 -39.5 6t-52 10t-37.5 16z" />
<glyph unicode="&#xe136;" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" />
<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" />
<glyph unicode="&#xe138;" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" />
<glyph unicode="&#xe139;" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" />
<glyph unicode="&#xe140;" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" />
<glyph unicode="&#xe141;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM173 600q0 -176 125.5 -301.5t301.5 -125.5q177 0 302 125.5t125 301.5 q0 177 -125 302t-302 125q-176 0 -301.5 -125t-125.5 -302zM291 655q0 23 16 39t38 16q23 0 39 -16t16 -39t-16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM513 609q0 32 21 56.5 t52 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-16 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-62 25.5t-26 61.5zM800 655q0 23 16 39t39 16q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16t-16 39z " />
<glyph unicode="&#xe142;" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -79.5 -17t-67.5 -51l-388 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23q38 0 53 -36 q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60l517 511 q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-39 -23 -111 -95l-512 -512q-68 -68 -81 -163z" />
<glyph unicode="&#xe143;" d="M99 785q0 64 28 122.5t73 100t104.5 64t119 20.5t120 -38.5t105.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100t27 -122.5q0 -70 -55.5 -151.5t-129.5 -151t-182.5 -181t-182.5 -212.5q-62 85 -145.5 174t-150 152.5t-127 127t-94 124.5t-33.5 118z M229 785q0 -31 29.5 -75t64.5 -80.5t97 -97.5q17 -16 25 -24q101 -98 204 -217q85 97 209 219q127 125 163 171q48 62 48 104q0 78 -53.5 132.5t-120.5 54.5q-85 0 -147 -91l-102 -147l-97 150q-58 88 -141 88q-68 0 -123.5 -55.5t-55.5 -131.5z" />
<glyph unicode="&#xe144;" d="M57 353q0 -95 66 -159l141 -142q66 -66 159 -66t159 66l283 283q66 66 66 159t-66 159l-141 141q-3 4 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q3 -3 9.5 -9t8.5 -8 l106 105l-212 212l389 389l247 -247l-95 -96l17 -17q47 -47 78 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" />
<glyph unicode="&#xe145;" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" />
<glyph unicode="&#xe146;" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" />
<glyph unicode="&#xe148;" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -36 9 -60t31 -38t36 -19.5t47 -13.5q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5zM700 237 q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" />
<glyph unicode="&#xe149;" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q32 1 102 -16t104 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" />
<glyph unicode="&#xe150;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" />
<glyph unicode="&#xe151;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" />
<glyph unicode="&#xe152;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" />
<glyph unicode="&#xe153;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" />
<glyph unicode="&#xe154;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" />
<glyph unicode="&#xe155;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" />
<glyph unicode="&#xe156;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" />
<glyph unicode="&#xe157;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" />
<glyph unicode="&#xe158;" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" />
<glyph unicode="&#xe159;" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" />
<glyph unicode="&#xe160;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 50 KiB

BIN
framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.ttf

Binary file not shown.

BIN
framework/yii/bootstrap/assets/fonts/glyphiconshalflings-regular.woff

Binary file not shown.

BIN
framework/yii/bootstrap/assets/img/glyphicons-halflings-white.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

BIN
framework/yii/bootstrap/assets/img/glyphicons-halflings.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

117
framework/yii/bootstrap/assets/js/bootstrap-affix.js vendored

@ -1,117 +0,0 @@
/* ==========================================================
* bootstrap-affix.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* AFFIX CLASS DEFINITION
* ====================== */
var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window)
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
this.$element = $(element)
this.checkPosition()
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
, scrollTop = this.$window.scrollTop()
, position = this.$element.offset()
, offset = this.options.offset
, offsetBottom = offset.bottom
, offsetTop = offset.top
, reset = 'affix affix-top affix-bottom'
, affix
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top()
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
'top' : false
if (this.affixed === affix) return
this.affixed = affix
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
}
/* AFFIX PLUGIN DEFINITION
* ======================= */
var old = $.fn.affix
$.fn.affix = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('affix')
, options = typeof option == 'object' && option
if (!data) $this.data('affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.affix.Constructor = Affix
$.fn.affix.defaults = {
offset: 0
}
/* AFFIX NO CONFLICT
* ================= */
$.fn.affix.noConflict = function () {
$.fn.affix = old
return this
}
/* AFFIX DATA-API
* ============== */
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
, data = $spy.data()
data.offset = data.offset || {}
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
data.offsetTop && (data.offset.top = data.offsetTop)
$spy.affix(data)
})
})
}(window.jQuery);

99
framework/yii/bootstrap/assets/js/bootstrap-alert.js vendored

@ -1,99 +0,0 @@
/* ==========================================================
* bootstrap-alert.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* ALERT CLASS DEFINITION
* ====================== */
var dismiss = '[data-dismiss="alert"]'
, Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.prototype.close = function (e) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
e && e.preventDefault()
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
$parent.trigger(e = $.Event('close'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
$parent
.trigger('closed')
.remove()
}
$.support.transition && $parent.hasClass('fade') ?
$parent.on($.support.transition.end, removeElement) :
removeElement()
}
/* ALERT PLUGIN DEFINITION
* ======================= */
var old = $.fn.alert
$.fn.alert = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('alert')
if (!data) $this.data('alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.alert.Constructor = Alert
/* ALERT NO CONFLICT
* ================= */
$.fn.alert.noConflict = function () {
$.fn.alert = old
return this
}
/* ALERT DATA-API
* ============== */
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
}(window.jQuery);

105
framework/yii/bootstrap/assets/js/bootstrap-button.js vendored

@ -1,105 +0,0 @@
/* ============================================================
* bootstrap-button.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* BUTTON PUBLIC CLASS DEFINITION
* ============================== */
var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.button.defaults, options)
}
Button.prototype.setState = function (state) {
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'
state = state + 'Text'
data.resetText || $el.data('resetText', $el[val]())
$el[val](data[state] || this.options[state])
// push to event loop to allow forms to submit
setTimeout(function () {
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
}, 0)
}
Button.prototype.toggle = function () {
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
.removeClass('active')
this.$element.toggleClass('active')
}
/* BUTTON PLUGIN DEFINITION
* ======================== */
var old = $.fn.button
$.fn.button = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('button')
, options = typeof option == 'object' && option
if (!data) $this.data('button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
$.fn.button.defaults = {
loadingText: 'loading...'
}
$.fn.button.Constructor = Button
/* BUTTON NO CONFLICT
* ================== */
$.fn.button.noConflict = function () {
$.fn.button = old
return this
}
/* BUTTON DATA-API
* =============== */
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
})
}(window.jQuery);

207
framework/yii/bootstrap/assets/js/bootstrap-carousel.js vendored

@ -1,207 +0,0 @@
/* ==========================================================
* bootstrap-carousel.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* CAROUSEL CLASS DEFINITION
* ========================= */
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.prototype = {
cycle: function (e) {
if (!e) this.paused = false
if (this.interval) clearInterval(this.interval);
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
, getActiveIndex: function () {
this.$active = this.$element.find('.item.active')
this.$items = this.$active.parent().children()
return this.$items.index(this.$active)
}
, to: function (pos) {
var activeIndex = this.getActiveIndex()
, that = this
if (pos > (this.$items.length - 1) || pos < 0) return
if (this.sliding) {
return this.$element.one('slid', function () {
that.to(pos)
})
}
if (activeIndex == pos) {
return this.pause().cycle()
}
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
}
, pause: function (e) {
if (!e) this.paused = true
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
clearInterval(this.interval)
this.interval = null
return this
}
, next: function () {
if (this.sliding) return
return this.slide('next')
}
, prev: function () {
if (this.sliding) return
return this.slide('prev')
}
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
, e
this.sliding = true
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
e = $.Event('slide', {
relatedTarget: $next[0]
, direction: direction
})
if ($next.hasClass('active')) return
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
this.$element.one('slid', function () {
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active')
})
}
if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
$next.addClass(direction)
this.$element.one($.support.transition.end, function () {
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0)
})
} else {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger('slid')
}
isCycling && this.cycle()
return this
}
}
/* CAROUSEL PLUGIN DEFINITION
* ========================== */
var old = $.fn.carousel
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('carousel')
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
, action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (action) data[action]()
else if (options.interval) data.pause().cycle()
})
}
$.fn.carousel.defaults = {
interval: 5000
, pause: 'hover'
}
$.fn.carousel.Constructor = Carousel
/* CAROUSEL NO CONFLICT
* ==================== */
$.fn.carousel.noConflict = function () {
$.fn.carousel = old
return this
}
/* CAROUSEL DATA-API
* ================= */
$(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
, slideIndex
$target.carousel(options)
if (slideIndex = $this.attr('data-slide-to')) {
$target.data('carousel').pause().to(slideIndex).cycle()
}
e.preventDefault()
})
}(window.jQuery);

167
framework/yii/bootstrap/assets/js/bootstrap-collapse.js vendored

@ -1,167 +0,0 @@
/* =============================================================
* bootstrap-collapse.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* COLLAPSE PUBLIC CLASS DEFINITION
* ================================ */
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.collapse.defaults, options)
if (this.options.parent) {
this.$parent = $(this.options.parent)
}
this.options.toggle && this.toggle()
}
Collapse.prototype = {
constructor: Collapse
, dimension: function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
, show: function () {
var dimension
, scroll
, actives
, hasData
if (this.transitioning || this.$element.hasClass('in')) return
dimension = this.dimension()
scroll = $.camelCase(['scroll', dimension].join('-'))
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
if (actives && actives.length) {
hasData = actives.data('collapse')
if (hasData && hasData.transitioning) return
actives.collapse('hide')
hasData || actives.data('collapse', null)
}
this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown')
$.support.transition && this.$element[dimension](this.$element[0][scroll])
}
, hide: function () {
var dimension
if (this.transitioning || !this.$element.hasClass('in')) return
dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', $.Event('hide'), 'hidden')
this.$element[dimension](0)
}
, reset: function (size) {
var dimension = this.dimension()
this.$element
.removeClass('collapse')
[dimension](size || 'auto')
[0].offsetWidth
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
return this
}
, transition: function (method, startEvent, completeEvent) {
var that = this
, complete = function () {
if (startEvent.type == 'show') that.reset()
that.transitioning = 0
that.$element.trigger(completeEvent)
}
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
this.transitioning = 1
this.$element[method]('in')
$.support.transition && this.$element.hasClass('collapse') ?
this.$element.one($.support.transition.end, complete) :
complete()
}
, toggle: function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
}
/* COLLAPSE PLUGIN DEFINITION
* ========================== */
var old = $.fn.collapse
$.fn.collapse = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
, options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.collapse.defaults = {
toggle: true
}
$.fn.collapse.Constructor = Collapse
/* COLLAPSE NO CONFLICT
* ==================== */
$.fn.collapse.noConflict = function () {
$.fn.collapse = old
return this
}
/* COLLAPSE DATA-API
* ================= */
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
var $this = $(this), href
, target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data()
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
$(target).collapse(option)
})
}(window.jQuery);

169
framework/yii/bootstrap/assets/js/bootstrap-dropdown.js vendored

@ -1,169 +0,0 @@
/* ============================================================
* bootstrap-dropdown.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* DROPDOWN CLASS DEFINITION
* ========================= */
var toggle = '[data-toggle=dropdown]'
, Dropdown = function (element) {
var $el = $(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function () {
$el.parent().removeClass('open')
})
}
Dropdown.prototype = {
constructor: Dropdown
, toggle: function (e) {
var $this = $(this)
, $parent
, isActive
if ($this.is('.disabled, :disabled')) return
$parent = getParent($this)
isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) {
if ('ontouchstart' in document.documentElement) {
// if mobile we we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
}
$parent.toggleClass('open')
}
$this.focus()
return false
}
, keydown: function (e) {
var $this
, $items
, $active
, $parent
, isActive
, index
if (!/(38|40|27)/.test(e.keyCode)) return
$this = $(this)
e.preventDefault()
e.stopPropagation()
if ($this.is('.disabled, :disabled')) return
$parent = getParent($this)
isActive = $parent.hasClass('open')
if (!isActive || (isActive && e.keyCode == 27)) {
if (e.which == 27) $parent.find(toggle).focus()
return $this.click()
}
$items = $('[role=menu] li:not(.divider):visible a', $parent)
if (!$items.length) return
index = $items.index($items.filter(':focus'))
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
$items
.eq(index)
.focus()
}
}
function clearMenus() {
$('.dropdown-backdrop').remove()
$(toggle).each(function () {
getParent($(this)).removeClass('open')
})
}
function getParent($this) {
var selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = selector && $(selector)
if (!$parent || !$parent.length) $parent = $this.parent()
return $parent
}
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
var old = $.fn.dropdown
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown
/* DROPDOWN NO CONFLICT
* ==================== */
$.fn.dropdown.noConflict = function () {
$.fn.dropdown = old
return this
}
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
$(document)
.on('click.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
}(window.jQuery);

247
framework/yii/bootstrap/assets/js/bootstrap-modal.js vendored

@ -1,247 +0,0 @@
/* =========================================================
* bootstrap-modal.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
!function ($) {
"use strict"; // jshint ;_;
/* MODAL CLASS DEFINITION
* ====================== */
var Modal = function (element, options) {
this.options = options
this.$element = $(element)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
}
Modal.prototype = {
constructor: Modal
, toggle: function () {
return this[!this.isShown ? 'show' : 'hide']()
}
, show: function () {
var that = this
, e = $.Event('show')
this.$element.trigger(e)
if (this.isShown || e.isDefaultPrevented()) return
this.isShown = true
this.escape()
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
that.$element.appendTo(document.body) //don't move modals dom position
}
that.$element.show()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
that.$element
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus()
transition ?
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
that.$element.focus().trigger('shown')
})
}
, hide: function (e) {
e && e.preventDefault()
var that = this
e = $.Event('hide')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
this.escape()
$(document).off('focusin.modal')
this.$element
.removeClass('in')
.attr('aria-hidden', true)
$.support.transition && this.$element.hasClass('fade') ?
this.hideWithTransition() :
this.hideModal()
}
, enforceFocus: function () {
var that = this
$(document).on('focusin.modal', function (e) {
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
that.$element.focus()
}
})
}
, escape: function () {
var that = this
if (this.isShown && this.options.keyboard) {
this.$element.on('keyup.dismiss.modal', function ( e ) {
e.which == 27 && that.hide()
})
} else if (!this.isShown) {
this.$element.off('keyup.dismiss.modal')
}
}
, hideWithTransition: function () {
var that = this
, timeout = setTimeout(function () {
that.$element.off($.support.transition.end)
that.hideModal()
}, 500)
this.$element.one($.support.transition.end, function () {
clearTimeout(timeout)
that.hideModal()
})
}
, hideModal: function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden')
})
}
, removeBackdrop: function () {
this.$backdrop && this.$backdrop.remove()
this.$backdrop = null
}
, backdrop: function (callback) {
var that = this
, animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
this.$backdrop.click(
this.options.backdrop == 'static' ?
$.proxy(this.$element[0].focus, this.$element[0])
: $.proxy(this.hide, this)
)
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.addClass('in')
if (!callback) return
doAnimate ?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (callback) {
callback()
}
}
}
/* MODAL PLUGIN DEFINITION
* ======================= */
var old = $.fn.modal
$.fn.modal = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('modal')
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]()
else if (options.show) data.show()
})
}
$.fn.modal.defaults = {
backdrop: true
, keyboard: true
, show: true
}
$.fn.modal.Constructor = Modal
/* MODAL NO CONFLICT
* ================= */
$.fn.modal.noConflict = function () {
$.fn.modal = old
return this
}
/* MODAL DATA-API
* ============== */
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
, href = $this.attr('href')
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
e.preventDefault()
$target
.modal(option)
.one('hide', function () {
$this.focus()
})
})
}(window.jQuery);

114
framework/yii/bootstrap/assets/js/bootstrap-popover.js vendored

@ -1,114 +0,0 @@
/* ===========================================================
* bootstrap-popover.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
var Popover = function (element, options) {
this.init('popover', element, options)
}
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
========================================== */
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
constructor: Popover
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
, content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
, hasContent: function () {
return this.getTitle() || this.getContent()
}
, getContent: function () {
var content
, $e = this.$element
, o = this.options
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|| $e.attr('data-content')
return content
}
, tip: function () {
if (!this.$tip) {
this.$tip = $(this.options.template)
}
return this.$tip
}
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
})
/* POPOVER PLUGIN DEFINITION
* ======================= */
var old = $.fn.popover
$.fn.popover = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('popover')
, options = typeof option == 'object' && option
if (!data) $this.data('popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.popover.Constructor = Popover
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
placement: 'right'
, trigger: 'click'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
/* POPOVER NO CONFLICT
* =================== */
$.fn.popover.noConflict = function () {
$.fn.popover = old
return this
}
}(window.jQuery);

162
framework/yii/bootstrap/assets/js/bootstrap-scrollspy.js vendored

@ -1,162 +0,0 @@
/* =============================================================
* bootstrap-scrollspy.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* SCROLLSPY CLASS DEFINITION
* ========================== */
function ScrollSpy(element, options) {
var process = $.proxy(this.process, this)
, $element = $(element).is('body') ? $(window) : $(element)
, href
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
this.$body = $('body')
this.refresh()
this.process()
}
ScrollSpy.prototype = {
constructor: ScrollSpy
, refresh: function () {
var self = this
, $targets
this.offsets = $([])
this.targets = $([])
$targets = this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
, href = $el.data('target') || $el.attr('href')
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& $href.length
&& [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
})
}
, process: function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
, maxScroll = scrollHeight - this.$scrollElement.height()
, offsets = this.offsets
, targets = this.targets
, activeTarget = this.activeTarget
, i
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets.last()[0])
&& this.activate ( i )
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& this.activate( targets[i] )
}
}
, activate: function (target) {
var active
, selector
this.activeTarget = target
$(this.selector)
.parent('.active')
.removeClass('active')
selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
active = $(selector)
.parent('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active.closest('li.dropdown').addClass('active')
}
active.trigger('activate')
}
}
/* SCROLLSPY PLUGIN DEFINITION
* =========================== */
var old = $.fn.scrollspy
$.fn.scrollspy = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('scrollspy')
, options = typeof option == 'object' && option
if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.scrollspy.Constructor = ScrollSpy
$.fn.scrollspy.defaults = {
offset: 10
}
/* SCROLLSPY NO CONFLICT
* ===================== */
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
return this
}
/* SCROLLSPY DATA-API
* ================== */
$(window).on('load', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
$spy.scrollspy($spy.data())
})
})
}(window.jQuery);

144
framework/yii/bootstrap/assets/js/bootstrap-tab.js vendored

@ -1,144 +0,0 @@
/* ========================================================
* bootstrap-tab.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* TAB CLASS DEFINITION
* ==================== */
var Tab = function (element) {
this.element = $(element)
}
Tab.prototype = {
constructor: Tab
, show: function () {
var $this = this.element
, $ul = $this.closest('ul:not(.dropdown-menu)')
, selector = $this.attr('data-target')
, previous
, $target
, e
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ( $this.parent('li').hasClass('active') ) return
previous = $ul.find('.active:last a')[0]
e = $.Event('show', {
relatedTarget: previous
})
$this.trigger(e)
if (e.isDefaultPrevented()) return
$target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown'
, relatedTarget: previous
})
})
}
, activate: function ( element, container, callback) {
var $active = container.find('> .active')
, transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if ( element.parent('.dropdown-menu') ) {
element.closest('li.dropdown').addClass('active')
}
callback && callback()
}
transition ?
$active.one($.support.transition.end, next) :
next()
$active.removeClass('in')
}
}
/* TAB PLUGIN DEFINITION
* ===================== */
var old = $.fn.tab
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tab')
if (!data) $this.data('tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tab.Constructor = Tab
/* TAB NO CONFLICT
* =============== */
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
/* TAB DATA-API
* ============ */
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
}(window.jQuery);

361
framework/yii/bootstrap/assets/js/bootstrap-tooltip.js vendored

@ -1,361 +0,0 @@
/* ===========================================================
* bootstrap-tooltip.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* TOOLTIP PUBLIC CLASS DEFINITION
* =============================== */
var Tooltip = function (element, options) {
this.init('tooltip', element, options)
}
Tooltip.prototype = {
constructor: Tooltip
, init: function (type, element, options) {
var eventIn
, eventOut
, triggers
, trigger
, i
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.enabled = true
triggers = this.options.trigger.split(' ')
for (i = triggers.length; i--;) {
trigger = triggers[i]
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
}
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
, getOptions: function (options) {
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay
, hide: options.delay
}
}
return options
}
, enter: function (e) {
var defaults = $.fn[this.type].defaults
, options = {}
, self
this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
}, this)
self = $(e.currentTarget)[this.type](options).data(this.type)
if (!self.options.delay || !self.options.delay.show) return self.show()
clearTimeout(this.timeout)
self.hoverState = 'in'
this.timeout = setTimeout(function() {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
, leave: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
if (this.timeout) clearTimeout(this.timeout)
if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.hoverState = 'out'
this.timeout = setTimeout(function() {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
, show: function () {
var $tip
, pos
, actualWidth
, actualHeight
, placement
, tp
, e = $.Event('show')
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip = this.tip()
this.setContent()
if (this.options.animation) {
$tip.addClass('fade')
}
placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
pos = this.getPosition()
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
switch (placement) {
case 'bottom':
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'top':
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'left':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
break
case 'right':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
break
}
this.applyPlacement(tp, placement)
this.$element.trigger('shown')
}
}
, applyPlacement: function(offset, placement){
var $tip = this.tip()
, width = $tip[0].offsetWidth
, height = $tip[0].offsetHeight
, actualWidth
, actualHeight
, delta
, replace
$tip
.offset(offset)
.addClass(placement)
.addClass('in')
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
if (placement == 'top' && actualHeight != height) {
offset.top = offset.top + height - actualHeight
replace = true
}
if (placement == 'bottom' || placement == 'top') {
delta = 0
if (offset.left < 0){
delta = offset.left * -2
offset.left = 0
$tip.offset(offset)
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
}
this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
} else {
this.replaceArrow(actualHeight - height, actualHeight, 'top')
}
if (replace) $tip.offset(offset)
}
, replaceArrow: function(delta, dimension, position){
this
.arrow()
.css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
}
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
, hide: function () {
var that = this
, $tip = this.tip()
, e = $.Event('hide')
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$tip.removeClass('in')
function removeWithAnimation() {
var timeout = setTimeout(function () {
$tip.off($.support.transition.end).detach()
}, 500)
$tip.one($.support.transition.end, function () {
clearTimeout(timeout)
$tip.detach()
})
}
$.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() :
$tip.detach()
this.$element.trigger('hidden')
return this
}
, fixTitle: function () {
var $e = this.$element
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
, hasContent: function () {
return this.getTitle()
}
, getPosition: function () {
var el = this.$element[0]
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
width: el.offsetWidth
, height: el.offsetHeight
}, this.$element.offset())
}
, getTitle: function () {
var title
, $e = this.$element
, o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
, tip: function () {
return this.$tip = this.$tip || $(this.options.template)
}
, arrow: function(){
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}
, validate: function () {
if (!this.$element[0].parentNode) {
this.hide()
this.$element = null
this.options = null
}
}
, enable: function () {
this.enabled = true
}
, disable: function () {
this.enabled = false
}
, toggleEnabled: function () {
this.enabled = !this.enabled
}
, toggle: function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
self.tip().hasClass('in') ? self.hide() : self.show()
}
, destroy: function () {
this.hide().$element.off('.' + this.type).removeData(this.type)
}
}
/* TOOLTIP PLUGIN DEFINITION
* ========================= */
var old = $.fn.tooltip
$.fn.tooltip = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tooltip')
, options = typeof option == 'object' && option
if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tooltip.Constructor = Tooltip
$.fn.tooltip.defaults = {
animation: true
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover focus'
, title: ''
, delay: 0
, html: false
, container: false
}
/* TOOLTIP NO CONFLICT
* =================== */
$.fn.tooltip.noConflict = function () {
$.fn.tooltip = old
return this
}
}(window.jQuery);

60
framework/yii/bootstrap/assets/js/bootstrap-transition.js vendored

@ -1,60 +0,0 @@
/* ===================================================
* bootstrap-transition.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */
$(function () {
$.support.transition = (function () {
var transitionEnd = (function () {
var el = document.createElement('bootstrap')
, transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd'
, 'MozTransition' : 'transitionend'
, 'OTransition' : 'oTransitionEnd otransitionend'
, 'transition' : 'transitionend'
}
, name
for (name in transEndEventNames){
if (el.style[name] !== undefined) {
return transEndEventNames[name]
}
}
}())
return transitionEnd && {
end: transitionEnd
}
})()
})
}(window.jQuery);

335
framework/yii/bootstrap/assets/js/bootstrap-typeahead.js vendored

@ -1,335 +0,0 @@
/* =============================================================
* bootstrap-typeahead.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function($){
"use strict"; // jshint ;_;
/* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.source = this.options.source
this.$menu = $(this.options.menu)
this.shown = false
this.listen()
}
Typeahead.prototype = {
constructor: Typeahead
, select: function () {
var val = this.$menu.find('.active').attr('data-value')
this.$element
.val(this.updater(val))
.change()
return this.hide()
}
, updater: function (item) {
return item
}
, show: function () {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})
this.$menu
.insertAfter(this.$element)
.css({
top: pos.top + pos.height
, left: pos.left
})
.show()
this.shown = true
return this
}
, hide: function () {
this.$menu.hide()
this.shown = false
return this
}
, lookup: function (event) {
var items
this.query = this.$element.val()
if (!this.query || this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this
}
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
return items ? this.process(items) : this
}
, process: function (items) {
var that = this
items = $.grep(items, function (item) {
return that.matcher(item)
})
items = this.sorter(items)
if (!items.length) {
return this.shown ? this.hide() : this
}
return this.render(items.slice(0, this.options.items)).show()
}
, matcher: function (item) {
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
}
, sorter: function (items) {
var beginswith = []
, caseSensitive = []
, caseInsensitive = []
, item
while (item = items.shift()) {
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
else if (~item.indexOf(this.query)) caseSensitive.push(item)
else caseInsensitive.push(item)
}
return beginswith.concat(caseSensitive, caseInsensitive)
}
, highlighter: function (item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>'
})
}
, render: function (items) {
var that = this
items = $(items).map(function (i, item) {
i = $(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})
items.first().addClass('active')
this.$menu.html(items)
return this
}
, next: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, next = active.next()
if (!next.length) {
next = $(this.$menu.find('li')[0])
}
next.addClass('active')
}
, prev: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, prev = active.prev()
if (!prev.length) {
prev = this.$menu.find('li').last()
}
prev.addClass('active')
}
, listen: function () {
this.$element
.on('focus', $.proxy(this.focus, this))
.on('blur', $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))
if (this.eventSupported('keydown')) {
this.$element.on('keydown', $.proxy(this.keydown, this))
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
}
, eventSupported: function(eventName) {
var isSupported = eventName in this.$element
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;')
isSupported = typeof this.$element[eventName] === 'function'
}
return isSupported
}
, move: function (e) {
if (!this.shown) return
switch(e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault()
break
case 38: // up arrow
e.preventDefault()
this.prev()
break
case 40: // down arrow
e.preventDefault()
this.next()
break
}
e.stopPropagation()
}
, keydown: function (e) {
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
this.move(e)
}
, keypress: function (e) {
if (this.suppressKeyPressRepeat) return
this.move(e)
}
, keyup: function (e) {
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
case 16: // shift
case 17: // ctrl
case 18: // alt
break
case 9: // tab
case 13: // enter
if (!this.shown) return
this.select()
break
case 27: // escape
if (!this.shown) return
this.hide()
break
default:
this.lookup()
}
e.stopPropagation()
e.preventDefault()
}
, focus: function (e) {
this.focused = true
}
, blur: function (e) {
this.focused = false
if (!this.mousedover && this.shown) this.hide()
}
, click: function (e) {
e.stopPropagation()
e.preventDefault()
this.select()
this.$element.focus()
}
, mouseenter: function (e) {
this.mousedover = true
this.$menu.find('.active').removeClass('active')
$(e.currentTarget).addClass('active')
}
, mouseleave: function (e) {
this.mousedover = false
if (!this.focused && this.shown) this.hide()
}
}
/* TYPEAHEAD PLUGIN DEFINITION
* =========================== */
var old = $.fn.typeahead
$.fn.typeahead = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('typeahead')
, options = typeof option == 'object' && option
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.typeahead.defaults = {
source: []
, items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
, minLength: 1
}
$.fn.typeahead.Constructor = Typeahead
/* TYPEAHEAD NO CONFLICT
* =================== */
$.fn.typeahead.noConflict = function () {
$.fn.typeahead = old
return this
}
/* TYPEAHEAD DATA-API
* ================== */
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
var $this = $(this)
if ($this.data('typeahead')) return
$this.typeahead($this.data())
})
}(window.jQuery);

1988
framework/yii/bootstrap/assets/js/bootstrap.js vendored

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save