diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2021-03-29 22:45:00 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2021-03-29 22:45:00 +0200 |
commit | 3a0b961f3c9cee0deb0757f63a6d1a8c45df8df5 (patch) | |
tree | 36483dda5dc72b99049f85b894fec17c7744c75e | |
parent | Updated feedparser (diff) | |
download | newspipe-3a0b961f3c9cee0deb0757f63a6d1a8c45df8df5.tar.gz newspipe-3a0b961f3c9cee0deb0757f63a6d1a8c45df8df5.tar.bz2 newspipe-3a0b961f3c9cee0deb0757f63a6d1a8c45df8df5.zip |
chg: [JavaScript] Updated bootstrap-select
-rw-r--r-- | newspipe/templates/edit_category.html | 12 | ||||
-rw-r--r-- | newspipe/templates/layout.html | 1 | ||||
-rw-r--r-- | package-lock.json | 17 | ||||
-rw-r--r-- | package.json | 5 |
4 files changed, 26 insertions, 9 deletions
diff --git a/newspipe/templates/edit_category.html b/newspipe/templates/edit_category.html index befbd3b9..4293215c 100644 --- a/newspipe/templates/edit_category.html +++ b/newspipe/templates/edit_category.html @@ -15,7 +15,7 @@ <div class="form-group"> <label for="{{ form.name.id }}" class="col-sm-3 control-label">{{ form.feeds.label }}</label> <div class="col-sm-9"> - {{ form.feeds(class_="", **{'data-live-search':'true', 'data-width':'auto'}) }} + {{ form.feeds(class_="selectpicker", **{'data-live-search':'true', 'data-width':'auto'}) }} </div> {% for error in form.feeds.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %} </div> @@ -27,4 +27,14 @@ </form> </div> </div><!-- /.container --> +<script> +(function() { + // document.getElementById("selectpicker").selectpicker(); + var selectpickers = document.getElementsByClassName('selectpicker'); + Array.prototype.map.call(selectpickers, function(picker) { + picker.selectpicker('render'); + }) + // $('.selectpicker').selectpicker(); +})(); +</script> {% endblock %} diff --git a/newspipe/templates/layout.html b/newspipe/templates/layout.html index 7cd98316..525eb426 100644 --- a/newspipe/templates/layout.html +++ b/newspipe/templates/layout.html @@ -15,6 +15,7 @@ <!-- JavaScript --> <script type="text/javascript" src="{{ url_for('static', filename='npm_components/@popperjs/core/dist/umd/popper.min.js') }}"></script> <script type="text/javascript" src="{{ url_for('static', filename='npm_components/bootstrap/dist/js/bootstrap.min.js') }}"></script> + <script type="text/javascript" src="{{ url_for('static', filename='npm_components/bootstrap-select/dist/js/bootstrap-select.min.js') }}"></script> {% endblock %} </head> <body> diff --git a/package-lock.json b/package-lock.json index ae6a540f..6794a810 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,14 +5,19 @@ "requires": true, "dependencies": { "@popperjs/core": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.5.4.tgz", - "integrity": "sha512-ZpKr+WTb8zsajqgDkvCEWgp6d5eJT6Q63Ng2neTbzBO76Lbe91vX/iVIW9dikq+Fs3yEo+ls4cxeXABD2LtcbQ==" + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.1.tgz", + "integrity": "sha512-DvJbbn3dUgMxDnJLH+RZQPnXak1h4ZVYQ7CWiFWjQwBFkVajT4rfw2PdpHLTSTwxrYfnoEXkuBiwkDm6tPMQeA==" }, "bootstrap": { - "version": "5.0.0-beta1", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.0.0-beta1.tgz", - "integrity": "sha512-UrHApw/WRmT7l2rlDdn5iXr7Jps/LlMZtJlLn9G41aGDfss48hyDeYyHtX1C6NHKVcmdUarGG+ve0LZB5iHyTQ==" + "version": "5.0.0-beta3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.0.0-beta3.tgz", + "integrity": "sha512-0urccjfIOzhrb9qJysN8XW/DRw6rg3zH7qLeKIp4Zyl8+Ens4JWB0NC0cB5AhnSFPd2tftRggjwCMxablo6Tpg==" + }, + "bootstrap-select": { + "version": "1.14.0-beta2", + "resolved": "https://registry.npmjs.org/bootstrap-select/-/bootstrap-select-1.14.0-beta2.tgz", + "integrity": "sha512-Q63QUbConUwA+/Te7tCJcv0nE3SI/J+rNI5A1mdX1KxP6lW0pFQy+4KVP6VwgZEcwkoPfrwjvAo6WT7fdl+Sdg==" }, "fork-awesome": { "version": "1.1.7", diff --git a/package.json b/package.json index 4f0c8f9f..ddf28503 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "license": "AGPL-3.0", "private": true, "dependencies": { - "@popperjs/core": "^2.5.4", - "bootstrap": "^5.0.0-beta1", + "@popperjs/core": "^2.9.1", + "bootstrap": "^5.0.0-beta3", + "bootstrap-select": "^1.14.0-beta2", "fork-awesome": "^1.1.7", "moment": "^2.29.1" }, |