Welcome Guest, Not a member yet? Register   Sign In
CodeCrafter remix
#1

[eluser]dinhtrung[/eluser]
After a while, I have remixed CodeCrafter to generate only Controllers and Views. I think we don't need a model for each table when active record has made retrieve and insert into table so easily.
Some changes:
-- Use form_validation library foreach table field
-- Support upload file
-- Remember last visited page when delete, modify or save a row
-- Don't use Layout library anymore.
-- Add a 'View' option in the grid view, after that user can edit or delete the entry.
#2

[eluser]BeingDefined[/eluser]
For those that are lost: http://ellislab.com/forums/viewthread/47524/
#3

[eluser]abmcr[/eluser]
a live example is on line? Thank you
#4

[eluser]dinhtrung[/eluser]
Nope, sorry about that. But the structure is simple enough to read.
Each table is separated to 3 view : grid (a listing table), detail (for edit and add) and view (like details, but only show up the info, not for edit).
Each table must have PRIMARY KEY for this code to work. It can work with UNIQUE KEY, too. First, we see the structure of a table and see which field is UNI and PRI key. For those fields, we'll generate a custom validation function named _uniq_<fieldname> for add and edit a row.
I'm planning to modify the code for various view, grid and details template, like JSON structure, or call Ajax view from grid pages.
Any suggestion??? I've just learnt about Prototype and a bit of Scriptaneculous... Smile Javascript is not my best...




Theme © iAndrew 2016 - Forum software by © MyBB