How to create more types jeditable?

How to create more types jeditable?

JotapeJotape Posts: 5Questions: 0Answers: 0
edited July 2010 in General
Is there any way to create various types for jeditable without having to create more columns?
for example:
[code]
$('.edit-textfield').editable('http://www.google.com/', {
'type': 'text'
});

$('.edit-date').editable('date.html', {
'type' : 'datepicker'
});

$('.edit-textarea').editable('http://www.google.com/', {
'type': 'textarea'
});

$('.edit-select').editable('http://www.google.com/', {
'data': "{'true': 'Ativo', 'false': 'Inativo'}",
'type': 'select'
});

[/code]





[code]

var oTable;
$(document).ready(function() {
/* Init DataTables */
oTable = $('#example').dataTable( {
"sDom" : 'T<"clear">lfrtip', //BOTOES
"bProcessing" : false, //MOSTRA O PROCESSO
"bServerSide" : true, //*IMPORTANTE USAR TABELA.PHP
'bPaginate' : true, //*IMPORTANTE PAGINA

Replies

  • JotapeJotape Posts: 5Questions: 0Answers: 0
    Arquivo salva_news.php

    [code]
    <?php

    include "../../../config.php";

    if (isset($_POST['id'])) {
    $id = mysql_real_escape_string($_POST['id']);
    $value = utf8_decode($_POST['value']);
    $name = utf8_decode($_POST['name']);

    if ( $name == 'email' ) {

    $sSET = "SET NEWS_EMAIL = '".$value."' ";

    } elseif ( $name == 'status' ){

    $sSET = "SET NEWS_STATUS = '".$value."' ";

    }

    $query = "UPDATE rec_news_usuarios $sSET WHERE NEWS_ID = '".$id."'";


    mysql_query($query) or die(mysql_error());

    print utf8_encode($value);

    mysql_close();
    }
    ?>
    [/code]
This discussion has been closed.