From daa8eefff6512a39a5d6703576c858fa335062b8 Mon Sep 17 00:00:00 2001 From: nilsding Date: Mon, 29 Dec 2014 22:01:54 +0100 Subject: [PATCH 1/4] temp fix --- app/views/static/about.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/static/about.html.haml b/app/views/static/about.html.haml index 4db558a4..43721737 100644 --- a/app/views/static/about.html.haml +++ b/app/views/static/about.html.haml @@ -21,14 +21,14 @@ .media .pull-left %a{href: show_user_profile_path('nilsding')} - %img.img-rounded.answerbox--img{src: gravatar_url('nilsding@nilsding.org')} + %img.img-rounded.answerbox--img{src: User.find_by_screen_name('nilsding').profile_picture.url} .media-body %h4.entry-text.entry-about nilsding %h6.entry-subtext Backend, Server & Code .media .pull-left %a{href: show_user_profile_path('pixeldesu')} - %img.img-rounded.answerbox--img{src: gravatar_url('pixeldesu@outlook.com')} + %img.img-rounded.answerbox--img{src: User.find_by_screen_name('pixeldesu').profile_picture.url} .media-body %h4.entry-text.entry-about pixeldesu %h6.entry-subtext Frontend Design & Layout From 8c17886f7729be56357d4d95d079e19ff694cd1f Mon Sep 17 00:00:00 2001 From: nilsding Date: Mon, 29 Dec 2014 23:45:41 +0100 Subject: [PATCH 2/4] update TODO [ci:skip] --- TODO | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index fdd1bf6f..81724795 100644 --- a/TODO +++ b/TODO @@ -1,27 +1,27 @@ Not done: [001| 0%] user blocking (prohibits blocked user from asking question to that person and seeing their answers) -[003| 0%] file uploads (for now only avatars, file uploads for embedding images in questions MAYBE LATER) +[003| 50%] file uploads (for now only avatars, file uploads for embedding images in questions MAYBE LATER) [006| 0%] privacy options (e.g. profile visible for members only, disable anonymous questions, opt-out from public timeline) [007| 0%] (?) keyboard shortcuts [008| 0%] make email work! [010| 0%] locales (these can wait for now) [012| 0%] (?) open source the entire thing – in late 2015 or 2016 maybe, after we got bought by fakelook. [015| 0%] make a public accessible API (maybe even as an oauth provider?) -[016| 0%] WRYYYYte more specs +[016| 5%] WRYYYYte more specs [017| 0%] write "terms of service" and a privacy policy. [018| 0%] that annoying "we use cookies" thing every website in the EU must? add [020| 0%] helper function for profile headings to resize on certain string length -[021| 0%] deleting comments +[021|100%] deleting comments |----- restructure comment design [022| 0%] recommended follows [023| 0%] disabling group-questions [024| 0%] disabling questions from certain users [025| 0%] answering options (sharing/nsfw/private) in inbox panels [026| 0%] profile headers -[027| 0%] moderation - |----- moderator user group - |----- moderation panel - |----- ability to report questions +[027| 66%] moderation + |----- moderator user group √ + |----- moderation panel √ + |----- ability to report questions × In Progress: [011| 75%] auto-posting to other services (twatter, fakelook) From 7d504778b0e20532fb5185d7565ffc84d40ac133 Mon Sep 17 00:00:00 2001 From: nilsding Date: Tue, 30 Dec 2014 16:20:47 +0100 Subject: [PATCH 3/4] "Delete all" button is now disabled properly and the ibCount is now incremented by 1 (closes GitHub issues #34 and #27) --- app/assets/javascripts/inbox.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/inbox.coffee b/app/assets/javascripts/inbox.coffee index 384c337b..14c835e2 100644 --- a/app/assets/javascripts/inbox.coffee +++ b/app/assets/javascripts/inbox.coffee @@ -11,7 +11,7 @@ # GitHub issue #26: del_all_btn = ($ "button#ib-delete-all") del_all_btn.removeAttr 'disabled' - del_all_btn[0].dataset.ibCount = 1 + del_all_btn[0].dataset.ibCount = (Number del_all_btn[0].dataset.ibCount) + 1 error: (jqxhr, status, error) -> console.log jqxhr, status, error showNotification "An error occurred, a developer should check the console for details", false @@ -40,9 +40,10 @@ console.log jqxhr, status, error showNotification "An error occurred, a developer should check the console for details", false complete: (jqxhr, status) -> - btn.button "reset" if succ - btn.prop "disabled", true # this doesn't really work like I wanted it to… + # and now: a (broken?) re-implementation of Bootstrap's button.js + btn.html btn.data('resetText') + btn.removeClass 'disabled' btn[0].dataset.ibCount = 0 From 1d3848424d49dfeb859b15788d09276e3e15f87b Mon Sep 17 00:00:00 2001 From: nilsding Date: Wed, 31 Dec 2014 16:02:34 +0100 Subject: [PATCH 4/4] changed regex for matching user mentions --- app/services/flavored_markdown.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/flavored_markdown.rb b/app/services/flavored_markdown.rb index e88f0453..a356d07e 100644 --- a/app/services/flavored_markdown.rb +++ b/app/services/flavored_markdown.rb @@ -6,7 +6,7 @@ class FlavoredMarkdown < Redcarpet::Render::HTML end def wrap_mentions(text) - text.gsub! /(^|\s)(@\w+)/ do + text.gsub! /(^|\s)(@[a-zA-Z0-9_]{1,16})/ do "#{$1}[#{$2}](#{show_user_profile_path $2.tr('@', '')})" end text @@ -23,4 +23,4 @@ class FlavoredMarkdown < Redcarpet::Render::HTML def raw_html(raw_html) Rack::Utils.escape_html raw_html end -end \ No newline at end of file +end