Tagged Questions
1
vote
0answers
10 views
Precompiled Handlebars template with RequireJS
I have a handlebars template which I have manually precompiled and saved as - testTemplate.handlebars.
Now, in my requireJS + Backbone code I have the below function -
...
0
votes
0answers
15 views
Backbone fetch of parse relation
normally when you fetch by backbone a collection,you have a series of model with its attribute as name,surname( typed as a string). With this kind of type's attribute is easy to exctract the value of ...
0
votes
0answers
14 views
Set collection fetch with a specific ajax call
I need to create a collection but I need to fetch by this collection not by its url but a specific ajax call inside. It's possible?I'm trying to explain better:in normal case when fetch by a ...
0
votes
1answer
35 views
How to properly use Backbone views and router
I have a sequence of page states that essentially mimic a shopping cart checkout process like so:
var ItemsCollection = Backbone.Collection.extend({
model: ItemModel,
url "/items"
});
...
0
votes
0answers
29 views
multiple url in Backbone Model
I want to call multiple URL's in SearchResult(main) model.
My code works fine with one URL but i need to make multiple request for each model either I can call URL in individual model or create some ...
1
vote
1answer
29 views
Get DOM element from template in backbone view
I am using Backbone.js to display a list of people and their data.
Every person has it's own <div>. The div is generated by _.template and contains <input> fields to display the person's ...
1
vote
1answer
30 views
Backbone multi events
I'm trying to understand following code:
muConfigView.on("mu:field:changed", function() {
updateButtonState();
}, this);
or
this.trigger('validate:fields');
I have seen examples with events ...
1
vote
2answers
28 views
How to update the whole Backbone.js collection that in database?
I have a collection (an object list) in database. I can fetch it like: collectionModel.fetch()
But then user changes something on that collection. When user clickes on save button, the whole ...
0
votes
1answer
36 views
Backbone DOM events firing multiple times
Hi guys I'm building a backbone app for the first time - and its going great!
However, I don't think I am creating views for my collection of models in the correct way and when I bind events they ...
0
votes
0answers
16 views
How to Select “totalRecords” with paginator in backgrid.js
i have requirement to select whole records which are fetched by database. i am using pagination in this .which is allow to select limited number of records. when I am click on select all for example ...
0
votes
0answers
15 views
window.history.back event is firing twice on phonegap & backbone ipad application
I have a backbone application for ipad using phonegap.
I'm using the backbone router to navigate inside the app. My issue is that in a particular view the window.history.back() method is firing twice, ...
0
votes
0answers
11 views
How to unit test instantiated object: qUnit/sonar/phantomJS
Using qUnit to do unit test and sonar to do code coverage.
Does anyone know how to test so I can cover instantiated object:
Given I initialize this object on a different file
var search_view = new ...
2
votes
2answers
50 views
Removing Multiple Objects from Javascript Array Breaks Half Way Through
I have an Array of a few hundred JSON Objects...
var self.collection = [Object, Object, Object, Object, Object, Object…]
Each one looks like this...
0: Object
id: "25093712"
name: "John ...
1
vote
1answer
25 views
A better way to organize Docco pages
I have a large Backbone-style application (~100 files), and I'm trying to select the best method to automate documentation.
I'm experimenting with docco, (with grunt-docco2) but I'm running into ...
1
vote
1answer
38 views
Uncaught TypeError: Object [object Window] has no method 'each' function
Hey guys here is my js file and I am taking error message about each function at line:24 and I do not know why I couldnt find whats wrong. I am just trying to see the list of items on the console.log ...