[Pkg-javascript-commits] [backbone] 59/101: shadowing
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 16:58:29 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.1.0
in repository backbone.
commit ad3387b0550d02aa17c3194fbe720f0aa20de4c7
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date: Tue Oct 12 09:03:55 2010 -0400
shadowing
---
index.html | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/index.html b/index.html
index 8219ffc..f756343 100644
--- a/index.html
+++ b/index.html
@@ -23,7 +23,7 @@
overflow-x: hidden;
padding: 15px 0 0 30px;
border-right: 1px solid #ddd;
- box-shadow: 0 0 10px 000; -webkit-box-shadow: 0 0 25px #ddd; -moz-box-shadow: ;
+ box-shadow: 0 0 20px #ccc; -webkit-box-shadow: 0 0 20px #ccc; -moz-box-shadow: 0 0 20px #ccc;
}
a.toc_title, a.toc_title:visited {
display: block;
@@ -64,7 +64,7 @@
background-position: -51px 0;
}
p, li {
- margin: 16px 0 16px 0;
+ margin: 20px 0;
width: 550px;
}
a, a:visited {
@@ -300,8 +300,13 @@
<pre class="runnable">
var obj = {};
+
_.extend(obj, Backbone.Events);
-obj.bind("alert", function(msg){ alert("Triggered " + msg); });
+
+obj.bind("alert", function(msg) {
+ alert("Triggered " + msg);
+});
+
obj.trigger("alert", "an event");</pre>
<p id="Events-bind">
@@ -340,7 +345,7 @@ obj.trigger("alert", "an event");</pre>
extend <tt>Backbone.Model</tt> with your domain-specific methods, and
<b>Model</b> provides a basic set of functionality for managing changes.
</p>
-
+
<p>
The following is a contrived example, but it demonstrates defining a model
with a custom method, setting an attribute, and firing an event when the
@@ -366,6 +371,11 @@ sidebar.set({color: 'white'});
sidebar.promptColor();</pre>
+ <p id="Model-extend">
+ <b class="header">extend</b><code>Backbone.Model.extend(protoProps, [classProps])</code>
+ <br />
+ Create a Model class by extending Backbone.Model.
+ </p>
<h2 id="changes">Change Log</h2>
--
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