diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index 3d1756a..0000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "TuneTales", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/jquery-toast-plugin": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/jquery-toast-plugin/-/jquery-toast-plugin-1.3.2.tgz", - "integrity": "sha512-0j/nfqA2FHFuJXp8QL33EVVCY//TDVfq4LULhTbasZYl2aZlX6YiSF5IGrI31dQiS9S4JkXBUfX3rMJcfl/u/g==" - } - } -} diff --git a/node_modules/jquery-toast-plugin/README.md b/node_modules/jquery-toast-plugin/README.md deleted file mode 100644 index 7fa6a42..0000000 --- a/node_modules/jquery-toast-plugin/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# Jquery Toast Plugin - -A plugin to show highly customizable notifications to the user. - - - -# How to use - -- You can install the plugin via Bower: - - ```js - bower install jquery-toast-plugin - ``` - - or via `npm` - - ```js - npm install jquery-toast-plugin - ``` - - Or directly download the repository and place the content of `dist` wherever you can access them. -- Include the CSS and JS files. -- Simply do ```$.toast('Toast message to be shown')``` Of course it would be the world's simplest toast message but believe me **you can do a lot more** with the options. - -# Demo -For some quick demos and a detailed documentation accompanied by the demos for each of the available options can be accessed through http://kamranahmed.info/toast - -## Quick usage examples -**Simple textual toast** -```javascript -// Non sticky version -$.toast("Lorem ipsum dolor sit amet, consectetur adipisicing elit. Hic, consequuntur doloremque eveniet eius eaque dicta repudiandae illo ullam. Minima itaque sint magnam dolorum asperiores repudiandae dignissimos expedita, voluptatum vitae velit.") -// Sticky version -$.toast({ - text : "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Hic, consequuntur doloremque eveniet eius eaque dicta repudiandae illo ullam. Minima itaque sint magnam dolorum asperiores repudiandae dignissimos expedita, voluptatum vitae velit.", - hideAfter : false -}) -``` - -**Toast using HTML as a text** -```javascript -// Non sticky -$.toast("Let's test some HTML stuff... github") -// sticky -$.toast({ - text : "Remember! You can always introduce your own × HTML and CSS in the toast.", - hideAfter : false -}) -``` - -**Unordered list elements as the text of toast using array** -```javascript -// Non sticky version -$.toast(["Ubuntu : One of it's kind", "Sublime Text : Productivity unleashed", "HeidiSQL : Just love it", "Github : Just Lovely"]) -// Sticky version -$.toast({ - text : ["Ubuntu : One of it's kind", "Sublime Text : Productivity unleashed", "HeidiSQL : Just love it", "Github : Just Lovely"], - hideAfter : false -}) -``` - -**Changing the animations** -```javascript -$.toast({ - text : "Let's test some HTML stuff... github", - showHideTransition : 'slide' // It can be plain, fade or slide -}) -``` - -**Changing the formatting** -```javascript -$.toast({ - text : "Let's test some HTML stuff... github", - showHideTransition : 'slide', // It can be plain, fade or slide - bgColor : 'blue', // Background color for toast - textColor : '#eee', // text color - allowToastClose : false, // Show the close button or not - hideAfter : 5000, // `false` to make it sticky or time in miliseconds to hide after - stack : 5, // `fakse` to show one stack at a time count showing the number of toasts that can be shown at once - textAlign : 'left', // Alignment of text i.e. left, right, center - position : 'bottom-left' // bottom-left or bottom-right or bottom-center or top-left or top-right or top-center or mid-center or an object representing the left, right, top, bottom values to position the toast on page -}) -``` - -**Resetting the toast** -```javascript -var myToast = $.toast('Some toast that needs to be removed.'); -myToast.reset(); // remove the toast "Some toast that needs to be removed" -``` -What if I want to reset all the toasts at once? You may ask. Well in that case, you can do the following: -```javascript -$.toast().reset('all'); -``` - -**Updating the toast** -Suppose, you had shown some toast upon the page, a sticky toast for example and now you want to update the toast. You can do the following - -```javascript -var myToast = $.toast({ - text : 'Some toast that needs to show the success message after the ajax call.', - hideAfter : false, - bgColor : '#E01A31' -}); - -window.setTimeout(function(){ - myToast.update({ - text : 'Updated after a few seconds', - bgColor : '#23B65D' - }); -}, 5000); -``` -To learn more about how to use and customize it, head to http://kamranahmed.info/toast. Also you can find a customizer there that will let you modify the look and feel of the toast however you like it. - -
- -You can simply download the repo or if you are in rush the minified CSS or non-minified CSS can be found and minified JS and non minified JS can also be found. - -# Features - - -Please report any bugs or features you would like added. - -# Copyright - -MIT © [Kamran Ahmed](http://kamranahmed.info) diff --git a/node_modules/jquery-toast-plugin/bower.json b/node_modules/jquery-toast-plugin/bower.json deleted file mode 100644 index 7209518..0000000 --- a/node_modules/jquery-toast-plugin/bower.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "jquery-toast-plugin", - "description": "A highly customizable jquery toast plugin", - "version": "1.3.1", - "main": [ - "./dist/jquery.toast.min.js", - "./dist/jquery.toast.min.css" - ], - "moduleType": [], - "keywords": [ - "jquery", - "toast-plugin", - "jquery-toasts", - "toast", - "notification", - "messages", - "jquery-notification" - ], - "authors": [ - "Kamran Ahmed" - ], - "license": "MIT", - "homepage": "http://kamranahmed.info/toast", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "README.md" - ], - "dependencies": { - "jquery": ">=1.9.0" - } -} diff --git a/node_modules/jquery-toast-plugin/demos/css/jquery.toast.css b/node_modules/jquery-toast-plugin/demos/css/jquery.toast.css deleted file mode 100644 index 54ddf67..0000000 --- a/node_modules/jquery-toast-plugin/demos/css/jquery.toast.css +++ /dev/null @@ -1,28 +0,0 @@ -/** - * jQuery toast plugin created by Kamran Ahmed copyright MIT license 2014 - */ -.jq-toast-wrap { display: block; position: fixed; width: 250px; pointer-events: none !important; margin: 0; padding: 0; letter-spacing: normal; z-index: 9000 !important; } -.jq-toast-wrap * { margin: 0; padding: 0; } - -.jq-toast-wrap.bottom-left { bottom: 20px; left: 20px; } -.jq-toast-wrap.bottom-right { bottom: 20px; right: 40px; } -.jq-toast-wrap.top-left { top: 20px; left: 20px; } -.jq-toast-wrap.top-right { top: 20px; right: 40px; } - -.jq-toast-single { display: block; width: 100%; padding: 10px; margin: 0px 0px 5px; border-radius: 4px; font-size: 12px; font-family: arial, sans-serif; line-height: 17px; position: relative; pointer-events: all !important; background-color: #444444; color: white; } - -.jq-toast-single h2 { font-family: arial, sans-serif; font-size: 14px; margin: 0px 0px 7px; background: none; color: inherit; line-height: inherit; letter-spacing: normal; } -.jq-toast-single a { color: #eee; text-decoration: none; font-weight: bold; border-bottom: 1px solid white; padding-bottom: 3px; font-size: 12px; } - -.jq-toast-single ul { margin: 0px 0px 0px 15px; background: none; padding:0px; } -.jq-toast-single ul li { list-style-type: disc !important; line-height: 17px; background: none; margin: 0; padding: 0; letter-spacing: normal; } - -.close-jq-toast-single { position: absolute; top: 3px; right: 7px; font-size: 14px; cursor: pointer; } - -.jq-toast-loader { display: block; position: absolute; top: -2px; height: 5px; width: 0%; left: 0; border-radius: 5px; background: red; } -.jq-toast-loaded { width: 100%; } -.jq-has-icon { padding: 10px 10px 10px 50px; background-repeat: no-repeat; background-position: 10px; } -.jq-icon-info { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII='); background-color: #31708f; color: #d9edf7; border-color: #bce8f1; } -.jq-icon-warning { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII='); background-color: #8a6d3b; color: #fcf8e3; border-color: #faebcc; } -.jq-icon-error { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII='); background-color: #a94442; color: #f2dede; border-color: #ebccd1; } -.jq-icon-success { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg=='); color: #dff0d8; background-color: #3c763d; border-color: #d6e9c6; } \ No newline at end of file diff --git a/node_modules/jquery-toast-plugin/demos/index.html b/node_modules/jquery-toast-plugin/demos/index.html deleted file mode 100644 index 67491fa..0000000 --- a/node_modules/jquery-toast-plugin/demos/index.html +++ /dev/null @@ -1,987 +0,0 @@ - - - - - Demo - Toast Plugin - - - - - -
-

Jquery Toast Plugin

-
- -

Index

- - -
-

Latest Update

-

Toast loader has been introduced in the latest version. Check the demo below to see it in action

-
- Run code -
$.toast('Here you can put the text of the toast')
-
- -

Loader is enabled by default. In order to disable it or change the color, use the `loader` and `loaderBg` options. Have a look at the demo below

- -
- Run code -
$.toast({
-    heading: 'Information',
-    text: 'Loaders are enabled by default. Use `loader`, `loaderBg` to change the default behavior',
-    icon: 'info',
-    loader: true,        // Change it to false to disable loader
-    loaderBg: '#9EC600'  // To change the background
-})
-
-
- - - -

Quick Demos

- -

To generate a most simple toast, all you have to do is

-
- Run code -
$.toast('Here you can put the text of the toast')
-
- -

There are different kinds of toast types:

-
- Run code -
$.toast({
-    heading: 'Information',
-    text: 'Now you can add icons to generate different kinds of toasts',
-    showHideTransition: 'slide',
-    icon: 'info'
-})
-
- -
- Run code -
$.toast({
-    heading: 'Error',
-    text: 'Report any <a href="https://github.com/kamranahmedse/jquery-toast-plugin/issues">issues</a>',
-    showHideTransition: 'fade',
-    icon: 'error'
-})
-
- -
- Run code -
$.toast({
-    heading: 'Warning',
-    text: 'It is going to be supper easy for you to use ;)',
-    showHideTransition: 'plain',
-    icon: 'warning'
-})
-
- -
- Run code -
$.toast({
-    heading: 'Success',
-    text: 'And these were just the basic demos! Scroll down to check further details on how to customize the output.',
-    showHideTransition: 'slide',
-    icon: 'success'
-})
-
- -

Options

-

Of course that is not all what you can do using this plugin, there are a lot of other options. Let's start explaining each, one by one

-

You should note that, whenever you are going to use options, you have to pass an options object and specify the text as follows:

- -
- Run code -
$.toast({
-    text: 'This will become the toast message'
-})
-
- -

The text can be an array:

- -
- Run code -
$.toast({
-    heading: 'How to contribute?!',
-    text: [
-        'Fork the repository', 
-        'Improve/extend the functionality', 
-        'Create a pull request'
-    ],
-    icon: 'info'
-})
-
- -

Or put some HTML in the text

- -
- Run code -
$.toast({
-    heading: 'Can I add <em>icons</em>?',
-    text: 'Yes! check this <a href="https://github.com/kamranahmedse/jquery-toast-plugin/commits/master">update</a>.',
-    hideAfter: false,
-    icon: 'success'
-})
-
- -

1. Specifying the heading of toast message

-

You can use the heading to set the heading property to set the heading of the toast message

-
- Run Code -
$.toast({
-    heading: 'Headings',
-    text: 'You can use the `heading` property to specify the heading of the toast message.',
-})
-
- -

2. Making them sticky:

-

There will be times, when you will want to have sticky toasts. To make them sticky, all you have to do is set the hideAfter to false. Here is a sticky toast

- -
- Run Code -
$.toast({
-    text: 'Set the `hideAfter` property to false and the toast will become sticky.',
-    hideAfter: false
-})
-
- -

* hideAfter property is basically used to set the timer after which the toast will get hidden. But you can set it to false in order to achieve the sticky toasts.

- -

3. Changing the toast hide timer

-

You can use the property from the above option i.e. hideAfter to change the timer after which toast gets hidden. You have to specify the timer in milliseconds

- -
- Run Code -
$.toast({
-    text: 'Set the `hideAfter` property to milliseconds and the toast will hide after the specified milli seconds.',
-    hideAfter: 5000   // in milli seconds
-})
-
- -

4. Changing the show/hide animation

-

You can use showHideTransition property to set the animation. Following are the available options:

- - -
- Run Code -
$.toast({
-    text: 'Set the `showHideTransition` property to fade|plain|slide to achieve different transitions',
-    heading: 'Slide transition',
-    showHideTransition: 'slide'
-})
-
- -
- Run Code -
$.toast({
-    text: 'Set the `showHideTransition` property to fade|plain|slide to achieve different transitions',
-    heading: 'Fade transition',
-    showHideTransition: 'fade'
-})
-
- -
- Run Code -
$.toast({
-    text: 'Set the `showHideTransition` property to fade|plain|slide to achieve different transitions',
-    heading: 'Plain transition',
-    showHideTransition: 'plain'
-})
-
- -

5. Making the toast closeable or not

-

You can use allowToastClose to allow the user to close the toast or not. The only thing that this option does is make that little cross button show or hide itself

- -
- Run Code -
$.toast({
-    heading: 'Closeable Toast',
-    text: 'Set the `allowToastClose` property to true|false to make the toast closeable or not',
-    allowToastClose: true
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Non closeable Toast',
-    text: 'Set the `allowToastClose` property to true|false to make the toast closeable or not',
-    allowToastClose: false
-})
-
- -

6. Setting the toast stack

-

stack property can be used to specify how many maximum toasts you want to show at any point of time. By default this property is set to 5

- -
- Run Code -
$.toast({
-    heading: 'Stack',
-    text: 'If set to a number, it will show that number of toasts at max at a time',
-    stack: 4
-})
-
- -
- Run Code -
$.toast({
-    heading: 'No stacking',
-    text: 'If set to false, there will be only one toast at once.',
-    stack: false
-})
-
- -

Note Hit the run button multiple times to test these demos.

- -

7. Positioning the toast

-

position property can be used to specify the position. There are following predefined positions which you can use:

- - -
- Run Code -
$.toast({
-    heading: 'Positioning',
-    text: 'Specify the custom position object or use one of the predefined ones',
-    position: 'bottom-left',
-    stack: false
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Positioning',
-    text: 'Specify the custom position object or use one of the predefined ones',
-    position: 'bottom-right',
-    stack: false
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Positioning',
-    text: 'Use the predefined ones, or specify a custom object',
-    position: 'bottom-center',
-    stack: false
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Positioning',
-    text: 'Use the predefined ones, or specify a custom object',
-    position: 'top-left',
-    stack: false
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Positioning',
-    text: 'Use the predefined ones, or specify a custom position object.',
-    position: 'top-right',
-    stack: false
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Positioning',
-    text: 'Use the predefined ones, or specify a custom position object.',
-    position: 'top-center',
-    stack: false
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Positioning',
-    text: 'Use the predefined ones, or specify a custom position object.',
-    position: 'mid-center',
-    stack: false
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Positioning',
-    text: 'Use the predefined ones, or specify a custom position object.',
-    position: {
-        left: 120,
-        top: 120
-    },
-    stack: false
-})
-
- -

Note It should be noted that, once you change the position of toast by using the `position` property, you'll have to reset the position for the next toasts, if you want them to appear at their default position i.e. the bottom left corner. Or else, each new toast generated will be appearing at the last position i.e. where you displayed the last positioned toast. You can reset the toast position by.

- -
- Run Code -
$.toast().reset('all');
-
- -

8. Messages with icons

-

icon property can be used to specify the predefined types of toasts. Following are the predefined types:

- - -
- Run Code -
$.toast({
-    heading: 'Warning',
-    text: 'Now you can seemlessly generate warnings using the icon property in the options',
-    icon: 'warning'
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Success',
-    text: 'Here is some kind of success message with a success icon that you can notice at the left side.',
-    icon: 'success'
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Error',
-    text: 'An unexpected error occured while trying to show you the toast! ..Just kidding, it is just a message, toast is right in front of you.',
-    icon: 'error'
-})
-
- -
- Run Code -
$.toast({
-    heading: 'Information',
-    text: 'Now you can add icons to the toasts as well.',
-    icon: 'info'
-})
-
- -

9. Background & text color

-

bgColor property is used to specify the background color of the toast message. Default is '#444'

-

textColor property is used to specify the text color of the toast message. Default is '#eee'

- -
- Run Code -
$.toast({
-    heading: 'Colors',
-    text: 'Colors are specified using `bgColor` and `textColor` properties.',
-    bgColor: '#FF1356',
-    textColor: 'white'
-})
-
- -

10. Setting the text alignment

-

textAlign property is used to set the alignment of text inside the toast. Permitted values are:

- - -
- Run Code -
$.toast({
-    text: 'Processing! Please wait..',
-    textAlign: 'center'
-})
-
- -

9. Custom Classes

-

class property is used to add custom classes to the toast element

- - -
- Run Code -
$.toast({
-    heading: 'Custom Classes',
-    text: 'Custom classes are specified using the `class` option.',
-    class: 'larger-font'
-})
-
- -

11. Toast Events

-

Toast exposes the following events for you to bind to whatever you want

- - -
- Run Code -
$.toast({
-    text: 'Triggers the events',
-
-    beforeShow: function () {
-        alert('The toast is about to appear');
-    },
-
-    afterShown: function () {
-        alert('Toast has appeared.');
-    },
-
-    beforeHide: function () {
-        alert('Toast is about to hide.');
-    },
-
-    afterHidden: function () {
-        alert('Toast has been hidden.');
-    }
-})
-
- -

12. Updating Toasts

-

If you have a reference to a toast and want to update that, you can do so by calling the update method on the instance.

- -
- Run Code -

-var myToast = $.toast({
-    heading: 'Information',
-    text: 'Here is some information that will be later on turned to an error',
-    icon: 'info',
-    hideAfter: false
-});
-
-// Update the toast after three seconds.
-window.setTimeout(function(){
-    myToast.update({
-        heading: 'Error',
-        text: 'Here is an information that changed to error',
-        icon: 'error',
-        hideAfter: false
-    });    
-}, 3000)
-
-
-
- -

13. Resetting Toasts

-

If you have the reference to a specific toast, you can reset that by doing the following

- -
-

-var myToast = $.toast('Some toast that needs to be removed.');
-myToast.reset(); // remove the toast "Some toast that needs to be removed"
-
-
- -

If you do not have the reference to a specific toast and want to reset every toast, do the following:

-
-

-$.toast().reset('all');
-
-
- - - -
-

Customize Plugin

- -

- - -

-

- - -

-

- - -

-

- - -

- -

- - -

- -

- - -

- -

- - -

- -

- - -

- -

- - -

- - - -

- - -

- - - -

- - -

- -

- - -

- -

- - -

-

- - -

- - -
- Generate -

-$.toast({
-    text: "Hey there fellas, here is a simple toast. Change the options above and then see the code that generates that toast", // Text that is to be shown in the toast
-    heading: 'How to use', // Optional heading to be shown on the toast
-    icon: 'warning', // Type of toast icon
-    showHideTransition: 'fade', // fade, slide or plain
-    allowToastClose: true, // Boolean value true or false
-    hideAfter: 3000, // false to make it sticky or number representing the miliseconds as time after which toast needs to be hidden
-    stack: 5, // false if there should be only one toast at a time or a number representing the maximum number of toasts to be shown at a time
-    position: 'bottom-left', // bottom-left or bottom-right or bottom-center or top-left or top-right or top-center or mid-center or an object representing the left, right, top, bottom values
-    position: { left : 20, right : 20, top : 20, bottom : 20 }, // bottom-left or bottom-right or bottom-center or top-left or top-right or top-center or mid-center or an object representing the left, right, top, bottom values
-    
-    
-    textAlign: 'left',  // Text alignment i.e. left, right or center
-    loader: true,  // Whether to show loader or not. True by default
-    loaderBg: '#9EC600',  // Background color of the toast loader
-    beforeShow: function () {}, // will be triggered before the toast is shown
-    afterShown: function () {}, // will be triggered after the toat has been shown
-    beforeHide: function () {}, // will be triggered before the toast gets hidden
-    afterHidden: function () {}  // will be triggered after the toast has been hidden
-});
-              
- -
- - - - - - - \ No newline at end of file diff --git a/node_modules/jquery-toast-plugin/demos/js/jquery.toast.js b/node_modules/jquery-toast-plugin/demos/js/jquery.toast.js deleted file mode 100644 index 7534e49..0000000 --- a/node_modules/jquery-toast-plugin/demos/js/jquery.toast.js +++ /dev/null @@ -1,357 +0,0 @@ -// jQuery toast plugin created by Kamran Ahmed copyright MIT license 2015 -if ( typeof Object.create !== 'function' ) { - Object.create = function( obj ) { - function F() {} - F.prototype = obj; - return new F(); - }; -} - -(function( $, window, document, undefined ) { - - "use strict"; - - var Toast = { - - _positionClasses : ['bottom-left', 'bottom-right', 'top-right', 'top-left', 'bottom-center', 'top-center', 'mid-center'], - _defaultIcons : ['success', 'error', 'info', 'warning'], - - init: function (options, elem) { - this.prepareOptions(options, $.toast.options); - this.process(); - }, - - prepareOptions: function(options, options_to_extend) { - var _options = {}; - if ( ( typeof options === 'string' ) || ( options instanceof Array ) ) { - _options.text = options; - } else { - _options = options; - } - this.options = $.extend( {}, options_to_extend, _options ); - }, - - process: function () { - this.setup(); - this.addToDom(); - this.position(); - this.bindToast(); - this.animate(); - }, - - setup: function () { - - var _toastContent = ''; - - this._toastEl = this._toastEl || $('
', { - class : 'jq-toast-single' - }); - - // For the loader on top - _toastContent += ''; - - if ( this.options.allowToastClose ) { - _toastContent += '×'; - }; - - if ( this.options.text instanceof Array ) { - - if ( this.options.heading ) { - _toastContent +='

' + this.options.heading + '

'; - }; - - _toastContent += ''; - - } else { - if ( this.options.heading ) { - _toastContent +='

' + this.options.heading + '

'; - }; - _toastContent += this.options.text; - } - - this._toastEl.html( _toastContent ); - - if ( this.options.bgColor !== false ) { - this._toastEl.css("background-color", this.options.bgColor); - }; - - if ( this.options.textColor !== false ) { - this._toastEl.css("color", this.options.textColor); - }; - - if ( this.options.textAlign ) { - this._toastEl.css('text-align', this.options.textAlign); - } - - if ( this.options.icon !== false ) { - this._toastEl.addClass('jq-has-icon'); - - if ( $.inArray(this.options.icon, this._defaultIcons) !== -1 ) { - this._toastEl.addClass('jq-icon-' + this.options.icon); - }; - }; - - if ( this.options.class !== false ){ - this._toastEl.addClass(this.options.class) - } - }, - - position: function () { - if ( ( typeof this.options.position === 'string' ) && ( $.inArray( this.options.position, this._positionClasses) !== -1 ) ) { - - if ( this.options.position === 'bottom-center' ) { - this._container.css({ - left: ( $(window).outerWidth() / 2 ) - this._container.outerWidth()/2, - bottom: 20 - }); - } else if ( this.options.position === 'top-center' ) { - this._container.css({ - left: ( $(window).outerWidth() / 2 ) - this._container.outerWidth()/2, - top: 20 - }); - } else if ( this.options.position === 'mid-center' ) { - this._container.css({ - left: ( $(window).outerWidth() / 2 ) - this._container.outerWidth()/2, - top: ( $(window).outerHeight() / 2 ) - this._container.outerHeight()/2 - }); - } else { - this._container.addClass( this.options.position ); - } - - } else if ( typeof this.options.position === 'object' ) { - this._container.css({ - top : this.options.position.top ? this.options.position.top : 'auto', - bottom : this.options.position.bottom ? this.options.position.bottom : 'auto', - left : this.options.position.left ? this.options.position.left : 'auto', - right : this.options.position.right ? this.options.position.right : 'auto' - }); - } else { - this._container.addClass( 'bottom-left' ); - } - }, - - bindToast: function () { - - var that = this; - - this._toastEl.on('afterShown', function () { - that.processLoader(); - }); - - this._toastEl.find('.close-jq-toast-single').on('click', function ( e ) { - - e.preventDefault(); - - if( that.options.showHideTransition === 'fade') { - that._toastEl.trigger('beforeHide'); - that._toastEl.fadeOut(function () { - that._toastEl.trigger('afterHidden'); - }); - } else if ( that.options.showHideTransition === 'slide' ) { - that._toastEl.trigger('beforeHide'); - that._toastEl.slideUp(function () { - that._toastEl.trigger('afterHidden'); - }); - } else { - that._toastEl.trigger('beforeHide'); - that._toastEl.hide(function () { - that._toastEl.trigger('afterHidden'); - }); - } - }); - - if ( typeof this.options.beforeShow == 'function' ) { - this._toastEl.on('beforeShow', function () { - that.options.beforeShow(); - }); - }; - - if ( typeof this.options.afterShown == 'function' ) { - this._toastEl.on('afterShown', function () { - that.options.afterShown(); - }); - }; - - if ( typeof this.options.beforeHide == 'function' ) { - this._toastEl.on('beforeHide', function () { - that.options.beforeHide(); - }); - }; - - if ( typeof this.options.afterHidden == 'function' ) { - this._toastEl.on('afterHidden', function () { - that.options.afterHidden(); - }); - }; - }, - - addToDom: function () { - - var _container = $('.jq-toast-wrap'); - - if ( _container.length === 0 ) { - - _container = $('
',{ - class: "jq-toast-wrap" - }); - - $('body').append( _container ); - - } else if ( !this.options.stack || isNaN( parseInt(this.options.stack, 10) ) ) { - _container.empty(); - } - - _container.find('.jq-toast-single:hidden').remove(); - - _container.append( this._toastEl ); - - if ( this.options.stack && !isNaN( parseInt( this.options.stack ), 10 ) ) { - - var _prevToastCount = _container.find('.jq-toast-single').length, - _extToastCount = _prevToastCount - this.options.stack; - - if ( _extToastCount > 0 ) { - $('.jq-toast-wrap').find('.jq-toast-single').slice(0, _extToastCount).remove(); - }; - - } - - this._container = _container; - }, - - canAutoHide: function () { - return ( this.options.hideAfter !== false ) && !isNaN( parseInt( this.options.hideAfter, 10 ) ); - }, - - processLoader: function () { - // Show the loader only, if auto-hide is on and loader is demanded - if (!this.canAutoHide() || this.options.loader === false) { - return false; - } - - var loader = this._toastEl.find('.jq-toast-loader'); - - // 400 is the default time that jquery uses for fade/slide - // Divide by 1000 for milliseconds to seconds conversion - var transitionTime = (this.options.hideAfter - 400) / 1000 + 's'; - var loaderBg = this.options.loaderBg; - - var style = loader.attr('style') || ''; - style = style.substring(0, style.indexOf('-webkit-transition')); // Remove the last transition definition - - style += '-webkit-transition: width ' + transitionTime + ' ease-in; \ - -o-transition: width ' + transitionTime + ' ease-in; \ - transition: width ' + transitionTime + ' ease-in; \ - background-color: ' + loaderBg + ';'; - - - loader.attr('style', style).addClass('jq-toast-loaded'); - }, - - animate: function () { - - var that = this; - - this._toastEl.hide(); - - this._toastEl.trigger('beforeShow'); - - if ( this.options.showHideTransition.toLowerCase() === 'fade' ) { - this._toastEl.fadeIn(function ( ){ - that._toastEl.trigger('afterShown'); - }); - } else if ( this.options.showHideTransition.toLowerCase() === 'slide' ) { - this._toastEl.slideDown(function ( ){ - that._toastEl.trigger('afterShown'); - }); - } else { - this._toastEl.show(function ( ){ - that._toastEl.trigger('afterShown'); - }); - } - - if (this.canAutoHide()) { - - var that = this; - - window.setTimeout(function(){ - - if ( that.options.showHideTransition.toLowerCase() === 'fade' ) { - that._toastEl.trigger('beforeHide'); - that._toastEl.fadeOut(function () { - that._toastEl.trigger('afterHidden'); - }); - } else if ( that.options.showHideTransition.toLowerCase() === 'slide' ) { - that._toastEl.trigger('beforeHide'); - that._toastEl.slideUp(function () { - that._toastEl.trigger('afterHidden'); - }); - } else { - that._toastEl.trigger('beforeHide'); - that._toastEl.hide(function () { - that._toastEl.trigger('afterHidden'); - }); - } - - }, this.options.hideAfter); - }; - }, - - reset: function ( resetWhat ) { - - if ( resetWhat === 'all' ) { - $('.jq-toast-wrap').remove(); - } else { - this._toastEl.remove(); - } - - }, - - update: function(options) { - this.prepareOptions(options, this.options); - this.setup(); - this.bindToast(); - } - }; - - $.toast = function(options) { - var toast = Object.create(Toast); - toast.init(options, this); - - return { - - reset: function ( what ) { - toast.reset( what ); - }, - - update: function( options ) { - toast.update( options ); - } - } - }; - - $.toast.options = { - text: '', - heading: '', - showHideTransition: 'fade', - allowToastClose: true, - hideAfter: 3000, - loader: true, - loaderBg: '#9EC600', - stack: 5, - position: 'bottom-left', - bgColor: false, - textColor: false, - textAlign: 'left', - icon: false, - beforeShow: function () {}, - afterShown: function () {}, - beforeHide: function () {}, - afterHidden: function () {} - }; - -})( jQuery, window, document ); diff --git a/node_modules/jquery-toast-plugin/dist/jquery.toast.min.css b/node_modules/jquery-toast-plugin/dist/jquery.toast.min.css deleted file mode 100644 index cd7a293..0000000 --- a/node_modules/jquery-toast-plugin/dist/jquery.toast.min.css +++ /dev/null @@ -1 +0,0 @@ -.jq-toast-wrap,.jq-toast-wrap *{margin:0;padding:0}.jq-toast-wrap{display:block;position:fixed;width:250px;pointer-events:none!important;letter-spacing:normal;z-index:9000!important}.jq-toast-wrap.bottom-left{bottom:20px;left:20px}.jq-toast-wrap.bottom-right{bottom:20px;right:40px}.jq-toast-wrap.top-left{top:20px;left:20px}.jq-toast-wrap.top-right{top:20px;right:40px}.jq-toast-single{display:block;width:100%;padding:10px;margin:0 0 5px;border-radius:4px;font-size:12px;font-family:arial,sans-serif;line-height:17px;position:relative;pointer-events:all!important;background-color:#444;color:#fff}.jq-toast-single h2{font-family:arial,sans-serif;font-size:14px;margin:0 0 7px;background:0 0;color:inherit;line-height:inherit;letter-spacing:normal}.jq-toast-single a{color:#eee;text-decoration:none;font-weight:700;border-bottom:1px solid #fff;padding-bottom:3px;font-size:12px}.jq-toast-single ul{margin:0 0 0 15px;background:0 0;padding:0}.jq-toast-single ul li{list-style-type:disc!important;line-height:17px;background:0 0;margin:0;padding:0;letter-spacing:normal}.close-jq-toast-single{position:absolute;top:3px;right:7px;font-size:14px;cursor:pointer}.jq-toast-loader{display:block;position:absolute;top:-2px;height:5px;width:0;left:0;border-radius:5px;background:red}.jq-toast-loaded{width:100%}.jq-has-icon{padding:10px 10px 10px 50px;background-repeat:no-repeat;background-position:10px}.jq-icon-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=);background-color:#31708f;color:#d9edf7;border-color:#bce8f1}.jq-icon-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=);background-color:#8a6d3b;color:#fcf8e3;border-color:#faebcc}.jq-icon-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=);background-color:#a94442;color:#f2dede;border-color:#ebccd1}.jq-icon-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==);color:#dff0d8;background-color:#3c763d;border-color:#d6e9c6} \ No newline at end of file diff --git a/node_modules/jquery-toast-plugin/dist/jquery.toast.min.js b/node_modules/jquery-toast-plugin/dist/jquery.toast.min.js deleted file mode 100644 index 0cfd3d0..0000000 --- a/node_modules/jquery-toast-plugin/dist/jquery.toast.min.js +++ /dev/null @@ -1 +0,0 @@ -"function"!=typeof Object.create&&(Object.create=function(t){function o(){}return o.prototype=t,new o}),function(t,o,i,s){"use strict";var n={_positionClasses:["bottom-left","bottom-right","top-right","top-left","bottom-center","top-center","mid-center"],_defaultIcons:["success","error","info","warning"],init:function(o,i){this.prepareOptions(o,t.toast.options),this.process()},prepareOptions:function(o,i){var s={};"string"==typeof o||o instanceof Array?s.text=o:s=o,this.options=t.extend({},i,s)},process:function(){this.setup(),this.addToDom(),this.position(),this.bindToast(),this.animate()},setup:function(){var o="";if(this._toastEl=this._toastEl||t("
",{"class":"jq-toast-single"}),o+='',this.options.allowToastClose&&(o+='×'),this.options.text instanceof Array){this.options.heading&&(o+='

'+this.options.heading+"

"),o+='"}else this.options.heading&&(o+='

'+this.options.heading+"

"),o+=this.options.text;this._toastEl.html(o),this.options.bgColor!==!1&&this._toastEl.css("background-color",this.options.bgColor),this.options.textColor!==!1&&this._toastEl.css("color",this.options.textColor),this.options.textAlign&&this._toastEl.css("text-align",this.options.textAlign),this.options.icon!==!1&&(this._toastEl.addClass("jq-has-icon"),-1!==t.inArray(this.options.icon,this._defaultIcons)&&this._toastEl.addClass("jq-icon-"+this.options.icon)),this.options["class"]!==!1&&this._toastEl.addClass(this.options["class"])},position:function(){"string"==typeof this.options.position&&-1!==t.inArray(this.options.position,this._positionClasses)?"bottom-center"===this.options.position?this._container.css({left:t(o).outerWidth()/2-this._container.outerWidth()/2,bottom:20}):"top-center"===this.options.position?this._container.css({left:t(o).outerWidth()/2-this._container.outerWidth()/2,top:20}):"mid-center"===this.options.position?this._container.css({left:t(o).outerWidth()/2-this._container.outerWidth()/2,top:t(o).outerHeight()/2-this._container.outerHeight()/2}):this._container.addClass(this.options.position):"object"==typeof this.options.position?this._container.css({top:this.options.position.top?this.options.position.top:"auto",bottom:this.options.position.bottom?this.options.position.bottom:"auto",left:this.options.position.left?this.options.position.left:"auto",right:this.options.position.right?this.options.position.right:"auto"}):this._container.addClass("bottom-left")},bindToast:function(){var t=this;this._toastEl.on("afterShown",function(){t.processLoader()}),this._toastEl.find(".close-jq-toast-single").on("click",function(o){o.preventDefault(),"fade"===t.options.showHideTransition?(t._toastEl.trigger("beforeHide"),t._toastEl.fadeOut(function(){t._toastEl.trigger("afterHidden")})):"slide"===t.options.showHideTransition?(t._toastEl.trigger("beforeHide"),t._toastEl.slideUp(function(){t._toastEl.trigger("afterHidden")})):(t._toastEl.trigger("beforeHide"),t._toastEl.hide(function(){t._toastEl.trigger("afterHidden")}))}),"function"==typeof this.options.beforeShow&&this._toastEl.on("beforeShow",function(){t.options.beforeShow()}),"function"==typeof this.options.afterShown&&this._toastEl.on("afterShown",function(){t.options.afterShown()}),"function"==typeof this.options.beforeHide&&this._toastEl.on("beforeHide",function(){t.options.beforeHide()}),"function"==typeof this.options.afterHidden&&this._toastEl.on("afterHidden",function(){t.options.afterHidden()})},addToDom:function(){var o=t(".jq-toast-wrap");if(0===o.length?(o=t("
",{"class":"jq-toast-wrap"}),t("body").append(o)):(!this.options.stack||isNaN(parseInt(this.options.stack,10)))&&o.empty(),o.find(".jq-toast-single:hidden").remove(),o.append(this._toastEl),this.options.stack&&!isNaN(parseInt(this.options.stack),10)){var i=o.find(".jq-toast-single").length,s=i-this.options.stack;s>0&&t(".jq-toast-wrap").find(".jq-toast-single").slice(0,s).remove()}this._container=o},canAutoHide:function(){return this.options.hideAfter!==!1&&!isNaN(parseInt(this.options.hideAfter,10))},processLoader:function(){if(!this.canAutoHide()||this.options.loader===!1)return!1;var t=this._toastEl.find(".jq-toast-loader"),o=(this.options.hideAfter-400)/1e3+"s",i=this.options.loaderBg,s=t.attr("style")||"";s=s.substring(0,s.indexOf("-webkit-transition")),s+="-webkit-transition: width "+o+" ease-in; -o-transition: width "+o+" ease-in; transition: width "+o+" ease-in; background-color: "+i+";",t.attr("style",s).addClass("jq-toast-loaded")},animate:function(){var t=this;if(this._toastEl.hide(),this._toastEl.trigger("beforeShow"),"fade"===this.options.showHideTransition.toLowerCase()?this._toastEl.fadeIn(function(){t._toastEl.trigger("afterShown")}):"slide"===this.options.showHideTransition.toLowerCase()?this._toastEl.slideDown(function(){t._toastEl.trigger("afterShown")}):this._toastEl.show(function(){t._toastEl.trigger("afterShown")}),this.canAutoHide()){var t=this;o.setTimeout(function(){"fade"===t.options.showHideTransition.toLowerCase()?(t._toastEl.trigger("beforeHide"),t._toastEl.fadeOut(function(){t._toastEl.trigger("afterHidden")})):"slide"===t.options.showHideTransition.toLowerCase()?(t._toastEl.trigger("beforeHide"),t._toastEl.slideUp(function(){t._toastEl.trigger("afterHidden")})):(t._toastEl.trigger("beforeHide"),t._toastEl.hide(function(){t._toastEl.trigger("afterHidden")}))},this.options.hideAfter)}},reset:function(o){"all"===o?t(".jq-toast-wrap").remove():this._toastEl.remove()},update:function(t){this.prepareOptions(t,this.options),this.setup(),this.bindToast()}};t.toast=function(t){var o=Object.create(n);return o.init(t,this),{reset:function(t){o.reset(t)},update:function(t){o.update(t)}}},t.toast.options={text:"",heading:"",showHideTransition:"fade",allowToastClose:!0,hideAfter:3e3,loader:!0,loaderBg:"#9EC600",stack:5,position:"bottom-left",bgColor:!1,textColor:!1,textAlign:"left",icon:!1,beforeShow:function(){},afterShown:function(){},beforeHide:function(){},afterHidden:function(){}}}(jQuery,window,document); \ No newline at end of file diff --git a/node_modules/jquery-toast-plugin/package.json b/node_modules/jquery-toast-plugin/package.json deleted file mode 100644 index 8a2843a..0000000 --- a/node_modules/jquery-toast-plugin/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "jquery-toast-plugin", - "filename": "dist/jquery.toast.min.js", - "main": "dist/jquery.toast.min.js", - "style": "dist/jquery.toast.min.css", - "version": "1.3.2", - "description": "Highly customizable jquery plugin to show toast messages", - "homepage": "http://www.kamranahmed.info/toast", - "keywords": [ - "Toast", - "Toast plugin", - "Jquery toast plugin" - ], - "maintainers": [ - { - "name": "Kamran Ahmed", - "web": "http://kamranahmed.info" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/kamranahmedse/jquery-toast-plugin.git" - }, - "bugs": "https://github.com/kamranahmedse/jquery-toast-plugin/issues", - "licenses": [ - { - "type": "MIT", - "url": "http://www.opensource.org/licenses/mit-license.php" - } - ], - "devDependencies": { - }, - "scripts": { - } -}