openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit 2e98e7b3d3738c9dafca542d2cf00e1824a1bb5e
parent ed5c742d42999a2ceaeedb1e3232d50479fca322
Author: Jan Dankert <develop@jandankert.de>
Date:   Sun, 14 Feb 2021 23:18:14 +0100

New: Confirmation needed if a dialog is closed which has unsaved changes.

Diffstat:
Mmodules/cms/ui/themes/default/html/views/element/edit.php | 2+-
Mmodules/cms/ui/themes/default/html/views/group/edit.php | 2+-
Mmodules/cms/ui/themes/default/html/views/language/edit.php | 2+-
Mmodules/cms/ui/themes/default/html/views/model/edit.php | 2+-
Mmodules/cms/ui/themes/default/html/views/user/edit.php | 85+++----------------------------------------------------------------------------
Mmodules/cms/ui/themes/default/script/openrat.js | 11+++++++++++
Mmodules/cms/ui/themes/default/script/openrat.min.js | 2+-
Mmodules/cms/ui/themes/default/script/openrat/view.js | 1+
Mmodules/cms/ui/themes/default/script/openrat/workbench.js | 10++++++++++
Mmodules/cms/ui/themes/default/style/openrat-form.less | 1+
Mmodules/cms/ui/themes/default/style/openrat.css | 3++-
Mmodules/cms/ui/themes/default/style/openrat.min.css | 2+-
Mmodules/cms/ui/themes/default/style/theme/openrat-theme.less | 21++++++++++++++++++---
Mmodules/language/Language_CN.class.php | 1+
Mmodules/language/Language_DE.class.php | 1+
Mmodules/language/Language_EN.class.php | 1+
Mmodules/language/Language_ES.class.php | 1+
Mmodules/language/Language_FR.class.php | 1+
Mmodules/language/Language_IT.class.php | 1+
Mmodules/language/Language_RU.class.php | 1+
Mmodules/language/Messages.class.php | 1+
Mmodules/language/language.yml | 7+++++--
22 files changed, 65 insertions(+), 94 deletions(-)

diff --git a/modules/cms/ui/themes/default/html/views/element/edit.php b/modules/cms/ui/themes/default/html/views/element/edit.php @@ -1,4 +1,4 @@ -<?php /* THIS FILE IS GENERATED from info.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> +<?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> <div class="<?php echo O::escapeHtml('or-table-wrapper') ?>"><?php echo O::escapeHtml('') ?> <div class="<?php echo O::escapeHtml('or-table-filter') ?>"><?php echo O::escapeHtml('') ?> <input type="<?php echo O::escapeHtml('search') ?>" name="<?php echo O::escapeHtml('filter') ?>" placeholder="<?php echo O::escapeHtml(''.@O::lang('SEARCH_FILTER').'') ?>" class="<?php echo O::escapeHtml('or-input or-table-filter-input') ?>" /><?php echo O::escapeHtml('') ?> diff --git a/modules/cms/ui/themes/default/html/views/group/edit.php b/modules/cms/ui/themes/default/html/views/group/edit.php @@ -1,4 +1,4 @@ -<?php /* THIS FILE IS GENERATED from info.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> +<?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> <h2 class="<?php echo O::escapeHtml('or-collapsible-title or-group-title or-collapsible-act-switch') ?>"><?php echo O::escapeHtml('') ?> <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-closed or-collapsible--on-closed') ?>"><?php echo O::escapeHtml('') ?></i> diff --git a/modules/cms/ui/themes/default/html/views/language/edit.php b/modules/cms/ui/themes/default/html/views/language/edit.php @@ -1,4 +1,4 @@ -<?php /* THIS FILE IS GENERATED from info.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> +<?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> <h2 class="<?php echo O::escapeHtml('or-collapsible-title or-group-title or-collapsible-act-switch') ?>"><?php echo O::escapeHtml('') ?> <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-closed or-collapsible--on-closed') ?>"><?php echo O::escapeHtml('') ?></i> diff --git a/modules/cms/ui/themes/default/html/views/model/edit.php b/modules/cms/ui/themes/default/html/views/model/edit.php @@ -1,4 +1,4 @@ -<?php /* THIS FILE IS GENERATED from info.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> +<?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-open or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> <h2 class="<?php echo O::escapeHtml('or-collapsible-title or-group-title or-collapsible-act-switch') ?>"><?php echo O::escapeHtml('') ?> <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-closed or-collapsible--on-closed') ?>"><?php echo O::escapeHtml('') ?></i> diff --git a/modules/cms/ui/themes/default/html/views/user/edit.php b/modules/cms/ui/themes/default/html/views/user/edit.php @@ -1,10 +1,10 @@ -<?php /* THIS FILE IS GENERATED from info.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <form name="<?php echo O::escapeHtml('') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-target="<?php echo O::escapeHtml('view') ?>" action="<?php echo O::escapeHtml('./') ?>" data-method="<?php echo O::escapeHtml('info') ?>" data-action="<?php echo O::escapeHtml('user') ?>" data-id="<?php echo O::escapeHtml(''.@$_id.'') ?>" method="<?php echo O::escapeHtml('POST') ?>" enctype="<?php echo O::escapeHtml('application/x-www-form-urlencoded') ?>" data-async="<?php echo O::escapeHtml('') ?>" data-autosave="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-form or-user') ?>"><?php echo O::escapeHtml('') ?> +<?php /* THIS FILE IS GENERATED from edit.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> + <form name="<?php echo O::escapeHtml('') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-target="<?php echo O::escapeHtml('view') ?>" action="<?php echo O::escapeHtml('./') ?>" data-method="<?php echo O::escapeHtml('edit') ?>" data-action="<?php echo O::escapeHtml('user') ?>" data-id="<?php echo O::escapeHtml(''.@$_id.'') ?>" method="<?php echo O::escapeHtml('POST') ?>" enctype="<?php echo O::escapeHtml('application/x-www-form-urlencoded') ?>" data-async="<?php echo O::escapeHtml('') ?>" data-autosave="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-form or-user') ?>"><?php echo O::escapeHtml('') ?> <div class="<?php echo O::escapeHtml('or-form-headline') ?>"><?php echo O::escapeHtml('') ?></div> <div class="<?php echo O::escapeHtml('or-form-content') ?>"><?php echo O::escapeHtml('') ?> <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('token') ?>" value="<?php echo O::escapeHtml(''.@$_token.'') ?>" /><?php echo O::escapeHtml('') ?> <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('action') ?>" value="<?php echo O::escapeHtml('user') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('info') ?>" /><?php echo O::escapeHtml('') ?> + <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('edit') ?>" /><?php echo O::escapeHtml('') ?> <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('id') ?>" value="<?php echo O::escapeHtml(''.@$_id.'') ?>" /><?php echo O::escapeHtml('') ?> <span class="<?php echo O::escapeHtml('or-headline') ?>"><?php echo O::escapeHtml(''.@$fullname.'') ?></span> <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> @@ -87,85 +87,6 @@ </section> </div> </section> - <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-closed or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> - <h2 class="<?php echo O::escapeHtml('or-collapsible-title or-group-title or-collapsible-act-switch') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-closed or-collapsible--on-closed') ?>"><?php echo O::escapeHtml('') ?></i> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-open or-collapsible--on-open') ?>"><?php echo O::escapeHtml('') ?></i> - <span><?php echo O::escapeHtml(''.@O::lang('options').'') ?></span> - </h2> - <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <label><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('checkbox') ?>" name="<?php echo O::escapeHtml('is_admin') ?>" disabled="<?php echo O::escapeHtml('disabled') ?>" value="<?php echo O::escapeHtml('1') ?>" <?php if(@$is_admin){ ?>checked="<?php echo O::escapeHtml('checked') ?>"<?php } ?> class="<?php echo O::escapeHtml('or-form-checkbox') ?>" /><?php echo O::escapeHtml('') ?> - <span class="<?php echo O::escapeHtml('or-form-label') ?>"><?php echo O::escapeHtml(''.@O::lang('user_admin').'') ?></span> - </label> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('user_ldapdn').'') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$ldap_dn.'') ?></span> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('user_style').'') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$style.'') ?></span> - </div> - </section> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-group or-collapsible or-collapsible--is-closed or-collapsible--show') ?>"><?php echo O::escapeHtml('') ?> - <h2 class="<?php echo O::escapeHtml('or-collapsible-title or-group-title or-collapsible-act-switch') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-closed or-collapsible--on-closed') ?>"><?php echo O::escapeHtml('') ?></i> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--node-open or-collapsible--on-open') ?>"><?php echo O::escapeHtml('') ?></i> - <span><?php echo O::escapeHtml(''.@O::lang('security').'') ?></span> - </h2> - <div class="<?php echo O::escapeHtml('or-collapsible-value or-group-value') ?>"><?php echo O::escapeHtml('') ?> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('user_password_expires').'') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <?php include_once( 'modules/template_engine/components/html/component_date/component-date.php'); { component_date($passwordExpires); ?> - <?php } ?> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml('') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-') ?>"><?php echo O::escapeHtml('') ?> - <a target="<?php echo O::escapeHtml('_self') ?>" data-type="<?php echo O::escapeHtml('dialog') ?>" data-action="<?php echo O::escapeHtml('user') ?>" data-method="<?php echo O::escapeHtml('pw') ?>" data-id="<?php echo O::escapeHtml(''.@$userid.'') ?>" data-extra-dialogAction="<?php echo O::escapeHtml('user') ?>" data-extra-dialogMethod="<?php echo O::escapeHtml('pw') ?>" data-extra="<?php echo O::escapeHtml('{\'dialogAction\':\'user\',\'dialogMethod\':\'pw\'}') ?>" href="<?php echo O::escapeHtml('#/user/'.@$userid.'') ?>" class="<?php echo O::escapeHtml('or-link or-btn or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('edit_password').'') ?></span> - </a> - </div> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('user_last_login').'') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <?php include_once( 'modules/template_engine/components/html/component_date/component-date.php'); { component_date($lastLogin); ?> - <?php } ?> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('token').'') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$totpToken.'') ?></span> - </div> - </section> - <section class="<?php echo O::escapeHtml('or-fieldset') ?>"><?php echo O::escapeHtml('') ?> - <h3 class="<?php echo O::escapeHtml('or-fieldset-label') ?>"><?php echo O::escapeHtml(''.@O::lang('user_totp').'') ?></h3> - <div class="<?php echo O::escapeHtml('or-fieldset-value') ?>"><?php echo O::escapeHtml('') ?> - <label><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('checkbox') ?>" name="<?php echo O::escapeHtml('totp') ?>" value="<?php echo O::escapeHtml('1') ?>" <?php if(@$totp){ ?>checked="<?php echo O::escapeHtml('checked') ?>"<?php } ?> class="<?php echo O::escapeHtml('or-form-checkbox') ?>" /><?php echo O::escapeHtml('') ?> - <span class="<?php echo O::escapeHtml('or-form-label') ?>"><?php echo O::escapeHtml(''.@O::lang('user_totp').'') ?></span> - </label> - <i data-qrcode="<?php echo O::escapeHtml(''.@$totpSecretUrl.'') ?>" title="<?php echo O::escapeHtml(''.@O::lang('QRCODE_SHOW').'') ?>" class="<?php echo O::escapeHtml('or-btn or-image-icon or-image-icon--menu-qrcode or-qrcode or-info') ?>"><?php echo O::escapeHtml('') ?></i> - </div> - </section> - </div> - </section> </div> <div class="<?php echo O::escapeHtml('or-form-actionbar') ?>"><?php echo O::escapeHtml('') ?></div> </form> \ 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 @@ -1711,6 +1711,7 @@ Openrat.View = function( action,method,id,params ) { let form = new Openrat.Form(); form.close = function() { + view.close(); } @@ -2582,6 +2583,16 @@ Openrat.Workbench = new function() view.close = function() { + let isDirty = $('.or-view--is-dirty').length; // has this view unsaved changes? + + if ( isDirty ) { + // ask the user if we should close this dialog + let exit = window.confirm( Openrat.Workbench.language.UNSAVED_CHANGES_CONFIRM ); + + if ( ! exit ) + return; + } + // Strong modal dialogs are unable to close. // Really? if ( $('.or-dialog').hasClass('or-dialog--modal') ) diff --git a/modules/cms/ui/themes/default/script/openrat.min.js b/modules/cms/ui/themes/default/script/openrat.min.js @@ -1183,7 +1183,7 @@ else{}});$.each(e['errors'],function(e,t){$('.or-input[name='+t+']').addClass('i else{return undefined}})};this.openModalDialog=function(){if($('#dialog').data('action')){this.startDialog('',$('#dialog').data('action'),$('#dialog').data('action'),0,{})}};this.initializeState=function(){let parts=window.location.hash.split('/');let state={action:'index',id:0};if(parts.length>=2)state.action=parts[1].toLowerCase();if(parts.length>=3)state.id=parts[2].replace(/[^0-9_]/gim,'');Openrat.Workbench.state=state;Openrat.Navigator.toActualHistory(state)};this.initializePingTimer=function(){let ping=function(){let pingPromise=$.getJSON(Openrat.View.createUrl('profile','ping',0,{},!0));console.debug('ping');pingPromise.fail(function(e,t,i){console.warn({message:'The server ping has failed.',jqXHR:e,status:t,error:i});if($('.view.dirty').length>0){window.alert('The server session is lost, please save your data.')} else{}})};let timeoutMinutes=5;window.setInterval(ping,timeoutMinutes*60*1000)};this.loadNewActionState=function(e){Openrat.Workbench.state=e;Openrat.Workbench.loadNewAction(e.action,e.id,e.data);this.afterNewActionHandler.fire()};this.afterNewActionHandler=$.Callbacks();this.afterAllViewsLoaded=$.Callbacks();this.loadNewAction=function(e,t,i){this.reloadViews()};this.reloadViews=function(){$('.or-workbench-section--is-closed .or-act-view-loader').empty();let promise=Openrat.Workbench.loadViews($('.or-workbench .or-act-view-loader'));promise.done(function(){Openrat.Workbench.afterAllViewsLoaded.fire()});return promise};this.reloadAll=function(){let promise=Openrat.Workbench.loadViews($('.or-act-view-loader,.or-act-view-static').empty());console.debug('reloading all views');promise.done(function(){Openrat.Workbench.afterAllViewsLoaded.fire()});this.loadUserStyle();this.loadLanguage();this.loadUISettings();return promise};this.loadUserStyle=function(){let url=Openrat.View.createUrl('profile','userinfo',0,{},!0);$.getJSON(url,function(e){let style=e.output['style'];Openrat.Workbench.setUserStyle(style);let color=e.output['theme-color'];Openrat.Workbench.setThemeColor(color)})};this.settings={};this.language={};this.loadLanguage=function(){let url=Openrat.View.createUrl('profile','language',0,{},!0);$.getJSON(url,function(e){Openrat.Workbench.language=e.output.language})};this.loadUISettings=function(){let url=Openrat.View.createUrl('profile','uisettings',0,{},!0);$.getJSON(url,function(e){Openrat.Workbench.settings=e.output.settings.settings})};this.loadViews=function(e){let promises=[];e.each(function(e){let $targetDOMElement=$(this);promises.push(Openrat.Workbench.loadNewActionIntoElement($targetDOMElement))});return $.when.apply($,promises)};this.loadNewActionIntoElement=function(e){let action;if(e.is('.or-act-view-static'))action=e.attr('data-action');else action=Openrat.Workbench.state.action;let id=Openrat.Workbench.state.id;let params=Openrat.Workbench.state.extra;let method=e.data('method');let view=new Openrat.View(action,method,id,params);return view.start(e)};this.setUserStyle=function(e){var t=$('html'),i=t.attr('class').split(/\s+/);$.each(i,function(e,i){if(i.startsWith('or-theme-')){t.removeClass(i.substring(3))}});t.addClass('theme-'+e.toLowerCase())};this.setThemeColor=function(e){$('#theme-color').attr('content',e)};let notifyBrowser=function(e){if(!('Notification' in window)){return} else if(Notification.permission==='granted'){let notification=new Notification(e)} -else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){let notification=new Notification(e)}})}};this.notify=function(t,i,o,n,a,log=null,notifyTheBrowser=!1){if(notifyTheBrowser)notifyBrowser(a);let notice=$('<div class="or-notice or-notice--'+n+'"></div>');let toolbar=$('<div class="or-notice-toolbar"></div>');if(log)$(toolbar).append('<i class="or-act-notice-full or-image-icon or-image-icon--menu-fullscreen"></i>');$(toolbar).append('<i class="or-image-icon or-image-icon--menu-close or-act-notice-close"></i>');$(notice).append(toolbar);if(o)$(notice).append('<div class="or-notice-name"><a class="or-act-clickable" href="'+Openrat.Navigator.createShortUrl(t,i)+'" data-type="open" data-action="'+t+'" data-id="'+i+'"><i class="or-notice-action-full or-image-icon or-image-icon--action-'+t+'"></i> '+o+'</a></div>');$(notice).append('<div class="or-notice-text">'+e(a)+'</div>');if(log)$(notice).append('<div class="or-notice-log"><pre>'+e(log)+'</pre></div>');$('#noticebar').prepend(notice);$(notice).orLinkify();$(notice).find('.or-act-notice-full').click(function(){$(notice).toggleClass('notice--is-full')});$(notice).find('.or-act-notice-close').click(function(){$(notice).fadeOut('fast',function(){$(notice).remove()})});let timeout=1;if(n=='ok')timeout=3;if(n=='info')timeout=10;if(n=='warning')timeout=15;if(n=='error')timeout=20;if(timeout>0)setTimeout(function(){$(notice).fadeOut('slow',function(){$(this).remove()})},timeout*1000)};this.dataChangedHandler=$.Callbacks();this.dataChangedHandler.add(function(){if(Openrat.Workbench.popupWindow)Openrat.Workbench.popupWindow.location.reload()});this.afterViewLoadedHandler=$.Callbacks();this.setApplicationTitle=function(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};var e=function(e){return String(e).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;')};this.registerOpenClose=function(e){$(e).children('.or-collapsible-act-switch').click(function(){$(this).closest('.or-collapsible').toggleClass('collapsible--is-open').toggleClass('collapsible--is-closed')})};this.openNewAction=function(e,t,i){$('.or-workbench-navigation').removeClass('workbench-navigation--is-open');Openrat.Workbench.setApplicationTitle(e);Openrat.Navigator.navigateToNew({'action':t,'id':i})};this.startDialog=function(e,t,i,o,n){if(!t)t=Openrat.Workbench.state.action;if(!o)o=Openrat.Workbench.state.id;let view=new Openrat.View(t,i,o,n);view.before=function(){$('.or-dialog-content .or-view').html('<div class="header"><img class="or-icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('.or-dialog-content .or-view').data('id',o);$('.or-dialog').removeClass('dialog--is-closed').addClass('dialog--is-open');$('.or-dialog-content .or-act-dialog-name').html(e);let view=this;this.escapeKeyClosingHandler=function(e){if(e.keyCode==27){view.close();$(document).off('keyup')}};$(document).keyup(this.escapeKeyClosingHandler);$('.or-dialog-filler,.or-act-dialog-close').click(function(e){e.preventDefault();view.close()})};view.close=function(){if($('.or-dialog').hasClass('or-dialog--modal'))return;$('.or-dialog-content .or-view.or-view--is-dirty').removeClass('view--is-dirty');$('.or-dialog-content .or-view').html('');$('.or-dialog').removeClass('dialog--is-open').addClass('dialog--is-closed');$(document).unbind('keyup',this.escapeKeyClosingHandler)};return view.start($('.or-dialog-content .or-view'))};this.registerDraggable=function(e){$(e).find('.or-draggable').draggable({helper:'clone',opacity:0.7,zIndex:2,distance:10,cursor:'move',revert:'false'})};this.registerDroppable=function(e){$(e).find('.or-droppable').droppable({accept:'.or-draggable',hoverClass:'or-droppable--hover',activeClass:'or-droppable--active',drop:function(e,t){let dropped=t.draggable;let id=dropped.data('id');let name=dropped.data('name');if(!name)name=id;$(this).find('.or-selector-link-value').val(id);$(this).find('.or-selector-link-name').val(name).attr('placeholder',name)}})}}; +else if(Notification.permission!=='denied'){Notification.requestPermission(function(t){if(t==='granted'){let notification=new Notification(e)}})}};this.notify=function(t,i,o,n,a,log=null,notifyTheBrowser=!1){if(notifyTheBrowser)notifyBrowser(a);let notice=$('<div class="or-notice or-notice--'+n+'"></div>');let toolbar=$('<div class="or-notice-toolbar"></div>');if(log)$(toolbar).append('<i class="or-act-notice-full or-image-icon or-image-icon--menu-fullscreen"></i>');$(toolbar).append('<i class="or-image-icon or-image-icon--menu-close or-act-notice-close"></i>');$(notice).append(toolbar);if(o)$(notice).append('<div class="or-notice-name"><a class="or-act-clickable" href="'+Openrat.Navigator.createShortUrl(t,i)+'" data-type="open" data-action="'+t+'" data-id="'+i+'"><i class="or-notice-action-full or-image-icon or-image-icon--action-'+t+'"></i> '+o+'</a></div>');$(notice).append('<div class="or-notice-text">'+e(a)+'</div>');if(log)$(notice).append('<div class="or-notice-log"><pre>'+e(log)+'</pre></div>');$('#noticebar').prepend(notice);$(notice).orLinkify();$(notice).find('.or-act-notice-full').click(function(){$(notice).toggleClass('notice--is-full')});$(notice).find('.or-act-notice-close').click(function(){$(notice).fadeOut('fast',function(){$(notice).remove()})});let timeout=1;if(n=='ok')timeout=3;if(n=='info')timeout=10;if(n=='warning')timeout=15;if(n=='error')timeout=20;if(timeout>0)setTimeout(function(){$(notice).fadeOut('slow',function(){$(this).remove()})},timeout*1000)};this.dataChangedHandler=$.Callbacks();this.dataChangedHandler.add(function(){if(Openrat.Workbench.popupWindow)Openrat.Workbench.popupWindow.location.reload()});this.afterViewLoadedHandler=$.Callbacks();this.setApplicationTitle=function(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};var e=function(e){return String(e).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;')};this.registerOpenClose=function(e){$(e).children('.or-collapsible-act-switch').click(function(){$(this).closest('.or-collapsible').toggleClass('collapsible--is-open').toggleClass('collapsible--is-closed')})};this.openNewAction=function(e,t,i){$('.or-workbench-navigation').removeClass('workbench-navigation--is-open');Openrat.Workbench.setApplicationTitle(e);Openrat.Navigator.navigateToNew({'action':t,'id':i})};this.startDialog=function(e,t,i,o,n){if(!t)t=Openrat.Workbench.state.action;if(!o)o=Openrat.Workbench.state.id;let view=new Openrat.View(t,i,o,n);view.before=function(){$('.or-dialog-content .or-view').html('<div class="header"><img class="or-icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+e+'</div>');$('.or-dialog-content .or-view').data('id',o);$('.or-dialog').removeClass('dialog--is-closed').addClass('dialog--is-open');$('.or-dialog-content .or-act-dialog-name').html(e);let view=this;this.escapeKeyClosingHandler=function(e){if(e.keyCode==27){view.close();$(document).off('keyup')}};$(document).keyup(this.escapeKeyClosingHandler);$('.or-dialog-filler,.or-act-dialog-close').click(function(e){e.preventDefault();view.close()})};view.close=function(){let isDirty=$('.or-view--is-dirty').length;if(isDirty){let exit=window.confirm(Openrat.Workbench.language.UNSAVED_CHANGES_CONFIRM);if(!exit)return};if($('.or-dialog').hasClass('or-dialog--modal'))return;$('.or-dialog-content .or-view.or-view--is-dirty').removeClass('view--is-dirty');$('.or-dialog-content .or-view').html('');$('.or-dialog').removeClass('dialog--is-open').addClass('dialog--is-closed');$(document).unbind('keyup',this.escapeKeyClosingHandler)};return view.start($('.or-dialog-content .or-view'))};this.registerDraggable=function(e){$(e).find('.or-draggable').draggable({helper:'clone',opacity:0.7,zIndex:2,distance:10,cursor:'move',revert:'false'})};this.registerDroppable=function(e){$(e).find('.or-droppable').droppable({accept:'.or-draggable',hoverClass:'or-droppable--hover',activeClass:'or-droppable--active',drop:function(e,t){let dropped=t.draggable;let id=dropped.data('id');let name=dropped.data('name');if(!name)name=id;$(this).find('.or-selector-link-value').val(id);$(this).find('.or-selector-link-name').val(name).attr('placeholder',name)}})}}; ;Openrat.Navigator=new function(){'use strict';this.navigateTo=function(t){Openrat.Workbench.loadNewActionState(t)};this.navigateToNew=function(t){this.navigateTo(t);window.history.pushState(t,t.name,this.createShortUrl(t.action,t.id))};this.toActualHistory=function(t){window.history.replaceState(t,t.name,this.createShortUrl(t.action,t.id))};this.createShortUrl=function(t,i){return'./#/'+t+(i?'/'+i:'')}}; ;$(function(){$('html').removeClass('nojs');$('.or--initial-hidden').removeClass('-initial-hidden');function n(){};n();window.onpopstate=function(e){Openrat.Navigator.navigateTo(e.state)};Openrat.Workbench.initialize();Openrat.Workbench.reloadAll();let registerWorkbenchGlobalEvents=function(){$('.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)})};$('.or-act-initial-notice').each(function(){Openrat.Workbench.notify('',0,'','info',$(this).text());$(this).remove()});registerWorkbenchGlobalEvents();let closeMenu=function(){$('body').click(function(){$('.or-menu').removeClass('menu--is-open')})};closeMenu();let closeMobileNavigation=function(){$('.or-act-navigation-close').click(function(){$('.or-workbench-navigation').removeClass('workbench-navigation--is-open');$('.or-workbench').removeClass('workbench--navigation-is-open')})};closeMobileNavigation();let closeDesktopNavigation=function(){$('.or-workbench-title .or-act-nav-small').click(function(){$('.or-workbench').addClass('workbench--navigation-is-small');$('.or-workbench-navigation').addClass('workbench-navigation--is-small')})};closeDesktopNavigation();let registerGlobalSearch=function(){$('.or-search .or-input').orSearch({dropdown:'.or-act-search-result',resultEntryClass:'or-search-result-entry',select:function(e){Openrat.Workbench.openNewAction(e.name,e.action,e.id)},afterSelect:function(){}});$('.or-search .or-act-search-delete').click(function(){$('.or-search .or-title-input').val('').change()})};registerGlobalSearch();Openrat.Workbench.afterNewActionHandler.add(function(){$('.or-sidebar').find('.or-sidebar-button').orLinkify()});Openrat.Workbench.afterNewActionHandler.add(function(){let url=Openrat.View.createUrl('tree','path',Openrat.Workbench.state.id,{'type':Openrat.Workbench.state.action});let loadPromise=$.get(url);loadPromise.done(function(e){$('.or-breadcrumb').empty().append(e).find('.or-act-clickable').orLinkify();$('nav .or-navtree-node').removeClass('or-navtree-node--selected');$('.or-breadcrumb a').each(function(){let action=$(this).data('action');let id=$(this).data('id');let $navControl=$('nav .or-navtree-node[data-type='+action+'][data-id='+id+'].or-navtree-node--is-closed .or-navtree-node-control');$navControl.click()})}).fail(function(n,t,o){console.warn({message:'Failed to load path',url:url,error:e,status:t,o})}).always(function(){})});Openrat.Workbench.afterNewActionHandler.fire()});let filterMenus=function(){let action=Openrat.Workbench.state.action;let id=Openrat.Workbench.state.id;$('.or-workbench-title .or-dropdown-entry.or-act-clickable').addClass('dropdown-entry--active');$('.or-workbench-title .or-dropdown-entry.or-act-clickable.or-filtered').removeClass('dropdown-entry--active').addClass('dropdown-entry--inactive');$('.or-workbench-title .or-dropdown-entry.or-act-clickable.or-filtered .or-link').attr('data-id',id);let url=Openrat.View.createUrl('profile','available',id,{'queryaction':action},!0);let promise=$.getJSON(url);promise.done(function(e){jQuery.each(e.output.views,function(e,n){$('.or-workbench-title .or-dropdown-entry.or-act-clickable.or-filtered > .or-link[data-method=\''+n+'\']').parent().addClass('dropdown-entry--active').removeClass('dropdown-entry--inactive')})})};Openrat.Workbench.afterAllViewsLoaded.add(function(){filterMenus()});Openrat.Workbench.afterViewLoadedHandler.add(function(e){if(Openrat.Workbench.popupWindow)$(e).find('a[data-type=\'popup\']').each(function(){Openrat.Workbench.popupWindow.location.href=$(this).attr('data-url')})});Openrat.Workbench.afterViewLoadedHandler.add(function(e){$(e).find('.or-input--password').dblclick(function(){$(this).toggleAttr('type','text','password')});$(e).find('.or-act-make-visible').click(function(){$(this).toggleClass('btn--is-active');$(this).parent().children('input').toggleAttr('type','text','password')})});Openrat.Workbench.afterViewLoadedHandler.add(function(e){e.find('.or-act-load-nav-tree').each(function(){let type=$(this).data('type')||'root';let loadBranchUrl='./?action=tree&subaction=branch&id=0&type='+type;let $targetElement=$(this);$.get(loadBranchUrl).done(function(e){let $ul=$('<ul class="or-navtree-list" />');$ul.appendTo($targetElement.empty()).append(e);$ul.find('li').orTree({'openAction':function(e,n,t){Openrat.Workbench.openNewAction(e,n,t)}});$ul.find('.or-act-clickable').orLinkify();$ul.find('.or-navtree-node-control').first().click()})})});Openrat.Workbench.afterViewLoadedHandler.add(function(e){var n=$(e).closest('section');n.toggleClass('is-empty',$(e).is(':empty'));if(!$(e).is(':empty'))n.slideDown('fast');else n.slideUp('fast');$(e).find('.or-act-nav-open-close').click(function(){$('.or-workbench').toggleClass('workbench--navigation-is-open');$('.or-workbench-navigation').toggleClass('workbench-navigation--is-open')});$(e).find('.or-act-nav-small').click(function(){$('.or-workbench').addClass('workbench--navigation-is-small');$('.or-workbench-navigation').addClass('workbench-navigation--is-small')});$(e).find('.or-act-nav-wide').click(function(){$('.or-workbench').removeClass('workbench--navigation-is-small');$('.or-workbench-navigation').removeClass('workbench-navigation--is-small')});$(e).find('.or-act-load-selector-tree').each(function(){var n=this;let id=$(this).data('init-folder-id');let type=id?'folder':'projects';let loadBranchUrl='./?action=tree&subaction=branch&id='+id+'&type='+type;let $targetElement=$(this);$.get(loadBranchUrl).done(function(n){let $ul=$('<ul class="or-navtree-list" />');$ul.appendTo($targetElement.empty()).append(n);$ul.find('li').orTree({'openAction':function(n,t,o){e.find('.or-selector-link-value').val(o);e.find('.or-selector-link-name').val('').attr('placeholder',n)}});$ul.find('.or-act-clickable').orLinkify();$ul.find('.or-navtree-node-control').first().click()})});t(e);$(e).find('.or-input').change(function(){$(this).closest('.or-view').addClass('view--is-dirty')});$(e).find('.or-theme-chooser').change(function(){Openrat.Workbench.setUserStyle(this.value)});function o(e){$(e).find('.or-menu-category').click(function(e){e.stopPropagation();$(this).parents('.or-menu').toggleClass('menu--is-open')});$(e).find('.or-menu-category').mouseover(function(){$(this).parents('.or-menu').find('.or-menu-category').removeClass('menu-category--is-open');$(this).addClass('menu-category--is-open')})};function r(e){$(e).find('.or-selector .or-selector-link-name').orSearch({dropdown:'.or-dropdown.or-act-selector-search-results',resultEntryClass:'or-search-result-entry',select:function(n){$(e).find('.or-selector-link-value').val(n.id);$(e).find('.or-selector-link-name').val(n.name).attr('placeholder',n.name)},afterSelect:function(){$('.or-dropdown.or-act-selector-search-results').empty()}})};function a(e){};o(e);r(e);a(e);function t(e){Openrat.Workbench.registerDraggable(e);Openrat.Workbench.registerDroppable(e)};t(e)}); ;Openrat.Workbench.afterViewLoadedHandler.add(function(e){}); diff --git a/modules/cms/ui/themes/default/script/openrat/view.js b/modules/cms/ui/themes/default/script/openrat/view.js @@ -68,6 +68,7 @@ Openrat.View = function( action,method,id,params ) { let form = new Openrat.Form(); form.close = function() { + view.close(); } diff --git a/modules/cms/ui/themes/default/script/openrat/workbench.js b/modules/cms/ui/themes/default/script/openrat/workbench.js @@ -512,6 +512,16 @@ Openrat.Workbench = new function() view.close = function() { + let isDirty = $('.or-view--is-dirty').length; // has this view unsaved changes? + + if ( isDirty ) { + // ask the user if we should close this dialog + let exit = window.confirm( Openrat.Workbench.language.UNSAVED_CHANGES_CONFIRM ); + + if ( ! exit ) + return; + } + // Strong modal dialogs are unable to close. // Really? if ( $('.or-dialog').hasClass('or-dialog--modal') ) diff --git a/modules/cms/ui/themes/default/style/openrat-form.less b/modules/cms/ui/themes/default/style/openrat-form.less @@ -23,6 +23,7 @@ &-content { flex-grow: 1; + padding-bottom: 6em; //overflow-y: auto; } diff --git a/modules/cms/ui/themes/default/style/openrat.css b/modules/cms/ui/themes/default/style/openrat.css @@ -1149,6 +1149,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. } .or-form-content { flex-grow: 1; + padding-bottom: 6em; } .or-form-row { display: flex; @@ -1234,7 +1235,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. min-width: 0; } } -/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22mnt%5C%2Fdata%5C%2Fdankert%5C%2FEntwicklung%5C%2FProjekte%5C%2Fopenrat-cms%5C%2Fmodules%5C%2Fcms%5C%2Fui%5C%2Fthemes%5C%2Fdefault%5C%2Fstyle%5C%2Fopenrat-form.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22AAWA%3B%3B%3BAAEI%2CGAAC%3BCACG%3BCACA%3BCACA%3BCACA%3B%3BAAEA%2CGANH%2CKAMI%3BCACG%3B%3BAAGJ%2CGAVH%2CKAUI%3BCACG%3B%3BAAKJ%2CGAhBH%2CKAgBI%3BCACG%3BCACA%3B%3BAAFJ%2CGAhBH%2CKAgBI%2CIAIG%3BCACI%3B%3BAALR%2CGAhBH%2CKAgBI%2CIAQG%3BCACI%3B%3BAAYR%3BCAAA%2CGArCH%2CKAgBI%3BEAcO%3B%3BCAOR%2CGArCH%2CKAgBI%2CIAgBO%3BCAKR%2CGArCH%2CKAgBI%2CIAiBO%3BEACI%3B%3B%3BAAMZ%2CGAxCH%2CKAwCI%3BCAEG%3BCACA%3BCACA%3BCACA%3BCACA%3BCAEA%3BCACA%3BCACA%3BCACA%3B%3BAAaR%3BCAAA%2CGAhEC%2CKA0DO%3BEACI%3B%3B%3BAAQZ%2CGAAC%3BCACG%3BCACA%2CsBAAA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3B%3BAAEA%2CGAVH%2CMAUI%3BCACG%3B%3BAAGJ%2CGAdH%2CMAcI%3BAAAY%2CGAdhB%2CMAciB%3BCACV%2CaAAa%2CiDAAb%3B%3BAAQR%2CGAAC%3BCACG%3BCACA%2CyBAAA%3BCAtGJ%2CoBAAA%3BCACA%2CyBAAA%3BCACA%2C4BAAA%3BCACA%2C2BAAA%3BCAqGI%3B%3BAAEA%2CGANH%2CIAMI%3BCACG%2CgBAAA%3BCACA%3BCACA%3BCA7GR%2CoBAAA%3BCACA%2CyBAAA%3BCACA%2C4BAAA%3BCACA%2C2BAAA%3B%3BAAiHI%3BCAAA%2CGAhBH%2CIAMI%3BEAOO%2CgBAAA%3BEACA%3B%3B%3BAAIR%2CGAlBH%2CIAkBI%3BCACG%3B%3BAAOJ%3BCAAA%2CGA1BH%2CIAsBI%3BEAEO%22%7D */ +/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22mnt%5C%2Fdata%5C%2Fdankert%5C%2FEntwicklung%5C%2FProjekte%5C%2Fopenrat-cms%5C%2Fmodules%5C%2Fcms%5C%2Fui%5C%2Fthemes%5C%2Fdefault%5C%2Fstyle%5C%2Fopenrat-form.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22AAWA%3B%3B%3BAAEI%2CGAAC%3BCACG%3BCACA%3BCACA%3BCACA%3B%3BAAEA%2CGANH%2CKAMI%3BCACG%3B%3BAAGJ%2CGAVH%2CKAUI%3BCACG%3BCACA%3B%3BAAKJ%2CGAjBH%2CKAiBI%3BCACG%3BCACA%3B%3BAAFJ%2CGAjBH%2CKAiBI%2CIAIG%3BCACI%3B%3BAALR%2CGAjBH%2CKAiBI%2CIAQG%3BCACI%3B%3BAAYR%3BCAAA%2CGAtCH%2CKAiBI%3BEAcO%3B%3BCAOR%2CGAtCH%2CKAiBI%2CIAgBO%3BCAKR%2CGAtCH%2CKAiBI%2CIAiBO%3BEACI%3B%3B%3BAAMZ%2CGAzCH%2CKAyCI%3BCAEG%3BCACA%3BCACA%3BCACA%3BCACA%3BCAEA%3BCACA%3BCACA%3BCACA%3B%3BAAaR%3BCAAA%2CGAjEC%2CKA2DO%3BEACI%3B%3B%3BAAQZ%2CGAAC%3BCACG%3BCACA%2CsBAAA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3B%3BAAEA%2CGAVH%2CMAUI%3BCACG%3B%3BAAGJ%2CGAdH%2CMAcI%3BAAAY%2CGAdhB%2CMAciB%3BCACV%2CaAAa%2CiDAAb%3B%3BAAQR%2CGAAC%3BCACG%3BCACA%2CyBAAA%3BCAvGJ%2CoBAAA%3BCACA%2CyBAAA%3BCACA%2C4BAAA%3BCACA%2C2BAAA%3BCAsGI%3B%3BAAEA%2CGANH%2CIAMI%3BCACG%2CgBAAA%3BCACA%3BCACA%3BCA9GR%2CoBAAA%3BCACA%2CyBAAA%3BCACA%2C4BAAA%3BCACA%2C2BAAA%3B%3BAAkHI%3BCAAA%2CGAhBH%2CIAMI%3BEAOO%2CgBAAA%3BEACA%3B%3B%3BAAIR%2CGAlBH%2CIAkBI%3BCACG%3B%3BAAOJ%3BCAAA%2CGA1BH%2CIAsBI%3BEAEO%22%7D */ /* Include style: /mnt/data/dankert/Entwicklung/Projekte/openrat-cms/modules/cms/ui/themes/default/style/openrat-nojs */ .or-nojs-text { display: block; diff --git a/modules/cms/ui/themes/default/style/openrat.min.css b/modules/cms/ui/themes/default/style/openrat.min.css @@ -12,7 +12,7 @@ html,body{width: 100%;height: 100%}@media only screen and (min-width: 56rem){bod .or-breadcrumb{margin-left: 1.5em;margin-right: 0.5em}.or-breadcrumb > *{vertical-align: middle;display: inline;margin-right: 0.3em}@media only screen and (min-width: 100rem){.or-breadcrumb-parent{display: none}}.or-breadcrumb-path{display: none}@media only screen and (min-width: 100rem){.or-breadcrumb-path{display: inline}}.or-breadcrumb-text{font-weight: bold;width: 12em;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;display: inline-block}@media only screen and (max-width: 55rem){.or-breadcrumb-text{width: 5.5em}} .or-diff-line{text-align: right}.or-diff-text--old{background-color: #f88989;color: black}.or-diff-text--new{background-color: #7bad7b;color: black}.or-diff-text--notequal{background-color: #cbcb16;color: black} .or-collapsible{display: flex;flex-direction: column}.or-collapsible .or-collapsible-act-switch{cursor: pointer}.or-collapsible > .or-collapsible-value{flex: 1;display: block}.or-collapsible > .or-collapsible-title{padding-bottom: 0.1em}.or-collapsible--is-closed > * > .or-collapsible--on-closed{display: inline}.or-collapsible--is-closed > * > .or-collapsible--on-open{display: none}.or-collapsible--is-closed > .or-collapsible-value{opacity: 0;max-height: 0;overflow: hidden}.or-collapsible--is-open > .or-collapsible-value{height: auto}.or-collapsible--is-open > * > .or-collapsible--on-closed{display: none}.or-collapsible--is-open > * > .or-collapsible--on-open{display: inline} -.or-form{display: flex;height: 100%;flex-direction: column;padding: 1em}.or-form-headline{height: 2em}.or-form-content{flex-grow: 1}.or-form-row{display: flex;align-items: center}.or-form-row .or-form-label{width: 25%}.or-form-row .or-form-input{width: 75%}@media only screen and (max-width: 65rem){.or-form-row{flex-direction: column}.or-form-row .or-form-label,.or-form-row .or-form-input{width: 100%}}.or-form-actionbar{height: 3em;position: sticky;bottom: 0;left: 0;right: 0;display: flex;justify-content: end;padding: 1em;height: auto}@media only screen and (max-width: 65rem){.or-form .or-act-form-apply{display: none}}.or-input{width: 85%;border: 1px solid #ccc;border-radius: 4px;box-sizing: border-box;resize: vertical;padding: 2px;margin: 0;outline: none}.or-input--name{font-weight: bold}.or-input--filename,.or-input--extension{font-family: 'Source Code Pro', Monospace, Monospaced, Courier}.or-btn{padding: 0.2em;border: 1px solid #000;border-radius: .1em;-moz-border-radius: .1em;-webkit-border-radius: .1em;-khtml-border-radius: .1em;cursor: pointer}.or-btn--control{padding: 1em 2em;margin-left: 1.5em;min-width: 14em;border-radius: .5em;-moz-border-radius: .5em;-webkit-border-radius: .5em;-khtml-border-radius: .5em}@media only screen and (max-width: 65rem){.or-btn--control{padding: 1em 1em;min-width: 5em}}.or-btn--primary{font-weight: bold}@media only screen and (max-width: 65rem){.or-btn--secondary{min-width: 0}} +.or-form{display: flex;height: 100%;flex-direction: column;padding: 1em}.or-form-headline{height: 2em}.or-form-content{flex-grow: 1;padding-bottom: 6em}.or-form-row{display: flex;align-items: center}.or-form-row .or-form-label{width: 25%}.or-form-row .or-form-input{width: 75%}@media only screen and (max-width: 65rem){.or-form-row{flex-direction: column}.or-form-row .or-form-label,.or-form-row .or-form-input{width: 100%}}.or-form-actionbar{height: 3em;position: sticky;bottom: 0;left: 0;right: 0;display: flex;justify-content: end;padding: 1em;height: auto}@media only screen and (max-width: 65rem){.or-form .or-act-form-apply{display: none}}.or-input{width: 85%;border: 1px solid #ccc;border-radius: 4px;box-sizing: border-box;resize: vertical;padding: 2px;margin: 0;outline: none}.or-input--name{font-weight: bold}.or-input--filename,.or-input--extension{font-family: 'Source Code Pro', Monospace, Monospaced, Courier}.or-btn{padding: 0.2em;border: 1px solid #000;border-radius: .1em;-moz-border-radius: .1em;-webkit-border-radius: .1em;-khtml-border-radius: .1em;cursor: pointer}.or-btn--control{padding: 1em 2em;margin-left: 1.5em;min-width: 14em;border-radius: .5em;-moz-border-radius: .5em;-webkit-border-radius: .5em;-khtml-border-radius: .5em}@media only screen and (max-width: 65rem){.or-btn--control{padding: 1em 1em;min-width: 5em}}.or-btn--primary{font-weight: bold}@media only screen and (max-width: 65rem){.or-btn--secondary{min-width: 0}} .or-nojs-text{display: block}.or-visible-for-nojs{display: none} .or-navigation--is-open{display: flex;flex-direction: row}.or-navigation-filler{height: 100%;width: 12em;opacity: 0.8;filter: blur(10em)}@media only screen and (max-width: 55rem){.or-navigation-filler{width: 0}}.or-navigation-filler-icon{opacity: 1;font-size: 3em;position: absolute;right: 20px;top: 20px}.or-navigation-content{flex: 1;height: 100%;z-index: 3}.or-navigation-content .or-view{height: 100%}.or-navtree-node{margin: 0;padding: .1em 0;line-height: 18px;font-weight: normal;white-space: nowrap}@media only screen and (max-width: 55rem){.or-navtree-node{padding: .2em 0}}.or-navtree-node--selected{font-weight: bold}.or-navtree-node--selected > div > a{font-weight: bold}.or-navtree-node-control{width: 18px;min-width: 18px;height: 18px;float: left;cursor: pointer}.or-navtree-list{list-style-type: none;margin: 0;padding: 0}.or-navtree-list ul{margin-left: 18px} .or-fieldset{border: 0;display: flex;flex-direction: row;align-items: start;margin-top: 1em}.or-fieldset-label{flex: 1;font-size: 1em;text-align: right;padding-right: 1em;font-weight: normal}.or-fieldset-value{flex: 3}.or-fieldset-value > *{display: block;padding: 0.8em}@media only screen and (max-width: 65rem){.or-fieldset{flex-direction: column}.or-fieldset-label{flex: 1;width: 100%;text-align: left}.or-fieldset-value{flex: 1;width: 100%}} diff --git a/modules/cms/ui/themes/default/style/theme/openrat-theme.less b/modules/cms/ui/themes/default/style/theme/openrat-theme.less @@ -347,8 +347,16 @@ html.or-theme-@{cms-theme-id} { } - &-collapsible-title { - border-color: @cms-main-title-text-color; + &-collapsible { + &-title { + border-color: @cms-main-background-color; + } + &--is-open { + .or-collapsible-title { + border-color: mix(@cms-main-text-color, @cms-main-background-color); + } + + } } &-btn, @@ -375,7 +383,14 @@ html.or-theme-@{cms-theme-id} { padding-bottom: 5em; } &-actionbar { - //background-color: @cms-dialog-title-background-color; + background-color: @cms-dialog-background-color; + .box-shadow(0,-2em,2em,@cms-dialog-background-color); + } + } + + &-fieldset { + &-label { + color: mix(@cms-main-text-color, @cms-main-background-color); } } } diff --git a/modules/language/Language_CN.class.php b/modules/language/Language_CN.class.php @@ -1351,5 +1351,6 @@ Thank you.', 'NO_RIGHTS'=>'No rights', 'FOLDER_NOT_WRITABLE'=>'Directory not writable', 'GROUP_PARENT'=>'Parent group', +'UNSAVED_CHANGES_CONFIRM'=>'There are unsaved changes. Do you really want to exit?', ];} } \ No newline at end of file diff --git a/modules/language/Language_DE.class.php b/modules/language/Language_DE.class.php @@ -1356,5 +1356,6 @@ Vielen Dank.', 'NO_RIGHTS'=>'Keine Berechtigung', 'FOLDER_NOT_WRITABLE'=>'Keine Schreibrechte im Verzeichnis', 'GROUP_PARENT'=>'Übergeordnete Gruppe', +'UNSAVED_CHANGES_CONFIRM'=>'Sie haben ungespeicherte Änderungen. Möchten Sie diese Ansicht tatsächlich verlassen?', ];} } \ No newline at end of file diff --git a/modules/language/Language_EN.class.php b/modules/language/Language_EN.class.php @@ -1351,5 +1351,6 @@ Thank you.', 'NO_RIGHTS'=>'No rights', 'FOLDER_NOT_WRITABLE'=>'Directory not writable', 'GROUP_PARENT'=>'Parent group', +'UNSAVED_CHANGES_CONFIRM'=>'There are unsaved changes. Do you really want to exit?', ];} } \ No newline at end of file diff --git a/modules/language/Language_ES.class.php b/modules/language/Language_ES.class.php @@ -1376,5 +1376,6 @@ MENU_INDEX_ADMINISTRATION_DESC =', 'NO_RIGHTS'=>'No rights', 'FOLDER_NOT_WRITABLE'=>'Directory not writable', 'GROUP_PARENT'=>'Parent group', +'UNSAVED_CHANGES_CONFIRM'=>'There are unsaved changes. Do you really want to exit?', ];} } \ No newline at end of file diff --git a/modules/language/Language_FR.class.php b/modules/language/Language_FR.class.php @@ -1352,5 +1352,6 @@ Merci.', 'NO_RIGHTS'=>'No rights', 'FOLDER_NOT_WRITABLE'=>'Directory not writable', 'GROUP_PARENT'=>'Parent group', +'UNSAVED_CHANGES_CONFIRM'=>'There are unsaved changes. Do you really want to exit?', ];} } \ No newline at end of file diff --git a/modules/language/Language_IT.class.php b/modules/language/Language_IT.class.php @@ -1352,5 +1352,6 @@ Gracias.', 'NO_RIGHTS'=>'No rights', 'FOLDER_NOT_WRITABLE'=>'Directory not writable', 'GROUP_PARENT'=>'Parent group', +'UNSAVED_CHANGES_CONFIRM'=>'There are unsaved changes. Do you really want to exit?', ];} } \ No newline at end of file diff --git a/modules/language/Language_RU.class.php b/modules/language/Language_RU.class.php @@ -1352,5 +1352,6 @@ if you do not know where this mail comes from, please ignore it.', 'NO_RIGHTS'=>'No rights', 'FOLDER_NOT_WRITABLE'=>'Directory not writable', 'GROUP_PARENT'=>'Parent group', +'UNSAVED_CHANGES_CONFIRM'=>'There are unsaved changes. Do you really want to exit?', ];} } \ No newline at end of file diff --git a/modules/language/Messages.class.php b/modules/language/Messages.class.php @@ -1305,4 +1305,5 @@ class Messages { const NO_RIGHTS = 'NO_RIGHTS'; const FOLDER_NOT_WRITABLE = 'FOLDER_NOT_WRITABLE'; const GROUP_PARENT = 'GROUP_PARENT'; + const UNSAVED_CHANGES_CONFIRM = 'UNSAVED_CHANGES_CONFIRM'; } \ No newline at end of file diff --git a/modules/language/language.yml b/modules/language/language.yml @@ -6491,4 +6491,7 @@ FOLDER_NOT_WRITABLE: en: Directory not writable GROUP_PARENT: de: Übergeordnete Gruppe - en: Parent group- \ No newline at end of file + en: Parent group +UNSAVED_CHANGES_CONFIRM: + en: There are unsaved changes. Do you really want to exit? + de: Sie haben ungespeicherte Änderungen. Möchten Sie diese Ansicht tatsächlich verlassen?+ \ No newline at end of file