</div> <div class="col-md-4 column col-md-offset-2" style="margin-top: 50px;" > <div class="form-group"> <input type="email" class="form-control" id="email" placeholder="Enter Email ID" style="height: 40px;"> </div> </div> <div class="col-md-4 column" style="margin-top: 50px;" > <?php echo Typeahead::widget(['name' => 'country', 'id' => 'city', 'options' => ['placeholder' => 'Enter City'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'prefetch' => '/samples/cities3.json']]]); ?> </div> </div> <div class="row clearfix text-center" style="margin-top: 30px; margin-bottom: 140px;"> <div class="col-md-10 column col-md-offset-1" > <div class="form-group" style="margin-bottom: 50px;"> <?php echo Html::submitButton('Notify Me', ['class' => 'btn btn-primarysign', 'name' => 'login-button']); ?>
</div> </div> <div class="row clearfix text-center" > <div class="row" id="manu"> <div class="col-md-12 column text-center" style="font-family: lucida sans,sans-serif; color: grey; margin-top: 30px; margin-bottom: 30px;" > <div class="col-sm-6 nopadding" style="margin-top: 10px;"><img class="mainlog" src="http://motormetric.com/images/manu.png" style="opacity: .55;"></div> </div> </div> <div class="col-md-10 column col-md-offset-1" style="text-align: center;font-family: lucida sans,sans-serif;"> <?php echo Typeahead::widget(['name' => 'country', 'id' => 'carmain', 'options' => ['placeholder' => 'Enter the car you want to buy'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'prefetch' => '/samples/car_main1.json', 'limit' => 30]]]); ?> </div> </div> <div class="row clearfix text-center" style="margin-top: 40px;"> <div class="col-md-10 column col-md-offset-1" > <div class="form-group"> <?php echo Html::submitButton('Get Best Quote!', ['class' => 'btn btn-primarymain', 'name' => 'login-button']); ?>
</div> <div class="pull-left info"> <p><?php echo \Yii::$app->user->identity->username; ?> </p> <a href="#"><i class="fa fa-circle text-success"></i> Online</a> </div> </div> <!-- search form --> <form action="#" method="get" class="sidebar-form" style="overflow: visible;"> <div class="input-group"> <?php echo \kartik\typeahead\Typeahead::widget(['name' => 'term', 'options' => ['id' => 'searchInput', 'placeholder' => 'Поиск...', 'class' => 'form-control', 'style' => 'color: #dfdfdf'], 'pluginOptions' => ['highlight' => true, 'minLength' => 3], 'dataset' => [['display' => 'title', 'limit' => 10, 'remote' => ['url' => \yii\helpers\Url::to(['/site/search']) . '?term=%QUERY', 'wildcard' => '%QUERY']]]]); ?> <span class="input-group-btn"> <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i> </button> </span> </div> </form> <!-- /.search form --> <?php echo dmstr\widgets\Menu::widget(['options' => ['class' => 'sidebar-menu'], 'items' => [['label' => 'Материалы', 'options' => ['class' => 'header']], ['label' => 'Категории', 'icon' => 'fa fa-sitemap', 'url' => '#', 'items' => [['label' => 'Список категорий', 'icon' => 'glyphicon glyphicon-list-alt', 'url' => ['/categories/default/index']], ['label' => 'Добавить категорию', 'icon' => 'fa fa-folder-o', 'url' => ['/categories/default/add']]]], ['label' => 'Новости', 'icon' => 'fa fa-newspaper-o', 'url' => '#', 'items' => [['label' => 'Список новостей', 'icon' => 'glyphicon glyphicon-list-alt', 'url' => ['/news/default/index']], ['label' => 'Избранные новости', 'icon' => 'fa fa-star', 'url' => ['/news/default/favorite']], ['label' => 'Удалённые новости', 'icon' => 'fa fa-trash', 'url' => ['/news/default/deleted']], ['label' => 'Добавить новость', 'icon' => 'fa fa-file-text-o', 'url' => ['/news/default/new']], ['label' => '', 'options' => ['class' => 'header']], ['label' => 'Комментарии', 'icon' => 'fa fa-comments', 'url' => ['/comments/default/index']]]], ['label' => 'Баннеры', 'icon' => 'fa fa-picture-o', 'url' => ['/ads/default/index']], ['label' => 'Темы', 'icon' => 'fa fa-wpforms', 'url' => ['/themes/default/index']], ['label' => 'Анонсы', 'icon' => 'fa fa-sticky-note-o', 'url' => ['/announcements/default/index']], ['label' => 'Опросы', 'icon' => 'fa fa-question', 'url' => ['/quiz/default/index']], ['label' => 'Настройки', 'icon' => 'fa fa-cogs', 'url' => '#', 'items' => [['label' => 'Главная страница', 'icon' => 'fa fa-question', 'url' => ['/system/default/main-page']], ['label' => 'Шаблон', 'icon' => 'fa fa-question', 'url' => ['/system/default/template']]]], ['label' => 'Система', 'icon' => 'fa fa-share', 'url' => '#', 'items' => [['label' => 'Администраторы', 'icon' => 'fa fa-user-secret', 'url' => ['/siteusers/default/index']], ['label' => 'Менеджер меню', 'icon' => 'fa fa-bars', 'url' => ['/menu/default/index']], ['label' => 'Менеджер rss', 'icon' => 'fa fa-rss', 'url' => ['/rss/default/index']], ['label' => '', 'options' => ['class' => 'header']], ['label' => 'Gii', 'icon' => 'fa fa-file-code-o', 'url' => ['/gii']], ['label' => 'Дебаг', 'icon' => 'fa fa-dashboard', 'url' => ['/debug']]]]]]); ?> </section>
/** * */ public function renderSearch($configuration) { return Html::tag('div', \kartik\typeahead\Typeahead::widget($configuration), ['class' => 'search-inline', 'id' => 'cd-search']); }
<?php $data = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']; // Usage without a model (with search term highlighting) /*echo '<label class="control-label">State</label>'; echo Typeahead::widget([ 'name' => 'state_10', 'options' => ['placeholder' => 'Filter as you type ...'], 'pluginOptions' => ['highlight'=>true], 'dataset' => [ [ 'local' => $data, 'limit' => 10 ] ] ]);*/ echo Typeahead::widget(['name' => 'country', 'options' => ['placeholder' => 'Filter as you type ...'], 'pluginOptions' => ['highlight' => true], 'dataset' => [['datumTokenizer' => "Bloodhound.tokenizers.obj.whitespace('value')", 'display' => 'value', 'prefetch' => Url::to(['site/demo']), 'remote' => ['url' => Url::to(['site/demo']) . '?q=%QUERY', 'wildcard' => '%QUERY']]]]); ?> <?php $js = '// AJAX call for autocomplete $("#search-box").keyup(function(){ $.ajax({ type: "POST", url: "' . Url::toRoute('/site/demo') . '", data:"keyword="+$(this).val(), beforeSend: function(){ $("#search-box").css("background","#FFF url(LoaderIcon.gif) no-repeat 165px"); }, success: function(data){ $("#suggesstion-box").show();