Loading template/app/view/comments/List.js +15 −5 Original line number Diff line number Diff line Loading @@ -30,6 +30,11 @@ Ext.define('Docs.view.comments.List', { * Used in Docs.view.comments.FullList. */ /** * @cfg {Boolean} enableDragDrop * True to allow drag-drop reorganization of comments. */ initComponent: function() { this.store = Ext.create('Ext.data.Store', { model: "Docs.model.Comment", Loading @@ -39,7 +44,10 @@ Ext.define('Docs.view.comments.List', { } }); this.tpl = Docs.view.comments.Template.create({showTarget: this.showTarget}); this.tpl = Docs.view.comments.Template.create({ showTarget: this.showTarget, enableDragDrop: this.enableDragDrop }); this.callParent(arguments); Loading Loading @@ -97,10 +105,12 @@ Ext.define('Docs.view.comments.List', { this.delegateClick("a.remove-tag", this.removeTag, this); // initialize drag-drop if (this.enableDragDrop) { new Docs.view.comments.DragZone(this); new Docs.view.comments.DropZone(this, { onValidDrop: Ext.Function.bind(this.setParent, this) }); } }, delegateClick: function(selector, callback, scope) { Loading template/app/view/comments/ListWithForm.js +1 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ Ext.define('Docs.view.comments.ListWithForm', { initComponent: function() { this.items = [ this.list = new Docs.view.comments.List({ enableDragDrop: true }) ]; Loading template/app/view/comments/Template.js +6 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,11 @@ Ext.define('Docs.view.comments.Template', { * True to show a link to the target in each comment. */ /** * @cfg {Boolean} enableDragDrop * True to allow drag-drop reorganization of comments. */ constructor: function() { this.callParent([ '<div>', Loading Loading @@ -90,7 +95,7 @@ Ext.define('Docs.view.comments.Template', { avatar: function(emailHash) { // turns avatars into drag-handles for moderators. return Docs.Comments.avatar(emailHash, this.isMod() ? "drag-handle" : ""); return Docs.Comments.avatar(emailHash, this.isMod() && this.enableDragDrop ? "drag-handle" : ""); }, isTargetVisible: function() { Loading Loading
template/app/view/comments/List.js +15 −5 Original line number Diff line number Diff line Loading @@ -30,6 +30,11 @@ Ext.define('Docs.view.comments.List', { * Used in Docs.view.comments.FullList. */ /** * @cfg {Boolean} enableDragDrop * True to allow drag-drop reorganization of comments. */ initComponent: function() { this.store = Ext.create('Ext.data.Store', { model: "Docs.model.Comment", Loading @@ -39,7 +44,10 @@ Ext.define('Docs.view.comments.List', { } }); this.tpl = Docs.view.comments.Template.create({showTarget: this.showTarget}); this.tpl = Docs.view.comments.Template.create({ showTarget: this.showTarget, enableDragDrop: this.enableDragDrop }); this.callParent(arguments); Loading Loading @@ -97,10 +105,12 @@ Ext.define('Docs.view.comments.List', { this.delegateClick("a.remove-tag", this.removeTag, this); // initialize drag-drop if (this.enableDragDrop) { new Docs.view.comments.DragZone(this); new Docs.view.comments.DropZone(this, { onValidDrop: Ext.Function.bind(this.setParent, this) }); } }, delegateClick: function(selector, callback, scope) { Loading
template/app/view/comments/ListWithForm.js +1 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ Ext.define('Docs.view.comments.ListWithForm', { initComponent: function() { this.items = [ this.list = new Docs.view.comments.List({ enableDragDrop: true }) ]; Loading
template/app/view/comments/Template.js +6 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,11 @@ Ext.define('Docs.view.comments.Template', { * True to show a link to the target in each comment. */ /** * @cfg {Boolean} enableDragDrop * True to allow drag-drop reorganization of comments. */ constructor: function() { this.callParent([ '<div>', Loading Loading @@ -90,7 +95,7 @@ Ext.define('Docs.view.comments.Template', { avatar: function(emailHash) { // turns avatars into drag-handles for moderators. return Docs.Comments.avatar(emailHash, this.isMod() ? "drag-handle" : ""); return Docs.Comments.avatar(emailHash, this.isMod() && this.enableDragDrop ? "drag-handle" : ""); }, isTargetVisible: function() { Loading