Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM #1807 Query Tool Does NotRecognize When File Changes Have Been Saved

Поиск
Список
Период
Сортировка
От Akshay Joshi
Тема Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM #1807 Query Tool Does NotRecognize When File Changes Have Been Saved
Дата
Msg-id CANxoLDcPAPga6nuhMUZ-cYrcsidmko7_OP+kVfgPVRmK-dpxiA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM #1807 Query Tool Does NotRecognize When File Changes Have Been Saved  (Dave Page <dpage@pgadmin.org>)
Ответы Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM #1807 Query Tool Does NotRecognize When File Changes Have Been Saved  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-hackers
Hi Dave

On Fri, Dec 16, 2016 at 5:22 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Fri, Dec 16, 2016 at 8:47 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi All

Please find the attached patch to fix the RM #1807 Query Tool Does Not Recognize When File Changes Have Been Saved.

If I open a file with the patch applied, and make a change (add a space to the end), it's correctly detected. 

If I then undo the change by deleting the space, the file is still marked as dirty. 

   This was an old behaviour. To achieve this we need to compare the original content with changed content on each key press event.

If I then clear the window entirely, the save button is disabled, but the tab still shows the file is dirty (the *).

   Again this was an old behaviour, I have added only one if condition to check whether to popped up "Unsaved Changes" message or not. 

Also - the patch seems to undo the change I made in 4a280b251755091af9bf56bcdee964601df104ae.

    As per commit id 4a280b251755091af9bf56bcdee964601df104ae, you have made following changes: 

-                self.setTitle(self.gridView.current_file.replace(/^\/|\/$/g, ''));
+                self.setTitle(self.gridView.current_file.split('\\').pop().split('/').pop());

And as per me I haven't change any thing there, I have only disabled the save button when file is loaded which was not there previously.


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Akshay Joshi
Principal Software Engineer 


Phone: +91 20-3058-9517
Mobile: +91 976-788-8246

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Neel Patel
Дата:
Сообщение: Re: [pgadmin-hackers] [pgAdmin4]: RM-1910 - Remember last useddirectory in the file manager
Следующее
От: Dave Page
Дата:
Сообщение: Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM #1807 Query Tool Does NotRecognize When File Changes Have Been Saved