Commits

Rich Manalang [Atlassian] committed 7bf0ea8

cleaned up comments

  • Participants
  • Parent commits c39a522

Comments (0)

Files changed (3)

File backbone.brace.js

         }
     };
 
-    /*
-     * Generates an `extend` method that overrides Backbone's default `extend`. The new extend calls Backbone's `extend`, then:
-     * <ul>
-     *     <li>Adds all mixins specified in the `mixins` array.</li>
-     *     <li>Adds a `Brace.EventsMixinCreator` to mix in on and trigger methods for events specified in the `namedEvents` array,</li>
-     *     <li>Adds a `Brace.AttributesMixinCreator` to mix in get and set methods for attributes specified in the `attributes` array,</li>
-     * </ul>
-     */
+     // Generates an `extend` method that overrides Backbone's default `extend`. The new extend calls Backbone's `extend`, then:
+     //
+     //   * Adds all mixins specified in the `mixins` array
+     //   * Adds a `Brace.EventsMixinCreator` to mix in on and trigger methods for events specified in the `namedEvents` array
+     //   * Adds a `Brace.AttributesMixinCreator` to mix in get and set methods for attributes specified in the `attributes` array
     function generateMixinExtend(oldExtend) {
         return function newExtend(protoProps, classProps) {
             var child;
         };
     }
 
-    // Applies extensions to the given constructor function:
-    // <ul>
-    //   <li>Sets `extend` to a method generated by `generateMixinExtend`</li>
-    // </ul>
+    // Applies extensions to the given constructor function. Sets `extend` to a method generated by `generateMixinExtend`
     function applyExtensions(ctor) {
         var child = ctor.extend();
         var oldExtend = ctor.extend;
     }
 
 
-    // Applies extensions to the given constructor function:
-    // <ul>
-    //   <li>Sets `extend` to a method generated by `generateMixinExtend`</li>
-    // </ul>
+    // Applies extensions to the given constructor function. Sets `extend` to a method generated by `generateMixinExtend`
     function applyModelExtensions(ctor) {
         var child = applyExtensions(ctor);
         overrideSetGet(ctor, child);

File dist/backbone.brace.js

         }
     };
 
-    /*
-     * Generates an `extend` method that overrides Backbone's default `extend`. The new extend calls Backbone's `extend`, then:
-     * <ul>
-     *     <li>Adds all mixins specified in the `mixins` array.</li>
-     *     <li>Adds a `Brace.EventsMixinCreator` to mix in on and trigger methods for events specified in the `namedEvents` array,</li>
-     *     <li>Adds a `Brace.AttributesMixinCreator` to mix in get and set methods for attributes specified in the `attributes` array,</li>
-     * </ul>
-     */
+     // Generates an `extend` method that overrides Backbone's default `extend`. The new extend calls Backbone's `extend`, then:
+     //
+     //   * Adds all mixins specified in the `mixins` array
+     //   * Adds a `Brace.EventsMixinCreator` to mix in on and trigger methods for events specified in the `namedEvents` array
+     //   * Adds a `Brace.AttributesMixinCreator` to mix in get and set methods for attributes specified in the `attributes` array
     function generateMixinExtend(oldExtend) {
         return function newExtend(protoProps, classProps) {
             var child;
         };
     }
 
-    // Applies extensions to the given constructor function:
-    // <ul>
-    //   <li>Sets `extend` to a method generated by `generateMixinExtend`</li>
-    // </ul>
+    // Applies extensions to the given constructor function. Sets `extend` to a method generated by `generateMixinExtend`
     function applyExtensions(ctor) {
         var child = ctor.extend();
         var oldExtend = ctor.extend;
     }
 
 
-    // Applies extensions to the given constructor function:
-    // <ul>
-    //   <li>Sets `extend` to a method generated by `generateMixinExtend`</li>
-    // </ul>
+    // Applies extensions to the given constructor function. Sets `extend` to a method generated by `generateMixinExtend`
     function applyModelExtensions(ctor) {
         var child = applyExtensions(ctor);
         overrideSetGet(ctor, child);

File docs/backbone.brace.html

 
             <span class="k">return</span> <span class="nx">eventMethods</span><span class="p">;</span>
         <span class="p">}</span>
-    <span class="p">};</span>
+    <span class="p">};</span></pre></div>             </td>           </tr>                               <tr id="section-20">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-20">&#182;</a>               </div>               <p>Generates an <code>extend</code> method that overrides Backbone's default <code>extend</code>. The new extend calls Backbone's <code>extend</code>, then:</p>
 
-    <span class="cm">/*</span>
-<span class="cm">     * Generates an `extend` method that overrides Backbone&#39;s default `extend`. The new extend calls Backbone&#39;s `extend`, then:</span>
-<span class="cm">     * &lt;ul&gt;</span>
-<span class="cm">     *     &lt;li&gt;Adds all mixins specified in the `mixins` array.&lt;/li&gt;</span>
-<span class="cm">     *     &lt;li&gt;Adds a `Brace.EventsMixinCreator` to mix in on and trigger methods for events specified in the `namedEvents` array,&lt;/li&gt;</span>
-<span class="cm">     *     &lt;li&gt;Adds a `Brace.AttributesMixinCreator` to mix in get and set methods for attributes specified in the `attributes` array,&lt;/li&gt;</span>
-<span class="cm">     * &lt;/ul&gt;</span>
-<span class="cm">     */</span>
-    <span class="kd">function</span> <span class="nx">generateMixinExtend</span><span class="p">(</span><span class="nx">oldExtend</span><span class="p">)</span> <span class="p">{</span>
+<ul>
+<li>Adds all mixins specified in the <code>mixins</code> array</li>
+<li>Adds a <code>Brace.EventsMixinCreator</code> to mix in on and trigger methods for events specified in the <code>namedEvents</code> array</li>
+<li>Adds a <code>Brace.AttributesMixinCreator</code> to mix in get and set methods for attributes specified in the <code>attributes</code> array</li>
+</ul>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">generateMixinExtend</span><span class="p">(</span><span class="nx">oldExtend</span><span class="p">)</span> <span class="p">{</span>
         <span class="k">return</span> <span class="kd">function</span> <span class="nx">newExtend</span><span class="p">(</span><span class="nx">protoProps</span><span class="p">,</span> <span class="nx">classProps</span><span class="p">)</span> <span class="p">{</span>
             <span class="kd">var</span> <span class="nx">child</span><span class="p">;</span>
-            <span class="kd">var</span> <span class="nx">cleanProtoProps</span> <span class="o">=</span> <span class="nx">_</span><span class="p">.</span><span class="nx">extend</span><span class="p">({},</span> <span class="nx">protoProps</span><span class="p">);</span></pre></div>             </td>           </tr>                               <tr id="section-20">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-20">&#182;</a>               </div>               <p>Remove <code>mixins</code> - we don't want to see them on the created prototype. Note that we do want to see <code>namedAttributes</code> and <code>namedEvents</code> for debugging</p>             </td>             <td class="code">               <div class="highlight"><pre>            <span class="kd">var</span> <span class="nx">mixins</span><span class="p">;</span>
+            <span class="kd">var</span> <span class="nx">cleanProtoProps</span> <span class="o">=</span> <span class="nx">_</span><span class="p">.</span><span class="nx">extend</span><span class="p">({},</span> <span class="nx">protoProps</span><span class="p">);</span></pre></div>             </td>           </tr>                               <tr id="section-21">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-21">&#182;</a>               </div>               <p>Remove <code>mixins</code> - we don't want to see them on the created prototype. Note that we do want to see <code>namedAttributes</code> and <code>namedEvents</code> for debugging</p>             </td>             <td class="code">               <div class="highlight"><pre>            <span class="kd">var</span> <span class="nx">mixins</span><span class="p">;</span>
             <span class="k">if</span> <span class="p">(</span><span class="nx">protoProps</span> <span class="o">&amp;&amp;</span> <span class="nx">protoProps</span><span class="p">.</span><span class="nx">mixins</span><span class="p">)</span> <span class="p">{</span>
                 <span class="nx">mixins</span> <span class="o">=</span> <span class="nx">protoProps</span><span class="p">.</span><span class="nx">mixins</span><span class="p">;</span>
                 <span class="k">delete</span> <span class="nx">cleanProtoProps</span><span class="p">.</span><span class="nx">mixins</span><span class="p">;</span>
             <span class="nx">child</span><span class="p">.</span><span class="nx">extend</span> <span class="o">=</span> <span class="nx">newExtend</span><span class="p">;</span>
             <span class="k">return</span> <span class="nx">child</span><span class="p">;</span>
         <span class="p">};</span>
-    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-21">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-21">&#182;</a>               </div>               <p>Overrides Backbone's <code>get</code> and <code>set</code> methods to validate that the attribute being get / set is a namedAttribute.</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">overrideSetGet</span><span class="p">(</span><span class="nx">ctor</span><span class="p">,</span> <span class="nx">childCtor</span><span class="p">)</span> <span class="p">{</span>
+    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-22">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-22">&#182;</a>               </div>               <p>Overrides Backbone's <code>get</code> and <code>set</code> methods to validate that the attribute being get / set is a namedAttribute.</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">overrideSetGet</span><span class="p">(</span><span class="nx">ctor</span><span class="p">,</span> <span class="nx">childCtor</span><span class="p">)</span> <span class="p">{</span>
         <span class="kd">var</span> <span class="nx">proto</span> <span class="o">=</span> <span class="nx">ctor</span><span class="p">.</span><span class="nx">prototype</span><span class="p">;</span>
         <span class="kd">var</span> <span class="nx">childProto</span> <span class="o">=</span> <span class="nx">childCtor</span><span class="p">.</span><span class="nx">prototype</span><span class="p">;</span>
 
         <span class="kd">var</span> <span class="nx">oldSet</span> <span class="o">=</span> <span class="nx">proto</span><span class="p">.</span><span class="nx">set</span><span class="p">;</span>
-        <span class="nx">childProto</span><span class="p">.</span><span class="nx">set</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">key</span><span class="p">,</span> <span class="nx">value</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-22">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-22">&#182;</a>               </div>               <p>TODO: has, escape, unset</p>             </td>             <td class="code">               <div class="highlight"><pre>            <span class="kd">var</span> <span class="nx">attrs</span><span class="p">,</span>
+        <span class="nx">childProto</span><span class="p">.</span><span class="nx">set</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">key</span><span class="p">,</span> <span class="nx">value</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-23">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-23">&#182;</a>               </div>               <p>TODO: has, escape, unset</p>             </td>             <td class="code">               <div class="highlight"><pre>            <span class="kd">var</span> <span class="nx">attrs</span><span class="p">,</span>
                 <span class="nx">attributes</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">namedAttributes</span><span class="p">;</span>
             <span class="k">if</span> <span class="p">(</span><span class="nx">attributes</span><span class="p">)</span> <span class="p">{</span>
                 <span class="k">if</span> <span class="p">(</span><span class="nx">_</span><span class="p">.</span><span class="nx">isObject</span><span class="p">(</span><span class="nx">key</span><span class="p">)</span> <span class="o">||</span> <span class="nx">key</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span>
             <span class="p">}</span>
             <span class="k">return</span> <span class="nx">oldGet</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="k">this</span><span class="p">,</span> <span class="nx">arguments</span><span class="p">);</span>
         <span class="p">};</span>
-    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-23">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-23">&#182;</a>               </div>               <p>Applies extensions to the given constructor function:</p>
-
-<ul>
-  <li>Sets `extend` to a method generated by `generateMixinExtend`</li>
-</ul>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">ctor</span><span class="p">)</span> <span class="p">{</span>
+    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-24">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-24">&#182;</a>               </div>               <p>Applies extensions to the given constructor function. Sets <code>extend</code> to a method generated by <code>generateMixinExtend</code></p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">ctor</span><span class="p">)</span> <span class="p">{</span>
         <span class="kd">var</span> <span class="nx">child</span> <span class="o">=</span> <span class="nx">ctor</span><span class="p">.</span><span class="nx">extend</span><span class="p">();</span>
         <span class="kd">var</span> <span class="nx">oldExtend</span> <span class="o">=</span> <span class="nx">ctor</span><span class="p">.</span><span class="nx">extend</span><span class="p">;</span>
         <span class="nx">child</span><span class="p">.</span><span class="nx">extend</span> <span class="o">=</span> <span class="nx">generateMixinExtend</span><span class="p">(</span><span class="nx">oldExtend</span><span class="p">);</span>
         <span class="k">return</span> <span class="nx">child</span><span class="p">;</span>
-    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-24">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-24">&#182;</a>               </div>               <p>Applies extensions to the given constructor function:</p>
-
-<ul>
-  <li>Sets `extend` to a method generated by `generateMixinExtend`</li>
-</ul>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">applyModelExtensions</span><span class="p">(</span><span class="nx">ctor</span><span class="p">)</span> <span class="p">{</span>
+    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-25">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-25">&#182;</a>               </div>               <p>Applies extensions to the given constructor function. Sets <code>extend</code> to a method generated by <code>generateMixinExtend</code></p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">applyModelExtensions</span><span class="p">(</span><span class="nx">ctor</span><span class="p">)</span> <span class="p">{</span>
         <span class="kd">var</span> <span class="nx">child</span> <span class="o">=</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">ctor</span><span class="p">);</span>
         <span class="nx">overrideSetGet</span><span class="p">(</span><span class="nx">ctor</span><span class="p">,</span> <span class="nx">child</span><span class="p">);</span>
         <span class="k">return</span> <span class="nx">child</span><span class="p">;</span>
-    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-25">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-25">&#182;</a>               </div>               <p>Extend base Backbone classes</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">Model</span> <span class="o">=</span> <span class="nx">applyModelExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">Model</span><span class="p">);</span>
+    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-26">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-26">&#182;</a>               </div>               <p>Extend base Backbone classes</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">Model</span> <span class="o">=</span> <span class="nx">applyModelExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">Model</span><span class="p">);</span>
     <span class="nx">Brace</span><span class="p">.</span><span class="nx">Collection</span> <span class="o">=</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">Collection</span><span class="p">);</span>
     <span class="nx">Brace</span><span class="p">.</span><span class="nx">View</span> <span class="o">=</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">View</span><span class="p">);</span>
     <span class="nx">Brace</span><span class="p">.</span><span class="nx">Router</span> <span class="o">=</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">Router</span><span class="p">);</span>