chg(core): optimization many marked edit ui

This commit is contained in:
OldHawk
2017-12-10 17:04:14 +08:00
parent 6fec4a314d
commit 92a46e06bf
5 changed files with 32 additions and 5 deletions

View File

@@ -386,12 +386,10 @@
e.setContent(m.desc);
var elei = $('#' + e.$editor.attr('id') + ' .md-input');
mtDebug.info(elei);
angular.element(elei).css('height', '200px');
angular.element(elei).css('color', '#333');
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
mtDebug.info(ele);
angular.element(ele).addClass('text-right');
angular.element(ele[0].childNodes[0]).addClass('btn-width-80');
@@ -405,6 +403,14 @@
});
ele.append(cbtn);
$compile(ele.contents())($scope);
},
onPreview: function (e) {
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
ele.css('display', 'none');
},
onPreviewEnd: function (e) {
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
ele.css('display', 'block');
}
});
};

View File

@@ -141,7 +141,6 @@
angular.element(elei).css('color', '#333');
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
mtDebug.info(ele);
angular.element(ele).addClass('text-right');
angular.element(ele[0].childNodes[0]).addClass('btn-width-80');
@@ -155,6 +154,14 @@
});
ele.append(cbtn);
$compile(ele.contents())($scope);
},
onPreview: function (e) {
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
ele.css('display', 'none');
},
onPreviewEnd: function (e) {
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
ele.css('display', 'block');
}
});
};

View File

@@ -569,12 +569,14 @@
.md-editor {
background-color: #f5f5f5;
textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #fff;
min-height: 300px;
max-height: 800px;
padding: 5px;
}
.md-preview {
color: #333 !important;
padding: 5px;
border-bottom: none;
img {

View File

@@ -1103,12 +1103,10 @@
e.setContent(r.resource_detail_info.overview);
var elei = $('#' + e.$editor.attr('id') + ' .md-input');
mtDebug.info(elei);
angular.element(elei).css('height', '550px');
angular.element(elei).css('color', '#333');
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
mtDebug.info(ele);
angular.element(ele).addClass('text-right');
angular.element(ele[0].childNodes[0]).addClass('btn-width-80');
@@ -1122,6 +1120,14 @@
});
ele.append(cbtn);
$compile(ele.contents())($scope);
},
onPreview: function (e) {
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
ele.css('display', 'none');
},
onPreviewEnd: function (e) {
var ele = $('#' + e.$editor.attr('id') + ' .md-footer');
ele.css('display', 'block');
}
});
};

View File

@@ -75,6 +75,12 @@
});
$('.md-footer').append(cbtn);
$compile($('.md-footer').contents())($scope);
},
onPreview: function (e) {
$('.md-footer').css('display', 'none');
},
onPreviewEnd: function (e) {
$('.md-footer').css('display', 'block');
}
});
};