From 7309b7773cc95d7c0a5a572facd4762a4d68e629 Mon Sep 17 00:00:00 2001 From: Roboneet Date: Sun, 11 Jun 2017 01:00:20 +0530 Subject: [PATCH 1/5] changed postioning in activity panel --- website/static/css/activity.css | 34 ++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/website/static/css/activity.css b/website/static/css/activity.css index 4f6f62a97..db35ed158 100644 --- a/website/static/css/activity.css +++ b/website/static/css/activity.css @@ -1,30 +1,46 @@ .activity-strip-section >img{ - width: auto; - height: 100px; - } + width: auto; + height: 100px; +} .activity-screenshot img{ height:auto; } - +.activity-strip-section > div > .small{ + position: relative; + top: 10px; +} @media only screen and (max-width: 450px){ - - .activity-strip .activity-strip-section{ width: 95%; - height: auto; - - + height: auto; } .activity-strip{ height:auto; overflow: auto; } + .activity-screenshot{ position: absolute; top:100px; } + + .bug-type{ + right: 0; + } + + .activity-strip-section > div{ + overflow: auto; + } + +} + +@media only screen and (min-width: 400px){ + .bug-type{ + position:relative; + right: 0 + } } \ No newline at end of file From 1cec5d4be1dc728100c4f9543db7e93776e2fda8 Mon Sep 17 00:00:00 2001 From: Roboneet Date: Sun, 11 Jun 2017 03:28:13 +0530 Subject: [PATCH 2/5] added a button to see more details --- website/static/css/activity.css | 18 ++++++++++++++++++ website/static/js/activity.js | 17 +++++++++++++++++ website/templates/_activity.html | 4 ++-- website/templates/index.html | 2 +- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 website/static/js/activity.js diff --git a/website/static/css/activity.css b/website/static/css/activity.css index db35ed158..79a63f17c 100644 --- a/website/static/css/activity.css +++ b/website/static/css/activity.css @@ -12,6 +12,13 @@ top: 10px; } +.more_info{ + display: none; + cursor: pointer; +} + + + @media only screen and (max-width: 450px){ .activity-strip .activity-strip-section{ width: 95%; @@ -35,6 +42,17 @@ .activity-strip-section > div{ overflow: auto; } + + .more_info{ + display: block; + margin: 10px 0; + cursor: pointer; + color: #999; + } + + .activity-strip-section > div > .small{ + display: none; + } } diff --git a/website/static/js/activity.js b/website/static/js/activity.js new file mode 100644 index 000000000..3987300d8 --- /dev/null +++ b/website/static/js/activity.js @@ -0,0 +1,17 @@ +$(document).ready(function(){ + + $('.more_info').click(function(){ + + $('.open').parent().animate({'height':'200px'}) + $('.open').parent().parent().animate({'height': '200px'}) + $('.open').parent().parent().parent().animate({'height': '200px'}) + $('.open').hide() + $('.open').removeClass('.open') + + $(this).parent().animate({'height':'400px'}) + $(this).parent().parent().animate({'height': '400px'}) + $(this).parent().parent().parent().animate({'height': '400px'}) + $(this).siblings('.small').show() + $(this).siblings('.small').addClass('open') + }) +}) \ No newline at end of file diff --git a/website/templates/_activity.html b/website/templates/_activity.html index b150edb45..712029335 100644 --- a/website/templates/_activity.html +++ b/website/templates/_activity.html @@ -8,7 +8,7 @@ {% endif %} -
+
{% if activity.action_object %} {% if activity.action_object.get_absolute_url %} {{ activity.action_object }} @@ -34,7 +34,7 @@ {{activity.target.status}} {% endif %} {% endif %} - +
{% if activity.actor.get_absolute_url %} diff --git a/website/templates/index.html b/website/templates/index.html index 4b6c5d041..076de5147 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -7,7 +7,7 @@ {% block content %} - +

Find Bugs, Win Points and Prizes

From f036fbcd691760463e434cc8a6d2b7c569a626ce Mon Sep 17 00:00:00 2001 From: Roboneet Date: Sun, 11 Jun 2017 21:40:03 +0530 Subject: [PATCH 3/5] removed bounce action --- website/static/js/activity.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/website/static/js/activity.js b/website/static/js/activity.js index 3987300d8..f0f046c0b 100644 --- a/website/static/js/activity.js +++ b/website/static/js/activity.js @@ -1,17 +1,31 @@ $(document).ready(function(){ $('.more_info').click(function(){ + if($(this)[0]==$('.open')[0]){ + close_panel() + return; + } + console.log($(this)) + console.log($('.open')) + + close_panel() - $('.open').parent().animate({'height':'200px'}) - $('.open').parent().parent().animate({'height': '200px'}) - $('.open').parent().parent().parent().animate({'height': '200px'}) - $('.open').hide() - $('.open').removeClass('.open') + $(this).html("
See less") $(this).parent().animate({'height':'400px'}) $(this).parent().parent().animate({'height': '400px'}) $(this).parent().parent().parent().animate({'height': '400px'}) $(this).siblings('.small').show() - $(this).siblings('.small').addClass('open') + $(this).addClass('open') }) + + function close_panel(){ + $('.open').html('See more') + $('.open').parent().animate({'height':'200px'}) + $('.open').parent().parent().animate({'height': '200px'}) + $('.open').parent().parent().parent().animate({'height': '200px'}) + $('.open').siblings('.small').hide() + $('.open').removeClass('open') + + } }) \ No newline at end of file From cb65f6b05871ac479b58053614804aba6ddac8a5 Mon Sep 17 00:00:00 2001 From: Roboneet Date: Mon, 12 Jun 2017 00:48:41 +0530 Subject: [PATCH 4/5] added truncated charectors --- website/static/css/activity.css | 14 ++++++++++++-- website/static/js/activity.js | 23 +++++++++++++++++++++-- website/templates/_activity.html | 3 ++- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/website/static/css/activity.css b/website/static/css/activity.css index 79a63f17c..2c110e16f 100644 --- a/website/static/css/activity.css +++ b/website/static/css/activity.css @@ -16,6 +16,9 @@ display: none; cursor: pointer; } +.text-trunc{ + display: none; +} @@ -53,7 +56,13 @@ .activity-strip-section > div > .small{ display: none; } - + .text-trunc{ + display: block; + margin-top: 10px; + } + .text-trunc:first-letter{ + text-transform: uppercase; + } } @media only screen and (min-width: 400px){ @@ -61,4 +70,5 @@ position:relative; right: 0 } -} \ No newline at end of file +} + diff --git a/website/static/js/activity.js b/website/static/js/activity.js index f0f046c0b..ec6d3c565 100644 --- a/website/static/js/activity.js +++ b/website/static/js/activity.js @@ -1,12 +1,27 @@ $(document).ready(function(){ + $('.text-trunc').each(function(index, ele){ + console.log(ele) + + var text = $(ele).siblings('.small').text().trim() //.substring(0, 30).split(" ").slice(0, -1).join(" ") + "..."; + console.log(text) + var actor = /^[^\s]+/.exec(text) + console.log(actor[0]) + var rest = text.slice(actor[0].length).trim().substring(0, 20).split(" ").slice(0, -1).join(" ") + "..."; + $(ele).text(actor[0]+ ' '+rest); + }) + + + + + $('.more_info').click(function(){ if($(this)[0]==$('.open')[0]){ close_panel() return; } - console.log($(this)) - console.log($('.open')) + // console.log($(this)) + // console.log($('.open')) close_panel() @@ -15,6 +30,7 @@ $(document).ready(function(){ $(this).parent().animate({'height':'400px'}) $(this).parent().parent().animate({'height': '400px'}) $(this).parent().parent().parent().animate({'height': '400px'}) + $(this).siblings('.text-trunc').hide() $(this).siblings('.small').show() $(this).addClass('open') }) @@ -25,7 +41,10 @@ $(document).ready(function(){ $('.open').parent().parent().animate({'height': '200px'}) $('.open').parent().parent().parent().animate({'height': '200px'}) $('.open').siblings('.small').hide() + $('.open').siblings('.text-trunc').show() $('.open').removeClass('open') } + + }) \ No newline at end of file diff --git a/website/templates/_activity.html b/website/templates/_activity.html index 712029335..97523616f 100644 --- a/website/templates/_activity.html +++ b/website/templates/_activity.html @@ -34,7 +34,7 @@ {{activity.target.status}} {% endif %} {% endif %} - +
{% if activity.actor.get_absolute_url %} @@ -47,6 +47,7 @@ {{ activity.target.domain_name }} {{activity.target.get_label_display}}
+
From 7694d47d3a5ecd3a31065787f2be613c68a17ef9 Mon Sep 17 00:00:00 2001 From: Roboneet Date: Mon, 12 Jun 2017 01:37:41 +0530 Subject: [PATCH 5/5] change in height and code style --- website/static/css/activity.css | 97 ++++++++++++++++----------------- website/static/js/activity.js | 37 ++++--------- 2 files changed, 58 insertions(+), 76 deletions(-) diff --git a/website/static/css/activity.css b/website/static/css/activity.css index 2c110e16f..8defc159c 100644 --- a/website/static/css/activity.css +++ b/website/static/css/activity.css @@ -1,74 +1,73 @@ -.activity-strip-section >img{ - width: auto; - height: 100px; +.activity-strip-section > img{ + width: auto; + height: 100px; } .activity-screenshot img{ - height:auto; + height: auto; } .activity-strip-section > div > .small{ - position: relative; - top: 10px; + position: relative; + top: 10px; } .more_info{ - display: none; - cursor: pointer; + display: none; + cursor: pointer; } + .text-trunc{ - display: none; + display: none; } - - @media only screen and (max-width: 450px){ - .activity-strip .activity-strip-section{ - width: 95%; - height: auto; - } + .activity-strip .activity-strip-section{ + width: 95%; + height: auto; + } - .activity-strip{ - height:auto; - overflow: auto; - } + .activity-strip{ + height: 160px; + } - .activity-screenshot{ - position: absolute; - top:100px; - } + .activity-screenshot{ + position: absolute; + top: 100px; + } - .bug-type{ - right: 0; - } + .bug-type{ + right: 0; + } - .activity-strip-section > div{ - overflow: auto; - } + .activity-strip-section > div{ + overflow: auto; + } - .more_info{ - display: block; - margin: 10px 0; - cursor: pointer; - color: #999; - } - - .activity-strip-section > div > .small{ - display: none; - } + .more_info{ + display: block; + margin: 10px 0; + cursor: pointer; + color: #999; + } + + .activity-strip-section > div > .small{ + display: none; + } + .text-trunc{ - display: block; - margin-top: 10px; - } + display: block; + margin-top: 10px; + } + .text-trunc:first-letter{ - text-transform: uppercase; - } + text-transform: uppercase; + } } @media only screen and (min-width: 400px){ - .bug-type{ - position:relative; - right: 0 - } + .bug-type{ + position: relative; + right: 0 + } } - diff --git a/website/static/js/activity.js b/website/static/js/activity.js index ec6d3c565..42425bebb 100644 --- a/website/static/js/activity.js +++ b/website/static/js/activity.js @@ -1,35 +1,21 @@ $(document).ready(function(){ - $('.text-trunc').each(function(index, ele){ - console.log(ele) - - var text = $(ele).siblings('.small').text().trim() //.substring(0, 30).split(" ").slice(0, -1).join(" ") + "..."; - console.log(text) + var text = $(ele).siblings('.small').text().trim() var actor = /^[^\s]+/.exec(text) - console.log(actor[0]) var rest = text.slice(actor[0].length).trim().substring(0, 20).split(" ").slice(0, -1).join(" ") + "..."; $(ele).text(actor[0]+ ' '+rest); }) - - - - $('.more_info').click(function(){ if($(this)[0]==$('.open')[0]){ close_panel() return; } - // console.log($(this)) - // console.log($('.open')) - - close_panel() - - + close_panel() $(this).html("See less") - $(this).parent().animate({'height':'400px'}) - $(this).parent().parent().animate({'height': '400px'}) - $(this).parent().parent().parent().animate({'height': '400px'}) + $(this).parent().animate({'height':'200px'}) + $(this).parent().parent().animate({'height': '200px'}) + $(this).parent().parent().parent().animate({'height': '200px'}) $(this).siblings('.text-trunc').hide() $(this).siblings('.small').show() $(this).addClass('open') @@ -37,14 +23,11 @@ $(document).ready(function(){ function close_panel(){ $('.open').html('See more') - $('.open').parent().animate({'height':'200px'}) - $('.open').parent().parent().animate({'height': '200px'}) - $('.open').parent().parent().parent().animate({'height': '200px'}) + $('.open').parent().animate({'height':'160px'}) + $('.open').parent().parent().animate({'height': '160px'}) + $('.open').parent().parent().parent().animate({'height': '160px'}) $('.open').siblings('.small').hide() $('.open').siblings('.text-trunc').show() - $('.open').removeClass('open') - + $('.open').removeClass('open') } - - -}) \ No newline at end of file +})