Download the PHP package ntlab/ntjs without Composer
On this page you can find all versions of the php package ntlab/ntjs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package ntjs
Short Description PHP Javascript Repository
License MIT
Homepage https://github.com/tohenk/php-ntjs
Informations about the package ntjs
Code Javascript Everywhere!
PHP-NTJS allows to dynamically manage your javascripts, stylesheets, and scripts so you can focus on your code. You can code your javascript using PHP class, or write directly in the PHP code, even on template.
JQuery and Bootstrap
Support for popular javascript like JQuery, Bootstrap, and FontAwesome.
CDN
To speed up your page, CDN can be enabled, PHP-NTJS will automatically do it for you. Just loads needed CDN information and assets will loaded from CDN.
Minified Output
On production, you can enable script output compression either by using JSMin or JShrink. On development, you can add script debug information to easily locate problematic code.
Integrate With Your Code
To integrate PHP-NTJS with your code, you need to enable Composer support in your project.
-
Require
ntlab/ntjs
and install dependencies. -
Clone the assets somewhere in your public web folder.
-
Create your script backend, which is responsible for collecting assets, it must be implements
NTLAB\JS\BackendInterface
or extendsNTLAB\JS\Backend
. An example of backend is available here. -
Create script dependency resolver, which us responsible for resolving namespace when the script referenced. It must be implements
NTLAB\JS\DependencyResolverInterface
. An example of resolver is available here. -
Optionally, create script compressor which implements
NTLAB\JS\CompressorInterface
. An example of compressor is available here. -
Connect it together, see example.
-
Start write your javascript code, see example.
- Add a helper to include stylesheets, javascripts and script to the HTML response, see this example and this example.
Available Scripts
This table below contains collection of scripts and its usage.
Script | Usage |
---|---|
Base64 |
Base64 encoding/decoding |
BigNumber |
Include BigNumber assets |
Bloodhound |
Include Bloodhound assets |
Bootstrap |
Include Bootstrap assets |
Bootstrap.DateTimePicker |
Include Bootstrap DateTimePicker assets |
Bootstrap.DateTimePickerLocale |
Include Bootstrap DateTimePicker locale assets |
Bootstrap.DateTimePickerLocaleCustom |
Include Bootstrap DateTimePicker custom locale assets |
Bootstrap.DateTimePickerPlugins |
Include Bootstrap DateTimePicker plugins assets |
Bootstrap.Dialog |
Bootstrap modal wrapper to create and handle dialog |
Bootstrap.Dialog.Confirm |
Bootstrap confirm modal |
Bootstrap.Dialog.Iframe |
Bootstrap iframe modal |
Bootstrap.Dialog.IframeLoader |
Bootstrap iframe loader helper |
Bootstrap.Dialog.IframeRedir |
Bootstrap redirection helper to allow an Ajax iframe to reload |
Bootstrap.Dialog.IframeResize |
Bootstrap iframe dialog auto-height |
Bootstrap.Dialog.Input |
Bootstrap input modal |
Bootstrap.Dialog.Message |
Bootstrap message modal |
Bootstrap.Dialog.Wait |
Bootstrap modal to show a waiting dialog while in progress |
Bootstrap.FormPost |
Handling form submission using ajax |
Bootstrap.Notify |
Handle notification either using Web Notification or Bootstrap Toast |
Bootstrap.Select |
Include Bootstrap Select assets |
Bootstrap.StarRating |
Include Bootstrap StarRating assets |
Bootstrap.StarRatingLocale |
Include Bootstrap StarRating locale assets |
Bootstrap.StarRatingTheme |
Include Bootstrap StarRating theme assets |
Bootstrap.StarRatingThemeFa |
Include Bootstrap StarRating FontAwesome theme assets |
Bootstrap.StarRatingThemeFas |
Include Bootstrap StarRating FontAwesome Solid theme assets |
Bootstrap.StarRatingThemeSvg |
Include Bootstrap StarRating SVG theme assets |
Bootstrap.StarRatingThemeUnicode |
Include Bootstrap StarRating Unicode theme assets |
Bootstrap.Theme.DefaultTheme |
Bootstrap default theme |
Bootstrap.Typeahead |
Include Bootstrap Typeahead assets |
BootstrapIcons |
Include Bootstrap Icons assets |
Bootswatch |
Include Bootswatch assets |
CanvasToBlob |
Include BlueImp Javascript-Canvas-to-Blob assets |
CKEditor |
Include CKEditor assets |
Cropper |
Include Cropper.js assets |
DataTables |
Include DataTables assets |
DataTablesAutoFill |
Include DataTables AutoFill extension assets |
DataTablesButtons |
Include DataTables Buttons extension assets |
DataTablesColReorder |
Include DataTables ColReorder extension assets |
DataTablesDateTime |
Include DataTables DateTime extension assets |
DataTablesFixedColumns |
Include DataTables FixedColumns extension assets |
DataTablesFixedHeader |
Include DataTables FixedHeader extension assets |
DataTablesI18N |
Include DataTables plugins I18N assets |
DataTablesKeyTable |
Include DataTables KeyTable extension assets |
DataTablesResponsive |
Include DataTables Responsive extension assets |
DataTablesRowGroup |
Include DataTables RowGroup extension assets |
DataTablesRowReorder |
Include DataTables RowReorder extension assets |
DataTablesScroller |
Include DataTables Scroller extension assets |
DataTablesSearchBuilder |
Include DataTables SearchBuilder extension assets |
DataTablesSearchPanes |
Include DataTables SearchPanes extension assets |
DataTablesSelect |
Include DataTables Select extension assets |
DataTablesStateRestore |
Include DataTables StateRestore extension assets |
FileUpload |
Include BlueImp JQuery-File-Upload assets |
FontAwesome |
Include FontAwesome assets |
Gallery |
Include BlueImp Gallery assets |
GoogleFonts |
Include Google Fonts assets |
Highcharts |
Include Highcharts assets |
Hotkeys |
Include JQuery Hotkeys assets |
Interact |
Include Interact assets |
JqGrid |
Include JqGrid assets |
JqGridDefault |
Provide Bootstrap Icons integration in JqGrid |
JQuery |
Include JQuery assets |
JQuery.AjaxData |
Ajax data loader |
JQuery.AjaxForm |
Provides form handling using Ajax |
JQuery.AjaxHelper |
Ajax request helper |
JQuery.Blob |
Retrieve content from an URL and transform it as blob for download |
JQuery.Callback.SetHtml |
A callback handler to set html content of an element |
JQuery.Callback.SetValue |
A callback handler to set the value of an element, such as an input tag |
JQuery.Checklist |
Allow to set checked or unchecked state of check boxes |
JQuery.DeleteConfirm |
Apply delete confirmation to element using attribute data-delete-confirm and do post request with its href |
JQuery.Dialog |
JQuery UI dialog wrapper to create and handling dialog |
JQuery.Dialog.Confirm |
JQuery UI confirm dialog |
JQuery.Dialog.Iframe |
JQuery UI iframe dialog |
JQuery.Dialog.IframeResize |
JQuery UI iframe dialog auto-height |
JQuery.Dialog.Input |
JQuery UI input dialog |
JQuery.Dialog.Message |
JQuery UI message dialog |
JQuery.Dialog.Wait |
JQuery UI wait dialog to show a waiting dialog while in progress |
JQuery.FileUpload |
Handle file upload using BlueImp File Upload |
JQuery.FileUploadDialog |
Provides file upload dialog either by statically include it in the document or dynamically loaded from an URL |
JQuery.FormPost |
Handling form submission using ajax |
JQuery.Gallery |
BlueImp gallery helper |
JQuery.ImageOp |
Provides image manipulation such as cropping, orientation, and others |
JQuery.ImageOpCrop |
Image crop operation |
JQuery.ImageOpHelper |
Provides all image operation |
JQuery.ImageOpOrientation |
Image orientation operation |
JQuery.ImageOpResize |
Image resize operation |
JQuery.ImageOpRotate |
Image rotate operation |
JQuery.ImageOpSave |
Image save operation |
JQuery.NS |
JQuery namespace helper, to avoid javascript function redefine |
JQuery.NumberFormat |
A JQuery number formatter helper |
JQuery.NumberFormatJQueryNumberFormatter |
Provide number formatting internal using JQuery Number Formatter |
JQuery.NumberFormatNumeralJs |
Provide number formatting internal using NumeralJs |
JQuery.Observer |
Observer and event handling |
JQuery.Overflow |
Document body overflow utility |
JQuery.PostErrorHelper |
Handling ajax form submission error |
JQuery.PostHandler |
Ajax POST handler |
JQuery.RemoveAnchor |
Replace html tag into span tag. e.g. an anchor tag |
JQuery.Resolver |
Javascript namespace resolver |
JQuery.ScrollTo |
Update window scroll top based on element |
JQuery.Spinner |
Include JQuery Spinner assets and provide a helper |
JQuery.Swipe |
Provide swipe support to an element |
JQuery.Typeahead |
A JQuery typeahead (auto complete) |
JQuery.UI |
JQuery UI base class for script that is depends on JQuery UI |
JQuery.UI.AutoComplete |
A JQuery UI auto complete |
JQuery.UI.FormPost |
Handling form submission using ajax |
JQuery.Util |
Common utility for javascript |
JsCookie |
Include JsCookie assets |
Jhashtable |
Include Jhashtable assets |
Jstree |
Include Jstree assets |
Keyboard |
Include an on-screen keyboard javascript and assets |
Leaflet |
Include Leaflet assets |
LoadImage |
Include BlueImp JavaScript-Load-Image assets |
MomentJs |
Include MomentJs assets |
NumberFormatter |
Include JQuery NumberFormatter assets |
NumeralJs |
Include NumeralJs assets |
Pdfjs |
Include PdfJs assets |
PdfjsViewer |
Include PdfJs Viewer assets |
Popper |
Include Popper.js assets |
ReCaptchaV2 |
Include Google ReCaptcha V2 assets |
ReCaptchaV3 |
Include Google ReCaptcha V3 assets |
SCEditor |
Include SCEditor assets |
SocketIO |
Include Socket.io assets |
Strophe |
Include Strophe assets |
Templates |
Include BlueImp JavaScript-Templates assets |
TinyMCE |
Include TinyMCE assets |
Live Demo
Live demo is available here.