https://github.com/web2py/web2py/pull/322/
2013/12/9 Roberto Perdomo <roberto...@gmail.com> > Sometime ago I do an "Create" button in the "files toggle" menu, to allow > create files from the editor page, when a new file is created the "files > toggle" menu is updated using javascript to show the new files created. > > Due to something problems I forgot to send the pull request for this, I > can try update this work today and send the pull, to allow create > view/model/controller. > > > 2013/12/9 paolo.vall...@gmail.com <paolo.vall...@gmail.com> > > You are right, technically speaking it is true we already have the name of >> views and we can avoid to ask them again to the users. >> However what you proposed It's not so straightforward with the current >> editor structure, I don't say it is impossible. At first sight we should: >> >> 1- migrate the file list sidebar into an indipendent component (currently >> it is part of the editor page) (backend part) >> 2- for each opened file(tab) stores in a javascript variable the current >> available views (js) >> 3- periodically or on demand, parse the python file to find the current >> declared endpoints (js) >> 4- remove from the declared endpoints(discovered in point3) those already >> available (point 2). (js) >> 5- feed the dropdown menu with those discovered in point4 (js) >> 6- when a new file is created, add the new view to the available >> views(point3) and update the file list sidebar(point 1).(backend/js) >> >> I start with 1, I can work on the other points in the coming days/week. >> >> >> Paolo >> >> >> 2013/12/9 Mika Sjöman <m...@orilinkinvent.com> >> >>> Well, I was thinking that usually you write the controller first. If >>> you click an [Add view] button, it could check which functions are missing >>> a view and give you two options in a popup, or pop-down? (don't know what >>> it is called); >>> >>> --------- >>> Add view for function: >>> [Link: missing_view_function1] >>> [Link: missing_view_function2] >>> >>> OR add one with name: >>> Name: [ ] [Add View] >>> ---------- >>> >>> Mostly you would just click on the missing view function link and you >>> would not misspell the file name, which is a quite common error and it >>> would reduce writing. Also you would not add one by mistake if there is one >>> already. >>> >>> // cheers >>> >>> >>> >>> >>> On Monday, December 9, 2013 5:10:20 PM UTC+1, Paolo Valleri wrote: >>>> >>>> It is a good idea that could speed up the initial development phase; >>>> We could start by implementing some like that: while you edit the >>>> controller test.py at the top you will get a button 'add view' that when >>>> clicked creates a file (a view actually) in the directory app/views/test; >>>> the file name could be get by a dialog. Let me think about that a bit more. >>>> >>>> For the [Add or +] in the file list, if I remember correctly Roberto >>>> (in CC) has started something a while ago. >>>> >>>> Paolo >>>> >>>> On Monday, December 9, 2013 4:57:25 PM UTC+1, Mika Sjöman wrote: >>>>> >>>>> Hi >>>>> >>>>> I just noticed watching Massimo's video tutorials, how often we need >>>>> to open a second tab in Chrome when we want to create a >>>>> view/controller/model file. It often leads us to get conflicts since we do >>>>> not want to close the previous (having multiple tabs open we are working >>>>> on). >>>>> >>>>> If we could add a view with a button "add view" when looking at a >>>>> controller and the list of views, we could basically stop opening multiple >>>>> chrome tabs and also reduce the merges we need to do. >>>>> >>>>> *Edit views:* view1, view2, [Add view] >>>>> >>>>> Clicking it would open the new text file immediately in another tab. >>>>> >>>>> It should also reload the files toggle view on the left. An [add or +] >>>>> button could also be added after each section in the files toggle view to >>>>> the left, and it would feel really complete. Even though I guess we would >>>>> still open it sometime, it would reduce the times we need to click Edit >>>>> link at the top bar. >>>>> >>>> -- >>> Resources: >>> - http://web2py.com >>> - http://web2py.com/book (Documentation) >>> - http://github.com/web2py/web2py (Source code) >>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "web2py-users" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/web2py/JO4PrRnDpnU/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> web2py+unsubscr...@googlegroups.com. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.