Fix variable width snipts.
parent
781d5a3331
commit
4d63265427
File diff suppressed because one or more lines are too long
|
@ -945,11 +945,11 @@ article.snipt {
|
|||
font: normal 12px/16px $Consolas;
|
||||
margin: 0;
|
||||
min-height: 220px;
|
||||
min-width: 589px;
|
||||
overflow-x: auto;
|
||||
padding: 4px 0 4px 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
width: 589px;
|
||||
@include border-radius(0);
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
|
|
|
@ -17,6 +17,12 @@ var snipt = {
|
|||
jQuery(function($) {
|
||||
var SiteView = snipt.module('site').SiteView;
|
||||
window.site = new SiteView();
|
||||
|
||||
var $pres = $('td.code pre');
|
||||
$pres.each(function(i) {
|
||||
var pre = $pres.eq(i);
|
||||
pre.width(pre.parents('section.code').width());
|
||||
});
|
||||
});
|
||||
|
||||
// Angular app init.
|
||||
|
|
|
@ -506,6 +506,12 @@
|
|||
$('button.save, button.save-and-close, button.delete, button.cancel',
|
||||
window.site.$main_edit).removeAttr('disabled');
|
||||
that.model.set('new_from_js', false);
|
||||
|
||||
var $pres = $('td.code pre');
|
||||
$pres.each(function(i) {
|
||||
var pre = $pres.eq(i);
|
||||
pre.width(pre.parents('section.code').width());
|
||||
});
|
||||
},
|
||||
error: function(model, response) {
|
||||
if (response.responseJSON) {
|
||||
|
|
Loading…
Reference in New Issue