All Projects → 2amigos → yii2-editable-widget

2amigos / yii2-editable-widget

Licence: other
X-Editable Widget for Yii2

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to yii2-editable-widget

yii2-grid-view-library
Highly enhanced GridView widget and grid components for Yii2
Stars: ✭ 57 (+1.79%)
Mutual labels:  widget, yii
yii2-multi-select-widget
Bootstrap MultiSelect and MultiSelect Listbox widgets for Yii2
Stars: ✭ 45 (-19.64%)
Mutual labels:  widget, yii
yii2-selectize-widget
Selectize From Brian Reavis Yii2 Widget
Stars: ✭ 73 (+30.36%)
Mutual labels:  widget, yii
Yii2 Ckeditor Widget
CKEditor WYSIWYG widget for Yii2.
Stars: ✭ 163 (+191.07%)
Mutual labels:  widget, yii
yii2-jstree-widget
jsTree tree widget for yii2
Stars: ✭ 16 (-71.43%)
Mutual labels:  widget, yii
react-zendesk
A component simplifies Zendesk widget usage in your React application
Stars: ✭ 34 (-39.29%)
Mutual labels:  widget
shiny-directory-input
An shiny input widget for selecting directories
Stars: ✭ 43 (-23.21%)
Mutual labels:  widget
Widget-Blur
This script for the Scriptable app creates widget backgrounds that appear to be transparent. You can also optionally emulate the light or dark blur effect used in the Batteries widget from Apple.
Stars: ✭ 113 (+101.79%)
Mutual labels:  widget
yiipowered
Yii powered websites showcase
Stars: ✭ 88 (+57.14%)
Mutual labels:  yii
BlockEditText
Block EditText is a library provide an input view present in multiple block style that common use in TAC or credit card field.
Stars: ✭ 113 (+101.79%)
Mutual labels:  widget
AppStore-Connect-Widget
Open source AppStore sales monitor with widget
Stars: ✭ 36 (-35.71%)
Mutual labels:  widget
yii2-highcharts-widget
HighCharts Js Widget for Yii2
Stars: ✭ 40 (-28.57%)
Mutual labels:  widget
EasyMoney-Widgets
The widgets (EditText and TextView) for support of money requirements like currency, number formatting, comma formatting etc.
Stars: ✭ 91 (+62.5%)
Mutual labels:  widget
ar-dynattribute
Provide ActiveRecord dynamic attributes stored into the single field in serialized state
Stars: ✭ 43 (-23.21%)
Mutual labels:  yii
file manager
FileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more. Designed to feel like part of the Flutter framework.
Stars: ✭ 38 (-32.14%)
Mutual labels:  widget
timeclock
Simple work time clocking service
Stars: ✭ 21 (-62.5%)
Mutual labels:  yii
yii2-widget-cropbox
This widget allows crop image before upload to server and send informations about crop in JSON format.
Stars: ✭ 90 (+60.71%)
Mutual labels:  widget
LazyWaimai-Web
懒人外卖的 Web 端,使用Yii2框架+Bootstrap进行开发
Stars: ✭ 32 (-42.86%)
Mutual labels:  yii
yii2-cookiemonster
Yii extension to manage cookie warning
Stars: ✭ 16 (-71.43%)
Mutual labels:  widget
drag-down-to-pop-flutter
A page transition which supports drag-down-to-pop gesture.
Stars: ✭ 15 (-73.21%)
Mutual labels:  widget

X-Editable Widget for Yii2

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

Renders a X-Editable Input allowing to use the amazing inline capabilities of X-Editable Plugin.

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:

  • 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.

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.

So keep this in mind:

  • 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.

Either run

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

or add

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

to the require section of your application's composer.json file.

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

<?php
use dosamigos\editable\Editable;

// as a widget with a model and a datetime type
?>

<?= 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'
           ]
    ]
]);?>
<?php 

// as a widget without a model and a select2 type
?>
<?= 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'],
        ],
    ]
]);?>

<?php 
// with an ActiveForm instance displayed as a address input 

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

<?php 
// as datetime type input
<?= $form->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):

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

Once all required libraries are installed then do:

$ vendor/bin/phpunit

Further Information

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

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

2amigOS!
Custom Software | Web & Mobile Software Development
www.2amigos.us

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].