Added a variation of the Enhanced Theme: Minimized.

This commit is contained in:
Nate Jones
2014-08-17 13:41:57 +00:00
parent d2093a6d7d
commit d68440acea
38 changed files with 1768 additions and 0 deletions

View File

@@ -0,0 +1,233 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
if ($domains_processed == 1) {
//define array of settings
$x = 0;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'background_color';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = '#ffffff';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_order'] = '0';
$array[$x]['default_setting_description'] = 'Set a background (HTML compatible) color.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'login_opacity';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '0.35';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the opacity of the login box (decimal).';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'login_background_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#ffffff';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set a background color (HTML compatible) for the login box.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'footer_background_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#000000';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set a background color (HTML compatible) for the footer bar.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'footer_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#ffffff';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set a foreground color (HTML compatible) for the footer bar.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'footer_opacity';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '0.2';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the opacity of the footer bar (decimal).';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'message_default_background_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#ccffcc';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the background color (HTML compatible) for the positive (default) message bar.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'message_default_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#004200';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the foreground color (HTML compatible) for the positive (default) message bar text.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'message_negative_background_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#ffcdcd';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the background color (HTML compatible) for the negative message bar.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'message_negative_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#670000';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the foreground color (HTML compatible) for the negative message bar text.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'message_alert_background_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#ffe585';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the background color (HTML compatible) for the alert message bar.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'message_alert_color';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '#d66721';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the foreground color (HTML compatible) for the alert message bar text.';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'message_opacity';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '0.9';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the opacity of the message bar (decimal).';
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'message_delay';
$array[$x]['default_setting_name'] = 'text';
$array[$x]['default_setting_value'] = '1.75';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set the hide delay of the message bar (seconds).';
//iterate and add each, if necessary
foreach ($array as $index => $default_settings) {
//add theme default settings
$sql = "select count(*) as num_rows from v_default_settings ";
$sql .= "where default_setting_category = 'theme' ";
$sql .= "and default_setting_subcategory = '".$default_settings['default_setting_subcategory']."' ";
$prep_statement = $db->prepare($sql);
if ($prep_statement) {
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
unset($prep_statement);
if ($row['num_rows'] == 0) {
$orm = new orm;
$orm->name('default_settings');
$orm->save($array[$index]);
$message = $orm->message;
//print_r($message);
}
unset($row);
}
}
//define secondary background color array
unset($array);
$x = 0;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'background_color';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = '#e7ebf1';
$array[$x]['default_setting_order'] = '1';
$array[$x]['default_setting_enabled'] = 'true';
$array[$x]['default_setting_description'] = 'Set a secondary background (HTML compatible) color, for a gradient effect.';
//add secondary background color separately, if missing
$sql = "select count(*) as num_rows from v_default_settings ";
$sql .= "where default_setting_category = 'theme' ";
$sql .= "and default_setting_subcategory = 'background_color' ";
$prep_statement = $db->prepare($sql);
if ($prep_statement) {
$prep_statement->execute();
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
unset($prep_statement);
if ($row['num_rows'] == 1) {
$orm = new orm;
$orm->name('default_settings');
$orm->save($array[0]);
$message = $orm->message;
//print_r($message);
}
unset($row);
}
//get the background images
$relative_path = PROJECT_PATH.'/themes/minimized/images/backgrounds';
$backgrounds = opendir($_SERVER["DOCUMENT_ROOT"].'/'.$relative_path);
$x = 0;
while (false !== ($file = readdir($backgrounds))) {
if ($file != "." AND $file != ".."){
$new_path = $dir.'/'.$file;
$level = explode('/',$new_path);
$ext = pathinfo($file, PATHINFO_EXTENSION);
if ($ext == "png" || $ext == "jpg" || $ext == "jpeg" || $ext == "gif") {
$x++;
$array[$x]['default_setting_category'] = 'theme';
$array[$x]['default_setting_subcategory'] = 'background_image';
$array[$x]['default_setting_name'] = 'array';
$array[$x]['default_setting_value'] = $relative_path.'/'.$file;
$array[$x]['default_setting_enabled'] = 'false';
$array[$x]['default_setting_description'] = 'Set a relative path or URL within a selected compatible template.';
}
if ($x > 300) { break; };
}
}
//get default settings
$sql = "select * from v_default_settings ";
$sql .= "where default_setting_category = 'theme' ";
$sql .= "and default_setting_subcategory = 'background_image' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$default_settings = $prep_statement->fetchAll(PDO::FETCH_NAMED);
unset($prep_statement);
//add theme default settings
foreach ($array as $row) {
$found = false;
foreach ($default_settings as $field) {
if ($field["default_setting_value"] == $row["default_setting_value"]) {
$found = true;
}
}
if (!$found) {
$orm = new orm;
$orm->name('default_settings');
$orm->save($row);
$message = $orm->message;
//print_r($message);
}
}
}
?>

View File

@@ -0,0 +1,41 @@
<?php
// Theme
$text['theme-label-logout']['en-us'] = "Logout";
$text['theme-label-logout']['es-cl'] = "Salir";
$text['theme-label-logout']['pt-pt'] = "Sair";
$text['theme-label-logout']['fr-fr'] = "Déconnexion";
$text['theme-confirm-logout']['en-us'] = "Do you really want to logout?";
$text['theme-confirm-logout']['es-cl'] = "¿Realmente desea cerrar la sesi?";
$text['theme-confirm-logout']['pt-pt'] = "Você realmente quer sair?";
$text['theme-confirm-logout']['fr-fr'] = "Voulez-vous vraiment vous déconnecter?";
$text['theme-label-open_selector']['en-us'] = "Domain Selector [ESC]";
$text['theme-label-open_selector']['es-cl'] = "Selector de Dominio Abierto";
$text['theme-label-open_selector']['pt-pt'] = "Seletor de Domínio Aberto";
$text['theme-label-open_selector']['fr-fr'] = "Sélecteur Domaine Ouvert";
$text['theme-title-domains']['en-us'] = "Domains";
$text['theme-title-domains']['es-cl'] = "Dominios";
$text['theme-title-domains']['pt-pt'] = "Domínios";
$text['theme-title-domains']['fr-fr'] = "Domaines";
$text['theme-button-close']['en-us'] = "Close";
$text['theme-button-close']['es-cl'] = "Cerca";
$text['theme-button-close']['pt-pt'] = "Perto";
$text['theme-button-close']['fr-fr'] = "Proche";
$text['theme-label-search']['en-us'] = "Search...";
$text['theme-label-search']['es-cl'] = "Buscar...";
$text['theme-label-search']['pt-pt'] = "Pesquisa...";
$text['theme-label-search']['fr-fr'] = "Recherche...";
$text['theme-label-search']['en-us'] = "Search...";
$text['theme-label-search']['es-cl'] = "Buscar...";
$text['theme-label-search']['pt-pt'] = "Pesquisa...";
$text['theme-label-search']['fr-fr'] = "Recherche...";
?>

View File

@@ -0,0 +1,9 @@
<?php
//define the link labels
$v_link_label_edit = "<img src='".PROJECT_PATH."/themes/enhanced/images/icon_edit.png' class='list_control_icon'>";
$v_link_label_add = "<img src='".PROJECT_PATH."/themes/enhanced/images/icon_add.png' class='list_control_icon'>";
$v_link_label_delete = "<img src='".PROJECT_PATH."/themes/enhanced/images/icon_delete.png' class='list_control_icon'>";
$v_link_label_view = "<img src='".PROJECT_PATH."/themes/enhanced/images/icon_view.png' class='list_control_icon'>";
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

View File

@@ -0,0 +1,9 @@
Background Images
Image: sand_sea.jpg
License: Public Domain
Source: http://www.publicdomainpictures.net/view-image.php?image=15812&picture=sand-texture-and-the-sea
Image: wave.jpg
License: Public Domain
Source: http://www.publicdomainpictures.net/view-image.php?image=2766&picture=breaking-wave

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

50
themes/minimized/root.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
// make sure the PATH_SEPARATOR is defined
if (!defined("PATH_SEPARATOR")) {
if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); }
}
// make sure the document_root is set
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]);
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
//echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."<br />\n";
//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\n";
// if the project directory exists then add it to the include path otherwise add the document root to the include path
if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
}
else {
if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
}
?>

File diff suppressed because it is too large Load Diff