aboutsummaryrefslogtreecommitdiffstats
path: root/themes/elegant
diff options
context:
space:
mode:
Diffstat (limited to 'themes/elegant')
-rw-r--r--themes/elegant/admin/admin.inc.php30
-rw-r--r--themes/elegant/admin/admin.tpl44
-rw-r--r--themes/elegant/admin/index.php30
-rw-r--r--themes/elegant/admin/jquery.ui.button.css571
-rw-r--r--themes/elegant/admin/maintain.inc.php30
-rw-r--r--themes/elegant/admin/upgrade.inc.php31
-rw-r--r--themes/elegant/local_head.tpl3
-rw-r--r--themes/elegant/scripts.js10
-rw-r--r--themes/elegant/scripts_pp.js28
-rw-r--r--themes/elegant/themeconf.inc.php12
10 files changed, 779 insertions, 10 deletions
diff --git a/themes/elegant/admin/admin.inc.php b/themes/elegant/admin/admin.inc.php
new file mode 100644
index 000000000..d50b75564
--- /dev/null
+++ b/themes/elegant/admin/admin.inc.php
@@ -0,0 +1,30 @@
+<?php
+
+// Need upgrade?
+global $conf;
+include(PHPWG_THEMES_PATH.'elegant/admin/upgrade.inc.php');
+
+load_language('theme.lang', PHPWG_THEMES_PATH.'elegant/');
+
+$config_send= array();
+
+if(isset($_POST['submit_elegant']))
+{
+ $config_send['p_main_menu']=(isset($_POST['p_main_menu']) and !empty($_POST['p_main_menu'])) ? $_POST['p_main_menu'] : 'on';
+ $config_send['p_pict_descr']=(isset($_POST['p_pict_descr']) and !empty($_POST['p_pict_descr'])) ? $_POST['p_pict_descr'] : 'on';
+ $config_send['p_pict_comment']=(isset($_POST['p_pict_comment']) and !empty($_POST['p_pict_comment'])) ? $_POST['p_pict_comment'] : 'off';
+ conf_update_param('elegant', pwg_db_real_escape_string(serialize($config_send)));
+
+ array_push($page['infos'], l10n('Information data registered in database'));
+
+ load_conf_from_db();
+}
+
+$template->set_filenames(array(
+ 'theme_admin_content' => dirname(__FILE__) . '/admin.tpl'));
+
+$template->assign('options', unserialize($conf['elegant']));
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
+
+?> \ No newline at end of file
diff --git a/themes/elegant/admin/admin.tpl b/themes/elegant/admin/admin.tpl
new file mode 100644
index 000000000..83f45f71f
--- /dev/null
+++ b/themes/elegant/admin/admin.tpl
@@ -0,0 +1,44 @@
+{combine_css path="themes/default/js/ui/theme/jquery.ui.button.css"}
+{combine_css path="themes/elegant/admin/jquery.ui.button.css"}
+{footer_script require='jquery.ui.button'}
+{literal}
+jQuery(document).ready(function(){
+ jQuery( ".radio" ).buttonset();
+});
+{/literal}
+{/footer_script}
+
+<div class="titrePage">
+ <h2>{'Elegant Configuration'|@translate}</h2>
+</div>
+<form method="post" class="properties" action="" ENCTYPE="multipart/form-data" name="form" class="properties">
+<div id="configContent">
+ <fieldset>
+ <legend>{'Panels options'|@translate}</legend>
+ <p>{'Choose what should be the default state for each panel, or disable the animation:'|@translate}</p>
+ <ul>
+ <li class="radio" >
+ <label for="p_main_menu"><span class="property">{'Main Menu Panel'|@translate}</span>&nbsp;</label>
+ <input type="radio" id="p_main_menu_on" name="p_main_menu" value="on" {if $options.p_main_menu=="on"}checked="checked"{/if}><label for="p_main_menu_on">{'Displayed'|@translate}</label>
+ <input type="radio" id="p_main_menu_off" name="p_main_menu" value="off" {if $options.p_main_menu=="off"}checked="checked"{/if}><label for="p_main_menu_off">{'Hidden'|@translate}</label>
+ <input type="radio" id="p_main_menu_disabled" name="p_main_menu" value="disabled" {if $options.p_main_menu=="disabled"}checked="checked"{/if}><label for="p_main_menu_disabled">{'Disable animation'|@translate}</label>
+ </li>
+ <li class="radio" >
+ <label for="p_pict_descr"><span class="property">{'Photo Description Panel'|@translate}</span>&nbsp;</label>
+ <input type="radio" id="p_pict_descr_on" name="p_pict_descr" value="on" {if $options.p_pict_descr=="on"}checked="checked"{/if}><label for="p_pict_descr_on">{'Displayed'|@translate}</label>
+ <input type="radio" id="p_pict_descr_off" name="p_pict_descr" value="off" {if $options.p_pict_descr=="off"}checked="checked"{/if}><label for="p_pict_descr_off">{'Hidden'|@translate}</label>
+ <input type="radio" id="p_pict_descr_disabled" name="p_pict_descr" value="disabled" {if $options.p_pict_descr=="disabled"}checked="checked"{/if}><label for="p_pict_descr_disabled">{'Disable animation'|@translate}</label>
+ </li>
+ <li class="radio" >
+ <label for="p_pict_comment"><span class="property">{'Comments Panel'|@translate}</span>&nbsp;</label>
+ <input type="radio" id="p_pict_comment_on" name="p_pict_comment" value="on" {if $options.p_pict_comment=="on"}checked="checked"{/if}><label for="p_pict_comment_on">{'Displayed'|@translate}</label>
+ <input type="radio" id="p_pict_comment_off" name="p_pict_comment" value="off" {if $options.p_pict_comment=="off"}checked="checked"{/if}><label for="p_pict_comment_off">{'Hidden'|@translate}</label>
+ <input type="radio" id="p_pict_comment_disabled" name="p_pict_comment" value="disabled" {if $options.p_pict_comment=="disabled"}checked="checked"{/if}><label for="p_pict_comment_disabled">{'Disable animation'|@translate}</label>
+ </li>
+ </ul>
+ </fieldset>
+</div>
+<p>
+ <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit_elegant" />
+</p>
+</form>
diff --git a/themes/elegant/admin/index.php b/themes/elegant/admin/index.php
new file mode 100644
index 000000000..b003b4781
--- /dev/null
+++ b/themes/elegant/admin/index.php
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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 |
+// | |
+// | 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, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
diff --git a/themes/elegant/admin/jquery.ui.button.css b/themes/elegant/admin/jquery.ui.button.css
new file mode 100644
index 000000000..4bc0491e3
--- /dev/null
+++ b/themes/elegant/admin/jquery.ui.button.css
@@ -0,0 +1,571 @@
+/*! jQuery UI - v1.10.3 - 2013-06-16
+* http://jqueryui.com
+* Includes: jquery.ui.core.css, jquery.ui.button.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
+
+/* Layout helpers
+----------------------------------*/
+#content .ui-helper-hidden {
+ display: none;
+}
+#content .ui-helper-hidden-accessible {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
+#content .ui-helper-reset {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ line-height: 1.3;
+ text-decoration: none;
+ font-size: 100%;
+ list-style: none;
+}
+#content .ui-helper-clearfix:before,
+#content .ui-helper-clearfix:after {
+ content: "";
+ display: table;
+ border-collapse: collapse;
+}
+#content .ui-helper-clearfix:after {
+ clear: both;
+}
+#content .ui-helper-clearfix {
+ min-height: 0; /* support: IE7 */
+}
+#content .ui-helper-zfix {
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ position: absolute;
+ opacity: 0;
+ filter:Alpha(Opacity=0);
+}
+
+#content .ui-front {
+ z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+#content .ui-state-disabled {
+ cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+#content .ui-icon {
+ display: block;
+ text-indent: -99999px;
+ overflow: hidden;
+ background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+#content .ui-widget-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+#content .ui-button {
+ display: inline-block;
+ position: relative;
+ padding: 0;
+ line-height: normal;
+ margin-right: .1em;
+ cursor: pointer;
+ vertical-align: middle;
+ text-align: center;
+ overflow: visible; /* removes extra width in IE */
+}
+#content .ui-button,
+#content .ui-button:link,
+#content .ui-button:visited,
+#content .ui-button:hover,
+#content .ui-button:active {
+ text-decoration: none;
+}
+/* to make room for the icon, a width needs to be set here */
+#content .ui-button-icon-only {
+ width: 2.2em;
+}
+/* button elements seem to need a little more width */
+#content button.ui-button-icon-only {
+ width: 2.4em;
+}
+#content .ui-button-icons-only {
+ width: 3.4em;
+}
+#content button.ui-button-icons-only {
+ width: 3.7em;
+}
+
+/* button text element */
+#content .ui-button .ui-button-text {
+ display: block;
+ line-height: normal;
+}
+#content .ui-button-text-only .ui-button-text {
+ padding: .4em 1em;
+}
+#content .ui-button-icon-only .ui-button-text,
+#content .ui-button-icons-only .ui-button-text {
+ padding: .4em;
+ text-indent: -9999999px;
+}
+#content .ui-button-text-icon-primary .ui-button-text,
+#content .ui-button-text-icons .ui-button-text {
+ padding: .4em 1em .4em 2.1em;
+}
+#content .ui-button-text-icon-secondary .ui-button-text,
+#content .ui-button-text-icons .ui-button-text {
+ padding: .4em 2.1em .4em 1em;
+}
+#content .ui-button-text-icons .ui-button-text {
+ padding-left: 2.1em;
+ padding-right: 2.1em;
+}
+/* no icon support for input elements, provide padding by default */
+#content input.ui-button {
+ padding: .4em 1em;
+}
+
+/* button icon element(s) */
+#content .ui-button-icon-only .ui-icon,
+#content .ui-button-text-icon-primary .ui-icon,
+#content .ui-button-text-icon-secondary .ui-icon,
+#content .ui-button-text-icons .ui-icon,
+#content .ui-button-icons-only .ui-icon {
+ position: absolute;
+ top: 50%;
+ margin-top: -8px;
+}
+#content .ui-button-icon-only .ui-icon {
+ left: 50%;
+ margin-left: -8px;
+}
+#content .ui-button-text-icon-primary .ui-button-icon-primary,
+#content .ui-button-text-icons .ui-button-icon-primary,
+#content .ui-button-icons-only .ui-button-icon-primary {
+ left: .5em;
+}
+#content .ui-button-text-icon-secondary .ui-button-icon-secondary,
+#content .ui-button-text-icons .ui-button-icon-secondary,
+#content .ui-button-icons-only .ui-button-icon-secondary {
+ right: .5em;
+}
+
+/* button sets */
+#content .ui-buttonset {
+ margin-right: 7px;
+}
+#content .ui-buttonset .ui-button {
+ margin-left: 0;
+ margin-right: -.3em;
+}
+
+/* workarounds */
+/* reset extra padding in Firefox, see h5bp.com/l */
+#content input.ui-button::-moz-focus-inner,
+#content button.ui-button::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
+
+/* Component containers
+----------------------------------*/
+#content .ui-widget-content {
+ border: 1px solid #aaaaaa;
+ background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
+ color: #222222;
+}
+#content .ui-widget-content a {
+ color: #222222;
+}
+#content .ui-widget-header {
+ border: 1px solid #aaaaaa;
+ background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
+ color: #222222;
+ font-weight: bold;
+}
+#content .ui-widget-header a {
+ color: #222222;
+}
+
+/* Interaction states
+----------------------------------*/
+#content .ui-state-default,
+#content .ui-widget-content .ui-state-default,
+#content .ui-widget-header .ui-state-default {
+ border: 1px solid #d3d3d3;
+ background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
+ font-weight: normal;
+ color: #555555;
+}
+#content .ui-state-default a,
+#content .ui-state-default a:link,
+#content .ui-state-default a:visited {
+ color: #555555;
+ text-decoration: none;
+}
+#content .ui-state-hover,
+#content .ui-widget-content .ui-state-hover,
+#content .ui-widget-header .ui-state-hover,
+#content .ui-state-focus,
+#content .ui-widget-content .ui-state-focus,
+#content .ui-widget-header .ui-state-focus {
+ border: 1px solid #999999;
+ background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;
+ font-weight: normal;
+ color: #212121;
+}
+#content .ui-state-hover a,
+#content .ui-state-hover a:hover,
+#content .ui-state-hover a:link,
+#content .ui-state-hover a:visited {
+ color: #212121;
+ text-decoration: none;
+}
+#content .ui-state-active,
+#content .ui-widget-content .ui-state-active,
+#content .ui-widget-header .ui-state-active {
+ border: 1px solid #aaaaaa;
+ background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
+ font-weight: normal;
+ color: #212121;
+}
+#content .ui-state-active a,
+#content .ui-state-active a:link,
+#content .ui-state-active a:visited {
+ color: #212121;
+ text-decoration: none;
+}
+
+/* Interaction Cues
+----------------------------------*/
+#content .ui-state-highlight,
+#content .ui-widget-content .ui-state-highlight,
+#content .ui-widget-header .ui-state-highlight {
+ border: 1px solid #fcefa1;
+ background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;
+ color: #363636;
+}
+#content .ui-state-highlight a,
+#content .ui-widget-content .ui-state-highlight a,
+#content .ui-widget-header .ui-state-highlight a {
+ color: #363636;
+}
+#content .ui-state-error,
+#content .ui-widget-content .ui-state-error,
+#content .ui-widget-header .ui-state-error {
+ border: 1px solid #cd0a0a;
+ background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
+ color: #cd0a0a;
+}
+#content .ui-state-error a,
+#content .ui-widget-content .ui-state-error a,
+#content .ui-widget-header .ui-state-error a {
+ color: #cd0a0a;
+}
+#content .ui-state-error-text,
+#content .ui-widget-content .ui-state-error-text,
+#content .ui-widget-header .ui-state-error-text {
+ color: #cd0a0a;
+}
+#content .ui-priority-primary,
+#content .ui-widget-content .ui-priority-primary,
+#content .ui-widget-header .ui-priority-primary {
+ font-weight: bold;
+}
+#content .ui-priority-secondary,
+#content .ui-widget-content .ui-priority-secondary,
+#content .ui-widget-header .ui-priority-secondary {
+ opacity: .7;
+ filter:Alpha(Opacity=70);
+ font-weight: normal;
+}
+#content .ui-state-disabled,
+#content .ui-widget-content .ui-state-disabled,
+#content .ui-widget-header .ui-state-disabled {
+ opacity: .35;
+ filter:Alpha(Opacity=35);
+ background-image: none;
+}
+#content .ui-state-disabled .ui-icon {
+ filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
+}
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+#content .ui-icon {
+ width: 16px;
+ height: 16px;
+}
+#content .ui-icon,
+#content .ui-widget-content .ui-icon {
+ background-image: url(images/ui-icons_222222_256x240.png);
+}
+#content .ui-widget-header .ui-icon {
+ background-image: url(images/ui-icons_222222_256x240.png);
+}
+#content .ui-state-default .ui-icon {
+ background-image: url(images/ui-icons_888888_256x240.png);
+}
+#content .ui-state-hover .ui-icon,
+#content .ui-state-focus .ui-icon {
+ background-image: url(images/ui-icons_454545_256x240.png);
+}
+#content .ui-state-active .ui-icon {
+ background-image: url(images/ui-icons_454545_256x240.png);
+}
+#content .ui-state-highlight .ui-icon {
+ background-image: url(images/ui-icons_2e83ff_256x240.png);
+}
+#content .ui-state-error .ui-icon,
+#content .ui-state-error-text .ui-icon {
+ background-image: url(images/ui-icons_cd0a0a_256x240.png);
+}
+
+/* positioning */
+#content .ui-icon-blank { background-position: 16px 16px; }
+#content .ui-icon-carat-1-n { background-position: 0 0; }
+#content .ui-icon-carat-1-ne { background-position: -16px 0; }
+#content .ui-icon-carat-1-e { background-position: -32px 0; }
+#content .ui-icon-carat-1-se { background-position: -48px 0; }
+#content .ui-icon-carat-1-s { background-position: -64px 0; }
+#content .ui-icon-carat-1-sw { background-position: -80px 0; }
+#content .ui-icon-carat-1-w { background-position: -96px 0; }
+#content .ui-icon-carat-1-nw { background-position: -112px 0; }
+#content .ui-icon-carat-2-n-s { background-position: -128px 0; }
+#content .ui-icon-carat-2-e-w { background-position: -144px 0; }
+#content .ui-icon-triangle-1-n { background-position: 0 -16px; }
+#content .ui-icon-triangle-1-ne { background-position: -16px -16px; }
+#content .ui-icon-triangle-1-e { background-position: -32px -16px; }
+#content .ui-icon-triangle-1-se { background-position: -48px -16px; }
+#content .ui-icon-triangle-1-s { background-position: -64px -16px; }
+#content .ui-icon-triangle-1-sw { background-position: -80px -16px; }
+#content .ui-icon-triangle-1-w { background-position: -96px -16px; }
+#content .ui-icon-triangle-1-nw { background-position: -112px -16px; }
+#content .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+#content .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+#content .ui-icon-arrow-1-n { background-position: 0 -32px; }
+#content .ui-icon-arrow-1-ne { background-position: -16px -32px; }
+#content .ui-icon-arrow-1-e { background-position: -32px -32px; }
+#content .ui-icon-arrow-1-se { background-position: -48px -32px; }
+#content .ui-icon-arrow-1-s { background-position: -64px -32px; }
+#content .ui-icon-arrow-1-sw { background-position: -80px -32px; }
+#content .ui-icon-arrow-1-w { background-position: -96px -32px; }
+#content .ui-icon-arrow-1-nw { background-position: -112px -32px; }
+#content .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+#content .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+#content .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+#content .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+#content .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+#content .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+#content .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+#content .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+#content .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+#content .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+#content .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+#content .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+#content .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+#content .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+#content .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+#content .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+#content .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+#content .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+#content .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+#content .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+#content .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+#content .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+#content .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+#content .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+#content .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+#content .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+#content .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+#content .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+#content .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+#content .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+#content .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+#content .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+#content .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+#content .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+#content .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+#content .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+#content .ui-icon-arrow-4 { background-position: 0 -80px; }
+#content .ui-icon-arrow-4-diag { background-position: -16px -80px; }
+#content .ui-icon-extlink { background-position: -32px -80px; }
+#content .ui-icon-newwin { background-position: -48px -80px; }
+#content .ui-icon-refresh { background-position: -64px -80px; }
+#content .ui-icon-shuffle { background-position: -80px -80px; }
+#content .ui-icon-transfer-e-w { background-position: -96px -80px; }
+#content .ui-icon-transferthick-e-w { background-position: -112px -80px; }
+#content .ui-icon-folder-collapsed { background-position: 0 -96px; }
+#content .ui-icon-folder-open { background-position: -16px -96px; }
+#content .ui-icon-document { background-position: -32px -96px; }
+#content .ui-icon-document-b { background-position: -48px -96px; }
+#content .ui-icon-note { background-position: -64px -96px; }
+#content .ui-icon-mail-closed { background-position: -80px -96px; }
+#content .ui-icon-mail-open { background-position: -96px -96px; }
+#content .ui-icon-suitcase { background-position: -112px -96px; }
+#content .ui-icon-comment { background-position: -128px -96px; }
+#content .ui-icon-person { background-position: -144px -96px; }
+#content .ui-icon-print { background-position: -160px -96px; }
+#content .ui-icon-trash { background-position: -176px -96px; }
+#content .ui-icon-locked { background-position: -192px -96px; }
+#content .ui-icon-unlocked { background-position: -208px -96px; }
+#content .ui-icon-bookmark { background-position: -224px -96px; }
+#content .ui-icon-tag { background-position: -240px -96px; }
+#content .ui-icon-home { background-position: 0 -112px; }
+#content .ui-icon-flag { background-position: -16px -112px; }
+#content .ui-icon-calendar { background-position: -32px -112px; }
+#content .ui-icon-cart { background-position: -48px -112px; }
+#content .ui-icon-pencil { background-position: -64px -112px; }
+#content .ui-icon-clock { background-position: -80px -112px; }
+#content .ui-icon-disk { background-position: -96px -112px; }
+#content .ui-icon-calculator { background-position: -112px -112px; }
+#content .ui-icon-zoomin { background-position: -128px -112px; }
+#content .ui-icon-zoomout { background-position: -144px -112px; }
+#content .ui-icon-search { background-position: -160px -112px; }
+#content .ui-icon-wrench { background-position: -176px -112px; }
+#content .ui-icon-gear { background-position: -192px -112px; }
+#content .ui-icon-heart { background-position: -208px -112px; }
+#content .ui-icon-star { background-position: -224px -112px; }
+#content .ui-icon-link { background-position: -240px -112px; }
+#content .ui-icon-cancel { background-position: 0 -128px; }
+#content .ui-icon-plus { background-position: -16px -128px; }
+#content .ui-icon-plusthick { background-position: -32px -128px; }
+#content .ui-icon-minus { background-position: -48px -128px; }
+#content .ui-icon-minusthick { background-position: -64px -128px; }
+#content .ui-icon-close { background-position: -80px -128px; }
+#content .ui-icon-closethick { background-position: -96px -128px; }
+#content .ui-icon-key { background-position: -112px -128px; }
+#content .ui-icon-lightbulb { background-position: -128px -128px; }
+#content .ui-icon-scissors { background-position: -144px -128px; }
+#content .ui-icon-clipboard { background-position: -160px -128px; }
+#content .ui-icon-copy { background-position: -176px -128px; }
+#content .ui-icon-contact { background-position: -192px -128px; }
+#content .ui-icon-image { background-position: -208px -128px; }
+#content .ui-icon-video { background-position: -224px -128px; }
+#content .ui-icon-script { background-position: -240px -128px; }
+#content .ui-icon-alert { background-position: 0 -144px; }
+#content .ui-icon-info { background-position: -16px -144px; }
+#content .ui-icon-notice { background-position: -32px -144px; }
+#content .ui-icon-help { background-position: -48px -144px; }
+#content .ui-icon-check { background-position: -64px -144px; }
+#content .ui-icon-bullet { background-position: -80px -144px; }
+#content .ui-icon-radio-on { background-position: -96px -144px; }
+#content .ui-icon-radio-off { background-position: -112px -144px; }
+#content .ui-icon-pin-w { background-position: -128px -144px; }
+#content .ui-icon-pin-s { background-position: -144px -144px; }
+#content .ui-icon-play { background-position: 0 -160px; }
+#content .ui-icon-pause { background-position: -16px -160px; }
+#content .ui-icon-seek-next { background-position: -32px -160px; }
+#content .ui-icon-seek-prev { background-position: -48px -160px; }
+#content .ui-icon-seek-end { background-position: -64px -160px; }
+#content .ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+#content .ui-icon-seek-first { background-position: -80px -160px; }
+#content .ui-icon-stop { background-position: -96px -160px; }
+#content .ui-icon-eject { background-position: -112px -160px; }
+#content .ui-icon-volume-off { background-position: -128px -160px; }
+#content .ui-icon-volume-on { background-position: -144px -160px; }
+#content .ui-icon-power { background-position: 0 -176px; }
+#content .ui-icon-signal-diag { background-position: -16px -176px; }
+#content .ui-icon-signal { background-position: -32px -176px; }
+#content .ui-icon-battery-0 { background-position: -48px -176px; }
+#content .ui-icon-battery-1 { background-position: -64px -176px; }
+#content .ui-icon-battery-2 { background-position: -80px -176px; }
+#content .ui-icon-battery-3 { background-position: -96px -176px; }
+#content .ui-icon-circle-plus { background-position: 0 -192px; }
+#content .ui-icon-circle-minus { background-position: -16px -192px; }
+#content .ui-icon-circle-close { background-position: -32px -192px; }
+#content .ui-icon-circle-triangle-e { background-position: -48px -192px; }
+#content .ui-icon-circle-triangle-s { background-position: -64px -192px; }
+#content .ui-icon-circle-triangle-w { background-position: -80px -192px; }
+#content .ui-icon-circle-triangle-n { background-position: -96px -192px; }
+#content .ui-icon-circle-arrow-e { background-position: -112px -192px; }
+#content .ui-icon-circle-arrow-s { background-position: -128px -192px; }
+#content .ui-icon-circle-arrow-w { background-position: -144px -192px; }
+#content .ui-icon-circle-arrow-n { background-position: -160px -192px; }
+#content .ui-icon-circle-zoomin { background-position: -176px -192px; }
+#content .ui-icon-circle-zoomout { background-position: -192px -192px; }
+#content .ui-icon-circle-check { background-position: -208px -192px; }
+#content .ui-icon-circlesmall-plus { background-position: 0 -208px; }
+#content .ui-icon-circlesmall-minus { background-position: -16px -208px; }
+#content .ui-icon-circlesmall-close { background-position: -32px -208px; }
+#content .ui-icon-squaresmall-plus { background-position: -48px -208px; }
+#content .ui-icon-squaresmall-minus { background-position: -64px -208px; }
+#content .ui-icon-squaresmall-close { background-position: -80px -208px; }
+#content .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+#content .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+#content .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+#content .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+#content .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+#content .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+#content .ui-corner-all,
+#content .ui-corner-top,
+#content .ui-corner-left,
+#content .ui-corner-tl {
+ border-top-left-radius: 4px;
+}
+#content .ui-corner-all,
+#content .ui-corner-top,
+#content .ui-corner-right,
+#content .ui-corner-tr {
+ border-top-right-radius: 4px;
+}
+#content .ui-corner-all,
+#content .ui-corner-bottom,
+#content .ui-corner-left,
+#content .ui-corner-bl {
+ border-bottom-left-radius: 4px;
+}
+#content .ui-corner-all,
+#content .ui-corner-bottom,
+#content .ui-corner-right,
+#content .ui-corner-br {
+ border-bottom-right-radius: 4px;
+}
+
+/* Overlays */
+#content .ui-widget-overlay {
+ background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
+ opacity: .3;
+ filter: Alpha(Opacity=30);
+}
+#content .ui-widget-shadow {
+ margin: -8px 0 0 -8px;
+ padding: 8px;
+ background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
+ opacity: .3;
+ filter: Alpha(Opacity=30);
+ border-radius: 8px;
+}
diff --git a/themes/elegant/admin/maintain.inc.php b/themes/elegant/admin/maintain.inc.php
new file mode 100644
index 000000000..6a531ea09
--- /dev/null
+++ b/themes/elegant/admin/maintain.inc.php
@@ -0,0 +1,30 @@
+<?php
+
+function theme_activate($id, $version, &$errors)
+{
+ global $prefixeTable, $conf;
+
+ if (!isset($conf['elegant']))
+ {
+ $config = array(
+ 'p_main_menu' => 'on',//on - off - disabled
+ 'p_pict_descr' => 'on',//on - off - disabled
+ 'p_pict_comment' => 'off',//on - off - disabled
+ );
+
+ $query = "
+INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
+VALUES ('elegant' , '".pwg_db_real_escape_string(serialize($config))."' , 'p_main_menu#p_pict_descr#p_pict_comment');";
+ pwg_query($query);
+ }
+}
+
+function theme_delete()
+{
+ global $prefixeTable;
+
+ $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="elegant" ;';
+ pwg_query($query);
+}
+
+?> \ No newline at end of file
diff --git a/themes/elegant/admin/upgrade.inc.php b/themes/elegant/admin/upgrade.inc.php
new file mode 100644
index 000000000..6cda1318a
--- /dev/null
+++ b/themes/elegant/admin/upgrade.inc.php
@@ -0,0 +1,31 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+global $prefixeTable, $conf;
+
+if (!isset($conf['elegant']))
+{
+ $config = array(
+ 'p_main_menu' => 'on',//on - off - disabled
+ 'p_pict_descr' => 'on',//on - off - disabled
+ 'p_pict_comment' => 'off',//on - off - disabled
+ );
+ $query = "
+INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
+VALUES ('elegant' , '".pwg_db_real_escape_string(serialize($config))."' , 'p_main_menu#');";
+ pwg_query($query);
+ load_conf_from_db();
+}
+elseif (count(unserialize( $conf['elegant'] ))!=3)
+{
+ $conff=unserialize($conf['elegant']);
+ $config = array(
+ 'p_main_menu' => (isset($conff['p_main_menu'])) ? $conff['p_main_menu'] :'on',
+ 'p_pict_descr' => (isset($conff['p_pict_descr'])) ? $conff['p_pict_descr'] :'on',
+ 'p_pict_comment' => (isset($conff['p_pict_comment'])) ? $conff['p_pict_comment'] :'off',
+ );
+ conf_update_param('elegant', pwg_db_real_escape_string(serialize($config)));
+ load_conf_from_db();
+}
+?> \ No newline at end of file
diff --git a/themes/elegant/local_head.tpl b/themes/elegant/local_head.tpl
index a427c1726..8c2b4045c 100644
--- a/themes/elegant/local_head.tpl
+++ b/themes/elegant/local_head.tpl
@@ -1,3 +1,6 @@
+{footer_script}
+ var p_main_menu = "{$elegant.p_main_menu}", p_pict_descr = "{$elegant.p_pict_descr}", p_pict_comment = "{$elegant.p_pict_comment}";
+{/footer_script}
{if $BODY_ID=='thePicturePage'}
{combine_script id='elegant.scripts_pp' load='footer' require='jquery' path='themes/elegant/scripts_pp.js'}
{else}
diff --git a/themes/elegant/scripts.js b/themes/elegant/scripts.js
index 20433ac65..86a43a1eb 100644
--- a/themes/elegant/scripts.js
+++ b/themes/elegant/scripts.js
@@ -49,17 +49,21 @@ jQuery("document").ready(function(jQuery){
var sidemenu = jQuery.cookie('page-menu');
var menubar=jQuery("#menubar");
- if (menubar.length == 1) {
+ if (menubar.length == 1 && p_main_menu!="disabled") {
jQuery("#menuSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
// if cookie says the menu is hiding, keep it hidden!
if (sidemenu == 'hidden') {
hideMenu(0);
- } else {
+ } else if (sidemenu == 'visible') {
+ showMenu(0);
+ } else if (p_main_menu == 'off') {
+ hideMenu(0);
+ } else {
showMenu(0);
}
-
+
jQuery("#menuSwitcher").click(function(){
if (jQuery("#menubar").is(":hidden")) {
showMenu(0);
diff --git a/themes/elegant/scripts_pp.js b/themes/elegant/scripts_pp.js
index 79d700ebb..bf7e1531d 100644
--- a/themes/elegant/scripts_pp.js
+++ b/themes/elegant/scripts_pp.js
@@ -77,15 +77,19 @@ jQuery("document").ready(function(jQuery){
var sidemenu = jQuery.cookie('picture-menu');
var menubar=jQuery("#menubar");
- if (menubar.length == 1) {
+ if (menubar.length == 1 && p_main_menu!="disabled") {
jQuery("#menuSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
// if cookie says the menu is hiding, keep it hidden!
- if (sidemenu == 'visible') {
+ if (sidemenu == 'hidden') {
+ hideMenu(0);
+ } else if (sidemenu == 'visible') {
showMenu(0);
- } else {
+ } else if (p_main_menu == 'off') {
hideMenu(0);
+ } else {
+ showMenu(0);
}
jQuery("#menuSwitcher").click(function(){
@@ -105,13 +109,17 @@ jQuery("document").ready(function(jQuery){
var sideinfo = jQuery.cookie('side-info');
var imageInfos=jQuery("#imageInfos");
- if (imageInfos.length == 1) {
+ if (imageInfos.length == 1 && p_pict_descr!="disabled") {
jQuery("#infoSwitcher").html("<div class=\"switchArrow\">&nbsp;</div>");
// if cookie says the menu is hiding, keep it hidden!
if (sideinfo == 'hidden') {
hideInfo(0);
+ } else if (sideinfo == 'visible') {
+ showInfo(0);
+ } else if (p_pict_descr == 'off') {
+ hideInfo(0);
} else {
showInfo(0);
}
@@ -135,7 +143,7 @@ jQuery("document").ready(function(jQuery){
commentsswicther.html("<div class=\"switchArrow\">&nbsp;</div>");
- if (comments.length == 1) {
+ if (comments.length == 1 && p_pict_comment!="disabled") {
var comments_button=jQuery("#comments h3");
if (comments_button.length == 0) {
@@ -143,12 +151,18 @@ jQuery("document").ready(function(jQuery){
comments_button=jQuery("#comments h3");
}
- if (jQuery.cookie('comments') == 'visible') {
+ if (jQuery.cookie('comments') == 'hidden') {
+ comments.addClass("commentshidden");
+ comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
+ } else if (jQuery.cookie('comments') == 'visible') {
comments.addClass("commentsshown");
comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
- } else {
+ } else if (p_pict_comment == 'off') {
comments.addClass("commentshidden");
comments_button.addClass("comments_toggle").addClass("comments_toggle_on");
+ } else {
+ comments.addClass("commentsshown");
+ comments_button.addClass("comments_toggle").addClass("comments_toggle_off");
}
comments_button.click(function() { commentsToggle() });
diff --git a/themes/elegant/themeconf.inc.php b/themes/elegant/themeconf.inc.php
index 55681f290..99f4f0ac8 100644
--- a/themes/elegant/themeconf.inc.php
+++ b/themes/elegant/themeconf.inc.php
@@ -12,4 +12,16 @@ $themeconf = array(
'parent' => 'default',
'local_head' => 'local_head.tpl'
);
+// Need upgrade?
+global $conf;
+include(PHPWG_THEMES_PATH.'elegant/admin/upgrade.inc.php');
+
+add_event_handler('init', 'set_config_values_elegant');
+function set_config_values_elegant()
+{
+ global $conf, $template;
+ $config = unserialize( $conf['elegant'] );
+ $template->assign( 'elegant', $config );
+}
+
?>