Giter Club home page Giter Club logo

bpf.popup's Introduction

bpf.popup

@author blackpet

@date 2020.5

Run on Repl.it

Documentation

Static Methods

methods signature description
create bpf.popup.create('id', options) create popup instance
close bpf.popup.close('id') dispose popup instance of name 'id'
getPoppy bpf.popup.getPoppy('id') get popup instance of name 'id'

Options

Props

bpf.popup.create('POPUP_NAME', options);
option type value (default) description
debug boolean true/false FALSE console log in actions
url string url string - * url, template, selector
template string template (markup) string - * url, template, selector
selector css selector css selector string - * url, template, selector
title string title string - * url, template, selector
width number size of popup (px) -
modal boolean wrapping body to backdrop FALSE
closeable boolean Whether to use the close button TRUE
className string class string (multiple values separated by space) -
buttons string array optional ['ok', 'cancel'] - * ok(), cancel()
data object passing value to popup instance -
callback function callback function for popup instance -

Events

event description
callback invoked when the callback function is called in the popup instance
ready invoked after popup instance loaded
close invoked before popup instance disposed
ok overwrite [ok] button label and function
cancel overwrite [cancel] button label and function

Instance Methods

methods description
close close popup instance
callback invoke callback function passed by config props
submit submit popup instantly using AJAX
ok overwrite [ok] button label and function
cancel overwrite [cancel] button label and function

.data Instance Storage

  • private storage inside of poppy instance
  • key/value object
methods description
push [value for array]
remove [value for array]
indexOf [value for array]
put [value for object]
get get value of {key} argument, if no {key} argument returns whole storage object
delete delete key of storage
_default {data} passed by config props

bpf.popup's People

Contributors

blackpet avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.