openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 692fb2c740f0f369ab90ee269253b5f661779d7e
parent 6d134ae08fdfaaee988c735fed3cf59c595b7f10
Author: Jan Dankert <devnull@localhost>
Date:   Sat, 27 Oct 2018 23:23:58 +0200

Neu: Aufruf von einzelnen Methoden per Hotkeys.

Diffstat:
modules/cms-ui/action/IndexAction.class.php | 1+
modules/cms-ui/themes/default/html/views/title/show.php | 12++++++++++++
modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml | 6++++++
modules/cms-ui/themes/default/script/jquery.hotkeys.js | 204+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
modules/cms-ui/themes/default/script/jquery.hotkeys.min.js | 3+++
modules/cms-ui/themes/default/script/openrat.js | 14++++++++++++++
modules/cms-ui/themes/default/script/openrat.min.js | 20++++++++++----------
modules/cms-ui/themes/default/style/openrat-workbench.css | 10++++++++--
modules/cms-ui/themes/default/style/openrat-workbench.less | 7+++++++
modules/cms-ui/themes/default/style/openrat-workbench.min.css | 4++--
modules/configuration/Configuration.class.php | 12+++++++++---
modules/util/config-default.php | 12++++++++++++
12 files changed, 288 insertions(+), 17 deletions(-)

diff --git a/modules/cms-ui/action/IndexAction.class.php b/modules/cms-ui/action/IndexAction.class.php @@ -398,6 +398,7 @@ class IndexAction extends Action $js[] = OR_THEMES_DIR . 'default/script/plugin/jquery-plugin-orLoadView'; $js[] = OR_THEMES_DIR . 'default/script/plugin/jquery-plugin-orAutoheight'; $js[] = OR_THEMES_DIR . 'default/script/jquery-qrcode'; + $js[] = OR_THEMES_DIR . 'default/script/jquery.hotkeys'; // Inlining of SVG $js[] = OR_THEMES_DIR . 'default/script/svg-injector'; diff --git a/modules/cms-ui/themes/default/html/views/title/show.php b/modules/cms-ui/themes/default/html/views/title/show.php @@ -57,6 +57,8 @@ <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_new'.'')))); ?></span> + <span class="keystroke"><?php echo nl2br(encodeHtml(htmlentities(config('ui','keybinding','method','add')))); ?></span> + </a> </div> @@ -183,6 +185,8 @@ <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_prop'.'')))); ?></span> + <span class="keystroke"><?php echo nl2br(encodeHtml(htmlentities(config('ui','keybinding','method','prop')))); ?></span> + </a> </div> @@ -201,6 +205,8 @@ <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_pub'.'')))); ?></span> + <span class="keystroke"><?php echo nl2br(encodeHtml(htmlentities(config('ui','keybinding','method','pub')))); ?></span> + </a> </div> @@ -210,6 +216,8 @@ <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_archive'.'')))); ?></span> + <span class="keystroke"><?php echo nl2br(encodeHtml(htmlentities(config('ui','keybinding','method','archive')))); ?></span> + </a> </div> @@ -219,6 +227,8 @@ <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_rights'.'')))); ?></span> + <span class="keystroke"><?php echo nl2br(encodeHtml(htmlentities(config('ui','keybinding','method','rights')))); ?></span> + </a> </div> @@ -395,6 +405,8 @@ <span class="text"><?php echo nl2br(encodeHtml(htmlentities(lang(''.'menu_profile'.'')))); ?></span> + <span class="keystroke"><?php echo nl2br(encodeHtml(htmlentities(config('ui','keybinding','action','profile')))); ?></span> + </a> </div> diff --git a/modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml b/modules/cms-ui/themes/default/html/views/title/show.tpl.src.xml @@ -90,6 +90,7 @@ <link type="dialog" title="message:menu_new_desc" subaction="add"> <image method="add"></image> <text key="menu_new"></text> + <text class="keystroke" value="config:ui/keybinding/method/add"></text> </link> </part> @@ -221,6 +222,7 @@ <link type="dialog" title="message:menu_prop_desc" subaction="prop"> <image method="prop"></image> <text key="menu_prop"></text> + <text class="keystroke" value="config:ui/keybinding/method/prop"></text> </link> </part> <part @@ -235,6 +237,7 @@ <link type="dialog" title="message:menu_pub_desc" subaction="pub"> <image method="publish"></image> <text key="menu_pub"></text> + <text class="keystroke" value="config:ui/keybinding/method/pub"></text> </link> </part> <part class="entry clickable filtered on-action-pageelement"> @@ -242,6 +245,7 @@ title="message:menu_archive_desc"> <image method="archive"></image> <text key="menu_archive"></text> + <text class="keystroke" value="config:ui/keybinding/method/archive"></text> </link> </part> <part @@ -250,6 +254,7 @@ subaction="rights"> <image method="rights"></image> <text key="menu_rights"></text> + <text class="keystroke" value="config:ui/keybinding/method/rights"></text> </link> </part> @@ -525,6 +530,7 @@ <link type="dialog" title="message:menu_PROFILE_DESC" action="profile" subaction="edit"> <image action="user"></image> <text key="menu_profile"></text> + <text class="keystroke" value="config:ui/keybinding/action/profile"></text> </link> </part> <part class="entry clickable"> diff --git a/modules/cms-ui/themes/default/script/jquery.hotkeys.js b/modules/cms-ui/themes/default/script/jquery.hotkeys.js @@ -0,0 +1,204 @@ +/*jslint browser: true*/ +/*jslint jquery: true*/ + +/* + * jQuery Hotkeys Plugin + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * + * Based upon the plugin by Tzury Bar Yochay: + * https://github.com/tzuryby/jquery.hotkeys + * + * Original idea by: + * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ + */ + +/* + * One small change is: now keys are passed by object { keys: '...' } + * Might be useful, when you want to pass some other data to your handler + */ + +(function(jQuery) { + + jQuery.hotkeys = { + version: "0.2.0", + + specialKeys: { + 8: "backspace", + 9: "tab", + 10: "return", + 13: "return", + 16: "shift", + 17: "ctrl", + 18: "alt", + 19: "pause", + 20: "capslock", + 27: "esc", + 32: "space", + 33: "pageup", + 34: "pagedown", + 35: "end", + 36: "home", + 37: "left", + 38: "up", + 39: "right", + 40: "down", + 45: "insert", + 46: "del", + 59: ";", + 61: "=", + 96: "0", + 97: "1", + 98: "2", + 99: "3", + 100: "4", + 101: "5", + 102: "6", + 103: "7", + 104: "8", + 105: "9", + 106: "*", + 107: "+", + 109: "-", + 110: ".", + 111: "/", + 112: "f1", + 113: "f2", + 114: "f3", + 115: "f4", + 116: "f5", + 117: "f6", + 118: "f7", + 119: "f8", + 120: "f9", + 121: "f10", + 122: "f11", + 123: "f12", + 144: "numlock", + 145: "scroll", + 173: "-", + 186: ";", + 187: "=", + 188: ",", + 189: "-", + 190: ".", + 191: "/", + 192: "`", + 219: "[", + 220: "\\", + 221: "]", + 222: "'" + }, + + shiftNums: { + "`": "~", + "1": "!", + "2": "@", + "3": "#", + "4": "$", + "5": "%", + "6": "^", + "7": "&", + "8": "*", + "9": "(", + "0": ")", + "-": "_", + "=": "+", + ";": ": ", + "'": "\"", + ",": "<", + ".": ">", + "/": "?", + "\\": "|" + }, + + // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url + textAcceptingInputTypes: [ + "text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", + "datetime-local", "search", "color", "tel"], + + // default input types not to bind to unless bound directly + textInputTypes: /textarea|input|select/i, + + options: { + filterInputAcceptingElements: true, + filterTextInputs: true, + filterContentEditable: true + } + }; + + function keyHandler(handleObj) { + if (typeof handleObj.data === "string") { + handleObj.data = { + keys: handleObj.data + }; + } + + // Only care when a possible input has been specified + if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== "string") { + return; + } + + var origHandler = handleObj.handler, + keys = handleObj.data.keys.toLowerCase().split(" "); + + handleObj.handler = function(event) { + // Don't fire in text-accepting inputs that we didn't directly bind to + if (this !== event.target && + (jQuery.hotkeys.options.filterInputAcceptingElements && + jQuery.hotkeys.textInputTypes.test(event.target.nodeName) || + (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) || + (jQuery.hotkeys.options.filterTextInputs && + jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) { + return; + } + + var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which], + character = String.fromCharCode(event.which).toLowerCase(), + modif = "", + possible = {}; + + jQuery.each(["alt", "ctrl", "shift"], function(index, specialKey) { + + if (event[specialKey + 'Key'] && special !== specialKey) { + modif += specialKey + '+'; + } + }); + + // metaKey is triggered off ctrlKey erronously + if (event.metaKey && !event.ctrlKey && special !== "meta") { + modif += "meta+"; + } + + if (event.metaKey && special !== "meta" && modif.indexOf("alt+ctrl+shift+") > -1) { + modif = modif.replace("alt+ctrl+shift+", "hyper+"); + } + + if (special) { + possible[modif + special] = true; + } + else { + possible[modif + character] = true; + possible[modif + jQuery.hotkeys.shiftNums[character]] = true; + + // "$" can be triggered as "Shift+4" or "Shift+$" or just "$" + if (modif === "shift+") { + possible[jQuery.hotkeys.shiftNums[character]] = true; + } + } + + for (var i = 0, l = keys.length; i < l; i++) { + if (possible[keys[i]]) { + return origHandler.apply(this, arguments); + } + } + }; + } + + jQuery.each(["keydown", "keyup", "keypress"], function() { + jQuery.event.special[this] = { + add: keyHandler + }; + }); + +})(jQuery || this.jQuery || window.jQuery); diff --git a/modules/cms-ui/themes/default/script/jquery.hotkeys.min.js b/modules/cms-ui/themes/default/script/jquery.hotkeys.min.js @@ -0,0 +1,2 @@ +(function(t){t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}};function e(e){if(typeof e.data==="string"){e.data={keys:e.data}};if(!e.data||!e.data.keys||typeof e.data.keys!=="string"){return};var a=e.handler,s=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this!==e.target&&(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||(t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable"))||(t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1))){return};var n=e.type!=="keypress"&&t.hotkeys.specialKeys[e.which],f=String.fromCharCode(e.which).toLowerCase(),i="",r={};t.each(["alt","ctrl","shift"],function(t,s){if(e[s+"Key"]&&n!==s){i+=s+"+"}});if(e.metaKey&&!e.ctrlKey&&n!=="meta"){i+="meta+"};if(e.metaKey&&n!=="meta"&&i.indexOf("alt+ctrl+shift+")>-1){i=i.replace("alt+ctrl+shift+","hyper+")};if(n){r[i+n]=!0} +else{r[i+f]=!0;r[i+t.hotkeys.shiftNums[f]]=!0;if(i==="shift+"){r[t.hotkeys.shiftNums[f]]=!0}};for(var o=0,p=s.length;o<p;o++){if(r[s[o]]){return a.apply(this,arguments)}}}};t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})})(jQuery||this.jQuery||window.jQuery);+ \ No newline at end of file diff --git a/modules/cms-ui/themes/default/script/openrat.js b/modules/cms-ui/themes/default/script/openrat.js @@ -43,6 +43,20 @@ $( function() { } }); + // Binding aller Sondertasten. + $('.keystroke').each( function() { + let keystrokeElement = $(this); + let keystroke = keystrokeElement.text(); + if (keystroke.length == 0) + return; // No Keybinding. + let keyaction = function() { + keystrokeElement.click(); + }; + // Keybinding ausfuehren. + $(document).bind('keydown', keystroke, keyaction ); + } ); + + // Per Klick werden die Notices entfernt. $('#noticebar .notice').fadeIn().click(function () { diff --git a/modules/cms-ui/themes/default/script/openrat.min.js b/modules/cms-ui/themes/default/script/openrat.min.js @@ -1,10 +1,10 @@ -;var OR_THEMES_EXT_DIR='modules/cms-ui/themes/';$(function(){$('html').removeClass('nojs');$('.initial-hidden').removeClass('initial-hidden');registerHeaderEvents();registerWorkbenchEvents();$('.view').each(function(e){afterViewLoaded(this)});window.onpopstate=function(e){Navigator.navigateTo(e.state)};initActualHistoryState();Workbench.initialize();$('#noticebar .notice').click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});loadTree();$(document).keyup(function(e){if(e.keyCode==27){$('#dialog .view').fadeOut('fast').html('');$('#dialog').removeClass('is-open').addClass('is-closed')}});$('#noticebar .notice').fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});registerOpenClose($('section.toggle-open-close'));$('section.toggle-open-close .on-click-open-close').click(function(){var t=$(this).closest('section');if(t.hasClass('disabled'))return;var e=t.find('div.view-loader');if(e.children().length==0)Workbench.loadNewActionIntoElement(e)})});function initActualHistoryState(){var e={};e.name=window.document.title;var t=new URLSearchParams(window.location.search);if(t.has('action')){e.action=t.get('action');e.id=t.get('id');e.name=window.document.title;e.data={};var t=Array.from(t.entries());for(var i in t){e.data[t[i][0]]=t[i][1]};Navigator.toActualHistory(e);filterMenus(e.action,e.id,e.data)}};var Navigator=new function(){'use strict';this.navigateTo=function(e){Workbench.loadNewActionState(e)};this.navigateToNew=function(e){Workbench.loadNewActionState(e);window.history.pushState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))};this.navigateToNewAction=function(e,t,i,a){var n={action:e,method:t,id:i,data:a};this.navigateToNew(n)};this.toActualHistory=function(e){window.history.replaceState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))}},Workbench=new function(){'use strict';this.initialize=function(){this.initializePingTimer()};this.initializePingTimer=function(){var e=function(){$.ajax(createUrl('title','ping',0))},t=5;window.setInterval(e,t*60*1000)};this.loadNewActionState=function(e){Workbench.loadNewAction(e.action,e.id,e.data)};this.loadNewAction=function(e,t,i){$('#editor').attr('data-action',e);$('#editor').attr('data-id',t);$('#editor').attr('data-extra',JSON.stringify(i));$('#workbench section.closed .view-loader').empty();$('#workbench section.open .view-loader').each(function(e){var t=$(this);Workbench.loadNewActionIntoElement(t)});filterMenus(e,t,i)};this.loadNewActionIntoElement=function(e){var t=$('#editor').attr('data-action'),i=$('#editor').attr('data-id'),a=$('#editor').attr('data-extra'),n=e.data('method');Workbench.loadViewIntoElement(e,t,n,i,a)};this.loadViewIntoElement=function(e,t,i,a,n){var o=createUrl(t,i,a,n,!0);e.empty().fadeTo(1,0.7).addClass('loader').html('').load(o,function(t,i,a){e.fadeTo(350,1);$(e).removeClass('loader');if(i=='error'){$(e).html('');notify('error',t);return};afterViewLoaded(e)})}};function registerWorkbenchEvents(){$('div.header').dblclick(function(){fullscreen(this)});$('div#filler').click(function(){if($('div#dialog').hasClass('modal')){} -else{$('div#dialog').removeClass('is-open').addClass('is-closed');$('div#dialog > .view').html('')}})};function loadView(e,t,i,a,n){Navigator.navigateToNewAction(t,i,a,n)};function afterViewLoaded(e){var t=$(e).closest('section');t.toggleClass('is-empty',$(e).is(':empty'));$(e).trigger('orViewLoaded');$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('.toggle-nav-open-close').click(function(){$('nav').toggleClass('open')});$(e).find('.toggle-nav-small').click(function(){$('nav').toggleClass('small')});$(e).find('div.headermenu > a').each(function(e,t){});$(e).find('div.header > a.back').each(function(t,i){$(i).removeClass('button').wrap('<div class="entry perview" />').parent().appendTo($(e).closest('div.panel').find('div.header div.dropdown').first())});$(e).find('div.selector.tree').each(function(){var e=this;$(this).orTree({type:'project',selectable:$(e).attr('data-types').split(','),id:$(e).attr('data-init-folderid'),onSelect:function(t,i,a){var n=$(e).parent();$(n).find('input[type=text]').attr('value',t);$(n).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > .entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,t){var i=t.draggable,a=$(this).parent();startDialog($(this).text(),$(i).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(i).attr('data-type'),'subaction':'copy','id':$(i).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(i).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).parent('div.view').addClass('dirty')});$(e).find('select.theme-chooser').change(function(){setUserStyle(this.value)})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('#title .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('#title .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('#title div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('#title div.search input').orSearch({dropdown:'#title div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){$('.or-navtree .or-navtree-node').orTree()};function submitUrl(e,t){postUrl(t,e)};function postUrl(e,t){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,i,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,i,t)}})};function startDialog(e,t,i,a,n){if(!t)t=$('#editor').attr('data-action');a=$('#editor').attr('data-id');$('div#dialog > .view').html('<div class="header"><img class="icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('div#dialog > .view').data('id',a);$('div#dialog').removeClass('is-closed').addClass('is-open');Workbench.loadViewIntoElement($('div#dialog > .view'),t,i,a,n)};function modalView(e,t){alert('modalView() called');return};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,t,i,a){$('nav').removeClass('open');setTitle(e);setNewAction(t,i,a)};function filterMenus(e,t,i){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive');$('div.clickable.filtered a').attr('data-action',e);$('div.clickable.filtered a').attr('data-id',t);$('div.clickable.filtered a').attr('data-extra',JSON.stringify(i))};function setNewAction(e,t,i){Navigator.navigateToNewAction(e,'edit',t,i)};function setNewId(e){};function notifyBrowser(e){if(!('Notification' in window)){return} +;var OR_THEMES_EXT_DIR='modules/cms-ui/themes/';$(function(){$('html').removeClass('nojs');$('.initial-hidden').removeClass('initial-hidden');registerHeaderEvents();registerWorkbenchEvents();$('.view').each(function(e){afterViewLoaded(this)});window.onpopstate=function(e){Navigator.navigateTo(e.state)};initActualHistoryState();Workbench.initialize();$('#noticebar .notice').click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});loadTree();$(document).keyup(function(e){if(e.keyCode==27){$('#dialog .view').fadeOut('fast').html('');$('#dialog').removeClass('is-open').addClass('is-closed')}});$('.keystroke').each(function(){let keystrokeElement=$(this);let keystroke=keystrokeElement.text();if(keystroke.length==0)return;let keyaction=function(){keystrokeElement.click()};$(document).bind('keydown',keystroke,keyaction)});$('#noticebar .notice').fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});registerOpenClose($('section.toggle-open-close'));$('section.toggle-open-close .on-click-open-close').click(function(){var t=$(this).closest('section');if(t.hasClass('disabled'))return;var e=t.find('div.view-loader');if(e.children().length==0)Workbench.loadNewActionIntoElement(e)})});function initActualHistoryState(){var e={};e.name=window.document.title;var t=new URLSearchParams(window.location.search);if(t.has('action')){e.action=t.get('action');e.id=t.get('id');e.name=window.document.title;e.data={};var t=Array.from(t.entries());for(var i in t){e.data[t[i][0]]=t[i][1]};Navigator.toActualHistory(e);filterMenus(e.action,e.id,e.data)}};var Navigator=new function(){'use strict';this.navigateTo=function(e){Workbench.loadNewActionState(e)};this.navigateToNew=function(e){Workbench.loadNewActionState(e);window.history.pushState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))};this.navigateToNewAction=function(e,t,i,n){var a={action:e,method:t,id:i,data:n};this.navigateToNew(a)};this.toActualHistory=function(e){window.history.replaceState(e,e.name,createUrl(e.action,null,e.id,e.data,!1))}},Workbench=new function(){'use strict';this.initialize=function(){this.initializePingTimer()};this.initializePingTimer=function(){var e=function(){$.ajax(createUrl('title','ping',0))},t=5;window.setInterval(e,t*60*1000)};this.loadNewActionState=function(e){Workbench.loadNewAction(e.action,e.id,e.data)};this.loadNewAction=function(e,t,i){$('#editor').attr('data-action',e);$('#editor').attr('data-id',t);$('#editor').attr('data-extra',JSON.stringify(i));$('#workbench section.closed .view-loader').empty();$('#workbench section.open .view-loader').each(function(e){var t=$(this);Workbench.loadNewActionIntoElement(t)});filterMenus(e,t,i)};this.loadNewActionIntoElement=function(e){var t=$('#editor').attr('data-action'),i=$('#editor').attr('data-id'),n=$('#editor').attr('data-extra'),a=e.data('method');Workbench.loadViewIntoElement(e,t,a,i,n)};this.loadViewIntoElement=function(e,t,i,n,a){var o=createUrl(t,i,n,a,!0);e.empty().fadeTo(1,0.7).addClass('loader').html('').load(o,function(t,i,n){e.fadeTo(350,1);$(e).removeClass('loader');if(i=='error'){$(e).html('');notify('error',t);return};afterViewLoaded(e)})}};function registerWorkbenchEvents(){$('div.header').dblclick(function(){fullscreen(this)});$('div#filler').click(function(){if($('div#dialog').hasClass('modal')){} +else{$('div#dialog').removeClass('is-open').addClass('is-closed');$('div#dialog > .view').html('')}})};function loadView(e,t,i,n,a){Navigator.navigateToNewAction(t,i,n,a)};function afterViewLoaded(e){var t=$(e).closest('section');t.toggleClass('is-empty',$(e).is(':empty'));$(e).trigger('orViewLoaded');$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('.toggle-nav-open-close').click(function(){$('nav').toggleClass('open')});$(e).find('.toggle-nav-small').click(function(){$('nav').toggleClass('small')});$(e).find('div.headermenu > a').each(function(e,t){});$(e).find('div.header > a.back').each(function(t,i){$(i).removeClass('button').wrap('<div class="entry perview" />').parent().appendTo($(e).closest('div.panel').find('div.header div.dropdown').first())});$(e).find('div.selector.tree').each(function(){var e=this;$(this).orTree({type:'project',selectable:$(e).attr('data-types').split(','),id:$(e).attr('data-init-folderid'),onSelect:function(t,i,n){var a=$(e).parent();$(a).find('input[type=text]').attr('value',t);$(a).find('input[type=hidden]').attr('value',n)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > .entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,t){var i=t.draggable,n=$(this).parent();startDialog($(this).text(),$(i).attr('data-type'),'copy',$(n).attr('data-id'),{'action':$(i).attr('data-type'),'subaction':'copy','id':$(i).attr('data-id'),'targetFolderId':$(n).attr('data-id')});$(i).detach().css({top:0,left:0}).appendTo(n).click()}});$(e).find('input').change(function(){$(this).parent('div.view').addClass('dirty')});$(e).find('select.theme-chooser').change(function(){setUserStyle(this.value)})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('#title .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('#title .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('#title div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('#title div.search input').orSearch({dropdown:'#title div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){$('.or-navtree .or-navtree-node').orTree()};function submitUrl(e,t){postUrl(t,e)};function postUrl(e,t){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,i,n){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,i,t)}})};function startDialog(e,t,i,n,a){if(!t)t=$('#editor').attr('data-action');n=$('#editor').attr('data-id');$('div#dialog > .view').html('<div class="header"><img class="icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('div#dialog > .view').data('id',n);$('div#dialog').removeClass('is-closed').addClass('is-open');Workbench.loadViewIntoElement($('div#dialog > .view'),t,i,n,a)};function modalView(e,t){alert('modalView() called');return};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,t,i,n){$('nav').removeClass('open');setTitle(e);setNewAction(t,i,n)};function filterMenus(e,t,i){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive');$('div.clickable.filtered a').attr('data-action',e);$('div.clickable.filtered a').attr('data-id',t);$('div.clickable.filtered a').attr('data-extra',JSON.stringify(i))};function setNewAction(e,t,i){Navigator.navigateToNewAction(e,'edit',t,i)};function setNewId(e){};function notifyBrowser(e){if(!('Notification' in window)){return} else if(Notification.permission==='granted'){var t=new Notification(e)} -else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){var i=new Notification(e)}})}};function setUserStyle(e){var t=$('html'),i=t.attr('class').split(/\s+/);$.each(i,function(e,i){if(i.startsWith('theme-')){t.removeClass(i)}});t.addClass('theme-'+e.toLowerCase())};function insert(e,t,i){var a=document.forms[0].elements[e];a.focus();if(typeof document.selection!='undefined'){var r=document.selection.createRange(),n=r.text;r.text=t+n+i;r=document.selection.createRange();if(n.length==0){r.move('character',-i.length)} -else{r.moveStart('character',t.length+n.length+i.length)};r.select()} -else if(typeof a.selectionStart!='undefined'){var c=a.selectionStart,s=a.selectionEnd,n=a.value.substring(c,s);a.value=a.value.substr(0,c)+t+n+i+a.value.substr(s);var o;if(n.length==0){o=c+t.length} -else{o=c+t.length+n.length+i.length};a.selectionStart=o;a.selectionEnd=o} -else{o=a.value.length;var n=prompt('Text');a.value=a.value.substr(0,o)+t+n+i+a.value.substr(o)}};function createUrl(e,t,i,a,o){var n='./';n+='?action='+e;if(t!=null)n+='&subaction='+t;n+='&id='+i;if(o)n+='&embed=1';if(typeof a==='string'){a=a.replace(/'/g,'"');var r=jQuery.parseJSON(a);jQuery.each(r,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} -else if(typeof a==='object'){jQuery.each(a,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;n=n+'&'+e+'='+t})} -else{};return n};function resizeWorkbenchContainer(e){};function resizeWorkbench(){};function resizeTabs(e){};function help(e,t,i){var a=$(e).closest('div.panel').find('li.action.active').attr('data-action'),n=$(e).closest('div.panel').find('li.action.active').attr('data-method');window.open(t+a+'/'+n+i,'OpenRat_Help','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')};function notify(e,t){var i=$('<div class="notice '+e+'"><div class="text">'+t+'</div></div>');$('#noticebar').prepend(i);$(i).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})})};function registerOpenClose(e){$(e).children('.on-click-open-close').click(function(){$(this).closest('.toggle-open-close').toggleClass('open closed')})};- \ No newline at end of file +else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){var i=new Notification(e)}})}};function setUserStyle(e){var t=$('html'),i=t.attr('class').split(/\s+/);$.each(i,function(e,i){if(i.startsWith('theme-')){t.removeClass(i)}});t.addClass('theme-'+e.toLowerCase())};function insert(e,t,i){var n=document.forms[0].elements[e];n.focus();if(typeof document.selection!='undefined'){var r=document.selection.createRange(),a=r.text;r.text=t+a+i;r=document.selection.createRange();if(a.length==0){r.move('character',-i.length)} +else{r.moveStart('character',t.length+a.length+i.length)};r.select()} +else if(typeof n.selectionStart!='undefined'){var c=n.selectionStart,s=n.selectionEnd,a=n.value.substring(c,s);n.value=n.value.substr(0,c)+t+a+i+n.value.substr(s);var o;if(a.length==0){o=c+t.length} +else{o=c+t.length+a.length+i.length};n.selectionStart=o;n.selectionEnd=o} +else{o=n.value.length;var a=prompt('Text');n.value=n.value.substr(0,o)+t+a+i+n.value.substr(o)}};function createUrl(e,t,i,n,o){var a='./';a+='?action='+e;if(t!=null)a+='&subaction='+t;a+='&id='+i;if(o)a+='&embed=1';if(typeof n==='string'){n=n.replace(/'/g,'"');var r=jQuery.parseJSON(n);jQuery.each(r,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;a=a+'&'+e+'='+t})} +else if(typeof n==='object'){jQuery.each(n,function(e,t){if(e=='action'||e=='subaction'||e=='id')return;a=a+'&'+e+'='+t})} +else{};return a};function resizeWorkbenchContainer(e){};function resizeWorkbench(){};function resizeTabs(e){};function help(e,t,i){var n=$(e).closest('div.panel').find('li.action.active').attr('data-action'),a=$(e).closest('div.panel').find('li.action.active').attr('data-method');window.open(t+n+'/'+a+i,'OpenRat_Help','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')};function notify(e,t){var i=$('<div class="notice '+e+'"><div class="text">'+t+'</div></div>');$('#noticebar').prepend(i);$(i).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})})};function registerOpenClose(e){$(e).children('.on-click-open-close').click(function(){$(this).closest('.toggle-open-close').toggleClass('open closed')})};+ \ No newline at end of file diff --git a/modules/cms-ui/themes/default/style/openrat-workbench.css b/modules/cms-ui/themes/default/style/openrat-workbench.css @@ -146,6 +146,12 @@ div#workbench > header .toolbar-icon .arrow-down { display: none; } } +div#workbench > header .keystroke { + /* Bad hack. Better: Flexbox. */ + position: absolute; + right: 15px; + top: 12px; +} div#workbench > div { flex: 1; /* Horizontale Flexbox */ @@ -271,4 +277,4 @@ div#workbench > div > main > section.is-empty { font-size: 1.0em; } } -/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22openrat-workbench.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3BAAuCA%2CGAAG%3B%3B%3BAAAH%2CGAAG%2COAEG%3BCACE%3B%3BCAGA%3BCACA%3BCACA%3BCACA%3BCACA%3BCAEA%3BCAEA%2C4BAAA%3B%3BAAGJ%2CG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2CUAiBL%3BCACI%3B%3BAAIJ%2CGA1HT%2CUAkCG%2CMAkEI%2COAAO%2CUAsBJ%2COACG%3BCACI%3B%3BAAQR%2CGApIT%2CUAkCG%2CMAkEI%2COAAO%2CUAgCJ%3BCACG%3B%3BAAOhB%2CMAEI%3BCACI%3B%3BAAIJ%3BCAAA%2CMALA%3BEAGQ%3B%3B%3BAALZ%2CMASI%3BCACI%3B%3BAAIJ%3BCAAA%2CMALA%3BEAGQ%3B%3B%3BAAZZ%2CMAgBI%2CcAAa%3BCACT%3B%3BAAKA%3BCAAA%2CMANJ%2CcAAa%3BEAGL%3B%3B%3BAAOJ%3BCAAA%2CMAVJ%2CcAAa%2COAMT%3BEAEQ%3B%3B%3B%3BAAOhB%3BCAEI%2C%2BCAAA%3BCACA%2CgCAAA%3BCACA%3BCACA%3BCACA%3B%3BAAUJ%3BCAJI%3BEACI%22%7D */- \ No newline at end of file +/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22openrat-workbench.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3BAAuCA%2CGAAG%3B%3B%3BAAAH%2CGAAG%2COAEG%3BCACE%3B%3BCAGA%3BCACA%3BCACA%3BCACA%3BCACA%3BCAEA%3BCAEA%2C4BAAA%3B%3BAAGJ%2CGAjBD%2COAiBE%3BCACG%3B%3BAAlBR%2CGAAG%2COAsBC%2CIAAG%3BCACC%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3B%3BAA7BR%2CGAAG%2COAsBC%2CIAAG%2COASC%2CKAAI%3BCACA%2CaAAa%2CaAAa%2CmBAA1B%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCAEA%3BCACA%3BCACA%3B%3BAAMZ%3BCACI%3BCACA%3BCACA%3BCACA%3BCACA%3B%3BAAEA%2CMAAC%3BCAC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3BCAAA%2CMALA%3BEAGQ%3B%3B%3BAAZZ%2CMAgBI%2CcAAa%3BCACT%3B%3BAAKA%3BCAAA%2CMANJ%2CcAAa%3BEAGL%3B%3B%3BAAOJ%3BCAAA%2CMAVJ%2CcAAa%2COAMT%3BEAEQ%3B%3B%3B%3BAAOhB%3BCAEI%2C%2BCAAA%3BCACA%2CgCAAA%3BCACA%3BCACA%3BCACA%3B%3BAAUJ%3BCAJI%3BEACI%22%7D */+ \ No newline at end of file diff --git a/modules/cms-ui/themes/default/style/openrat-workbench.less b/modules/cms-ui/themes/default/style/openrat-workbench.less @@ -197,6 +197,13 @@ div#workbench { } } } + + .keystroke { + /* Bad hack. Better: Flexbox. */ + position: absolute; + right: 15px; + top: 12px; + } } > div { diff --git a/modules/cms-ui/themes/default/style/openrat-workbench.min.css b/modules/cms-ui/themes/default/style/openrat-workbench.min.css @@ -1 +1 @@ -div#dialog > .view{overflow: auto;position: absolute;top: 5%;left: 10%;width: 80%;height: 80%;z-index: 101;border: 1px solid !important}div#dialog.is-closed{display: none}div#dialog div#filler{position: absolute;z-index: 100;top: 0;left: 0;height: 100%;width: 100%;opacity: 0.5}div#dialog div#filler span.icon{font-family: 'Helvetica', 'Arial', sans-serif;opacity: 1;font-size: 3em;font-weight: bold;text-align: center;width: 40px;height: 40px;position: absolute;right: 20px;top: 20px}.arrow{width: 0;height: 0;margin: 6px;padding: 0;font-size: 0}.arrow.arrow-down{border-right: 6px solid transparent;border-top: 6px solid;border-left: 6px solid transparent;border-bottom: 4px solid transparent;margin-top: 10px}.arrow.arrow-right{border-top: 6px solid transparent;border-left: 6px solid;border-bottom: 6px solid transparent;border-right: 4px solid transparent;margin-left: 10px}#editor .dirty{font-weight: bold}.visible-for-nojs{display: none}html.nojs .noscript{display: block}.toggle-open-close .on-click-open-close{cursor: pointer;font-weight: normal}.toggle-open-close > div{transition: height ease .5s;overflow: hidden}.toggle-open-close.closed .on-click-open-close .on-closed{display: inline}.toggle-open-close.closed .on-click-open-close .on-open{display: none}.toggle-open-close.closed > div{height: 0}.toggle-open-close.open > div{display: block}.toggle-open-close.open .on-click-open-close .on-closed{display: none}.toggle-open-close.open .on-click-open-close .on-open{display: inline}html,body{width: 100%;height: 100%}div#workbench{width: 100%;height: 100%;display: flex;flex-direction: column}div#workbench div.panel.modal{position: relative;z-index: 101;border: 1px solid !important}div#workbench > header{height: 3.0rem}div#workbench > header .toolbar-icon .arrow-down{display: inline}@media only screen and (max-width: 55rem){div#workbench > header .toolbar-icon span.label,div#workbench > header .toolbar-icon .arrow-down{display: none}}div#workbench > div{flex: 1;display: flex;flex-direction: row;min-width: 0;min-height: 0}div#workbench > div > main{flex: 1}div#workbench > div > nav,div#workbench > div > main{min-width: 0;min-height: 0;overflow-y: auto;overflow-x: hidden}div#workbench > div > nav{width: 33%;overflow-y: hidden}@media only screen and (max-width: 55rem){div#workbench > div > nav{width: 0}}div#workbench > div > nav.small{width: 5em;opacity: 0.5;overflow-y: hidden}div#workbench > div > nav.small:hover{width: 50%;overflow-y: auto;opacity: 1}div#workbench > div > nav.open{overflow-y: auto}@media only screen and (max-width: 55rem){div#workbench > div > nav.open{width: 90%}}@media only screen and (min-width: 75rem){div#workbench > div > nav{width: 33%;overflow-y: auto}}div#workbench > div > nav div.view{height: 100%}div#workbench > div > main > section{margin: 1.5em;border: 1px solid;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;-khtml-border-radius: 5px}@media only screen and (max-width: 55rem){div#workbench > div > main > section{margin: 0.5em}}div#workbench > div > main > section header *{display: inline}div#workbench > div > main > section .view-toolbar{display: inline}div#workbench > div > main > section.closed .view-toolbar{display: none}div#workbench > div > main > section.is-empty{display: none}#title .toggle-nav-small{display: inline}@media only screen and (max-width: 55rem){#title .toggle-nav-small{display: none}}#title .toggle-nav-open-close{display: none}@media only screen and (max-width: 55rem){#title .toggle-nav-open-close{display: inline}}#title .toolbar-icon.search{width: 8em}@media only screen and (max-width: 55rem){#title .toolbar-icon.search{width: 8em}}@media only screen and (max-width: 55rem){#title .toolbar-icon.search input{width: 3em}}.loader{background: url(../images/loader.gif) no-repeat;background-position: center, top;height: 30px;opacity: 0.5;cursor: wait}@media only screen and (max-width: 55rem){html{font-size: 1.0em}}- \ No newline at end of file +div#dialog > .view{overflow: auto;position: absolute;top: 5%;left: 10%;width: 80%;height: 80%;z-index: 101;border: 1px solid !important}div#dialog.is-closed{display: none}div#dialog div#filler{position: absolute;z-index: 100;top: 0;left: 0;height: 100%;width: 100%;opacity: 0.5}div#dialog div#filler span.icon{font-family: 'Helvetica', 'Arial', sans-serif;opacity: 1;font-size: 3em;font-weight: bold;text-align: center;width: 40px;height: 40px;position: absolute;right: 20px;top: 20px}.arrow{width: 0;height: 0;margin: 6px;padding: 0;font-size: 0}.arrow.arrow-down{border-right: 6px solid transparent;border-top: 6px solid;border-left: 6px solid transparent;border-bottom: 4px solid transparent;margin-top: 10px}.arrow.arrow-right{border-top: 6px solid transparent;border-left: 6px solid;border-bottom: 6px solid transparent;border-right: 4px solid transparent;margin-left: 10px}#editor .dirty{font-weight: bold}.visible-for-nojs{display: none}html.nojs .noscript{display: block}.toggle-open-close .on-click-open-close{cursor: pointer;font-weight: normal}.toggle-open-close > div{transition: height ease .5s;overflow: hidden}.toggle-open-close.closed .on-click-open-close .on-closed{display: inline}.toggle-open-close.closed .on-click-open-close .on-open{display: none}.toggle-open-close.closed > div{height: 0}.toggle-open-close.open > div{display: block}.toggle-open-close.open .on-click-open-close .on-closed{display: none}.toggle-open-close.open .on-click-open-close .on-open{display: inline}html,body{width: 100%;height: 100%}div#workbench{width: 100%;height: 100%;display: flex;flex-direction: column}div#workbench div.panel.modal{position: relative;z-index: 101;border: 1px solid !important}div#workbench > header{height: 3.0rem}div#workbench > header .toolbar-icon .arrow-down{display: inline}@media only screen and (max-width: 55rem){div#workbench > header .toolbar-icon span.label,div#workbench > header .toolbar-icon .arrow-down{display: none}}div#workbench > header .keystroke{position: absolute;right: 15px;top: 12px}div#workbench > div{flex: 1;display: flex;flex-direction: row;min-width: 0;min-height: 0}div#workbench > div > main{flex: 1}div#workbench > div > nav,div#workbench > div > main{min-width: 0;min-height: 0;overflow-y: auto;overflow-x: hidden}div#workbench > div > nav{width: 33%;overflow-y: hidden}@media only screen and (max-width: 55rem){div#workbench > div > nav{width: 0}}div#workbench > div > nav.small{width: 5em;opacity: 0.5;overflow-y: hidden}div#workbench > div > nav.small:hover{width: 50%;overflow-y: auto;opacity: 1}div#workbench > div > nav.open{overflow-y: auto}@media only screen and (max-width: 55rem){div#workbench > div > nav.open{width: 90%}}@media only screen and (min-width: 75rem){div#workbench > div > nav{width: 33%;overflow-y: auto}}div#workbench > div > nav div.view{height: 100%}div#workbench > div > main > section{margin: 1.5em;border: 1px solid;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;-khtml-border-radius: 5px}@media only screen and (max-width: 55rem){div#workbench > div > main > section{margin: 0.5em}}div#workbench > div > main > section header *{display: inline}div#workbench > div > main > section .view-toolbar{display: inline}div#workbench > div > main > section.closed .view-toolbar{display: none}div#workbench > div > main > section.is-empty{display: none}#title .toggle-nav-small{display: inline}@media only screen and (max-width: 55rem){#title .toggle-nav-small{display: none}}#title .toggle-nav-open-close{display: none}@media only screen and (max-width: 55rem){#title .toggle-nav-open-close{display: inline}}#title .toolbar-icon.search{width: 8em}@media only screen and (max-width: 55rem){#title .toolbar-icon.search{width: 8em}}@media only screen and (max-width: 55rem){#title .toolbar-icon.search input{width: 3em}}.loader{background: url(../images/loader.gif) no-repeat;background-position: center, top;height: 30px;opacity: 0.5;cursor: wait}@media only screen and (max-width: 55rem){html{font-size: 1.0em}}+ \ No newline at end of file diff --git a/modules/configuration/Configuration.class.php b/modules/configuration/Configuration.class.php @@ -6,7 +6,7 @@ * * @return String, leer falls Schluessel nicht vorhanden */ -function config( $part1=null,$part2=null,$part3=null ) +function config( $part1=null,$part2=null,$part3=null,$part4=null ) { global $conf; @@ -25,8 +25,14 @@ function config( $part1=null,$part2=null,$part3=null ) else return ''; - if ( isset($conf[$part1][$part2][$part3])) - return $conf[$part1][$part2][$part3]; + if ( $part4 == null) + if ( isset($conf[$part1][$part2][$part3])) + return $conf[$part1][$part2][$part3]; + else + return ''; + + if ( isset($conf[$part1][$part2][$part3][$part4])) + return $conf[$part1][$part2][$part3][$part4]; else return ''; } diff --git a/modules/util/config-default.php b/modules/util/config-default.php @@ -889,5 +889,17 @@ function createDefaultConfig() $conf['application']['operator'] = OR_TITLE; $conf['production']= true; + $conf['ui']= array(); + $conf['ui']['keybinding']= array(); + $conf['ui']['keybinding']['method'] = array(); + $conf['ui']['keybinding']['method']['prop'] = 'F4'; + $conf['ui']['keybinding']['method']['add'] = 'F1'; + $conf['ui']['keybinding']['method']['pub'] = 'F8'; + $conf['ui']['keybinding']['method']['archive'] = ''; + $conf['ui']['keybinding']['method']['rights'] = ''; + + $conf['ui']['keybinding']['action'] = array(); + $conf['ui']['keybinding']['action']['profile'] = 'ALT+P'; + return $conf; }