[Common] Update for underscore 1.8.3.
This commit is contained in:
parent
6b1a247ef1
commit
bd053831c8
|
@ -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
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -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
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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};
|
||||||
|
|
|
@ -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);
|
||||||
},
|
},
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
},
|
},
|
||||||
|
|
|
@ -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);
|
||||||
},
|
},
|
||||||
|
|
|
@ -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);
|
||||||
},
|
},
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
},
|
},
|
||||||
|
|
|
@ -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
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue