client/js/save-once.js
changeset 359 9fc64b41466c
parent 357 70e577b0cdc6
child 368 3abc79964948
equal deleted inserted replaced
358:e780c82c5b4f 359:9fc64b41466c
    64         }
    64         }
    65     };
    65     };
    66     _load();
    66     _load();
    67     _proj.on("add:nodes add:edges add:users change", function(_model) {
    67     _proj.on("add:nodes add:edges add:users change", function(_model) {
    68 	    _model.on("change remove", function(_model) {
    68 	    _model.on("change remove", function(_model) {
    69 	    	if(!(_model.changedAttributes.length == 1 && _model.hasChanged('save_status'))) {
    69 	    	if(!(_model.changedAttributes.length === 1 && _model.hasChanged('save_status'))) {
    70 	    		_checkLeave();
    70 	    		_checkLeave();
    71 	    	}
    71 	    	}
    72 	    });
    72 	    });
    73 		if(!(_proj.changedAttributes.length == 1 && _proj.hasChanged('save_status'))) {
    73 		if(!(_proj.changedAttributes.length === 1 && _proj.hasChanged('save_status'))) {
    74 		    _checkLeave();
    74 		    _checkLeave();
    75     	}
    75     	}
    76     });
    76     });
    77     _renkan.renderer.save = function() {
    77     _renkan.renderer.save = function() {
    78         if ($(".Rk-Save-Button").hasClass("disabled")) {
    78         if ($(".Rk-Save-Button").hasClass("disabled")) {