[Lada-commits] [PATCH 3 of 4] Cosmetics
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 8 10:52:12 CEST 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1428483135 -7200
# Node ID baef70abfe71c53f206a62ccd6956fb5fdbd6dad
# Parent af16a257d5f6f56ecdfeeeb3ae222e949ab9d8a2
Cosmetics.
diff -r af16a257d5f6 -r baef70abfe71 app/controller/form/Messung.js
--- a/app/controller/form/Messung.js Wed Apr 08 10:51:39 2015 +0200
+++ b/app/controller/form/Messung.js Wed Apr 08 10:52:15 2015 +0200
@@ -65,19 +65,21 @@
formPanel.getForm().loadRecord(formPanel.getForm().getRecord());
var json = response.request.scope.reader.jsonData;
if (json) {
- if(json.errors.totalCount > 0 || json.warnings.totalCount > 0) {
+ if (json.errors.totalCount > 0 || json.warnings.totalCount > 0) {
formPanel.setMessages(json.errors, json.warnings);
}
- if(json.message){
+ if (json.message) {
Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title')
- +' #'+json.message,
+ + ' #' + json.message,
Lada.getApplication().bundle.getMsg(json.message));
- } else {
+ }
+ else {
Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title'),
Lada.getApplication().bundle.getMsg('err.msg.generic.body'));
}
- } else {
+ }
+ else {
Ext.Msg.alert(Lada.getApplication().bundle.getMsg('err.msg.save.title'),
Lada.getApplication().bundle.getMsg('err.msg.response.body'));
}
diff -r af16a257d5f6 -r baef70abfe71 app/view/window/MessungEdit.js
--- a/app/view/window/MessungEdit.js Wed Apr 08 10:51:39 2015 +0200
+++ b/app/view/window/MessungEdit.js Wed Apr 08 10:52:15 2015 +0200
@@ -111,18 +111,18 @@
Ext.ClassManager.get('Lada.model.Messung').load(this.record.get('id'), {
failure: function(record, response) {
// TODO
- console.log("An unhandled Failure occured. See following Response and Record");
+ console.log('An unhandled Failure occured. See following Response and Record');
console.log(response);
console.log(record);
},
success: function(record, response) {
var me = this;
- if (this.probe.get('treeModified') < record.get('treeModified')) {
+ if (this.probe.get('treeModified') < record.get('parentModified')) {
Ext.Msg.show({
title: 'Probe nicht aktuell!',
- msg: 'Die zugehörige Probe wurde verändert.\n'+
- 'Möchten Sie zu der Probe zurückkehren und neu laden?\n'+
- 'Ohne das erneute Laden der Probe wird das Speichern'+
+ msg: 'Die zugehörige Probe wurde verändert.\n' +
+ 'Möchten Sie zu der Probe zurückkehren und neu laden?\n' +
+ 'Ohne das erneute Laden der Probe wird das Speichern' +
' der Messung nicht möglich sein.',
buttons: Ext.Msg.OKCANCEL,
icon: Ext.Msg.WARNING,
@@ -156,23 +156,23 @@
});
},
- disableForm: function(){
+ disableForm: function() {
this.down('messungform').setReadOnly(true);
this.disableChildren();
},
- enableForm: function(){
+ enableForm: function() {
this.down('messungform').setReadOnly(false);
this.enableChildren();
},
- disableChildren: function(){
+ disableChildren: function() {
this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(true);
this.down('fset[name=messungstatus]').down('statusgrid').setReadOnly(true);
this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(true);
},
- enableChildren: function(){
+ enableChildren: function() {
this.down('fset[name=messwerte]').down('messwertgrid').setReadOnly(false);
this.down('fset[name=messungstatus]').down('statusgrid').setReadOnly(false);
this.down('fset[name=messungskommentare]').down('mkommentargrid').setReadOnly(false);
diff -r af16a257d5f6 -r baef70abfe71 app/view/window/ProbeEdit.js
--- a/app/view/window/ProbeEdit.js Wed Apr 08 10:51:39 2015 +0200
+++ b/app/view/window/ProbeEdit.js Wed Apr 08 10:52:15 2015 +0200
@@ -122,8 +122,8 @@
Ext.ClassManager.get('Lada.model.Probe').load(this.record.get('id'), {
failure: function(record, action) {
// TODO
- console.log("An unhandled Failure occured. See following Response and Record");
- console.log(response);
+ console.log('An unhandled Failure occured. See following Response and Record');
+ console.log(action);
console.log(record);
},
success: function(record, response) {
@@ -154,11 +154,11 @@
});
},
- enableAddMessungen: function(){
+ enableAddMessungen: function() {
this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false);
},
- disableChildren: function(){
+ disableChildren: function() {
if (!this.record.get('owner')) {
// Disable only when the User is not the owner of the Probe
// Works in symbiosis with success callback some lines above.
@@ -169,7 +169,7 @@
this.down('fset[name=pkommentare]').down('pkommentargrid').setReadOnly(true);
},
- enableChildren: function(){
+ enableChildren: function() {
this.down('fset[name=messungen]').down('messunggrid').setReadOnly(false);
this.down('fset[name=orte]').down('ortgrid').setReadOnly(false);
this.down('fset[name=probenzusatzwerte]').down('probenzusatzwertgrid').setReadOnly(false);
More information about the Lada-commits
mailing list