Code Monkey home page Code Monkey logo

yii2-tagsinput's Introduction

yii2-tagsinput

Latest Version Software License Total Downloads

Install

Via Composer

$ composer require "wbraganca/yii2-tagsinput:~1.0.2"

or add to the require section of your composer.json file.

"wbraganca/yii2-tagsinput": "~1.0.2"

to the require section of your composer.json file.

Usage

On your view file.

<?php
use wbraganca\tagsinput\TagsinputWidget;
?>

<?= $form->field($model, 'tags')->widget(TagsinputWidget::classname(), [
    'clientOptions' => [
        'trimValue' => true,
        'allowDuplicates' => false
    ]
]) ?>

For more options, visit: http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/

yii2-tagsinput's People

Contributors

wbraganca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yii2-tagsinput's Issues

registerJS View::POS_HEAD incompatible with Bloodhound

When used in conjunction with a typeahead engine, the order of the registered JS is a problem:

<?php
$engine = new \dosamigos\typeahead\Bloodhound([
    'name' => 'countries',
    'clientOptions' => [
        'datumTokenizer' => new JsExpression('Bloodhound.tokenizers.whitespace'),
        'queryTokenizer' => new JsExpression('Bloodhound.tokenizers.whitespace'),
        'local' => new JsExpression(json_encode($countries))
    ]
]);
$this->registerJs($engine->getClientScript(), $this::POS_END);
?>
<?= $form->field($model, 'inclusive_countries')->widget(TagsinputWidget::classname(), [
        'clientOptions' => [
            'trimValue' => true,
            'allowDuplicates' => false,
            'freeInput' => false,
            'tagClass' => 'label label-warning',
            'typeaheadjs' => [
                'source' => $engine->getAdapterScript()
            ]
        ],
])?>

Causes this error: Uncaught ReferenceError: countries is not defined

also, trying to register the engine in POS_HEAD causes this error: Uncaught ReferenceError: Bloodhound is not defined because usually all JS assets in Yii2 are loaded at the end of the body.

So... we have a small egg chicken problem here, was wondering if you can just exclude the position from your registerJs call and everything will be positioned automatically by yii in the right order in the footer <script> tag.

Thank you!

New Composer issue Jquery 2.2.3 issue

don't work!
please help me!

  • wbraganca/yii2-tagsinput 1.0.0 requires bower-asset/bootstrap-tagsinput ~0.5 -> satisfiable by bower-asset/bootstrap-tagsinput[0.8.0, 0.7.1, 0.7.0, 0.6.1, 0.6.0, 0.5.0].
    • wbraganca/yii2-tagsinput 1.0.1 requires bower-asset/bootstrap-tagsinput ~0.6 -> satisfiable by bower-asset/bootstrap-tagsinput[0.8.0, 0.7.1, 0.7.0, 0.6.1, 0.6.0].
    • wbraganca/yii2-tagsinput dev-master requires bower-asset/bootstrap-tagsinput ~0.6 -> satisfiable by bower-asset/bootstrap-tagsinput[0.8.0, 0.7.1, 0.7.0, 0.6.1, 0.6.0].
    • bower-asset/bootstrap-tagsinput 0.5.0 requires bower-asset/jquery ~2.1.1 -> no matching package found.
    • bower-asset/bootstrap-tagsinput 0.6.0 requires bower-asset/jquery ~2.1.1 -> no matching package found.
    • bower-asset/bootstrap-tagsinput 0.6.1 requires bower-asset/jquery ~2.1.1 -> no matching package found.
    • bower-asset/bootstrap-tagsinput 0.7.0 requires bower-asset/jquery ~2.1.1 -> no matching package found.
    • bower-asset/bootstrap-tagsinput 0.7.1 requires bower-asset/jquery ~2.1.1 -> no matching package found.
    • bower-asset/bootstrap-tagsinput 0.8.0 requires bower-asset/jquery ~2.1.1 -> no matching package found.
    • Installation request for wbraganca/yii2-tagsinput * -> satisfiable by wbraganca/yii2-tagsinput[1.0.0, 1.0.1, dev-master].

New Composer issue Jquery 2.2.1 issue

Cannot install using composer due to composer issue.

Problem 1
- Conclusion: don't install wbraganca/yii2-tagsinput 1.0.1
- Conclusion: remove bower-asset/jquery 2.2.1
- Installation request for wbraganca/yii2-tagsinput ^1.0 -> satisfiable by wbraganca/yii2-tagsinput[1.0.0, 1.0.1].
- Conclusion: don't install bower-asset/jquery 2.2.1
- wbraganca/yii2-tagsinput 1.0.0 requires bower-asset/bootstrap-tagsinput ~0.5 -> satisfiable by bower-asset/bootstrap-tagsinput[0.8.0, 0.7.1, 0.7.0, 0.6.1, 0.6.0, 0.5.0].
- bower-asset/bootstrap-tagsinput 0.8.0 requires bower-asset/jquery ~2.1.1 -> satisfiable by bower-asset/jquery[2.1.4, 2.1.3, 2.1.2, 2.1.1].
- bower-asset/bootstrap-tagsinput 0.7.1 requires bower-asset/jquery ~2.1.1 -> satisfiable by bower-asset/jquery[2.1.4, 2.1.3, 2.1.2, 2.1.1].
- bower-asset/bootstrap-tagsinput 0.7.0 requires bower-asset/jquery ~2.1.1 -> satisfiable by bower-asset/jquery[2.1.4, 2.1.3, 2.1.2, 2.1.1].
- bower-asset/bootstrap-tagsinput 0.6.1 requires bower-asset/jquery ~2.1.1 -> satisfiable by bower-asset/jquery[2.1.4, 2.1.3, 2.1.2, 2.1.1].
- bower-asset/bootstrap-tagsinput 0.6.0 requires bower-asset/jquery ~2.1.1 -> satisfiable by bower-asset/jquery[2.1.4, 2.1.3, 2.1.2, 2.1.1].
- bower-asset/bootstrap-tagsinput 0.5.0 requires bower-asset/jquery ~2.1.1 -> satisfiable by bower-asset/jquery[2.1.4, 2.1.3, 2.1.2, 2.1.1].
- Can only install one of: bower-asset/jquery[2.1.4, 2.2.1].
- Can only install one of: bower-asset/jquery[2.1.3, 2.2.1].
- Can only install one of: bower-asset/jquery[2.1.2, 2.2.1].
- Can only install one of: bower-asset/jquery[2.1.1, 2.2.1].
- Installation request for bower-asset/jquery == 2.2.1.0 -> satisfiable by bower-asset/jquery[2.2.1].

Installation with composer does not work

Hi,

i tried to install yii2-tagsinput with composer and I've got the following error.

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

    Problem 1
       - Installation request for wbraganca/yii2-tagsinput * -> satisfiable by wbraganca/yii2-tagsinput[1.0.0].
       - wbraganca/yii2-tagsinput 1.0.0 requires bower-asset/bootstrap-tagsinput ~0.5 -> no matching      package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems

Do you have an idea what went wrong?

Best Regards

Sven

Problem with file or directory

Hello.

I have problem after install it:
The file or directory to be published does not exist: D:\OpenServer523\domains\mysite.loc/vendor\bower/bootstrap-tagsinput/dist

my console log:

  • Installing bower-asset/bootstrap-tagsinput (0.7.1)
    Downloading: 100%
  • Installing wbraganca/yii2-tagsinput (1.0.1)
    Downloading: 100%

Cannot install extension

When executing "composer require --prefer-stable "wbraganca/yii2-tagsinput:~1.0.2"" I get the following error:
`
Problem 1

- wbraganca/yii2-tagsinput 1.0.2 requires bower-asset/bootstrap-tagsinput ~0.8 -> satisfiable by bower-asset/bootstrap-tagsinput[0.8.0].

- Installation request for wbraganca/yii2-tagsinput ~1.0.2 -> satisfiable by wbraganca/yii2-tagsinput[1.0.2].

- Conclusion: remove bower-asset/jquery 2.2.4

- Conclusion: don't install bower-asset/jquery 2.2.4

- bower-asset/bootstrap-tagsinput 0.8.0 requires bower-asset/jquery ~2.1.1 -> satisfiable by bower-asset/jquery[2.1.4, 2.1.3, 2.1.2, 2.1.1].

- Can only install one of: bower-asset/jquery[2.1.4, 2.2.4].

- Can only install one of: bower-asset/jquery[2.1.3, 2.2.4].

- Can only install one of: bower-asset/jquery[2.1.2, 2.2.4].

- Can only install one of: bower-asset/jquery[2.1.1, 2.2.4].

- Installation request for bower-asset/jquery (locked at 2.2.4) -> satisfiable by bower-asset/jquery[2.2.4].

`
Its asking for a lower version of jquery (2.1.4)
Also tried on a fresh install of yii2 basic app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.