[Pkg-javascript-commits] [backbone] 07/37: added a few missing things to the change log

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:02:46 UTC 2014


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

js pushed a commit to tag 0.9.1
in repository backbone.

commit 6ffd392da4c5277ba466e11c1c643734278e0160
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Tue Jan 31 10:21:54 2012 -0500

    added a few missing things to the change log
---
 index.html | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/index.html b/index.html
index d6821bb..d4041f6 100644
--- a/index.html
+++ b/index.html
@@ -546,10 +546,15 @@ object.trigger("alert", "an event");
       <b class="header">on</b><code>object.on(event, callback, [context])</code><span class="alias">Alias: bind</span>
       <br />
       Bind a <b>callback</b> function to an object. The callback will be invoked
-      whenever the <b>event</b> (specified by an arbitrary string identifier) is fired.
+      whenever the <b>event</b> is fired.
       If you have a large number of different events on a page, the convention is to use colons to
-      namespace them: <tt>"poll:start"</tt>, or <tt>"change:selection"</tt>
+      namespace them: <tt>"poll:start"</tt>, or <tt>"change:selection"</tt>.
+      The event string may also be a space-delimited list of several events...
     </p>
+    
+<pre>
+book.on("change:title change:author", ...);
+</pre>
 
     <p>
       To supply a <b>context</b> value for <tt>this</tt> when the callback is invoked,
@@ -591,8 +596,9 @@ object.off();                    // Removes all callbacks on object.
     <p id="Events-trigger">
       <b class="header">trigger</b><code>object.trigger(event, [*args])</code>
       <br />
-      Trigger callbacks for the given <b>event</b>. Subsequent arguments to
-      <b>trigger</b> will be passed along to the event callbacks.
+      Trigger callbacks for the given <b>event</b>, or space-delimited list of events. 
+      Subsequent arguments to <b>trigger</b> will be passed along to the 
+      event callbacks.
     </p>
 
     <h2 id="Model">Backbone.Model</h2>
@@ -3148,6 +3154,10 @@ ActiveRecord::Base.include_root_in_json = false
         re-delegating events on the new DOM element.
       </li>
       <li>
+        You can now bind and trigger multiple spaced-delimited events at once.
+        For example: <tt>model.on("change:name change:age", ...)</tt>
+      </li>
+      <li>
         When you don't know the key in advance, you may now call 
         <tt>model.set(key, value)</tt> as well as <tt>save</tt>.
       </li>
@@ -3178,6 +3188,11 @@ ActiveRecord::Base.include_root_in_json = false
         values as well as the string names of existing view methods.
       </li>
       <li>
+        Validation has gotten an overhaul — a model's <tt>validate</tt> function
+        will now be run even for silent changes, and you can no longer create 
+        a model in an initially invalid state.
+      </li>
+      <li>
         Added <tt>shuffle</tt> and <tt>initial</tt> to collections, proxied 
         from Underscore.
       </li>
@@ -3212,6 +3227,10 @@ ActiveRecord::Base.include_root_in_json = false
         Although you shouldn't be writing your routes with them in any case —
         leading slashes (<tt>/</tt>) are now stripped from routes.
       </li>
+      <li>
+        Calling <tt>clone</tt> on a model now only passes the attributes
+        for duplication, not a reference to the model itself.
+      </li>
     </ul>
 
     <p>

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