Wednesday, 8 May 2013

Updating Xataface Applications to Use the G2 Theme

NOTE:  As of version 2.1, the g2 theme is installed by default so the steps described in this article are no longer necessary.

The default Xataface theme was built on the old Plone 2.0 stylesheet from 2005.  Safe to say, it looks its age.   Clearly, Xataface needs a face lift.  The only question was how to introduce the modifications.  There were two primary options to choose from:

  1. Modify the core Xataface templates and stylesheets.
  2. Create an optional module that overrides the default templates and stylesheets.
In order to cause minimal disruption to existing Xataface applications, I chose the latter, and the solution is embodied in the g2 module - which includes new Javascripts, Stylesheets, and templates that look a little more modern.

The default Xataface theme.  Notice the tables list on the left and vertical because there are more than 10 tables included in the tables menu.
Same page using the G2 theme.  Notice the tables listed horizontally along the top.  The "More" drop-down menu lists the remaining tables.

Some features of the g2 module include:
  • jQuery.  jQuery is now included by default - so it is available to all scripts and Javascript modules.
  • Advanced Find form.  The advanced find form is now accessible using a dynamic Javascript pull-down effect so that users don't have to navigate away from the existing list or details page in order to perform a find.
    The Advanced find form appears via pull-down.
  • Selected Record Actions.  Result list actions are now all dialed in to operate on the records that are "checked" in list view.
    The list view now shows result list actions across the top and bottom of the list.  These all operate on the selected rows (i.e. the rows whose checkboxes are checked).
  • Result controller.  The result controller is now less cluttered, and only gives users option to change the "limit" and "start" when they click on the result details.
    The result list controller is more streamlined.  The "1-11 of 11" label is all that appears.  Clicking on that displays the pop-up dialog to modify the "skip" and "limit" settings.
  • More actions...  Action lists are now limited to 7 actions in a particular category.  Additional actions, are then included in an 8th "More" drop-down menu.  This makes the interface far more extensible when there are large numbers of tables.
    Now excess tables are listed in the "More..." menu automatically.  This is the case with all action groups.

How To Install

  1. Create a "modules" directory in your application if one doesn't already exist.
    $ cd /path/to/myapp
    $ mkdir modules
  2. Check out the latest g2 module from the subversion repository, into the "modules" directory.
    $ svn co g2
  3. Add the following to the [_modules] section of your application's conf.ini file.:
  4. Clean out the templates_c directory to remove old cached templates.
    $ rm -rf templates_c/*

Video Tutorial


  1. The video won't play, says its a duplicate...

    1. Thanks. It should be fixed now.

    2. Hello everyone..Welcome to my free masterclass strategy where i teach experience and inexperience traders the secret behind a successful trade.And how to be profitable in trading I will also teach you how to make a profit of $12,000 USD weekly and how to get back all your lost funds feel free to email me on( or whataspp number is +22999290178  

      Hello everyone..Welcome to my free masterclass strategy where i teach experience and inexperience traders the secret behind a successful trade.And how to be profitable in trading I will also teach you how to make a profit of $12,000 USD weekly and how to get back all your lost funds feel free to email me on( or whataspp number is +22999290178  

  2. This comment has been removed by the author.

  3. This comment has been removed by the author.

  4. Hi. It is asking for a username and password when i try to check out the code.

    1. I meant my other comment to be in reply to this... please see that comment
      Steve Hannah18 November 2013 14:36

    2. Thanks! Got it from github no problem. (For svn I was using GUI Windows client)

  5. Try getting it from github instead.
    I am slowly moving all Xataface stuff over to github. The github repo is therefore more recent than the subversion repo.

    However, there is no password protection on the SVN repo. I have seen reports from other people stating that they have run into the password issue but I can't seem to reproduce it myself. Are you using the command-line SVN client or a GUI app? Make sure you're getting it anonymously and not providing a username.

  6. Looking for the Best Dating Website? Join and find your perfect match.

  7. If you need your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (even if they're dating somebody else now) you got to watch this video
    right away...

    (VIDEO) Win your ex back with TEXT messages?


    Professional trading signals delivered to your cell phone daily.

    Start following our signals right now and make up to 270% per day.

  9. Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. Theme

  10. Hello i am here to spread this good news to the entire world on how i got my ex love back.I was going crazy when my love left me for another girl last month,But when i meet a friend that introduce me to DR IROSI the great messenger to the oracle that he serve,I narrated my problem to DR IROSI about how my ex love left me and also how i needed to get a job in a very big company.He only said to me that i have come to the right place were i will be getting my heart desire without any side effect.He told me what i need to do,After it was been done,In the next 2 days,My love called me on the phone and was saying sorry for living me before now and also in the next one week after my love called me to be pleading for forgiveness,I was called for interview in my desired company were i needed to work as the managing director..I am so happy and overwhelmed that i have to tell this to the entire world to contact DR IROSI at the following email address DRIROSISOLUTIONCENTER@GMAIL.COM and get all your problem solve..No problem is too big for him to solve..Contact him direct on DRIROSISOLUTIONCENTER@GMAIL.COM or call his mobile number or add him up on whatsapp via (+2348118829771). and get your problems solve like me.    

  11. LOVE SPELLS THAT WORKS I am sharing this testimony to partners suffering in their relationships because there is an enduring solution.
    My husband left me and our 2 kids for another woman for 3 years. I tried to be strong just for my kids but I could not control the pains that torment my heart. I was hurt and confused. I needed a help, so i did a research on the internet and came across a site where I saw that Dr. Aluya a spell caster, can help get lovers back. I contacted him and he did a special prayer and spells for me. To my surprises, after some days, my husband came back home. That was how we reunited again and there was a lot of love, joy and peace in the family.
    You can as well contact Dr.  Aluya  , a powerful spell-caster for solutions on his contact or directly on Whats App: +2348055431163