Commit b47e362f1a07eac7252c0c0f1938130c0fc2a045
Fix title undefined in content or page
Looks like the fix was not pushed in the last commit which was
mentioned. Pushing the fix now.
| | | | 148 | <li>a mistyped address</li> | 148 | <li>a mistyped address</li> |
---|
149 | <li>an out-of-date link</li> | 149 | <li>an out-of-date link</li> |
---|
150 | </ul> | 150 | </ul> |
---|
151 | <script> | | <script> |
---|
152 | var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host; | | var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host; |
---|
153 | </script> | | </script> |
---|
154 | <script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script> | | <script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script> |
---|
155 | </div> | 151 | </div> |
---|
156 | </body> | 152 | </body> |
---|
157 | </html> | 153 | </html> |
---|
| | | | 28 | }, | 28 | }, |
---|
29 | render: function(el) { | 29 | render: function(el) { |
---|
30 | $(el).append(this.el); | 30 | $(el).append(this.el); |
---|
31 | var str = '<h4>'+ this.model.get('title') +'</h4> <p>' + | | var str = '<h4>'+ this.model.get('title') +'</h4> <p>' + |
---|
| | 31 | var title = this.model.get('title') || ''; | | | 32 | var str = '<h4>'+ title +'</h4> <p>' + |
---|
32 | this.model.get('data') + '</p>'; | 33 | this.model.get('data') + '</p>'; |
---|
33 | $(this.el).html(str); | 34 | $(this.el).html(str); |
---|
34 | M.appendAttrs(this.model, this.el); | 35 | M.appendAttrs(this.model, this.el); |
---|
… | | … | |
---|
308 | var children = model.get('children'); | 308 | var children = model.get('children'); |
---|
309 | if(_.isEmpty(children)) { | 309 | if(_.isEmpty(children)) { |
---|
310 | li = '<li><a href="#/' + child + '">' + M.humanReadable(child) + '</a></li>'; | 310 | li = '<li><a href="#/' + child + '">' + M.humanReadable(child) + '</a></li>'; |
---|
| | 311 | console.log(li); |
---|
311 | } | 312 | } |
---|
312 | else { | 313 | else { |
---|
313 | li = dropdown_template({ | 314 | li = dropdown_template({ |
---|
… | | … | |
---|
316 | list: _.map(children, M.humanReadable) | 316 | list: _.map(children, M.humanReadable) |
---|
317 | }); | 317 | }); |
---|
318 | } | 318 | } |
---|
319 | $(li).appendTo('#nav-' + page + ' .nav'); | | $(li).appendTo('#nav-' + page + ' .nav'); |
---|
| | 319 | console.log($('#nav-' + page + ' .nav')); | | | 320 | //$(li).appendTo('#nav-' + page + ' .nav'); |
---|
| | 321 | $('#nav-'+page+' .nav').append(li); |
---|
320 | }); | 322 | }); |
---|
321 | }, | 323 | }, |
---|
322 | updateBreadcrumbs: function(event) { | 324 | updateBreadcrumbs: function(event) { |
---|
… | | … | |
---|
498 | M.init(); | 498 | M.init(); |
---|
499 | }); | 499 | }); |
---|
500 | }; | 500 | }; |
---|
| | 501 | |
---|
| | 502 | // export BaseType to the M namespace |
---|
| | 503 | M.BaseType = BaseType; |
---|
501 | | 504 | |
---|
502 | })(M); | 505 | })(M); |
---|
| | | | 11 | }()); | 11 | }()); |
---|
12 | } | 12 | } |
---|
13 | | 13 | |
---|
14 | // Place any jQuery/helper plugins in here. | | // Place any jQuery/helper plugins in here. |
---|
| | 14 | (function(M) { | | | 15 | M.jsonEditor = { |
---|
| | 16 | edit: function() { |
---|
| | 17 | _.each(M.pages.models, function(page) { |
---|
| | 18 | }); |
---|
| | 19 | } |
---|
| | 20 | }; |
---|
| | 21 | })(M); |
---|