Merge pull request #50 from pflaeging/master

Fixed bug with title and made a german translation
This commit is contained in:
Hugo Zilliox 2019-10-20 12:00:36 +02:00 committed by GitHub
commit 657015d97f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 37 deletions

View File

@ -1,35 +1,35 @@
/* /*
* CONFIGURATION FILE * CONFIGURATION FILE
* More info on https://github.com/Ilogeek/redmine_issue_dynamic_edit * More info on https://github.com/Ilogeek/redmine_issue_dynamic_edit
*/ */
/* /*
* _CONF_FORCE_HTTPS (boolean) * _CONF_FORCE_HTTPS (boolean)
* Will force AJAX call performed by the plugin to be done with https protocol * Will force AJAX call performed by the plugin to be done with https protocol
* Use this value if you encounter some difficulties with "Mixed content" issues * Use this value if you encounter some difficulties with "Mixed content" issues
* Allowed values : false (default), true * Allowed values : false (default), true
*/ */
var _CONF_FORCE_HTTPS = false; var _CONF_FORCE_HTTPS = false;
/* /*
* _CONF_LISTENER_TYPE (string) * _CONF_LISTENER_TYPE (string)
* Choose which action will trigger the apparition of the edition block * Choose which action will trigger the apparition of the edition block
* Allowed values : click (default), dblclick * Allowed values : click (default), dblclick
*/ */
var _CONF_LISTENER_TYPE = "click"; var _CONF_LISTENER_TYPE = "click";
/* /*
* _CONF_LISTENER_TARGET (string) * _CONF_LISTENER_TARGET (string)
* Choose which area will trigger the apparition of the edition block * Choose which area will trigger the apparition of the edition block
* "value" will target the whole line, "fa-pencil" will only target the pencil icon * "value" will target the whole line, "fa-pencil" will only target the pencil icon
* Allowed values : value (default), fa-pencil * Allowed values : value (default), fa-pencil
*/ */
var _CONF_LISTENER_TARGET = "value"; var _CONF_LISTENER_TARGET = "value";
/* /*
* _CONF_EXCLUDED_FIELD_ID (string array) * _CONF_EXCLUDED_FIELD_ID (string array)
* Choose which fields to exclude. They won't have the edit block and pencil * Choose which fields to exclude. They won't have the edit block and pencil
* Custom fields have an unique ID and this ID must be prefixed by "issue_custom_field_values_". Eg : "issue_custom_field_values_4" is an allowed value * Custom fields have an unique ID and this ID must be prefixed by "issue_custom_field_values_". Eg : "issue_custom_field_values_4" is an allowed value
* Allowed values : array of any ID selector (css). Eg : ["statusListDropdown", "StartDateInput", "TitleInput", "issue_custom_field_values_4"] * Allowed values : array of any ID selector (css). Eg : ["statusListDropdown", "StartDateInput", "TitleInput", "issue_custom_field_values_4"]
*/ */
var _CONF_EXCLUDED_FIELD_ID = []; var _CONF_EXCLUDED_FIELD_ID = [];

View File

@ -35,7 +35,7 @@ body.controller-issues.action-show .dynamicEdit {
display: inline-block; display: inline-block;
position:absolute; position:absolute;
opacity: 0; opacity: 0;
left:0; /* left:0; correct position on top of icon */
bottom: 100%; bottom: 100%;
margin-bottom: 5px; margin-bottom: 5px;
box-sizing: border-box; box-sizing: border-box;

9
config/locales/de.yml Normal file
View File

@ -0,0 +1,9 @@
# Translation by Peter Pfläging <peter@pflaeging.net>
de:
ide_txt_validation_btn : 'Änderung bestätitgen'
ide_txt_error_positive_number : 'Hier muss eine positive Zahl stehen'
ide_txt_error_start_date : 'Das Startdatum muss vor dem Enddatum liegen'
ide_txt_error_due_date : 'Das Enddatum muss nach dem Startdatum liegen'
ide_txt_error_ajax_call : 'Error (Javascript Konsole kontrollieren)'
ide_txt_cancel_btn : 'Änderungen ignorieren'
ide_txt_required_field : 'Pflichtfeld bitte ausfüllen'

View File

@ -155,8 +155,10 @@ class DetailsIssueHooks < Redmine::Hook::ViewListener
end end
# Title # Title
# Make quotings in subject! (PP)
clonesubject = issue.subject.gsub('"','&quot;')
o << "<span class='dynamicEdit' id='TitleInput'>" o << "<span class='dynamicEdit' id='TitleInput'>"
o << " <input size=\"50\" value=\"#{issue.subject}\" type=\"text\">" o << " <input size=\"50\" value=\"#{clonesubject}\" type=\"text\">"
o << " <a href='#' class='btn btn-primary validate' aria-label='" + l(:ide_txt_validation_btn) + "'><i class='fa fa-check fa-fw' aria-hidden='true'></i></a>" o << " <a href='#' class='btn btn-primary validate' aria-label='" + l(:ide_txt_validation_btn) + "'><i class='fa fa-check fa-fw' aria-hidden='true'></i></a>"
o << " <a href='#' class='btn btn-primary close' aria-label='" + l(:ide_txt_cancel_btn) + "'><i class='fa fa-times fa-fw' aria-hidden='true'></i></a>" o << " <a href='#' class='btn btn-primary close' aria-label='" + l(:ide_txt_cancel_btn) + "'><i class='fa fa-times fa-fw' aria-hidden='true'></i></a>"
o << "</span>" o << "</span>"