Browse Source

add text formatting to modal inline warning and tune its CSS

readme-update
Simon Grim 8 years ago
parent
commit
d971fb7a51
  1. 2
      css/style.css
  2. 11
      js/interface_common.js
  3. 2
      theme_calm/css/style.css
  4. 2
      theme_nin/css/style.css

2
css/style.css

@ -1661,11 +1661,13 @@ ol.toptrends-list {
.inline-warn .text { .inline-warn .text {
font-size: 0.8em; font-size: 0.8em;
text-align: center;
} }
.inline-warn .options { .inline-warn .options {
font-size: 0.8em; font-size: 0.8em;
text-align: right; text-align: right;
margin-top: 4px;
} }
/************************************* /*************************************

11
js/interface_common.js

@ -63,14 +63,15 @@ function openModal(modal) {
else else
modal.content = modal.self.find('.modal-content'); modal.content = modal.self.find('.modal-content');
if (modal.warn && modal.warn.name && modal.warn.text) if (modal.warn && modal.warn.name && modal.warn.text) {
twister.tmpl.modalComponentWarn.clone(true) var elem = twister.tmpl.modalComponentWarn.clone(true)
.attr('data-warn-name', modal.warn.name) .attr('data-warn-name', modal.warn.name)
.toggle(!$.Options.get('skipWarn' + modal.warn.name)) .toggle(!$.Options.get('skipWarn' + modal.warn.name))
.insertBefore(modal.content)
.find('.text').html(modal.warn.text)
.siblings('.options').find('.never-again + span').text(polyglot.t('do_not_show_it_again'))
; ;
fillElemWithTxt(elem.find('.text'), modal.warn.text, {markout: 'apply'});
elem.find('.options .never-again + span').text(polyglot.t('do_not_show_it_again'));
elem.insertBefore(modal.content);
}
modal.self.appendTo('body').fadeIn('fast'); // FIXME maybe it's better to append it to some container inside body modal.self.appendTo('body').fadeIn('fast'); // FIXME maybe it's better to append it to some container inside body

2
theme_calm/css/style.css

@ -2034,11 +2034,13 @@ textarea.splited-post {
.inline-warn .text { .inline-warn .text {
font-size: 0.8em; font-size: 0.8em;
text-align: center;
} }
.inline-warn .options { .inline-warn .options {
font-size: 0.8em; font-size: 0.8em;
text-align: right; text-align: right;
margin-top: 4px;
} }
/************************************* /*************************************

2
theme_nin/css/style.css

@ -2598,11 +2598,13 @@ ol.toptrends-list a:hover {
.inline-warn .text { .inline-warn .text {
font-size: 0.8em; font-size: 0.8em;
text-align: center;
} }
.inline-warn .options { .inline-warn .options {
font-size: 0.8em; font-size: 0.8em;
text-align: right; text-align: right;
margin-top: 4px;
} }
/************************************* /*************************************

Loading…
Cancel
Save