[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16192] more on eventplanner
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16192] more on eventplanner |
Date: |
Wed, 25 Jan 2017 10:58:32 -0500 (EST) |
Revision: 16192
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16192
Author: sigurdne
Date: 2017-01-25 10:58:32 -0500 (Wed, 25 Jan 2017)
Log Message:
-----------
more on eventplanner
Modified Paths:
--------------
trunk/eventplannerfrontend/inc/class.menu.inc.php
trunk/eventplannerfrontend/index.php
trunk/phpgwapi/templates/pure/navbar.inc.php
Added Paths:
-----------
trunk/phpgwapi/templates/frontend/
trunk/phpgwapi/templates/frontend/css/
trunk/phpgwapi/templates/frontend/css/frontend.css
trunk/phpgwapi/templates/frontend/footer.tpl
trunk/phpgwapi/templates/frontend/head.inc.php
trunk/phpgwapi/templates/frontend/head.tpl
trunk/phpgwapi/templates/frontend/images/
trunk/phpgwapi/templates/frontend/js/
trunk/phpgwapi/templates/frontend/js/headroom.min.js
trunk/phpgwapi/templates/frontend/js/jQuery.headroom.js
trunk/phpgwapi/templates/frontend/navbar.inc.php
trunk/phpgwapi/templates/frontend/navbar.tpl
trunk/phpgwapi/templates/frontend/themes/
trunk/phpgwapi/templates/frontend/themes/bergen_kommune.css
trunk/phpgwapi/templates/frontend/themes/fjell_kommune.css
Modified: trunk/eventplannerfrontend/inc/class.menu.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.menu.inc.php 2017-01-25 15:58:02 UTC
(rev 16191)
+++ trunk/eventplannerfrontend/inc/class.menu.inc.php 2017-01-25 15:58:32 UTC
(rev 16192)
@@ -1,39 +1,95 @@
<?php
+ /**
+ * phpGroupWare - eventplannerfrontend.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2016 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @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/bbb_/ekstern/
+ * @package eventplannerfrontend
+ * @subpackage core
+ * @version $Id: class.menu.inc.php 14728 2016-02-11 22:28:46Z sigurdne
$
+ */
+ /*
+ This program 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.
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /**
+ * Description
+ * @package eventplannerfrontend
+ */
class eventplannerfrontend_menu
{
- function get_menu()
+ /**
+ * Get the menus for the eventplannerfrontend
+ *
+ * @return array available menus for the current user
+ */
+ public function get_menu()
{
$incoming_app =
$GLOBALS['phpgw_info']['flags']['currentapp'];
- $GLOBALS['phpgw_info']['flags']['currentapp'] =
'eventplannerfrontend';
+ $GLOBALS['phpgw_info']['flags']['currentapp'] =
'eventplanner';
+
+ $menus['navbar'] = array(
+ 'eventplannerfrontend' => array(
+ 'text' => lang('eventplanner'),
+ 'url' =>
$GLOBALS['phpgw']->link('eventplannerfrontend/', array('menuaction' =>
"eventplannerfrontend.uiapplication.index")),
+ 'image' =>
array('eventplannerfrontend', 'navbar'),
+ 'order' => 35,
+ 'group' => 'office'
+ ),
+ );
- $menus = array();
-
- if ($GLOBALS['phpgw']->acl->check('run',
phpgwapi_acl::READ, 'admin') || $GLOBALS['phpgw']->acl->check('admin',
phpgwapi_acl::ADD, 'eventplannerfrontend'))
- {
- $menus['admin'] = array
- (
- 'index' => array
- (
- 'text' => lang('Configuration'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'admin.uiconfig.index',
- 'appname' =>
'eventplannerfrontend'))
- ),
- 'acl' => array(
- 'text' =>
$GLOBALS['phpgw']->translation->translate('Configure Access Permissions',
array(), true),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'preferences.uiadmin_acl.list_acl',
- 'acl_app' =>
'eventplannerfrontend'))
- ),
- 'metasettings' => array
- (
- 'text' => lang('Metadata'),
- 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'booking.uimetasettings.index',
- 'appname' =>
'eventplanner'))
- ),
- );
- }
-
+ $menus['toolbar'] = array();
+
+ $menus['navigation'] = array(
+ 'application' => array(
+ 'text' => lang('application'),
+ 'url' =>
$GLOBALS['phpgw']->link('eventplannerfrontend/', array('menuaction' =>
'eventplannerfrontend.uiapplication.index'))
+ ),
+ 'events' => array(
+ 'text' => lang('events'),
+ 'url' =>
$GLOBALS['phpgw']->link('eventplannerfrontend/', array('menuaction' =>
"eventplannerfrontend.uievents.index")),
+ 'image' => array('events', 'navbar'),
+ ),
+ 'customer' => array(
+ 'text' => lang('customer'),
+ 'url' =>
$GLOBALS['phpgw']->link('eventplannerfrontend/', array('menuaction' =>
"eventplannerfrontend.uicustomer.index")),
+ 'image' => array('customer', 'navbar'),
+ ),
+ 'vendor' => array(
+ 'text' => lang('vendor'),
+ 'url' =>
$GLOBALS['phpgw']->link('eventplannerfrontend/', array('menuaction' =>
"eventplannerfrontend.uivendor.index")),
+ 'image' => array('vendor', 'navbar'),
+ ),
+ 'booking' => array(
+ 'text' => lang('booking'),
+ 'url' =>
$GLOBALS['phpgw']->link('eventplannerfrontend/', array('menuaction' =>
"eventplannerfrontend.uibooking.index")),
+ 'image' => array('customer', 'navbar'),
+ ),
+ 'vendor_report' => array(
+ 'text' => lang('vendor report'),
+ 'url' =>
$GLOBALS['phpgw']->link('eventplannerfrontend/', array('menuaction' =>
"eventplannerfrontend.uivendor_report.index")),
+ 'image' => array('vendor_report',
'navbar'),
+ ),
+ 'customer_report' => array(
+ 'text' => lang('customer report'),
+ 'url' =>
$GLOBALS['phpgw']->link('eventplannerfrontend/', array('menuaction' =>
"eventplannerfrontend.uicustomer_report.index")),
+ 'image' => array('customer_report',
'navbar'),
+ )
+ );
$GLOBALS['phpgw_info']['flags']['currentapp'] =
$incoming_app;
return $menus;
}
Modified: trunk/eventplannerfrontend/index.php
===================================================================
--- trunk/eventplannerfrontend/index.php 2017-01-25 15:58:02 UTC (rev
16191)
+++ trunk/eventplannerfrontend/index.php 2017-01-25 15:58:32 UTC (rev
16192)
@@ -69,7 +69,7 @@
}
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'eventplannerfrontend';
- $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']
= 'bookingfrontend';
+ $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']
= 'frontend';
/////////////////////////////////////////////////////////////////////////////
// BEGIN Stuff copied from functions.inc.php
Added: trunk/phpgwapi/templates/frontend/css/frontend.css
===================================================================
--- trunk/phpgwapi/templates/frontend/css/frontend.css
(rev 0)
+++ trunk/phpgwapi/templates/frontend/css/frontend.css 2017-01-25 15:58:32 UTC
(rev 16192)
@@ -0,0 +1,452 @@
+
+/**
+From example marketing.css
+*/
+
+* {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+/*
+ * -- BASE STYLES --
+ * Most of these are inherited from Base, but I want to change a few.
+ */
+body {
+ font-size: 13px;
+ font-family: Arial, Helvetica, Verdana, sans-serif;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+label {
+ color: #34495e;
+}
+
+.pure-img-responsive {
+ max-width: 100%;
+ height: auto;
+}
+
+/*
+ * -- LAYOUT STYLES --
+ * These are some useful classes which I will need
+ */
+.l-box {
+ padding: 1em;
+}
+
+.l-box-lrg {
+ padding: 2em;
+ border-bottom: 1px solid rgba(0,0,0,0.1);
+}
+
+.is-center {
+ text-align: center;
+}
+
+.footer {
+ color: white;
+}
+
+
+/*
+ * -- PURE FORM STYLES --
+ * Style the form inputs and labels
+ */
+
+
+/*
+ * -- MENU STYLES --
+ * I want to customize how my .pure-menu looks at the top of the page
+ */
+
+.home-menu {
+ padding: 0.5em;
+ text-align: center;
+ box-shadow: 0 1px 1px rgba(0,0,0, 0.10);
+}
+.home-menu {
+ background: #2d3e50;
+}
+.pure-menu.pure-menu-fixed {
+ /* Fixed menus normally have a border at the bottom. */
+ border-bottom: none;
+ /* I need a higher z-index here because of the scroll-over effect. */
+ z-index: 4;
+}
+
+.home-menu .pure-menu-heading {
+ color: white;
+ font-weight: 400;
+ font-size: 120%;
+}
+
+.home-menu .pure-menu-selected a {
+ color: white;
+}
+
+.home-menu a {
+ color: #6FBEF3;
+}
+.home-menu li a:hover,
+.home-menu li a:focus {
+ background: none;
+ border: none;
+ color: #AECFE5;
+}
+
+
+/*
+ * -- SPLASH STYLES --
+ * This is the blue top section that appears on the page.
+ */
+
+.splash-container {
+ background: #1f8dd6;
+ z-index: 1;
+ overflow: hidden;
+ /* The following styles are required for the "scroll-over" effect */
+ width: 100%;
+ height: 88%;
+ top: 0;
+ left: 0;
+ position: fixed !important;
+}
+
+.splash {
+ /* absolute center .splash within .splash-container */
+ width: 80%;
+ height: 50%;
+ margin: auto;
+ position: absolute;
+ top: 100px; left: 0; bottom: 0; right: 0;
+ text-align: center;
+ text-transform: uppercase;
+}
+
+/* This is the main heading that appears on the blue section */
+.splash-head {
+ font-size: 20px;
+ font-weight: bold;
+ color: white;
+ border: 3px solid white;
+ padding: 1em 1.6em;
+ font-weight: 100;
+ border-radius: 5px;
+ line-height: 1em;
+}
+
+/* This is the subheading that appears on the blue section */
+.splash-subhead {
+ color: white;
+ letter-spacing: 0.05em;
+ opacity: 0.8;
+}
+
+/*
+ * -- CONTENT STYLES --
+ * This represents the content area (everything below the blue section)
+ */
+.content-wrapper {
+ /* These styles are required for the "scroll-over" effect */
+ position: absolute;
+ top: 87%;
+ width: 100%;
+ min-height: 12%;
+ z-index: 2;
+ background: white;
+
+}
+
+/* This is the class used for the main content headers (<h2>) */
+.content-head {
+ font-weight: 400;
+ text-transform: uppercase;
+ letter-spacing: 0.1em;
+ margin: 2em 0 1em;
+}
+
+/* This is a modifier class used when the content-head is inside a ribbon */
+.content-head-ribbon {
+ color: white;
+}
+
+/* This is the class used for the content sub-headers (<h3>) */
+.content-subhead {
+ color: #1f8dd6;
+}
+ .content-subhead i {
+ margin-right: 7px;
+ }
+
+/* This is the class used for the dark-background areas. */
+.ribbon {
+ background: #2d3e50;
+ color: #aaa;
+}
+
+/* This is the class used for the footer */
+.footer {
+ background: #111;
+}
+
+/*
+ * -- TABLET (AND UP) MEDIA QUERIES --
+ * On tablets and other medium-sized devices, we want to customize some
+ * of the mobile styles.
+ */
address@hidden (min-width: 48em) {
+
+ /* We increase the body font size */
+ body {
+ font-size: 16px;
+ }
+ /* We want to give the content area some more padding */
+ .content {
+ padding: 1em;
+ }
+
+ /* We can align the menu header to the left, but float the
+ menu items to the right. */
+ .home-menu {
+ text-align: left;
+ }
+ .home-menu ul {
+ float: right;
+ }
+
+ /* We increase the height of the splash-container */
+/* .splash-container {
+ height: 500px;
+ }*/
+
+ /* We decrease the width of the .splash, since we have more width
+ to work with */
+ .splash {
+ width: 50%;
+ height: 50%;
+ }
+
+ .splash-head {
+ font-size: 250%;
+ }
+
+
+ /* We remove the border-separator assigned to .l-box-lrg */
+ .l-box-lrg {
+ border: none;
+ }
+
+}
+
+/*
+ * -- DESKTOP (AND UP) MEDIA QUERIES --
+ * On desktops and other large devices, we want to over-ride some
+ * of the mobile and tablet styles.
+ */
address@hidden (min-width: 78em) {
+ /* We increase the header font size even more */
+ .splash-head {
+ font-size: 300%;
+ }
+}
+
+.custom-menu-wrapper {
+ /* background-color: #808080;*/
+ margin-bottom: 2.5em;
+ white-space: nowrap;
+ position: relative;
+}
+
+.custom-menu {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+ -webkit-font-smoothing: antialiased;
+}
+
+.custom-menu .pure-menu-link,
+.custom-menu .pure-menu-heading {
+ color: white;
+}
+
+.custom-menu .pure-menu-link:hover,
+.custom-menu .pure-menu-heading:hover {
+ background-color: transparent;
+}
+
+.custom-menu-top {
+ position: relative;
+ padding-top: .5em;
+ padding-bottom: .5em;
+}
+
+.custom-menu-brand {
+ display: block;
+ text-align: left;
+ position: relative;
+}
+
+.custom-menu-toggle {
+ width: 44px;
+ height: 44px;
+ display: block;
+ position: absolute;
+ top: 3px;
+ right: 0;
+ display: none;
+}
+
+.custom-menu-toggle .bar {
+ background-color: white;
+ display: block;
+ width: 20px;
+ height: 2px;
+ border-radius: 100px;
+ position: absolute;
+ top: 22px;
+ right: 12px;
+ -webkit-transition: all 0.5s;
+ -moz-transition: all 0.5s;
+ -ms-transition: all 0.5s;
+ transition: all 0.5s;
+}
+
+.custom-menu-toggle .bar:first-child {
+ -webkit-transform: translateY(-6px);
+ -moz-transform: translateY(-6px);
+ -ms-transform: translateY(-6px);
+ transform: translateY(-6px);
+}
+
+.custom-menu-toggle.x .bar {
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+ transform: rotate(45deg);
+}
+
+.custom-menu-toggle.x .bar:first-child {
+ -webkit-transform: rotate(-45deg);
+ -moz-transform: rotate(-45deg);
+ -ms-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+}
+
+.custom-menu-screen {
+ /* background-color: rgba(0, 0, 0, 0.5);*/
+ background-color: #2d3e50;
+ -webkit-transition: all 0.5s;
+ -moz-transition: all 0.5s;
+ -ms-transition: all 0.5s;
+ transition: all 0.5s;
+ height: 3em;
+ width: 70em;
+ position: absolute;
+ top: 0;
+ z-index: -1;
+}
+
+.custom-menu-tucked .custom-menu-screen {
+ -webkit-transform: translateY(-44px);
+ -moz-transform: translateY(-44px);
+ -ms-transform: translateY(-44px);
+ transform: translateY(-44px);
+}
+
address@hidden (max-width: 62em) {
+
+ .custom-menu {
+ display: block;
+ }
+
+ .custom-menu-toggle {
+ display: block;
+ display: none\9;
+ }
+
+ .custom-menu-bottom {
+ position: absolute;
+ width: 100%;
+ border-top: 1px solid #eee;
+ background-color: #2d3e50\9;
+ z-index: 100;
+ }
+
+ .custom-menu-bottom .pure-menu-link {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ -moz-transform: translateX(0);
+ -ms-transform: translateX(0);
+ transform: translateX(0);
+ -webkit-transition: all 0.5s;
+ -moz-transition: all 0.5s;
+ -ms-transition: all 0.5s;
+ transition: all 0.5s;
+ }
+
+ .custom-menu-bottom.custom-menu-tucked .pure-menu-link {
+ -webkit-transform: translateX(-140px);
+ -moz-transform: translateX(-140px);
+ -ms-transform: translateX(-140px);
+ transform: translateX(-140px);
+ opacity: 0;
+ opacity: 1\9;
+ }
+
+ .pure-menu-horizontal.custom-menu-tucked {
+ z-index: -1;
+ top: 45px;
+ position: absolute;
+ overflow: hidden;
+ }
+
+}
+
+.headroom {
+ will-change: transform;
+ transition: transform 200ms linear;
+}
+.headroom--pinned {
+ transform: translateY(0%);
+}
+.headroom--unpinned {
+ transform: translateY(-100%);
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+}
+
+A {
+ /* These are technically the same, but use both */
+ overflow-wrap: break-word;
+ word-wrap: break-word;
+
+ -ms-word-break: break-all;
+ /* This is the dangerous one in WebKit, as it breaks things wherever */
+ word-break: break-all;
+ /* Instead use this non-standard one: */
+ word-break: break-word;
+
+ /* Adds a hyphen where the word breaks, if supported (No Blink) */
+ -ms-hyphens: auto;
+ -moz-hyphens: auto;
+ -webkit-hyphens: auto;
+ hyphens: auto;
+}
+
address@hidden screen and (-webkit-min-device-pixel-ratio:0) {
+ select,
+ textarea,
+ input {
+ font-size: 16px;
+ }
+}
\ No newline at end of file
Added: trunk/phpgwapi/templates/frontend/footer.tpl
===================================================================
--- trunk/phpgwapi/templates/frontend/footer.tpl
(rev 0)
+++ trunk/phpgwapi/templates/frontend/footer.tpl 2017-01-25 15:58:32 UTC
(rev 16192)
@@ -0,0 +1,20 @@
+</div>
+<div id="footer">
+
+</div>
+<div class="footer l-box is-center">
+ {footer_info}
+</div>
+{javascript_end}
+<script type="text/javascript">
+ (function (window, document)
+ {
+ document.getElementById('toggle').addEventListener('click',
function (e)
+ {
+
document.getElementById('tuckedMenu').classList.toggle('custom-menu-tucked');
+ document.getElementById('toggle').classList.toggle('x');
+ });
+ })(this, this.document);
+</script>
+</body>
+</html>
Added: trunk/phpgwapi/templates/frontend/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/frontend/head.inc.php
(rev 0)
+++ trunk/phpgwapi/templates/frontend/head.inc.php 2017-01-25 15:58:32 UTC
(rev 16192)
@@ -0,0 +1,201 @@
+<?php
+ $GLOBALS['phpgw_info']['server']['no_jscombine']=true;
+ phpgw::import_class('phpgwapi.jquery');
+ phpgw::import_class('phpgwapi.template_portico');
+
+ if ( !isset($GLOBALS['phpgw_info']['server']['site_title']) )
+ {
+ $GLOBALS['phpgw_info']['server']['site_title'] = lang('please
set a site name in admin > siteconfig');
+ }
+
+ $app = $GLOBALS['phpgw_info']['flags']['currentapp'];
+
+ $config_frontend = CreateObject('phpgwapi.config',$app)->read();
+
+ $tracker_id = !empty($config_frontend['tracker_id']) ?
$config_frontend['tracker_id'] : '';
+ $tracker_code1 = <<<JS
+ var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+JS;
+ $tracker_code2 = <<<JS
+ try
+ {
+ var pageTracker = _gat._getTracker("{$tracker_id}");
+ pageTracker._trackPageview();
+ }
+ catch(err)
+ {
+ alert(err);
+ }
+JS;
+
+ if($tracker_id)
+ {
+ $GLOBALS['phpgw']->js->add_code('', $tracker_code1);
+ $GLOBALS['phpgw']->js->add_code('', $tracker_code2);
+ }
+
+ $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
+ $GLOBALS['phpgw']->template->set_unknowns('remove');
+ $GLOBALS['phpgw']->template->set_file('head', 'head.tpl');
+ $GLOBALS['phpgw']->template->set_block('head', 'stylesheet',
'stylesheets');
+ $GLOBALS['phpgw']->template->set_block('head', 'javascript',
'javascripts');
+
+
+ phpgwapi_jquery::load_widget('core');
+
+ $stylesheets = array();
+ $stylesheets[] = "/phpgwapi/templates/pure/css/global.css";
+ $stylesheets[] = "/phpgwapi/templates/pure/css/demo_mmenu.css";
+ $stylesheets[] = "/phpgwapi/templates/pure/css/pure-min.css";
+ $stylesheets[] = "/phpgwapi/templates/pure/css/pure-extension.css";
+ $stylesheets[] =
"/phpgwapi/templates/pure/css/grids-responsive-min.css";
+ $stylesheets[] =
"/phpgwapi/js/DataTables/extensions/Responsive/css/responsive.dataTables.min.css";
+ $stylesheets[] = "/{$app}/templates/base/css/base.css";
+ $stylesheets[] = "/{$app}/css/frontend.css";
+ $stylesheets[] = "/phpgwapi/templates/frontend/css/frontend.css";
+
+
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
+ {
+ $stylesheets[] =
"/phpgwapi/templates/frontend/themes/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
+ $stylesheets[] =
"/{$app}/templates/frontend/themes/{$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']}.css";
+ }
+ $stylesheets[] =
"/phpgwapi/js/jquery/mmenu/core/css/jquery.mmenu.all.css";
+
+ foreach ( $stylesheets as $stylesheet )
+ {
+ if( file_exists( PHPGW_SERVER_ROOT . $stylesheet ) )
+ {
+ $GLOBALS['phpgw']->template->set_var( 'stylesheet_uri',
$GLOBALS['phpgw_info']['server']['webserver_url'] . $stylesheet );
+ $GLOBALS['phpgw']->template->parse('stylesheets',
'stylesheet', true);
+ }
+ }
+
+ $javascripts = array();
+ $javascripts[] =
"/phpgwapi/js/jquery/mmenu/core/js/jquery.mmenu.min.all.js";
+ $javascripts[] = "/phpgwapi/templates/pure/js/mmenu.js";
+
+
+ //FIXME: To consider...
+ /*
+ $javascripts[] = "/phpgwapi/templates/stavanger/js/minid.js";
+*/
+// $javascripts[] =
"/phpgwapi/templates/bookingfrontend/js/headroom.min.js";
+// $javascripts[] =
"/phpgwapi/templates/bookingfrontend/js/jQuery.headroom.js";
+
+ foreach ( $javascripts as $javascript )
+ {
+ if( file_exists( PHPGW_SERVER_ROOT . $javascript ) )
+ {
+ $GLOBALS['phpgw']->template->set_var( 'javascript_uri',
$GLOBALS['phpgw_info']['server']['webserver_url'] . $javascript );
+ $GLOBALS['phpgw']->template->parse('javascripts',
'javascript', true);
+ }
+ }
+
+ $config = CreateObject('phpgwapi.config',$app)->read();
+ $logofile_frontend = !empty($config['logopath_frontend']) ?
$config['logopath_frontend'] : '';
+ $keywords = !empty($config['keywords']) ? $config['keywords'] : '';
+
+ if($keywords)
+ {
+ $keywords = '<meta name="keywords" content="'.$keywords.'">';
+ }
+ else
+ {
+ $keywords = '<meta name="keywords" content="phpGroupWare">';
+ }
+ if(!empty($description))
+ {
+ $description = '<meta name="description"
content="'.$description.'">';
+ }
+ else
+ {
+ $description = '<meta name="description"
content="phpGroupWare">';
+ }
+ if (!empty($config['metatag_author']))
+ {
+ $author = '<meta name="author"
content="'.$config['metatag_author'].'">';
+ }
+ else
+ {
+ $author = '<meta name="author" content="phpGroupWare
http://www.phpgroupware.org">';
+ }
+ if (!empty($config['metatag_robots']))
+ {
+ $robots = '<meta name="robots"
content="'.$config['metatag_robots'].'">';
+ }
+ else
+ {
+ $robots = '<meta name="robots" content="none">';
+ }
+ if (!empty($config_frontend['site_title']))
+ {
+ $site_title = $config_frontend['site_title'];
+ }
+ else
+ {
+ $site_title = $GLOBALS['phpgw_info']['server']['site_title'];
+ }
+
+ if(! $footer_info = $config_frontend['footer_info'])
+ {
+ $footer_info = 'footer info settes i bookingfrontend config';
+ }
+
+ phpgwapi_cache::session_set('phpgwapi', 'footer_info', $footer_info);
+
+ $test = $GLOBALS['phpgw']->common->get_on_events();
+ $test = str_replace('window.onload =
function()','$(document).ready(function()',$test);
+ $test = str_replace("\n}\n","\n})\n",$test);
+
+ $tpl_vars = array
+ (
+ 'css' => $GLOBALS['phpgw']->common->get_css(),
+ 'javascript' => $GLOBALS['phpgw']->common->get_javascript(),
+ 'img_icon' =>
$GLOBALS['phpgw']->common->find_image('phpgwapi', 'favicon.ico'),
+ 'site_title' => $site_title,
+ 'str_base_url' => $GLOBALS['phpgw']->link('/', array(), true),
+ 'site_url' => $GLOBALS['phpgw']->link("/{$app}/", array()),
+ 'webserver_url' =>
$GLOBALS['phpgw_info']['server']['webserver_url'],
+ 'win_on_events' => $test,
+ 'metainfo_author' => $author,
+ 'metainfo_keywords' => $keywords,
+ 'metainfo_description' => $description,
+ 'metainfo_robots' => $robots,
+ 'lbl_search' => lang('Search'),
+ 'logofile' => $logofile_frontend,
+ 'header_search_class' =>
'hidden'//(isset($_GET['menuaction']) && $_GET['menuaction'] ==
'bookingfrontend.uisearch.index' ? 'hidden' : '')
+ );
+ if ($manual !== null)
+ {
+ $tpl_vars['manual_text'] = lang('manual');
+ $tpl_vars['manual_url'] = $manual;
+ }
+ $user = $GLOBALS['phpgw']->accounts->get(
$GLOBALS['phpgw_info']['user']['id'] );
+
+ if($user && isset($_SESSION['phpgw_session']['session_flags']) &&
$_SESSION['phpgw_session']['session_flags'] == 'N')
+ {
+ $tpl_vars['login_text'] = $user->__toString() . ' :: ' .
lang('Logout');
+ $tpl_vars['login_url'] = 'logout.php';
+ }
+ else
+ {
+ $tpl_vars['login_text_org'] = '';
+ $tpl_vars['login_text'] = lang('Login');
+ $tpl_vars['login_url'] =
'login.php?after='.urlencode($_SERVER['QUERY_STRING']);
+ $login_parameter = !empty($config_frontend['login_parameter'])
? $config_frontend['login_parameter'] : '';
+ $custom_login_url =
!empty($config_frontend['custom_login_url']) ?
$config_frontend['custom_login_url'] : '';
+ if($login_parameter)
+ {
+ $login_parameter = ltrim($login_parameter, '&');
+ $tpl_vars['login_url'] .= "&{$login_parameter}";
+ }
+ if($custom_login_url)
+ {
+ $tpl_vars['login_url'] = $custom_login_url;
+ }
+ }
+ $GLOBALS['phpgw']->template->set_var($tpl_vars);
+
+ $GLOBALS['phpgw']->template->pfp('out', 'head');
+ unset($tpl_vars);
Added: trunk/phpgwapi/templates/frontend/head.tpl
===================================================================
--- trunk/phpgwapi/templates/frontend/head.tpl (rev 0)
+++ trunk/phpgwapi/templates/frontend/head.tpl 2017-01-25 15:58:32 UTC (rev
16192)
@@ -0,0 +1,58 @@
+<!doctype html>
+<!-- BEGIN head -->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width,
initial-scale=1.0">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
+ {metainfo_author}
+ {metainfo_description}
+ {metainfo_keywords}
+ {metainfo_robots}
+ <title>{site_title}</title>
+
+
+
+ <link href="{img_icon}" type="image/x-ico" rel="icon">
+ <link href="{img_icon}" rel="shortcut icon">
+ <!-- BEGIN stylesheet -->
+ <link href="{stylesheet_uri}" type="text/css" rel="StyleSheet">
+ <!-- END stylesheet -->
+
+ {css}
+
+ <script type="text/javascript">
+ <!--
+ var strBaseURL = '{str_base_url}';
+ //-->
+ </script>
+ {javascript}
+ <!-- BEGIN javascript -->
+ <script type="text/javascript" src="{javascript_uri}"></script>
+ <!-- END javascript -->
+
+ <script type="text/javascript">
+ <!--
+ {win_on_events}
+ //-->
+ </script>
+ </head>
+ <body>
+ <div class="home-menu custom-menu-wrapper">
+ <div class="pure-menu custom-menu custom-menu-top">
+ <a href="{site_url}" class="pure-menu-heading
custom-menu-brand">{site_title}</a>
+ <a href="#" class="custom-menu-toggle"
id="toggle"><s class="bar"></s><s class="bar"></s></a>
+ </div>
+ <div class="pure-menu pure-menu-horizontal
pure-menu-scrollable custom-menu custom-menu-bottom custom-menu-tucked"
id="tuckedMenu">
+ <div class="custom-menu-screen"></div>
+ <ul class="pure-menu-list">
+ <li class="pure-menu-item"><a
href="{manual_url}" class="pure-menu-link">{manual_text}</a></li>
+ <li class="pure-menu-item"><a
href="{login_url}" class="pure-menu-link">{login_text}</a></li>
+ </ul>
+ </div>
+ </div>
+
+ <div id="content-wrapper">
+ <!-- END head -->
+
+
Added: trunk/phpgwapi/templates/frontend/js/headroom.min.js
===================================================================
--- trunk/phpgwapi/templates/frontend/js/headroom.min.js
(rev 0)
+++ trunk/phpgwapi/templates/frontend/js/headroom.min.js 2017-01-25
15:58:32 UTC (rev 16192)
@@ -0,0 +1,7 @@
+/*!
+ * headroom.js v0.9.3 - Give your page some headroom. Hide your header until
you need it
+ * Copyright (c) 2016 Nick Williams - http://wicky.nillia.ms/headroom.js
+ * License: MIT
+ */
+
+!function(a,b){"use strict";"function"==typeof
define&&define.amd?define([],b):"object"==typeof
exports?module.exports=b():a.Headroom=b()}(this,function(){"use
strict";function a(a){this.callback=a,this.ticking=!1}function b(a){return
a&&"undefined"!=typeof window&&(a===window||a.nodeType)}function
c(a){if(arguments.length<=0)throw new Error("Missing arguments in extend
function");var d,e,f=a||{};for(e=1;e<arguments.length;e++){var
g=arguments[e]||{};for(d in g)"object"!=typeof
f[d]||b(f[d])?f[d]=f[d]||g[d]:f[d]=c(f[d],g[d])}return f}function d(a){return
a===Object(a)?a:{down:a,up:a}}function
e(a,b){b=c(b,e.options),this.lastKnownScrollY=0,this.elem=a,this.tolerance=d(b.tolerance),this.classes=b.classes,this.offset=b.offset,this.scroller=b.scroller,this.initialised=!1,this.onPin=b.onPin,this.onUnpin=b.onUnpin,this.onTop=b.onTop,this.onNotTop=b.onNotTop,this.onBottom=b.onBottom,this.onNotBottom=b.onNotBottom}var
f={bind:!!function(){}.bind,classList:"classList"in
document.documentElement,rAF:!!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame)};return
window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,a.prototype={constructor:a,update:function(){this.callback&&this.callback(),this.ticking=!1},requestTick:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)},handleEvent:function(){this.requestTick()}},e.prototype={constructor:e,init:function(){return
e.cutsTheMustard?(this.debouncer=new
a(this.update.bind(this)),this.elem.classList.add(this.classes.initial),setTimeout(this.attachEvent.bind(this),100),this):void
0},destroy:function(){var
a=this.classes;this.initialised=!1,this.elem.classList.remove(a.unpinned,a.pinned,a.top,a.notTop,a.initial),this.scroller.removeEventListener("scroll",this.debouncer,!1)},attachEvent:function(){this.initialised||(this.lastKnownScrollY=this.getScrollY(),this.initialised=!0,this.scroller.addEventListener("scroll",this.debouncer,!1),this.debouncer.handleEvent())},unpin:function(){var
a=this.elem.classList,b=this.classes;!a.contains(b.pinned)&&a.contains(b.unpinned)||(a.add(b.unpinned),a.remove(b.pinned),this.onUnpin&&this.onUnpin.call(this))},pin:function(){var
a=this.elem.classList,b=this.classes;a.contains(b.unpinned)&&(a.remove(b.unpinned),a.add(b.pinned),this.onPin&&this.onPin.call(this))},top:function(){var
a=this.elem.classList,b=this.classes;a.contains(b.top)||(a.add(b.top),a.remove(b.notTop),this.onTop&&this.onTop.call(this))},notTop:function(){var
a=this.elem.classList,b=this.classes;a.contains(b.notTop)||(a.add(b.notTop),a.remove(b.top),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){var
a=this.elem.classList,b=this.classes;a.contains(b.bottom)||(a.add(b.bottom),a.remove(b.notBottom),this.onBottom&&this.onBottom.call(this))},notBottom:function(){var
a=this.elem.classList,b=this.classes;a.contains(b.notBottom)||(a.add(b.notBottom),a.remove(b.bottom),this.onNotBottom&&this.onNotBottom.call(this))},getScrollY:function(){return
void 0!==this.scroller.pageYOffset?this.scroller.pageYOffset:void
0!==this.scroller.scrollTop?this.scroller.scrollTop:(document.documentElement||document.body.parentNode||document.body).scrollTop},getViewportHeight:function(){return
window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},getElementPhysicalHeight:function(a){return
Math.max(a.offsetHeight,a.clientHeight)},getScrollerPhysicalHeight:function(){return
this.scroller===window||this.scroller===document.body?this.getViewportHeight():this.getElementPhysicalHeight(this.scroller)},getDocumentHeight:function(){var
a=document.body,b=document.documentElement;return
Math.max(a.scrollHeight,b.scrollHeight,a.offsetHeight,b.offsetHeight,a.clientHeight,b.clientHeight)},getElementHeight:function(a){return
Math.max(a.scrollHeight,a.offsetHeight,a.clientHeight)},getScrollerHeight:function(){return
this.scroller===window||this.scroller===document.body?this.getDocumentHeight():this.getElementHeight(this.scroller)},isOutOfBounds:function(a){var
b=0>a,c=a+this.getScrollerPhysicalHeight()>this.getScrollerHeight();return
b||c},toleranceExceeded:function(a,b){return
Math.abs(a-this.lastKnownScrollY)>=this.tolerance[b]},shouldUnpin:function(a,b){var
c=a>this.lastKnownScrollY,d=a>=this.offset;return
c&&d&&b},shouldPin:function(a,b){var
c=a<this.lastKnownScrollY,d=a<=this.offset;return
c&&b||d},update:function(){var
a=this.getScrollY(),b=a>this.lastKnownScrollY?"down":"up",c=this.toleranceExceeded(a,b);this.isOutOfBounds(a)||(a<=this.offset?this.top():this.notTop(),a+this.getViewportHeight()>=this.getScrollerHeight()?this.bottom():this.notBottom(),this.shouldUnpin(a,c)?this.unpin():this.shouldPin(a,c)&&this.pin(),this.lastKnownScrollY=a)}},e.options={tolerance:{up:0,down:0},offset:0,scroller:window,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},e.cutsTheMustard="undefined"!=typeof
f&&f.rAF&&f.bind&&f.classList,e});
\ No newline at end of file
Added: trunk/phpgwapi/templates/frontend/js/jQuery.headroom.js
===================================================================
--- trunk/phpgwapi/templates/frontend/js/jQuery.headroom.js
(rev 0)
+++ trunk/phpgwapi/templates/frontend/js/jQuery.headroom.js 2017-01-25
15:58:32 UTC (rev 16192)
@@ -0,0 +1,43 @@
+(function($) {
+
+ if(!$) {
+ return;
+ }
+
+ ////////////
+ // Plugin //
+ ////////////
+
+ $.fn.headroom = function(option) {
+ return this.each(function() {
+ var $this = $(this),
+ data = $this.data('headroom'),
+ options = typeof option === 'object' && option;
+
+ options = $.extend(true, {}, Headroom.options, options);
+
+ if (!data) {
+ data = new Headroom(this, options);
+ data.init();
+ $this.data('headroom', data);
+ }
+ if (typeof option === 'string') {
+ data[option]();
+
+ if(option === 'destroy'){
+ $this.removeData('headroom');
+ }
+ }
+ });
+ };
+
+ //////////////
+ // Data API //
+ //////////////
+
+ $('[data-headroom]').each(function() {
+ var $this = $(this);
+ $this.headroom($this.data());
+ });
+
+}(window.Zepto || window.jQuery));
\ No newline at end of file
Added: trunk/phpgwapi/templates/frontend/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/frontend/navbar.inc.php
(rev 0)
+++ trunk/phpgwapi/templates/frontend/navbar.inc.php 2017-01-25 15:58:32 UTC
(rev 16192)
@@ -0,0 +1,202 @@
+<?php
+
+ function parse_navbar($force = False)
+ {
+
+ $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
+ $GLOBALS['phpgw']->template->set_file('navbar', 'navbar.tpl');
+
+ $navbar = execMethod('phpgwapi.menu.get', 'navbar');
+
+ $navigation = array();
+ prepare_navbar($navbar);
+
+ if (true)
+ {
+ $bookmarks = phpgwapi_cache::user_get('phpgwapi',
"bookmark_menu", $GLOBALS['phpgw_info']['user']['id']);
+ $lang_bookmarks = lang('bookmarks');
+
+ $navigation = execMethod('phpgwapi.menu.get',
'navigation');
+ $treemenu = '';
+ foreach($navbar as $app => $app_data)
+ {
+ if($app ==
$GLOBALS['phpgw_info']['flags']['currentapp'])
+ {
+ $submenu = isset($navigation[$app]) ?
render_submenu($app, $navigation[$app], $bookmarks) : '';
+ // $treemenu .= render_item($app_data,
"navbar::{$app}", $submenu, $bookmarks);
+ }
+ }
+ $var['treemenu'] = <<<HTML
+
+ <ul id="menutree">
+ {$submenu}
+ </ul>
+HTML;
+
+ }
+
+ $GLOBALS['phpgw']->template->set_var($var);
+ $GLOBALS['phpgw']->template->pfp('out','navbar');
+
+ if( phpgw::get_var('phpgw_return_as') != 'json' && $receipt =
phpgwapi_cache::session_get('phpgwapi', 'phpgw_messages'))
+ {
+ phpgwapi_cache::session_clear('phpgwapi',
'phpgw_messages');
+ $msgbox_data =
$GLOBALS['phpgw']->common->msgbox_data($receipt);
+ $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>';
+ }
+ }
+
+ $GLOBALS['phpgw']->hooks->process('after_navbar');
+ register_shutdown_function('parse_footer_end');
+ }
+
+ function item_expanded($id)
+ {
+ static $navbar_state;
+ if( !isset( $navbar_state ) )
+ {
+ $navbar_state =
execMethod('phpgwapi.template_portico.retrieve_local', 'navbar_config');
+ }
+ return isset( $navbar_state[ $id ]);
+ }
+
+ function render_item($item, $id='', $children='', $bookmarks = array())
+ {
+ $current_class = '';
+
+ if ( $id ==
"navbar::{$GLOBALS['phpgw_info']['flags']['menu_selection']}" )
+ {
+ $current_class = 'Selected';
+ $item['selected'] = true;
+ }
+
+ $bookmark = '';
+ if(preg_match("/(^{$id})/i",
"navbar::{$GLOBALS['phpgw_info']['flags']['menu_selection']}"))
+ {
+ $item['text'] = "<b>[ {$item['text']} ]</b>";
+ }
+
+ $link_class = $current_class ? "class=\"{$current_class}\"" :
'';
+
+ $out = <<<HTML
+ <li {$link_class}>
+HTML;
+ $target = '';
+ if(isset($item['target']))
+ {
+ $target = "target = '{$item['target']}'";
+ }
+ if(isset($item['local_files']) && $item['local_files'])
+ {
+ $item['url'] = 'file:///' .
str_replace(':','|',$item['url']);
+ }
+
+ return <<<HTML
+$out
+ <a href="{$item['url']}" id="{$id}"
{$target}>{$bookmark} {$item['text']}</a>
+{$children}
+ </li>
+
+HTML;
+ }
+
+ function render_submenu($parent, $menu, $bookmarks = array())
+ {
+ $out = '';
+ foreach ( $menu as $key => $item )
+ {
+ $children = isset($item['children']) ? render_submenu(
"{$parent}::{$key}", $item['children'], $bookmarks) : '';
+ $out .= render_item($item, "navbar::{$parent}::{$key}",
$children, $bookmarks);
+ //$debug .= "{$parent}::{$key}<br>";
+ }
+
+ $out = <<<HTML
+ <ul>
+{$out}
+ </ul>
+
+HTML;
+ return $out;
+ }
+
+ function parse_footer_end()
+ {
+ // Stop the register_shutdown_function causing the footer to be
included twice - skwashd dec07
+ static $footer_included = false;
+ if ( $footer_included )
+ {
+ return true;
+ }
+
+ $GLOBALS['phpgw']->template->set_root(PHPGW_TEMPLATE_DIR);
+ $GLOBALS['phpgw']->template->set_file('footer', 'footer.tpl');
+
+ $footer_info = phpgwapi_cache::session_get('phpgwapi',
'footer_info');
+ $var = array
+ (
+ 'footer_info' => $footer_info, //'Bergen kommune |
Rådhusgt 10 | Postboks 7700 | 5020 Bergen',
+ 'powered_by' => lang('Powered by phpGroupWare
version %1', $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']),
+ 'javascript_end'=>
$GLOBALS['phpgw']->common->get_javascript_end()
+ );
+
+ $GLOBALS['phpgw']->template->set_var($var);
+
+ $GLOBALS['phpgw']->template->pfp('out', 'footer');
+
+ $footer_included = true;
+ }
+
+ /**
+ * Callback for usort($navbar)
+ *
+ * @param array $item1 the first item to compare
+ * @param array $item2 the second item to compare
+ * @return int result of comparision
+ */
+ function sort_navbar($item1, $item2)
+ {
+ $a =& $item1['order'];
+ $b =& $item2['order'];
+
+ if ($a == $b)
+ {
+ return strcmp($item1['text'], $item2['text']);
+ }
+ return ($a < $b) ? -1 : 1;
+ }
+
+ /**
+ * Organise the navbar properly
+ *
+ * @param array $navbar the navbar items
+ * @return array the organised navbar
+ */
+ function prepare_navbar(&$navbar)
+ {
+ if ( isset($navbar['admin']) && is_array($navbar['admin']) )
+ {
+ $navbar['admin']['children'] =
execMethod('phpgwapi.menu.get', 'admin');
+ }
+ uasort($navbar, 'sort_navbar');
+ }
+
+ /**
+ * Cheat function to collect bookmarks
+ * @staticvar array $bookmarks
+ * @param array $item
+ * @return array bookmarks
+ */
+ function set_get_bookmarks($item = array())
+ {
+ static $bookmarks = array();
+ if($item)
+ {
+ $bookmarks[] = $item;
+ }
+ return $bookmarks;
+ }
\ No newline at end of file
Added: trunk/phpgwapi/templates/frontend/navbar.tpl
===================================================================
--- trunk/phpgwapi/templates/frontend/navbar.tpl
(rev 0)
+++ trunk/phpgwapi/templates/frontend/navbar.tpl 2017-01-25 15:58:32 UTC
(rev 16192)
@@ -0,0 +1,6 @@
+<div class="header">
+ <a id="hamburger" class="FixedTop" href="#menu"></a>
+</div>
+<nav id="menu">
+ {treemenu}
+</nav>
Added: trunk/phpgwapi/templates/frontend/themes/bergen_kommune.css
===================================================================
--- trunk/phpgwapi/templates/frontend/themes/bergen_kommune.css
(rev 0)
+++ trunk/phpgwapi/templates/frontend/themes/bergen_kommune.css 2017-01-25
15:58:32 UTC (rev 16192)
@@ -0,0 +1,5 @@
+/*
+ *
+ * Theme
+ */
+
Added: trunk/phpgwapi/templates/frontend/themes/fjell_kommune.css
===================================================================
--- trunk/phpgwapi/templates/frontend/themes/fjell_kommune.css
(rev 0)
+++ trunk/phpgwapi/templates/frontend/themes/fjell_kommune.css 2017-01-25
15:58:32 UTC (rev 16192)
@@ -0,0 +1,5 @@
+/*
+ *
+ * Theme
+ */
+
Modified: trunk/phpgwapi/templates/pure/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/pure/navbar.inc.php 2017-01-25 15:58:02 UTC
(rev 16191)
+++ trunk/phpgwapi/templates/pure/navbar.inc.php 2017-01-25 15:58:32 UTC
(rev 16192)
@@ -162,7 +162,7 @@
}
if (!$nonavbar)
- {
+ {
$bookmarks = phpgwapi_cache::user_get('phpgwapi',
"bookmark_menu", $GLOBALS['phpgw_info']['user']['id']);
$lang_bookmarks = lang('bookmarks');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16192] more on eventplanner,
sigurdne <=