{"id":32235178,"url":"https://github.com/rigon/bootpopup","last_synced_at":"2026-02-24T04:05:27.922Z","repository":{"id":58244463,"uuid":"77492391","full_name":"rigon/bootpopup","owner":"rigon","description":"Popup dialog boxes for Bootstrap","archived":false,"fork":false,"pushed_at":"2024-02-09T00:50:46.000Z","size":1526,"stargazers_count":16,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-23T07:54:19.235Z","etag":null,"topics":["bootstrap","dialog-box","dialogs","jquery"],"latest_commit_sha":null,"homepage":"https://rigon.github.io/bootpopup/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rigon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-28T01:12:48.000Z","updated_at":"2025-03-13T22:10:04.000Z","dependencies_parsed_at":"2024-11-15T05:12:00.643Z","dependency_job_id":null,"html_url":"https://github.com/rigon/bootpopup","commit_stats":{"total_commits":120,"total_committers":5,"mean_commits":24.0,"dds":"0.033333333333333326","last_synced_commit":"547eacb001f506ba4a29e06519c3be605b9c967a"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/rigon/bootpopup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigon%2Fbootpopup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigon%2Fbootpopup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigon%2Fbootpopup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigon%2Fbootpopup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rigon","download_url":"https://codeload.github.com/rigon/bootpopup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigon%2Fbootpopup/sbom","scorecard":{"id":776327,"data":{"date":"2025-08-11","repo":{"name":"github.com/rigon/bootpopup","commit":"4a4fee77f4a0b7fba29eea4d342c4557ced13011"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9mvj-f7w8-pvh2","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T03:43:38.675Z","repository_id":58244463,"created_at":"2025-08-23T03:43:38.675Z","updated_at":"2025-08-23T03:43:38.675Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29719459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","dialog-box","dialogs","jquery"],"created_at":"2025-10-22T12:58:51.504Z","updated_at":"2026-02-24T04:05:27.915Z","avatar_url":"https://github.com/rigon.png","language":"HTML","readme":"# BootPopup\n\nPopup dialog boxes for Bootstrap.\n\nSee it in action in [BootPopup - Examples](http://www.bootpopup.ml/#examples)\n\n\n## Content\n\n- [API](#api)\n  - [bootpopup.alert](#bootpopupalertmessage-title-callback)\n  - [bootpopup.confirm](#bootpopupconfirmmessage-title-callback)\n  - [bootpopup.prompt](#bootpopuppromptlabel-type-message-title-callback) (single value)\n  - [bootpopup.prompt](#bootpopuppromptlist_types-message-title-callback) (multiple values)\n  - [bootpopup](#bootpopupoptions)\n    - [About the buttons option](#about-the-buttons-option)\n    - [About the content option](#about-the-content-option)\n  - [bootpopup object](#bootpopup-object)\n    - [Properties](#properties)\n    - [Methods](#methods)\n    - [DOM Elements](#dom-elements)\n- [Build](#build)\n- [Test locally](#test-locally)\n- [Examples](#examples)\n- [Migration from previous version to v1](#migration-from-previous-version-to-v1)\n\n## API\n\n### `bootpopup.alert(message[, title[, callback]])`\n  \nShows an alert dialog box.\n**Return:** instance of BootPopup window\n\n- **message**:\n  - `(string)` message of the alert\n- **title**:\n  - `(string)` title of the alert. Default value is page title\n  - `(function)()` callback when the alert is dismissed\n- **callback**:\n  - `(function)()` callback when the alert is dismissed\n\n\n### `bootpopup.confirm(message[, title[, callback]])`\n\nShows a confirm dialog box.\n**Return:** instance of BootPopup window\n\n- **message**:\n  - `(string)` message to confirm\n- **title**:\n  - `(string)` title of the confirm dialog. Default value is page title\n  - `(function)(answer)` callback when the confirm is answered. `answer` will be `true` if the answer was yes and `false` if it was no. If dismissed, the default answer is no\n- **callback**:\n  - `(function)(answer)` callback when the confirm is answered. `answer` will be `true` if the answer was yes and `false` if it was no. If dismissed, the default answer is no\n\n\n### `bootpopup.prompt(label[, type[, message[, title[, callback]]]])`\n\nShows a prompt dialog box, asking to input a single value.\n**Return:** instance of BootPopup window\n\n- **label**:\n  - `(string)` label of the value being asked\n- **type**:\n  - `(string)` type of the value being asked. This corresponds to the [HTML input types](http://www.w3schools.com/tags/att_input_type.asp). Default value is `text`\n  - `(function)(answer)` callback with the introduced data. This is only called when OK is pressed\n- **message**:\n  - `(string)` message shown before the asked value. Default value is *Provide a `type` for:*\n  - `(function)(answer)` callback with the introduced data. This is only called when OK is pressed\n- **title**:\n  - `(string)` title of the prompt dialog. Default value is page title\n  - `(function)(answer)` callback with the introduced data. This is only called when OK is pressed\n- **callback**:\n  - `(function)(answer)` callback with the introduced data. This is only called when OK is pressed\n\n\n### `bootpopup.prompt(list_types[, message[, title[, callback]]])`\n\nShows a prompt dialog box, asking to input multiple values.\n**Return:** instance of BootPopup window\n\n- **list_types**:\n  - `(array)` array of objects with the description of values being asked:\n    - **label** label of the value\n    - **type** type of the value (default is `text`)\n    - **name** key used in the data returned to the callback (default is label in lowercase and dashed)\n    - \u003ca href=\"https://www.w3schools.com/html/html_form_attributes.asp\"\u003eHTML input attributes\u003c/a\u003e are also accepted. Example:\n    `{ label: \"Name\", type: \"text\", name: \"name\", value: \"My name\"}`\n- **message**:\n  - `(string)` message shown before the asked value. Default value is *Provide a `type` for:*\n  - `(function)(answer)` callback with the introduced data. This is only called when OK is pressed\n- **title**:\n  - `(string)` title of the prompt dialog. Default value is page title\n  - `(function)(answer)` callback with the introduced data. This is only called when OK is pressed\n- **callback**:\n  - `(function)(answer)` callback with the introduced data. This is only called when OK is pressed\n\n\n### `bootpopup(options)`\n\nShows a customized dialog box. `bootpopup.alert`, `bootpopup.confirm` and `bootpopup.prompt` are mapped into this function.\n**Return:** instance of BootPopup window\n\n**Options:** `(object)`\n\n| Name        | Type     | Default          | Example             | Description\n|-------------|----------|------------------|---------------------|------------\n| title       | string   | `document.title` | `\"A title\"`         | Title of the dialog box\n| showclose   | boolean  | `true`           | `false`             | Show or not the close button in the title\n| content     | array    | `[]`             | `[ {p}, {p} ]`      | Content of the dialog box. Learn more [about the content option](#about-the-content-option)\n| size        | string   | `normal`         | `large`             | Size of the modal window. Values accepted: `small`, `normal`, `large` ([Bootstrap Modal optional sizes](https://getbootstrap.com/docs/3.3/javascript/#modals-sizes))\n| size_labels | string   | `col-sm-4`       | `col-lg-2`          | Any class name or list of classes to apply to labels in the form. Preferably classes from [Bootstrap Grid system](https://getbootstrap.com/docs/3.3/css/#grid)\n| size_inputs | string   | `col-sm-8`       | `col-lg-10`         | Any class name or list of classes to apply to inputs (div that wraps the input) in the form. Preferably classes from [Bootstrap Grid system](https://getbootstrap.com/docs/3.3/css/#grid)\n| onsubmit    | string   | `close`          | `ok`                | Default action to be executed when the form is sumitted. This is overrided if you define a callback for `submit`. The possible options are: `close`, `ok`, `cancel`, `yes`, `no`.\n| buttons     | array    | `[\"close\"]`      | `[ \"yes\", \"no\"]`    | List of buttons to show in the bottom of the dialog box. The possible options are: `close`, `ok`, `cancel`, `yes`, `no`. Learn more [about the buttons option](#about-the-buttons-option)\n| before      | function | `function() {}`  | `function(diag) {}` | Called before the window is shown, but after being created. `diag` provides the instance to `bootpopup` object\n| dismiss     | function | `function() {}`  | `function(data) {}` | Called when the window is dismissed\n| submit      | function | `function() {}`  | `function(data) {}` | Called when the form is submitted. Returning `false` will cancel submission\n| close       | function | `function() {}`  | `function(data) {}` | Called when Close button is selected\n| ok          | function | `function() {}`  | `function(data) {}` | Called when OK button is selected\n| cancel      | function | `function() {}`  | `function(data) {}` | Called when Cancel button is selected\n| yes         | function | `function() {}`  | `function(data) {}` | Called when Yes button is selected\n| no          | function | `function() {}`  | `function(data) {}` | Called when No button is selected\n| complete    | function | `function() {}`  | `function(data) {}` | This function is always called when the dialog box has completed\n\n#### About the **buttons** option:\n\nIf `buttons` is not specified, BootPopup will automatically select the buttons based on the defined callbacks.\nIf some of the callbacks `close`, `ok`, `cancel`, `yes`, `no` are defined, the respective buttons are selected.\n  \nFor example, if you define `ok` and `cancel` callbacks, the option `buttons` is automatically configured to\n`[\"ok\", \"cancel\"]`.\n\n\n#### About the **content** option:\n\nThe biggest flexibility of BootPopup is the `content` option. The content is wrapped by a form and has the\nbootstrap class `.form-horizontal` allowing to create complex forms very quickly. When you are submitting data\nvia a dialog box, BootPopup will grab all that data and deliver to you through the callbacks.\n\n1. `content` is an array of objects and each object is represented as an entry of the form. For example, if you\n   have the following object:\n   \n   ```javascript\n   { p: {class: \"bold\", text: \"Insert data:\"}}\n   ```\n   \n   This will add a `\u003cp\u003e\u003c/p\u003e` tag to the form. The options of `p` (`{class: \"bold\", text: \"Insert data:\"}`) are HTML\n   attributes passed to the HTML tag. There is a special attribute for `text` which is defined as the inner text of\n   the HTML tag. So, this example is equivalent to the following HTML:\n   \n   ```html\n   \u003cp class=\"bold\"\u003eInsert data:\u003c/p\u003e\n   ```\n\n2. But it is when it comes to adding inputs that things become easy. Look at this example:\n   \n   ```javascript\n   { input: {type: \"text\", label: \"Title\", name: \"title\", placeholder: \"Description\" }}\n   ```\n   \n   This will create an `input` element with the attributes `type: \"text\", label: \"Title\", name: \"title\", placeholder: \"Description\"`.\n   Note there is also a special attribute `label`. This attribute is used by BootPopup to create a label for the input form entry.\n   The above example is equivalent to the following HTML:\n   \n   ```html\n   \u003cdiv class=\"form-group\"\u003e\n     \u003clabel for=\"title\" class=\"col-sm-2 control-label\"\u003eTitle\u003c/label\u003e\n     \u003cdiv class=\"col-sm-10\"\u003e\n       \u003cinput label=\"Title\" name=\"title\" id=\"bootpopup-form-input\" placeholder=\"Description\" class=\"form-control\" type=\"text\"\u003e\n     \u003c/div\u003e\n   \u003c/div\u003e\n   ```\n   \n3. In order to make it even simpler, there are shortcuts for most common input types (`button`, `text`, `submit`, `color`,\n   `url`, `password`, `hidden`, `file`, `number`, `email`, `reset`, `date`, `select`, `radio`).\n   The previous example can be simply written as:\n   \n   ```javascript\n   { text: {label: \"Title\", name: \"title\", placeholder: \"Description\" }}\n   ```\n\n   **NOTE:** `select` and `radio` have a special attribute named `options`. You can specify a list of options to be shown (the key is used as value by the input and the value is the text displayed):\n\n   ```javascript\n   { select: { label: \"Select\", name: \"select\", options: { a:\"A\", b:\"B\", c:\"C\" }}}\n   ```\n   \n   `select` with attribute `multiple` is also supported.\n\n4. Another useful feature is the ability to support functions directly as an attribute. Take the following `button` example:\n   \n   ```javascript\n   { button: {name: \"button\", value: \"Open image\", class: \"btn btn-info\", onclick: function(obj) {\n       console.log(obj);\n       bootpopup.alert(\"Hi there\");\n   }}}\n   ```\n   This will create a `onclick` event for the button. The reference for the object is passed as argument to the function.\n\n5. You can also insert HTML strings directly. Instead of writing an JS object, write the HTML:\n\n   ```javascript\n   '\u003cp class=\"lead\"\u003ePopup dialog boxes for Bootstrap.\u003c/p\u003e'\n   ```\n### `bootpopup` object\n\nThe `bootpopup` object is returned every time a new instance of BootPopup is created.\n\n#### Properties\n\n- `formid` - HTML ID of the form, this is a randomly generated\n- `options` - list of options used to create the window\n\n#### Methods\n\n - `addOptions` - add options to the current options\n - `setOptions` - override the current options, a list with all options is required\n - `create` - create the window and add it to DOM, but not show\n - `show` - show window and call `before` callback\n - `dismiss` - performs a `dismiss`\n - `submit` - performs a `submit`\n - `close` - performs a `close`\n - `ok` - performs a `ok`\n - `cancel` - performs a `cancel`\n - `yes` - performs a `yes`\n - `no` - performs a `no`\n\n#### DOM elements\n\nAll the following BootPopup properties are jQuery objects:\n\n- `modal` - entire window, including the fade background. You can use this property in the same way as described in [Bootstrap Modals Usage](https://getbootstrap.com/docs/3.3/javascript/#modals-usage)\n- `dialog` - entire window, without the background\n- `content` - content of the dialog\n- `header` - header of the dialog\n- `body` - body of the dialog\n- `form` - main form in the dialog, inside the `body`\n- `footer` - footer of the dialog\n- `btnClose` - close button (if present)\n- `btnOk` - OK button (if present)\n- `btnCancel` - cancel button (if present)\n- `btnYes` - yes button (if present)\n- `btnNo` - no button (if present)\n\n\n## Build\n\nIn order to build a version for distribution, please run:\n\n    npm install\n    npm run dist\n\nThe output file is `bootpopup.min.js`\n\n\n## Test locally\n\nPlease run:\n\n    npm install\n    npm start\n\nNow, you can open http://localhost:9080/\n\n\n## Examples\n\nOpen `index.html` to see the library in action.\n\n- Alert:\n\n  ```javascript\n  bootpopup.alert(\"Hi there\");\n  ```\n\n- Confirm:\n\n  ```javascript\n  bootpopup.confirm(\"Do you confirm this message?\", function(ans) {\n    alert(ans);\n  });\n  ```\n\n- Prompt:\n\n  ```javascript\t\t\n  bootpopup.prompt(\"Name\", function(value) {\n    alert(value);\n  });\n  ```\n\n- Customized prompt:\n\n  ```javascript\n  bootpopup({\n      title: \"Add image\",\n      content: [\n          '\u003cp class=\"lead\"\u003eAdd an image\u003c/p\u003e',\n          { p: {text: \"Insert image info here:\"}},\n          { input: {type: \"text\", label: \"Title\", name: \"title\", placeholder: \"Description for image\"}},\n          { input: {type: \"text\", label: \"Link\", name: \"link\", placeholder: \"Hyperlink for image\"}}],\n      cancel: function(data) { alert(\"Cancel\"); },\n      ok: function(data,e) { console.log(data,e); },\n      complete: function() { alert(\"complete\"); },\n  });\n  ```\n\n\n## Migration from previous version to v1\n\n- The value passed in the argument to the `prompt` callback is now the actual value\n- The parameters passed to the callback of `bootpopup` are now:\n    1. `data` - a list of key-value pairs of the form, where key is the name of the input\n    2. `array` - an array of name-value pairs obtained from the jQuery function `$(form).serializeArray()`\n    3. `event` - event of pressing the button\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigon%2Fbootpopup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frigon%2Fbootpopup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigon%2Fbootpopup/lists"}