20,555 questions
0
votes
1
answer
38
views
Strange behavior and rendering on model.set() command
At the beginning, I've added a property to the model:
this.model = new Model()
this.model.set("level","test")
In another routine, I've to refresh this "level" property ...
1
vote
0
answers
54
views
How does triggers clicked worked in backbone.js
Recently, I have got a rails project project with backbone.js and CoffeeScript to support however I don't have previous work experience with backbone.js.
Some of model relationship of the projects are:...
1
vote
2
answers
51
views
Sort Backbone Collection based on a file order list
I have a inherited a system that utilizes a Backbone collection of files that needs to be sorted based on a series of values. The order variable is saved when you slide different files into a position ...
1
vote
0
answers
130
views
Webpack: "SyntaxError: Invalid regular expression flags" during runtime
Webpack 5
Node v18.12.1
Backbone
I'm trying to package a client/server website using webpack (Express.js/Backbone.js) but I get this error during runtime. Not sure where to look for the problem.
[24/...
1
vote
0
answers
139
views
How to add options to a Select with JQuery (Ninja Forms)
jQuery(document).on('nfFormReady', function() {
var textField = jQuery( '#nf-field-3918' );
var selectField = jQuery( '#nf-field-3962' );
textField.val( 'New Value' ).trigger( 'change' );
...
1
vote
0
answers
38
views
Uncaught TypeError: App.Routers.Maintenances.MyRouter is not a constructor
I am using backbone js as frontend in rails 7 application. In index.html file I have called backbone main file. code is coming in this file. But here I have initialise router file. In which getting ...
1
vote
1
answer
30
views
How to pass data to a View in Backbone.js?
I am trying to pass data to SingleTodo view in Backbone.js. But, it is not passing properly.
For more clarity, please see the code and outputs given below.
Code:
temp.html
<h1>This is Temp</...
0
votes
1
answer
76
views
How to customize pagination by hiding numbers
I want to customize the bootstrap-table pagination by hiding numbers and show next, previous,first and last like :
enter image description here
I want to customize the bootstrap-table pagination by ...
0
votes
1
answer
277
views
How to write simple functions in Backbone.js?
I am working with some legacy website which is using the Backbone.js framework for the frontend. I'm new to the frontend and Backbone.js seems very confusing when compared with simple JavaScript.
...
0
votes
1
answer
64
views
bind attribute in custom event
In SugarCRM (backbone.js) I am trying to get the custom attribute user_id from a list (in .hbs file)
<div class='dropdown usersLegend'>
<ul class='dropdown-menu'></ul>
</div&...
1
vote
1
answer
75
views
How to properly describe events in Backbone views with JSdoc?
I am describing JavaScript code that uses the Backbone framework.
I am wondering how to document events that are declared in my views.
Let's say I have a class with this events:
define([], function(...
0
votes
2
answers
67
views
I am trying to sort my collection when I add a new object to it, but it is not sorting and there are no errors
in my Backbone view, a user can add a new educational research opportunity by hitting a button.
Each research opportunity has a sequence in the database and this is how it's ordered on my page.
When I ...
0
votes
0
answers
28
views
How Redirect to another codeigniter controller after submitting data in backbone.js
Ive created a backbone application that sends form data to the codeigniter backend for verification using a MySQL database.
Below is the authenticate event of the backbone view that will be called on ...
1
vote
1
answer
110
views
View not initializing in Backbone.js
Ive created a simple backbone app that gets data from MySQL database about users to display in a view called LeaderBoardView.
Below is the HTML code for the view,
<body>
<div id="...
0
votes
1
answer
123
views
Problem trying to access javascript modules inside a Backbone.js view template using Webpack
I'm doing some maintenance on a Java web-application composed of JSON APIs and a UI based on Backbone.js and React, bundled using Webpack.
This application has a single main page, index.html and a ...
1
vote
1
answer
66
views
My Backbone Routing forgets everything when I hit the browser refresh button
I have an older web app that is a mix of Backbone and .Net 6. When I first start the app in Visual Studio 2022 for development, it loads fine and everything works great.
I use Backbone routing and a ...
1
vote
3
answers
4k
views
How can we hide scroll bar arrows but retain the scroll bar in html?
I have html code which shows scroll bar but has the following look and feel
I wish to remove the arrows of up and down but retain the scroll bar . How can this be achieved .
0
votes
1
answer
107
views
how to have template helpers change dynamically? backbone.js
I have a template helpers method in my view like so:
templateHelpers() {
return {
url : this.model.get('url')
};
}
And I use the url variable in my template; However, the URL ...
0
votes
0
answers
608
views
Scroll area in js
I have a page in js . I wish that whenever I scroll I define how much of the page is scrolled . I don't want that I handle the scroll event , keep a state of old location , detect direction and then ...
0
votes
0
answers
51
views
Jquery Datatable : navigating to next page throws RangeError
I have limited understanding of Jquery and DataTables and have run into a strange issue. Hoping someone can help me resolve or point me in right direction.
I am using Backbone.js and made an ajax call ...
0
votes
1
answer
52
views
Why am I having a problem accessing $el in my view in BackboneJS?
I'm trying to utilize the append method through the el in the BackBoneJS view. I'm using Handlebars.
When I run my code, I get this in the console:
main.js:14 Uncaught TypeError: Cannot read ...
0
votes
1
answer
1k
views
"Module not found" when migrating to Webpack 5
I am trying to migrate my React app to webpack 5.72.0 (from 4.42.1). So I also have webpack-cli (4.9.2), webpack-dev-server (4.8.1) and babel (7.17.9).
My problem is as follows. When I build my ...
0
votes
0
answers
21
views
Backbone fetch() error when get JSON file from Google-Drive [duplicate]
When use <link rel="stylesheet" type="text/css" href="https://drive.google.com/uc?export=view&id=[stylesheet - ID]"> //True
and use <img class="item-...
1
vote
1
answer
79
views
jquery ui datepicker not appearing on click with marionette/backbone
Using marionette and trying to display a jquery date picker. However, when I click on the input, the calendar does not appear.
This is my view:
const view = app.Views.Layout.extend({
template: require(...
0
votes
1
answer
25
views
Backbone Model.fetch() - how does it take care of duplicates
As per the backbone js documentation, model.fetch() merges current model's state with server if different exists in the attributes.
Question 1: Is there a way I can tell backbone to overwrite the ...