openrat-cms

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

commit 62c4355fc50be7e3a561b0bc09067f095c6c2fdc
parent accb9ed584bff0978d1b7336e824e381dd8b9c8e
Author: Jan Dankert <devnull@localhost>
Date:   Wed, 15 Nov 2017 00:56:05 +0100

CSS-Klasse 'nojs' per Javascript entfernen.

Diffstat:
themes/default/js/openrat.js | 3+++
themes/default/js/openrat.min.js | 2+-
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js @@ -1,3 +1,6 @@ + +$('html').removeClass('nojs'); + // Default-Subaction var DEFAULT_CONTENT_ACTION = 'edit'; diff --git a/themes/default/js/openrat.min.js b/themes/default/js/openrat.min.js @@ -1,4 +1,4 @@ -;var DEFAULT_CONTENT_ACTION='edit';$(document).ready(function(){refreshAll();window.setInterval('ping()',300000)});function ping(){$.ajax(createUrl('title','ping',0))};function refreshAll(){refreshTitleBar();refreshWorkbench();$('div#filler').click(function(){if($('div#dialog').hasClass('modal')){} +;$('html').removeClass('nojs');var DEFAULT_CONTENT_ACTION='edit';$(document).ready(function(){refreshAll();window.setInterval('ping()',300000)});function ping(){$.ajax(createUrl('title','ping',0))};function refreshAll(){refreshTitleBar();refreshWorkbench();$('div#filler').click(function(){if($('div#dialog').hasClass('modal')){} else{$('div#dialog').html('').hide();$('div#filler').fadeOut(500)}})};function refreshAllRefreshables(){$('div#workbench div.panel > div.header > ul.views > li.active').each(function(){if($(this).hasClass('static'))return;var e=$(this).attr('data-method'),i=$(this).attr('data-action'),t=$(this).attr('data-id'),a=$(this).attr('data-extra');loadView($(this).closest('div.panel').find('div.content'),i,e,t)})};function refreshActualView(e){$(e).closest('div.panel').find('li.active').each(function(){var e=$(this).attr('data-method'),i=$(this).attr('data-action'),t=$(this).attr('data-id');loadView($(this).closest('div.panel').find('div.content'),i,e,t)})};function refreshWorkbench(){$('ul#history').empty();$('div#workbench').empty().fadeOut('fast').load(createUrl('workbench','show',0),null,function(){resizeWorkbench();$('div.modaldialog').fadeOut(500);$('div#workbench').removeClass('modal');$('div#filler').fadeOut(500);$(this).fadeIn(750).find('li.active').each(function(){var i=$(this).attr('data-method'),e=$(this).attr('data-action');if(e)loadView($(this).closest('div.panel').find('div.content'),e,i,0)});$('div.backward_link').click(function(){var e=$(this).closest('div.header').find('ul.views'),i=e.find('li.action.active').prev();e.scrollTo(i,500,{'axis':'x'});i.click()});$('div.forward_link').click(function(){var e=$(this).closest('div.header').find('ul.views'),i=e.find('li.action.active').next();e.scrollTo(i,500,{'axis':'x'});i.click()});registerWorkbenchEvents()});loadTree();$(window).resize(function(){resizeWorkbench()})};function registerWorkbenchEvents(){$('ul.views > li.action').draggable({cursor:'move',revert:'invalid'});$('ul.views').droppable({accept:'li.action',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,i){var a=i.draggable,n=$(this),s=a.parent();if($(a).closest('div.panel').attr('id')==$(n).closest('div.panel').attr('id'))$(a).css({top:0,left:0});else $(a).detach().css({top:0,left:0}).appendTo(n).click();if(s.find('li').size()==0){var t=s.closest('div.container');s.closest('div.panel').remove();if(t.hasClass('autosize'))t.children('div.panel').addClass('autosize').removeClass('resizable');else t.children('div.panel').addClass('resizable').removeClass('autosize');t.replaceWith(t.children('div.panel'));resizeWorkbench()}}});$('div.content').droppable({accept:'li.action',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,i){var s=i.draggable,n=$(this),r=s.parent(),d=s.offset(),l=n.offset(),h=d.left-l.left,v=l.left+n.width()-d.left,o=d.top-l.top,c=l.top+n.height()-d.top,t=$('<div class="container"><div class="first" /><div class="divider" /><div class="second"></div>');if(h<Math.min(v,Math.min(o,c))){t.addClass('axle-x');t.children('div.divider').addClass('to-right');t.children('div.first').removeClass('first').addClass('resizable');t.children('div.second').removeClass('first').addClass('autosize')} else if(v<Math.min(o,c)){t.addClass('axle-x');t.children('div.divider').addClass('to-left');t.children('div.first').removeClass('first').addClass('autosize');t.children('div.second').removeClass('first').addClass('resizable')} else if(o<c){t.addClass('axle-y');t.children('div.divider').addClass('to-bottom');t.children('div.first').removeClass('first').addClass('resizable');t.children('div.second').removeClass('first').addClass('autosize')}