editItemSave(id, title){
        title = title.trim();

        if (title.length !== 0) {
            this.model.update(id, {title}, () => {
                this.view.render('editItemDone', {id, title});
            });
        } else {
            this.removeItem(id);
        }
    }
/*
     * Finishes the item editing mode successfully.
     */
Finishes the item editing mode successfully.
Finishes the item editing mode successfully .
editItemSave(id, title){
        title = title.trim();
        if (title.length !== 0) {
            this.model.update(id, {title}, () => {
                this.view.render('editItemDone', {id, title});
            });
        } else {
            this.removeItem(id);
        }
    }
editItemSave ( id , title ) { title = title . trim ( ) ; if ( title . length !== 0 ) { this . model . update ( id , { title } , ( ) => { this . view . render ( 'editItemDone' , { id , title } ) ; } ) ; } else { this . removeItem ( id ) ; } }
Finishes the item editing mode successfully.
Finishes the item editing mode successfully .