Review: Needs Fixing

Fix is incomplete, is not using event delegation and actual links (so can't 
open new openerp instance by middle-clicking on logo).

And there are semicolons missing at end of lines

Also,

    if(this.active_view == 'form' && 
!this.views['form'].controller.can_be_discarded()){
        return false;
    }
    return true;

can be reduced to:

    return this.active_view !== 'form' || 
this.views['form'].controller.can_be_discarded();

unless I am mistaken.

And why does `on_company_home_logo` return false when not discardable, but does 
not return anything when discardable? Not coherent behavior. Should probably 
return nothing in either case.

Also, code along lines of:

    var inner_viewmanager = this.action_manager.inner_viewmanager
    if(inner_viewmanager && !inner_viewmanager.check_view_discardable()){
        do something
    }

is used 3 different times, maybe there should be utility method on WebClient to 
check if current view is discardable directly no?


-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-574224-msh/+merge/105957
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-574224-msh.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to