changement de candidat à l'investissement
This commit is contained in:
parent
8114c2409c
commit
be3087fff6
351 changed files with 359 additions and 497 deletions
|
|
@ -1,31 +0,0 @@
|
|||
var markdownize = function(content) {
|
||||
if (!content) return '';
|
||||
var html = content.split("\n").map($.trim).filter(function(line) {
|
||||
return line != "" ;
|
||||
}).join("\n");
|
||||
return toMarkdown(html);
|
||||
};
|
||||
|
||||
var htmlize = function(content) {
|
||||
return converter.makeHtml(content);
|
||||
};
|
||||
var updateHtml = function(jView,content) {
|
||||
if (markdownize(jView.html()) === content) {
|
||||
return;
|
||||
}
|
||||
var html = htmlize(content);
|
||||
jView.html(html);
|
||||
};
|
||||
|
||||
var updateMD = function(id,content) {
|
||||
if (!content) return jQuery('#'+id).val('') ;
|
||||
var markdown = markdownize(content);
|
||||
if (jQuery('#'+id).val() === markdown) {
|
||||
return;
|
||||
}
|
||||
jQuery('#'+id).val( markdown );
|
||||
};
|
||||
var onMDModified = ( function (event, data) {
|
||||
$('#Submit').addClass('success');
|
||||
updateMD(this.attributes["for"].value, data.content);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue