Diff
checker
Testo
Testo
Immagini
Documenti
Excel
Cartelle
Legal
Enterprise
Applicazione per desktop
Prezzi
Accedi
Scarica Diffchecker Desktop
Confronta il testo
Trova la differenza tra due file di testo
Strumenti
Cronologia
Editor live
Comprimi invariate
Senza a capo
Layout
Diviso
Unificato
Livello di dettaglio
Intelligente
Parola
Carattere
Evidenziazione sintassi
Scegli sintassi
Ignora
Trasforma testo
Vai alla prima modifica
Modifica input
Diffchecker Desktop
Il modo più sicuro per usare Diffchecker. Ottieni l'app Diffchecker Desktop: i tuoi diff non lasciano mai il tuo computer!
Ottieni Desktop
OwnedSymbols view before and after Rivets
Creato
10 anni fa
Il diff non scade mai
Eliminare
Esporta
Condividere
Spiegare
35 rimozioni
Linee
Totale
Rimosso
Caratteri
Totale
Rimosso
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
50 linee
Copia tutti
21 aggiunte
Linee
Totale
Aggiunto
Caratteri
Totale
Aggiunto
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
37 linee
Copia tutti
var Radio = require('backbone.radio');
var Radio = require('backbone.radio');
Copia
Copiato
Copia
Copiato
var OwnedSymbol
Item
View = Marionette.ItemView.extend({
var OwnedSymbol
s
View = Marionette.ItemView.extend({
template: require('../templates/ownedsymbolitem.hbs'),
template: false,
tagName: 'li',
html
: require('../templates/ownedsymbols.
html
'),
className: 'item item-icon-right row',
modelEvents: {
'change:latestPrice': 'onLatestPriceChange'
},
events: {
'click': 'onClick'
},
onLatestPriceChange: function () {
var price = this.model.get('latestPrice');
var variation = this.model.get('latestVariation');
var variationText = variation ? Math.abs(variation).toFixed(2) + '%' : '--';
var iconClass = 'ion-arrow-' + (variation > 0 ? 'up': 'down') + '-a';
this.$el.find('.stock-variation').toggleClass('negative-value', variation < 0)
.contents().filter(function() {
return this.nodeType == 3 && this.textContent.trim().length > 0
}).replaceWith(' ' + variationText);
this.$el.find('.stock-variation i').removeClass('ion-arrow-up-a ion-arrow-down-a').addClass(iconClass);
this.$el.find('.stock-price').html(price ? 'R$' + price.toFixed(2) : '--');
},
onClick: function (e) {
e.preventDefault();
Radio.channel('navigation').request('goToPage', 'symboldetails', this.model.get('id'));
}
});
var OwnedSymbolsView = Marionette.CompositeView.extend({
template
: require('../templates/ownedsymbols.
hbs
'),
childView: OwnedSymbolItemView,
childViewContainer: '#symbol-list',
pageHeader: {
pageHeader: {
title: 'Carteira de Ações',
title: 'Carteira de Ações',
buttons: [
buttons: [
{
{
icon: 'ion-plus',
icon: 'ion-plus',
method: 'add:buy'
method: 'add:buy'
}
}
]
]
},
},
Copia
Copiato
Copia
Copiato
onBeforeRender: function () {
if (this.view) {
this.view.unbind();
this.view = null;
}
this.attachElContent(this.html);
this.view = rivets.bind(this.el, this);
},
onDestroy: function () {
if (this.view) {
this.view.unbind();
this.view = null;
}
},
onAddBuy: function () {
onAddBuy: function () {
Radio.channel('navigation').request('goToPage', 'newbuy');
Radio.channel('navigation').request('goToPage', 'newbuy');
Copia
Copiato
Copia
Copiato
},
onItemClick: function (e, scope) {
Radio.channel('navigation').request('goToPage', 'symboldetails', scope.model.get('id'));
}
}
});
});
module.exports = OwnedSymbolsView;
module.exports = OwnedSymbolsView;
Diff salvati
Testo originale
Apri file
var Radio = require('backbone.radio'); var OwnedSymbolItemView = Marionette.ItemView.extend({ template: require('../templates/ownedsymbolitem.hbs'), tagName: 'li', className: 'item item-icon-right row', modelEvents: { 'change:latestPrice': 'onLatestPriceChange' }, events: { 'click': 'onClick' }, onLatestPriceChange: function () { var price = this.model.get('latestPrice'); var variation = this.model.get('latestVariation'); var variationText = variation ? Math.abs(variation).toFixed(2) + '%' : '--'; var iconClass = 'ion-arrow-' + (variation > 0 ? 'up': 'down') + '-a'; this.$el.find('.stock-variation').toggleClass('negative-value', variation < 0) .contents().filter(function() { return this.nodeType == 3 && this.textContent.trim().length > 0 }).replaceWith(' ' + variationText); this.$el.find('.stock-variation i').removeClass('ion-arrow-up-a ion-arrow-down-a').addClass(iconClass); this.$el.find('.stock-price').html(price ? 'R$' + price.toFixed(2) : '--'); }, onClick: function (e) { e.preventDefault(); Radio.channel('navigation').request('goToPage', 'symboldetails', this.model.get('id')); } }); var OwnedSymbolsView = Marionette.CompositeView.extend({ template: require('../templates/ownedsymbols.hbs'), childView: OwnedSymbolItemView, childViewContainer: '#symbol-list', pageHeader: { title: 'Carteira de Ações', buttons: [ { icon: 'ion-plus', method: 'add:buy' } ] }, onAddBuy: function () { Radio.channel('navigation').request('goToPage', 'newbuy'); } }); module.exports = OwnedSymbolsView;
Testo modificato
Apri file
var Radio = require('backbone.radio'); var OwnedSymbolsView = Marionette.ItemView.extend({ template: false, html: require('../templates/ownedsymbols.html'), pageHeader: { title: 'Carteira de Ações', buttons: [ { icon: 'ion-plus', method: 'add:buy' } ] }, onBeforeRender: function () { if (this.view) { this.view.unbind(); this.view = null; } this.attachElContent(this.html); this.view = rivets.bind(this.el, this); }, onDestroy: function () { if (this.view) { this.view.unbind(); this.view = null; } }, onAddBuy: function () { Radio.channel('navigation').request('goToPage', 'newbuy'); }, onItemClick: function (e, scope) { Radio.channel('navigation').request('goToPage', 'symboldetails', scope.model.get('id')); } }); module.exports = OwnedSymbolsView;
Trovare la differenza