BVB Source Codes

mongo-express Show index.js Source code

Return Download mongo-express: download index.js Source code - Download mongo-express Source code - Type:.js
  1. import $ from 'jquery';
  2.  
  3. $(document).ready(() => {
  4.   $('#database').popover({
  5.     content: 'Database names must begin with a letter or underscore, and can contain only letters, numbers, underscores and dots.',
  6.   });
  7.  
  8.   const $deleteButton = $('.deleteButton');
  9.  
  10.   $deleteButton.tooltip({
  11.     title: 'Warning! Are you sure you want to delete this database? All collenctions and documents will be deleted.',
  12.   });
  13.  
  14.   $deleteButton.on('click', (event) => {
  15.  
  16.     $deleteButton.tooltip('hide');
  17.  
  18.     event.preventDefault();
  19.  
  20.     const $target = $(this);
  21.     const parentForm = $('#' + $target.attr('childof'));
  22.  
  23.     const dbName = $target.attr('database-name');
  24.  
  25.     $('#confirmation-input').attr('shouldbe', dbName);
  26.     $('#modal-database-name').text(dbName);
  27.     $('#confirm-deletion').modal({ backdrop: 'static', keyboard: false })
  28.       .one('shown.bs.modal', () => {
  29.         $('#confirmation-input').focus();
  30.       })
  31.       .one('click', '#delete', () => {
  32.         const input = $('#confirmation-input');
  33.         if (input.val().toLowerCase() === input.attr('shouldbe').toLowerCase()) {
  34.           parentForm.trigger('submit');
  35.         }
  36.       });
  37.   });
  38. });
  39.  
downloadindex.js Source code - Download mongo-express Source code
Related Source Codes/Software:
XCL-Charts - Android charting libraries (XCL-Charts is a free c... 2017-05-17
scrollMonitor - A simple and fast API to monitor elements as you s... 2017-05-16
XCDYouTubeKit - YouTube video player for iOS, tvOS and macOS 2017-05-16
rails-erd - Generate Entity-Relationship Diagrams for Rails ap... 2017-05-16
np - A better `npm publish` 2017-05-16
kaminari - A Scope & Engine based, clean, powerful, custo... 2017-06-04
python-fire - Python Fire is a library for automatically generat... 2017-06-04
Dapper - Dapper - a simple object mapper for .Net 2017-06-05
pkg - Package your Node.js project into an executable ... 2017-06-05
packer - Packer is a tool for creating identical machine im... 2017-06-05
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top