Fix refreshData button apparition into subtask + fixed mechanism on primary button (#92)
This commit is contained in:
parent
dac2c85811
commit
cbd2e36a37
@ -107,7 +107,7 @@ var getEditFormHTML = function(attribute){
|
||||
|
||||
/* Loop over all form attribute and clone them into details part */
|
||||
var cloneEditForm = function(){
|
||||
$('.issue.details .subject').append('<button class="refreshData">⟳</button>');
|
||||
$('.issue.details div.subject').append('<button class="refreshData">⟳</button>');
|
||||
$(".issue.details ").wrap("<form id='fakeDynamicForm'>");
|
||||
|
||||
$('div.issue.details .attribute').each(function(){
|
||||
@ -157,9 +157,9 @@ var cloneEditForm = function(){
|
||||
|
||||
// Specific Case : Title field
|
||||
if(!_CONF_EXCLUDED_FIELD_ID.includes("subject")){
|
||||
$('div.issue.details .subject h3').append(" <span class='iconEdit'><!--✎-->" + SVG_EDIT + "</span>");
|
||||
$('div.issue.details div.subject h3').append(" <span class='iconEdit'><!--✎-->" + SVG_EDIT + "</span>");
|
||||
var formTitle = getEditFormHTML("issue_subject");
|
||||
$('div.issue.details .subject').append(formTitle);
|
||||
$('div.issue.details div.subject').append(formTitle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,6 +201,7 @@ $('body').on('click', '.dynamicEditField .action.refuse', function(e){
|
||||
|
||||
/* Update whole .details block + history + form with global refresh button */
|
||||
$('body').on('click', '.refreshData', function(e){
|
||||
e.preventDefault();
|
||||
sendData();
|
||||
});
|
||||
|
||||
@ -235,7 +236,7 @@ let checkVersion = function(callback){
|
||||
${_TXT_CONFLICT_TITLE}
|
||||
<div class="conflict-details">
|
||||
<div class="conflict-journal">
|
||||
<p>${_TXT_CONFLICT_TXT}</p>
|
||||
<p><a href='#' onClick="window.location.href=window.location.href">${_TXT_CONFLICT_LINK}</a> <strong>${_TXT_CONFLICT_TXT}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>`);
|
||||
@ -322,6 +323,9 @@ var sendData = function(serialized_data){
|
||||
/* we update the history list */
|
||||
$('#tab-content-history').append($(parsed).find('#history .journal.has-details:last-child'));
|
||||
|
||||
/* Update lock version with last one */
|
||||
$('#issue_lock_version').val($(parsed).find("#issue_lock_version").val());
|
||||
|
||||
/* we init edit fields */
|
||||
cloneEditForm();
|
||||
|
||||
|
||||
@ -22,13 +22,13 @@ body.controller-issues.action-show .attribute .error {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
body.controller-issues.action-show div.issue.details .subject {
|
||||
body.controller-issues.action-show div.issue.details div.subject {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
body.controller-issues.action-show div.issue.details .subject .refreshData {
|
||||
body.controller-issues.action-show div.issue.details div.subject .refreshData {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ body.controller-issues.action-show div.issue.details .iconEdit {
|
||||
body.controller-issues.action-show div.issue.details.showPencil .iconEdit,
|
||||
body.controller-issues.action-show div.issue.details .attribute:hover .iconEdit,
|
||||
body.controller-issues.action-show div.issue.details .description:hover .iconEdit,
|
||||
body.controller-issues.action-show div.issue.details .subject:hover .iconEdit {
|
||||
body.controller-issues.action-show div.issue.details div.subject:hover .iconEdit {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ body.controller-issues.action-show .dynamicEditField select[multiple="multiple"]
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body.controller-issues.action-show .dynamicEditField select option[disabled="disabled"] {
|
||||
body.controller-issues.action-show .dynamicEditField select option[disabled="disabled"] {
|
||||
display:none;
|
||||
}
|
||||
|
||||
@ -148,11 +148,11 @@ body.controller-issues.action-show .dynamicEditField .check_box_group {
|
||||
/* MOBILE MEDIAQUERY */
|
||||
@media screen and (max-width: 899px){
|
||||
|
||||
body.controller-issues.action-show div.issue.details .subject {
|
||||
body.controller-issues.action-show div.issue.details div.subject {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body.controller-issues.action-show div.issue.details .subject .refreshData {
|
||||
body.controller-issues.action-show div.issue.details div.subject .refreshData {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -174,4 +174,4 @@ body.controller-issues.action-show .dynamicEditField .check_box_group {
|
||||
height: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
en:
|
||||
ide_txt_notice_conflict_title : "This issue has been updated by someone else while you are editing it."
|
||||
ide_txt_notice_conflict_text : "<a href='#' class='refreshData'>Refresh the current page</a> to get the updated data. <strong>Your current modifications will be lost</strong>"
|
||||
ide_txt_notice_conflict_link : "Refresh the current page to get the updated data."
|
||||
ide_txt_notice_conflict_text : "Your current modifications will be lost."
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
fr:
|
||||
ide_txt_notice_conflict_title : "La demande a été mise à jour pendant que vous la modifiez."
|
||||
ide_txt_notice_conflict_text : "<a href='#' class='refreshData'>Rafraichissez la page</a> pour voir une version à jour de la demande. <strong>Vos modifications actuelles seront perdues</strong>"
|
||||
ide_txt_notice_conflict_link : "Rafraichissez la page pour voir une version à jour de la demande."
|
||||
ide_txt_notice_conflict_text : "Vos modifications actuelles seront perdues"
|
||||
|
||||
@ -28,6 +28,7 @@ class DetailsIssueHooks < Redmine::Hook::ViewListener
|
||||
content = "<script>\n"
|
||||
content << " var _TXT_CONFLICT_TITLE = \"" + l(:ide_txt_notice_conflict_title) + "\";\n"
|
||||
content << " var _TXT_CONFLICT_TXT = \"" + l(:ide_txt_notice_conflict_text) + "\";\n"
|
||||
content << " var _TXT_CONFLICT_LINK = \"" + l(:ide_txt_notice_conflict_link) + "\";\n"
|
||||
content << "</script>\n"
|
||||
content << "<style>/* PRINT MEDIAQUERY */\n"
|
||||
content << "@media print {\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user