Does not close the window

Does not close the window

heiheshangheiheshang Posts: 1Questions: 0Answers: 0
edited February 2015 in Free community support

Why editor.bubble does not close after ajax?

var editor;
    $(document).ready(function() {
      editor = new $.fn.dataTable.Editor({
       ajax : function ( method, url, data, success, error ) {
        $.ajax({
              url : '/personal/currency/',
              type : 'POST',
              data : $.extend(data,{"AJAX" : "Y"}),
              success : function(data,success,obj) {
                //editor.close();
                var table = $('#table_currency').dataTable();
                table.fnClearTable();
                table.fnAddData(data.data);
              } 
       })
       },
       formOptions: {
            bubble: {
                title: 'Edit',
                buttons: false,
                closeOnComplete:  true,
                submitOnReturn:   true,
               // submitOnBlur: true
            }
       },
       fields : [
         {label : 'Сумма', name : 'rmb'}
       ],
       table: "#table_currency",
       i18n : {
         remove: {
                button: "Удалить",
                title:  "Удалить",
                submit: "Удалить",
                confirm: {
                    _: "Вы действительно хотите удалить  %d ?",
                    1: "Вы действительно хотите удалить 1 строку ?"
                }
            },
         create: {
                button: "Добавить",
                title:  "Добавить",
                submit: "Добавить",
                confirm: {
                    _: "Вы действительно хотите удалить  %d ?",
                    1: "Вы действительно хотите удалить 1 строку ?"
                }
            }
      }
  });

  $('#table_currency').dataTable( {
                dom : "Tfrtip",
                columns : [{ data: null, defaultContent: '', orderable: false },
                {className : 'center_class',data : 'datadoc' },
                {className : 'right_class',data : 'nomerdoc'},
                {className : 'right_class',data : 'rmb',render : $.fn.dataTable.render.number( ',', '.', 0, '¥' )},
                {className : 'right_class',data : 'rub'},
                {className : 'center_class',data : 'proc',render : function(data,type,full,meta) { return data+'%';}},
                {className : 'right_class',data : 'status'}],
                language : {
                    loadingRecords: "Загрузка таблицы",
                    paginate: {
                    first:      "Первая",
                    previous:   "Предыдущая",
                    next:       "Следующая",
                    last:       "Последняя"
                 },
                        emptyTable : "Нет заявок на конвертацию",
                        infoEmpty : "Нечего показывать",
                        processing : "Загрузка ....",
                        search : "Поиск:",
                        zeroRecords : "Нет подходящих строк",
                        info : "Показано _START_ из _END_ всего _TOTAL_",
                        lengthMenu : 'Показать <select>'+
                        '<option value="10">10</option>'+
                        '<option value="20">20</option>'+
                        '<option value="30">30</option>'+
                        '<option value="40">40</option>'+
                        '<option value="50">50</option>'+
                        '<option value="-1">All</option>'+
                        '</select> записей'
              },
                "bJQueryUI"  : false,
                "processing" : true,
                bServerSide : true,
                "searching"  : false,
                "order": [[ 1, "desc" ]],
                "ajax": { 
                "url" : "/personal/currency/",
                        "type" :"POST",
                        "data" : {"AJAX" : "Y"}
                },
                tableTools: {
                   sRowSelect: "os",
                   sRowSelector: 'td:first-child',
                   aButtons: [
                     { sExtends: "editor_create", editor: editor,sButtonText : "Добавить",sTitle : 'Add'},
                     { sExtends: "editor_remove", editor: editor,sButtonText : "Удалить",sTitle : 'Remove'}
                    ]}
        });
    });

Replies

  • allanallan Posts: 61,824Questions: 1Answers: 10,131 Site admin

    What is the JSON data that is returned after the edit?

    Allan

This discussion has been closed.