aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bowerrc3
-rw-r--r--bower.json17
-rw-r--r--package.json4
-rw-r--r--requirements.txt1
-rw-r--r--src/web/templates/admin/dashboard.html15
-rw-r--r--src/web/templates/layout.html8
6 files changed, 43 insertions, 5 deletions
diff --git a/.bowerrc b/.bowerrc
new file mode 100644
index 00000000..52b95c90
--- /dev/null
+++ b/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory" : "src/web/static/bower_components"
+}
diff --git a/bower.json b/bower.json
new file mode 100644
index 00000000..cf816f65
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,17 @@
+{
+ "name": "newspipe",
+ "version": "0.0.0",
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "datatables.net": "^1.10.12",
+ "datatables.net-dt": "^1.10.12",
+ "datatables.net-bs": "^1.10.12"
+ }
+}
diff --git a/package.json b/package.json
index b31c2383..c446a5d5 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,7 @@
"main": "src/web/js/app.js",
"dependencies": {
"bootstrap": "^3.3.7",
+ "bower": "^1.7.9",
"classnames": "^2.2.5",
"flux": "^2.1.1",
"jquery": "^3.1.1",
@@ -36,7 +37,8 @@
},
"scripts": {
"start": "watchify -o src/web/static/js/bundle.min.js -v -d src/web/js/app.js",
- "build": "browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > src/web/static/js/bundle.min.js"
+ "build": "browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > src/web/static/js/bundle.min.js",
+ "postinstall": "./node_modules/bower/bin/bower install"
},
"browserify": {
"transform": [
diff --git a/requirements.txt b/requirements.txt
index ecefbb0a..2610d002 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,7 +5,6 @@ feedparser==5.2.1
beautifulsoup4==4.5.1
lxml==3.6.4
opml==0.5
-psycopg2==2.6.2
SQLAlchemy==1.1.1
alembic==0.8.8
Flask==0.11.1
diff --git a/src/web/templates/admin/dashboard.html b/src/web/templates/admin/dashboard.html
index 0d45118d..58b48fa1 100644
--- a/src/web/templates/admin/dashboard.html
+++ b/src/web/templates/admin/dashboard.html
@@ -5,7 +5,7 @@
{% block content %}
<div class="container">
<h1>{{ _('Registered users') }}</h1>
-<table class="table table-striped">
+<table id="table-users" class="table table-striped ">
<thead>
<tr>
<th>#</th>
@@ -56,4 +56,17 @@
{{ form.submit(class_="btn btn-default") }}
</form>
</div>
+<script>
+$(document).ready(function() {
+ $('#table-users').DataTable( {
+ responsive: true,
+ columnDefs: [
+ {
+ bSortable: false,
+ targets: [0, 5]
+ }
+ ]
+ });
+});
+</script>
{% endblock %}
diff --git a/src/web/templates/layout.html b/src/web/templates/layout.html
index 3e44c4eb..3dc1ff71 100644
--- a/src/web/templates/layout.html
+++ b/src/web/templates/layout.html
@@ -14,6 +14,12 @@
<link href="{{ url_for("static", filename="css/bootstrap.min.css") }}" rel="stylesheet" media="screen" />
<link href="{{ url_for("static", filename="css/customized-bootstrap.css") }}" rel="stylesheet" media="screen" />
+ <script type="text/javascript" src="{{ url_for('static', filename = 'js/jquery.js') }}"></script>
+ <script type="text/javascript" src="{{ url_for('static', filename = 'js/bootstrap.js') }}"></script>
+ <link rel="stylesheet" type="text/css" href="{{ url_for("static", filename="bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css") }}">
+ <script type="text/javascript" src="{{ url_for("static", filename="bower_components/datatables.net/js/jquery.dataTables.min.js") }}"></script>
+ <script type="text/javascript" src="{{ url_for("static", filename="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js") }}"></script>
+
{% endblock %}
</head>
@@ -132,8 +138,6 @@
<!-- Bootstrap core JavaScript -->
<!-- Placed at the end of the document so the pages load faster -->
- <script type="text/javascript" src="{{ url_for('static', filename = 'js/jquery.js') }}"></script>
- <script type="text/javascript" src="{{ url_for('static', filename = 'js/bootstrap.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename = 'js/articles.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename = 'js/feed.js') }}"></script>
</body>
bgstack15