kartik-v/yii2-popover-x An extended bootstrap 3.0 popover widget which combines both the bootstrap popover and modal features and includes various new styling enhancements.

extendedbootstrapjquerypopoverpopover-xmodalmodal-popover

Krajee Logo
yii2-popover-x Donate

Stable Version Untable Version License Total Downloads Monthly Downloads Daily Downloads

An extended popover widget for Yii Framework 2 based on the bootstrap-popover-x jQuery plugin by Krajee. This plugin is an extended popover JQuery plugin which combines both the popover and bootstrap modal features and includes various new styling enhancements. This widget can be setup just like the builtin yii\bootstrap\Modal, with some additional enhancements.

NOTE: Refer the CHANGE LOG for details on changes to various releases.

Features

The plugin offers these enhanced features:

  • The extended popover can be rendered just like a bootstrap modal dialog with the bootstrap popover styling. Since the plugin extends the bootstrap modal, all features of the bootstrap modal and its methods are also available.
  • Adds a popover footer along with header. Configuration of the HTML content for the popover is much easier, just like a bootstrap modal.
  • Specially styles and spaces out bootstrap buttons added in popover footer.
  • Add a close icon/button to a popover window.
  • Configure various prebuilt styles/templates. In addition to a default (grey), the bootstrap 3 contextual color styles of primary, info, success, danger, and warning can be used.
  • Control popover placements with respect to the target element. The plugin supports 19 different placement options:
    • auto
    • auto-left
    • auto-right
    • auto-top
    • auto-bottom
    • horizontal
    • vertical
    • right
    • left
    • top
    • bottom
    • top top-left
    • top top-right
    • bottom bottom-left
    • bottom bottom-right
    • left left-top
    • left left-bottom
    • right right-top
    • right right-bottom
  • Specially style the popover arrow to be consistent for each contextual color and popover placement.
  • Prebuilt CSS styles for controlling appearance and sizes of the popovers.

NOTE: This extension depends on the kartik-v/yii2-widgets extension which in turn depends on the yiisoft/yii2-bootstrap extension. Check the composer.json for this extension's requirements and dependencies. Note: Yii 2 framework is still in active development, and until a fully stable Yii2 release, your core yii2-bootstrap packages (and its dependencies) may be updated when you install or update this extension. You may need to lock your composer package versions for your specific app, and test for extension break if you do not wish to auto update dependencies.

Demo

You can see detailed documentation and examples on usage of the extension.

Installation

The preferred way to install this extension is through composer.

Note: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

Either run

$ php composer.phar require kartik-v/yii2-popover-x "dev-master"

or add

"kartik-v/yii2-popover-x": "dev-master"

to the require section of your composer.json file.

Usage

PopoverX

use kartik\popover\PopoverX;

PopoverX::begin([
    'header' => 'Hello world',
    'footer' => Html::button('View', ['class'=>'btn btn-primary']),
    'toggleButton' => ['class'=>'btn btn-primary'],
]);

echo '<p class="text-justify">' .
    'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.' . 
    '</p>';

PopoverX::end();

License

yii2-popover-x is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

Changelog

Change Log: yii2-popover-x

Version 1.3.5

Date: 02-Apr-2020

  • Enhancement to parse pluginOptions correctly when only toggleButton is configured.
  • Move all source code to src directory.
  • Enhancements to support Bootstrap v4.x.
  • (enh #19): Enhance header, closeButton, and toggleButton rendering validation.

Date: 08-Sep-2017

  • (enh #18): Enhancements for BS4 support for bootstrap popover-x v1.4.5.
  • (enh #16): Added more positioning constants.
  • Add github contribution and issue/PR logging templates.

Version 1.3.3

Date: 12-Jan-2016

  • (bug #13): Correct init and run of PopoverX widget.

Version 1.3.2

Date: 12-Jan-2016

  • (enh #12): Enhancements for PJAX based reinitialization. Complements enhancements in kartik-v/yii2-krajee-base#52 and kartik-v/yii2-krajee-base#53.

Version 1.3.1

Date: 01-Jul-2015

  • Updates to composer dependencies.

Version 1.3.0

Date: 25-Nov-2014

  • (enh #5): Enhance widget to use updated plugin registration from Krajee base

Version 1.2.0

Date: 10-Nov-2014

  • Set dependency on Krajee base components
  • Set release to stable

Version 1.1.0

Date: 2014-10-24

  • Enhancements for release v1.1.0 of bootstrap-popover-x plugin.
  • enh #2: Allow widget to be used as a popover in NavBar.
  • enh #3: Add content property to render the widget directly without begin and end methods.
  • enh #4: Add arrowOptions property to configure HTML attributes for arrow.

Version 1.0.0

Date: 2014-07-15

  • Initial release
  • PSR4 alias change

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



v1.3.5 is the latest of 9 releases



BSD-3-Clause license
Stats
23 github stars & 8 github forks
234 downloads in the last day
41626 downloads in the last 30 days
2589605 total downloads