summaryrefslogtreecommitdiff
path: root/addons/website_forum/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2014-05-12 18:34:55 +0200
committerXavier Morel <xmo@openerp.com>2014-05-12 18:34:55 +0200
commit023aa7acdf6eb859ada2f8c616fedf9dbc060c80 (patch)
treef96572989d6bfd71522281c9a238d89ccba41161 /addons/website_forum/static/src
parent2cc170980d31acabd3a69c47965668cfc29f8341 (diff)
[FIX] website_forum links which should not be, post-install crawler
* move URLs of purely-JS-hook <a> to data-href so the crawler does not try to access them (they're JSON-RPC endpoints...) * replace side-effecting links (...) by styled buttons * fix crawler to not take fragments in account when deduplicating and navigating URLs
Diffstat (limited to 'addons/website_forum/static/src')
-rw-r--r--addons/website_forum/static/src/css/website_forum.css4
-rw-r--r--addons/website_forum/static/src/css/website_forum.sass3
-rw-r--r--addons/website_forum/static/src/js/website_forum.js8
3 files changed, 11 insertions, 4 deletions
diff --git a/addons/website_forum/static/src/css/website_forum.css b/addons/website_forum/static/src/css/website_forum.css
index b90c1786e24..75befd62b1c 100644
--- a/addons/website_forum/static/src/css/website_forum.css
+++ b/addons/website_forum/static/src/css/website_forum.css
@@ -94,3 +94,7 @@ a.no-decoration {
font: 1.2em "Helvetica Neue", Helvetica, Arial, sans-serif !important;
height: 1.2em !important;
}
+
+button.btn-link.text-muted {
+ color: #999999;
+}
diff --git a/addons/website_forum/static/src/css/website_forum.sass b/addons/website_forum/static/src/css/website_forum.sass
index f8e46f06b79..d800d293de8 100644
--- a/addons/website_forum/static/src/css/website_forum.sass
+++ b/addons/website_forum/static/src/css/website_forum.sass
@@ -74,3 +74,6 @@ a.no-decoration
.text-tags .text-tag .text-button
font: 1.2em "Helvetica Neue", Helvetica, Arial, sans-serif !important
height: 1.2em !important
+
+button.btn-link.text-muted
+ color: #999
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js
index e84e76e14fa..0b45d4311c1 100644
--- a/addons/website_forum/static/src/js/website_forum.js
+++ b/addons/website_forum/static/src/js/website_forum.js
@@ -3,7 +3,7 @@ $(document).ready(function () {
$('.vote_up ,.vote_down').on('click', function (ev) {
ev.preventDefault();
var $link = $(ev.currentTarget);
- openerp.jsonRpc($link.attr('href'), 'call', {})
+ openerp.jsonRpc($link.data('href'), 'call', {})
.then(function (data) {
if (data['error']){
if (data['error'] == 'own_post'){
@@ -47,7 +47,7 @@ $(document).ready(function () {
$('.accept_answer').on('click', function (ev) {
ev.preventDefault();
var $link = $(ev.currentTarget);
- openerp.jsonRpc($link.attr('href'), 'call', {}).then(function (data) {
+ openerp.jsonRpc($link.data('href'), 'call', {}).then(function (data) {
if (data['error']) {
if (data['error'] == 'anonymous_user'){
var $warning = $('<div class="alert alert-danger alert-dismissable" id="correct_answer_alert" style="position:absolute; margin-top: -30px; margin-left: 90px;">'+
@@ -83,7 +83,7 @@ $(document).ready(function () {
$('.favourite_question').on('click', function (ev) {
ev.preventDefault();
var $link = $(ev.currentTarget);
- openerp.jsonRpc($link.attr('href'), 'call', {}).then(function (data) {
+ openerp.jsonRpc($link.data('href'), 'call', {}).then(function (data) {
if (data) {
$link.addClass("forum_favourite_question")
} else {
@@ -96,7 +96,7 @@ $(document).ready(function () {
$('.comment_delete').on('click', function (ev) {
ev.preventDefault();
var $link = $(ev.currentTarget);
- openerp.jsonRpc($link.attr('href'), 'call', {}).then(function (data) {
+ openerp.jsonRpc($link.data('href'), 'call', {}).then(function (data) {
$link.parents('.comment').first().remove();
});
return true;