fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [12062] API: more on responsive design and JQuery for


From: Sigurd Nes
Subject: [Fmsystem-commits] [12062] API: more on responsive design and JQuery for datatables
Date: Thu, 21 Aug 2014 12:42:28 +0000

Revision: 12062
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12062
Author:   sigurdne
Date:     2014-08-21 12:42:27 +0000 (Thu, 21 Aug 2014)
Log Message:
-----------
API: more on responsive design and JQuery for datatables

Modified Paths:
--------------
    trunk/phpgwapi/templates/pure/css/side-menu-old-ie.css
    trunk/phpgwapi/templates/pure/css/side-menu.css
    trunk/phpgwapi/templates/pure/footer.tpl
    trunk/phpgwapi/templates/pure/head.inc.php
    trunk/phpgwapi/templates/pure/head.tpl
    trunk/phpgwapi/templates/pure/navbar.inc.php

Added Paths:
-----------
    trunk/phpgwapi/inc/class.uicommon_jquery.inc.php
    trunk/phpgwapi/templates/base/datatable_jquery.xsl
    trunk/phpgwapi/templates/pure/css/baby-blue-old-ie.css
    trunk/phpgwapi/templates/pure/css/baby-blue.css
    trunk/phpgwapi/templates/pure/js/html5shiv.js

Added: trunk/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.uicommon_jquery.inc.php                            
(rev 0)
+++ trunk/phpgwapi/inc/class.uicommon_jquery.inc.php    2014-08-21 12:42:27 UTC 
(rev 12062)
@@ -0,0 +1,843 @@
+<?php
+       /**
+       * phpGroupWare
+       *
+       * @author Erik Holm-Larsen <address@hidden>
+       * @author Torstein Vadla <address@hidden>
+       * @author Sigurd Nes <address@hidden>
+       * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * This file is part of phpGroupWare.
+       *
+       * phpGroupWare is free software; you can redistribute it and/or modify
+       * it under the terms of the GNU General Public License as published by
+       * the Free Software Foundation; either version 2 of the License, or
+       * (at your option) any later version.
+       *
+       * phpGroupWare is distributed in the hope that it will be useful,
+       * but WITHOUT ANY WARRANTY; without even the implied warranty of
+       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       * GNU General Public License for more details.
+       *
+       * You should have received a copy of the GNU General Public License
+       * along with phpGroupWare; if not, write to the Free Software
+       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
+       *
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+       * @package phpgwapi
+       * @subpackage utilities
+       * @version $Id: class.uicommon.inc.php 11988 2014-05-23 13:26:30Z 
sigurdne $
+       */
+
+       //phpgw::import_class('phpgwapi.yui');
+
+
+       abstract class phpgwapi_uicommon_jquery
+       {
+               const UI_SESSION_FLASH = 'flash_msgs';
+
+               protected
+                       $filesArray;
+
+               private
+                       $ui_session_key,
+                       $flash_msgs;
+
+               public $dateFormat;
+
+               public $type_of_user;
+
+       //      public $flash_msgs;
+
+               public function __construct($currentapp ='', $yui = '')
+               {
+
+                       $yui = isset($yui) && $yui == 'yui3' ? 'yui3' : 'yahoo';
+                       $currentapp = $currentapp ? $currentapp : 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+
+
+                       $this->tmpl_search_path = array();
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/phpgwapi/templates/base');
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']);
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/' . $currentapp . '/templates/base');
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/' . $currentapp . '/templates/' . 
$GLOBALS['phpgw_info']['server']['template_set']);
+
+                       if($yui == 'yui3')
+                       {
+                               self::add_javascript('phpgwapi', 'yui3', 
'yui/yui-min.js');
+                               self::add_javascript('phpgwapi', $yui, 
'common.js');
+                       }
+
+                       $this->url_prefix = str_replace('_', '.', 
get_class($this));
+
+                       $this->dateFormat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+
+                       $this->acl = & $GLOBALS['phpgw']->acl;
+                       $this->locations = & $GLOBALS['phpgw']->locations;
+
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($currentapp);
+               }
+
+               private function get_ui_session_key()
+               {
+                       return $this->ui_session_key;
+               }
+
+               private function restore_flash_msgs()
+               {
+                       if (($flash_msgs = 
$this->session_get(self::UI_SESSION_FLASH)))
+                       {
+                               if (is_array($flash_msgs))
+                               {
+                                       $this->flash_msgs = $flash_msgs;
+                                       
$this->session_set(self::UI_SESSION_FLASH, array());
+                                       return true;
+                               }
+                       }
+
+                       $this->flash_msgs = array();
+                       return false;
+               }
+
+               private function store_flash_msgs()
+               {
+                       return $this->session_set(self::UI_SESSION_FLASH, 
$this->flash_msgs);
+               }
+
+               private function reset_flash_msgs()
+               {
+                       $this->flash_msgs = array();
+                       $this->store_flash_msgs();
+               }
+
+               private function session_set($key, $data)
+               {
+                       return 
phpgwapi_cache::session_set($this->get_ui_session_key(), $key, $data);
+               }
+
+               private function session_get($key)
+               {
+                       return 
phpgwapi_cache::session_get($this->get_ui_session_key(), $key);
+               }
+
+               /**
+                * Provides a private session cache setter per ui class.
+                */
+               protected function ui_session_set($key, $data)
+               {
+                       return $this->session_set(get_class($this).'_'.$key, 
$data);
+               }
+
+               /**
+                * Provides a private session cache getter per ui class .
+                */
+               protected function ui_session_get($key)
+               {
+                       return $this->session_get(get_class($this).'_'.$key);
+               }
+
+               protected function generate_secret($length = 10)
+               {
+                       return 
substr(base64_encode(rand(1000000000,9999999999)),0, $length);
+               }
+
+               public function add_js_event($event, $js)
+               {
+                       $GLOBALS['phpgw']->js->add_event($event, $js);
+               }
+
+               public function add_js_load_event($js)
+               {
+                       $this->add_js_event('load', $js);
+               }
+
+               public function link($data)
+               {
+                       return $GLOBALS['phpgw']->link('/index.php', $data);
+               }
+
+               public function redirect($link_data)
+               {
+                       $GLOBALS['phpgw']->redirect_link('/index.php', 
$link_data);
+               }
+
+               public function flash($msg, $type='success')
+               {
+                       $this->flash_msgs[$msg] = $type == 'success';
+               }
+
+               public function flash_form_errors($errors)
+               {
+                       foreach($errors as $field => $msg)
+                       {
+                               $this->flash_msgs[$msg] = false;
+                       }
+               }
+
+               public function add_stylesheet($path)
+               {
+                       $GLOBALS['phpgw']->css->add_external_file($path);
+               }
+
+               public function add_javascript($app, $pkg, $name)
+               {
+                       return $GLOBALS['phpgw']->js->validate_file($pkg, 
str_replace('.js', '', $name), $app);
+               }
+
+               public function set_active_menu($item)
+               {
+                       $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
$item;
+               }
+
+               /**
+               * A more flexible version of xslttemplate.add_file
+               */
+               public function add_template_file($tmpl)
+               {
+                       if(is_array($tmpl))
+                       {
+                               foreach($tmpl as $t)
+                               {
+                                       $this->add_template_file($t);
+                               }
+                               return;
+                       }
+                       foreach(array_reverse($this->tmpl_search_path) as $path)
+                       {
+                               $filename = $path . '/' . $tmpl . '.xsl';
+                               if (file_exists($filename))
+                               {
+                                       
$GLOBALS['phpgw']->xslttpl->xslfiles[$tmpl] = $filename;
+                                       return;
+                               }
+                       }
+                       echo "Template $tmpl not found in search path: ";
+                       print_r($this->tmpl_search_path);
+                       die;
+               }
+
+               public function render_template($output)
+               {
+                       $GLOBALS['phpgw']->common->phpgw_header(true);
+                       if($this->flash_msgs)
+                       {
+                               $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox_data($this->flash_msgs);
+                               $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox($msgbox_data);
+                               foreach($msgbox_data as & $message)
+                               {
+                                       echo "<div 
class='{$message['msgbox_class']}'>";
+                                       echo $message['msgbox_text'];
+                                       echo '</div>';
+                               }
+                       }
+                       echo htmlspecialchars_decode($output);
+                       $GLOBALS['phpgw']->common->phpgw_exit();
+               }
+
+               /**
+                * Creates an array of translated strings.
+                */
+               function lang_array()
+               {
+                       $keys = func_get_args();
+                       foreach($keys as &$key)
+                       {
+                               $key = lang($key);
+                       }
+                       return $keys;
+               }
+
+               public function add_yui_translation(&$data)
+               {
+                       $this->add_template_file('yui_phpgw_i18n');
+                       $previous = lang('prev');
+                       $next = lang('next');
+                       $first = lang('first');
+                       $last = lang('last');
+                       $showing_items = lang('showing items');
+                       $of = lang('of');
+                       $to = lang('to');
+                       $shows_from = lang('shows from');
+                       $of_total = lang('of total');
+
+                       if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
+                       {
+                               $rows_per_page = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $rows_per_page = 10;
+                       }
+
+                       $data['yui_phpgw_i18n'] = array(
+                               'Calendar' => array(
+                                       'WEEKDAYS_SHORT' => 
json_encode($this->lang_array('Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa')),
+                                       'WEEKDAYS_FULL' => 
json_encode($this->lang_array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 
'Thursday', 'Friday', 'Saturday')),
+                                       'MONTHS_LONG' => 
json_encode($this->lang_array('January', 'February', 'March', 'April', 'May', 
'June', 'July', 'August', 'September', 'October', 'November', 'December')),
+                               ),
+                               'DataTable' => array(
+                                       'MSG_EMPTY' => json_encode(lang('No 
records found.')),
+                                       'MSG_LOADING' => 
json_encode(lang("Loading...")),
+                                       'MSG_SORTASC' => 
json_encode(lang('Click to sort ascending')),
+                                       'MSG_SORTDESC' => 
json_encode(lang('Click to sort descending')),
+                               ),
+                               'setupDatePickerHelper' => array(
+                                       'LBL_CHOOSE_DATE' => 
json_encode(lang('Choose a date')),
+                               ),
+                               'setupPaginator' => array(
+                                       'pageReportTemplate' => 
json_encode("{$showing_items} {startRecord} - {endRecord} {$of} 
{totalRecords}"),
+                                       'previousPageLinkLabel' => 
json_encode("&lt; {$previous}"),
+                                       'nextPageLinkLabel' => 
json_encode("{$next} &gt;"),
+                                       'firstPageLinkLabel' => 
json_encode("&lt;&lt; {$first}"),
+                                       'lastPageLinkLabel' => 
json_encode("{$last} &gt;&gt;"),
+                                       'template' => 
json_encode("{CurrentPageReport}<br/>  {FirstPageLink} {PreviousPageLink} 
{PageLinks} {NextPageLink} {LastPageLink}"),
+                                       'pageReportTemplate' => 
json_encode("{$shows_from} {startRecord} {$to} {endRecord} {$of_total} 
{totalRecords}."),
+                                       'rowsPerPage'   => $rows_per_page
+                               ),
+                               'common' => array(
+                                       'LBL_NAME' => json_encode(lang('Name')),
+                                       'LBL_TIME' => json_encode(lang('Time')),
+                                       'LBL_WEEK' => json_encode(lang('Week')),
+                                       'LBL_RESOURCE' => 
json_encode(lang('Resource')),
+                               ),
+                       );
+               }
+               public function add_jquery_translation(&$data)
+               {
+//                     $this->add_template_file('yui_phpgw_i18n');
+                       $previous = lang('prev');
+                       $next = lang('next');
+                       $first = lang('first');
+                       $last = lang('last');
+                       $showing_items = lang('showing items');
+                       $of = lang('of');
+                       $to = lang('to');
+                       $shows_from = lang('shows from');
+                       $of_total = lang('of total');
+
+                       if 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
+                       {
+                               $rows_per_page = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       }
+                       else
+                       {
+                               $rows_per_page = 10;
+                       }
+                       $lengthmenu = array();
+                       for($i = 1; $i < 4; $i++)
+                       {
+                               $lengthmenu[0][] = $i * $rows_per_page;
+                               $lengthmenu[1][] = $i * $rows_per_page;
+                       }
+
+                       if(isset($data['datatable']['allrows']) && 
$data['datatable']['allrows'])
+                       {
+                               $lengthmenu[0][] = -1;
+                               $lengthmenu[1][] = lang('all');
+                       }
+                       $data['jquery_phpgw_i18n'] = array(
+                               'datatable' => array(
+                                       'emptyTable'    =>      json_encode("No 
data available in table"),
+                                       'info'                  =>      
json_encode("Showing _START_ to _END_ of _TOTAL_ entries"),
+                                       'infoEmpty'             =>      
json_encode("Showing 0 to 0 of 0 entries"),
+                                       'infoFiltered'  =>  
json_encode("(filtered from _MAX_ total entries)"),
+                                       'infoPostFix'   =>      json_encode(""),
+                                       'thousands'             =>      
json_encode(","),
+                                       'lengthMenu'    =>      
json_encode("Show _MENU_ entries"),
+                                       'loadingRecords'=>      
json_encode("Loading..."),
+                                       'processing'    =>      
json_encode("Processing..."),
+                                       'search'                =>      
json_encode(lang('search')),
+                                       'zeroRecords'   =>      json_encode("No 
matching records found"),
+                                       'paginate'              =>      
json_encode(array(
+                                                               'first'         
=>      $first,
+                                                               'last'          
=>      $last,
+                                                               'next'          
=>      $next,
+                                                               'previous'      
=>      $previous
+
+                                       )),
+                                       'aria'  => json_encode(array(
+                                                               
'sortAscending'=>  ": activate to sort column ascending",
+                                                               
'sortDescending'=> ": activate to sort column descending"
+                                       )),
+                               ),
+                               'lengthmenu' => array('_' => 
json_encode($lengthmenu))
+                       );
+//                     _debug_array($data['jquery_phpgw_i18n']);die();
+
+               }
+
+               public function add_template_helpers()
+               {
+                       $this->add_template_file('helpers');
+               }
+
+               public function render_template_xsl($files, $data)
+               {
+                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
+
+                       if($this->flash_msgs)
+                       {
+                               $data['msgbox_data'] = 
$GLOBALS['phpgw']->common->msgbox($this->flash_msgs);
+                       }
+                       else
+                       {
+                               $this->add_template_file('msgbox');
+                       }
+
+                       $this->reset_flash_msgs();
+
+                       //$this->add_yui_translation($data);
+                       $this->add_jquery_translation($data);
+                       $data['webserver_url'] = 
$GLOBALS['phpgw_info']['server']['webserver_url'];
+
+                       $output = phpgw::get_var('output', 'string', 'REQUEST', 
'html');
+                       $GLOBALS['phpgw']->xslttpl->set_output($output);
+                       $this->add_template_file($files);
+                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('data' => $data));
+               }
+
+               // Add link key to a result array
+               public function _add_links(&$value, $key, $menuaction)
+               {
+                       $unset = 0;
+                       // FIXME: Fugly workaround
+                       // I cannot figure out why this variable isn't set, but 
it is needed
+                       // by the ->link() method, otherwise we wind up in the 
phpgroupware
+                       // errorhandler which does lot of weird things and 
breaks the output
+                       if 
(!isset($GLOBALS['phpgw_info']['server']['webserver_url'])) {
+                               
$GLOBALS['phpgw_info']['server']['webserver_url'] = "/";
+                               $unset = 1;
+                       }
+
+                       $value['link'] = self::link(array('menuaction' => 
$menuaction, 'id' => $value['id']));
+
+                       // FIXME: Fugly workaround
+                       // I kid you not my friend. There is something very 
wonky going on
+                       // in phpgroupware which I cannot figure out.
+                       // If this variable isn't unset() (if it wasn't set 
before that is)
+                       // then it will contain extra slashes and break URLs
+                       if ($unset) {
+                               
unset($GLOBALS['phpgw_info']['server']['webserver_url']);
+                       }
+               }
+
+               // Build a YUI result style array
+               public function yui_results($results)
+               {
+                       if (!$results)
+                       {
+                               $results['total_records'] = 0;
+                               $result['results'] = array();
+                       }
+
+                       $num_rows = 
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] ? (int) 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] : 15;
+
+                       return array(
+                               'ResultSet' => array(
+                                       'totalResultsAvailable' => 
$results['total_records'],
+                                       'totalRecords'          => 
$results['total_records'],// temeporary
+                                       'recordsReturned'       => 
count($results['results']),
+                                       'pageSize'                      => 
$num_rows,
+                                       'startIndex'            => 
$results['start'],
+                                       'sortKey'                       => 
$results['sort'],
+                                       'sortDir'                       => 
$results['dir'],
+                                       'Result'                        => 
$results['results'],
+                                       'actions'                       => 
$results['actions']
+                               )
+                       );
+               }
+
+               // Build a jquery result style array
+               public function jquery_results($results)
+               {
+                       if (!$results)
+                       {
+                               $results['total_records'] = 0;
+                               $results['recordsFiltered'] = 0;
+                               $result['data'] = array();
+                       }
+       //              _debug_array($result);
+                       return array(
+                               'recordsTotal'          => 
$results['total_records'],
+                               'recordsFiltered'       => 
$results['total_records'],
+                               'draw'                          => 
$results['draw'],
+                               'data'                          => 
$results['results']
+                       );
+               }
+
+               public function use_yui_editor($targets)
+               {
+                       /*
+                       
self::add_stylesheet('phpgwapi/js/yahoo/assets/skins/sam/skin.css');
+                       self::add_javascript('yahoo', 'yahoo/editor', 
'simpleeditor-min.js');
+                       */
+                       if(!is_array($targets))
+                       {
+                               $targets = array($targets);
+                       }
+
+                       $lang_font_style = lang('Font Style');
+                       $lang_lists = lang('Lists');
+                       $lang_insert_item = lang('Insert Item');
+                       $js = '';
+                       foreach ( $targets as $target )
+                       {
+                               $js .= <<<SCRIPT
+                       (function() {
+                               var Dom = YAHOO.util.Dom,
+                               Event = YAHOO.util.Event;
+
+                               var editorConfig = {
+                                       toolbar:
+                                               {buttons: [
+                                                       { group: 'textstyle', 
label: '{$lang_font_style}',
+                                                               buttons: [
+                                                                       { type: 
'push', label: 'Fet CTRL + SHIFT + B', value: 'bold' }
+                                                               ]
+                                                       },
+                                                       { type: 'separator' },
+                                                       { group: 'indentlist', 
label: '{$lang_lists}',
+                                                               buttons: [
+                                                                       { type: 
'push', label: 'Opprett punktliste', value: 'insertunorderedlist' },
+                                                                       { type: 
'push', label: 'Opprett nummerert liste', value: 'insertorderedlist' }
+                                                               ]
+                                                       },
+                                                       { type: 'separator' },
+                                                       { group: 'insertitem', 
label: '{$lang_insert_item}',
+                                                               buttons: [
+                                                                       { type: 
'push', label: 'HTML Lenke CTRL + SHIFT + L', value: 'createlink', disabled: 
true },
+                                                                       { type: 
'push', label: 'Sett inn bilde', value: 'insertimage' }
+                                                               ]
+                                                       },
+                                                       { type: 'separator' },
+                                                       { group: 'undoredo', 
label: 'Angre/Gjenopprett',
+                                                               buttons: [
+                                                                       { type: 
'push', label: 'Angre', value: 'undo' },
+                                                                       { type: 
'push', label: 'Gjenopprett', value: 'redo' }
+                                                               ]
+                                                       }
+                                               ]
+                                       },
+                                       height: '200px',
+                                       width: '700px',
+                                       animate: true,
+                                       dompath: true,
+                                       handleSubmit: true
+                               };
+
+                               var editorWidget = new 
YAHOO.widget.Editor('{$target}', editorConfig);
+                               editorWidget.render();
+                       })();
+
+SCRIPT;
+                       }
+
+                       
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/yahoo/editor/assets/skins/sam/editor.css');
+                       phpgw::import_class('phpgwapi.yui');
+                       phpgwapi_yui::load_widget('editor');
+                       $GLOBALS['phpgw']->js->add_event('load', $js);
+               }
+
+               public function render($template,$local_variables = array())
+               {
+                       foreach($local_variables as $name => $value)
+                       {
+                               $$name = $value;
+
+                       }
+
+                       ob_start();
+                       foreach(array_reverse($this->tmpl_search_path) as $path)
+                       {
+                               $filename = $path . '/' . $template;
+                               if (file_exists($filename))
+                               {
+                                       include($filename);
+                                       break;
+                               }
+                       }
+                       $output = ob_get_contents();
+                       ob_end_clean();
+                       self::render_template($output);
+               }
+
+               /**
+                * Method for JSON queries.
+                *
+                * @return YUI result
+                */
+               public abstract function query();
+
+               /**
+                * Generate javascript for the extra column definitions for a 
partial list
+                *
+                * @param $array_name the name of the javascript variable that 
contains the column definitions
+                * @param $extra_cols the list of extra columns to set
+                * @return string javascript
+                */
+               public static function get_extra_column_defs($array_name, 
$extra_cols = array())
+               {
+                       $result = "";
+
+                       foreach($extra_cols as $col){
+                               $literal  = '{';
+                               $literal .= 'key: "' . $col['key'] . '",';
+                               $literal .= 'label: "' . $col['label'] . '"';
+                               if (isset($col['formatter'])) {
+                                       $literal .= ',formatter: ' . 
$col['formatter'];
+                               }
+                               if (isset($col['parser'])) {
+                                       $literal .= ',parser: ' . 
$col['parser'];
+                               }
+                               $literal .= '}';
+
+                               if($col["index"]){
+                                       $result .= 
"{$array_name}.splice(".$col["index"].", 0,".$literal.");";
+                               } else {
+                                       $result .= 
"{$array_name}.push($literal);";
+                               }
+                       }
+
+                       return $result;
+               }
+
+               /**
+                * Generate javascript definitions for any editor widgets set 
on columns for
+                * a partial list.
+                *
+                * @param $array_name the name of the javascript variable that 
contains the column definitions
+                * @param $editors the list of editors, keyed by column key
+                * @return string javascript
+                */
+               public static function get_column_editors($array_name, $editors 
= array())
+               {
+                       $result  = "for (var i in {$array_name}) {\n";
+                       $result .= "    switch ({$array_name}[i].key) {\n";
+                       foreach ($editors as $field => $editor) {
+                               $result .= "            case '{$field}':\n";
+                               $result .= "                    
{$array_name}[i].editor = {$editor};\n";
+                               $result .= "                    break;\n";
+                       }
+                       $result .= " }\n";
+                       $result .= "}";
+
+                       return $result;
+               }
+
+               /**
+                * Returns a html-formatted error message if one is defined in 
the
+                * list of validation errors on the object we're given.  If no
+                * error is defined, an empty string is returned.
+                *
+                * @param $object the object to display errors for
+                * @param $field the name of the attribute to display errors for
+                * @return string a html formatted error message
+                */
+               public static function get_field_error($object, $field)
+               {
+                       if(isset($object))
+                       {
+                               $errors = $object->get_validation_errors();
+
+                               if ($errors[$field]) {
+                                       return '<label class="error" for="' . 
$field . '">' . $errors[$field] . '</label>';
+                               }
+                               return '';
+                       }
+               }
+
+               public static function get_messages($messages, $message_type)
+               {
+                       $output = '';
+                       if(is_array($messages) && count($messages) > 0) // 
Array of messages
+                       {
+                               $output = "<div class=\"{$message_type}\">";
+                               foreach($messages as $message)
+                               {
+                                       $output .= "<p 
class=\"message\">{$message}</p>";
+                               }
+                               $output .= "</div>";
+                       }
+                       else if($messages) {
+                               $output = "<div class=\"{$message_type}\"><p 
class=\"message\">{$messages}</p></div>";
+                       }
+                       return $output;
+               }
+               /**
+                * Returns a html-formatted error message to display on top of 
the page.  If
+                * no error is defined, an empty string is returned.
+                *
+                * @param $error the error to display
+                * @return string a html formatted error message
+                */
+               public static function get_page_error($errors)
+               {
+                       return self::get_messages($errors, 'error');
+               }
+
+               /**
+                * Returns a html-formatted error message to display on top of 
the page.  If
+                * no error is defined, an empty string is returned.
+                *
+                * @param $error the error to display
+                * @return string a html formatted error message
+                */
+               public static function get_page_warning($warnings)
+               {
+                       return self::get_messages($warnings, 'warning');
+               }
+
+               /**
+                * Returns a html-formatted info message to display on top of 
the page.  If
+                * no message is defined, an empty string is returned.
+                *
+                * @param $message the message to display
+                * @return string a html formatted info message
+                */
+               public static function get_page_message($messages)
+               {
+                       return self::get_messages($messages, 'info');
+               }
+
+               /**
+                * Download xls, csv or similar file representation of a data 
table
+                */
+               public function download()
+               {
+                       $list = $this->query();
+                       $list = $list['ResultSet']['Result'];
+
+                       $keys = array();
+
+                       if(count($list[0]) > 0) {
+                               foreach($list[0] as $key => $value) {
+                                       if(!is_array($value)) {
+                                               array_push($keys, $key);
+                                       }
+                               }
+                       }
+
+                       // Remove newlines from output
+                       $count = count($list);
+                       for($i = 0; $i < $count; $i++)
+                       {
+                               foreach ($list[$i] as $key => &$data)
+                               {
+                                       $data = str_replace(array("\n","\r\n", 
"<br>"),'',$data);
+                               }
+                       }
+
+                        // Use keys as headings
+                       $headings = array();
+                       $count_keys = count($keys);
+                       for($j=0;$j<$count_keys;$j++)
+                       {
+                               array_push($headings, lang($keys[$j]));
+                       }
+
+                       $property_common = CreateObject('property.bocommon');
+                       $property_common->download($list, $keys, $headings);
+               }
+
+               /**
+                * Returns a human-readable string from a lower case and 
underscored word by replacing underscores
+                * with a space, and by upper-casing the initial characters.
+                *
+                * @param  string $lower_case_and_underscored_word String to 
make more readable.
+                *
+                * @return string Human-readable string.
+                */
+               public static function 
humanize($lower_case_and_underscored_word)
+               {
+                       if (substr($lower_case_and_underscored_word, -3) === 
'_id')
+                       {
+                               $lower_case_and_underscored_word = 
substr($lower_case_and_underscored_word, 0, -3);
+                       }
+
+                       return ucfirst(str_replace('_', ' ', 
$lower_case_and_underscored_word));
+               }
+
+         /**
+          * Retrieves an array of files from $_FILES
+          *
+          * @param  string $key        A key
+          * @return array              An associative array of files
+          */
+               public function get_files($key = null)
+               {
+                       if (!$this->filesArray)
+                       {
+                               $this->filesArray = 
self::convert_file_information($_FILES);
+                       }
+
+                       return is_null($key) ? $this->filesArray : 
(isset($this->filesArray[$key]) ? $this->filesArray[$key] : array());
+               }
+
+               public function toggle_show_showall()
+               {
+                       if(isset($_SESSION['showall']) && 
!empty($_SESSION['showall']))
+                       {
+                               $this->bo->unset_show_all_objects();
+                       }
+                       else
+                       {
+                               $this->bo->show_all_objects();
+                       }
+                       $this->redirect(array('menuaction' => 
$this->url_prefix.'.index'));
+               }
+
+/*
+               public function use_yui_editor()
+               {
+                       
self::add_stylesheet('phpgwapi/js/yahoo/assets/skins/sam/skin.css');
+                       self::add_javascript('yahoo', 'yahoo/editor', 
'simpleeditor-min.js');
+               }
+
+*/             static protected function fix_php_files_array($data)
+               {
+                       $fileKeys = array('error', 'name', 'size', 'tmp_name', 
'type');
+                       $keys = array_keys($data);
+                       sort($keys);
+
+                       if ($fileKeys != $keys || !isset($data['name']) || 
!is_array($data['name']))
+                       {
+                               return $data;
+                       }
+
+                       $files = $data;
+                       foreach ($fileKeys as $k)
+                       {
+                               unset($files[$k]);
+                       }
+                       foreach (array_keys($data['name']) as $key)
+                       {
+                               $files[$key] = self::fix_php_files_array(array(
+                                       'error' => $data['error'][$key],
+                                       'name'   => $data['name'][$key],
+                                       'type'   => $data['type'][$key],
+                                       'tmp_name' => $data['tmp_name'][$key],
+                                       'size'   => $data['size'][$key],
+                               ));
+                       }
+
+                       return $files;
+               }
+
+               /**
+               * It's safe to pass an already converted array, in which case 
this method just returns the original array unmodified.
+               *
+               * @param  array $taintedFiles An array representing uploaded 
file information
+               *
+               * @return array An array of re-ordered uploaded file information
+               */
+               static public function convert_file_information(array 
$taintedFiles)
+               {
+                       $files = array();
+                       foreach ($taintedFiles as $key => $data)
+                       {
+                               $files[$key] = self::fix_php_files_array($data);
+                       }
+
+                       return $files;
+               }
+       }

Added: trunk/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- trunk/phpgwapi/templates/base/datatable_jquery.xsl                          
(rev 0)
+++ trunk/phpgwapi/templates/base/datatable_jquery.xsl  2014-08-21 12:42:27 UTC 
(rev 12062)
@@ -0,0 +1,674 @@
+<func:function name="phpgw:conditional">
+       <xsl:param name="test"/>
+       <xsl:param name="true"/>
+       <xsl:param name="false"/>
+
+       <func:result>
+               <xsl:choose>
+                       <xsl:when test="$test">
+                       <xsl:value-of select="$true"/>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <xsl:value-of select="$false"/>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </func:result>
+</func:function>
+
+<xsl:template match="data">
+
+<div id="main_content">
+       <xsl:choose>
+               <xsl:when test="datatable_name">
+                       <h3>
+                               <xsl:value-of select="datatable_name"/>
+                       </h3>
+               </xsl:when>
+       </xsl:choose>
+         <xsl:call-template name="datatable" />
+</div>
+</xsl:template>
+
+
+<xsl:template name="datatable" xmlns:php="http://php.net/xsl";>
+       <xsl:call-template name="jquery_phpgw_i18n"/>
+       <xsl:apply-templates select="form" />
+       <div id="list_flash">
+               <xsl:call-template name="msgbox"/>
+       </div>
+       <div id="message" class='message'/>
+       <xsl:apply-templates select="datatable"/> 
+       <xsl:apply-templates select="form/list_actions"/>
+</xsl:template>
+
+       <xsl:template name="jquery_phpgw_i18n" xmlns:php="http://php.net/xsl";>
+               <xsl:if test="jquery_phpgw_i18n">
+                       <script type="text/javascript">
+                               //Namespacing
+                               ;var JqueryPortico = {};
+
+                               JqueryPortico.i18n = {
+                               <xsl:for-each select="jquery_phpgw_i18n/*">
+                                       <xsl:value-of select="local-name()"/>: 
function(cfg)
+                                       {
+                                               cfg = cfg || {};
+                                               <xsl:for-each select="./*">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="local-name() != '_'">
+                                                                       
cfg["<xsl:value-of select="local-name()"/>"] = <xsl:value-of 
disable-output-escaping="yes" select="."/>;
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       cfg = 
<xsl:value-of disable-output-escaping="yes" select="."/>;
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
+                                               </xsl:for-each>
+                                               return cfg;
+                                       }<xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/>
+                               </xsl:for-each>
+                               };
+                       </script>
+               </xsl:if>
+
+       </xsl:template>
+
+<xsl:template match="toolbar">
+       <style id='toggle-box-css' type='text/css'>
+.toggle-box {
+  display: none;
+}
+
+.toggle-box + label {
+  cursor: pointer;
+  display: block;
+  font-weight: bold;
+  line-height: 21px;
+  margin-bottom: 5px;
+}
+
+.toggle-box + label + div {
+  display: none;
+  margin-bottom: 10px;
+}
+
+.toggle-box:checked + label + div {
+  display: block;
+}
+
+.toggle-box + label:before {
+  background-color: #4F5150;
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  border-radius: 10px;
+  color: #FFFFFF;
+  content: "+";
+  display: block;
+  float: left;
+  font-weight: bold;
+  height: 20px;
+  line-height: 20px;
+  margin-right: 5px;
+  text-align: center;
+  width: 20px;
+}
+
+.toggle-box:checked + label:before {
+  content: "\2212";
+} 
+       
+       </style>
+
+       <input class="toggle-box" id="header1" type="checkbox" />
+       <label for="header1">
+toolbar
+               <!--xsl:value-of select="php:function('lang', 'toolbar')"/-->
+       </label>
+
+       <div id="toolbar">
+                 <table >
+                       <tr>
+               <xsl:for-each select="item">
+                       <xsl:variable name="filter_key" 
select="concat('filter_', name)"/>
+                       <xsl:variable name="filter_key_name" 
select="concat(concat('filter_', name), '_name')"/>
+                       <xsl:variable name="filter_key_id" 
select="concat(concat('filter_', name), '_id')"/>
+               
+                       <xsl:choose>
+                               <xsl:when test="type = 'date-picker'">
+                                       <td valign="top">
+                                       <div class="date-picker">
+                                       <input id="filter_{name}" 
name="filter_{name}" type="text">
+                                                       <xsl:attribute 
name="value"><xsl:value-of select="../../../filters/*[local-name() = 
$filter_key]"/></xsl:attribute>
+                                               </input>
+                               </div>
+                                       </td>
+                               </xsl:when>
+                               <xsl:when test="type = 'autocomplete'">
+                                       <td class="auto">
+                                               <div class="auto">
+                                                       <input 
id="filter_{name}_name" name="filter_{name}_name" type="text">
+                                                               <xsl:attribute 
name="value"><xsl:value-of select="../../../filters/*[local-name() = 
$filter_key_name]"/></xsl:attribute>
+                                                       </input>
+                                                       <input 
id="filter_{name}_id" name="filter_{name}_id" type="hidden">
+                                                               <xsl:attribute 
name="value"><xsl:value-of select="../../../filters/*[local-name() = 
$filter_key_id]"/></xsl:attribute>
+                                                       </input>
+                                                       <div 
id="filter_{name}_container"/>
+                                               </div>
+                                               <script type="text/javascript"> 
+                                               
YAHOO.util.Event.onDOMReady(function() {
+                                                  var app = "<xsl:value-of 
select="app"/>";
+                                                  var name = "<xsl:value-of 
select="name"/>";
+                                                       var ui = "<xsl:value-of 
select="ui"/>";
+
+                                                       var itemSelectCallback 
= false;
+                                                       <xsl:if 
test="onItemSelect">
+                                                               
itemSelectCallback = <xsl:value-of select="onItemSelect"/>;
+                                                       </xsl:if>
+
+                                                       var 
onClearSelectionCallback = false;
+                                                       <xsl:if 
test="onClearSelection">
+                                                               
onClearSelectionCallback = <xsl:value-of select="onClearSelection"/>;
+                                                       </xsl:if>
+
+                                                       var requestGenerator = 
false;
+                                                       <xsl:if 
test="requestGenerator">
+                                                               
requestGenerator = <xsl:value-of select="requestGenerator"/>;
+                                                       </xsl:if>
+
+                                                       <![CDATA[
+//                                                     var oAC = 
YAHOO.portico.autocompleteHelper('index.php?menuaction=booking.ui'+ui+'.index&phpgw_return_as=json&',
 
+//                                                                             
                                         'filter_'+name+'_name', 
'filter_'+name+'_id', 'filter_'+name+'_container');
+
+                                                       var oArgs = 
{menuaction: app + '.ui'+ui+'.index'};
+                                                       var requestUrl = 
phpGWLink('index.php', oArgs, true);
+                                                       requestUrl += 
'filter_'+name+'_name', 'filter_'+name+'_id', 'filter_'+name+'_container';
+                                               //      alert('FIXME: 
autocompleteHelper::requestUrl ' + requestUrl );
+
+
+                                                       if (requestGenerator) {
+                                                               
oAC.generateRequest = requestGenerator;
+                                                       }
+
+                                                       if (itemSelectCallback) 
{
+                                                               
oAC.itemSelectEvent.subscribe(itemSelectCallback);
+                                                       }
+
+                                                       
YAHOO.util.Event.addBlurListener('filter_'+name+'_name', function()
+                                                       {
+                                                               if 
(YAHOO.util.Dom.get('filter_'+name+'_name').value == "")
+                                                               {
+                                                                       
YAHOO.util.Dom.get('filter_'+name+'_id').value = "";
+                                                                       if 
(onClearSelectionCallback) {
+                                                                               
onClearSelectionCallback();
+                                                                       }
+                                                               }
+                                                       });
+
+                                                       
YAHOO.portico.addPreSerializeQueryFormListener(function(form)
+                                                       {
+                                                               if 
(YAHOO.util.Dom.get('filter_'+name+'_name').value == "")
+                                                               {
+                                                                       
YAHOO.util.Dom.get('filter_'+name+'_id').value = "";
+                                                               } 
+                                                       });
+                                                       ]]>
+                                               });
+                                               </script>
+                                       </td>
+                               </xsl:when>
+                               <xsl:when test="type = 'filter'">
+                                       <td valign="top">
+                                       <xsl:variable name="name"><xsl:value-of 
select="name"/></xsl:variable>
+
+                                       <select id="{$name}" name="{$name}">
+                                               <xsl:for-each select="list">
+                                                       <xsl:variable 
name="id"><xsl:value-of select="id"/></xsl:variable>
+                                                       <xsl:if test="id = 
'NEW'">
+                                                               <option 
value="{$id}" selected="selected">
+                                                                       
<xsl:value-of select="name"/>
+                                                               </option>
+                                                       </xsl:if>
+                                                       <xsl:if test="id != 
'NEW'">
+                                                               <option 
value="{$id}">
+                                                                       
<xsl:value-of select="name"/>
+                                                               </option>
+                                                       </xsl:if>
+                                               </xsl:for-each>
+                                       </select>
+                                       </td>
+                               </xsl:when>
+                               <xsl:when test="type = 'link'">
+                                       <td valign="top">
+                                       <a href="{href}"><xsl:value-of 
select="value"/></a>
+
+
+                                       </td>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <td valign="top">
+                                       <input id="innertoolbar">
+                                               <xsl:attribute 
name="type"><xsl:value-of select="phpgw:conditional(not(type), '', 
type)"/></xsl:attribute>
+                                               <xsl:attribute 
name="name"><xsl:value-of select="phpgw:conditional(not(name), '', 
name)"/></xsl:attribute>
+                                               <xsl:attribute 
name="onclick"><xsl:value-of select="phpgw:conditional(not(onClick), '', 
onClick)"/></xsl:attribute>
+                                               <xsl:attribute 
name="value"><xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/></xsl:attribute>
+                                               <xsl:attribute 
name="href"><xsl:value-of select="phpgw:conditional(not(href), '', 
href)"/></xsl:attribute>
+                                               <xsl:attribute 
name="class"><xsl:value-of select="phpgw:conditional(not(class), '', 
class)"/></xsl:attribute>
+                                       </input>
+                                       </td>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:for-each>
+                 </tr>
+                       <xsl:if test="item/text and normalize-space(item/text)">
+                               <thead>
+                                       <tr>
+                                               <xsl:for-each select="item">
+                                                       <td>
+                                                               <xsl:if 
test="name">
+                                                                       <label>
+                                                                               
<xsl:attribute name="for"><xsl:value-of select="phpgw:conditional(not(name), 
'', name)"/></xsl:attribute>
+                                                                               
<xsl:value-of select="phpgw:conditional(not(text), '', text)"/>
+                                                                       </label>
+                                                               </xsl:if>
+                                                       </td>
+                                               </xsl:for-each>
+                                       </tr>
+                               </thead>
+                       </xsl:if>
+               </table>
+       </div>
+</xsl:template>
+
+<xsl:template match="form/list_actions">
+       <form id="list_actions_form" method="POST">
+               <!-- Form action is set by javascript listener -->
+               <div id="list_actions" class='yui-skin-sam'>
+                       <table cellpadding="0" cellspacing="0">
+                               <tr>
+                                       <xsl:for-each select="item">
+                                               <td valign="top">
+                                                       <input 
id="innertoolbar">
+                                                               <xsl:attribute 
name="type"><xsl:value-of select="phpgw:conditional(not(type), '', 
type)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="name"><xsl:value-of select="phpgw:conditional(not(name), '', 
name)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="onclick"><xsl:value-of select="phpgw:conditional(not(onClick), '', 
onClick)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="value"><xsl:value-of select="phpgw:conditional(not(value), '', 
value)"/></xsl:attribute>
+                                                               <xsl:attribute 
name="href"><xsl:value-of select="phpgw:conditional(not(href), '', 
href)"/></xsl:attribute>
+                                                       </input>
+                                               </td>
+                                       </xsl:for-each>
+                               </tr>
+                       </table>
+               </div>
+       </form>
+</xsl:template>
+<xsl:template match="form">
+       <form id="queryForm">
+               <xsl:attribute name="method">
+                       <xsl:value-of select="phpgw:conditional(not(method), 
'GET', method)"/>
+               </xsl:attribute>
+
+               <xsl:attribute name="action">
+                       <xsl:value-of select="phpgw:conditional(not(action), 
'', action)"/>
+               </xsl:attribute>
+               <xsl:apply-templates select="toolbar"/>
+       </form>
+
+       <form id="update_table_dummy" method='POST' action='' >
+       </form>
+
+</xsl:template>
+
+<xsl:template match="datatable">
+       <xsl:call-template name="datasource-definition" />
+
+</xsl:template>
+
+<xsl:template name="datasource-definition">
+       <table id="datatable-container" class="display cell-border compact 
responsive no-wrap" width="100%">
+               <thead>
+                       <tr>
+                               <xsl:for-each select="//datatable/field">
+                                       <th>
+                                               <xsl:value-of select="label"/>
+                                       </th>
+                               </xsl:for-each>
+                       </tr>
+               </thead>
+       </table>
+       <script>
+               JqueryPortico.columns = [
+                       <xsl:for-each select="//datatable/field">
+                               {
+                                       data:                   "<xsl:value-of 
select="key"/>",
+                                       class:                  "<xsl:value-of 
select="className"/>",
+                                       orderable:              <xsl:value-of 
select="phpgw:conditional(not(sortable = 0), 'true', 'false')"/>,
+                                       <xsl:if test="hidden">
+                                       class:                  'none', //FIXME 
- virker ikke...'responsive' plukker den fram igjen
+                                       visible                 :false,
+                                       </xsl:if>
+                                       <xsl:if test="formatter">
+                                        render: function (dummy1, dummy2, 
oData {
+                                                       try {
+                                                               var ret = 
<xsl:value-of select="formatter"/>(oData);
+                                                       }
+                                                       catch(err) {
+                                                               return 
err.message;
+                                                       }
+                                                       return ret;
+                         },
+
+                                       </xsl:if>
+                                       defaultContent: "<xsl:value-of 
select="defaultContent"/>"
+                               }<xsl:value-of 
select="phpgw:conditional(not(position() = last()), ',', '')"/>
+                       </xsl:for-each>
+               ];
+       </script>
+
+       <script type="text/javascript" class="init">
+
+               $(document).ready(function() {
+
+                       var ajax_url = '<xsl:value-of select="source"/>';
+                       var download_url = '<xsl:value-of select="download"/>';
+                       var exclude_colvis = [];
+<![CDATA[
+                       TableTools.BUTTONS.download = {
+                               "sAction": "text",
+                               "sTag": "default",
+                               "sFieldBoundary": "",
+                               "sFieldSeperator": "\t",
+                               "sNewLine": "<br>",
+                               "sToolTip": "",
+                               "sButtonClass": "DTTT_button_text",
+                               "sButtonClassHover": "DTTT_button_text_hover",
+                               "sButtonText": "Download",
+                               "mColumns": "all",
+                               "bHeader": true,
+                               "bFooter": true,
+                               "sDiv": "",
+                               "fnMouseover": null,
+                               "fnMouseout": null,
+                               "fnClick": function( nButton, oConfig ) {
+                                       var oParams = 
this.s.dt.oApi._fnAjaxParameters( this.s.dt );
+                                       oParams.length = null;
+                                       oParams.columns = null;
+                                       oParams.start = null;
+                                       oParams.draw = null;
+                                       var iframe = 
document.createElement('iframe');
+                                       iframe.style.height = "0px";
+                                       iframe.style.width = "0px";
+                                       iframe.src = 
oConfig.sUrl+"?"+$.param(oParams) + "&allrows=1";
+                                       document.body.appendChild( iframe );
+                               },
+                               "fnSelect": null,
+                               "fnComplete": null,
+                               "fnInit": null
+                       };
+       ]]>
+               <xsl:choose>
+                               <xsl:when test="//datatable/actions">
+                                               JqueryPortico.TableTools =      
{
+                                                               "sSwfPath": 
"phpgwapi/js/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
+                                                               "sRowSelect": 
"multi",
+                                                               "aButtons":
+                                                                       [
+                                                                               
        {
+                                                                           
"sExtends":    "collection",
+                                                                               
                "sButtonText": "Operation",
+                                                                               
                "aButtons": [
+                                                                               
                        'copy',
+                                                                               
                        "select_all",
+                                                                               
                        "select_none"
+                                                                               
                <xsl:choose>
+                                                                               
                                <xsl:when test="download">
+                                                                               
                        ,{
+                                                                               
                                "sExtends": "download",
+                                                                               
                                "sButtonText": "Download",
+                                                                               
                                "sUrl": '<xsl:value-of select="download"/>'
+                                                                               
                        }
+                                                                               
                        </xsl:when>
+                                                                               
                </xsl:choose>
+                                                                               
                <xsl:choose>
+                                                                               
                                <xsl:when test="//datatable/actions">
+                                                                               
                        ,
+                                                                               
                        {
+                                                                               
                                sExtends: "div",
+                                                                               
                                sButtonText: "Knapper nedenfor gjelder pr valgt 
element "
+                                                                               
                        },
+                                                                               
                                </xsl:when>
+                                                                               
                </xsl:choose>
+
+                                                                               
                <xsl:for-each select="//datatable/actions">
+                                                                               
                        {
+                                                                               
                                sExtends:               "select",
+                                                                               
                                sButtonText:    "<xsl:value-of select="text"/>",
+                                                                               
                                fnClick:                function (nButton, 
oConfig, oFlash) {
+                                                                               
                                                                var receiptmsg 
= [];
+                                                                               
                                                                var selected = 
fnGetSelected();
+                                                                               
                                                                var numSelected 
=       selected.length;
+                                                                               
                                
+                                                                               
                                                                if (numSelected 
==0){
+                                                                               
                                                                        
alert('None selected');
+                                                                               
                                                                        return 
false;
+                                                                               
                                                                }
+
+                                                                               
                                                                <xsl:if 
test="confirm_msg">
+                                                                               
                                                                        var 
confirm_msg = "<xsl:value-of select="confirm_msg"/>";
+                                                                               
                                                                        var r = 
confirm(confirm_msg);
+                                                                               
                                                                        if (r 
!= true) {
+                                                                               
                                                                                
return false;
+                                                                               
                                                                        }
+                                                                               
                                                                </xsl:if>
+
+                                                                               
                                                                var target = 
"<xsl:value-of select="target"/>";
+                                                                               
                                                                if(!target)
+                                                                               
                                                                {
+                                                                               
                                                                        target 
= '_self';
+                                                                               
                                                                }
+
+                                                                               
                                                                if (numSelected 
&gt; 1){
+                                                                               
                                                                        target 
= '_blank';
+                                                                               
                                                                }
+
+
+                                                                               
                                                                var n = 0;
+                                                                               
                                                                for (; n &lt; 
numSelected; ) {
+
+                                                                               
                                        //                              
console.log(selected[n]);
+                                                                               
                                                                        var 
aData = oTable.fnGetData( selected[n] ); //complete dataset from json returned 
from server
+                                                                               
                                        //                              
console.log(aData);
+
+
+                                                                               
                                                                        
//delete stuff comes here
+                                                                               
                                                                        var 
action = "<xsl:value-of select="action"/>";
+
+                                                                               
                                                                        <xsl:if 
test="parameters">
+                                                                               
                                                                                
var parameters = <xsl:value-of select="parameters"/>;
+                                                                               
                                        //                                      
        console.log(parameters.parameter);
+                                                                               
                                                                                
var i = 0;
+                                                                               
                                                                                
len = parameters.parameter.length;
+                                                                               
                                                                                
for (; i &lt; len; ) {
+                                                                               
                                                                                
        action += '&amp;' + parameters.parameter[i]['name'] + '=' + 
aData[parameters.parameter[i]['source']];
+                                                                               
                                                                                
        i++;
+                                                                               
                                                                                
}
+                                                                               
                                                                        
</xsl:if>
+                                                                               
                                                                        // look 
for the word "DELETE" in URL
+                                                                               
                                                                        
if(substr_count(action,'delete')>0)
+                                                                               
                                                                        {
+                                                                               
                                                                                
        action += "&amp;confirm=yes&amp;phpgw_return_as=json";
+                                                                               
                                                                                
        receipt = execute_ajax(action);
+                                                                               
                                                                                
        oTable.fnDraw();
+                                                                               
                                                                        }
+                                                                               
                                                                        else if 
(target == 'ajax')
+                                                                               
                                                                        {
+                                                                               
                                                                                
        action += "&amp;phpgw_return_as=json";
+                                                                               
                                                                                
        execute_ajax(action);
+                                                                               
                                                                                
        oTable.fnDraw();
+
+                                                                               
                                                                        }
+                                                                               
                                                                        else
+                                                                               
                                                                        {
+                                                                               
                                                                                
window.open(action,target);
+                                                                               
                                                                        }
+
+                                                                               
                                                                        n++;
+                                                                               
                                                                }
+                                                                               
                                                }
+
+                                                                               
                        }<xsl:value-of select="phpgw:conditional(not(position() 
= last()), ',', '')"/>
+                                                                               
                </xsl:for-each>
+
+                                                                               
                ]
+                                                                               
        }
+                                        ]
+                                                               };
+
+
+
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       JqueryPortico.TableTools = {};
+                               </xsl:otherwise>
+                       </xsl:choose>
+<![CDATA[
+
+                       for(i=0;i < JqueryPortico.columns.length;i++)
+                       {
+                               if (JqueryPortico.columns[i]['visible'] != 
'undefined' && JqueryPortico.columns[i]['visible'] == false)
+                               {
+                                       exclude_colvis.push(i);
+                               }
+                       }
+
+                       var oTable = $('#datatable-container').dataTable( {
+                               processing:             true,
+                               serverSide:             true,
+                               responsive:             true,
+                               deferRender:    true,
+                               ajax:                   {
+                                       url: ajax_url,
+                                       data: { cat_id: '' },
+                                       type: 'GET'
+                               },
+                               lengthMenu:             
JqueryPortico.i18n.lengthmenu(),
+                               language:               
JqueryPortico.i18n.datatable(),
+                               columns:                JqueryPortico.columns,
+                               colVis: {
+                                                               exclude: 
exclude_colvis
+                               },
+                               dom:                    
'lCT<"clear">f<"top"ip>rt<"bottom"><"clear">',
+                               stateSave:              true,
+                               stateDuration: -1, //sessionstorage
+                               tabIndex:               1,
+                               oTableTools: JqueryPortico.TableTools
+                       } );
+
+       ]]>
+
+                       /**
+                       * Add left click action..
+                       */
+                       <xsl:if test="left_click_action != ''">
+                               $("#datatable-container").on("click", "tr", 
function() {
+                                       var iPos = oTable.fnGetPosition( this );
+                                       var aData = oTable.fnGetData( iPos ); 
//complete dataset from json returned from server
+                                       try {
+                                               <xsl:value-of 
select="left_click_action"/>(aData);
+                                       }
+                                       catch(err) {
+                                           
document.getElementById("message").innerHTML = err.message;
+                                       }
+
+                               });
+                       </xsl:if>
+
+                       /**
+                       * Add dbl click action..
+                       */
+
+                       <xsl:if test="dbl_click_action != ''">
+                               $("#datatable-container").on("dblclick", "tr", 
function() {
+                                       var iPos = oTable.fnGetPosition( this );
+                                       var aData = oTable.fnGetData( iPos ); 
//complete dataset from json returned from server
+                                       try {
+                                               <xsl:value-of 
select="dbl_click_action"/>(aData);
+                                       }
+                                       catch(err) {
+                                           
document.getElementById("message").innerHTML = err.message;
+                                       }
+
+                               });
+                       </xsl:if>
+
+                               <xsl:for-each select="//form/toolbar/item">
+                                       <xsl:if test="type = 'filter'">
+                                               $('select#<xsl:value-of 
select="name"/>').change( function() {
+                                               
oTable.dataTableSettings[0]['ajax']['data']['<xsl:value-of select="name"/>'] = 
$(this).val();
+                                               oTable.fnDraw();
+                                       } );
+                                       </xsl:if>
+                               </xsl:for-each>
+<![CDATA[
+
+                       function fnGetSelected( )
+                       {
+                               var aReturn = new Array();
+                                var aTrs = oTable.fnGetNodes();
+                                for ( var i=0 ; i < aTrs.length ; i++ )
+                                {
+                                        if ( $(aTrs[i]).hasClass('selected') )
+                                        {
+                                                aReturn.push( i );
+                                        }
+                                }
+                                return aReturn;
+                       }
+
+                       function execute_ajax(requestUrl)
+                       {
+                               $.ajax({
+                                       type: 'POST',
+                                       dataType: 'json',
+                                       url: requestUrl,
+                                       success: function(data) {
+                                               
document.getElementById("message").innerHTML += '<br/>' + data.receipt;
+                                       }
+                               });
+
+                       }
+
+                       function substr_count( haystack, needle, offset, length 
)
+                       {
+                               var pos = 0, cnt = 0;
+
+                               haystack += '';
+                               needle += '';
+                               if(isNaN(offset)) offset = 0;
+                               if(isNaN(length)) length = 0;
+                               offset--;
+
+                               while( (offset = haystack.indexOf(needle, 
offset+1)) != -1 )
+                               {
+                                       if(length > 0 && (offset+needle.length) 
> length)
+                                       {
+                                               return false;
+                                       } else
+                                       {
+                                               cnt++;
+                                       }
+                               }
+                               return cnt;
+                       }
+
+               } );
+
+]]>
+       </script>
+
+       <script>
+               <xsl:choose>
+                       <xsl:when test="//js_lang != ''">
+                               var lang = <xsl:value-of select="//js_lang"/>;
+                       </xsl:when>
+               </xsl:choose>
+       </script>
+
+</xsl:template>

Added: trunk/phpgwapi/templates/pure/css/baby-blue-old-ie.css
===================================================================
--- trunk/phpgwapi/templates/pure/css/baby-blue-old-ie.css                      
        (rev 0)
+++ trunk/phpgwapi/templates/pure/css/baby-blue-old-ie.css      2014-08-21 
12:42:27 UTC (rev 12062)
@@ -0,0 +1,826 @@
+
+/* --------------------------
+ * Element Styles
+ * --------------------------
+*/
+
+body {
+    min-width: 320px;
+    color: #777;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+    font-weight: bold;
+    color: rgb(75, 75, 75);
+}
+
+h3 {
+    font-size: 1.25em;
+}
+
+h4 {
+    font-size: 1.125em;
+}
+
+a {
+    color: #3b8bba;
+    /* block-background-text-normal */
+    text-decoration: none;
+}
+
+a:visited {
+    color: #265778;
+    /* block-normal-text-normal */
+}
+
+dt {
+    font-weight: bold;
+}
+
+dd {
+    margin: 0 0 10px 0;
+}
+
+aside {
+    background: #1f8dd6;
+    /* same color as selected state on site menu */
+    padding: 0.3em 1em;
+    border-radius: 3px;
+    color: #fff;
+}
+
+aside a,
+aside a:visited {
+    color: rgb(169, 226, 255);
+}
+
+/* --------------------------
+ * Layout Styles
+ * --------------------------
+*/
+
+/* Navigation Push Styles */
+
+#layout {
+    position: relative;
+    padding-left: 0;
+}
+
+#layout.active {
+    position: relative;
+    left: 160px;
+}
+
+#layout.active #menu {
+    left: 160px;
+    width: 160px;
+}
+
+/* Apply the .box class on the immediate parent of any grid element (pure-u-*) 
to apply some padding. */
+
+.l-box {
+    padding: 1em;
+}
+
+.l-wrap {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+.content .l-wrap {
+    margin-left: -1em;
+    margin-right: -1em;
+}
+
+/* --------------------------
+ * Header Module Styles
+ * --------------------------
+*/
+
+.header {
+    font-family: "omnes-pro", sans-serif;
+    margin: 0 auto;
+    text-align: center;
+    border-bottom: 1px solid #eee;
+    background: #fff;
+}
+
+.header h1 {
+    font-size: 300%;
+    font-weight: 100;
+    margin: 0;
+}
+
+.header h2 {
+    font-size: 125%;
+    font-weight: 100;
+    line-height: 1.5;
+    margin: 0;
+    color: #666;
+}
+
+/* --------------------------
+  * Content Module Styles
+  * --------------------------
+ */
+
+/* The content div is placed as a wrapper around all the docs */
+
+.content {
+    margin-left: auto;
+    margin-right: auto;
+    padding-left: 1em;
+    padding-right: 1em;
+}
+
+.content .content-subhead {
+    margin: 2em 0 1em 0;
+    font-weight: 300;
+    color: #888;
+    position: relative;
+}
+
+.content .content-spaced {
+    line-height: 1.8;
+}
+
+.content .content-quote {
+    font-family: "Georgia", serif;
+    color: #666;
+    font-style: italic;
+    line-height: 1.8;
+    border-left: 5px solid #ddd;
+    padding-left: 1.5em;
+}
+
+.content-link {
+    position: absolute;
+    top: 0;
+    right: 0;
+    display: block;
+    height: 100%;
+    width: 20px;
+    background: transparent url('/img/link-icon.png') no-repeat center center;
+    background-size: 20px 20px;
+}
+
+
+/* --------------------------
+ * Main Navigation Bar Styles
+ * --------------------------
+*/
+
+/* Add transition to containers so they can push in and out */
+
+#layout,
+#menu,
+.menu-link {
+    -webkit-transition: all 0.2s ease-out;
+    -moz-transition: all 0.2s ease-out;
+    -ms-transition: all 0.2s ease-out;
+    -o-transition: all 0.2s ease-out;
+    transition: all 0.2s ease-out;
+}
+
+#layout.active .menu-link {
+    left: 160px;
+}
+
+#menu {
+    margin-left: -160px;
+    /* "#menu" width */
+    width: 160px;
+    position: fixed;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    z-index: 1000;
+    /* so the menu or its navicon stays above all content */
+    background: #191818;
+    overflow-y: auto;
+    -webkit-overflow-scrolling: touch;
+}
+
+#menu a {
+    color: #999;
+    border: none;
+    white-space: normal;
+    padding: 0.625em 1em;
+}
+
+#menu .pure-menu-open {
+    background: transparent;
+    border: 0;
+}
+
+#menu .pure-menu ul {
+    border: none;
+    background: transparent;
+}
+
+#menu .pure-menu ul,
+#menu .pure-menu .menu-item-divided {
+    border-top: 1px solid #333;
+}
+
+#menu .pure-menu li a:hover,
+#menu .pure-menu li a:focus {
+    background: #333;
+}
+
+.menu-link {
+    position: fixed;
+    display: block;
+    /* show this only on small screens */
+    top: 0;
+    left: 0;
+    /* "#menu width" */
+    background: #000;
+    background: rgba(0,0,0,0.7);
+    font-size: 11px;
+    /* change this value to increase/decrease button size */
+    z-index: 10;
+    width: 4em;
+    height: 4em;
+    padding: 1em;
+}
+
+.menu-link:hover,
+.menu-link:focus {
+    background: #000;
+}
+
+.menu-link span {
+    position: relative;
+    display: block;
+    margin-top: 0.9em;
+}
+
+.menu-link span,
+.menu-link span:before,
+.menu-link span:after {
+    background-color: #fff;
+    width: 100%;
+    height: .2em;
+    -webkit-transition: all 0.4s;
+    -moz-transition: all 0.4s;
+    -ms-transition: all 0.4s;
+    -o-transition: all 0.4s;
+    transition: all 0.4s;
+}
+
+.menu-link span:before,
+.menu-link span:after {
+    position: absolute;
+    top: -.55em;
+    content: " ";
+}
+
+.menu-link span:after {
+    top: .55em;
+}
+
+.menu-link.active span {
+    background: transparent;
+}
+
+.menu-link.active span:before {
+    -webkit-transform: rotate(45deg) translate(.5em, .4em);
+    -moz-transform: rotate(45deg) translate(.5em, .4em);
+    -ms-transform: rotate(45deg) translate(.5em, .4em);
+    -o-transform: rotate(45deg) translate(.5em, .4em);
+    transform: rotate(45deg) translate(.5em, .4em);
+}
+
+.menu-link.active span:after {
+    -webkit-transform: rotate(-45deg) translate(.4em, -.3em);
+    -moz-transform: rotate(-45deg) translate(.4em, -.3em);
+    -ms-transform: rotate(-45deg) translate(.4em, -.3em);
+    -o-transform: rotate(-45deg) translate(.4em, -.3em);
+    transform: rotate(-45deg) translate(.4em, -.3em);
+}
+
+#menu .pure-menu-heading {
+    font-size: 125%;
+    font-weight: 300;
+    letter-spacing: 0.1em;
+    color: #fff;
+    margin-top: 0;
+    padding: 0.5em 0.8em;
+}
+
+#menu .pure-menu-heading:hover,
+#menu .pure-menu-heading:focus {
+    color: #999;
+}
+
+#menu .pure-menu-selected {
+    background: #1f8dd6;
+}
+
+#menu .pure-menu-selected a {
+    color: #fff;
+}
+
+#menu li.pure-menu-selected a:hover,
+#menu li.pure-menu-selected a:focus {
+    background: none;
+}
+
+/* ---------------------
+ * Smaller Module Styles
+ * ---------------------
+*/
+
+.pure-img-responsive {
+    max-width: 100%;
+    height: auto;
+}
+
+.pure-paginator .pure-button {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+}
+
+.pure-button {
+    font-family: inherit;
+}
+
+a.pure-button-primary {
+    color: white;
+}
+
+/* green call to action button class */
+
+.notice {
+    background-color: #61B842;
+    color: white;
+}
+
+.muted {
+    color: #ccc;
+}
+
+/* -------------
+ * Table Styles
+ * -------------
+*/
+
+.pure-table th,
+.pure-table td {
+    padding: 0.5em 1em;
+}
+
+.table-responsive {
+    margin-left: -1em;
+    margin-right: -1em;
+    overflow-x: auto;
+    -webkit-overflow-scrolling: touch;
+    margin-bottom: 1em;
+}
+
+.table-responsive table {
+    width: 100%;
+    min-width: 35.5em;
+    border-left-width: 0;
+    border-right-width: 0;
+}
+
+.table-responsive .mq-table {
+    width: 100%;
+    min-width: 44em;
+}
+
+.mq-table th.highlight {
+    background-color: rgb(255, 234, 133);
+}
+
+.mq-table td.highlight {
+    background-color: rgb(255, 250, 229);
+}
+
+.mq-table th.highlight code,
+.mq-table td.highlight code {
+    background: rgb(255, 255, 243);
+}
+
+.mq-table-mq code {
+    font-size: 0.875em;
+}
+
+
+/* --------------------------
+ * Responsive Styles
+ * --------------------------
+*/
+
+.legal-license {
+    text-align: left;
+    margin: 0;
+}
+
+.legal-copyright,
+.legal-links,
+.legal-links li {
+    text-align: right;
+    margin: 0;
+}
+
+.l-wrap,
+.l-wrap .content {
+    padding-left: 1em;
+    padding-right: 1em;
+}
+
+.content .l-wrap {
+    margin-left: -2em;
+    margin-right: -2em;
+}
+
+.header,
+.content {
+    padding-left: 2em;
+    padding-right: 2em;
+}
+
+.header h1 {
+    font-size: 350%;
+}
+
+.header h2 {
+    font-size: 150%;
+}
+
+.content p {
+    font-size: 1.125em;
+}
+
+.code {
+    margin-left: auto;
+    margin-right: auto;
+    border-left-width: 1px;
+    border-right-width: 1px;
+}
+
+.table-responsive {
+    margin-left: auto;
+    margin-right: auto;
+}
+
+.table-responsive table {
+    border-left-width: 1px;
+    border-right-width: 1px;
+}
+
+#layout {
+    padding-left: 160px;
+    /* left col width "#menu" */
+    left: 0;
+}
+
+#menu {
+    left: 160px;
+}
+
+.menu-link {
+    position: fixed;
+    left: 160px;
+    display: none;
+}
+
+#layout.active .menu-link {
+    left: 160px;
+}
+.hero {
+    text-align: center;
+}
+
+.hero-titles {
+    font-family: "omnes-pro", sans-serif;
+    padding: 0 1em;
+    margin: 2em auto;
+}
+
+.hero-site {
+    font-size: 400%;
+    font-weight: 100;
+    margin: 0;
+    color: #1f8dd6;
+}
+
+.hero-tagline {
+    font-size: 150%;
+    font-weight: 100;
+    line-height: 1.5;
+    margin: 0 0 1em;
+    color: #666;
+}
+
+a.button-cta,
+a.button-secondary {
+    margin: 0.25em;
+}
+
+a.button-cta {
+    background: #1f8dd6;
+    color: #fff;
+    border: 1px solid #1f8dd6;
+}
+
+a.button-secondary {
+    background: #fff;
+    color: #666;
+    border: 1px solid #ddd;
+}
+
+.size-chart {
+    width: 100%;
+    font-size: 87.5%;
+    line-height: 1.4;
+    margin-bottom: 2em;
+}
+
+a.size-chart-item {
+    display: block;
+    color: #fff;
+    padding: 1.45em 0;
+    text-align: center;
+    text-decoration: none;
+    text-transform: capitalize;
+}
+
+.size-chart-label {
+    display: inline-block;
+    -webkit-transform: rotate(-90deg);
+    -moz-transform: rotate(-90deg);
+    -ms-transform: rotate(-90deg);
+    -o-transform: rotate(-90deg);
+}
+
+.size-chart-size {
+    display: none;
+}
+
+.size-chart-base {
+    background: #0e90d2;
+}
+
+.size-chart-base .size-chart-size {
+    color: rgb(103, 194, 240);
+}
+
+.size-chart-grids {
+    background: rgb(128, 88, 165);
+}
+
+.size-chart-grids .size-chart-size {
+    color: rgb(200, 131, 255);
+}
+
+.size-chart-forms {
+    background: #5eb95e;
+}
+
+.size-chart-forms .size-chart-size {
+    color: rgb(161, 240, 137);
+}
+
+.size-chart-buttons {
+    background: #dd514c;
+}
+
+.size-chart-buttons .size-chart-size {
+    color: rgb(236, 164, 154);
+}
+
+.size-chart-menus {
+    background: rgb(250, 210, 50);
+}
+
+.size-chart-menus .size-chart-size {
+    color: rgb(255, 240, 134);
+}
+
+.size-chart-tables {
+    background: rgb(243, 123, 29);
+}
+
+.size-chart-tables .size-chart-label {
+    margin-left: -0.5em;
+}
+
+.size-chart-tables .size-chart-size {
+    color: rgb(255, 190, 129);
+}
+
+.marketing {
+    border-bottom: 1px solid #eee;
+    margin-top: 1em;
+    margin-bottom: 1em;
+    padding-bottom: 2em;
+}
+
+.marketing-customize {
+    margin-bottom: 0;
+    border-bottom: 0;
+    padding-bottom: 0;
+}
+
+.marketing .content {
+    margin-bottom: 0;
+}
+
+.marketing-header {
+    font-weight: 400;
+}
+
+.marketing-diagram {
+    margin: 2em auto;
+}
+
+.sample-buttons {
+    margin: 1em auto;
+    padding: 0 0.5em;
+}
+
+.sample-button {
+    padding: 0.5em;
+    text-align: center;
+}
+
+.sample-button .pure-button {
+    width: 100%;
+}
+
+.button-a {
+    background: #e1f2fa;
+    color: #5992aa;
+}
+
+.button-b {
+    background: #fcebbd;
+    color: #af9540;
+}
+
+.button-c,
+.button-d,
+.button-e {
+    border-radius: 8px;
+}
+
+.button-f,
+.button-g,
+.button-h {
+    border-radius: 20px;
+}
+
+.button-c {
+    background: #333;
+    color: #fff;
+}
+
+.button-d {
+    background: #d3eda3;
+    color: #72962e;
+}
+
+.button-e {
+    background: #f5ab9e;
+    color: #8c3a2b;
+}
+
+.button-f {
+    background: #ddaeff;
+    color: #8156a7;
+}
+
+.button-g {
+    background: #f57b00;
+    color: #ffca95;
+}
+
+.button-h {
+    background: #008ed4;
+    color: #fff;
+}
+
+.sample-button .button-h {
+    width: 50%;
+    /* Updated to 80% at sm breakpoint */
+}
+
+.size-chart-tables .size-chart-label {
+    margin-left: 0;
+}
+
+.hero {
+    margin-bottom: 3em;
+}
+
+.sample-button .button-h {
+    width: 100%;
+}
+
+.hero-titles {
+    padding: 0 2em;
+}
+
+.hero-site {
+    font-size: 800%;
+}
+
+.hero-tagline {
+    font-size: 250%;
+}
+
+a.button-cta,
+a.button-secondary {
+    font-size: 125%;
+}
+
+.size-chart {
+    font-size: 100%;
+}
+
+a.size-chart-item {
+    padding: 0.5em;
+    text-align: left;
+}
+
+.size-chart-label {
+    -webkit-transform: none;
+    -moz-transform: none;
+    -ms-transform: none;
+    -o-transform: none;
+}
+
+.size-chart-size {
+    display: block;
+}
+
+.marketing-header {
+    font-size: 150%;
+}
+
+.l-wrap .sample-buttons {
+    padding: 0 0.5em;
+}
+/**
+ * Baby Blue theme for RainbowJS
+ *
+ * @author tilomitra
+ */
+
+pre .comment {
+    color: #999;
+}
+
+pre .tag,
+pre .tag-name,
+pre .support.tag-name {
+    color: rgb(85, 85, 85);
+}
+
+pre .keyword,
+pre .css-property,
+pre .vendor-prefix,
+pre .sass,
+pre .class,
+pre .id,
+pre .css-value,
+pre .entity.function,
+pre .storage.function {
+    font-weight: bold;
+}
+
+pre .css-property,
+pre .css-value,
+pre .vendor-prefix,
+pre .support.namespace {
+    color: #333;
+}
+
+pre .constant.numeric,
+pre .keyword.unit,
+pre .hex-color {
+    font-weight: normal;
+    color: #099;
+}
+
+pre .attribute,
+pre .variable,
+pre .support {
+    color:  #757575; /* skinbuilder block-page-text-normal with #1f8dd6 as 
primary */
+}
+
+pre .string,
+pre .support.value  {
+    font-weight: normal;
+    color: #3b8bba; /* skinbuilder block-mine-text-low with #1f8dd6 as primary 
*/
+}

Added: trunk/phpgwapi/templates/pure/css/baby-blue.css
===================================================================
--- trunk/phpgwapi/templates/pure/css/baby-blue.css                             
(rev 0)
+++ trunk/phpgwapi/templates/pure/css/baby-blue.css     2014-08-21 12:42:27 UTC 
(rev 12062)
@@ -0,0 +1,830 @@
+
+
+/* --------------------------
+ * Element Styles
+ * --------------------------
+*/
+
+body {
+    min-width: 320px;
+    color: #777;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    font-weight: bold;
+    color: rgb(75, 75, 75);
+}
+h3 {
+    font-size: 1.25em;
+}
+h4 {
+    font-size: 1.125em;
+}
+
+a {
+    color: #3b8bba; /* block-background-text-normal */
+    text-decoration: none;
+}
+
+a:visited {
+    color: #265778; /* block-normal-text-normal */
+}
+
+dt {
+    font-weight: bold;
+}
+dd {
+    margin: 0 0 10px 0;
+}
+
+aside {
+    background: #1f8dd6; /* same color as selected state on site menu */
+    padding: 0.3em 1em;
+    border-radius: 3px;
+    color: #fff;
+}
+    aside a, aside a:visited {
+        color: rgb(169, 226, 255);
+    }
+
+
+/* --------------------------
+ * Layout Styles
+ * --------------------------
+*/
+
+/* Navigation Push Styles */
+#layout {
+    position: relative;
+    padding-left: 0;
+}
+    #layout.active {
+        position: relative;
+        left: 160px;
+    }
+        #layout.active #menu {
+            left: 160px;
+            width: 160px;
+        }
+
+/* Apply the .box class on the immediate parent of any grid element (pure-u-*) 
to apply some padding. */
+.l-box {
+    padding: 1em;
+}
+
+.l-wrap {
+    margin-left: auto;
+    margin-right: auto;
+}
+.content .l-wrap {
+    margin-left: -1em;
+    margin-right: -1em;
+}
+
+
+/* --------------------------
+ * Header Module Styles
+ * --------------------------
+*/
+
+.header {
+     font-family: "omnes-pro", sans-serif;
+     margin: 0 auto;
+     text-align: center;
+     border-bottom: 1px solid #eee;
+     background: #fff;
+ }
+    .header h1 {
+        font-size: 300%;
+        font-weight: 100;
+        margin: 0;
+    }
+     .header h2 {
+        font-size: 125%;
+        font-weight: 100;
+        line-height: 1.5;
+        margin: 0;
+        color: #666;
+    }
+
+
+ /* --------------------------
+  * Content Module Styles
+  * --------------------------
+ */
+
+/* The content div is placed as a wrapper around all the docs */
+.content {
+    margin-left: auto;
+    margin-right: auto;
+    padding-left: 1em;
+    padding-right: 1em;
+}
+
+    .content .content-subhead {
+        margin: 2em 0 1em 0;
+        font-weight: 300;
+        color: #888;
+        position: relative;
+    }
+
+    .content .content-spaced {
+        line-height: 1.8;
+    }
+
+    .content .content-quote {
+        font-family: "Georgia", serif;
+        color: #666;
+        font-style: italic;
+        line-height: 1.8;
+        border-left: 5px solid #ddd;
+        padding-left: 1.5em;
+    }
+
+    .content-link {
+        position: absolute;
+        top: 0;
+        right: 0;
+        display: block;
+        height: 100%;
+        width: 20px;
+        background: transparent url('/img/link-icon.png') no-repeat center 
center;
+        background-size: 20px 20px;
+    }
+
+    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
+        .content-link {
+            background-image: url('/img/address@hidden');
+        }
+    }
+
+
+/* --------------------------
+ * Footer Module Styles
+ * --------------------------
+*/
+
+.footer {
+    font-size: 87.5%;
+    border-top: 1px solid #eee;
+    margin-top: 3.4286em;
+    padding: 1.1429em;
+    background: rgb(250, 250, 250);
+}
+
+.legal {
+    line-height: 1.6;
+    text-align: center;
+    margin: 0 auto;
+}
+
+    .legal-license {
+        margin-top: 0;
+    }
+    .legal-links {
+        list-style: none;
+        padding: 0;
+        margin-bottom: 0;
+    }
+    .legal-copyright {
+        margin-top: 0;
+        margin-bottom: 0;
+    }
+
+
+/* --------------------------
+ * Main Navigation Bar Styles
+ * --------------------------
+*/
+
+/* Add transition to containers so they can push in and out */
+#layout,
+#menu,
+.menu-link {
+    -webkit-transition: all 0.2s ease-out;
+    -moz-transition: all 0.2s ease-out;
+    -ms-transition: all 0.2s ease-out;
+    -o-transition: all 0.2s ease-out;
+    transition: all 0.2s ease-out;
+}
+
+#layout.active .menu-link {
+    left: 160px;
+}
+
+#menu {
+    margin-left: -160px; /* "#menu" width */
+    width: 160px;
+    position: fixed;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    z-index: 1000; /* so the menu or its navicon stays above all content */
+    background: #191818;
+    overflow-y: auto;
+    -webkit-overflow-scrolling: touch;
+}
+    #menu a {
+        color: #999;
+        border: none;
+        white-space: normal;
+        padding: 0.625em 1em;
+    }
+
+    #menu .pure-menu-open {
+        background: transparent;
+        border: 0;
+    }
+
+    #menu .pure-menu ul {
+        border: none;
+        background: transparent;
+    }
+
+    #menu .pure-menu ul,
+    #menu .pure-menu .menu-item-divided {
+        border-top: 1px solid #333;
+    }
+
+        #menu .pure-menu li a:hover,
+        #menu .pure-menu li a:focus {
+            background: #333;
+        }
+
+    .menu-link {
+        position: fixed;
+        display: block; /* show this only on small screens */
+        top: 0;
+        left: 0; /* "#menu width" */
+        background: #000;
+        background: rgba(0,0,0,0.7);
+        font-size: 11px; /* change this value to increase/decrease button size 
*/
+        z-index: 10;
+        width: 4em;
+        height: 4em;
+        padding: 1em;
+    }
+
+        .menu-link:hover,
+        .menu-link:focus {
+            background: #000;
+        }
+
+        .menu-link span {
+            position: relative;
+            display: block;
+            margin-top: 0.9em;
+        }
+
+        .menu-link span,
+        .menu-link span:before,
+        .menu-link span:after {
+            background-color: #fff;
+            width: 100%;
+            height: .2em;
+            -webkit-transition: all 0.4s;
+               -moz-transition: all 0.4s;
+                -ms-transition: all 0.4s;
+                 -o-transition: all 0.4s;
+                    transition: all 0.4s;
+        }
+
+            .menu-link span:before,
+            .menu-link span:after {
+                position: absolute;
+                top: -.55em;
+                content: " ";
+            }
+
+            .menu-link span:after {
+                top: .55em;
+            }
+
+        .menu-link.active span {
+            background: transparent;
+        }
+
+            .menu-link.active span:before {
+                -webkit-transform: rotate(45deg) translate(.5em, .4em);
+                   -moz-transform: rotate(45deg) translate(.5em, .4em);
+                    -ms-transform: rotate(45deg) translate(.5em, .4em);
+                     -o-transform: rotate(45deg) translate(.5em, .4em);
+                        transform: rotate(45deg) translate(.5em, .4em);
+            }
+
+            .menu-link.active span:after {
+                -webkit-transform: rotate(-45deg) translate(.4em, -.3em);
+                   -moz-transform: rotate(-45deg) translate(.4em, -.3em);
+                    -ms-transform: rotate(-45deg) translate(.4em, -.3em);
+                     -o-transform: rotate(-45deg) translate(.4em, -.3em);
+                        transform: rotate(-45deg) translate(.4em, -.3em);
+            }
+
+    #menu .pure-menu-heading {
+        font-size: 125%;
+        font-weight: 300;
+        letter-spacing: 0.1em;
+        color: #fff;
+        margin-top: 0;
+        padding: 0.5em 0.8em;
+    }
+    #menu .pure-menu-heading:hover,
+    #menu .pure-menu-heading:focus {
+        color: #999;
+    }
+
+    #menu .pure-menu-selected {
+        background: #1f8dd6;
+    }
+
+        #menu .pure-menu-selected a {
+            color: #fff;
+        }
+
+        #menu li.pure-menu-selected a:hover,
+        #menu li.pure-menu-selected a:focus {
+            background: none;
+        }
+
+
+
+/* ---------------------
+ * Smaller Module Styles
+ * ---------------------
+*/
+
+.pure-img-responsive {
+    max-width: 100%;
+    height: auto;
+}
+
+.pure-paginator .pure-button {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+}
+
+.pure-button {
+    font-family: inherit;
+}
+a.pure-button-primary {
+    color: white;
+}
+
+
+/* green call to action button class */
+.notice {
+    background-color: #61B842;
+    color: white;
+}
+
+.muted {
+    color: #ccc;
+}
+
+
+
+/* -------------
+ * Table Styles
+ * -------------
+*/
+
+.pure-table th,
+.pure-table td {
+    padding: 0.5em 1em;
+}
+
+.table-responsive {
+    margin-left: -1em;
+    margin-right: -1em;
+    overflow-x: auto;
+    -webkit-overflow-scrolling: touch;
+    margin-bottom: 1em;
+}
+.table-responsive table {
+    width: 100%;
+    min-width: 35.5em;
+    border-left-width: 0;
+    border-right-width: 0;
+}
+
+.table-responsive .mq-table {
+    width: 100%;
+    min-width: 44em;
+}
+.mq-table th.highlight {
+    background-color: rgb(255, 234, 133);
+}
+.mq-table td.highlight {
+    background-color: rgb(255, 250, 229);
+}
+.mq-table th.highlight code,
+.mq-table td.highlight code {
+    background: rgb(255, 255, 243);
+}
+.mq-table-mq code {
+    font-size: 0.875em;
+}
+
+
+/* --------------------------
+ * Responsive Styles
+ * --------------------------
+*/
+
address@hidden screen and (min-width: 35.5em) {
+
+    .legal-license {
+        text-align: left;
+        margin: 0;
+    }
+    .legal-copyright,
+    .legal-links,
+    .legal-links li {
+        text-align: right;
+        margin: 0;
+    }
+
+}
+
address@hidden screen and (min-width: 48em) {
+
+    .l-wrap,
+    .l-wrap .content {
+        padding-left: 1em;
+        padding-right: 1em;
+    }
+    .content .l-wrap {
+        margin-left: -2em;
+        margin-right: -2em;
+    }
+
+    .header,
+    .content {
+        padding-left: 2em;
+        padding-right: 2em;
+    }
+
+    .header h1 {
+        font-size: 350%;
+    }
+    .header h2 {
+        font-size: 150%;
+    }
+
+    .content p {
+        font-size: 1.125em;
+    }
+
+    .code {
+        margin-left: auto;
+        margin-right: auto;
+        border-left-width: 1px;
+        border-right-width: 1px;
+    }
+
+    .table-responsive {
+        margin-left: auto;
+        margin-right: auto;
+    }
+    .table-responsive table {
+        border-left-width: 1px;
+        border-right-width: 1px;
+    }
+
+}
+
address@hidden (min-width: 58em) {
+
+    #layout {
+        padding-left: 160px; /* left col width "#menu" */
+        left: 0;
+    }
+    #menu {
+        left: 160px;
+    }
+    .menu-link {
+        position: fixed;
+        left: 160px;
+        display: none;
+    }
+    #layout.active .menu-link {
+        left: 160px;
+    }
+
+}
+
+.hero {
+    text-align: center;
+}
+    .hero-titles {
+        font-family: "omnes-pro", sans-serif;
+        padding: 0 1em;
+        margin: 2em auto;
+    }
+    .hero-site {
+        font-size: 400%;
+        font-weight: 100;
+        margin: 0;
+        color: #1f8dd6;
+    }
+    .hero-tagline {
+        font-size: 150%;
+        font-weight: 100;
+        line-height: 1.5;
+        margin: 0 0 1em;
+        color: #666;
+    }
+
+a.button-cta,
+a.button-secondary {
+    margin: 0.25em;
+}
+
+a.button-cta {
+    background: #1f8dd6;
+    color: #fff;
+    border: 1px solid #1f8dd6;
+}
+
+a.button-secondary {
+    background: #fff;
+    color: #666;
+    border: 1px solid #ddd;
+}
+
+.size-chart {
+    width: 100%;
+    font-size: 87.5%;
+    line-height: 1.4;
+    margin-bottom: 2em;
+}
+
+    a.size-chart-item {
+        display: block;
+        color: #fff;
+        padding: 1.45em 0;
+        text-align: center;
+        text-decoration: none;
+        text-transform: capitalize;
+    }
+
+    .size-chart-label {
+        display: inline-block;
+        -webkit-transform: rotate(-90deg);
+        -moz-transform:    rotate(-90deg);
+        -ms-transform:     rotate(-90deg);
+        -o-transform:      rotate(-90deg);
+    }
+    .size-chart-size {
+        display: none;
+    }
+
+    .size-chart-base {
+        background: #0e90d2;
+    }
+        .size-chart-base .size-chart-size {
+            color: rgb(103, 194, 240);
+        }
+
+    .size-chart-grids {
+        background: rgb(128, 88, 165);
+    }
+        .size-chart-grids .size-chart-size {
+            color: rgb(200, 131, 255);
+        }
+
+    .size-chart-forms {
+        background: #5eb95e;
+    }
+
+        .size-chart-forms .size-chart-size {
+            color: rgb(161, 240, 137);
+        }
+
+    .size-chart-buttons {
+        background: #dd514c;
+    }
+
+        .size-chart-buttons .size-chart-size {
+            color: rgb(236, 164, 154);
+        }
+
+    .size-chart-menus {
+        background: rgb(250, 210, 50);
+    }
+        .size-chart-menus .size-chart-size {
+            color: rgb(255, 240, 134);
+        }
+
+    .size-chart-tables {
+        background: rgb(243, 123, 29);
+    }
+        .size-chart-tables .size-chart-label {
+            margin-left: -0.5em;
+        }
+        .size-chart-tables .size-chart-size {
+            color: rgb(255, 190, 129);
+        }
+
+.marketing {
+    border-bottom: 1px solid #eee;
+    margin-top: 1em;
+    margin-bottom: 1em;
+    padding-bottom: 2em;
+}
+.marketing-customize {
+    margin-bottom: 0;
+    border-bottom: 0;
+    padding-bottom: 0;
+}
+
+    .marketing .content {
+        margin-bottom: 0;
+    }
+
+    .marketing-header {
+        font-weight: 400;
+    }
+
+    .marketing-diagram {
+        margin: 2em auto;
+    }
+
+.sample-buttons {
+    margin: 1em auto;
+    padding: 0 0.5em;
+}
+
+    .sample-button {
+        padding: 0.5em;
+        text-align: center;
+    }
+    .sample-button .pure-button {
+        width: 100%;
+    }
+
+    .button-a {
+        background: #e1f2fa;
+        color: #5992aa;
+    }
+
+    .button-b {
+        background: #fcebbd;
+        color: #af9540;
+    }
+
+    .button-c,
+    .button-d,
+    .button-e {
+        border-radius: 8px;
+    }
+
+    .button-f,
+    .button-g,
+    .button-h {
+        border-radius: 20px;
+    }
+
+    .button-c {
+        background: #333;
+        color: #fff;
+    }
+    .button-d {
+        background: #d3eda3;
+        color: #72962e;
+    }
+
+    .button-e {
+        background: #f5ab9e;
+        color: #8c3a2b;
+    }
+    .button-f {
+        background: #ddaeff;
+        color: #8156a7;
+    }
+
+    .button-g {
+        background: #f57b00;
+        color: #ffca95;
+    }
+
+    .button-h {
+        background: #008ed4;
+        color: #fff;
+    }
+    .sample-button .button-h {
+        width: 50%; /* Updated to 80% at sm breakpoint */
+    }
+
address@hidden screen and (min-width: 30em) {
+    .size-chart-tables .size-chart-label {
+        margin-left: 0;
+    }
+}
+
address@hidden screen and (min-width: 35.5em) {
+    .hero {
+        margin-bottom: 3em;
+    }
+
+    .sample-button .button-h {
+        width: 100%;
+    }
+}
+
address@hidden screen and (min-width: 48em) {
+    .hero-titles {
+        padding: 0 2em;
+    }
+    .hero-site {
+        font-size: 800%;
+    }
+    .hero-tagline {
+        font-size: 250%;
+    }
+
+    a.button-cta,
+    a.button-secondary {
+        font-size: 125%;
+    }
+
+    .size-chart {
+        font-size: 100%;
+    }
+    a.size-chart-item {
+        padding: 0.5em;
+        text-align: left;
+    }
+    .size-chart-label {
+        -webkit-transform: none;
+        -moz-transform:    none;
+        -ms-transform:     none;
+        -o-transform:      none;
+    }
+    .size-chart-size {
+        display: block;
+    }
+
+    .marketing-header {
+        font-size: 150%;
+    }
+
+    .l-wrap .sample-buttons {
+        padding: 0 0.5em;
+    }
+}
+
+/**
+ * Baby Blue theme for RainbowJS
+ *
+ * @author tilomitra
+ */
+
+pre .comment {
+    color: #999;
+}
+
+pre .tag,
+pre .tag-name,
+pre .support.tag-name {
+    color: rgb(85, 85, 85);
+}
+
+pre .keyword,
+pre .css-property,
+pre .vendor-prefix,
+pre .sass,
+pre .class,
+pre .id,
+pre .css-value,
+pre .entity.function,
+pre .storage.function {
+    font-weight: bold;
+}
+
+pre .css-property,
+pre .css-value,
+pre .vendor-prefix,
+pre .support.namespace {
+    color: #333;
+}
+
+pre .constant.numeric,
+pre .keyword.unit,
+pre .hex-color {
+    font-weight: normal;
+    color: #099;
+}
+
+pre .attribute,
+pre .variable,
+pre .support {
+    color:  #757575; /* skinbuilder block-page-text-normal with #1f8dd6 as 
primary */
+}
+
+pre .string,
+pre .support.value  {
+    font-weight: normal;
+    color: #3b8bba; /* skinbuilder block-mine-text-low with #1f8dd6 as primary 
*/
+}

Modified: trunk/phpgwapi/templates/pure/css/side-menu-old-ie.css
===================================================================
--- trunk/phpgwapi/templates/pure/css/side-menu-old-ie.css      2014-08-21 
12:41:06 UTC (rev 12061)
+++ trunk/phpgwapi/templates/pure/css/side-menu-old-ie.css      2014-08-21 
12:42:27 UTC (rev 12062)
@@ -51,9 +51,7 @@
 .content {
     margin: 0 auto;
     padding: 0 2em;
-    max-width: 800px;
     margin-bottom: 50px;
-    line-height: 1.6em;
 }
 
 .header {

Modified: trunk/phpgwapi/templates/pure/css/side-menu.css
===================================================================
--- trunk/phpgwapi/templates/pure/css/side-menu.css     2014-08-21 12:41:06 UTC 
(rev 12061)
+++ trunk/phpgwapi/templates/pure/css/side-menu.css     2014-08-21 12:42:27 UTC 
(rev 12062)
@@ -47,7 +47,6 @@
     padding: 0 2em;
  //   max-width: 1200px;
     margin-bottom: 50px;
-    line-height: 1.6em;
 }
 
 .header {

Modified: trunk/phpgwapi/templates/pure/footer.tpl
===================================================================
--- trunk/phpgwapi/templates/pure/footer.tpl    2014-08-21 12:41:06 UTC (rev 
12061)
+++ trunk/phpgwapi/templates/pure/footer.tpl    2014-08-21 12:42:27 UTC (rev 
12062)
@@ -1,10 +1,8 @@
-                                       </div>
                                </div>
-
-                               <div class="footer">
-                                       <div class="button-bar">
-                                               {powered_by}
-                                       </div>
+                       </div>
+                       <div class="footer">
+                               <div class="button-bar">
+                                       {powered_by}
                                </div>
                        </div>
                </div>

Modified: trunk/phpgwapi/templates/pure/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/pure/head.inc.php  2014-08-21 12:41:06 UTC (rev 
12061)
+++ trunk/phpgwapi/templates/pure/head.inc.php  2014-08-21 12:42:27 UTC (rev 
12062)
@@ -8,8 +8,8 @@
        phpgwapi_jquery::load_widget('core');
 
        phpgw::import_class('phpgwapi.yui');
-       phpgwapi_yui::load_widget('button');
-       phpgwapi_yui::load_widget('container');
+//     phpgwapi_yui::load_widget('button');
+//     phpgwapi_yui::load_widget('container');
 
        $javascripts[] = "/phpgwapi/js/SlickNav/jquery.slicknav.js";
 
@@ -50,28 +50,28 @@
 //             $stylesheets[] = 
'/phpgwapi/js/yahoo/reset-fonts-grids/reset-fonts-grids.css';
        }
 
-       $stylesheets[] = 
"/phpgwapi/js/yahoo/tabview/assets/skins/sam/tabview.css";
+       //$stylesheets[] = 
"/phpgwapi/js/yahoo/tabview/assets/skins/sam/tabview.css";
 //     $stylesheets[] = 
"/phpgwapi/js/yahoo/resize/assets/skins/sam/resize.css";
 //     $stylesheets[] = 
"/phpgwapi/js/yahoo/layout/assets/skins/sam/layout.css";
-       $stylesheets[] = "/phpgwapi/js/yahoo/menu/assets/skins/sam/menu.css";
-       $stylesheets[] = 
"/phpgwapi/js/yahoo/button/assets/skins/sam/button.css";
+       //$stylesheets[] = "/phpgwapi/js/yahoo/menu/assets/skins/sam/menu.css";
+       //$stylesheets[] = 
"/phpgwapi/js/yahoo/button/assets/skins/sam/button.css";
 //     $stylesheets[] = "/phpgwapi/templates/portico/css/base.css";
        
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
        {
                $stylesheets[] = 
"/phpgwapi/templates/pure/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
        }
-       $stylesheets[] = "/{$app}/templates/base/css/base.css";
-       $stylesheets[] = "/{$app}/templates/portico/css/base.css";
+       //$stylesheets[] = "/{$app}/templates/base/css/base.css";
+       //$stylesheets[] = "/{$app}/templates/portico/css/base.css";
        
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
        {
                $stylesheets[] = 
"/{$app}/templates/portico/css/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
        }
-
+/*
        
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['yui_table_nowrap'])
 && $GLOBALS['phpgw_info']['user']['preferences']['common']['yui_table_nowrap'])
        {
                $stylesheets[] = 
"/phpgwapi/templates/base/css/yui_table_nowrap.css";
        }
-
+*/
        foreach ( $stylesheets as $stylesheet )
        {
                if( file_exists( PHPGW_SERVER_ROOT . $stylesheet ) )

Modified: trunk/phpgwapi/templates/pure/head.tpl
===================================================================
--- trunk/phpgwapi/templates/pure/head.tpl      2014-08-21 12:41:06 UTC (rev 
12061)
+++ trunk/phpgwapi/templates/pure/head.tpl      2014-08-21 12:42:27 UTC (rev 
12062)
@@ -13,13 +13,18 @@
                <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/pure-min.css">
                <!--[if lte IE 8]>
                        <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/grids-responsive-old-ie-min.css">
-                       <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/layouts/side-menu-old-ie.css">
+                       <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/side-menu-old-ie.css">
+                       <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/baby-blue-old-ie.css">
                <![endif]-->
                <!--[if gt IE 8]><!-->
                        <link rel="stylesheet" 
href="{webserver_url}/phpgwapi/templates/pure/css/grids-responsive-min.css">
                    <link rel="stylesheet" 
href="phpgwapi/templates/pure/css/side-menu.css">
+                   <link rel="stylesheet" 
href="phpgwapi/templates/pure/css/baby-blue.css">
                <!--<![endif]-->
 
+               <!--[if lt IE 9]>
+                       <script 
src="{webserver_url}/phpgwapi/templates/pure/js/html5shiv.js"></script>
+               <![endif]-->
 
                <!-- BEGIN stylesheet -->
                <link href="{stylesheet_uri}" type="text/css" rel="StyleSheet">
@@ -34,7 +39,7 @@
                //-->
                </script>
                {javascript}
-               </script>
+
                <!-- BEGIN javascript -->
                        <script type="text/javascript" 
src="{javascript_uri}"></script>
        <!-- END javascript -->

Added: trunk/phpgwapi/templates/pure/js/html5shiv.js
===================================================================
--- trunk/phpgwapi/templates/pure/js/html5shiv.js                               
(rev 0)
+++ trunk/phpgwapi/templates/pure/js/html5shiv.js       2014-08-21 12:42:27 UTC 
(rev 12062)
@@ -0,0 +1,301 @@
+/**
+* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 
Licensed
+*/
+;(function(window, document) {
+/*jshint evil:true */
+  /** version */
+  var version = '3.7.0';
+
+  /** Preset options */
+  var options = window.html5 || {};
+
+  /** Used to skip problem elements */
+  var reSkip = 
/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+  /** Not all elements can be cloned in IE **/
+  var saveClones = 
/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+  /** Detect whether the browser supports default html5 styles */
+  var supportsHtml5Styles;
+
+  /** Name of the expando, to work with multiple documents or to re-shiv one 
document */
+  var expando = '_html5shiv';
+
+  /** The id for the the documents expando */
+  var expanID = 0;
+
+  /** Cached data for each document */
+  var expandoData = {};
+
+  /** Detect whether the browser supports unknown elements */
+  var supportsUnknownElements;
+
+  (function() {
+    try {
+        var a = document.createElement('a');
+        a.innerHTML = '<xyz></xyz>';
+        //if the hidden property is implemented we can assume, that the 
browser supports basic HTML5 Styles
+        supportsHtml5Styles = ('hidden' in a);
+
+        supportsUnknownElements = a.childNodes.length == 1 || (function() {
+          // assign a false positive if unable to shiv
+          (document.createElement)('a');
+          var frag = document.createDocumentFragment();
+          return (
+            typeof frag.cloneNode == 'undefined' ||
+            typeof frag.createDocumentFragment == 'undefined' ||
+            typeof frag.createElement == 'undefined'
+          );
+        }());
+    } catch(e) {
+      // assign a false positive if detection fails => unable to shiv
+      supportsHtml5Styles = true;
+      supportsUnknownElements = true;
+    }
+
+  }());
+
+  
/*--------------------------------------------------------------------------*/
+
+  /**
+   * Creates a style sheet with the given CSS text and adds it to the document.
+   * @private
+   * @param {Document} ownerDocument The document.
+   * @param {String} cssText The CSS text.
+   * @returns {StyleSheet} The style element.
+   */
+  function addStyleSheet(ownerDocument, cssText) {
+    var p = ownerDocument.createElement('p'),
+        parent = ownerDocument.getElementsByTagName('head')[0] || 
ownerDocument.documentElement;
+
+    p.innerHTML = 'x<style>' + cssText + '</style>';
+    return parent.insertBefore(p.lastChild, parent.firstChild);
+  }
+
+  /**
+   * Returns the value of `html5.elements` as an array.
+   * @private
+   * @returns {Array} An array of shived element node names.
+   */
+  function getElements() {
+    var elements = html5.elements;
+    return typeof elements == 'string' ? elements.split(' ') : elements;
+  }
+
+    /**
+   * Returns the data associated to the given document
+   * @private
+   * @param {Document} ownerDocument The document.
+   * @returns {Object} An object of data.
+   */
+  function getExpandoData(ownerDocument) {
+    var data = expandoData[ownerDocument[expando]];
+    if (!data) {
+        data = {};
+        expanID++;
+        ownerDocument[expando] = expanID;
+        expandoData[expanID] = data;
+    }
+    return data;
+  }
+
+  /**
+   * returns a shived element for the given nodeName and document
+   * @memberOf html5
+   * @param {String} nodeName name of the element
+   * @param {Document} ownerDocument The context document.
+   * @returns {Object} The shived element.
+   */
+  function createElement(nodeName, ownerDocument, data){
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    if(supportsUnknownElements){
+        return ownerDocument.createElement(nodeName);
+    }
+    if (!data) {
+        data = getExpandoData(ownerDocument);
+    }
+    var node;
+
+    if (data.cache[nodeName]) {
+        node = data.cache[nodeName].cloneNode();
+    } else if (saveClones.test(nodeName)) {
+        node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+    } else {
+        node = data.createElem(nodeName);
+    }
+
+    // Avoid adding some elements to fragments in IE < 9 because
+    // * Attributes like `name` or `type` cannot be set/changed once an element
+    //   is inserted into a document/fragment
+    // * Link elements with `src` attributes that are inaccessible, as with
+    //   a 403 response, will cause the tab/window to crash
+    // * Script elements appended to fragments will execute when their `src`
+    //   or `text` property is set
+    return node.canHaveChildren && !reSkip.test(nodeName) ? 
data.frag.appendChild(node) : node;
+  }
+
+  /**
+   * returns a shived DocumentFragment for the given document
+   * @memberOf html5
+   * @param {Document} ownerDocument The context document.
+   * @returns {Object} The shived DocumentFragment.
+   */
+  function createDocumentFragment(ownerDocument, data){
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    if(supportsUnknownElements){
+        return ownerDocument.createDocumentFragment();
+    }
+    data = data || getExpandoData(ownerDocument);
+    var clone = data.frag.cloneNode(),
+        i = 0,
+        elems = getElements(),
+        l = elems.length;
+    for(;i<l;i++){
+        clone.createElement(elems[i]);
+    }
+    return clone;
+  }
+
+  /**
+   * Shivs the `createElement` and `createDocumentFragment` methods of the 
document.
+   * @private
+   * @param {Document|DocumentFragment} ownerDocument The document.
+   * @param {Object} data of the document.
+   */
+  function shivMethods(ownerDocument, data) {
+    if (!data.cache) {
+        data.cache = {};
+        data.createElem = ownerDocument.createElement;
+        data.createFrag = ownerDocument.createDocumentFragment;
+        data.frag = data.createFrag();
+    }
+
+
+    ownerDocument.createElement = function(nodeName) {
+      //abort shiv
+      if (!html5.shivMethods) {
+          return data.createElem(nodeName);
+      }
+      return createElement(nodeName, ownerDocument, data);
+    };
+
+    ownerDocument.createDocumentFragment = Function('h,f', 'return 
function(){' +
+      'var n=f.cloneNode(),c=n.createElement;' +
+      'h.shivMethods&&(' +
+        // unroll the `createElement` calls
+        getElements().join().replace(/[\w\-]+/g, function(nodeName) {
+          data.createElem(nodeName);
+          data.frag.createElement(nodeName);
+          return 'c("' + nodeName + '")';
+        }) +
+      ');return n}'
+    )(html5, data.frag);
+  }
+
+  
/*--------------------------------------------------------------------------*/
+
+  /**
+   * Shivs the given document.
+   * @memberOf html5
+   * @param {Document} ownerDocument The document to shiv.
+   * @returns {Document} The shived document.
+   */
+  function shivDocument(ownerDocument) {
+    if (!ownerDocument) {
+        ownerDocument = document;
+    }
+    var data = getExpandoData(ownerDocument);
+
+    if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+      data.hasCSS = !!addStyleSheet(ownerDocument,
+        // corrects block display not defined in IE6/7/8/9
+        
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}'
 +
+        // adds styling not present in IE6/7/8/9
+        'mark{background:#FF0;color:#000}' +
+        // hides non-rendered elements
+        'template{display:none}'
+      );
+    }
+    if (!supportsUnknownElements) {
+      shivMethods(ownerDocument, data);
+    }
+    return ownerDocument;
+  }
+
+  
/*--------------------------------------------------------------------------*/
+
+  /**
+   * The `html5` object is exposed so that more elements can be shived and
+   * existing shiving can be detected on iframes.
+   * @type Object
+   * @example
+   *
+   * // options can be changed before the script is included
+   * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': 
false };
+   */
+  var html5 = {
+
+    /**
+     * An array or space separated string of node names of the elements to 
shiv.
+     * @memberOf html5
+     * @type Array|String
+     */
+    'elements': options.elements || 'abbr article aside audio bdi canvas data 
datalist details dialog figcaption figure footer header hgroup main mark meter 
nav output progress section summary template time video',
+
+    /**
+     * current version of html5shiv
+     */
+    'version': version,
+
+    /**
+     * A flag to indicate that the HTML5 style sheet should be inserted.
+     * @memberOf html5
+     * @type Boolean
+     */
+    'shivCSS': (options.shivCSS !== false),
+
+    /**
+     * Is equal to true if a browser supports creating unknown/HTML5 elements
+     * @memberOf html5
+     * @type boolean
+     */
+    'supportsUnknownElements': supportsUnknownElements,
+
+    /**
+     * A flag to indicate that the document's `createElement` and 
`createDocumentFragment`
+     * methods should be overwritten.
+     * @memberOf html5
+     * @type Boolean
+     */
+    'shivMethods': (options.shivMethods !== false),
+
+    /**
+     * A string to describe the type of `html5` object ("default" or "default 
print").
+     * @memberOf html5
+     * @type String
+     */
+    'type': 'default',
+
+    // shivs the document according to the specified `html5` object options
+    'shivDocument': shivDocument,
+
+    //creates a shived element
+    createElement: createElement,
+
+    //creates a shived documentFragment
+    createDocumentFragment: createDocumentFragment
+  };
+
+  
/*--------------------------------------------------------------------------*/
+
+  // expose html5
+  window.html5 = html5;
+
+  // shiv the document
+  shivDocument(document);
+
+}(this, document));

Modified: trunk/phpgwapi/templates/pure/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/pure/navbar.inc.php        2014-08-21 12:41:06 UTC 
(rev 12061)
+++ trunk/phpgwapi/templates/pure/navbar.inc.php        2014-08-21 12:42:27 UTC 
(rev 12062)
@@ -259,7 +259,7 @@
                                $history_url[] ="<a 
href='{$breadcrumb['url']}'>{$breadcrumb['name']}</a>";
                        }
                        $breadcrumbs = '<div class="breadcrumbs"><h4>' . 
implode(' >> ', $history_url) . '</h4></div>';
-                       echo $breadcrumbs;
+//                     echo $breadcrumbs;
                }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]