Code Monkey home page Code Monkey logo

toastr's Issues

Full Bar Notification

We recently have started using toastr due to the simple nature of calling it versus other javascript notifications. One fallback that was causing me to look at other options was the ability to display messages across the top or bottom of the screen as a full bar. I think toastr is very user friendly as a simple corner notification, but for some apps my users will want a notification that says "Stop!" and not a simple corner notification.

Trying to use toastr

Sorry for simple question.

I included toastr.js, toastr.cs and toastr.-responsive.css
This works:
toastr.info("Hello world");

But this doesn't work. And I don't get any error in browser console.
toastr.options.positionClass = "toast-top-full-width"; toastr.info("Hello world");

What would be the cause ?

Associate toast with a dom Node

It would be great if I could have a toast appear on any container that I would set rather than just the body tag at large

URL on click

Can we have an option to set the url when a notification is clicked? Instead of just closing it.

Responsive sizes

Bootstrap currently uses other ranges for responsiveness.
I think the following sizes should be used to get messages resized at the same time with the rest of the layout:
@media all and (min-width: 241px) and (max-width: 319px) ...
@media all and (min-width: 320px) and (max-width: 479px) ...
@media all and (min-width: 480px) and (max-width: 767px) ...
@media all and (min-width: 768px) ...

Update docs/demo site

Update docs/demo site with new features introduced in 1.0.3.

  • onclick handler for custom logic on toast click
  • more..?

default close button option

hi,
great library, but can we have a default close button in the corner of a toaster so when user click it closes the toaster instance ?

thanks in advanced

Easier way to use ToastR options

Per my conversation with John, it would be nice if you can set up the object that contains the various options and have that be received as an argument in the Toastr call so a) it can apply to only one toast, and b) you can do it inline with the call and have less code. It's still handy to have it apply to all toasts if you leave it out as an argument.

Prevent infinite mouseenter mouseleave

add this function on click event to prevent infinite "mouseenter mouseleave" loop.
(after hover at line 123)

            $toastElement.hover(stickAround, fadeAway)

            $toastElement.click(function() {
                $(this).off('mouseenter mouseleave');
                fadeAway();
            })

Please use Git tags in repo for versions

We're using Bower to pull down the source.

If you could use tags in your repo, this would help us out a lot to control versioning.

You can go back and retroactively tag SHAs... for instance 51855e9 should be 1.1.1, etc.

Thanks!

Not working.

From nuget, I install into a fresh MVC 3 project jQuery 1.9.1, then toastr 1.2.1 using the nuget package manager.

The following html file:

<!DOCTYPE html>
<html lang="en">
<head>
    <title></title>
    <meta charset="utf-8"/>
    <link href="Content/toastr.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="Scripts/toastr.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            toastr.options = { debug: true };
            toastr.info("Hello? Is This thing on?");
            toastr.success("Anything");
            toastr.error("Nada.");
        });
    </script>
</head>
<body>

</body>
</html>

shows nothing in Google Chrome v 25.0.1364.97 m nor IE 9 on Windows 7.

If I uninstall toastr 1.2.1 and Install-Package toastr -Version 1.1.4.2 it works just dandy.

With 1.2.1 I get nothing - the debug messages print, but don't seem to contain anything useful.

Thanks!

All Sticky Option

Currently, hovering over a node only makes the notification that you are hovering over sticky. I spent a couple of hours trying to write an option that would cause hovering over a notification to keep all displayed notifications sticky but I don't have a real good feel for how to do this.

I not exactly comfortable in JavaScript, and my attempts failed. I made a little bit of progress. I was able to make all the notifications not fade out when hovering one, all notifications fade out when hovering stops, but there were a lot of bugs that I couldn't work out after a while.

So, I figured I would throw it up here in case someone else wants to take a crack at the idea.

Some of the systems I use may have multiple notifications pop-up at once and the user doesn't have time to read them all before they start disappearing. I could set them to click to remove, but they don't want the extra clicks. Neither do they want longer timeouts for messages that they aren't interested in. So, hover over one to keep all on the screen seems an appropriate feature (and has been used by the system in the past).

If someone wants to give me tips on how to go about it, I would be more than happy to take another crack at it.

Option to use Font Awesome icons

It would be nice if there was a way to optionally pass in your own icon, or better yet, pass in a Font Awesome icon.

Great library though, thanks!

Middle Position

You can position it on the left or the right, but I don't see any way to position the message in the centre of the page. Would it be possible to add this?

Checkboxes in form could be nice?

I really like the form it allows to have in a toast and I was wondering if it would be hard to allow checkboxes and radio buttons since right now a simple click on a checkbox would dismiss the toast.

Support for jQuery 1.4.4

This is a great plugin! Would it be possible to have toastr work with jQuery 1.4.4?
The reason being is I am using the Drupal 7 framework which forces developers to use 1.4.4.

Group toasts by type

I noticed that at certain times the user finds it difficult to read a sequence of notifications, because they disappear quickly.

I suggest an option to group the toast by type (success, info, warning, error) showing the number of notifications that have the same type.

and then, when you dismiss a toast, the toast that is "behind" is displayed and the number of notifications decreased.

add close button

hi,
beautiful library,
but could we add a small close button on any corner so user can know that the notification can be closed ?

thanks in advanced.

Reset fadeout on mouse over

It would be nice to emulate what Outlook popups do when the user hovers the mouse over it.

So you'd need to reset the timer, but if the fadeout has already begun, you'd need to fade back in, and reset the timer.

BTW, nice work guys.

Luc

Close button for sticky toasts?

I've implemented toastr on a website but I'm finding that more than a few users are confused about how to close the toasts that do not disappear on their own.

I initialize them as such: {timeOut: 0, extendedTimeOut: 0} and while it works fine functionally, it doesn't convey to the user how to dismiss the toast.

So I was wondering if there could also be an option to show a small 'X' close button/text in the top right corner of the toast to help make it obvious that they have to click to close it?

BOM in files

Hi, is it necessary to save all files with BOM ? I notice problem in some automatic assets management libraries. I think you can safely remove it without any problem. Thanks

Communicating with ASP.Net back end

I read about this plug in in Visual Studio magazine and it looks awesome. I am pretty new to jQuery and am trying to fibure out how to communicate with my ASP.Net backend. Say, I have an update occuring on a page, how do I get the message (error or otherwise) from the c# code to the plug in and then trigger the display.

Sorry for the newbie question.

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.