Fast reply... Qua 29 Out 2014 - 18:29
Editing test 07
JS
- Código:
jQuery.get("/post?p=" + post_ID + "&mode=editpost", function(data) {
var subject = jQuery(data).find('input[name="subject"]').val(), // Faz-se necessário obter o título (subject) do tópico!
message = jQuery(data).find('#text_editor_textarea[name="message"]').val(), // Aqui o conteúdo do tópico.
lt = jQuery(data).find('input[name="lt"]').val();
var oTarget = jQuery(data).find('input[name="auth[]"]'), // Aqui nós iremos obter as permissões de postagem;
auth1 = jQuery(oTarget[0]).val(), // Permissão 01
auth2 = jQuery(oTarget[1]).val(); // Permissão 02
jQuery.post("/post", {
p: post_ID,
lt: lt,
auth: [auth2, auth2],
mode: 'editpost',
subject: subject,
message: message,
edit_reason: '',
attach_sig: 1,
notify: 0,
post: 1
}).done(function() {
/* */
}).fail(function() {
/* */
});
});
Test...
JS