c006 / yii2-migration-utility

Automatically writes the create tables for migrations or create tables in general. Uses MySQL
MIT License
64 stars 35 forks source link

Some JQuery functionalities not working #11

Closed fedemotta closed 8 years ago

fedemotta commented 9 years ago

Hi, There is a JQuery error:

backend.local/:368 Uncaught ReferenceError: jQuery is not defined

I think this is happening because the hardcoded js code in the view.

Thanks

c006 commented 9 years ago

This will get it working.

File Path: /vendor/yiisoft/yii2/web/JqueryAsset.php

class JqueryAsset extends AssetBundle
{
    public $sourcePath = '@bower/jquery/dist';
    public $js = [
        'jquery.js',
    ];
    public $jsOptions = [
        'position' => View::POS_HEAD,
    ];
}
fedemotta commented 9 years ago

Hi Jon, I submitted a pull request with a refactor which fixes this issue. I tested those changes and it seemed to be working.

Cheers

c006 commented 9 years ago

Thank you, that is a good idea to have jQuery load automatically.

Jon

On Thu, Sep 24, 2015 at 6:22 PM, Federico Nicolás Motta < notifications@github.com> wrote:

Hi Jon, I submitted a pull request with a refactor which fixes this issue. I tested those changes and it seemed to be working.

Cheers

— Reply to this email directly or view it on GitHub https://github.com/c006/yii2-migration-utility/issues/11#issuecomment-143096952 .

lostsnow commented 8 years ago

Why change the yii framework code to fix this issue? This will causes not compatible in future.