Supporting Notes - dioscouri/f3-lib GitHub Wiki
Notes
Now, we can support notes out of scope. Here are only changes you have to make to your code:
- Your theme has to load js/notes.js file (path to this file is automatically added to f3-minify by default)
- Add trait \Dsc\Tratis\Models\Notes to your model
- Modify your beforeSave() method and add this line of code $this->beforeSaveNotes();
- Notes require BootBox JS loaded
- Render HTML for notes using this line of code $this->renderLayout('SystemTheme/Views::notes/notes.php');
- Assign JS code to submit button using this line of code executed right after DOM is ready Notes.bindSaveButton( 'selector-to-your-submit-button' );