Giter Site home page Giter Site logo

apprise's People

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  avatar  avatar  avatar

apprise's Issues

Bug with input-like box

There's a bug in version currently available in repository!

Lines 46-59:

if (args) {
    if (args['input']) {
        if (typeof (args['input']) == 'string') {
            inner.append('<div class="aInput"><input type="text" class="aTextbox" t="aTextbox" value="' + args['input'] + '" /></div>');
        }
        if (typeof (args['input']) == 'object') {
            inner.append($('<div class="aInput"></div>').append(args['input']));
        }
        else {
            inner.append('<div class="aInput"><input type="text" class="aTextbox" t="aTextbox" /></div>');
        }
        $('.aTextbox').focus();
    }
}

should actually be:

if (args) {
    if (args['input']) {
        if (typeof (args['input']) == 'string') {
            inner.append('<div class="aInput"><input type="text" class="aTextbox" t="aTextbox" value="' + args['input'] + '" /></div>');
        } else {
            if (typeof (args['input']) == 'object') {
                inner.append($('<div class="aInput"></div>').append(args['input']));
            }
            else {
                inner.append('<div class="aInput"><input type="text" class="aTextbox" t="aTextbox" /></div>');
            }
        }

        $('.aTextbox').focus();
    }

Without this change, if you use textual-like input (apprise('Enter ANY text', {'input':'Test'});) you'll see two input boxes.

You should also move line $('.aTextbox').focus(); out of this scope to after $(document).keydown() definition. In current implementation it doesn't work. Input box doesn't receive focus.

(almost) infinite loop on return key: preventDefault() on keyCode 13

repro: write js on form submit event: if (field is empty) apprise('field is required'). In the form, press return (to submit the form), you get the message, press return (to close the message) => message is closed, but form is re-submitted immediately => message is shown again, etc. Only way out is to use the mouse to click "ok". Fixed with:

if(e.keyCode == 13) {
$('.aButtons > button[value="ok"]').click();
e.preventDefault(); // added this
}

btw, v2 has same bug. Thanks for the nice plug :)

Input Not Registered when using Middle Click to Paste

When using the dialogs that accept input on Linux. If you highlight some text on the page then use middle click to paste content into the box, Apprise will return False rather than the pasted content. Using Ctrl+V to paste the text works as expected. This can be tested using the "What is your name?" example on the AppRise website and is found in both Chrome and Firefox.

Alternatives

On the webpage for Apprise it mentions that the plugin has become depreciated, I was wondering the reason and what the best alternative is?

many thanks
Andy

fix for when document is taller than window itself

appriseInner class is positioned with "fixed"
when document length is too long,
actual dialog is out of sight.

so possible fix for this issue is

line number
27 var aHeight = $(window).height(),
28 aWidth = $(window).width(),

thanks

Vertical centering does not work with default options

I don't understand why, but when you use just as pure call as possible:

apprise(result);

i.e. without any options, it will not be vertically centered, though position: "center" is set in default options. Message box will be 100px from top.

You have to use:

apprise(result, {});

or (of course):

apprise(result, {'position':'center'});

to get the box vertically centered.

This is a little bit strange, but I haven't got enough time to look through the code. Maybe there is some bug inside, that causes this.

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.