⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

datatables (delete) disable noty.js



Charles A.

Charles A.
  • profile picture
  • Member

Posted 05 June 2013 - 14: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:

 

[sharedmedia=core:attachments:568]

 

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

 

Any ideas?

 

Thanks!!

 


Charles A.

Charles A.
  • profile picture
  • Member

Posted 07 June 2013 - 16:01 PM

Hi! No ideas about this? Thanks!!!


davidoster

davidoster
  • profile picture
  • Member

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.


Charles A.

Charles A.
  • profile picture
  • Member

Posted 09 June 2013 - 19: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');
?>

davidoster

davidoster
  • profile picture
  • Member

Posted 09 June 2013 - 22: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.


Charles A.

Charles A.
  • profile picture
  • Member

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....

 

;)

 

 

 

 


mascha

mascha
  • profile picture
  • Member

Posted 22 October 2017 - 07:26 AM

I have a similar error, but i use theme flexygrid