Update close control view in Chat JavaScript application

Rename close method to closeThread to not override
Marionette.js View.close method.
This commit is contained in:
Dmitriy Simushev 2013-02-15 10:49:13 +00:00
parent e4844832f1
commit 5d0ac36fa4
3 changed files with 4 additions and 4 deletions

View File

@ -5,4 +5,4 @@
Copyright (c) 2005-2011 Mibew Messenger Community
License: http://mibew.org/license.php
*/
(function(a,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.close_control,events:d.extend({},a.Views.Control.prototype.events,{click:"close"}),close:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_);
(function(a,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.close_control,events:d.extend({},a.Views.Control.prototype.events,{click:"closeThread"}),closeThread:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_);

View File

@ -145,7 +145,7 @@ c=b.Objects.Models.user;return[{"function":"updateMessages",arguments:{"return":
Copyright (c) 2005-2011 Mibew Messenger Community
License: http://mibew.org/license.php
*/
(function(a,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.close_control,events:d.extend({},a.Views.Control.prototype.events,{click:"close"}),close:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_);
(function(a,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.close_control,events:d.extend({},a.Views.Control.prototype.events,{click:"closeThread"}),closeThread:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_);
/*
This file is part of Mibew Messenger project.
http://mibew.org

View File

@ -30,14 +30,14 @@
{},
Mibew.Views.Control.prototype.events,
{
'click': 'close'
'click': 'closeThread'
}
),
/**
* Display confirmation dialog and close chat window
*/
close: function() {
closeThread: function() {
// Show confirmation message if can
var confirmMessage = Mibew.Localization.get('chat.close.confirmation');
if (confirmMessage !== false) {