app/demo/events/actions/loads.pom in voom-presenters-0.1.13 vs app/demo/events/actions/loads.pom in voom-presenters-0.2.0
- old
+ new
@@ -1,19 +1,29 @@
-Voom::Presenters.define(:toggle_visibility_action) do
+Voom::Presenters.define(:loads_action) do
helpers Demo::Helpers::IndentedGrid
attach :top_nav
attach :events_drawer
indented_grid do
heading 'Loads'
body 'Loads a new presenter, replacing the whole page.'
- subheading context['reloaded'] ? "Reloaded" : 'Loads'
- button 'loads' do
- event :click do
- loads :events, reloaded: true
+ content do
+ subheading "#{context['reloaded'] ? "Reloaded" : 'Loads'} another presenter"
+ button 'loads this page' do
+ event :click do
+ loads :loads_action, reloaded: true, nil_value:nil
+ end
end
+ heading context['reloaded'] ? "Reloaded" : 'Loaded'
end
- heading context['reloaded'] ? "Reloaded" : 'Loaded'
+ content do
+ subheading "An absolute URL loads another page"
+ button 'loads google.com' do
+ event :click do
+ loads 'https://google.com'
+ end
+ end
+ end
end
attach :code, file: __FILE__
end