Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 5206 | Rev 5318 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5206 Rev 5312
Línea 100... Línea 100...
100
        };
100
        };
Línea 101... Línea 101...
101
        
101
        
102
        var allowEdit   = $allowEdit;
102
        var allowEdit   = $allowEdit;
Línea 103... Línea 103...
103
        var allowDelete = $allowDelete;
103
        var allowDelete = $allowDelete;
104
        
104
        
105
        var gridTable = $('#gridTable').dataTable( {
105
        /* var gridTable = $('#gridTable').dataTable( {
106
            'processing': true,
106
            'processing': true,
107
            'serverSide': true,
107
            'serverSide': true,
108
            'searching': true,
108
            'searching': true,
Línea 163... Línea 163...
163
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
163
                    'sSortDescending': ':LABEL_DATATABLE_SSORTDESCENDING'
164
                },
164
                },
165
            },
165
            },
166
            'drawCallback': function( settings ) {
166
            'drawCallback': function( settings ) {
167
                NProgress.done();
167
                NProgress.done();
168
                $('button.btn-delete').confirmation({
-
 
169
                    rootSelector: 'button.btn-delete',
-
 
170
                    title : 'LABEL_ARE_YOU_SURE',
-
 
171
                    singleton : true,
-
 
172
                    btnOkLabel: 'LABEL_YES',
-
 
173
                    btnCancelLabel: 'LABEL_NO',
-
 
174
                    onConfirm: function(value) {
-
 
175
                        action = $(this).data('href');
-
 
176
                        NProgress.start();
-
 
177
                        $.ajax({
-
 
178
                            'dataType'  : 'json',
-
 
179
                            'accept'    : 'application/json',
-
 
-
 
168
                
180
                            'method'    : 'post',
-
 
181
                            'url'       :  action,
-
 
182
                        }).done(function(response) {
-
 
183
                            if(response['success']) {
-
 
184
                                $.fn.showSuccess(response['data']);
-
 
185
                                gridTable.api().ajax.reload(null, false);
-
 
186
                            } else {
-
 
187
                                $.fn.showError(response['data']);
-
 
188
                            }
-
 
189
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
190
                            $.fn.showError(textStatus);
-
 
191
                        }).always(function() {
-
 
192
                            NProgress.done();
-
 
193
                        });
-
 
194
                    },
-
 
195
                });
-
 
196
            },
169
            },
197
            'aoColumns': [
170
            'aoColumns': [
198
                { 'mDataProp': 'name' },
171
                { 'mDataProp': 'name' },
199
    	        { 'mDataProp': 'minimum_no_of_employee'},
172
    	        { 'mDataProp': 'minimum_no_of_employee'},
200
                { 'mDataProp': 'maximum_no_of_employee'},
173
                { 'mDataProp': 'maximum_no_of_employee'},
Línea 240... Línea 213...
240
                        }
213
                        }
241
                        return s;
214
                        return s;
242
                    }
215
                    }
243
                }
216
                }
244
            ],
217
            ],
245
        });
218
        }); */
Línea 246... Línea 219...
246
        
219
        
247
        
220
        
248
        var validator = $('#form').validate({
221
        /* var validator = $('#form').validate({
249
            debug: true,
222
            debug: true,
250
            onclick: false,
223
            onclick: false,
251
            onkeyup: false,
224
            onkeyup: false,
Línea 299... Línea 272...
299
                return false;
272
                return false;
300
            },
273
            },
301
            invalidHandler: function(form, validator) {
274
            invalidHandler: function(form, validator) {
Línea 302... Línea 275...
302
            
275
            
303
            }
276
            }
-
 
277
        }); */
-
 
278
 
-
 
279
        $('button.btn-delete').confirmation({
-
 
280
                    rootSelector: 'button.btn-delete',
-
 
281
                    title : 'LABEL_ARE_YOU_SURE',
-
 
282
                    singleton : true,
-
 
283
                    btnOkLabel: 'LABEL_YES',
-
 
284
                    btnCancelLabel: 'LABEL_NO',
-
 
285
                    onConfirm: function(value) {
-
 
286
                        action = $(this).data('href');
-
 
287
                        NProgress.start();
-
 
288
                        $.ajax({
-
 
289
                            'dataType'  : 'json',
-
 
290
                            'accept'    : 'application/json',
-
 
291
                            'method'    : 'post',
-
 
292
                            'url'       :  action,
-
 
293
                        }).done(function(response) {
-
 
294
                            if(response['success']) {
-
 
295
                                $.fn.showSuccess(response['data']);
-
 
296
                                gridTable.api().ajax.reload(null, false);
-
 
297
                            } else {
-
 
298
                                $.fn.showError(response['data']);
-
 
299
                            }
-
 
300
                        }).fail(function( jqXHR, textStatus, errorThrown) {
-
 
301
                            $.fn.showError(textStatus);
-
 
302
                        }).always(function() {
-
 
303
                            NProgress.done();
-
 
304
                        });
-
 
305
                    },
Línea 304... Línea 306...
304
        });
306
                });
305
        
307
        
306
        $('body').on('click', 'button.btn-refresh', function(e) {
308
        $('body').on('click', 'button.btn-refresh', function(e) {
307
            e.preventDefault();
309
            e.preventDefault();