From a481ec0da8047d19380026c81c4ccbddef109c0c Mon Sep 17 00:00:00 2001 From: Thomas Hille Date: Thu, 2 Mar 2017 14:41:55 +0100 Subject: [PATCH] always show search on left side. placeholder in search input --- app/assets/javascripts/editor/editor.js.erb | 2 +- .../_search_intervention_modal.html.slim | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/editor/editor.js.erb b/app/assets/javascripts/editor/editor.js.erb index 44c9c989..1f6b8fdd 100644 --- a/app/assets/javascripts/editor/editor.js.erb +++ b/app/assets/javascripts/editor/editor.js.erb @@ -658,8 +658,8 @@ configureEditors: function () { this.initializeTooltips(); if ($('#editor').data('show-interventions') == true){ this.initializeInterventionTimer(); - this.initializeSearchButton(); } + this.initializeSearchButton(); this.initPrompt(); this.renderScore(); this.showFirstFile(); diff --git a/app/views/interventions/_search_intervention_modal.html.slim b/app/views/interventions/_search_intervention_modal.html.slim index 1355a80b..0d45aadc 100644 --- a/app/views/interventions/_search_intervention_modal.html.slim +++ b/app/views/interventions/_search_intervention_modal.html.slim @@ -1,19 +1,10 @@ -/h5 = t('exercises.implement.comment.question') - -/textarea.form-control#question(style='resize:none;') p = "Benutz doch einfach die Forensuche! Du kannst auch jederzeit in der linken Spalte die Suche nutzen. Alternativ kannst du auch nach Kommentaren zu deinem Programm anfordern." = form_for(@search, multipart: true, target: "_blank") do |f| .form-group - = f.text_field(:search, class: 'form-control', id: 'search-modal', required: true) + = f.text_field(:search, class: 'form-control', id: 'search-modal', required: true, placeholder: "Probleme? Suche hier im Forum",) = f.hidden_field :exercise_id .actions = button_tag(class: 'btn btn-block btn-primary btn-sm', id: 'btn-search-modal', model: @search.class.model_name.human) do i.fa.fa-search - = 'Suche im Forum' -/p = "AVG: #{@working_time_avg}" -/p = "ACCUMULATED: #{@working_time_accumulated}" - -/ data-cause='requestComments' is not used here right now, we pass the button #requestComments (not askForCommentsButton) as initiator of the action. -/ But if we use this button, it will work since the correct cause is supplied -/button#askForCommentsButton.btn.btn-block.btn-primary(type='button' data-cause='requestComments' data-message-success=t('exercises.editor.request_for_comments_sent')) =t('exercises.implement.comment.request') \ No newline at end of file + = 'Suche im Forum' \ No newline at end of file