SlideShare uma empresa Scribd logo
1 de 16
Baixar para ler offline
collective.autosaveform
                           Vincent Pretre - Zest software
                            PUN 20/10/11 - Amsterdam




Friday, October 21, 2011
Friday, October 21, 2011
Friday, October 21, 2011
Friday, October 21, 2011
Friday, October 21, 2011
Friday, October 21, 2011
Saving events

                     • Input changed
                     • User clicks
                     • User (or user’s cat) hits key
                     • Every x seconds

Friday, October 21, 2011
Saving form - local
                     • Use localstorage
                     • Fake dictionaries
                           [my_form][an_input] = ’10’
                           [my_form][multi_input][count] = ‘2’
                           [my_form][multi_input][values][0] = ‘bli’
                           [my_form][multi_input][values][1] = ‘bla’



Friday, October 21, 2011
Saving form - remote
                     • Every 10 local saves
                     • jQuery Ajax call
                     • data saved as annotations in
                           portal_autosaveform

                           [my_form][an_input] = ’10’
                           [my_form][multi_input][values] = [‘bli’, ‘bla’]



Friday, October 21, 2011
Loading form

                     • compare local/remote database versions
                     • use most recent
                     • fills the form with saved data


Friday, October 21, 2011
Using autosave form
                            1 - register form
                           from collective.autosaveform import config
                           from Products.CMFCore.utils import
                           getToolByName

                           tool = getToolByName(context,
                                               'portal_autosaveform')
                           try:
                              tool.register_form('my_saved_form',
                                           {'text_field': config.TEXT,
                                            'radio_field': config.RADIO})
                           except:
                              pass


Friday, October 21, 2011
Using autosave form
                            2 - enable loading

                           <script type="text/javascript">
                              jq('#my_saved_form').autosaveform();
                           </script>




Friday, October 21, 2011
Using autosave form
                              3 - mark form

                           def process_form(...):
                             # Process the form ...
                             tool = getToolByName(context,
                                                'portal_autosaveform'
                             tool.mark_form_processed(
                                      'my_saved_form')




Friday, October 21, 2011
Demo



Friday, October 21, 2011
Limitations

                     • Only works with logged-in users
                     • Only tested with custom forms (no
                           Archetypes forms or z3cforms)
                     • Do not support file inputs


Friday, October 21, 2011
Advantages

                     • Configurable
                     • Server friendly
                     • User friendly
                     • Multi-browsers
                     • Supports all HTML inputs

Friday, October 21, 2011

Mais conteúdo relacionado

Semelhante a Amsterdam PUN - 20-10-2011

iOS Selectors Blocks and Delegation
iOS Selectors Blocks and DelegationiOS Selectors Blocks and Delegation
iOS Selectors Blocks and Delegation
Jussi Pohjolainen
 
Backbone.js - Michał Taberski (PRUG 2.0)
Backbone.js - Michał Taberski (PRUG 2.0)Backbone.js - Michał Taberski (PRUG 2.0)
Backbone.js - Michał Taberski (PRUG 2.0)
ecommerce poland expo
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
rsnarayanan
 

Semelhante a Amsterdam PUN - 20-10-2011 (9)

iOS Selectors Blocks and Delegation
iOS Selectors Blocks and DelegationiOS Selectors Blocks and Delegation
iOS Selectors Blocks and Delegation
 
Backbone.js - Michał Taberski (PRUG 2.0)
Backbone.js - Michał Taberski (PRUG 2.0)Backbone.js - Michał Taberski (PRUG 2.0)
Backbone.js - Michał Taberski (PRUG 2.0)
 
2011 july-nyc-gtug-go
2011 july-nyc-gtug-go2011 july-nyc-gtug-go
2011 july-nyc-gtug-go
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
 
My Favourite 10 Things about Xcode/ObjectiveC
My Favourite 10 Things about Xcode/ObjectiveCMy Favourite 10 Things about Xcode/ObjectiveC
My Favourite 10 Things about Xcode/ObjectiveC
 
So, you think you know widgets.
So, you think you know widgets.So, you think you know widgets.
So, you think you know widgets.
 
J Query The Write Less Do More Javascript Library
J Query   The Write Less Do More Javascript LibraryJ Query   The Write Less Do More Javascript Library
J Query The Write Less Do More Javascript Library
 
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
 
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
SenchaCon 2016: Building a Faceted Catalog of Video Game Assets Using Ext JS ...
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Amsterdam PUN - 20-10-2011

  • 1. collective.autosaveform Vincent Pretre - Zest software PUN 20/10/11 - Amsterdam Friday, October 21, 2011
  • 7. Saving events • Input changed • User clicks • User (or user’s cat) hits key • Every x seconds Friday, October 21, 2011
  • 8. Saving form - local • Use localstorage • Fake dictionaries [my_form][an_input] = ’10’ [my_form][multi_input][count] = ‘2’ [my_form][multi_input][values][0] = ‘bli’ [my_form][multi_input][values][1] = ‘bla’ Friday, October 21, 2011
  • 9. Saving form - remote • Every 10 local saves • jQuery Ajax call • data saved as annotations in portal_autosaveform [my_form][an_input] = ’10’ [my_form][multi_input][values] = [‘bli’, ‘bla’] Friday, October 21, 2011
  • 10. Loading form • compare local/remote database versions • use most recent • fills the form with saved data Friday, October 21, 2011
  • 11. Using autosave form 1 - register form from collective.autosaveform import config from Products.CMFCore.utils import getToolByName tool = getToolByName(context, 'portal_autosaveform') try: tool.register_form('my_saved_form', {'text_field': config.TEXT, 'radio_field': config.RADIO}) except: pass Friday, October 21, 2011
  • 12. Using autosave form 2 - enable loading <script type="text/javascript"> jq('#my_saved_form').autosaveform(); </script> Friday, October 21, 2011
  • 13. Using autosave form 3 - mark form def process_form(...): # Process the form ... tool = getToolByName(context, 'portal_autosaveform' tool.mark_form_processed( 'my_saved_form') Friday, October 21, 2011
  • 15. Limitations • Only works with logged-in users • Only tested with custom forms (no Archetypes forms or z3cforms) • Do not support file inputs Friday, October 21, 2011
  • 16. Advantages • Configurable • Server friendly • User friendly • Multi-browsers • Supports all HTML inputs Friday, October 21, 2011