[Pkg-javascript-commits] [backbone] 24/211: Merging Issue #135. Multiple views per DOM element.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:59:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.5.0
in repository backbone.

commit d01b1364993f7c940a16e1377c658d8b31b292eb
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Mon Dec 13 09:40:54 2010 -0500

    Merging Issue #135. Multiple views per DOM element.
---
 backbone.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/backbone.js b/backbone.js
index 44310f6..c422b6d 100644
--- a/backbone.js
+++ b/backbone.js
@@ -772,7 +772,7 @@
   // Creating a Backbone.View creates its initial element outside of the DOM,
   // if an existing element is not provided...
   Backbone.View = function(options) {
-    this.vid = _.uniqueId('v');
+    this.cid = _.uniqueId('view');
     this._configure(options || {});
     this._ensureElement();
     this.delegateEvents();
@@ -844,13 +844,13 @@
     // not `change`, `submit`, and `reset` in Internet Explorer.
     delegateEvents : function(events) {
       if (!(events || (events = this.events))) return;
-      $(this.el).unbind('.delegateEvents' + this.vid);
+      $(this.el).unbind('.delegateEvents' + this.cid);
       for (var key in events) {
         var methodName = events[key];
         var match = key.match(eventSplitter);
         var eventName = match[1], selector = match[2];
         var method = _.bind(this[methodName], this);
-        eventName += '.delegateEvents' + this.vid;
+        eventName += '.delegateEvents' + this.cid;
         if (selector === '') {
           $(this.el).bind(eventName, method);
         } else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list