masbaehr / nicecountryinput Goto Github PK
View Code? Open in Web Editor NEWJavascript country selection made easy... No NPM, No Images, just one JS file, one CSS file
Javascript country selection made easy... No NPM, No Images, just one JS file, one CSS file
It's not possible to control continent display via data-showContinents
, because custom data attributes must not contain capital letters, see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*:
the name must not contain capital letters.
In niceCountryInput.js
this line should be fixed to use lower-case letters only:
this.showContinents = domElement.dataset.showContinents === 'true';
Hello @masbaehr,
I assume that, like the "materialcolorpickerjs" repository, this repository is also licensed under the MIT license, right? If not, what is the license? :)
Thanks in advance! :)
Environment
niceCountryInput version 1.0.2
How to reproduce?
This will show up an alert box:
<div class="niceCountryInputSelector" style="width: 300px;" data-selectedcountry="US" data-showspecial="false" data-showflags="true" data-i18nall="All selected"
data-i18nnofilter="No selection" data-i18nfilter="Filter'/><script>alert('xss');</script><div id='" data-onchangecallback="onChangeCallback" />
</div>
Expected result
Proper HTML escaping
Can someone help me this solution to work with angular 1.x?
Thanks
Environment
niceCountryInput version 1.0.2
How to reproduce?
Just add a button to the index.html you provided within your release bundle to simulate re-init as it would have been done e.g. after ajax responses:
<input type="button" value="Re-init" onclick="$('.niceCountryInputSelector').each(function(i,e){new NiceCountryInput(e).init();});" />
Expected result
Re-init should not append additional menus; previous content should be replaced instead.
How to show predefined countries only not all ?
Environment
niceCountryInput version 1.0.2
Expected result
I18N of the text Please wait should be supported as well.
Solution
I'll try to provide a PR.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.