public static function defaultColumns() { return ['fqdn' => ['attribute' => 'fqdn', 'value' => function ($model) { return $model->fqdn; }], 'type' => ['value' => function ($model) { return strtoupper($model->type); }], 'value' => ['value' => function ($model) { return $model->getValueText(); }], 'zone' => ['class' => MainColumn::className(), 'label' => Yii::t('hipanel:dns', 'Zone'), 'attribute' => 'name'], 'actions' => ['class' => ActionColumn::className(), 'template' => '{update} {delete}', 'visibleButtonsCount' => 2, 'options' => ['style' => 'width: 15%'], 'buttons' => ['update' => function ($url, $model, $key) { if ($model->is_system) { return Html::tag('div', Html::a('<i class="fa fa-pencil"></i> ' . Yii::t('hipanel', 'Update'), null, ['class' => 'btn btn-default btn-xs disabled']), ['data-placement' => 'top', 'data-toggle' => 'tooltip', 'title' => Yii::t('hipanel:dns', 'This record was created by hosting panel automatically and cannot be updated'), 'style' => 'display: inline-block; cursor: not-allowed;']); } $data = Html::a('<i class="fa fa-pencil"></i> ' . Yii::t('hipanel', 'Update'), null, ['class' => 'btn btn-default btn-xs edit-dns-toggle', 'data' => ['record_id' => $model->id, 'hdomain_id' => $model->hdomain_id, 'load-url' => Url::to(['@dns/record/update', 'hdomain_id' => $model->hdomain_id, 'id' => $model->id])]]); $progress = Json::htmlEncode("<tr><td colspan='5'>" . Progress::widget(['id' => 'progress-bar', 'percent' => 100, 'barOptions' => ['class' => 'active progress-bar-striped', 'style' => 'width: 100%']]) . '</td></tr>'); Yii::$app->view->registerJs("\n \$('.edit-dns-toggle').click(function () {\n var record_id = \$(this).data('id');\n var hdomain_id = \$(this).data('hdomain_id');\n\n var currentRow = \$(this).closest('tr');\n var newRow = \$({$progress});\n\n \$(newRow).data({'record_id': record_id, hdomain_id: hdomain_id});\n \$('tr').filter(function () { return \$(this).data('id') == record_id; }).find('.btn-cancel').click();\n \$(newRow).insertAfter(currentRow);\n\n jQuery.ajax({\n url: \$(this).data('load-url'),\n type: 'GET',\n timeout: 0,\n error: function() {\n\n },\n success: function(data) {\n newRow.find('td').html(data);\n newRow.find('.btn-cancel').on('click', function (event) {\n event.preventDefault();\n newRow.remove();\n });\n }\n });\n\n });\n "); return $data; }, 'delete' => function ($url, $model, $key) { if ($model->type === 'ns' && $model->is_system) { return Html::tag('div', Html::a('<i class="fa text-danger fa-trash-o"></i> ' . Yii::t('hipanel', 'Delete'), null, ['class' => 'btn btn-default btn-xs disabled']), ['data-placement' => 'top', 'data-toggle' => 'tooltip', 'title' => Yii::t('hipanel:dns', 'This record is important for the domain zone viability and can not be deleted'), 'style' => 'display: inline-block; cursor: not-allowed;']); } return ModalButton::widget(['model' => $model, 'scenario' => 'delete', 'submit' => ModalButton::SUBMIT_PJAX, 'form' => ['action' => Url::to('@dns/record/delete')], 'button' => ['class' => 'btn btn-default btn-xs', 'label' => '<i class="fa text-danger fa-trash-o"></i> ' . Yii::t('hipanel', 'Delete')], 'modal' => ['header' => Html::tag('h4', Yii::t('hipanel:dns', 'Confirm DNS record deleting')), 'headerOptions' => ['class' => 'label-danger'], 'footer' => ['label' => Yii::t('hipanel:dns', 'Delete record'), 'data-loading-text' => Yii::t('hipanel:dns', 'Deleting record...'), 'class' => 'btn btn-danger']], 'body' => function ($model) { echo Html::activeHiddenInput($model, 'hdomain_id'); echo Yii::t('hipanel:dns', 'Are you sure, that you want to delete record {name}?', ['name' => $model->fqdn]); }]); }]]]; }
/** * {@inheritdoc} */ public function run() { Pjax::begin($this->pjaxOptions); echo Progress::widget($this->progressOptions); $this->registerClientScript(); Pjax::end(); }
public function run() { $this->registerAssets(); // Button to select & upload files echo '<span class="btn btn-success fileinput-button"><span>Select files...</span>'; //The file input field used as target for the file upload widget echo Html::activeFileInput($this->model, $this->attribute, ['name' => 'files[]']); echo '</span>'; //The global progress bar echo '<p>Upload progress</p>'; echo Progress::widget(['barOptions' => ['class' => 'progress-bar-success', 'aria-valuemax' => false, 'aria-valuemin' => false, 'role' => false, 'id' => 'bar'], 'options' => ['class' => false, 'id' => false]]); //The list of files uploaded echo '<p>Files uploaded:</p><ul id="files"></ul>'; }
echo Yii::t('podium/view', 'Start Podium Installation'); ?> </button><br><br> <?php echo Yii::t('podium/view', 'Version to install'); ?> <kbd><?php echo $version; ?> </kbd> </div> </div> <div class="row hide" id="installationResults"> <div class="text-center col-sm-8 col-sm-offset-2" id="progressBar"> <?php echo Progress::widget(['percent' => 0, 'label' => '0%', 'barOptions' => ['class' => 'progress-bar progress-bar-striped active'], 'options' => ['class' => 'progress']]); ?> </div> <div class="col-sm-8 col-sm-offset-2 hide" id="installationError"> <div class="alert alert-danger" role="alert"><?php echo Yii::t('podium/view', 'There was a major error during installation...'); ?> </div> </div> <div class="row hide" id="installationFinished"> <div class="text-center col-sm-12"> <a href="<?php echo Url::to(['default/index']); ?> " class="btn btn-success btn-lg"><span class="glyphicon glyphicon-ok-sign"></span> <?php
/** * @return string */ public function renderBody() { $html = [Html::tag('span', $this->title, ['class' => 'info-box-text']), Html::tag('span', $this->number, ['class' => 'info-box-number']), Progress::widget(['percent' => $this->percent, 'barOptions' => $this->barOptions]), Html::tag('span', $this->description, ['class' => 'progress-description'])]; return Html::tag('div', implode(PHP_EOL, $html), ['class' => 'info-box-content']); }
<td class="error-count"><?php echo $model->error_count; ?> </td> </tr> <tr> <th>Records Processed:</th> <td class="rows-count"><?php echo $model->processed_rows . ' \\ ' . $model->total_rows; ?> </td> </tr> </table> <?php echo \yii\bootstrap\Progress::widget(['percent' => $model->progress, 'label' => $model->progress . '%', 'barOptions' => ['class' => 'progress-bar-primary'], 'options' => ['class' => 'active progress-striped']]); ?> <div> <?php echo Html::a('Abort', ['abort', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['method' => 'POST']]); ?> </div> </div> </div> <?php $running = Import::STATUS_RUNNING; $js = <<<JS
<?php use kartik\form\ActiveForm; /* @var $this yii\web\View */ /* @var $model nagser\gallery\models\GalleryRecord */ $formId = 'gallery-upload-form'; ?> <div class="gallery-record-form"> <?php $form = ActiveForm::begin(['options' => ['id' => $formId, 'enctype' => 'multipart/form-data']]); ?> <?php echo \yii\bootstrap\Progress::widget(['percent' => '0', 'label' => Yii::t('gallery', 'Loading...'), 'options' => ['style' => 'display: none;'], 'barOptions' => ['class' => 'progress-bar-danger', 'id' => 'fileUploadWidgetProgress']]); ?> <?php echo $form->field($model, 'content')->widget(\nagser\gallery\widgets\FileUploadWidget\FileUploadWidgetInput::className(), ['options' => ['formId' => $formId, 'mode' => 'single', 'pluginOptions' => ['done' => new \yii\web\JsExpression("\n function(e, data){\n upload.done(e,data)\n }\n "), 'stop' => new \yii\web\JsExpression("\n function(e, data){\n upload.stop(e,data)\n }\n "), 'progressall' => new \yii\web\JsExpression("\n function (e, data) {\n upload.progressall(e, data)\n }\n "), 'add' => new \yii\web\JsExpression("\n function(e, data) {\n upload.add(e, data)\n }\n "), 'submit' => new \yii\web\JsExpression("\n function(e, data) {\n upload.submit(e, data)\n }\n ")]]]); ?> <?php ActiveForm::end(); ?> </div>
<?php /* @var $this app\components\View */ use app\components\Html; use app\widgets\Table; use yii\bootstrap\Progress; use yii\widgets\Pjax; $this->title = 'Simple Tables'; $this->subTitle = 'preview of simple tables'; $labels = ['#', 'Task', 'Progress', 'Label']; $data = [['Update software', 55, 'danger', 'red'], ['Clean database', 70, 'warning', 'yellow'], ['Cron job running', 30, 'info', 'blue'], ['Fix and squish bugs', 90, 'success', 'green']]; $models = []; $cnt = 0; foreach ($data as $datum) { $models[] = ['#' => ++$cnt . '.', 'task' => $datum[0], 'progress' => Progress::widget(['percent' => $datum[1], 'options' => ['class' => 'progress-xs'], 'barOptions' => ['class' => 'progress-bar-' . $datum[2]]]), 'label' => Html::badge($datum[1] . '%', 'bg-' . $datum[3])]; } $columns = ['#', 'task', 'progress:html', 'label:html']; ?> <div class="row"> <div class="col-xs-6"> <?php echo Table::widget(['box' => ['type' => 'primary', 'header' => ['title' => 'Bordered Table']], 'data' => $models, 'columns' => $columns]); ?> <?php echo Table::widget(['box' => ['type' => 'primary', 'header' => ['title' => 'Condensed Full Width Table'], 'noPadding' => true], 'type' => 'table-condensed', 'data' => $models, 'columns' => $columns]); ?> </div><!-- /.col --> <div class="col-xs-6"> <?php
?> </div> <div class="container-fluid"> <?php echo Collapse::widget(['items' => [['label' => 'this is item #1', 'content' => 'this is item 111111', 'contentOptions' => ['class' => 'in'], 'options' => ['class' => 'panel panel-primary']], ['label' => 'this is item #2', 'content' => 'this is test2 222222', 'contentOptions' => [], 'options' => ['class' => 'panel panel-info']], ['label' => 'this is item @3', 'content' => ['this is one', 'this is two'], 'contentOptions' => [], 'options' => ['class' => ''], 'footer' => 'Footer']]]); ?> </div> <div class="container"> <?php echo Progress::widget(['percent' => 60, 'label' => 'test']); ?> <?php echo Progress::widget(['percent' => 75, 'barOptions' => ['class' => 'progress-bar-danger']]); ?> <?php echo Progress::widget(['percent' => 70, 'barOptions' => ['class' => 'progress-bar-warning'], 'options' => ['class' => 'progress-striped']]); ?> <?php echo Progress::widget(['percent' => 85, 'barOptions' => ['class' => 'progress-bar-success'], 'options' => ['class' => 'active progress-striped']]); ?> <?php echo Progress::widget(['bars' => [['percent' => 30, 'options' => ['class' => 'progress-bar-danger']], ['percent' => 30, 'label' => 'test', 'options' => ['class' => 'progress-bar-success']], ['percent' => 35, 'options' => ['class' => 'progress-bar-warning']]]]); ?> </div> </div>
foreach ([['label' => 'Add Products to Cart', 'progress' => 80, 'number' => 160, 'total' => 200, 'color' => 'aqua'], ['label' => 'Complete Purchase', 'progress' => 80, 'number' => 310, 'total' => 400, 'color' => 'red'], ['label' => 'Visit Premium Page', 'progress' => 80, 'number' => 480, 'total' => 800, 'color' => 'green'], ['label' => 'Send Inquiries', 'progress' => 80, 'number' => 250, 'total' => 500, 'color' => 'yellow']] as $item) { ?> <div class="progress-group"> <span class="progress-text"><?php echo $item['label']; ?> </span> <span class="progress-number"><b><?php echo $item['number']; ?> </b>/<?php echo $item['total']; ?> </span> <?php echo Progress::widget(['percent' => $item['progress'], 'options' => ['class' => 'sm'], 'barOptions' => ['class' => 'progress-bar-' . $item['color']]]); ?> </div> <?php } ?> </div> </div> <?php echo Box::footer(); ?> <div class="row"> <div class="col-sm-3 col-xs-6"> <div class="description-block border-right"> <span class="description-percentage text-green"><?php
/** * @inheritdoc */ public function renderButton($buttonName) { switch ($buttonName) { case '{select}': return FileUploadButton::widget($this->fileUploadButtonOptions); case '{progress}': return Progress::widget($this->progressBarOptions); case '{upload}': $name = $this->uploadButtonOptions['name']; unset($this->uploadButtonOptions['name']); return Html::button($name, $this->uploadButtonOptions); case '{clear}': $name = $this->clearButtonOptions['name']; unset($this->clearButtonOptions['name']); return Html::button($name, $this->clearButtonOptions); case '{reset}': $name = $this->resetButtonOptions['name']; unset($this->resetButtonOptions['name']); return Html::button($name, $this->resetButtonOptions); } return false; }
</div> <div>Ключ авторизации - <?php echo $userdata->accessToken; ?> </div> <div>Статус - <?php echo $userdata->status; ?> </div> <?php } ?> <br /> <div id="progress" style="width: 300px;"> <?php echo Progress::widget(['percent' => 70, 'barOptions' => ['class' => 'progress-bar-warning'], 'options' => ['class' => 'progress-striped']]); ?> </div> <br /> <div class="main"> <div class="wrapper"> <div class="left_column"> <div class="task"> <div> Пользователь: <input id="user" value="halumein" style="width: 100px;" /></div> <div> Название задания <input id="taskName" value="posting" style="width: 100px;" /></div> <!-- <button >создать задачу</button> --> <div>Искать в img/<input id="dir" value="imgs" /><button >+</button></div> <br /> <a href="javascript:void(0);" id="taskAdd">Добавить задачу</a><br /><br /> <a href="javascript:void(0);" id="serverTT">Server TaskTable</a><br /> <a href="javascript:void(0);" id="test">Test</a><br />