Skip to content

Commit f1e87eb

Browse files
committed
Minor fixes on field stub
1 parent 0099aa8 commit f1e87eb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Console/stubs/field.stub

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{{-- CUSTOM CSS --}}
2323
@push('crud_fields_styles')
2424
{{-- How to load a CSS file? --}}
25-
@loadOnce(asset('dummyFieldStyle.css'))
25+
@loadOnce('dummyFieldStyle.css')
2626

2727
{{-- How to add some CSS? --}}
2828
@loadOnce('dummy_field_style')
@@ -37,16 +37,18 @@
3737
{{-- CUSTOM JS --}}
3838
@push('crud_fields_scripts')
3939
{{-- How to load a JS file? --}}
40-
@loadOnce(asset('dummyFieldScript.js'))
40+
@loadOnce('dummyFieldScript.js')
4141

4242
{{-- How to add some JS to the field? --}}
4343
@loadOnce('bpFieldInitDummyFieldElement')
44+
<script>
4445
function bpFieldInitDummyFieldElement(element) {
4546
// this function will be called on pageload, because it's
4647
// present as data-init-function in the HTML above; the
4748
// element parameter here will be the jQuery wrapped
4849
// element where init function was defined
4950
console.log(element.val());
5051
}
52+
</script>
5153
@endLoadOnce
5254
@endpush

0 commit comments

Comments
 (0)