npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

binary-com-jquery-dialogextended

v1.0.0

Published

jquery-dialogextend 2.0.4 [![project status](http://stillmaintained.com/ROMB/jquery-dialogextend.png)](http://stillmaintained.com/ROMB/jquery-dialogextend) [![Build Status](https://travis-ci.org/ROMB/jquery-dialogextend.png?branch=master)](https://travis-

Downloads

31

Readme

jquery-dialogextend 2.0.4 project status Build Status

Download

development build

minified library

Compatible

  • jQuery 1.11.1
  • jQueryUI 1.11.0

Overview

  • Neat, simple, and ABSOLUTELY unobtrusive
  • Extending (instead of replacing) original jQuery UI dialog
  • Maximize and minimize buttons
  • Show/Hide close button
  • Double-clickable title bar
  • Enhanced title bar options
  • Configurable icons
  • Custom events

Demo

Tested Browsers

  • Chrome 35
  • Firefox 14
  • IE 8

Please support this project

Donate Bitcoins: 1G8T7Xh2AN5ceduHmHT5TpPFUeddsnQHLQ

Options

closable

Type: Boolean

Usage: enable/disable close button

Default: true

maximizable

Type: Boolean

Usage: enable/disable maximize button

Default: false

minimizable

Type: Boolean

Usage: enable/disable minimize button

Default: false

collapsable

Type: Boolean

Usage: enable/disable collapse button

Default: false

minimizeLocation

Type: String

Usage: sets alignment of minimized dialogues

Default: 'left'

Valid: 'left', 'right'

dblclick

Type: Boolean, String

Usage: set action on double click

Default: false

Valid: false, 'maximize', 'minimize', 'collapse'

titlebar

Type: Boolean, String

Default: false

Valid: false, 'none', 'transparent'

icons

Type: Object

Default:

{
  "close" : "ui-icon-circle-closethick", // new in v1.0.1
  "maximize" : "ui-icon-extlink",
  "minimize" : "ui-icon-minus",
  "restore" : "ui-icon-newwin"
}

Valid: <jQuery UI icon class>

Events

load

Type: load

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "load" : function(evt, dlg) { ... }
});
//Bind to event by type
//NOTE : You must bind() the <dialogextendload> event before dialog-extend is created
$("#my-dialog")
  .bind("dialogextendload", function(evt) { ... })
  .dialogExtend();

beforeCollapse

Type: beforeCollapse

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "beforeCollapse" : function(evt) { ... }
});
//Bind to event by type
$("#my-dialog").bind("dialogextendbeforeCollapse", function(evt) { ... });

beforeMaximize

Type: beforeMaximize

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "beforeMaximize" : function(evt) { ... }
});
//Bind to event by type
$("#my-dialog").bind("dialogextendbeforeMaximize", function(evt) { ... });

beforeMinimize

Type: beforeMinimize

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "beforeMinimize" : function(evt) { ... }
});
//Bind to event by type
$("#my-dialog").bind("dialogextendbeforeMinimize", function(evt) { ... });

beforeRestore

Type: beforeRestore

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "beforeRestore" : function(evt) { ... }
});
//Bind to event by type
$("#my-dialog").bind("dialogextendbeforeRestore", function(evt) { ... });

collapse

Type: collapse

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "collapse" : function(evt) { ... }
});
//Bind to event by type
$("#my-dialog").bind("dialogextendcollapse", function(evt) { ... });

maximize

Type: maximize

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "maximize" : function(evt) { ... }
});
//Bind to event by type
$("#my-dialog").bind("dialogextendmaximize", function(evt) { ... });

minimize

Type: minimize

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "minimize" : function(evt) { ... }
});
//Bind to event by type
$("#my-dialog").bind("dialogextendminimize", function(evt) { ... });

restore

Type: restore

Example:

//Specify callback as init option
$("#my-dialog").dialogExtend({
  "restore" : function(evt) { ... }
});
//Bind to event by type
$("#my-dialog").bind("dialogextendrestore", function(evt) { ... });

Methods

collapse

Usage: Collapse the dialog without double-clicking the title bar

Trigger: dialogextendbeforeCollapse, dialogextendcollapse

Example:

$("#my-dialog").dialogExtend("collapse");

maximize

Usage: Maximize the dialog without clicking the button

Trigger: dialogextendbeforeMaximize, dialogextendmaximize

Example:

$("#my-dialog").dialogExtend("maximize");

minimize

Usage: Minimize the dialog without clicking the button

Trigger: dialogextendbeforeMinimize, dialogextendminimize

Example:

$("#my-dialog").dialogExtend("minimize");

restore

Usage: Restore the dialog from maximized/minimized/collapsed state without clicking the button

Trigger: dialogextendbeforeRestore, dialogextendrestore

Example:

$("#my-dialog").dialogExtend("restore");

state

Usage: Get current state of dialog

Return: String

Value: 'normal', 'maximized', 'minimized', 'collapsed'

Example:

switch ( $("#my-dialog").dialogExtend("state") ) {
  case "maximized":
    alert("The dialog is maximized");
    break;
  case "minimized":
    alert("The dialog is minimized");
    break;
  case "collapsed":
    alert("The dialog is collapsed");
    break;
  default:
    alert("The dialog is normal");
}

Theming

The dialog will have class according to its current state.

<div class="ui-dialog">
  <div class="ui-dialog-titlebar">...</div>
  <div class="ui-dialog-content ui-dialog-{normal|maximized|minimized|collapsed}">...</div>
</div>

The buttons are wrapped by title bar of jQuery UI Dialog.

Note : After using dialogExtend, close button will not be a direct child of title bar anymore. It will be wrapped by a button pane element

<div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
  ...
  <div class="ui-dialog-titlebar-buttonpane">
    <a class="ui-dialog-titlebar-close ui-corner-all" href="#">...</a>
    <a class="ui-dialog-titlebar-maximize ui-corner-all" href="#"><span class="ui-icon {icons.maximize}">maximize</span></a>
    <a class="ui-dialog-titlebar-minimize ui-corner-all" href="#"><span class="ui-icon {icons.minimize}">minimize</span></a>
    <a class="ui-dialog-titlebar-restore ui-corner-all" href="#"><span class="ui-icon {icons.restore}">restore</span></a>
  </div>
  ...
</div>

Example - Basic Config

$(function(){
  $("#my-button").click(function(){
    $("<div>This is content</div>")
      .dialog({ "title" : "My Dialog" })
      .dialogExtend({
        "maximizable" : true,
        "dblclick" : "maximize",
        "icons" : { "maximize" : "ui-icon-arrow-4-diag" }
      });
  });
});

Example - Full Config

$(function(){
  $("#my-button").click(function(){
    $("<div>This is  content</div>")
      .dialog({
        "title" : "This is dialog title",
        "buttons" : { "OK" : function(){ $(this).dialog("close"); } }
       })
      .dialogExtend({
        "closable" : true,
        "maximizable" : true,
        "minimizable" : true,
        "collapsable" : true,
        "dblclick" : "collapse",
        "titlebar" : "transparent",
        "minimizeLocation" : "right",
        "icons" : {
          "close" : "ui-icon-circle-close",
          "maximize" : "ui-icon-circle-plus",
          "minimize" : "ui-icon-circle-minus",
          "collapse" : "ui-icon-triangle-1-s",
          "restore" : "ui-icon-bullet"
        },
        "load" : function(evt, dlg){ alert(evt.type); },
        "beforeCollapse" : function(evt, dlg){ alert(evt.type); },
        "beforeMaximize" : function(evt, dlg){ alert(evt.type); },
        "beforeMinimize" : function(evt, dlg){ alert(evt.type); },
        "beforeRestore" : function(evt, dlg){ alert(evt.type); },
        "collapse" : function(evt, dlg){ alert(evt.type); },
        "maximize" : function(evt, dlg){ alert(evt.type); },
        "minimize" : function(evt, dlg){ alert(evt.type); },
        "restore" : function(evt, dlg){ alert(evt.type); }
      });
  });
});