Coder Social home page Coder Social logo

typewatch's People

Contributors

attomos avatar davidlesieur avatar dennyferra avatar dsteinbrunner avatar iraycd avatar josephruscio avatar kennynaoh avatar marquisknox avatar mrahmadt avatar nelson6e65 avatar pvnr0082t avatar zkwentz 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  avatar  avatar  avatar  avatar  avatar  avatar

typewatch's Issues

Uncaught TypeError: Cannot read property 'toLowerCase'

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
    at jQuery.fn.init.val (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js:8201)
    at applicationUsersRegisterIndexValidateUsername (index.self-1ec7504e1c62604622326b3b5cb2feeaaf573eaf947a783c2b32784ce33aa2d2.js:27)
    at HTMLInputElement.callback (index.self-1ec7504e1c62604622326b3b5cb2feeaaf573eaf947a783c2b32784ce33aa2d2.js:10)
    at checkElement (jquery.typewatch.self-c0e2658d2eb4075588545012bae9e075cce3c801af9b0720461d040daa5e5184.js:50)
    at timerCallbackFx (jquery.typewatch.self-c0e2658d2eb4075588545012bae9e075cce3c801af9b0720461d040daa5e5184.js:88)

Issue seems to be in jquery.typewatch.js:50 or jquery.typewatch.js:88

Dynamic elements

Hi, I am creating dynamic text inputs with ajax, then I am trying to call typewatch on their ID, but nothing happens.

Am I doing something wrong?
$("#new_element").typeWatch( options );

It works fine on static inputs

Thank you for help

does not fire event if new input equal saved input

hi,

if i write an string into input field, delete the string and type the same string again, typewatch is not firing the callback event.

is this an bug or an feature?
can you make that as config variable?

if this is an feature, can you explain why u do that?

thanks
mtz

Add support for jQuery promise

Would be nice to have typeWatch return jquery promise, and use done(function(){}) instead of callback passed as parameter.

Use nodejs dependency injection to pass jQuery object instead of window.$

Hello

I'm trying to inject jQUery as a dependency in the typewatch plugin but it does not works...

var $ = require("jquery");
require('jquery.typewatch', {'jQuery': $});

I'm forced to works with the window object, what is not cool if I want to use multiple jQuery version.

window.$ = require("jquery");
require('jquery.typewatch');

Any advice?

Destroy typewatch?

Hi There,

Short story I'm currently implement type watch input text on a boostrap modal. This modal has two trigger button, if I execute any button, typewatch only work on the first button that I was execute. I dont know exaclty whats going on. So, I decided want to try destroying typeWatch first and then revoke while modal shown.

Anyone can tell me how to destroy typewatch?

thanks

Suggestion: Handle data length reductions

There are two common cases (actually two derivatives of the same case, that just feel different) that would be nice to see handled by this plugin:

  1. Full erase. Type some data, Shift+Home, Backspace. This case is when you've typed and then erased everything. The callback doesn't fire, and thus you can't restore state. (I'm using this to trigger a filter on a table of data, and a full erase should restore all data).
  2. with captureLength set to 3, type 3 chars, let event fire, then backspace. This case should also be able to let the user restore default state, since 2 characters are considered the same as no characters, but the callback won't fire because the input has only 2 characters.

These are really both the same case: when the data length decreases from over the captureLength setting, to under the captureLength setting.

Event does not trigger when just using the mouse

I have a text field which when clicked on shows previously typed in text (default browser behaviour). The problem is if you click in the text field and then click one of the words, the callback function never gets triggered.

If you are on the previous field and press tab, down, down, tab (select the first item in the list and tab to the next field) then everything works fine so it's just an issue with mouse support.

Bower: Version tag

Hi,

You should add tag version on your git repository.

Bower is not workink.

My bower.json:

{
  "name": "acme/denmo",
  "dependencies": {
    "jquery": "2.0.*",
    "jquery-ui": "1.10.*",
    "select2": "3.4.*",
    "highcharts-components": "3.0.*",
    "bootstrap": "3.1.*",
    "font-awesome": "4.2.*",
    "jknob": "1.2.*",
    "excanvas": "latest",
    "jquery.cookie": "1.3.*",
    "jquery.uniform": "2.0.*",
    "jquery.hotkeys": "https://github.com/jeresig/jquery.hotkeys.git#~0.1.0",
    "jquery.scrollTo": "1.4.*",
    "typeahead.js": "0.10.*",
    "handlebars": "1.3.*",
    "moment": "2.8.*",
    "jquery-typewatch": "2.2.*"
  }
}

On bower update:

bower jquery-typewatch#2.2.*            not-cached git://github.com/dennyferra/TypeWatch.git#2.2.*
bower jquery-typewatch#2.2.*               resolve git://github.com/dennyferra/TypeWatch.git#2.2.*
bower jquery-typewatch#2.2.*          ENORESTARGET No tag found that was able to satisfy 2.2.*

Additional error details:
No versions found in git://github.com/dennyferra/TypeWatch.git

Thanks.

Support for other form inputs

Hi,

Great that someone took the time to do this. This basically supports the form autosave on fields change, which is something we had to write code to in our project.

Only thing preventing us to use this is the lack of support for other input types, like select boxes, hidden fields, checkboxes, the list goes on, not forgetting the HTML5 new inputs, which practically all browsers (at least the newer versions) already support.

How much trouble would it be?

[enhancement] Add missing bower.json.

Hey, maintainer(s) of dennyferra/TypeWatch!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library dennyferra/TypeWatch is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "dennyferra/TypeWatch",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

Delay Animation

You may add little code to prevent start TypeWatch if is active and content div animated:

    var options = jQuery.extend({
        wait: 700,
                    delayAnimation: 3000,
        callback: function() { },
        highlight: true,
        captureLength: 3,
        inputTypes: _supportedInputTypes
    }, o);
            var Stop = false;
    function checkElement(timer, override) {
                if(Stop === false) {
        var value = jQuery(timer.el).val();
        // Fire if text >= options.captureLength AND text != saved text OR if override AND text >= options.captureLength
        if ((value.length >= options.captureLength && value.toUpperCase() != timer.text)
            || (override && value.length >= options.captureLength))
        {
                            Stop = true;
            timer.text = value.toUpperCase();
            timer.cb.call(timer.el, value);
                            setTimeout(function() {
                                Stop = false;
                                checkElement(timer, override);
                            }, options.delayAnimation);
        }
                }
    };

Regards

'Captute length is zero and changed value' causing website to lock up

We use this plugin on a 'quick search' function on a website with a minimum length set. The function being called is doing an AJAX query on a PHP file to get data out from the database. When a user enters something in to this quick search and realize they typed something wrong after it has searched, they clear out what they have entered. Before they start typing again, after 750ms, the function is being called due to the capture length being 0 and the value is now different. This is now calling AJAX on a PHP file which is ultimately searching the whole database due to using 'LIKE' queries.

I'm not sure on what the purpose of line 46 in the JS file is for, but we had to comment it out for our use.

Old version installed with bower

When I try to install with bower I can only get version 2.2.2, not 3.0

$ bower install jquery-typewatch
bower jquery-typewatch#*    not-cached https://github.com/dennyferra/TypeWatch.git#*
bower jquery-typewatch#*       resolve https://github.com/dennyferra/TypeWatch.git#*
bower jquery-typewatch#*      checkout v2.2.2
bower jquery-typewatch#*  invalid-meta The "description" is too long, the limit is 140 characters
bower jquery-typewatch#*      resolved https://github.com/dennyferra/TypeWatch.git#2.2.2

and when trying to force version:

$ bower install jquery-typewatch#3.0
bower jquery-typewatch#3.0  not-cached https://github.com/dennyferra/TypeWatch.git#3.0
bower jquery-typewatch#3.0     resolve https://github.com/dennyferra/TypeWatch.git#3.0
bower jquery-typewatch#3.0     ENORESTARGET No tag found that was able to satisfy 3.0

Additional error details:
Available versions in https://github.com/dennyferra/TypeWatch.git: 2.2.2, 2.2.1

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.