Permalink
Browse files

Code Completion

  • Loading branch information...
1 parent c3b18a7 commit c63542f9ac7793a0f522f9d464a30afd5d50cfa3 @jsebasct jsebasct committed Apr 28, 2013
Showing with 24,160 additions and 0 deletions.
  1. +7 −0 webApp2/demo/protected/config/main.php
  2. +75 −0 webApp2/demo/protected/controllers/StockController.php
  3. +24 −0 webApp2/demo/protected/extensions/bootstrap/LICENSE.txt
  4. +1,109 −0 webApp2/demo/protected/extensions/bootstrap/assets/css/bootstrap-responsive.css
  5. +9 −0 webApp2/demo/protected/extensions/bootstrap/assets/css/bootstrap-responsive.min.css
  6. +6,158 −0 webApp2/demo/protected/extensions/bootstrap/assets/css/bootstrap.css
  7. +9 −0 webApp2/demo/protected/extensions/bootstrap/assets/css/bootstrap.min.css
  8. +79 −0 webApp2/demo/protected/extensions/bootstrap/assets/css/yii.css
  9. BIN webApp2/demo/protected/extensions/bootstrap/assets/img/glyphicons-halflings-white.png
  10. BIN webApp2/demo/protected/extensions/bootstrap/assets/img/glyphicons-halflings.png
  11. BIN webApp2/demo/protected/extensions/bootstrap/assets/img/loading.gif
  12. +117 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-affix.js
  13. +99 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-alert.js
  14. +105 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-button.js
  15. +207 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-carousel.js
  16. +167 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-collapse.js
  17. +165 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-dropdown.js
  18. +247 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-modal.js
  19. +114 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-popover.js
  20. +162 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-scrollspy.js
  21. +144 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-tab.js
  22. +361 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-tooltip.js
  23. +60 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-transition.js
  24. +335 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap-typeahead.js
  25. +2,276 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap.js
  26. +6 −0 webApp2/demo/protected/extensions/bootstrap/assets/js/bootstrap.min.js
  27. +34 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/accordion.less
  28. +79 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/alerts.less
  29. +63 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/bootstrap.less
  30. +24 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/breadcrumbs.less
  31. +229 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/button-groups.less
  32. +228 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/buttons.less
  33. +158 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/carousel.less
  34. +32 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/close.less
  35. +61 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/code.less
  36. +22 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/component-animations.less
  37. +237 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/dropdowns.less
  38. +690 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/forms.less
  39. +21 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/grid.less
  40. +25 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/hero-unit.less
  41. +84 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/labels-badges.less
  42. +16 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/layouts.less
  43. +55 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/media.less
  44. +702 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/mixins.less
  45. +95 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/modals.less
  46. +497 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/navbar.less
  47. +409 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/navs.less
  48. +43 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/pager.less
  49. +123 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/pagination.less
  50. +133 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/popovers.less
  51. +122 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/progress-bars.less
  52. +216 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/reset.less
  53. +28 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/responsive-1200px-min.less
  54. +193 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/responsive-767px-max.less
  55. +19 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/responsive-768px-979px.less
  56. +189 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/responsive-navbar.less
  57. +59 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/responsive-utilities.less
  58. +48 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/responsive.less
  59. +53 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/scaffolding.less
  60. +197 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/sprites.less
  61. +244 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/tables.less
  62. +53 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/thumbnails.less
  63. +70 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/tooltip.less
  64. +247 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/type.less
  65. +30 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/utilities.less
  66. +301 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/variables.less
  67. +29 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/wells.less
  68. +177 −0 webApp2/demo/protected/extensions/bootstrap/assets/less/yii.less
  69. +319 −0 webApp2/demo/protected/extensions/bootstrap/components/Bootstrap.php
  70. +68 −0 webApp2/demo/protected/extensions/bootstrap/form/TbForm.php
  71. +114 −0 webApp2/demo/protected/extensions/bootstrap/form/TbFormButtonElement.php
  72. +33 −0 webApp2/demo/protected/extensions/bootstrap/form/TbFormInputElement.php
  73. +32 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/BootstrapCode.php
  74. +14 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/BootstrapGenerator.php
  75. +35 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/_form.php
  76. +29 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/_search.php
  77. +26 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/_view.php
  78. +70 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/admin.php
  79. +183 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/controller.php
  80. +24 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/create.php
  81. +26 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/index.php
  82. +28 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/update.php
  83. +36 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/templates/default/view.php
  84. +64 −0 webApp2/demo/protected/extensions/bootstrap/gii/bootstrap/views/index.php
  85. +3 −0 webApp2/demo/protected/extensions/bootstrap/theme/css/styles.css
  86. +1 −0 webApp2/demo/protected/extensions/bootstrap/theme/views/.htaccess
  87. +24 −0 webApp2/demo/protected/extensions/bootstrap/theme/views/layouts/column2.php
  88. +53 −0 webApp2/demo/protected/extensions/bootstrap/theme/views/layouts/main.php
  89. +67 −0 webApp2/demo/protected/extensions/bootstrap/theme/views/site/contact.php
  90. +25 −0 webApp2/demo/protected/extensions/bootstrap/theme/views/site/index.php
  91. +47 −0 webApp2/demo/protected/extensions/bootstrap/theme/views/site/login.php
  92. +532 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbActiveForm.php
  93. +66 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbAffix.php
  94. +144 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbAlert.php
  95. +73 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbBadge.php
  96. +195 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbBaseMenu.php
  97. +84 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbBreadcrumbs.php
  98. +272 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbButton.php
  99. +81 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbButtonColumn.php
  100. +120 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbButtonGroup.php
  101. +173 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbCarousel.php
  102. +94 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbCollapse.php
  103. +56 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbDataColumn.php
  104. +68 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbDetailView.php
  105. +90 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbDropdown.php
  106. +116 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbGridView.php
  107. +62 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbHeroUnit.php
  108. +73 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbLabel.php
  109. +31 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbListView.php
  110. +103 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbMenu.php
  111. +87 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbModal.php
  112. +174 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbNavbar.php
  113. +128 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbPager.php
  114. +86 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbProgress.php
  115. +58 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbScrollSpy.php
  116. +183 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbTabs.php
  117. +50 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbThumbnails.php
  118. +54 −0 webApp2/demo/protected/extensions/bootstrap/widgets/TbTypeahead.php
  119. +478 −0 webApp2/demo/protected/extensions/bootstrap/widgets/input/TbInput.php
  120. +213 −0 webApp2/demo/protected/extensions/bootstrap/widgets/input/TbInputHorizontal.php
  121. +61 −0 webApp2/demo/protected/extensions/bootstrap/widgets/input/TbInputInline.php
  122. +35 −0 webApp2/demo/protected/extensions/bootstrap/widgets/input/TbInputSearch.php
  123. +170 −0 webApp2/demo/protected/extensions/bootstrap/widgets/input/TbInputVertical.php
  124. +39 −0 webApp2/demo/protected/views/stock/index.php
  125. +3 −0 webApp2/demo/themes/bootstrap/css/styles.css
  126. +1 −0 webApp2/demo/themes/bootstrap/views/.htaccess
  127. +24 −0 webApp2/demo/themes/bootstrap/views/layouts/column2.php
  128. +53 −0 webApp2/demo/themes/bootstrap/views/layouts/main.php
  129. +67 −0 webApp2/demo/themes/bootstrap/views/site/contact.php
  130. +25 −0 webApp2/demo/themes/bootstrap/views/site/index.php
  131. +47 −0 webApp2/demo/themes/bootstrap/views/site/login.php
@@ -3,9 +3,12 @@
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
+Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
+
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
+ 'theme'=>'bootstrap', // requires you to copy the theme under your themes directory
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
@@ -26,12 +29,16 @@
'password'=>'hope',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
+ 'generatorPaths'=>array('bootstrap.gii',),
),
),
// application components
'components'=>array(
+ 'bootstrap'=>array(
+ 'class'=>'bootstrap.components.Bootstrap',
+ ),
'user'=>array(
// enable cookie-based authentication
'allowAutoLogin'=>true,
@@ -0,0 +1,75 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of StockController
+ *
+ * @author jscruz
+ */
+
+class StockController extends Controller
+{
+ public function actionIndex()
+ {
+ $this->render('index');
+ }
+
+ // Uncomment the following methods and override them if needed
+ /*
+ public function filters()
+ {
+ // return the filter configuration for this controller, e.g.:
+ return array(
+ 'inlineFilterName',
+ array(
+ 'class'=>'path.to.FilterClass',
+ 'propertyName'=>'propertyValue',
+ ),
+ );
+ }
+
+ public function actions()
+ {
+ // return external action classes, e.g.:
+ return array(
+ 'action1'=>'path.to.ActionClass',
+ 'action2'=>array(
+ 'class'=>'path.to.AnotherActionClass',
+ 'propertyName'=>'propertyValue',
+ ),
+ );
+ }
+ */
+
+ /**
+ * this function is used for the autocomplete requirement
+ */
+ public function actionAvailableEmployees() {
+ $returnValues = array();
+
+ if (isset($_GET['term'])) {
+ $empName = $_GET['term'];
+
+ $criteria = new CDbCriteria();
+ $criteria->select = 'EMPLOYEE_ID, FIRST_NAME, LAST_NAME';
+ $criteria->addSearchCondition("FIRST_NAME", $empName, true);
+
+ $emps = Employee::model()->findAll($criteria);
+
+ foreach ($emps as $emp) {
+ $returnValues[] = array(
+ 'id' => $emp->EMPLOYEE_ID, // return value from autocomplete
+ 'value' => $emp->FIRST_NAME . " " .$emp->LAST_NAME, // value for input field
+
+ 'nm' => $emp->LAST_NAME, // value for input field
+ );
+ }
+ }
+
+ echo CJSON::encode($returnValues);
+ }
+}
@@ -0,0 +1,24 @@
+Copyright (c) 2010, Christoffer Niska
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Christoffer Niska nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Oops, something went wrong.

0 comments on commit c63542f

Please sign in to comment.