aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/static
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-04-06 10:37:13 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-04-06 10:37:13 +0200
commit29bb2a36f0b5d1781ab05f1976aa0c5017351807 (patch)
tree52b2dd87f4d36f6a9c518cc14f96e523b1dea045 /pyaggr3g470r/static
parentmisc update (diff)
parentMinor changes to the CSS. (diff)
downloadnewspipe-29bb2a36f0b5d1781ab05f1976aa0c5017351807.tar.gz
newspipe-29bb2a36f0b5d1781ab05f1976aa0c5017351807.tar.bz2
newspipe-29bb2a36f0b5d1781ab05f1976aa0c5017351807.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: pyaggr3g470r/controllers/feed.py pyaggr3g470r/templates/home.html
Diffstat (limited to 'pyaggr3g470r/static')
-rw-r--r--pyaggr3g470r/static/css/customized-bootstrap.css44
-rw-r--r--pyaggr3g470r/static/css/side-nav.css50
-rw-r--r--pyaggr3g470r/static/js/articles.js35
3 files changed, 127 insertions, 2 deletions
diff --git a/pyaggr3g470r/static/css/customized-bootstrap.css b/pyaggr3g470r/static/css/customized-bootstrap.css
new file mode 100644
index 00000000..58a9d182
--- /dev/null
+++ b/pyaggr3g470r/static/css/customized-bootstrap.css
@@ -0,0 +1,44 @@
+body {
+ margin-top: 50px;
+}
+div.top {
+ position: relative;
+ top: -50px;
+ display: block;
+ height: 0;
+}
+
+.navbar-custom {
+ background-color: #205081;
+ border: #205081;
+ color: #FFFFFF;
+ border-radius: 0;
+}
+
+.navbar-custom .navbar-nav > li > a {
+ color: #FFFFFF;
+}
+
+.navbar-custom .navbar-nav > li > a:hover {
+ background-color: #3572B0;
+}
+
+.navbar-custom .navbar-nav > .active > a,
+.navbar-nav > .active > a:hover,
+.navbar-nav > .active > a:focus {
+ color: #FFFFFF;
+ background-color: #3572B0;
+}
+.navbar-custom .navbar-brand {
+ color: #FFFFFF;
+}
+
+.navbar-custom .navbar-nav > .open > a,
+.navbar-custom .navbar-nav > .open > a:hover,
+.navbar-custom .navbar-nav > .open > a:focus {
+ color: #FFFFFF;
+ background-color: #3572B0;
+}
+a {
+ color: #3572B0;
+}
diff --git a/pyaggr3g470r/static/css/side-nav.css b/pyaggr3g470r/static/css/side-nav.css
new file mode 100644
index 00000000..5786bffa
--- /dev/null
+++ b/pyaggr3g470r/static/css/side-nav.css
@@ -0,0 +1,50 @@
+/* First level of nav */
+.sidenav {
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding-top: 10px;
+ padding-bottom: 0px;
+ overflow-y: auto;
+ height: 90%;
+ z-index: 1000;
+ background-color: #FFFFFF;
+ border-radius: 2px;
+ font-size: 100%;
+}
+/* All levels of nav */
+.sidebar .nav > li > a {
+ display: block;
+ color: #3572B0;
+ padding: 5px 20px;
+}
+.sidebar .nav > li > a:hover,
+.sidebar .nav > li > a:focus {
+ text-decoration: none;
+ background-color: #F0FFFF;
+}
+
+.sidebar .nav > .active > a,
+.sidebar .nav > .active:hover > a,
+.sidebar .nav > .active:focus > a {
+ font-weight: bold;
+ color: #3572B0;
+ background-color: transparent;
+}
+
+.badge {
+ background-color: #3572B0;
+}
+
+/* Nav: second level */
+.sidebar .nav .nav {
+ margin-bottom: 8px;
+}
+.sidebar .nav .nav > li > a {
+ padding-top: 3px;
+ padding-bottom: 3px;
+ font-size: 80%;
+}
+
+li.feed-commands {display: none; text-align: right;}
+li.feed-commands > span > a {margin-right: 10px;}
+li.feed-menu:hover + li.feed-commands, li.feed-commands:hover {display: block;}
diff --git a/pyaggr3g470r/static/js/articles.js b/pyaggr3g470r/static/js/articles.js
index 312a5cb6..a5ac82d0 100644
--- a/pyaggr3g470r/static/js/articles.js
+++ b/pyaggr3g470r/static/js/articles.js
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-API_ROOT = 'api/v2.0/'
+API_ROOT = '/api/v2.0/'
if (typeof jQuery === 'undefined') { throw new Error('Requires jQuery') }
@@ -131,7 +131,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Requires jQuery') }
var article_id = $(this).parent().parent().parent().attr("data-article");
$(this).parent().parent().parent().remove();
- // sends the updates to the server
+ // sends the updates to the server
$.ajax({
type: 'DELETE',
url: API_ROOT + "article/" + article_id,
@@ -144,4 +144,35 @@ if (typeof jQuery === 'undefined') { throw new Error('Requires jQuery') }
});
});
+
+ // Delete all duplicate articles (used in the page /duplicates)
+ $('.delete-all').click(function(){
+ var data = [];
+
+ var columnNo = $(this).parent().index();
+ $(this).closest("table")
+ .find("tr td:nth-child(" + (columnNo+1) + ")")
+ .each(function(line, column) {
+ data.push(parseInt(column.id));
+ }).remove();
+
+ data = JSON.stringify(data);
+
+ // sends the updates to the server
+ $.ajax({
+ type: 'DELETE',
+ // Provide correct Content-Type, so that Flask will know how to process it.
+ contentType: 'application/json',
+ data: data,
+ url: API_ROOT + "articles",
+ success: function (result) {
+ //console.log(result);
+ },
+ error: function(XMLHttpRequest, textStatus, errorThrown){
+ console.log(XMLHttpRequest.responseText);
+ }
+ });
+
+ });
+
}(jQuery);
bgstack15