diff --git a/app/assets/stylesheets/bookmarklet.css.scss b/app/assets/stylesheets/bookmarklet.css.scss index 773eabfd1..42c2dadbd 100644 --- a/app/assets/stylesheets/bookmarklet.css.scss +++ b/app/assets/stylesheets/bookmarklet.css.scss @@ -1 +1,2 @@ #bookmarklet { padding:10px 10px 30px 10px; margin-top: 0; } +body.page-status_messages.action-bookmarklet { margin-top: 0px } \ No newline at end of file diff --git a/app/assets/stylesheets/mentions.css.scss b/app/assets/stylesheets/mentions.css.scss index 49187d20b..6bffbc0a4 100644 --- a/app/assets/stylesheets/mentions.css.scss +++ b/app/assets/stylesheets/mentions.css.scss @@ -66,19 +66,22 @@ } } + .mentions-box { + position: absolute; + right: 0px; + bottom: 0px; + left: 0px; + top: 0px; + padding: 4px 6px; + } + .mentions { - bottom: 0; color: white; font-size: 14px; font-family: Arial, Helvetica, sans-serif; - left: 0; line-height: normal; overflow: hidden; - padding: 4px; - position: absolute; - right: 0; - top: 0; - width: 445px; + width: 100%; white-space: pre-wrap; word-wrap: break-word; diff --git a/app/assets/stylesheets/publisher.css.scss b/app/assets/stylesheets/publisher.css.scss index 6326d8ea1..bb545f600 100644 --- a/app/assets/stylesheets/publisher.css.scss +++ b/app/assets/stylesheets/publisher.css.scss @@ -78,9 +78,7 @@ } .mentions-input-box .mentions { - padding: 4px 6px !important; line-height: 20px !important; - width: 100% !important; } &.with_attachments .row-fluid#photodropzone_container { diff --git a/app/assets/stylesheets/publisher_blueprint.css.scss b/app/assets/stylesheets/publisher_blueprint.css.scss index 66d34b479..5b38159f2 100644 --- a/app/assets/stylesheets/publisher_blueprint.css.scss +++ b/app/assets/stylesheets/publisher_blueprint.css.scss @@ -113,6 +113,7 @@ #status_message_fake_text { min-height: 20px; + padding: 4px 6px; } .content_creation { diff --git a/app/assets/templates/stream_tpl.jst.hbs b/app/assets/templates/stream_tpl.jst.hbs index c3fb636a8..0a6c3a36b 100644 --- a/app/assets/templates/stream_tpl.jst.hbs +++ b/app/assets/templates/stream_tpl.jst.hbs @@ -66,7 +66,7 @@ - +
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 354c09fed..2a8999d3b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -21,16 +21,8 @@ module ApplicationHelper timeago_tag(time, options.merge(:class => 'timeago', :title => time.iso8601, :force => true)) if time end - def bookmarklet - raw_bookmarklet - end - - def raw_bookmarklet( height = 400, width = 620) - "javascript:(function(){f='#{AppConfig.pod_uri.to_s}bookmarklet?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'¬es='+encodeURIComponent(''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+'&v=1&';a=function(){if(!window.open(f+'noui=1&jump=doclose','diasporav1','location=yes,links=no,scrollbars=no,toolbar=no,width=#{width},height=#{height}'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()" - end - - def magic_bookmarklet_link - bookmarklet + def bookmarklet_url( height = 400, width = 620) + "javascript:(function(){f='#{AppConfig.pod_uri.to_s}bookmarklet?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'¬es='+encodeURIComponent(''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+'&v=1&';a=function(){if(!window.open(f+'noui=1&jump=doclose','diasporav1','location=yes,links=no,scrollbars=yes,toolbar=no,width=#{width},height=#{height}'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})()" end def contacts_link diff --git a/app/views/shared/_right_sections.html.haml b/app/views/shared/_right_sections.html.haml index 6e08a54c2..86899fe8e 100644 --- a/app/views/shared/_right_sections.html.haml +++ b/app/views/shared/_right_sections.html.haml @@ -66,7 +66,7 @@ %h5.title-header = t('bookmarklet.heading') .content - != t('bookmarklet.explanation', :link => link_to(t('bookmarklet.post_something'), magic_bookmarklet_link)) + != t('bookmarklet.explanation', :link => link_to(t('bookmarklet.post_something'), bookmarklet_url)) - if AppConfig.settings.paypal_hosted_button_id.present? || AppConfig.bitcoin_donation_address .section diff --git a/lib/assets/javascripts/jquery.mentionsInput.js b/lib/assets/javascripts/jquery.mentionsInput.js index 984527162..d3a7d25b2 100644 --- a/lib/assets/javascripts/jquery.mentionsInput.js +++ b/lib/assets/javascripts/jquery.mentionsInput.js @@ -34,7 +34,7 @@ autocompleteListItem : _.template('
  • <%= content %>
  • '), autocompleteListItemAvatar : _.template(''), autocompleteListItemIcon : _.template('
    '), - mentionsOverlay : _.template('
    '), + mentionsOverlay : _.template('
    '), mentionItemSyntax : _.template('@[<%= value %>](<%= type %>:<%= id %>)'), mentionItemHighlight : _.template('<%= value %>') } @@ -139,7 +139,7 @@ mentionText = mentionText.replace(/ {2}/g, '  '); elmInputBox.data('messageText', syntaxMessage); - elmMentionsOverlay.find('div').html(mentionText); + elmMentionsOverlay.find('div > div').html(mentionText); } function resetBuffer() {