Giter Site home page Giter Site logo

vdepizzol / jquery-tokeninput Goto Github PK

View Code? Open in Web Editor NEW

This project forked from loopj/jquery-tokeninput

51.0 51.0 20.0 367 KB

This is my own flavor of original Tokeninput jQuery plugin created by James Smith (http://loopj.com/).

PHP 1.88% JavaScript 98.12%

jquery-tokeninput's Introduction

Human being.

Born when the planet had 354 ppm of CO2 in the atmosphere.

Current interests:
Computer-human interfaces, free software/open source, software development, user experience, web standards, game design, human history, linguistics, urbanism, typography, photography, drawing.

Before: Designer at GitHub, Microsoft, Xamarin.

Current tools:

  • VSCodium, Terminal, Git
  • GNOME, Fedora, Linux
  • CSS, HTML, Javascript
  • Figma, Inkscape, Blender, Gimp
  • Godot, Aseprite, Krita, PureRef
  • RawTherapee, Davinci Resolve
  • Pen, pencil, paper

Pronoums: he/him or they/them

jquery-tokeninput's People

Contributors

alexgorbatchev avatar blasto333 avatar chrisfinne avatar cranberyxl avatar flop avatar liferealized avatar loopj avatar markhalliwell avatar paneidos avatar shadowfiend avatar spatical avatar vdepizzol 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

Watchers

 avatar  avatar  avatar  avatar

jquery-tokeninput's Issues

Search results not narrowing as I type

As I type the tag name, the full list of tags is returned every time. I am using a server for the json. They are all of the form {id,name} so I am assuming that the default search of name should work correctly.

I ended up using the code below to narrow the results. Should something like this be happening by default?

onResult:function(results){
     return $.grep(results,function(value,index){
          return (value.name).indexOf($('.token-input-input-token-facebook input').val())!=-1
     });
}

Complete fork?

I'm thinking about making this a full fork. It feels like your features are far ahead of the official lib and they don't seem to be maintaining it. I would really like to convert all names to proper camel casing, it hurts me to see php naming in a js lib :)

what do you think?

Some tags get enclosed in single quotes

Hi I've noticed that some tags get enclosed in single quotes. I couldn't identify a pattern though. Is this a bug that you're aware of or could it be that I'm doing something wrong?

tokenLimit duplicates entries on enter key press

This is a fantastic fork of the tokeninput project. Just one thing I noticed, when limiting the tokenLimit to 1 (ie I only want to have one entry in the text box), if I press enter in a custom value, and then press enter a few times, then every time I press enter it will add the duplicate entry.

Hopefully this is an easy fix :)

jQuery tokeninput text_field overlap in the first iteration

I am using jQuery - tokeninput(vdepizzol) plugin with rails 3. And i have a problem, if event_criteria is_free I use jQuery tokeninput to introduce tags in tag_tokens field, but the problem is the tokeninput fields are overlaped in the first subscription_preference object. if I have 2 subcription_preferences, the two tokeninput fields are overlapped in the first one and the second subcription_preferences object have a simple text_field without tokeninput. This is my code:

 <% @subscription.subscription_preference.each do |subscription_preference| %>
  <%  
      eventCriteria = EventCriteria.find_by_id(subscription_preference.event_criteria_id)
      if eventCriteria.is_free? %>

    <% form_for subscription_preference do |f| %>

    <%= f.label :tag_tokens, eventCriteria.name+"(Nueva gestion)" %>
    <%= f.text_field :tag_tokens, "data-pre" => subscription_preference.tags.map(&:attributes).to_json %>
    <b></b>
    <%= f.submit "Save preference", :disable_with => 'Saving preference...' %>

    <% end %>
    <% end%>
    <% end%>`

How can I correct it?
I also have other problem, I put allowCustomEntry: true and I can add custom tag in the text_field but when I submit it it gives me this error "Couldn't find Tag with ID=0".

Change tokenLimit on the fly

It would be awesome if we could change the tokenLimit parameter without having to re-create the tokenInput field again!

Not working in IE8

Script is failing in IE8 on the following line:

input.type = 'hidden';

From stackoverflow I am gathering that changing the form type is not allowed in IE. I have been unable to figure out a fix for this so far.

One minor problem with regex!

Your solution is working perfect, I'm so glad I found this. One problem is that one of my tags is "C++", this seems to break your regular expression pattern.

allowCustomEntry: true gives active record error

Hi I found your fork of jquery-tokeninput after watching and following ryan bates railscasts. This fork is supposed to give the ability to add new entries by using the allowCustomEntry: true method. I added the method to my application.rb file and as a result I can enter custom names and a name with an 'X' to delete is created. However, when I submit the form I am given an active record error as follows:

ActiveRecord::RecordNotFound in PostsController#create

Couldn't find Artist with ID=0

It seems to be breaking when actually trying to create the new entry, my code follows the railscasts exactly. Let me know if I can show you anything which would help. Thanks

Add, remove, clear functionality

Loopj's has public methods making it easy to add, remove, or clear. Is there any plan to implement these features in your fork?

on screen 'undefined'

Hi, when enabling allowCustomEntry and parseName, searchColumns at the same time, on screen token for custom token is 'undefined'

e.g. my options:

allowCustomEntry: true,
parseName: function(item) {
return item.value
},
searchColumns: ['value']

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.