2017 © Pedro Peláez
 

yii2-extension yii2-btn-copy-html-block

Widget by clone html block yii2.

image

mackrais/yii2-btn-copy-html-block

Widget by clone html block yii2.

  • Wednesday, May 24, 2017
  • by MackRais
  • Repository
  • 1 Watchers
  • 2 Stars
  • 44 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 33 % Grown

The README.md

yii2-btn-copy-html-block

Latest Stable Version Latest Unstable Version License Total Downloads Monthly Downloads Daily Downloads, (*1)

NOTE: Widget should always be the block that we cloned., (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist mackrais/yii2-btn-copy-html-block "dev-master"

or, (*5)

 composer require --prefer-dist mackrais/yii2-btn-copy-html-block "dev-master"

or add, (*6)

"mackrais/yii2-btn-copy-html-block": "dev-master"

to the require section of your composer.json file., (*7)

Usage



= $form->field($model, 'colors[]')->textInput(['type'=>'color','class'=>'product-color-input '])->label(false) ?> = mackrais\copyblock\Widget::widget([ 'caption'=>'', // any text button 'options'=>[ 'class'=>'my-class', // Options yii\helpers\Html::a() 'classRemoveBtn' => 'my-class' // for example glyphicon glyphicon-trash ], // any text button 'beforeInsertBlock'=>'beforeClone(event, $this, $cloneBlock)', // 'afterInsertBlock'=>'afterClone(event, $this, $cloneBlock, $tmpBlock)', // 'beforeDeleteBlock'=>'beforeDelete(event, $this, $block)', // 'afterDeleteBlock'=>'afterDelete(event, $this, $block)', // 'selectorCloneBlock'=>'.mr-color-input', // selector clone block ]) ?>
<div class="clearfix"></div>

Usage js events

    function beforeClone(event, $this, $cloneBlock) {
          console.log('Block ',$cloneBlock,' will be cloned!');
    }

    function afterClone(event, $this, $cloneBlock, $tmpBlock) {
          console.log('Block ',$tmpBlock,' was cloned!');
    }

    function beforeDelete(event, $this, $block) {
          console.log('Block ',$block, ' will be deleted!');
    }

    function afterDelete(event, $this, $block) {
          console.log('Block ',$block,' was deleted!');
    }

Result

Screenshot Screenshot, (*8)

License

yii2-btn-copy-html-block is released under the BSD 3-Clause License. See the bundled LICENSE.md for details., (*9)

The Versions

24/05 2017

dev-master

9999999-dev https://github.com/mackrais/yii2-btn-copy-html-block

Widget by clone html block yii2.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 jquery html widget menu multiple context mouse click clone mackrais multiple inputs

24/05 2017

1.0

1.0.0.0 https://github.com/mackrais/yii2-btn-copy-html-block

Widget by clone html block yii2.

  Sources   Download

BSD 3-Clause

The Requires

 

extension yii2 jquery html widget menu multiple context mouse click clone mackrais multiple inputs