Git Product home page Git Product logo

Comments (2)

aehlke avatar aehlke commented on August 25, 2024

Thanks - I do want to change all the events to have before and after hooks. The current system doesn't work for enough use cases an is a little ambiguous.

Sent from my iPhone

On Jan 18, 2012, at 10:27 AM, David [email protected] wrote:

Hi

I just added these events to my local tagit as in the patch below.

Might be useful to someone else, consider merging?

ciao

Campey

diff -r e1abd7d74ee7 mm-gae/web/rich/scripts/tagit/tag-it.js
--- a/mm-gae/web/rich/scripts/tagit/tag-it.js    Wed Jan 18 17:06:20 2012 +0200
+++ b/mm-gae/web/rich/scripts/tagit/tag-it.js    Wed Jan 18 17:23:36 2012 +0200
@@ -74,7 +74,9 @@

            // Event callbacks.
            onTagAdded  : null,
+            afterTagAdded  : null,
            onTagRemoved: null,
+            afterTagRemoved: null,
            onTagClicked: null
        },

@@ -346,6 +348,8 @@

            // insert tag
            this._tagInput.parent().before(tag);
+
+            this._trigger('afterTagAdded', null, tag);
        },

        removeTag: function(tag, animate) {
@@ -371,6 +375,8 @@
            } else {
                tag.remove();
            }
+
+            this._trigger('afterTagRemoved', null, tag);
        },

        removeAll: function() {

Reply to this email directly or view it on GitHub:
#50

from tag-it.

aehlke avatar aehlke commented on August 25, 2024

Fixed with 28e6161 thanks! Please check the updates to the docs for relevant details.

from tag-it.

Related Issues (20)

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.