Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
OwnedSymbols view before and after Rivets
Créé
il y a 10 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
35 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
50 lignes
Copier tout
21 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
37 lignes
Copier tout
var Radio = require('backbone.radio');
var Radio = require('backbone.radio');
Copier
Copié
Copier
Copié
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'
}
}
]
]
},
},
Copier
Copié
Copier
Copié
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');
Copier
Copié
Copier
Copié
},
onItemClick: function (e, scope) {
Radio.channel('navigation').request('goToPage', 'symboldetails', scope.model.get('id'));
}
}
});
});
module.exports = OwnedSymbolsView;
module.exports = OwnedSymbolsView;
Différences enregistrées
Texte d'origine
Ouvrir un fichier
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;
Texte modifié
Ouvrir un fichier
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;
Trouver la différence