backbone-views Questions

4

Solved

Basically what I need is to do something like this App.CommentView = Backbone.View.extend({ className: function() { if (this.model.get('parent_id')) { return 'comment comment-reply'; } else { ...
Staffordshire asked 31/3, 2012 at 12:53

4

Solved

Can you please tell the difference between $el and el in Backbone.js views?
Ita asked 20/5, 2013 at 9:34

3

I'm trying to set the height, width and background image of a <ul> element. Here's what I've got for my Backbone.View: var RackView = Backbone.View.extend({ tagName: 'ul', className: 'r...
Segovia asked 22/8, 2013 at 22:7

3

Solved

I'm using the following code to create the view: LoginForm = Backbone.View.extend({ tagName :"form" ,id : "login-form" ,className :"navbar-form" ,initialize: function () { this.model = new S...
Dupree asked 28/3, 2013 at 15:23

5

Solved

I'm creating a single page application with backbone.js and would like to know the best way to handle changing the title. I was thinking of having a 'title' option in the view and have the router (...
Vodka asked 7/5, 2012 at 14:46

4

Solved

I am implementing my first actual non-tutorial Backbone app, and have 2-ish questions about an aspect of using using backbone.js that isn't settling very well with me, which relates to injecting a ...
Soar asked 24/5, 2012 at 23:34

3

Solved

Is there any way to listen to remove/destroy event on the Backbone View.? I want to do some thing like as below: $(myBackboneView).on('remove', function () { // do some processing }); or $(m...
Sheriesherif asked 27/1, 2014 at 6:3

5

I'm having some difficulties with standard jQuery functionality when I use Meteor. My main 'client/server' JS file looks like this: if (Meteor.is_client) { $(document).ready(function(){ $('#myDiv'...
Saddle asked 13/5, 2012 at 17:35

3

Solved

I am using Backbone and I have a view with events defined: .... events: { 'click .search-button': 'setModelTerm', 'change .source-select': 'setModelSourceId', 'change .source-select': 'activa...
Radioscopy asked 13/11, 2012 at 15:33

3

Solved

I was wondering if it is possible to bind multiple event types in backbone within a single line. Consider the following: var MyView = Backbone.View.extend({ id: 'foo', events: { 'click .bar': ...
Quarrier asked 30/5, 2012 at 6:33

3

Solved

I am relatively new to Backbone and I am running into this problem. I am using Backbone with DustJS My template looks something like this - index.dust <div id="parentView"> <div class=...
Furtive asked 23/10, 2015 at 20:11

7

Solved

In my simple project I have 2 views - a line item view (Brand) and App. I have attached function that allows selecting multiple items: var BrandView = Backbone.View.extend({ ...some code... tog...

5

I have a layout view with a region, in that region I have a item view that triggers an event but it doesn't seem to be bubbled up to the layout view. Am I doing something wrong or is this designed ...
Case asked 31/5, 2013 at 22:47

1

Edit According the Hammer Github page this bug was due to Manager leaks and should be fixed in the 2.0.5 version - this version is not built online but one can built it by himself. More info can b...

1

Solved

I was reading the documentation of the latest version (2.3.0) and it is saying that Application Regions are now deprecated. Application Regions Warning: deprecated This feature is depre...
Reputable asked 6/1, 2015 at 21:41

4

Solved

I'm building a form with Backbone and looking to have it validate its fields on the "blur" event. Hooking into the event is easy enough, but what I'm curious about is whether or not the model shou...
Euphorbiaceous asked 17/12, 2014 at 0:11

4

Solved

I am learning JavaScript MVC application development using Backbone.js, and having issues rendering model collection in the view. Here's what I want to do: After the page finishes loading, retrie...
Disembarrass asked 11/7, 2013 at 22:8

3

Solved

I have a model named person: var person = Backbone.Model.extend({ initialize: function(){ console.log('cool'); }, defaults:{ names:['a','k','d','s','h','t'] } }) Now I have a view: var ...
Cleodel asked 21/4, 2012 at 6:56

5

Solved

I'm using a composite view that has $.dialog called on it's $el. The composite view is then listing items from a collection. Now i've tried multiple ways to render the collection items: fetching ...
Heel asked 22/2, 2013 at 5:30

2

Solved

I have been working with backbone for a while and I am now using a number of views. In some of my views I sometimes add custom attributes like: var DataGrid = Backbone.View.extend({ className:"d...
Per asked 4/10, 2012 at 9:18

4

Solved

I have a backbone view that looks like this: var myView = Backbone.view.extend({ events: {'click .myClass': 'myFunction'}, initialze: //initialize function, render: //render function, myFuncti...
Reportage asked 19/2, 2014 at 3:41

3

Solved

Note: I understand that other libraries (e.g., Marionette) could greatly simplify view-based issues. However, let's assume that that is not an option here. Let's say that we have a parent view for...
Mormon asked 10/1, 2014 at 20:35

1

Solved

I'm getting this error, when I want to initialize the view from router class. Error is: Uncaught TypeError: Object # has no method '_ensureElement' BlogFormView: App.BlogFormView = Backbone.View...
Jennette asked 10/12, 2013 at 7:17

2

Solved

I'm trying to populate my Backbone collection from a local API and change the view to show the data. The fetch() call in my collection seems to succeed, and grabs the data, but the fetch operation ...
Laudable asked 20/10, 2013 at 10:27

2

Solved

I am creating a single page application, and I am quite new to backbone. I have a problem with creating multiple views which uses the same wrapper-div. My setup: I have added a close function to ...
Godavari asked 29/12, 2012 at 16:39

© 2022 - 2024 — McMap. All rights reserved.