Giter Club home page Giter Club logo

notifit's People

Contributors

alaaattya avatar bronek89 avatar gcorpas avatar lok0919 avatar naoxink avatar penguinpowernz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

notifit's Issues

jQuery Conflict

Jou!
If use plugin with Prototype Library (Magento):
notifIt/notifIt/js/notifIt.js:328 > Uncaught TypeError: Cannot read property 'animate' of null

Solution:
add to function notif_dismiss():
$ = jQuery;
like this solved into other plugin functions, but not notif_dismiss()

screen.width

maybe you can use $(window).width() instead of screen.width in case the browser is not full screen.

CSS has side effect

Hi, Thansk for your lovely plugin.

Current CSS rules are not in a proper namespace and affect other part of website which use the same class name (.info, .โ€ฆ). Here is a better style (in less format):
Please also consider using a simpler name for notifIt!-1.1 folder. I suggest notifit for both css class and folder name. Thanks.

#ui_notifIt {
  position: fixed;
  top: 10px;
  right: 10px;
  cursor: pointer;
  overflow: hidden;
  -webkit-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.3);
  -moz-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.3);
  -o-box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.3);
  box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.3);
  -wekbit-border-radius: 5px;
  -moz-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;
  z-index: 2000;
  /* Color setup */
  /* You are free to change all of this */
  &.success {
    background-color: yellowgreen;
    color: white;
  }
  &.error {
    background-color: orangered;
    color: white;
  }
  &.warning {
    background-color: orange;
    color: white;
  }
  &.info {
    background-color: deepskyblue;
    color: white;
  }
  &.default {
    background-color: #EEE;
    color: #444;

  }
  &:hover {
    opacity: 1 !important;
  }
  p {
    text-align: center;
    font-family: sans-serif;
    font-size: 14px;
    padding: 0;
    margin: 0;
  }

}

Bottom position out animation has bugs

When I use the bottom position in the notification, while the notification exits it teleports to the top of the screen instead of falling and fading to the bottom of the screen.

notif({
            msg: "<b>Success:</b> Survey was successfully saved",
            bgcolor:"#000000",
            opacity:0.9,
            position:"bottom",
            offset:80,
 })

Can I pass variables through callback?

I want to run an ajax request based on response of confirm response. However I cant find a way to pass variables, if i try i lose confirm alert response of which button was clicked..
Can you suggest a workaround?

Modal implementation

Hi, I change your script adding the modal behaviour.

this is my code:

in css:

ui_overlay_notifIt{

position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #000;
opacity: 0.5;
filter: alpha(opacity=50);
z-index:2;

}

in javascript:
var overlay = '

'; //NEW
var defaults = {
type: "info",
width: 400,
height: 60,
position: "right",
autohide: 1,
msg: "This is my default message",
opacity: 1,
multiline: 0,
fade: 0,
bgcolor: "",
color: "",
timeout: 5000,
modal:false //NEW
};

clearInterval(to);
if(defaults.modal) $("body").append(overlay); //NEW
$("body").append(div);

function notifit_dismiss(to, config) {
clearInterval(to);
if (!config.fade) {
switch(config.position){
case "center":
$("#ui_notifIt").animate({
top: parseInt(config.height - (config.height / 2))
}, 100, function() {
$("#ui_notifIt").animate({
top: parseInt(0 - (config.height * 2))
}, 100, function() {
$("#ui_notifIt").remove();
if(config.modal)$("#ui_overlay_notifIt").remove(); //NEW
});
});
break;
case "right":
$("#ui_notifIt").animate({
right: parseFloat(config.width - (config.width * 0.9))
}, 100, function() {
$("#ui_notifIt").animate({
right: parseInt(0 - (config.width * 2))
}, 100, function() {
$("#ui_notifIt").remove();
if(config.modal)$("#ui_overlay_notifIt").remove(); //NEW
});
});
break;
case "left":
$("#ui_notifIt").animate({
left: parseFloat(config.width - (config.width * 0.9))
}, 100, function() {
$("#ui_notifIt").animate({
left: parseInt(0 - (config.width * 2))
}, 100, function() {
$("#ui_notifIt").remove();
if(config.modal)$("#ui_overlay_notifIt").remove(); //NEW
});
});
break;
}
} else {
$("#ui_notifIt").fadeOut("slow", function() {
$("#ui_notifIt").remove();
if(config.modal)$("#ui_overlay_notifIt").remove(); //NEW
});
}
}

thanks for your work
Marco

jQuery reference

Excellent project @naoxink!

I kept getting "TypeError: Cannot read property 'extend' of undefined"

So in my setup I needed to replace references to "$" with "jQuery".

Is this something we should consider in the source here as well? Presumably other people might have conflicts with $ used for other purposes as well. I believe there's a way to do it without flat out replacing all the references.

z-index not woking

Hi

Suppose i'm adding z-index, it not considering.

i'm adding like this

"z-index" : 100000,

Thanks,
kanna.

Exception occurred while notif_confirm() was called in the second time.

Exception :
Uncaught TypeError: $bg.hide is not a function
Trace:
_show @ notifIt.js:386
notif_confirm @ notifIt.js:438

Cause:
$bg and $confirm will get the DOM Element but not Jquery Object while notif_confirm() is called second time. See notifIt.js:354-355

Fixed:
[Line 354] var $confirm = $('.notifit_confirm')[0] ? $('.notifit_confirm') : null;
[Line 355] var $bg = $('.notifit_confirm_bg')[0] ? $('.notifit_confirm_bg') : null;

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.