Permalink
Browse files

add website settings permission to the usersetup

  • Loading branch information...
1 parent 1cfc3c3 commit b084430c2f19b8f7291335d27ad4d6a1c1ae3bea @frozeman committed Jul 25, 2012
View
@@ -718,7 +718,7 @@ ChangeLog:
build 334: changes in sidebartasklog layout
build 333: fixes with stylefilepath, when including an url
build 332: fixes in file manager & add new CKEditor build 5813
- build 331: changed .innerBlockListPages layout
+ build 331: changed .insetBlockListPages layout
build 330: add separate delete of length-of-stay statistics
build 329: small change on slide in arrows
build 328: add arrow over category pages menu in the left sidebar
View
@@ -342,7 +342,7 @@
<!-- ************************************************************************* -->
<!-- ** WINDOW BOX *********************************************************** -->
<div id="windowBox">
- <!-- <h1><?php echo $langFile['LOADING_TEXT_LOAD']; ?></h1> -->
+ <h1><?php echo $langFile['LOADING_TEXT_LOAD']; ?></h1>
<a href="#" class="close" onclick="closeWindowBox(false);return false;"></a>
<div id="windowRequestBox"></div>
</div>
@@ -40,6 +40,10 @@
// add a new user to the user array
$userConfig[$newId] = array('id' => $newId);
+
+ // default user settings
+ $userConfig[$newId]['permissions']['websiteSettings'] = true;
+
if(saveUserConfig($userConfig)) {
$messagePopUp .= '<div class="alert alert-success center">'.$langFile['USERSETUP_createUser_created'].'</div>';
saveActivityLog(25); // <- SAVE the task in a LOG FILE
@@ -1026,6 +1026,7 @@ function saveUserConfig($userConfig) {
$fileContent .= "\$userConfig[".$user."]['permissions']['frontendEditing'] = ".XssFilter::bool($configs['permissions']['frontendEditing'],true).";\n";
$fileContent .= "\$userConfig[".$user."]['permissions']['fileManager'] = ".XssFilter::bool($configs['permissions']['fileManager'],true).";\n";
+ $fileContent .= "\$userConfig[".$user."]['permissions']['websiteSettings'] = ".XssFilter::bool($configs['permissions']['websiteSettings'],true).";\n";
$fileContent .= "\$userConfig[".$user."]['permissions']['editWebsiteFiles'] = ".XssFilter::bool($configs['permissions']['editWebsiteFiles'],true).";\n";
$fileContent .= "\$userConfig[".$user."]['permissions']['editStyleSheets'] = ".XssFilter::bool($configs['permissions']['editStyleSheets'],true).";\n";
$fileContent .= "\$userConfig[".$user."]['permissions']['editSnippets'] = ".XssFilter::bool($configs['permissions']['editSnippets'],true).";\n\n";
@@ -318,55 +318,49 @@ function blockSlider(givenId) {
// BLOCK SLIDE IN/OUT
function inBlockSlider() {
- var count = 0;
- var slideLinks = [];
+ $$('.inBlockSlider').each(function(inBlockSlider) {
- // -> GO TROUGH every CATEGORY
- if($$('.block .inBlockSlider') !== null && $$('.block .inBlockSliderLink') !== null) {
+ var inBlockSliderLink;
+ $$('.inBlockSliderLink').each(function(sliderLink) {
+ if(sliderLink.getProperty('data-inBlockSlider') == inBlockSlider.getProperty('data-inBlockSlider')) {
+ inBlockSliderLink = sliderLink;
+ return;
+ }
+ });
- // -----------------------------------------
- // ADD SLIDE TO TABLEs inside a BLOCK
- $$('.block').each(function(block) {
+ if(typeOf(inBlockSliderLink) == 'null')
+ return;
- // gets the SLIDE links
- block.getElements('.inBlockSliderLink').each(function(insideBlockLinks) {
- slideLinks.push(insideBlockLinks);
- });
+ var slide = inBlockSlider.get('slide');
+ var wrapper = slide.wrapper;
- block.getElements('.inBlockSlider').each(function(insideBlock) {
-
- // ON COMPLETE
- // insideBlock.get('slide').addEvent('complete', function(el) {
- // // mootools creates an container around slideContent, so that it doesn't resize anymore automaticly, so i have to reset height auto for this container
- // if(this.open) {
- // this.wrapper.fade('show');
- // this.wrapper.setStyle('height','auto');
- // } else {
- // this.wrapper.fade('hide');
- // this.wrapper.setStyle('height',insideBlock.getChildren('tbody').getSize().y);
- // }
- // });
-
- // slides the hotky div in, on start
- if(insideBlock.hasClass('hidden')) {
- //hides the wrapper on start
- // insideBlock.setStyle('display','block');
- // insideBlock.slide('hide');
- // insideBlock.get('slide').wrapper.fade('hide');
- }
+ // transfer insetBlock class to the wrapper
+ if(inBlockSlider.hasClass('insetBlock')) {
+ inBlockSlider.removeClass('insetBlock');
+ wrapper.addClass('insetBlock');
+ wrapper.set('fade',{duration:'short'});
+ }
- // sets the SLIDE effect to the SLIDE links
- slideLinks[count].addEvent('click', function(e) {
- if(e.target.match('a')) e.stop();
- // insideBlock.get('slide').toggle();
- // insideBlock.get('slide').wrapper.fade('show');
- insideBlock.toggleClass('hidden');
- });
+ // slides the hotky div in, on start
+ if(inBlockSlider.hasClass('hidden')) {
+ // hides the wrapper on start
+ wrapper.fade('hide');
+ slide.hide();
+ }
- count++;
- });
+ // sets the SLIDE effect to the SLIDE links
+ inBlockSliderLink.addEvent('click', function(e) {
+ if(e.target.match('a')) e.stop();
+
+ if(inBlockSlider.hasClass('hidden'))
+ wrapper.fade(1);
+ else
+ wrapper.fade(0);
+
+ inBlockSlider.toggleClass('hidden');
+ slide.toggle();
});
- }
+ });
}
/* pageChangedSign function
@@ -471,6 +465,7 @@ function requestLeftSidebar(site,page,category) {
// vars
if(!page) page = 0;
if(!category) category = 0;
+ var leftSideBar = $('leftSidebar');
var jsLoadingCircleContainer = new Element('div', {'class':'leftSidebarLoadingCircle'});
var removeLoadingCircle;
@@ -480,30 +475,28 @@ function requestLeftSidebar(site,page,category) {
url:'library/leftSidebar.loader.php',
method: 'get',
data: 'site=' + site + '&category=' + category + '&page=' + page,
- update: $('leftSidebar'),
+ update: leftSideBar,
//-----------------------------------------------------------------------------
onRequest: function() { //-----------------------------------------------------
// -> TWEEN leftSidebar
- $('leftSidebar').set('tween',{duration: 150});
- $('leftSidebar').tween('left','-200px');
- //$('leftSidebar').tween('opacity',0);
+ leftSideBar.set('tween',{duration: 150});
+ leftSideBar.tween('left',-200);
// -> ADD the LOADING CIRCLE
- $('leftSidebar').grab(jsLoadingCircleContainer,'before');
+ leftSideBar.grab(jsLoadingCircleContainer,'before');
removeLoadingCircle = feindura_loadingCircle(jsLoadingCircleContainer, 25, 40, 12, 4, "#999");
},
//-----------------------------------------------------------------------------
onSuccess: function(html) { //-------------------------------------------------
// -> TWEEN leftSidebar
- $('leftSidebar').set('tween',{duration: 300});
- $('leftSidebar').tween('left','0px');
- //$('leftSidebar').tween('opacity',1);
+ leftSideBar.set('tween',{duration: 300});
+ leftSideBar.tween('left',0);
- $('leftSidebar').get('tween').chain(function(){
+ leftSideBar.get('tween').chain(function(){
// -> REMOVE the LOADING CIRCLE
jsLoadingCircleContainer.destroy();
removeLoadingCircle();
@@ -522,9 +515,7 @@ function requestLeftSidebar(site,page,category) {
//Our request will most likely succeed, but just in case, we'll add an
//onFailure method which will let the user know what happened.
onFailure: function() { //-----------------------------------------------------
- var failureText = new Element('p');
- failureText.set('text','Couldn\'t load the sidebar?');
- $('leftSidebar').set('html',failureText);
+ leftSideBar.set('html','<div class="alert alert-error">Couldn\'t load the sidebar?</div>');
}
});
@@ -610,7 +601,7 @@ window.addEvent('domready', function() {
(function(){
$('messagePopUp').tween('top',-$('messagePopUp').getSize().y);
$('messagePopUp').get('tween').chain(function(){
- alert.setStyle('display','none');
+ $('messagePopUp').setStyle('display','none');
});
}).delay(3000);
}
@@ -648,7 +639,7 @@ window.addEvent('domready', function() {
if($('sidebarTaskLog') !== null) {
// vars
- var minHeight = 200;
+ var minHeight = 140;
var maxHeight = 450;
var myScroller = new Scroller('sidebarTaskLog', {area: 150, velocity: 0.1});
@@ -79,6 +79,9 @@
$langFile['HEADER_BUTTON_GOTOWEBSITE_FRONTENDEDITING'] = 'Frontend-Bearbeitung::Klick hier um die Seiten direkt in der Webseite zu bearbeiten.';
+// PERMISSIONS
+$langFile['PERMISSIONS_TEXT_DONTHAVEPERMISSION'] = 'Du bist nicht berechtigt dies zu verändern.';
+
// THUMBNAILS
$langFile['THUMBNAIL_TEXT_UNIT'] = 'Pixel';
@@ -210,6 +213,7 @@
$langFile['LOGO_TEXT'] = 'Version';
$langFile['LOADING_TEXT_LOAD'] = 'Seite wird geladen..';
+
// CKEDITOR transport
$langFile['CKEDITOR_TITLE_LINKS'] = 'feindura Seiten';
$langFile['CKEDITOR_TITLE_SNIPPETS'] = 'Codeschnipsel';
@@ -658,6 +662,7 @@
// ---------- USER PERMISSION
$langFile['USERSETUP_USERPERMISSIONS_TITLE'] = 'Benutzerrechte';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_ACTIVATEWEBSITESETTINGS'] = 'Webseiten-Einstellungen bearbeiten';
$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITWEBSITEFILES'] = 'Webseitendateien in den <a href="index.php?site=websiteSetup">Webseiten-Einstellungen</a> bearbeiten';
$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITSTYLESHEETS'] = 'Stylesheetdateien in den <a href="index.php?site=websiteSetup">Webseiten-Einstellungen</a> bearbeiten';
$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITSNIPPETS'] = 'Codeschnipsel in den <a href="index.php?site=websiteSetup">Webseiten-Einstellungen</a> bearbeiten';
@@ -668,7 +673,9 @@
$langFile['USERSETUP_USERPERMISSIONS_TIP_USERINFORMATION'] = 'Benutzerinformationen::Dieser Text wird auf der [span class=feinduraInline]fein[em]dura[/em][/span] '.$langFile['BUTTON_DASHBOARD'].' angezeigt.';
$langFile['USERSETUP_USERPERMISSIONS_TIP_USERINFORMATION_NOINFO'] = 'Wenn Du keine Informationen für den Benutzer anzeigen möchtest lasse das Feld leer';
-$langFile['USERSETUP_USERPERMISSIONS_TITLE_EDITABLECATEGORIES-PAGES'] = 'Wähle Kategorien und Seiten aus die der Benutzer bearbeiten kann';
+$langFile['USERSETUP_USERPERMISSIONS_TITLE_EDITABLECATEGORIES-PAGES'] = 'Wähle Kategorien und Seiten aus die der Benutzer bearbeiten kann<br>(Wenn nichts ausgewählt wurde kann alles bearbeitet werden)';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_CLEARSELECTION'] = 'Auswahl löschen';
+
/*
* editor.php
@@ -721,7 +728,7 @@
// ---------- page advanced settings
-$langFile['EDITOR_advancedpageSettings_h1'] = 'Erweiterte Einstellungen';
+$langFile['EDITOR_advancedpageSettings_h1'] = 'Seitenspezifische HTML-Editor-Einstellungen';
$langFile['EDITOR_advancedpageSettings_field1'] = 'Seiten Stylesheet-Datei';
$langFile['EDITOR_advancedpageSettings_stylesheet_ifempty'] = 'Wenn alle Felder leer sind, dann werden zuerst die Stylesheet-Einstellungen der Kategorie verwendet, wenn diese auch leer sind dann die aus den HTML-Editor-Einstellungen.';
@@ -79,6 +79,9 @@
$langFile['HEADER_BUTTON_GOTOWEBSITE_FRONTENDEDITING'] = 'Frontend Editing::Click here to edit the pages directly in your website.';
+// PERMISSIONS
+$langFile['PERMISSIONS_TEXT_DONTHAVEPERMISSION'] = 'You are not authorized to change this.';
+
// THUMBNAILS
$langFile['THUMBNAIL_TEXT_UNIT'] = 'pixel';
@@ -660,9 +663,10 @@
// ---------- USER PERMISSION
$langFile['USERSETUP_USERPERMISSIONS_TITLE'] = 'User permissions';
-$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITWEBSITEFILES'] = 'Edit website files in the <a href="index.php?site=websiteSetup">website-settings</a>';
-$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITSTYLESHEETS'] = 'Edit stylesheet files in the <a href="index.php?site=websiteSetup">website-settings</a>';
-$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITSNIPPETS'] = 'Edit code snippets in the <a href="index.php?site=websiteSetup">website-settings</a>';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_ACTIVATEWEBSITESETTINGS'] = 'Edit Website-Settings';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITWEBSITEFILES'] = 'Edit website files in the <a href="index.php?site=websiteSetup">Website-Settings</a>';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITSTYLESHEETS'] = 'Edit stylesheet files in the <a href="index.php?site=websiteSetup">Website-Settings</a>';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITSNIPPETS'] = 'Edit code snippets in the <a href="index.php?site=websiteSetup">Website-Settings</a>';
$langFile['USERSETUP_USERPERMISSIONS_TEXT_FILEMANAGER'] = 'Activate file manager';
$langFile['USERSETUP_USERPERMISSIONS_TIP_FILEMANAGER'] = 'File manager deactivated::You must set the upload path in the basic-settings, before you can activate the file manager.';
$langFile['USERSETUP_USERPERMISSIONS_TEXT_FRONTENDEDITING'] = 'Activate frontend editing';
@@ -671,8 +675,8 @@
$langFile['USERSETUP_USERPERMISSIONS_TIP_USERINFORMATION'] = 'User Information::This text will be shown in the '.$langFile['BUTTON_DASHBOARD'].' page of [span class=feinduraInline]fein[em]dura[/em][/span].';
$langFile['USERSETUP_USERPERMISSIONS_TIP_USERINFORMATION_NOINFO'] = 'If you don&#145;t want to display an information for the user, leave this field empty';
-$langFile['USERSETUP_USERPERMISSIONS_TITLE_EDITABLECATEGORIES-PAGES'] = 'Select Categories and Pages which the user should be able to edit';
-
+$langFile['USERSETUP_USERPERMISSIONS_TITLE_EDITABLECATEGORIES-PAGES'] = 'Select Categories and Pages which the user should be able to edit<br>(If nothing is selected, everything can be edited)';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_CLEARSELECTION'] = 'Clear selection';
/*
* editor.php
@@ -725,7 +729,7 @@
// ---------- page advanced settings
-$langFile['EDITOR_advancedpageSettings_h1'] = 'Advanced Settings';
+$langFile['EDITOR_advancedpageSettings_h1'] = 'Page specific HTML-Editor-Settings';
$langFile['EDITOR_advancedpageSettings_field1'] = 'Page stylesheet-file';
$langFile['EDITOR_advancedpageSettings_stylesheet_ifempty'] = 'If the fields are empty, then the Stylesheet-Settings of the category will be used and if they are also empty then the one from the HTML-Editor-Settings.';
@@ -79,6 +79,9 @@
$langFile['HEADER_BUTTON_GOTOWEBSITE_FRONTENDEDITING'] = 'Feindura::S&#145;il vous plaît cliquez ici pour éditer les pages directement sur votre site web.';
+// PERMISSIONS
+$langFile['PERMISSIONS_TEXT_DONTHAVEPERMISSION'] = 'Vous n&#145;êtes pas autorisé à changer cette situation.';
+
// THUMBNAILS
$langFile['THUMBNAIL_TEXT_UNIT'] = 'pixel';
$langFile['THUMBNAIL_TEXT_NAME'] = 'miniature de la page';
@@ -626,6 +629,7 @@
// ---------- USER PERMISSION
$langFile['USERSETUP_USERPERMISSIONS_TITLE'] = 'permissions de l&#145;utilisateur';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_ACTIVATEWEBSITESETTINGS'] = 'modifier paramètres du site web';
$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITWEBSITEFILES'] = 'modifier les fichiers du site web au sein du <a href="index.php?site=websiteSetup">paramétrage du site web</a>';
$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITSTYLESHEETS'] = 'modifier les fichiers de style au sein du <a href="index.php?site=websiteSetup">paramétrage du site web</a>';
$langFile['USERSETUP_USERPERMISSIONS_TEXT_EDITSNIPPETS'] = 'modifier fragments de code au sein du <a href="index.php?site=websiteSetup">paramétrage du site web</a>';
@@ -637,8 +641,8 @@
$langFile['USERSETUP_USERPERMISSIONS_TIP_USERINFORMATION'] = 'Information utilisateur::Ce texte va être publié sur [span class=feinduraInline]fein[em]dura[/em][/span] '.$langFile['BUTTON_DASHBOARD'].'.';
$langFile['USERSETUP_USERPERMISSIONS_TIP_USERINFORMATION_NOINFO'] = 'N&#145;ecrivez rien dans la case, si vous ne voulez pas montrer des informations sur l&#145;utilisateur';
-$langFile['USERSETUP_USERPERMISSIONS_TITLE_EDITABLECATEGORIES-PAGES'] = 'Sélectionnez Catégories et Pages que l&#145;utilisateur devrait être capable d&#145;éditer';
-
+$langFile['USERSETUP_USERPERMISSIONS_TITLE_EDITABLECATEGORIES-PAGES'] = 'Sélectionnez Catégories et Pages que l&#145;utilisateur devrait être capable d&#145;éditer. (Si rien n&#145;est sélectionné, tout peut être modifié)';
+$langFile['USERSETUP_USERPERMISSIONS_TEXT_CLEARSELECTION'] = 'Effacer la sélection';
/*
* editor.php
@@ -688,7 +692,7 @@
$langFile['EDITOR_TIP_SUBCATEGORY'] = 'Permet de créer un sous-menu pour cette page sur le site.';
// ---------- page advanced settings
-$langFile['EDITOR_advancedpageSettings_h1'] = 'paramètres avancés';
+$langFile['EDITOR_advancedpageSettings_h1'] = 'paramètres spécifique de la page de l&#145;éditor HTML';
$langFile['EDITOR_advancedpageSettings_field1'] = 'page fichier feuille de style';
$langFile['EDITOR_advancedpageSettings_stylesheet_ifempty'] = 'Quand toutes les cases sont vides, les paramètres des feuilles de style de la catégorie seront utilisés. Si ceux-ci sont vides aussi, les paramètres de l&#145;éditeur HTML seront utlisés.';
$langFile['EDITOR_htmleditor_hotkeys_h1'] = 'touches-clés';
Oops, something went wrong.

0 comments on commit b084430

Please sign in to comment.