[Common] Update for underscore 1.8.3.

This commit is contained in:
Julia Radzhabova 2017-04-13 15:02:04 +03:00
parent 6b1a247ef1
commit bd053831c8
17 changed files with 22 additions and 22 deletions

View file

@ -547,7 +547,7 @@ define([
'<% _.each(items, function(item) { %>', '<% _.each(items, function(item) { %>',
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem"><%= scope.getDisplayValue(item) %></a></li>', '<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem"><%= scope.getDisplayValue(item) %></a></li>',
'<% }); %>' '<% }); %>'
].join(''), { ].join(''))({
items: this.store.toJSON(), items: this.store.toJSON(),
scope: this scope: this
})); }));

View file

@ -353,7 +353,7 @@ define([
'<li id="<%= item.id %>">', '<li id="<%= item.id %>">',
'<a class="font-item" tabindex="-1" type="menuitem" style="vertical-align:middle; margin: 0 0 0 -10px; height:<%=scope.getListItemHeight()%>px;"/>', '<a class="font-item" tabindex="-1" type="menuitem" style="vertical-align:middle; margin: 0 0 0 -10px; height:<%=scope.getListItemHeight()%>px;"/>',
'</li>' '</li>'
].join(''), { ].join(''))({
item: item.attributes, item: item.attributes,
scope: this scope: this
})); }));

View file

@ -421,7 +421,7 @@ define([
_.extend(options, { _.extend(options, {
cls: 'alert', cls: 'alert',
onprimary: onKeyDown, onprimary: onKeyDown,
tpl: _.template(template, options) tpl: _.template(template)(options)
}); });
var win = new Common.UI.Window(options), var win = new Common.UI.Window(options),
@ -556,7 +556,7 @@ define([
render : function() { render : function() {
var renderto = this.initConfig.renderTo || document.body; var renderto = this.initConfig.renderTo || document.body;
$(renderto).append( $(renderto).append(
_.template(template, this.initConfig) _.template(template)(this.initConfig)
); );
this.$window = $('#' + this.initConfig.id); this.$window = $('#' + this.initConfig.id);

View file

@ -71,7 +71,7 @@ define([
'</div>' '</div>'
].join(''); ].join('');
_options.tpl = _.template(this.template, _options); _options.tpl = _.template(this.template)(_options);
this.handler = _options.handler; this.handler = _options.handler;
this.toggleGroup = _options.toggleGroup; this.toggleGroup = _options.toggleGroup;

View file

@ -67,7 +67,7 @@ define([
templateUserList: _.template('<ul>' + templateUserList: _.template('<ul>' +
'<% _.each(users, function(item) { %>' + '<% _.each(users, function(item) { %>' +
'<%= _.template(usertpl, {user: item, scope: scope}) %>' + '<%= _.template(usertpl)({user: item, scope: scope}) %>' +
'<% }); %>' + '<% }); %>' +
'</ul>'), '</ul>'),
@ -82,7 +82,7 @@ define([
templateMsgList: _.template('<ul>' + templateMsgList: _.template('<ul>' +
'<% _.each(messages, function(item) { %>' + '<% _.each(messages, function(item) { %>' +
'<%= _.template(msgtpl, {msg: item, scope: scope}) %>' + '<%= _.template(msgtpl)({msg: item, scope: scope}) %>' +
'<% }); %>' + '<% }); %>' +
'</ul>'), '</ul>'),
@ -162,7 +162,7 @@ define([
_onAddUser: function(m, c, opts) { _onAddUser: function(m, c, opts) {
if (this.panelUsers) { if (this.panelUsers) {
this.panelUsers.find('ul').append(_.template(this.tplUser, {user: m, scope: this})); this.panelUsers.find('ul').append(_.template(this.tplUser)({user: m, scope: this}));
this.panelUsers.scroller.update({minScrollbarLength : 25, alwaysVisibleY: true}); this.panelUsers.scroller.update({minScrollbarLength : 25, alwaysVisibleY: true});
} }
}, },
@ -186,7 +186,7 @@ define([
var content = this.panelMessages.find('ul'); var content = this.panelMessages.find('ul');
if (content && content.length) { if (content && content.length) {
this._prepareMessage(m); this._prepareMessage(m);
content.append(_.template(this.tplMsg, {msg: m, scope: this})); content.append(_.template(this.tplMsg)({msg: m, scope: this}));
// scroll to end // scroll to end

View file

@ -98,7 +98,7 @@ define([
this.store = options.store; this.store = options.store;
this.delegate = options.delegate; this.delegate = options.delegate;
_options.tpl = _.template(this.template, _options); _options.tpl = _.template(this.template)(_options);
this.arrow = {margin: 20, width: 12, height: 34}; this.arrow = {margin: 20, width: 12, height: 34};
this.sdkBounds = {width: 0, height: 0, padding: 10, paddingTop: 20}; this.sdkBounds = {width: 0, height: 0, padding: 10, paddingTop: 20};

View file

@ -83,7 +83,7 @@ define([
'</div>' '</div>'
].join(''); ].join('');
this.options.tpl = _.template(this.template, this.options); this.options.tpl = _.template(this.template)(this.options);
Common.UI.Window.prototype.initialize.call(this, this.options); Common.UI.Window.prototype.initialize.call(this, this.options);
}, },

View file

@ -57,7 +57,7 @@ define([
'<div id="id-sharing-placeholder"></div>' '<div id="id-sharing-placeholder"></div>'
].join(''); ].join('');
_options.tpl = _.template(this.template, _options); _options.tpl = _.template(this.template)(_options);
this.settingsurl = options.settingsurl || ''; this.settingsurl = options.settingsurl || '';
Common.UI.Window.prototype.initialize.call(this, _options); Common.UI.Window.prototype.initialize.call(this, _options);

View file

@ -66,7 +66,7 @@ define([
'</div>' '</div>'
].join(''); ].join('');
_options.tpl = _.template(this.template, _options); _options.tpl = _.template(this.template)(_options);
this.handler = _options.handler; this.handler = _options.handler;
this._chartData = null; this._chartData = null;

View file

@ -66,7 +66,7 @@ define([
'</div>' '</div>'
].join(''); ].join('');
_options.tpl = _.template(this.template, _options); _options.tpl = _.template(this.template)(_options);
this.handler = _options.handler; this.handler = _options.handler;
this._mergeData = null; this._mergeData = null;

View file

@ -65,7 +65,7 @@ define([
'</div>' '</div>'
].join(''); ].join('');
this.options.tpl = _.template(this.template, this.options); this.options.tpl = _.template(this.template)(this.options);
Common.UI.Window.prototype.initialize.call(this, this.options); Common.UI.Window.prototype.initialize.call(this, this.options);
}, },

View file

@ -73,7 +73,7 @@ define([
'</div>' '</div>'
].join(''); ].join('');
this.options.tpl = _.template(this.template, this.options); this.options.tpl = _.template(this.template)(this.options);
Common.UI.Window.prototype.initialize.call(this, this.options); Common.UI.Window.prototype.initialize.call(this, this.options);
}, },

View file

@ -93,7 +93,7 @@ define([
this.codepages = options.codepages; this.codepages = options.codepages;
this.settings = options.settings; this.settings = options.settings;
_options.tpl = _.template(this.template, _options); _options.tpl = _.template(this.template)(_options);
Common.UI.Window.prototype.initialize.call(this, _options); Common.UI.Window.prototype.initialize.call(this, _options);
}, },

View file

@ -225,7 +225,7 @@ define([
'<% } %>' '<% } %>'
].join(''); ].join('');
_options.tpl = _.template(this.template, _options); _options.tpl = _.template(this.template)(_options);
this.url = options.url || ''; this.url = options.url || '';
Common.UI.Window.prototype.initialize.call(this, _options); Common.UI.Window.prototype.initialize.call(this, _options);

View file

@ -66,7 +66,7 @@ define([
'</div>' '</div>'
].join(''); ].join('');
this.options.tpl = _.template(this.template, this.options); this.options.tpl = _.template(this.template)(this.options);
Common.UI.Window.prototype.initialize.call(this, this.options); Common.UI.Window.prototype.initialize.call(this, this.options);
}, },

View file

@ -80,7 +80,7 @@ define([
this.store = options.store; this.store = options.store;
this.delegate = options.delegate; this.delegate = options.delegate;
_options.tpl = _.template(this.template, _options); _options.tpl = _.template(this.template)(_options);
this.arrow = {margin: 20, width: 12, height: 34}; this.arrow = {margin: 20, width: 12, height: 34};
this.sdkBounds = {width: 0, height: 0, padding: 10, paddingTop: 20}; this.sdkBounds = {width: 0, height: 0, padding: 10, paddingTop: 20};
@ -441,7 +441,7 @@ define([
var el = $(this.el), var el = $(this.el),
me = this; me = this;
el.addClass('review-changes'); el.addClass('review-changes');
el.html(_.template(this.template, { el.html(_.template(this.template)({
scope: this scope: this
})); }));

View file

@ -105,7 +105,7 @@
'</div>' '</div>'
].join(''); ].join('');
this.options.tpl = _.template(this.template, this.options); this.options.tpl = _.template(this.template)(this.options);
Common.UI.Window.prototype.initialize.call(this, this.options); Common.UI.Window.prototype.initialize.call(this, this.options);
}, },