Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- changeGridValue: function(model) {
- var id = model.get('id');
- console.log(model.get('value'));
- console.log(model);
- this.container.find('table').jqGrid('setCell', 1, id, model.get('value') + " " + model.get('unit'));
- this.reloadView();
- //this.jqgridElem.setCell();
- define(["jquery" ,
- "underscore" ,
- "backbone" ,
- "viewA",
- "viewB",
- //the others file
- ],function($ , _ , Backbone, viewA, viewB){
- var signInView = Backbone.View.extend({
- initialize: function() {
- // listen to viewA and viewB and fire signIn action in this view
- this.listenTo(this.viewA, "signIn", this.signIn);
- this.listenTo(this.viewB, "signIn", this.signIn);
- },
- events : {
- 'click #signInBtn' : 'signIn'
- },
- signIn : function(youCanPassYourFormModelHere){
- this.trigger("signIn");
- }
- });
- return viewB;
- });
- define(["jquery" ,
- "underscore" ,
- "backbone" ,
- "text!templates/Layout/signIn.html"
- //the others file
- ],function($ , _ , Backbone, SignIn){
- var viewA = Backbone.View.extend({
- initialize: function() {
- },
- events : {
- 'click #signInBtn' : 'signIn'
- },
- signIn : function(){
- this.trigger("signIn", formModel);
- }
- });
- return viewA;
- });
- define(["jquery" ,
- "underscore" ,
- "backbone" ,
- "text!templates/Layout/signIn.html"
- //the others file
- ],function($ , _ , Backbone, SignIn){
- var viewB = Backbone.View.extend({
- initialize: function() {
- },
- events : {
- 'click #signInBtn' : 'signIn'
- },
- signIn : function(){
- this.trigger("signIn", formModel);
- }
- });
- return viewB;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement