SlideShare a Scribd company logo
1 of 28
Download to read offline
Using Share Extensibility Modules
        in Share Extras

     Will Abson (@wabson)
Agenda
•    Introduction
•    Custom Doclib Views
•    Customizing Custom Views
•    Customizing Dashlets
•    Customizing Document Details page
About Me
•  Integrations Engineer @ Alfresco
•  Founder and Lead of Share Extras
•  Creator of Site Geotagged Content Add-on
Recap – Share Extensibility
•  TTL by Dave Draper, May 2012
•  Share Customizations Live by Dave
   Draper and Erik Winlöf, Alfresco DevCon,
   Nov 2012
Extensibility Main Points
•  Declare modules in site-data/extensions
•  Change component behaviors by modifying the
   script model via a controller .js extension
•  Add HTML markup before, after, or instead of
   the default component content via @region
   directive
  –  As of 4.2.b, many components support adding
     markup into the component via the @markup directive
Extensibility Main Points
•  Add additional client-side dependencies
   via .head.ftl extensions, or (in 4.2) using
   the @script and @link directives in
   a .html.ftl extension
•  Add or override UI labels with
   additional .properties files
Site Geotagged Content
•  Visualize Geotagged
   Content in Share
  –  Using Google Maps
•  Tika provides
   automatic extraction
   of Geographic info
   from files
  –  e.g. EXIF data in
     digital photos
Site Geotagged Content
Originally just a Site Dashlet
Site Geotagged Content
Now also a Custom Doclib View
Custom DocLib Views
•  Allows us to add in our own views, which
   can be selected by the user
•  Requires Alfresco 4.0.2 / 4.2.a or later
•  More information on blog post by Ray
   Gauss II
•  Implemented as client-side renderer
   classes
Geographic Renderer
•  Built on top of the thumbnail renderer
•  We need to define
  –  Module definition
  –  Additional HTML markup (via Freemarker)
  –  Component controller extension
  –  Client-side renderer class
  –  CSS, icon, labels
Renderer Module Definition
org_sharextras_doclib-geo-view.xml

<extension>
    <modules>
        <module>
             <id>Document List Geographic View</id>
             <customizations>
                 <customization>
                     <targetPackageRoot>org.alfresco</targetPackageRoot>
                     <sourcePackageRoot>org.sharextras.customization.doclib-
geo-view</sourcePackageRoot>
                 </customization>
             </customizations>
        </module>
    </modules>
</extension>
Renderer HTML Markup
components/documentlibrary/documentlist.get.html.ftl
<@markup id="customDocLibView" target="documentListContainer" action="after">
   <div id="${args.htmlid}-geo" class="alf-geo documents"></div>
   <div id="${args.htmlid}-geo-empty" class="hidden">
       <div class="yui-dt-liner"></div>
   </div>
   <div id="${args.htmlid}-geo-item-template" class="alf-geo-item hidden”>...</div>
   ...
     <script type="text/javascript">//<![CDATA[
         YAHOO.Bubbling.subscribe("postSetupViewRenderers", function(layer, args) {
             var scope = args[1].scope;
             var geoViewRenderer = new ${geoRendererClass}("geo")
             geoViewRenderer.zoomLevel = ${preferences.zoomLevel!15};
             geoViewRenderer.center = "${(preferences.center!'')?js_string}";
             geoViewRenderer.mapTypeId = "${(preferences.mapTypeId!'')?js_string}";
             scope.registerViewRenderer(geoViewRenderer);
         });
     //]]></script>
</@>
Renderer Controller Extension
components/documentlibrary/documentlist.get.js

model.viewRendererNames.push("geo");
model.geoRendererClass =
"Extras.DocumentListGMapsGeoViewRenderer";
Renderer Client-side Class
source/web/extras/components/documentlibrary/
documentlist-geo.js

Extras.DocumentListGMapsGeoViewRenderer = function
DocumentListGMapsGeoViewRenderer_constructor(name)
{
   ...
}

YAHOO.extend(Extras.DocumentListGMapsGeoViewRenderer,
Extras.DocumentListGeoViewRendererBase,
{
   setupRenderer: function DL_GVR_setupRenderer(scope) {...},
   renderView: function DL_GVR_renderView(scope, sRequest, oResponse,
oPayload) {...}
}
Demo
•  Site Geotagged Content Dashlet
•  Site Geographic View
Introducing Leaflet
•  A great alternative to
   Google Maps
•  Open Source
•  Mobile-friendly
•  Plugin a wide range
   of mapping providers



                  leafletjs.com
Changing the View Behaviour
•  We’ll use a second module for this
  –  Order is important!
•  We need to provide
  –  Module definition
  –  A further webscript controller extension
Renderer Override Module
org_sharextras_doclib-geo-view-leaflet.xml

<extension>
    <modules>
        <module>
             <id>Document List Geographic View</id>
             <customizations>
                 <customization>
                     <targetPackageRoot>org.alfresco</targetPackageRoot>
                     <sourcePackageRoot>org.sharextras.customization.doclib-
geo-view-leaflet</sourcePackageRoot>
                 </customization>
             </customizations>
        </module>
    </modules>
</extension>
Renderer Override Controller
Extension
components/documentlibrary/documentlist.get.js

model.geoRendererClass =
"Extras.DocumentListLeafletGeoViewRenderer";
Demo
•  Site Geographic View with Leaflet
Changing other Components
•  The same approach is valid for most
   OOTB components, which populate the
   model.widgets object
  –  The @createWidgets Freemarker directive
     new in 4.2 then renders the widget markup
•  To demonstrate this, let’s also change the
   dashlet behavior
Demo
•  Site Geotagged Content Dashlet with
   Leaflet
Custom DocLib Previewers
•  The ability to ‘intervene’ between the
   widget configuration being declared and it
   being rendered is incredibly useful in other
   places, too!
•  Let’s look at the PdfJs viewer included in
   the Media Viewers add-on as an example
Previewer Controller Extension
components/documentlibrary/documentlist.get.js
if (model.widgets) // Protection for older versions
{
   for (var i = 0; i < model.widgets.length; i++)
   {
       var widget = model.widgets[i];
       if (widget.id == "WebPreview")
       {
          // Insert new pluginCondition(s) at start of the chain
          var conditions = [{...}];
          var oldConditions = eval("(" + widget.options.pluginConditions + ")");
          // Add the other conditions back in
          for (var j = 0; j < oldConditions.length; j++)
          {
             conditions.push(oldConditions[j]);
          }
          // Override the original conditions
          model.pluginConditions = jsonUtils.toJSONString(conditions);
          widget.options.pluginConditions = model.pluginConditions;
     }
}
Demo
•  PdfJs Viewer
More Information
•  http://sharextras.org
•  http://www.slideshare.net/alfresco/tech-
   talk-live-on-share-extensibility
•  http://blogs.alfresco.com/wp/developer/
   author/ddraper/
Tech talk live   share extras extension modules feb 13

More Related Content

What's hot

Connecting Content Management Apps with CMIS
Connecting Content Management Apps with CMISConnecting Content Management Apps with CMIS
Connecting Content Management Apps with CMISJeff Potts
 
jclouds overview
jclouds overviewjclouds overview
jclouds overviewAdrian Cole
 
A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionAlexey Gravanov
 
What's New in Nuxeo Platform 7.3
What's New in Nuxeo Platform 7.3 What's New in Nuxeo Platform 7.3
What's New in Nuxeo Platform 7.3 Nuxeo
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionDr. Arif Wider
 
Connecting Content Management Applications with CMIS
Connecting Content Management Applications with CMISConnecting Content Management Applications with CMIS
Connecting Content Management Applications with CMISNuxeo
 
No SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDBNo SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDBKen Cenerelli
 
A High-Performance Solution to Microservice UI Composition @ XConf Hamburg
A High-Performance Solution to Microservice UI Composition @ XConf HamburgA High-Performance Solution to Microservice UI Composition @ XConf Hamburg
A High-Performance Solution to Microservice UI Composition @ XConf HamburgDr. Arif Wider
 
Using Microsoft Azure as cloud file server
Using Microsoft Azure as cloud file serverUsing Microsoft Azure as cloud file server
Using Microsoft Azure as cloud file serverjimliddle
 
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Michael Kurz
 
Managing Engineering Information with Nuxeo
Managing Engineering Information with NuxeoManaging Engineering Information with Nuxeo
Managing Engineering Information with NuxeoNuxeo
 
JavaOne LATAM 2015 - Batch Processing: Processamento em Lotes no Mundo Corpor...
JavaOne LATAM 2015 - Batch Processing: Processamento em Lotes no Mundo Corpor...JavaOne LATAM 2015 - Batch Processing: Processamento em Lotes no Mundo Corpor...
JavaOne LATAM 2015 - Batch Processing: Processamento em Lotes no Mundo Corpor...Rodrigo Cândido da Silva
 
Liquibase via maven
Liquibase via mavenLiquibase via maven
Liquibase via mavenMaki Turki
 
CreateJS hackathon in Zurich
CreateJS hackathon in ZurichCreateJS hackathon in Zurich
CreateJS hackathon in ZurichHenri Bergius
 
Windows Azure for Developers - Service Management
Windows Azure for Developers - Service ManagementWindows Azure for Developers - Service Management
Windows Azure for Developers - Service ManagementMichael Collier
 

What's hot (20)

Html 5
Html 5Html 5
Html 5
 
Keystone.js 101
Keystone.js 101Keystone.js 101
Keystone.js 101
 
Connecting Content Management Apps with CMIS
Connecting Content Management Apps with CMISConnecting Content Management Apps with CMIS
Connecting Content Management Apps with CMIS
 
jclouds overview
jclouds overviewjclouds overview
jclouds overview
 
A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI Composition
 
Web server
Web serverWeb server
Web server
 
What's New in Nuxeo Platform 7.3
What's New in Nuxeo Platform 7.3 What's New in Nuxeo Platform 7.3
What's New in Nuxeo Platform 7.3
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI Composition
 
Connecting Content Management Applications with CMIS
Connecting Content Management Applications with CMISConnecting Content Management Applications with CMIS
Connecting Content Management Applications with CMIS
 
No SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDBNo SQL, No Problem: Use Azure DocumentDB
No SQL, No Problem: Use Azure DocumentDB
 
A High-Performance Solution to Microservice UI Composition @ XConf Hamburg
A High-Performance Solution to Microservice UI Composition @ XConf HamburgA High-Performance Solution to Microservice UI Composition @ XConf Hamburg
A High-Performance Solution to Microservice UI Composition @ XConf Hamburg
 
Using Microsoft Azure as cloud file server
Using Microsoft Azure as cloud file serverUsing Microsoft Azure as cloud file server
Using Microsoft Azure as cloud file server
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
 
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
Building rich Single Page Applications (SPAs) for desktop, mobile, and tablet...
 
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)Go Fullstack: JSF for Public Sites (CONFESS 2012)
Go Fullstack: JSF for Public Sites (CONFESS 2012)
 
Managing Engineering Information with Nuxeo
Managing Engineering Information with NuxeoManaging Engineering Information with Nuxeo
Managing Engineering Information with Nuxeo
 
JavaOne LATAM 2015 - Batch Processing: Processamento em Lotes no Mundo Corpor...
JavaOne LATAM 2015 - Batch Processing: Processamento em Lotes no Mundo Corpor...JavaOne LATAM 2015 - Batch Processing: Processamento em Lotes no Mundo Corpor...
JavaOne LATAM 2015 - Batch Processing: Processamento em Lotes no Mundo Corpor...
 
Liquibase via maven
Liquibase via mavenLiquibase via maven
Liquibase via maven
 
CreateJS hackathon in Zurich
CreateJS hackathon in ZurichCreateJS hackathon in Zurich
CreateJS hackathon in Zurich
 
Windows Azure for Developers - Service Management
Windows Azure for Developers - Service ManagementWindows Azure for Developers - Service Management
Windows Azure for Developers - Service Management
 

Similar to Tech talk live share extras extension modules feb 13

Web Components v1
Web Components v1Web Components v1
Web Components v1Mike Wilcox
 
Living on the Grid - Unlock the Power of Dojo Data Grids in XPages - MWLUG 2013
Living on the Grid - Unlock the Power of Dojo Data Grids in XPages - MWLUG 2013Living on the Grid - Unlock the Power of Dojo Data Grids in XPages - MWLUG 2013
Living on the Grid - Unlock the Power of Dojo Data Grids in XPages - MWLUG 2013balassaitis
 
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014FalafelSoftware
 
CUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsCUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsAlfresco Software
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Oro Inc.
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGapAlex S
 
Writing Gadgets with the WSO2 Gadget Server
Writing Gadgets with the WSO2 Gadget ServerWriting Gadgets with the WSO2 Gadget Server
Writing Gadgets with the WSO2 Gadget ServerWSO2
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources frameworkmarcplmer
 
Tech Talk Live on Share Extensibility
Tech Talk Live on Share ExtensibilityTech Talk Live on Share Extensibility
Tech Talk Live on Share ExtensibilityAlfresco Software
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentIvan Chepurnyi
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedStéphane Bégaudeau
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with MavenArcadian Learning
 

Similar to Tech talk live share extras extension modules feb 13 (20)

Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Living on the Grid - Unlock the Power of Dojo Data Grids in XPages - MWLUG 2013
Living on the Grid - Unlock the Power of Dojo Data Grids in XPages - MWLUG 2013Living on the Grid - Unlock the Power of Dojo Data Grids in XPages - MWLUG 2013
Living on the Grid - Unlock the Power of Dojo Data Grids in XPages - MWLUG 2013
 
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014
 
CUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension PointsCUST-1 Share Document Library Extension Points
CUST-1 Share Document Library Extension Points
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
 
Writing Gadgets with the WSO2 Gadget Server
Writing Gadgets with the WSO2 Gadget ServerWriting Gadgets with the WSO2 Gadget Server
Writing Gadgets with the WSO2 Gadget Server
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
 
The new static resources framework
The new static resources frameworkThe new static resources framework
The new static resources framework
 
Tech Talk Live on Share Extensibility
Tech Talk Live on Share ExtensibilityTech Talk Live on Share Extensibility
Tech Talk Live on Share Extensibility
 
Modern android development
Modern android developmentModern android development
Modern android development
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module developmentMagento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
 
An Overview of Project Jigsaw
An Overview of Project JigsawAn Overview of Project Jigsaw
An Overview of Project Jigsaw
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 

More from Alfresco Software

Alfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Software
 
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Software
 
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Software
 
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Software
 
Alfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Software
 
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Software
 
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Software
 
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Software
 
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Software
 
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Software
 
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Software
 
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Software
 
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Software
 
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Software
 
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...Alfresco Software
 
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Software
 
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Software
 
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Software
 
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Software
 
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Software
 

More from Alfresco Software (20)

Alfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossierAlfresco Day Benelux Inholland studentendossier
Alfresco Day Benelux Inholland studentendossier
 
Alfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management applicationAlfresco Day Benelux Hogeschool Inholland Records Management application
Alfresco Day Benelux Hogeschool Inholland Records Management application
 
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion HogescholenAlfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
Alfresco Day BeNelux: Customer Success Showcase - Saxion Hogescholen
 
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente AmsterdamAlfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
Alfresco Day BeNelux: Customer Success Showcase - Gemeente Amsterdam
 
Alfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of AlfrescoAlfresco Day BeNelux: The success of Alfresco
Alfresco Day BeNelux: The success of Alfresco
 
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo GroupAlfresco Day BeNelux: Customer Success Showcase - Credendo Group
Alfresco Day BeNelux: Customer Success Showcase - Credendo Group
 
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About FlowAlfresco Day BeNelux: Digital Transformation - It's All About Flow
Alfresco Day BeNelux: Digital Transformation - It's All About Flow
 
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
Alfresco Day Vienna 2016: Activiti – ein Katalysator für die DMS-Strategie be...
 
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
Alfresco Day Vienna 2016: Elektronische Geschäftsprozesse auf Basis von Alfre...
 
Alfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest APIAlfresco Day Vienna 2016: Alfrescos neue Rest API
Alfresco Day Vienna 2016: Alfrescos neue Rest API
 
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-KonsoleAlfresco Day Vienna 2016: Support Tools für die Admin-Konsole
Alfresco Day Vienna 2016: Support Tools für die Admin-Konsole
 
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit AlfrescoAlfresco Day Vienna 2016: Entwickeln mit Alfresco
Alfresco Day Vienna 2016: Entwickeln mit Alfresco
 
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
Alfresco Day Vienna 2016: Activiti goes enterprise: Die Evolution der BPM Sui...
 
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: WesternacherAlfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
Alfresco Day Vienna 2016: Partner Lightning Talk: Westernacher
 
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
Alfresco Day Vienna 2016: Bringing Content & Process together with the App De...
 
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novumAlfresco Day Vienna 2016: Partner Lightning Talk - it-novum
Alfresco Day Vienna 2016: Partner Lightning Talk - it-novum
 
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
Alfresco Day Vienna 2016: How to Achieve Digital Flow in the Enterprise - Joh...
 
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
Alfresco Day Warsaw 2016 - Czy możliwe jest spełnienie wszystkich regulacji p...
 
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - SafranAlfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
Alfresco Day Warsaw 2016: Identyfikacja i podpiselektroniczny - Safran
 
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital BusinessAlfresco Day Warsaw 2016: Advancing the Flow of Digital Business
Alfresco Day Warsaw 2016: Advancing the Flow of Digital Business
 

Tech talk live share extras extension modules feb 13

  • 1. Using Share Extensibility Modules in Share Extras Will Abson (@wabson)
  • 2. Agenda •  Introduction •  Custom Doclib Views •  Customizing Custom Views •  Customizing Dashlets •  Customizing Document Details page
  • 3. About Me •  Integrations Engineer @ Alfresco •  Founder and Lead of Share Extras •  Creator of Site Geotagged Content Add-on
  • 4. Recap – Share Extensibility •  TTL by Dave Draper, May 2012 •  Share Customizations Live by Dave Draper and Erik Winlöf, Alfresco DevCon, Nov 2012
  • 5. Extensibility Main Points •  Declare modules in site-data/extensions •  Change component behaviors by modifying the script model via a controller .js extension •  Add HTML markup before, after, or instead of the default component content via @region directive –  As of 4.2.b, many components support adding markup into the component via the @markup directive
  • 6. Extensibility Main Points •  Add additional client-side dependencies via .head.ftl extensions, or (in 4.2) using the @script and @link directives in a .html.ftl extension •  Add or override UI labels with additional .properties files
  • 7. Site Geotagged Content •  Visualize Geotagged Content in Share –  Using Google Maps •  Tika provides automatic extraction of Geographic info from files –  e.g. EXIF data in digital photos
  • 8. Site Geotagged Content Originally just a Site Dashlet
  • 9. Site Geotagged Content Now also a Custom Doclib View
  • 10. Custom DocLib Views •  Allows us to add in our own views, which can be selected by the user •  Requires Alfresco 4.0.2 / 4.2.a or later •  More information on blog post by Ray Gauss II •  Implemented as client-side renderer classes
  • 11. Geographic Renderer •  Built on top of the thumbnail renderer •  We need to define –  Module definition –  Additional HTML markup (via Freemarker) –  Component controller extension –  Client-side renderer class –  CSS, icon, labels
  • 12. Renderer Module Definition org_sharextras_doclib-geo-view.xml <extension> <modules> <module> <id>Document List Geographic View</id> <customizations> <customization> <targetPackageRoot>org.alfresco</targetPackageRoot> <sourcePackageRoot>org.sharextras.customization.doclib- geo-view</sourcePackageRoot> </customization> </customizations> </module> </modules> </extension>
  • 13. Renderer HTML Markup components/documentlibrary/documentlist.get.html.ftl <@markup id="customDocLibView" target="documentListContainer" action="after"> <div id="${args.htmlid}-geo" class="alf-geo documents"></div> <div id="${args.htmlid}-geo-empty" class="hidden"> <div class="yui-dt-liner"></div> </div> <div id="${args.htmlid}-geo-item-template" class="alf-geo-item hidden”>...</div> ... <script type="text/javascript">//<![CDATA[ YAHOO.Bubbling.subscribe("postSetupViewRenderers", function(layer, args) { var scope = args[1].scope; var geoViewRenderer = new ${geoRendererClass}("geo") geoViewRenderer.zoomLevel = ${preferences.zoomLevel!15}; geoViewRenderer.center = "${(preferences.center!'')?js_string}"; geoViewRenderer.mapTypeId = "${(preferences.mapTypeId!'')?js_string}"; scope.registerViewRenderer(geoViewRenderer); }); //]]></script> </@>
  • 15. Renderer Client-side Class source/web/extras/components/documentlibrary/ documentlist-geo.js Extras.DocumentListGMapsGeoViewRenderer = function DocumentListGMapsGeoViewRenderer_constructor(name) { ... } YAHOO.extend(Extras.DocumentListGMapsGeoViewRenderer, Extras.DocumentListGeoViewRendererBase, { setupRenderer: function DL_GVR_setupRenderer(scope) {...}, renderView: function DL_GVR_renderView(scope, sRequest, oResponse, oPayload) {...} }
  • 16. Demo •  Site Geotagged Content Dashlet •  Site Geographic View
  • 17. Introducing Leaflet •  A great alternative to Google Maps •  Open Source •  Mobile-friendly •  Plugin a wide range of mapping providers leafletjs.com
  • 18. Changing the View Behaviour •  We’ll use a second module for this –  Order is important! •  We need to provide –  Module definition –  A further webscript controller extension
  • 19. Renderer Override Module org_sharextras_doclib-geo-view-leaflet.xml <extension> <modules> <module> <id>Document List Geographic View</id> <customizations> <customization> <targetPackageRoot>org.alfresco</targetPackageRoot> <sourcePackageRoot>org.sharextras.customization.doclib- geo-view-leaflet</sourcePackageRoot> </customization> </customizations> </module> </modules> </extension>
  • 21. Demo •  Site Geographic View with Leaflet
  • 22. Changing other Components •  The same approach is valid for most OOTB components, which populate the model.widgets object –  The @createWidgets Freemarker directive new in 4.2 then renders the widget markup •  To demonstrate this, let’s also change the dashlet behavior
  • 23. Demo •  Site Geotagged Content Dashlet with Leaflet
  • 24. Custom DocLib Previewers •  The ability to ‘intervene’ between the widget configuration being declared and it being rendered is incredibly useful in other places, too! •  Let’s look at the PdfJs viewer included in the Media Viewers add-on as an example
  • 25. Previewer Controller Extension components/documentlibrary/documentlist.get.js if (model.widgets) // Protection for older versions { for (var i = 0; i < model.widgets.length; i++) { var widget = model.widgets[i]; if (widget.id == "WebPreview") { // Insert new pluginCondition(s) at start of the chain var conditions = [{...}]; var oldConditions = eval("(" + widget.options.pluginConditions + ")"); // Add the other conditions back in for (var j = 0; j < oldConditions.length; j++) { conditions.push(oldConditions[j]); } // Override the original conditions model.pluginConditions = jsonUtils.toJSONString(conditions); widget.options.pluginConditions = model.pluginConditions; } }
  • 27. More Information •  http://sharextras.org •  http://www.slideshare.net/alfresco/tech- talk-live-on-share-extensibility •  http://blogs.alfresco.com/wp/developer/ author/ddraper/