animatedProgressBar() public static method

Generates an animated progress bar.
public static animatedProgressBar ( integer $width, array $htmlOptions = [] ) : string
$width integer the progress in percent.
$htmlOptions array additional HTML attributes.
return string the generated progress bar.
 /**
  * Add the update dialog to current page.
  */
 public function run()
 {
     $this->widget('bootstrap.widgets.TbModal', array('id' => 'myModal', 'header' => 'Modal Heading', 'content' => TbHtml::animatedProgressBar(99)));
     // Publish extension assets
     $assets = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('ext.modaldlg') . '/assets');
     // Register extension assets
     $cs = Yii::app()->getClientScript();
     $cs->registerScriptFile($assets . '/EModalDlg.js', CClientScript::POS_END);
     // Open update dialog the clicking target elements
     $cs->registerScript('eupdatedialog', "\n          jQuery( '{$this->target}' ).on( 'click', updateDialogOpen );", CClientScript::POS_END);
 }
Example #2
0
	<h3>Striped</h3>

	<div class="bs-docs-example">
		<?php 
echo TbHtml::stripedProgressBar(20);
?>
	</div>
	<pre class="prettyprint linenums">
&lt;?php echo TbHtml::stripedProgressBar(20); ?></pre>

	<h3>Animated</h3>

	<div class="bs-docs-example">
		<?php 
echo TbHtml::animatedProgressBar(40);
?>
	</div>
	<pre class="prettyprint linenums">
&lt;?php echo TbHtml::animatedProgressBar(40); ?></pre>

	<h3>Stacked</h3>

	<div class="bs-docs-example">
		<?php 
echo TbHtml::stackedProgressBar(array(array('style' => TbHtml::STYLE_SUCCESS, 'width' => 35), array('style' => TbHtml::STYLE_WARNING, 'width' => 20), array('style' => TbHtml::STYLE_DANGER, 'width' => 10)));
?>
	</div>
	<pre class="prettyprint linenums">
&lt;?php echo TbHtml::stackedProgressBar(array(
    array('style' => TbHtml::STYLE_SUCCESS, 'width' => 35),
Example #3
0
<?php
$this->widget('bootstrap.widgets.TbBreadcrumb', array(
    'links' => array(
         Yii::t('app', 'Padron') =>array('manage'),
         Yii::t('app', 'Update')." ".$model->nombre,
    ),
));
  $this->widget('bootstrap.widgets.TbModal', array(
            'id' => 'avisobarra',
            'header' => 'Procesando',
            'htmlOptions' => array('style' => 'text-align:center;'),
            'content' => TbHtml::animatedProgressBar(mt_rand(10,50)),// Para simular que tiene avances distintos
        ));
?>


<?php
$this->renderPartial('_form', array(
            'model'=>$model));
?>
Example #4
0
<?php

/**
 * Web Installer Sidebar (Progressbar and Step-Listing) Viewscript
 */
?>
<h2 class="maintitle"><?php 
eT("Progress");
?>
</h2>
<p><?php 
printf(gT("%s%% completed"), $progressValue);
?>
</p>
<?php 
echo TbHtml::animatedProgressBar($progressValue);
?>
<ol>
    <li class="<?php 
echo $classesForStep[0];
?>
">
        <?php 
eT("Welcome");
?>
    </li>
    <li class="<?php 
echo $classesForStep[1];
?>
">
        <?php 
Example #5
0
 public function testAnimatedProgressBar()
 {
     $I = $this->codeGuy;
     $html = TbHtml::animatedProgressBar(40);
     $progress = $I->createNode($html, 'div.progress');
     $I->seeNodeCssClass($progress, 'progress-striped active');
     $bar = $progress->filter('div.bar');
     $I->seeNodeCssStyle($bar, 'width: 40%');
 }
Example #6
0
        <form>
            <div style="text-align:center;margin-top:-6px;" >
            <label id="type" style="margin-left:-172px;"></label>
            <input type="text" placeholder="Enter Value" id="reg_no">            
            <?php 
echo CHtml::ajaxLink('<input type="button" id="get-challan" value="Go" name="get-challan" class="btn btn-success" style="margin-left:3px;margin-top:-10px;">', array('site/loadchallan'), array('data' => array('reg_no' => 'js:document.getElementById("reg_no").value'), 'beforeSend' => 'function() {           
                       $("#progress-meter").show();
                       $("#overlay").show();
                    }', 'dataType' => 'json', 'success' => 'js:function(data) { demo(data); }'));
?>
            <input type="reset" class="search-button btn" value="Clear" style="margin-left:4px;margin-top:-10px;">
            </div>
        </form>
        <div style="margin-top:0px;width:990px;display:none;" id="progress-meter">
          <?php 
echo TbHtml::animatedProgressBar(100, array('color' => TbHtml::PROGRESS_COLOR_SUCCESS));
?>
        </div>
    </div>
    
    <div style="padding:0px;margin:0px;clear:both;" ></div>

</div>

<div class="content-challan" style="background-color:#FBF5AF;padding:20px;margin: 0 10% auto;display:none;text-align:left;font-size:14px;;box-shadow:0 0 21px 2px #ccc;" >
        <h4 style="color:#4385f7">Your challan details</h4>
        <div style="clear:both;padding:10px;width:100%">
            <div style="float:left;width:30%;" >
                <div style="color:#4385F7;margin-bottom:5px;width:40%;float:left">Name:</div><div style="width:60%;float:left;text-align:left" id='cname'></div>
            </div>
            <div style="float:left;width:30%;" >
Example #7
0
	$("#contextual li a").on("click",function(){
		return true;
   }); 
});	 
		');
?>
<style type='text/css'>
#contextMenu {
  position: absolute;
  display:none;

}
table{cursor:default;}
</style>
<?php 
$this->widget('bootstrap.widgets.TbModal', array('id' => 'modal', 'header' => 'Historial del boleto', 'content' => '<div id="tablaModal">' . TbHtml::animatedProgressBar(50) . '</div>', 'htmlOptions' => array('style' => 'width:60%;left:38%'), 'footer' => implode(' ', array(TbHtml::button('Cerrar', array('data-dismiss' => 'modal'))))));
?>
 

  <div id="contextMenu" class="dropdown clearfix">
    <ul class="dropdown-menu" id="contextual" role="menu" aria-labelledby="dropdownMenu" style="display:block;position:static;margin-bottom:5px;">
	  <li>
<?php 
echo TbHtml::link(' Historial del boleto', '#', array('style' => TbHtml::BUTTON_COLOR_PRIMARY, 'class' => 'fa fa-calendar-o', 'size' => TbHtml::BUTTON_SIZE_LARGE, 'onclick' => "\$.ajax({\n\t\t\turl:'" . $this->createUrl('ventas/historialBoleto') . "&id='+currentId,\n\t\t\tsuccess:function(data){ \$('#tablaModal').html(data);},\n\t})", 'data-toggle' => 'modal', 'data-target' => '#modal'));
?>
			</li>
	  <li class="divider"></li>
	 <!-- <li><a tabindex="-1" href="#" class="fa fa-arrow-down"> Dar de baja</a></li>-->
    </ul>
  </div>