Permalink
Browse files

work in progress

  • Loading branch information...
1 parent 1de9e61 commit 98c576bd7fa18d9aa8261b27239985e0f0055a52 @frozeman committed Jul 13, 2012
Showing with 1,033 additions and 848 deletions.
  1. +1 −1 CHANGELOG
  2. +5 −5 index.php
  3. +4 −4 library/content.loader.php
  4. +21 −8 library/functions/backend.functions.php
  5. BIN library/images/bg/content_block_verticalSeparator.png
  6. BIN library/images/buttons/{listPages_pageThumbnailDelete.png → listPages_deletePageThumbnail.png}
  7. BIN library/images/buttons/{listPages_pageThumbnailUpload.png → listPages_uploadPageThumbnail.png}
  8. BIN library/images/icons/thumbnailIcon_middle.png
  9. +3 −3 library/includes/editor.include.php
  10. +8 −1 library/includes/login.include.php
  11. +8 −8 library/includes/secure.include.php
  12. +1 −1 library/javascripts/content.js
  13. +4 −4 library/javascripts/windowBox.js
  14. +2 −2 library/languages/de.backend.php
  15. +2 −2 library/languages/en.backend.php
  16. +2 −2 library/languages/fr.backend.php
  17. +2 −2 library/languages/it.backend.php
  18. +2 −2 library/languages/ru.backend.php
  19. +16 −41 library/leftSidebar.loader.php
  20. +0 −239 library/styles/content.css
  21. +4 −4 library/styles/frontendEditing.css
  22. +18 −18 library/styles/less/contentBlocks.less
  23. +87 −12 library/styles/less/general.less
  24. +41 −10 library/styles/less/layout.less
  25. +8 −3 library/styles/less/page_editor.less
  26. +4 −4 library/styles/less/page_listPages.less
  27. +12 −6 library/styles/less/styles.less
  28. +10 −4 library/styles/less/thirdpartyFixes.less
  29. +96 −0 library/styles/less/windowBox.less
  30. +0 −1 library/styles/reset.css
  31. +598 −288 library/styles/styles.css
  32. +9 −117 library/styles/windowBox.css
  33. +4 −6 library/views/adminSetup.php
  34. +2 −2 library/views/listPages.php
  35. +1 −1 library/views/pageSetup.php
  36. +1 −1 library/views/userSetup.php
  37. +15 −10 library/views/websiteSetup.php
  38. +1 −1 library/views/windowBox/addPageLanguage.php
  39. +2 −2 library/views/windowBox/clearStatistics.php
  40. +2 −2 library/views/windowBox/deleteBackup.php
  41. +2 −2 library/views/windowBox/deleteCategory.php
  42. +2 −2 library/views/windowBox/deleteEditFiles.php
  43. +1 −1 library/views/windowBox/deletePage.php
  44. +1 −1 library/views/windowBox/deletePageLanguage.php
  45. +18 −18 library/views/windowBox/{pageThumbnailDelete.php → deletePageThumbnail.php}
  46. +2 −2 library/views/windowBox/deleteWebsiteLanguages.php
  47. +2 −2 library/views/windowBox/unsavedPage.php
  48. +2 −2 library/views/windowBox/{pageThumbnailUpload.php → uploadPageThumbnail.php}
  49. +0 −1 library/views/windowBox/userPermissions.php
  50. +7 −0 update.php
View
@@ -932,7 +932,7 @@ ChangeLog:
build 125: toolTips.js: removed arrow like corner of the toolTip an repositioned the toolTip box
build 124: editor.php: add category selection at creating a page
build 123: editor.php: fixed thumbnail resize bug (small thumbnail were resized to 200px)
- build 122: pageThumbnailUpload.php: fixed thumbsize none ratio bug
+ build 122: uploadPageThumbnail.php: fixed thumbsize none ratio bug
build 121: fixed error text issue, now returns false if showError == false; title renamed in showTitle; content renamed in showContent; error renamed in showError
build 120: changed text and var: sprachdateien in websitefiles
build 119: removed toolTip from editor.php show max/min time visit
View
@@ -74,7 +74,7 @@
<!-- feindura styles -->
<!-- <link rel="stylesheet" type="text/css" href="library/styles/reset.css<?php echo '?v='.BUILD; ?>"> -->
<!-- <link rel="stylesheet" type="text/css" href="library/styles/layout.css<?php echo '?v='.BUILD; ?>"> -->
- <link rel="stylesheet" type="text/css" href="library/styles/content.css<?php echo '?v='.BUILD; ?>">
+ <!-- <link rel="stylesheet" type="text/css" href="library/styles/content.css<?php echo '?v='.BUILD; ?>"> -->
<link rel="stylesheet" type="text/css" href="library/styles/windowBox.css<?php echo '?v='.BUILD; ?>">
<link rel="stylesheet" type="text/css" href="library/styles/shared.css<?php echo '?v='.BUILD; ?>">
@@ -409,13 +409,13 @@
// ->CHECK frontend editing
$showFrontendEditing = ($isInPageEditor && $adminConfig['user']['frontendEditing']) ? true : false;
- // -> CHECK for pageThumbnailUpload
+ // -> CHECK for uploadPageThumbnail
$showPageThumbnailUpload = (!$newPage &&
empty($_GET['site']) && !empty($_GET['page']) &&
$categoryConfig[$_GET['category']]['thumbnails']) ? true : false;
- // -> CHECK for pageThumbnailDelete
+ // -> CHECK for deletePageThumbnail
$showPageThumbnailDelete = (empty($_GET['site']) && !empty($pageContent['thumbnail'])) ? true : false;
// -> CHECK if show SUBMENU
@@ -515,11 +515,11 @@
if($showSpacer) { ?>
<li class="spacer"></li>
<?php } ?>
- <li><a <?php echo 'href="?site=pageThumbnailUpload&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" onclick="openWindowBox(\'library/views/windowBox/pageThumbnailUpload.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_UPLOAD'].'\');return false;" title="'.$langFile['BUTTON_THUMBNAIL_UPLOAD'].'::'.$langFile['BUTTON_TOOLTIP_THUMBNAIL_UPLOAD'].'"'; ?> tabindex="33" class="pageThumbnailUpload toolTip"></a></li>
+ <li><a <?php echo 'href="?site=uploadPageThumbnail&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" onclick="openWindowBox(\'library/views/windowBox/uploadPageThumbnail.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_UPLOAD'].'\');return false;" title="'.$langFile['BUTTON_THUMBNAIL_UPLOAD'].'::'.$langFile['BUTTON_TOOLTIP_THUMBNAIL_UPLOAD'].'"'; ?> tabindex="33" class="uploadPageThumbnail toolTip"></a></li>
<?php
// PAGETHUMBNAILDELETE
if($showPageThumbnailDelete) { ?>
- <li><a <?php echo 'href="?site=pageThumbnailDelete&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" onclick="openWindowBox(\'library/views/windowBox/pageThumbnailDelete.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_DELETE'].'\');return false;" title="'.$langFile['BUTTON_THUMBNAIL_DELETE'].'::'.$langFile['BUTTON_TOOLTIP_THUMBNAIL_DELETE'].'"'; ?> tabindex="34" class="pageThumbnailDelete toolTip"></a></li>
+ <li><a <?php echo 'href="?site=deletePageThumbnail&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" onclick="openWindowBox(\'library/views/windowBox/deletePageThumbnail.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_DELETE'].'\');return false;" title="'.$langFile['BUTTON_THUMBNAIL_DELETE'].'::'.$langFile['BUTTON_TOOLTIP_THUMBNAIL_DELETE'].'"'; ?> tabindex="34" class="deletePageThumbnail toolTip"></a></li>
<?php }
$showSpacer = true;
}
@@ -114,12 +114,12 @@
include (dirname(__FILE__).'/views/windowBox/deletePage.php');
break;
// PAGE THUMBNAIL UPLOAD
- case 'pageThumbnailUpload':
- include (dirname(__FILE__).'/views/windowBox/pageThumbnailUpload.php');
+ case 'uploadPageThumbnail':
+ include (dirname(__FILE__).'/views/windowBox/uploadPageThumbnail.php');
break;
// PAGE THUMBNAIL DELETE
- case 'pageThumbnailDelete':
- include (dirname(__FILE__).'/views/windowBox/pageThumbnailDelete.php');
+ case 'deletePageThumbnail':
+ include (dirname(__FILE__).'/views/windowBox/deletePageThumbnail.php');
break;
// ADD PAGE LANGUAGE
// case 'addPageLanguage':
@@ -104,6 +104,11 @@ function isAdmin() {
// var
$otherUsers = false;
+ // if no user exist, make the logged in one an admin
+ if(USERID === false)
+ return true;
+
+ // check the users
if(!empty($GLOBALS['userConfig'])) {
$user = $_SESSION['feinduraSession']['login']['user'];
@@ -152,9 +157,9 @@ function isBlocked($returnBool = false) {
$cachedUser['edit'] &&
$location != 'new' && // dont block when createing a new page (multiple user can do that)
($location == $_GET['page'] || $location == $_GET['site'])) {
- $return = ($returnBool) ? true : '<div id="contentBlocked"><br><br><br><br><br><br>'.$GLOBALS['langFile']['GENERAL_TEXT_CURRENTLYEDITED'];
+ $return = ($returnBool) ? true : '<div id="contentBlocked"><div>'.$GLOBALS['langFile']['GENERAL_TEXT_CURRENTLYEDITED'];
if(!empty($cachedUser['username'])) $return .= '<br><span style="font-size:15px;">'.$GLOBALS['langFile']['DASHBOARD_TITLE_USER'].': <span class="blue">'.$cachedUser['username'].'</span></span>';
- $return .= '</div>';
+ $return .= '</div></div>';
return $return;
}
}
@@ -2214,6 +2219,9 @@ function formatHighNumber($number,$decimalsNumber = 0) {
*/
function editFiles($filesPath, $status, $titleText, $anchorName, $fileType = false, $excluded = false) {
+ if(empty($filesPath))
+ return;
+
// var
$fileTypeText = '';
$fileType = str_replace('.', '', $fileType); // remove . from the given extension
@@ -2390,13 +2398,18 @@ function editFiles($filesPath, $status, $titleText, $anchorName, $fileType = fal
echo '<textarea name="fileContent" cols="90" rows="30" spellcheck="false" class="editFiles '.substr($filesPath.$editFile, strrpos($filesPath.$editFile, '.') + 1).'" id="editFiles'.uniqid().'">'.$file.'</textarea>';
}
-
+ // SAVE/DELETE BUTTONS
if($isDir) {
- if($isFiles)
- echo '<a href="?site='.$_GET['site'].'&amp;status=deleteEditFiles&amp;editFilesStatus='.$status.'&amp;file='.$editFile.'#'.$anchorName.'" onclick="openWindowBox(\'library/views/windowBox/deleteEditFiles.php?site='.$_GET['site'].'&amp;status=deleteEditFiles&amp;editFilesStatus='.$status.'&amp;file='.$editFile.'&amp;anchorName='.$anchorName.'\',\''.$GLOBALS['langFile']['EDITFILESSETTINGS_TEXT_DELETEFILE'].'\');return false;" class="cancel left toolTip" title="'.$GLOBALS['langFile']['EDITFILESSETTINGS_TEXT_DELETEFILE'].'::" style="float:left;"></a>';
- else
- echo '<br><br><br><br>';
- echo '<br><br><input type="submit" value="" name="saveEditedFiles" class="button submit right" title="'.$GLOBALS['langFile']['FORM_BUTTON_SUBMIT'].'">';
+ echo '<div class="spacer"></div>';
+ echo '<div class="row">';
+ echo '<div class="span4 center">';
+ if($isFiles)
+ echo '<a href="?site='.$_GET['site'].'&amp;status=deleteEditFiles&amp;editFilesStatus='.$status.'&amp;file='.$editFile.'#'.$anchorName.'" onclick="openWindowBox(\'library/views/windowBox/deleteEditFiles.php?site='.$_GET['site'].'&amp;status=deleteEditFiles&amp;editFilesStatus='.$status.'&amp;file='.$editFile.'&amp;anchorName='.$anchorName.'\',\''.$GLOBALS['langFile']['EDITFILESSETTINGS_TEXT_DELETEFILE'].'\');return false;" class="button cancel toolTip" title="'.$GLOBALS['langFile']['EDITFILESSETTINGS_TEXT_DELETEFILE'].'::"></a>';
+ echo '</div>';
+ echo '<div class="span4 center">';
+ echo '<input type="submit" value="" name="saveEditedFiles" class="button submit right" title="'.$GLOBALS['langFile']['FORM_BUTTON_SUBMIT'].'">';
+ echo '</div>';
+ echo '</div>';
}
echo '</div>
</div>
Deleted file not rendered
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -231,8 +231,8 @@
// see if the thumbnails are activated, add upload/delete buttons
if($categoryConfig[$pageContent['category']]['thumbnails']) {
- echo '<a href="?site=pageThumbnailDelete&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" onclick="openWindowBox(\'library/views/windowBox/pageThumbnailDelete.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_DELETE'].'\');return false;" title="'.$langFile['BUTTON_TOOLTIP_THUMBNAIL_DELETE'].'::"" class="deleteIcon toolTip"></a>';
- echo '<a href="?site=pageThumbnailUpload&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" onclick="openWindowBox(\'library/views/windowBox/pageThumbnailUpload.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_UPLOAD'].'\');return false;" class="image">';
+ echo '<a href="?site=deletePageThumbnail&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" onclick="openWindowBox(\'library/views/windowBox/deletePageThumbnail.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_DELETE'].'\');return false;" title="'.$langFile['BUTTON_TOOLTIP_THUMBNAIL_DELETE'].'::"" class="deleteIcon toolTip"></a>';
+ echo '<a href="?site=uploadPageThumbnail&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" onclick="openWindowBox(\'library/views/windowBox/uploadPageThumbnail.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_UPLOAD'].'\');return false;" class="image">';
echo '<img src="'.$thumbnailPath.'" id="thumbnailPreviewImage" class="thumbnailPreview"'.$thumbnailWidthStyle.' data-width="'.$thumbnailWidth.'" alt="thumbnail">';
echo '</a>';
// if not only show the thumbnailPreviewImage
@@ -247,7 +247,7 @@
? '' : ' style="display:none;"';
// thumbnailUploadButtonInPreviewArea
- echo '<a href="?site=pageThumbnailUpload&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" id="thumbnailUploadButtonInPreviewArea" onclick="openWindowBox(\'library/views/windowBox/pageThumbnailUpload.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_UPLOAD'].'\');return false;" title="'.$langFile['BUTTON_TOOLTIP_THUMBNAIL_UPLOAD'].'::" class="pageThumbnailUpload toolTip"'.$displayThumbnailUploadButton.'></a>';
+ echo '<a href="?site=uploadPageThumbnail&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'" id="thumbnailUploadButtonInPreviewArea" onclick="openWindowBox(\'library/views/windowBox/uploadPageThumbnail.php?site='.$_GET['site'].'&amp;category='.$_GET['category'].'&amp;page='.$_GET['page'].'\',\''.$langFile['BUTTON_THUMBNAIL_UPLOAD'].'\');return false;" title="'.$langFile['BUTTON_TOOLTIP_THUMBNAIL_UPLOAD'].'::" class="uploadPageThumbnail toolTip"'.$displayThumbnailUploadButton.'></a>';
?>
@@ -127,7 +127,14 @@
// *****************************************************
if($_SESSION['feinduraSession']['login']['loggedIn'] === true &&
$_SESSION['feinduraSession']['login']['host'] === HOST) {
- // does nothing :-)
+
+
+ // ->> USERID
+ /**
+ * The ID of the current user
+ */
+ define('USERID',$_SESSION['feinduraSession']['login']['user']);
+
// ->> SHOW LOGIN FORM
} else {
@@ -2,24 +2,24 @@
/**
* feindura - Flat File Content Management System
* Copyright (C) Fabian Vogelsteller [frozeman.de]
- *
+ *
* 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 3 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/>.
- *
+ *
* includes/secure.include.php
- *
- * This file will be included to run the login.include.php and check untrusted data before executing the script.
- *
+ *
+ * This file will be included to run the login.include.php and check untrusted data before executing the script.
+ *
* @version 0.2
- *
+ *
*/
@@ -1624,7 +1624,7 @@ window.addEvent('domready', function() {
$$('.cke_toolbox_collapser').setStyles({
'position':'absolute',
'right': 25,
- 'top': 17
+ 'top': 8
});
var editorTweenTimeout;
@@ -27,7 +27,7 @@ function openWindowBox(site,siteTitle) {
if(site) {
// place window in the useres sight
- $('windowBox').setStyle('top',window.getScroll().y + 150);
+ $('windowBox').setStyle('top',window.getScroll().y + 100);
loadingText = $$('#windowBox > h1').get('html');
@@ -236,7 +236,7 @@ function finishThumbnailUpload(frameHeight,newImage,ImageWidth) {
refreshThumbnailImage(newImage,ImageWidth);
// hides the from and the thumbInfo
- $('pageThumbnailUploadForm').setStyle('display','none');
+ $('uploadPageThumbnailForm').setStyle('display','none');
$('thumbInfo').setStyle('display','none');
}
@@ -256,8 +256,8 @@ window.addEvent('domready', function() {
// run the script if the windowBox is loaded with content
$('windowBox').addEvent('loaded',function(windowContent) {
- // checks if the pageThumbnailUpload site is opend
- if($('pageThumbnailUploadForm') !== null) {
+ // checks if the uploadPageThumbnail site is opend
+ if($('uploadPageThumbnailForm') !== null) {
// hides the iframe on startup
$('uploadTargetFrame').setStyle('width','0px');
$('uploadTargetFrame').setStyle('height','0px');
@@ -788,7 +788,7 @@
/*
-* pageThumbnailDelete.php
+* deletePageThumbnail.php
*/
// ---------- PAGE THUMBNAIL DELETE
@@ -798,7 +798,7 @@
/*
-* pageThumbnailUpload.php
+* uploadPageThumbnail.php
*/
// ---------- PAGE THUMBNAIL UPLOAD
@@ -791,7 +791,7 @@
/*
-* pageThumbnailDelete.php
+* deletePageThumbnail.php
*/
// ---------- PAGE THUMBNAIL DELETE
@@ -801,7 +801,7 @@
/*
-* pageThumbnailUpload.php
+* uploadPageThumbnail.php
*/
// ---------- PAGE THUMBNAIL UPLOAD
@@ -750,7 +750,7 @@
/*
-* pageThumbnailDelete.php
+* deletePageThumbnail.php
*/
// ---------- PAGE THUMBNAIL DELETE
@@ -759,7 +759,7 @@
$langFile['PAGETHUMBNAIL_ERROR_DELETE'] = 'ERREUR: Le thumbnail ne pouvait pas être éffacée!';
/*
-* pageThumbnailUpload.php
+* uploadPageThumbnail.php
*/
// ---------- PAGE THUMBNAIL UPLOAD
@@ -791,7 +791,7 @@
/*
-* pageThumbnailDelete.php
+* deletePageThumbnail.php
*/
// ---------- PAGE THUMBNAIL DELETE
@@ -801,7 +801,7 @@
/*
-* pageThumbnailUpload.php
+* uploadPageThumbnail.php
*/
// ---------- PAGE THUMBNAIL UPLOAD
@@ -796,7 +796,7 @@
/*
-* pageThumbnailDelete.php
+* deletePageThumbnail.php
*/
// ---------- PAGE THUMBNAIL DELETE
@@ -806,7 +806,7 @@
/*
-* pageThumbnailUpload.php
+* uploadPageThumbnail.php
*/
// ---------- PAGE THUMBNAIL UPLOAD
Oops, something went wrong.

0 comments on commit 98c576b

Please sign in to comment.