Closed kartik-v closed 10 years ago
Could you help with a PR? Thanks!
Will work on a PR.
Wondering if this should be created as a separate yii2 extension - or retained in the widgets folder? Asking this because the newer plugin has more other options (and additional optional assets including extensions for date, time, phone etc.).
hmm, please hold on a moment. I think we need more discussion about this. @yiisoft/core-developers We are facing with this issue again: some core code depends on external js libs whose dependency is not managed by composer. Should we embrace bower?
@qiangxue I worked a bit on adding a solution on that, the core devs did not like adding Bowerphp so I have 've come up with using packages via Composer from VCS tree. I don't like it though I believe the Bower solution would be much better.
Check my closed PR on Bower, it is made that way that nodejs/bower is not needed, bowerphp
is used instead.
Link to the bowerphp
PR https://github.com/yiisoft/yii2/pull/2965
+1 for bower support, if we can address dependency management with the composer packages.
@kartik-v you could pull #3209 and work from there having by adding jquery.inputmask
in your bower.json. Let's see how it would look like. Just my two cents.
@pmoust thanks ... will wait for an update from @yiisoft/core-developers on how they want to include this - before I start.
I hope it could replace current masked input because current masked input have limited feature especially optional character in the middle of input
@qiangxue / @yiisoft/core-developers I have the extension created and ready. Currently the plugin assets were used locally to create the extension. Let me know how I should submit a PR
yii/widgets
and all assets included within yii/assets
+1 for bower. It will complete the dependency management with composer. They are not conflicting.
I submitted the PR #3225 with just ONE asset file jquery.inputmask.bundle.min.js
replaced in the assets folder and exactly the same names for the MaskedInput
and MaskedInputAsset
classes. A demo of the upgraded plugin can be viewed HERE for review/test and merge.
If we decide on using bower or any other change to generating assets... will change the asset dependency accordingly.
Let know if this is ready for adoption. A few examples on the new widget to get started
@kartik-v is it a fork of original one we were using or totally new one? How stable it is? How supported i.e. is it updated often?
Its a new plugin. But its actually a fork and rewrite of Bush's version. It is updated periodically and till recently (as I see on github). I have not interacted with the plugin author personally though.
Upgrade masked input JQuery plugin to use this upgraded variant from Robin Herbots instead of Bush's version, as Robin's implementation allows more features including optional characters in the middle of the input. If needed I can submit a PR.