Obliczenia brydżowe (HTML)
Jacek Kowalski
2015-12-30 0f086d87e349c63380b0687f7704b5ce480a160f
Fix deleting player
1 files modified
9 ■■■■■ changed files
bridge_results_table.js 9 ●●●●● patch | view | raw | blame | history
bridge_results_table.js
@@ -99,15 +99,11 @@
};
ResultsTable.prototype._editPlayerCallback = function(name, callback) {
    var result = prompt('Podaj nowe inicjały gracza. Wyczyść pole, by go usunąć.', name);
    if(result) {
        callback(result);
    }
    callback(result);
};
ResultsTable.prototype._editResultCallback = function(value, callback) {
    var result = prompt('Podaj nową wartość:', value);
    if(result) {
        callback(result);
    }
    callback(result);
};
ResultsTable.prototype.refresh = function() {
    this.save();
@@ -144,6 +140,7 @@
                    self.editResultCallback(
                        self.results[j][i],
                        function (value) {
                            if(value == null) return;
                            self.results[j][i] = value;
                            self.refresh();
                        }