@@ -78,26 +78,21 @@ <h2>App</h2>
7878 < section >
7979 < h3 > Options</ h3 >
8080
81- < p > el: DOM element to hold the views.,
82- < p > uiModels: Array of UI-models,
83- < p > elements:{
84- nav: '.evo-head-links',
85- nav2: '.evo-head-links2',
86- content: '#evol'
87- },
88- < p > style: 'panel-info',
89- < p > useRouter: true,
90- < p > pageSize:20,
81+ < p > < strong > el</ strong > : DOM element to hold the views.</ p >
82+ < p > < strong > uiModels</ strong > : Array of UI-models.</ p >
83+ < p > < strong > style</ strong > : Bootstrap style for panels (possible values: "panel-default" (grey), "panel-primary" (dark blue), "panel-success" (green), "panel-info" (light blue), "panel-warning" (yellow), "panel-danger" (red)).</ p >
84+ < p > < strong > useRouter</ strong > : Set to true for Evolutility to automatically handle routing.</ p >
85+ < p > < strong > pageSize</ strong > : Page size for list and cards views.</ p >
9186
9287 </ section >
9388
9489
9590 < section >
9691 < h3 > Methods</ h3 >
9792
98- < p > setRoute(( id, triggerRoute)) </ p >
93+ < p > < strong > setRoute(id, triggerRoute)</ strong > : Change the route and display the corresponding view. </ p >
9994
100- < p > setEntity(entityName, view, options)</ p >
95+ < p > < strong > setEntity(entityName, view, options)</ strong > : Change the entity and display the corresponding entity in the currently selected view. </ p >
10196
10297 </ section >
10398
@@ -116,7 +111,15 @@ <h3>Events</h3>
116111< a name ="toolbar " class ="evo-anchor "> </ a >
117112< section >
118113< h2 > Toolbar</ h2 >
119- < p > The toolbar manages all views for a specific UI-model.</ p >
114+ < p > The toolbar manages all views for a specific UI-model. It displays different options based on the context.</ p >
115+
116+ < p > Toolbar for One model:</ p >
117+ < p > < img class ="pixEvoView shadow "src ="screenshots/toolbar-one.gif "> </ p >
118+
119+
120+ < p > Toolbar for Many models:</ p >
121+ < p > < img class ="pixEvoView shadow " src ="screenshots/toolbar-many.gif "> </ p >
122+
120123
121124 < p > < pre >
122125< code > new Evol.Toolbar(
@@ -128,73 +131,60 @@ <h2>Toolbar</h2>
128131);</ code >
129132 </ pre > </ p >
130133
131- < p > For One model</ p >
132- < p > < img src ="screenshots/toolbar-one.gif "> </ p >
133-
134-
135- < p > For Many model</ p >
136- < p > < img src ="screenshots/toolbar-many.gif "> </ p >
137-
138-
139134 < section >
140135 < h3 > Options</ h3 >
141136
142- < p > toolbar: true,
143- < p > readonly: false,
144- < p > defaultViewOne: 'browse',
145- < p > defaultViewMany: 'list',
146- < p > style: 'panel-info',
147- < p > display: 'label', // tooltip, text, icon, none
148- < p > titleSelector: '#title',
149- < p > buttons: object,
150- < p > pageSize:20
137+ < p > < strong > defaultViewOne </ strong > : Default view when looking at a single model (possible values "browse", "edit", "mini", json"). </ p >
138+ < p > < strong > defaultViewMany </ strong > : Default view when looking at a collection (possible values "list", "cards", "bubbles", charts"). </ p >
139+
140+ < p > < strong > model </ strong > : Backbone model for the toolbar to manage. </ p >
141+ < p > < strong > collection </ strong > : Backbone collection for the toolbar to manage. </ p >
142+ < p > < strong > readonly </ strong > : Provides read-only interaction (no update or delete). </ p >
143+ < p > < strong > style </ strong > : Bootstrap style for panels (possible values: "panel-default" (grey), "panel-primary" (dark blue), "panel-success" (green), "panel-info" (light blue), "panel-warning" (yellow), "panel-danger" (red)). </ p >
144+ < p > < strong > titleSelector </ strong > : Selector for the title element outside of the view (example: '#title'). </ p >
145+ < p > < strong > pageSize</ strong > : Page size for list and cards views. </ p >
151146 </ section >
152147
153148
154149 < section >
155150 < h3 > Methods</ h3 >
156151
157- < p > render()</ p >
158-
159- < p > setData()</ p >
152+ < p > < strong > render()</ strong > : Render the toolbar and the default view.</ p >
160153
161- < p > getData() </ p >
154+ < p > < strong > setData(data) </ strong > : Set data. </ p >
162155
163- < p > setView(viewName) </ p >
156+ < p > < strong > getData() </ strong > : Get data. </ p >
164157
165- < p > setStatus(message) </ p >
158+ < p > < strong > setView(viewName) </ strong > : Set the current view (possible values: "browse", edit", "mini", "list"...). </ p >
166159
167- < p > showFilter()</ p >
160+ < p > < strong > showFilter()</ strong > : Expend the filter panel. </ p >
168161
169- < p > browse(direction)</ p >
162+ < p > < strong > browse(direction)</ strong > : Moves to the next or previous record. </ p >
170163
171- < p > saveItem (saveAndAdd)</ p >
164+ < p > s < strong > SaveItem (saveAndAdd)</ strong > : Save the currently edited record (if it passes validation). </ p >
172165
173- < p > newItem()</ p >
166+ < p > < strong > newItem()</ strong > : Create a new record. </ p >
174167
175- < p > deleteItem()</ p >
168+ < p > < strong > deleteItem()</ strong > : Delete the currently edited or browsed record. </ p >
176169
177- < p > clearMessage()</ p >
170+ < p > < strong > clearMessage()</ strong > : Clear the header message. </ p >
178171
179- < p > setMessage()</ p >
172+ < p > < strong > setMessage()</ strong > : Set the value of the header message. </ p >
180173
181174 </ section >
182175
183176
184177 < section >
185178 < h3 > Events</ h3 >
186179
187- < p > item.added</ p >
188- < p > item.saved</ p >
189- < p > item.deleted</ p >
190- < p > search</ p >
191- < p > filter.change</ p >
192- < p > toolbar.X (X = toolbar button Ids in [
180+ < p > < strong > item.added, item.saved, item.deleted</ strong > : Triggered when a record is added/saved or deleted.</ p >
181+ < p > < strong > filter.change</ strong > : Triggered when filter conditions are changed.</ p >
182+ < p > < strong > toolbar.X</ strong > : Triggered when a toolbar button is clicked. X = toolbar button Ids in [
193183 'new', 'del', 'filter', 'export',
194184 'browse', 'edit', 'mini', 'json',
195185 'list', 'cards', 'bubbles', 'charts',
196186 'prev', 'next'
197- ]) </ p >
187+ ]. </ p >
198188 </ section >
199189
200190</ section >
0 commit comments