2017 © Pedro Peláez
 

yii2-extension yii2-editable-widget

X-Editable widget for Yii2.

image

2amigos/yii2-editable-widget

X-Editable widget for Yii2.

  • Friday, August 4, 2017
  • by tonydspaniard
  • Repository
  • 15 Watchers
  • 51 Stars
  • 53,220 Installations
  • PHP
  • 13 Dependents
  • 1 Suggesters
  • 26 Forks
  • 4 Open issues
  • 11 Versions
  • 6 % Grown

The README.md

X-Editable Widget for Yii2

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

Renders a X-Editable Input allowing to use the amazing inline capabilities of X-Editable Plugin., (*2)

Important Note

We decided to port only the Bootstrap 3 capabilities of X-Editable Plugin due to the requirements of our projects. We have done quite a lot of work:, (*3)

  • The original library has been modified to port it to Yii2. Plugins that we thought didn't belong to the core, we extracted them and implemented them as separated external input types (address, combodate, datepicker, datetimepicker, select2 and wysihtml5 plugins). We thought that separating external types will help everybody to isolate problems and be able to improve the library much better.
  • Plugins have been all updated to their latest versions
  • Fixed datepicker and datetimepicker types to work with Bootstrap 3
  • Refactored widget code to make it easier to understand
  • We have not included EditableColumn, EditableListView, or EditableDetailView because we believe they correspond to a different package. They will be developed independently.

So, if you have issues to fix, please remember, THIS IS NOT an exact copy of X-Editable, this is a Bootstrap 3 enhanced X-Editable plugin ported to Yii2., (*4)

We welcome everybody to improve this library with their amazing Pull Requests :) and we hope that this will increase the productivity of your Yii2 experience., (*5)

So keep this in mind:, (*6)

  • Widget is based on X-Editable not on X-Editable for Yii
  • It does not work with JQuery UI or as plain JQuery, just Bootstrap and latest version only (not 2.3.2 sorry)
  • If you wish to help improve the library do it, but do not update the library thinking this is the same as X-Editable source, it has been modified.
  • The supported types are:
    • text
    • textarea
    • select
    • date
    • datetime
    • combodate
    • html5 types
    • checklist
    • wysihtml5
    • select2
    • No typeaheadJs - ready for the challenge?

Installation

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

Either run, (*8)

composer require 2amigos/yii2-editable-widget:~1.0

or add, (*9)

"2amigos/yii2-editable-widget" : "~1.0"

to the require section of your application's composer.json file., (*10)

Usage

There is an amazing site made by Vitaliy Potapov which shows how to configure the widget. We are not going to explain how to use each one of the again and we encourage you to visit the documentation section of the plugin's site, (*11)



= Editable::widget( [
    'model' => $model,
    'attribute' => 'created_at',
    'url' => 'site/test',
    'type' => 'datetime',
    'mode' => 'pop',
    'clientOptions' => [
        'placement' => 'right',
        'format' => 'yyyy-mm-dd hh:ii',
        'viewformat' => 'dd/mm/yyyy hh:ii',
        'datetimepicker' => [
            'orientation' => 'top auto'
           ]
    ]
]);?>

= Editable::widget( [
    'name' => 'country_code',
    'value' => '',
    'url' => 'site/test',
    'type' => 'select2',
    'mode' => 'pop',
    'clientOptions' => [
        'pk' => 2,
        'placement' => 'right',
        'select2' => [
            'width' => '124px'
        ],
        'source' => [
            ['id' => 'gb', 'text' => 'Great Britain'],
            ['id' => 'es', 'text' => 'Spain'],
        ],
    ]
]);?>


= $form->field($model, 'address')->widget(Editable::className(), [
    'url' => 'site/test',
    'type' => 'address'
]);?>

field($model, 'created_at')->widget(Editable::className(), [
    'url' => 'site/test',
    'type' => 'datetime',
    'mode' => 'pop',
    'clientOptions' => [
        'placement' => 'right',
        'format' => 'yyyy-mm-dd hh:ii',
        'viewformat' => 'dd/mm/yyyy hh:ii',
        'datepicker' => [
            'orientation' => 'top auto'
        ]            
    ]
]);?>

Testing

To test the extension, is better to clone this repository on your computer. After, go to the extensions folder and do the following (assuming you have composer installed on your computer):, (*12)

$ composer install --no-interaction --prefer-source --dev

Once all required libraries are installed then do:, (*13)

$ vendor/bin/phpunit

Further Information

Please, check the X-Editable Plugin documentation for further information about its configuration options., (*14)

Contributing

Please see CONTRIBUTING for details., (*15)

Credits

License

The BSD License (BSD). Please see License File for more information., (*16)

2amigOS!
Custom Software | Web & Mobile Software Development
www.2amigos.us, (*17)

The Versions

04/08 2017

dev-master

9999999-dev http://yiiwheels.com/extension/editable-widget

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget x-editable

03/08 2017

dev-FIX_33

dev-FIX_33 http://yiiwheels.com/extension/editable-widget

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget x-editable

27/07 2017

1.1.1

1.1.1.0 http://yiiwheels.com/extension/editable-widget

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget x-editable

26/07 2017

1.1.0

1.1.0.0 http://yiiwheels.com/extension/editable-widget

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget x-editable

05/07 2017

1.0.1

1.0.1.0 http://yiiwheels.com/extension/editable-widget

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget x-editable

04/07 2017

1.0.0

1.0.0.0 http://yiiwheels.com/extension/editable-widget

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

extension yii2 2amigos yii yii 2 widget x-editable

20/02 2015

0.1.4

0.1.4.0

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii widget x-editable

22/12 2014

0.1.3

0.1.3.0

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii widget x-editable

20/08 2014

0.1.2

0.1.2.0

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii widget x-editable

18/08 2014

0.1.1

0.1.1.0

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii widget x-editable

10/04 2014

0.1.0

0.1.0.0

X-Editable widget for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii widget x-editable