diff --git a/apps/common/main/lib/component/ComboBox.js b/apps/common/main/lib/component/ComboBox.js index d45a3054c..d24a0181c 100644 --- a/apps/common/main/lib/component/ComboBox.js +++ b/apps/common/main/lib/component/ComboBox.js @@ -547,7 +547,7 @@ define([ '<% _.each(items, function(item) { %>', '
  • <%= scope.getDisplayValue(item) %>
  • ', '<% }); %>' - ].join(''), { + ].join(''))({ items: this.store.toJSON(), scope: this })); diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js index af7cd2351..e58f26d70 100644 --- a/apps/common/main/lib/component/ComboBoxFonts.js +++ b/apps/common/main/lib/component/ComboBoxFonts.js @@ -353,7 +353,7 @@ define([ '
  • ', '', '
  • ' - ].join(''), { + ].join(''))({ item: item.attributes, scope: this })); diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index b9750e2ad..5ee828a96 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -421,7 +421,7 @@ define([ _.extend(options, { cls: 'alert', onprimary: onKeyDown, - tpl: _.template(template, options) + tpl: _.template(template)(options) }); var win = new Common.UI.Window(options), @@ -556,7 +556,7 @@ define([ render : function() { var renderto = this.initConfig.renderTo || document.body; $(renderto).append( - _.template(template, this.initConfig) + _.template(template)(this.initConfig) ); this.$window = $('#' + this.initConfig.id); diff --git a/apps/common/main/lib/view/AdvancedSettingsWindow.js b/apps/common/main/lib/view/AdvancedSettingsWindow.js index 9b87f1b71..5c8ece182 100644 --- a/apps/common/main/lib/view/AdvancedSettingsWindow.js +++ b/apps/common/main/lib/view/AdvancedSettingsWindow.js @@ -71,7 +71,7 @@ define([ '' ].join(''); - _options.tpl = _.template(this.template, _options); + _options.tpl = _.template(this.template)(_options); this.handler = _options.handler; this.toggleGroup = _options.toggleGroup; diff --git a/apps/common/main/lib/view/Chat.js b/apps/common/main/lib/view/Chat.js index 308854791..d84448032 100644 --- a/apps/common/main/lib/view/Chat.js +++ b/apps/common/main/lib/view/Chat.js @@ -67,7 +67,7 @@ define([ templateUserList: _.template(''), @@ -82,7 +82,7 @@ define([ templateMsgList: _.template(''), @@ -162,7 +162,7 @@ define([ _onAddUser: function(m, c, opts) { 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}); } }, @@ -186,7 +186,7 @@ define([ var content = this.panelMessages.find('ul'); if (content && content.length) { this._prepareMessage(m); - content.append(_.template(this.tplMsg, {msg: m, scope: this})); + content.append(_.template(this.tplMsg)({msg: m, scope: this})); // scroll to end diff --git a/apps/common/main/lib/view/Comments.js b/apps/common/main/lib/view/Comments.js index 7b9389e4a..e238a5eb3 100644 --- a/apps/common/main/lib/view/Comments.js +++ b/apps/common/main/lib/view/Comments.js @@ -98,7 +98,7 @@ define([ this.store = options.store; 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.sdkBounds = {width: 0, height: 0, padding: 10, paddingTop: 20}; diff --git a/apps/common/main/lib/view/CopyWarningDialog.js b/apps/common/main/lib/view/CopyWarningDialog.js index b98fc3e78..7d8fff28c 100644 --- a/apps/common/main/lib/view/CopyWarningDialog.js +++ b/apps/common/main/lib/view/CopyWarningDialog.js @@ -83,7 +83,7 @@ define([ '' ].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); }, diff --git a/apps/common/main/lib/view/DocumentAccessDialog.js b/apps/common/main/lib/view/DocumentAccessDialog.js index e79ce6bf1..703f331e1 100644 --- a/apps/common/main/lib/view/DocumentAccessDialog.js +++ b/apps/common/main/lib/view/DocumentAccessDialog.js @@ -57,7 +57,7 @@ define([ '
    ' ].join(''); - _options.tpl = _.template(this.template, _options); + _options.tpl = _.template(this.template)(_options); this.settingsurl = options.settingsurl || ''; Common.UI.Window.prototype.initialize.call(this, _options); diff --git a/apps/common/main/lib/view/ExternalDiagramEditor.js b/apps/common/main/lib/view/ExternalDiagramEditor.js index fa55e24b0..5f917b156 100644 --- a/apps/common/main/lib/view/ExternalDiagramEditor.js +++ b/apps/common/main/lib/view/ExternalDiagramEditor.js @@ -66,7 +66,7 @@ define([ '' ].join(''); - _options.tpl = _.template(this.template, _options); + _options.tpl = _.template(this.template)(_options); this.handler = _options.handler; this._chartData = null; diff --git a/apps/common/main/lib/view/ExternalMergeEditor.js b/apps/common/main/lib/view/ExternalMergeEditor.js index dab4427a6..25138e485 100644 --- a/apps/common/main/lib/view/ExternalMergeEditor.js +++ b/apps/common/main/lib/view/ExternalMergeEditor.js @@ -66,7 +66,7 @@ define([ '' ].join(''); - _options.tpl = _.template(this.template, _options); + _options.tpl = _.template(this.template)(_options); this.handler = _options.handler; this._mergeData = null; diff --git a/apps/common/main/lib/view/ImageFromUrlDialog.js b/apps/common/main/lib/view/ImageFromUrlDialog.js index 46888b3dd..992257873 100644 --- a/apps/common/main/lib/view/ImageFromUrlDialog.js +++ b/apps/common/main/lib/view/ImageFromUrlDialog.js @@ -65,7 +65,7 @@ define([ '' ].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); }, diff --git a/apps/common/main/lib/view/InsertTableDialog.js b/apps/common/main/lib/view/InsertTableDialog.js index c24d11ea3..22655700a 100644 --- a/apps/common/main/lib/view/InsertTableDialog.js +++ b/apps/common/main/lib/view/InsertTableDialog.js @@ -73,7 +73,7 @@ define([ '' ].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); }, diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index cf70abcb3..cbac99dd7 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -93,7 +93,7 @@ define([ this.codepages = options.codepages; this.settings = options.settings; - _options.tpl = _.template(this.template, _options); + _options.tpl = _.template(this.template)(_options); Common.UI.Window.prototype.initialize.call(this, _options); }, diff --git a/apps/common/main/lib/view/Plugins.js b/apps/common/main/lib/view/Plugins.js index 2089c7753..61d02c715 100644 --- a/apps/common/main/lib/view/Plugins.js +++ b/apps/common/main/lib/view/Plugins.js @@ -225,7 +225,7 @@ define([ '<% } %>' ].join(''); - _options.tpl = _.template(this.template, _options); + _options.tpl = _.template(this.template)(_options); this.url = options.url || ''; Common.UI.Window.prototype.initialize.call(this, _options); diff --git a/apps/common/main/lib/view/RenameDialog.js b/apps/common/main/lib/view/RenameDialog.js index 11f9ebffe..95207e9bf 100644 --- a/apps/common/main/lib/view/RenameDialog.js +++ b/apps/common/main/lib/view/RenameDialog.js @@ -66,7 +66,7 @@ define([ '' ].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); }, diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js index 28f6377a0..af8ca28a7 100644 --- a/apps/common/main/lib/view/ReviewChanges.js +++ b/apps/common/main/lib/view/ReviewChanges.js @@ -80,7 +80,7 @@ define([ this.store = options.store; 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.sdkBounds = {width: 0, height: 0, padding: 10, paddingTop: 20}; @@ -441,7 +441,7 @@ define([ var el = $(this.el), me = this; el.addClass('review-changes'); - el.html(_.template(this.template, { + el.html(_.template(this.template)({ scope: this })); diff --git a/apps/common/main/lib/view/SearchDialog.js b/apps/common/main/lib/view/SearchDialog.js index a6128c349..f518a9a88 100644 --- a/apps/common/main/lib/view/SearchDialog.js +++ b/apps/common/main/lib/view/SearchDialog.js @@ -105,7 +105,7 @@ '' ].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); },