Download the PHP package gianlucagiacometti/web-toolbox without Composer

On this page you can find all versions of the php package gianlucagiacometti/web-toolbox. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package web-toolbox

web-toolbox

This is a set of tools for web developers written with two concepts in mind: a gadget should do at least what it is supposed to do and, at the same time, it should do no more that what it is supposed to do.

In other words, keep it as simple as possible.

I, of course, use jQuery. I consider jQuery the most powerful JavaScript library ever, and I have never felt the need to re-invent the wheel.

I also appreciate Bootstrap, Bootstrap Icons and Font Awesome Free, and I consider them not only very useful web design tools, but also the very basis of modern web design.

Therefore, I conformed the layouts to the Bootstrap standards and I designed all my tools for an optional use of the two icon sets.

Requirements

jQuery is treated as a frontend dependency and is not installed through Composer. Install it with your frontend package manager, for example with Yarn.

Install

or

Then include the CSS and JS files you need in your web page.

Tools

jquery-bootstrap-select

jquery-bootstrap-select is a jQuery wrapper and extended rendering layer for Bootstrap Select.

It can be used as a light bridge to Bootstrap Select in normal mode, or as a local paged renderer for very large select elements.

The wrapper does not replace Bootstrap Select. It uses Bootstrap Select underneath and adds jQuery-style initialisation, helper methods, and large-list rendering modes.

Script order

Load jQuery first, then Bootstrap, then Bootstrap Select, then jquery-bootstrap-select.

Basic usage

Normal mode

Normal mode delegates rendering and behaviour to Bootstrap Select.

Large local select example

Paged mode keeps the full option source in memory and renders only the current page into Bootstrap Select.

This is useful when the full native select contains many options, but rendering all visual option rows at once would make the dropdown heavy or slow.

Paged mode adds a compact pager above and below the option list:

The dropdown keeps its current placement while paging. If Bootstrap opens the dropdown above the field because the select is near the bottom of the page, the dropdown stays above while moving between pages.

Paged mode also applies a default 300px dropdown width so large lists do not become unnecessarily wide. You can widen it, narrow it, or disable the fixed width with data-bs-select-paged-dropdown-width or the pagedDropdownWidth JavaScript option.

Render modes

Mode Description
normal Delegates rendering and behaviour to Bootstrap Select.
paged Keeps the full option source in memory and renders only the current page.
remote Reserved for future remote data loading.

Data attributes

Attribute Description
data-bs-select-huge="true" Enables huge-select handling. If no render mode is provided, paged mode is used.
data-bs-select-page-size="50" Sets how many options are rendered per page.
data-bs-select-render-mode="paged" Sets the render mode. Accepted values are normal, paged, and remote.
data-bs-select-paged-dropdown-width="300px" Sets the dropdown width in paged mode. Use false to disable the default fixed width.

JavaScript options

Options can also be passed directly when initialising the plugin.

Option Default Description
huge false Enables huge-select handling.
pageSize 50 Number of options rendered per page in paged mode.
renderMode "normal" Render mode. Accepted values are normal, paged, and remote.
destroyBootstrapSelect true Allows the wrapper to destroy and rebuild the underlying Bootstrap Select instance when needed.
pagedListMaxHeight "300px" Maximum height of the paged option list before internal scrolling is used.
pagedDropdownWidth "300px" Width applied to the dropdown in paged mode. Use false to leave the dropdown width untouched.

Methods

The plugin follows the usual jQuery plugin style.

value()

Gets the current value.

value(values, parameters)

Sets the current value by delegating to Bootstrap Select.

For multiple selects:

sort(parameters)

Sorts the options.

In normal mode, sorting is delegated to Bootstrap Select.

In paged mode, the wrapper sorts the local source options and rebuilds the current page.

disabled(status)

Sets the select as disabled or enabled.

readonly(status)

Sets the select as readonly or not readonly.

mode()

Returns the current render mode.

isHuge()

Returns whether huge-select handling is enabled.

pageSize()

Returns the configured page size.

currentPageNumber()

Returns the current page number, starting from 1.

pages()

Returns the total number of pages.

previousPage()

Moves to the previous page.

nextPage()

Moves to the next page.

filter(search)

Filters local source options in paged mode and rebuilds the rendered page.

filterValues(values)

Restricts local source options in paged mode by exact option value without changing the complete cached source.

A single value or an array of values is accepted:

The value filter is combined with the existing text filter, pagination, sorting and refresh behaviour.

If the current selection is not part of the allowed value set, the selection is cleared and the normal change event is dispatched. Programmatic value() calls also respect the active value filter and cannot select an option which is currently excluded.

Passing null, or calling the method without an argument, restores the complete paged source:

filterValues() is available only in paged mode. In normal mode the wrapper continues to delegate option management to Bootstrap Select.

Notes on paged mode

Paged mode is designed for large local lists.

The original options are cloned and kept in memory. Only the current page is written into the native select and rendered by Bootstrap Select.

The filter() method applies text filtering to the cached source. The filterValues() method applies an exact-value restriction to the same cached source. When both are active, only options matching both filters are rendered.

Current limits:

jquery-bootstrap-pickadate

jquery-bootstrap-pickadate is a jQuery wrapper for Bootstrap Pickadate.

The wrapper does not replace Bootstrap Pickadate. It keeps Bootstrap Pickadate as the underlying plain JavaScript component and adds jQuery-style initialisation, helper methods, safe refresh/destroy calls, and framework-friendly helpers for dynamically injected HTML.

No companion CSS file is required. Styling remains provided by Bootstrap Pickadate.

Script order

Load jQuery first, then Bootstrap, then Bootstrap Pickadate, then any locale files, then jquery-bootstrap-pickadate.

Basic usage

Same-input interval example

JavaScript options

Options are passed directly to Bootstrap Pickadate when the underlying component is created.

Option Default Description
destroyBootstrapPickadate true Allows the wrapper to destroy the underlying Bootstrap Pickadate instance when destroy() or reinitialise() is called.

Methods

The plugin follows the usual jQuery plugin style.

instanceObject()

Returns the underlying Bootstrap Pickadate instance.

refresh()

Refreshes the underlying picker from the current data attributes and state.

refreshLocale(locale)

Refreshes the picker locale.

reinitialise(options)

Destroys and creates the picker again.

destroy()

Destroys the underlying picker and removes the jQuery wrapper data.

value()

Gets the current ISO value.

For interval mode, the returned value is the combined ISO interval value:

value(value)

Sets the current value.

clear()

Clears the picker value.

today()

Selects today when it is selectable.

open(), close(), toggle()

Controls the picker dropdown.

setMin(value) and setMax(value)

Sets runtime minimum and maximum selectable dates.

setViewMonth(month) and setViewYear(year)

Changes the visible month or year without changing the selected value.

Month numbers are zero-based, following JavaScript Date month indexes.

moveMonth(delta) and moveYear(delta)

Moves the visible calendar view.

Framework helpers

The wrapper exposes helper methods for dynamically injected pages, components, and modals.

This is useful after AJAX-rendered HTML has been inserted into the page:

After a website language change:

jquery-toast

I decided to write a simple function on purpose. No need for a jQuery plugin, at least so far.

Usage

or, since the function returns a jQuery object:

Basic usage examples

NOTE: hasBootstrapIcons: true is the default setting.

NOTE: message is a synonym of text.

Toast type

type can be any string.

If the type value is one of the following: "success", "info", "warning" or "error", a default colour is automatically set for the title, the header background, and, if there is one, the header icon.

These default colours correspond to the equivalent Bootstrap colours for the same message types.

Escaping untrusted text

jquery-toast allows HTML in title and text.

When you need to display untrusted user input, escape it first:

Toast options

Option details

Notes

Use the tools independently. Include only the files you need for the specific page or project.

jquery-bootstrap-select requires Bootstrap Select.

jquery-bootstrap-pickadate requires Bootstrap Pickadate.

jquery-toast only requires jQuery and Bootstrap-compatible markup/styles.


All versions of web-toolbox with dependencies

PHP Build Version
Package Version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gianlucagiacometti/web-toolbox contains the following files

Loading the files please wait ...