Jump to content


datatables (delete) disable noty.js

datatables delete jquery noty

  • Please log in to reply
6 replies to this topic

#1 Charles A.

Charles A.

    Member

  • Members
  • PipPip
  • 17 posts

Posted 05 June 2013 - 02:49 PM

Hi!

I would like to disable noty.js when deleting rows and use the "normal" messages on delete success... like the image below:

 

delete.png

 

I have all the success messages "normal" but DELETE uses noty.js (http://needim.github.io/noty/) //

 

Any ideas?

 

Thanks!!

 

Attached Thumbnails

  • delete.png


#2 Charles A.

Charles A.

    Member

  • Members
  • PipPip
  • 17 posts

Posted 07 June 2013 - 04:01 PM

Hi! No ideas about this? Thanks!!!



#3 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 09 June 2013 - 05:38 AM

If I am not mistaken, datatables theme doesn't use noty.js. Does it?

 

Check under assets/grocery_crud/themes/datatables\views on the file list_template.php what is being defined there.


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#4 Charles A.

Charles A.

    Member

  • Members
  • PipPip
  • 17 posts

Posted 09 June 2013 - 07:19 PM

Hi.... the file noty.js is present in there.. take a look:

 

 

list_template.php >>>>

<?php


$this->set_css($this->default_theme_path.'/datatables/css/demo_table_jui.css');
$this->set_css($this->default_css_path.'/ui/simple/'.grocery_CRUD::JQUERY_UI_CSS);
$this->set_css($this->default_theme_path.'/datatables/css/datatables.css');
$this->set_css($this->default_theme_path.'/datatables/css/jquery.dataTables.css');
$this->set_css($this->default_theme_path.'/datatables/extras/TableTools/media/css/TableTools.css');
$this->set_js_lib($this->default_javascript_path.'/'.grocery_CRUD::JQUERY);


$this->set_js_lib($this->default_javascript_path.'/jquery_plugins/jquery.noty.js');
$this->set_js_lib($this->default_javascript_path.'/jquery_plugins/config/jquery.noty.config.js');
$this->set_js_lib($this->default_javascript_path.'/common/lazyload-min.js');


if (!$this->is_IE7()) {
$this->set_js_lib($this->default_javascript_path.'/common/list.js');
}


$this->set_js_lib($this->default_javascript_path.'/jquery_plugins/ui/'.grocery_CRUD::JQUERY_UI_JS);
$this->set_js_lib($this->default_theme_path.'/datatables/js/jquery.dataTables.min.js');
$this->set_js($this->default_theme_path.'/datatables/js/datatables-extras.js');
$this->set_js($this->default_theme_path.'/datatables/js/datatables.js');
$this->set_js($this->default_theme_path.'/datatables/extras/TableTools/media/js/ZeroClipboard.js');
$this->set_js($this->default_theme_path.'/datatables/extras/TableTools/media/js/TableTools.min.js');


/** Fancybox */
$this->set_css($this->default_css_path.'/jquery_plugins/fancybox/jquery.fancybox.css');
$this->set_js($this->default_javascript_path.'/jquery_plugins/jquery.fancybox-1.3.4.js');
$this->set_js($this->default_javascript_path.'/jquery_plugins/jquery.easing-1.3.pack.js');
?>


#5 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 09 June 2013 - 10:19 PM

This list_template.php you are having belongs to the unstable 1.4 development version.

This is not ready for production and we do not provide support to this version since it is under development!

 

Please use the latest stable version 1.3.3.


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#6 Charles A.

Charles A.

    Member

  • Members
  • PipPip
  • 17 posts

Posted 10 June 2013 - 02:15 AM

Thanks for your reply!

Anyway in order to fix this, I changed the code inside the themes/datatables/js/datatables.js (delete_row() function) replacing the line

success_message(data.success_message);

with this

 

$('#list-report-success').slideUp('fast');               
$('#list-report-success').html(data.success_message);
$('#list-report-success').slideDown('normal');

:)

 

Another possible way is just to modify themes/datatables/js/datatables.js (delete_row() function) replacing the line

success_message(data.success_message);

with...

form_success_message(data.success_message);

and change in the file assets/grocery_crud/js/jquery_pluins/config/jquery.noty.config.js

replacing the "report-success" div reference with "list-report-success" ...

 

But with this last method, on form validation (add/edit), you'll not get the error messages at the bottom of the form; only red border to the inputs....

 

;)

 

 

 

 



#7 mascha

mascha

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 22 October 2017 - 07:26 AM

I have a similar error, but i use theme flexygrid







Also tagged with one or more of these keywords: datatables, delete, jquery, noty

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users