Download the PHP package model/popup without Composer

On this page you can find all versions of the php package model/popup. 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 popup

model/popup

A simple JavaScript popup.

This is the ModEl 4 port of the legacy Popup module. It ships the popup's CSS/JS as an asset library declared through an AssetsProvider, so model/assets discovers and serves them automatically — no manual file inclusion needed.

Unlike the v3 module, it has no hard dependency on the legacy FrontEnd module: the helpers it used to borrow from it (_, ajax, loading, jsFill, changedHtml) are now implemented internally, and the FrontEnd implementations are used instead whenever they happen to be present.

Installation

Enabling the assets

The library is registered under the name popup but is not auto-enabled. Enable it (typically from a controller's init) wherever a page uses the popup:

This adds style.css (in the head) and js.js (in the foot) to the asset render list.

Usage

There can be only one popup open at a time. Open it with zkPopup:

It returns a Promise, resolved once the popup is fully open (and its content loaded).

Content

The first argument can take three different forms:

Any <script> tag contained in the loaded HTML is executed.

Options

The second argument is an optional object of options:

The defaults can be changed globally by editing zkPopupDefaultOptions.

Closing the popup

The popup is also closed by pressing Esc or by clicking the cover (unless closeOnCoverClick is false) or the close button. Pass true to skip the onClose callback (and thus close the popup unconditionally): zkPopupClose(true).

Resizing the popup

zkPopupFill(), called with no arguments, re-calculates the size and the position of the popup against its current content. It is called automatically on window resize and, if observe-content is on, whenever the content changes; you only need it if you disabled the observer and changed the content by hand.


All versions of popup with dependencies

PHP Build Version
Package Version
Requires model/assets Version ^0.4.0
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 model/popup contains the following files

Loading the files please wait ...