20,596
questions
0
votes
0
answers
35
views
Not hitting the correct endpoint with wp backbone models using wp.api.models.Post.extend
I'm creating a plugin that has a custom post type called tasks. I would like to use backbone.js models to perform crud operations to tasks via wp rest api. When I try to extend the models, following ...
0
votes
0
answers
15
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 ...
0
votes
1
answer
42
views
Inserting unique attribute to HML tag element in loop
I have a supersite that uses all kinds of js, including backbone.js and underscore.js. On one of my pages, I have the piece of code below:
<#loop:main_tlds_price_add#>
<tr>
<td ...
1
vote
0
answers
31
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
votes
2
answers
35
views
Using javascript template file, how can I check for a null or an undefined value?
I am using a Javascript HTML template engine. How do I check for null or undefined in my HTML?
If ctx.m.transferTicket is null or undefined, I want to treat that as being false.
SO I have this code
{%...
0
votes
2
answers
39
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 ...
0
votes
0
answers
42
views
GrapesJS builds on macOS but not on Windows 10+
I am hitting a wall on this one. I am building GrapesJS, a web page editor (https://github.com/GrapesJS/grapesjs). It builds fine on macOS but not on Windows 10+. Same version of node, latest release ...
0
votes
0
answers
47
views
Uncaught ReferenceError: SwaggerClient is not defined
we try to update swagger-client from 2.0 to 3.0, but after we update it started throwing error for SwaggerClient is not defined.
0
votes
0
answers
79
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/...
0
votes
0
answers
30
views
Find Model in Backbone
I am trying to find a model object from backbone.
For this I have made a method which is calling in loop and passing id to this method.
initializeRepairOrder: (id) ->
@repair_order = App.Models....
0
votes
1
answer
30
views
I want to hide div after render call complete in backbone js
I want to hide div based on userId is null or not, I am getting userId from function. After loading html I want to hide one div based on condition.
render: function() {
userId = kf.helper....
0
votes
0
answers
82
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' );
...
0
votes
0
answers
26
views
Template rendering in backbone view
I am using backbone as a front end in rails 7 application. In view file I am not able to load template as a path.
rails view file code is
- content_for :javascript do
- javascript_include_tag '...
1
vote
1
answer
21
views
How can I set an attribute on specifically the last child view of a Marionette CollectionView?
I have a Marionette CollectionView with a child view:
const BreadcrumbListView = Marionette.CollectionView.extend({
...
childView: BreadcrumbView,
...
})
const BreadcrumbView = Marionette.View.extend(...
0
votes
0
answers
33
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 ...