mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +08:00
Merge pull request #5114 from artoscinote/ma_SCI_8109
Fix protocol link and step delete modal styling [SCI-8109]
This commit is contained in:
commit
bc6afa5efa
4 changed files with 16 additions and 9 deletions
|
@ -38,19 +38,19 @@ function initEditProtocolDescription() {
|
||||||
function initLinkUpdate() {
|
function initLinkUpdate() {
|
||||||
var modal = $('#confirm-link-update-modal');
|
var modal = $('#confirm-link-update-modal');
|
||||||
var modalTitle = modal.find('.modal-title');
|
var modalTitle = modal.find('.modal-title');
|
||||||
var modalBody = modal.find('.modal-body');
|
var modalMessage = modal.find('.modal-body .message');
|
||||||
var updateBtn = modal.find(".modal-footer [data-action='submit']");
|
var updateBtn = modal.find(".modal-footer [data-action='submit']");
|
||||||
$("[data-action='unlink'], [data-action='revert'], [data-action='update-parent'], [data-action='update-self']")
|
$("[data-action='unlink'], [data-action='revert'], [data-action='update-parent'], [data-action='update-self']")
|
||||||
.on('ajax:success', function(e, data) {
|
.on('ajax:success', function(e, data) {
|
||||||
modalTitle.html(data.title);
|
modalTitle.html(data.title);
|
||||||
modalBody.html(data.message);
|
modalMessage.html(data.message);
|
||||||
updateBtn.text(data.btn_text);
|
updateBtn.text(data.btn_text);
|
||||||
modal.attr('data-url', data.url);
|
modal.attr('data-url', data.url);
|
||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
modal.on('hidden.bs.modal', function() {
|
modal.on('hidden.bs.modal', function() {
|
||||||
modalBody.html('');
|
modalMessage.html('');
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!$._data(updateBtn[0], 'events')) {
|
if (!$._data(updateBtn[0], 'events')) {
|
||||||
|
|
|
@ -670,8 +670,14 @@
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#confirm-link-update-modal {
|
#confirm-link-update-modal,
|
||||||
|
.delete-steps-modal {
|
||||||
|
.modal-body p {
|
||||||
|
margin: 1.2em 0;
|
||||||
|
}
|
||||||
|
|
||||||
.warning {
|
.warning {
|
||||||
margin: 0 15px 15px;
|
font-weight: bold;
|
||||||
|
margin-bottom: 1.2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>{{ i18n.t('protocols.steps.modals.delete_steps.description_1')}}</p>
|
<p>{{ i18n.t('protocols.steps.modals.delete_steps.description_1')}}</p>
|
||||||
<p><b>{{ i18n.t('protocols.steps.modals.delete_steps.description_2')}}</b></p>
|
<p class="warning">{{ i18n.t('protocols.steps.modals.delete_steps.description_2')}}</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-secondary" @click="cancel">{{ i18n.t('general.cancel') }}</button>
|
<button class="btn btn-secondary" @click="cancel">{{ i18n.t('general.cancel') }}</button>
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
<h4 class="modal-title" id="confirm-link-update-modal-label"></h4>
|
<h4 class="modal-title" id="confirm-link-update-modal-label"></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body"></div>
|
<div class="modal-body">
|
||||||
<h3 class="warning"><%= t('my_modules.protocols.confirm_link_update_modal.warning') %></h3>
|
<p class="message"></p>
|
||||||
|
<p class="warning"><%= t('my_modules.protocols.confirm_link_update_modal.warning') %></p>
|
||||||
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t("general.cancel") %></button>
|
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t("general.cancel") %></button>
|
||||||
<button type="button" class="btn btn-success" data-action="submit"></button>
|
<button type="button" class="btn btn-success" data-action="submit"></button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue