Diff
checker
Text
Text
Bilder
Dokumente
Excel
Ordner
Legal
Enterprise
Desktop-App
Preise
Einloggen
Diffchecker Desktop herunterladen
Texte vergleichen
Finde den Unterschied zwischen zwei Textdateien
Werkzeuge
Verlauf
Live-Editor
Leerzeichen ausblenden
Gleiches ausblenden
Zeilenumbruch aus
Ansicht
Zweispaltig
Einspaltig
Vergleichsgenauigkeit
Intelligent
Wort
Zeichen
Textstile
Darstellung ändern
Syntaxhervorhebung
Syntax auswählen
Ignorieren
Text umwandeln
Zur ersten Änderung
Eingabe bearbeiten
Diffchecker Desktop
Der sicherste Weg, Diffchecker zu nutzen. Hol dir die Desktop-App: Deine Diffs verlassen nie deinen Computer!
Desktop holen
ShareBuy view before and after Rivets
Erstellt
vor 10 Jahren
Diff läuft nie ab
Löschen
Exportieren
Teilen
Erklären
73 Entfernungen
Zeilen
Gesamt
Entfernt
Zeichen
Gesamt
Entfernt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
71 Zeilen
Kopieren
31 Hinzufügungen
Zeilen
Gesamt
Hinzugefügt
Zeichen
Gesamt
Hinzugefügt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
33 Zeilen
Kopieren
Kopieren
Kopiert
Kopieren
Kopiert
var toCurrency = require('../templates/helpers/formatcurrency');
var ShareBuyView = Marionette.ItemView.extend({
var ShareBuyView = Marionette.ItemView.extend({
Kopieren
Kopiert
Kopieren
Kopiert
template:
require('../templates/
newbuy.hbs'),
template:
false,
bindings: {
html:
require('../templates/
sharebuy.html'),
'[name=symbol]': {
observe: 'symbol',
events: ['blur']
},
'[name=price]': {
observe: 'price',
onGet: 'numToStr',
onSet: 'strToNum'
},
'[name=quantity]': {
observe: 'quantity',
onGet: 'numToStr',
onSet: 'strToNum'
},
'[name=date]': 'date'
},
initialize: function (options) {
initialize: function (options) {
Kopieren
Kopiert
Kopieren
Kopiert
this.state =
new Backbone.Model();
this.state =
{
isNew
:
!this.pristineModel
,
hasSymbol
:
!!this.symbol
}
;
this.state.set('
isNew
',
!this.pristineModel
);
if (this.state.
isNew
&& this.symbol) {
this.state.set('
hasSymbol
',
!!this.symbol
)
;
if (this.state.
get('
isNew
')
&& this.symbol) {
this.model.set('symbol', this.symbol.get('name'));
this.model.set('symbol', this.symbol.get('name'));
}
}
},
},
Kopieren
Kopiert
Kopieren
Kopiert
onBeforeRender: function() {
if (this.view) {
this.view.unbind();
this.view = null;
}
this.attachElContent(this.html);
this.view = rivets.bind(this.el, this);
},
onRender: function () {
onRender: function () {
this.updateMeanPrice();
this.updateMeanPrice();
Kopieren
Kopiert
Kopieren
Kopiert
this.stickit();
this.stickit(this.state, {
'#remove-buy': {
observe: 'isNew',
onGet: function (value) {
return !value
},
visible: true
},
'[name=symbol]':{
attributes: [
{
name: 'disabled',
observe: 'hasSymbol',
onGet: function (value) {
return value
}
}]
}
})
},
},
Kopieren
Kopiert
Kopieren
Kopiert
onDestroy: function() {
if (this.view) {
this.view.unbind();
this.view = null;
}
updateMeanPrice: function() {
updateMeanPrice: function() {
Kopieren
Kopiert
Kopieren
Kopiert
this.
$el.find('
.mean
-p
rice
').text(
this.symbol ?
toCurrency(
this.symbol.simulateMeanPrice(this.model)
)
:
'--')
;
this.
state
.mean
P
rice
=
this.symbol ?
this.symbol.simulateMeanPrice(this.model)
:
undefined
;
this.
$el.find('
.current
-m
ean
-p
rice
').text(
this.symbol ?
toCurrency(
this.symbol.meanPrice
) : '--');
this.
state
.current
M
ean
P
rice
=
this.symbol ?
this.symbol.meanPrice
: undefined;
},
}
strToNum: function (val) {
if (val != null) {
return +val;
}
},
numToStr: function (val) {
if (val != null) {
return val.toString();
}
}
});
});
Gespeicherte Diffs
Originaltext
Datei öffnen
var toCurrency = require('../templates/helpers/formatcurrency'); var ShareBuyView = Marionette.ItemView.extend({ template: require('../templates/newbuy.hbs'), bindings: { '[name=symbol]': { observe: 'symbol', events: ['blur'] }, '[name=price]': { observe: 'price', onGet: 'numToStr', onSet: 'strToNum' }, '[name=quantity]': { observe: 'quantity', onGet: 'numToStr', onSet: 'strToNum' }, '[name=date]': 'date' }, initialize: function (options) { this.state = new Backbone.Model(); this.state.set('isNew', !this.pristineModel); this.state.set('hasSymbol', !!this.symbol); if (this.state.get('isNew') && this.symbol) { this.model.set('symbol', this.symbol.get('name')); } }, onRender: function () { this.updateMeanPrice(); this.stickit(); this.stickit(this.state, { '#remove-buy': { observe: 'isNew', onGet: function (value) { return !value }, visible: true }, '[name=symbol]':{ attributes: [ { name: 'disabled', observe: 'hasSymbol', onGet: function (value) { return value } }] } }) }, updateMeanPrice: function() { this.$el.find('.mean-price').text(this.symbol ? toCurrency(this.symbol.simulateMeanPrice(this.model)) : '--'); this.$el.find('.current-mean-price').text(this.symbol ? toCurrency(this.symbol.meanPrice) : '--'); }, strToNum: function (val) { if (val != null) { return +val; } }, numToStr: function (val) { if (val != null) { return val.toString(); } } });
Bearbeitung
Datei öffnen
var ShareBuyView = Marionette.ItemView.extend({ template: false, html: require('../templates/sharebuy.html'), initialize: function (options) { this.state = {isNew: !this.pristineModel, hasSymbol: !!this.symbol}; if (this.state.isNew && this.symbol) { this.model.set('symbol', this.symbol.get('name')); } }, onBeforeRender: function() { if (this.view) { this.view.unbind(); this.view = null; } this.attachElContent(this.html); this.view = rivets.bind(this.el, this); }, onRender: function () { this.updateMeanPrice(); }, onDestroy: function() { if (this.view) { this.view.unbind(); this.view = null; } updateMeanPrice: function() { this.state.meanPrice = this.symbol ? this.symbol.simulateMeanPrice(this.model) : undefined; this.state.currentMeanPrice = this.symbol ? this.symbol.meanPrice : undefined; } });
Unterschied finden