commit bf06d0bcaedf61e293da0753adffc0e3c964a2ae
parent f0fbc633c4f59689ee83c8f996bfa3ecd91cb816
Author: Jan Dankert <devnull@localhost>
Date: Sat, 2 Dec 2017 23:40:46 +0100
Minifizierung der JS-Dateien neu angestoßen.
Diffstat:
8 files changed, 25 insertions(+), 345 deletions(-)
diff --git a/themes/default/js/plugin/jquery-plugin-orAutoheight.min.js b/themes/default/js/plugin/jquery-plugin-orAutoheight.min.js
@@ -1,22 +1 @@
-/**
- * Input-Hints
- */
-jQuery.fn.orAutoheight = function()
-{
-
- var resize = function( element )
- {
- var lines = $(element).val().split("\n").length;
- $(element).attr('rows',lines+3);
- };
-
- $(this).each(function(i)
- {
- resize(this);
- });
-
- return $(this).keypress(function()
- {
- resize(this);
- });
-};-
\ No newline at end of file
+;jQuery.fn.orAutoheight=function(){var t=function(t){var n=$(t).val().split('\n').length;$(t).attr('rows',n+3)};$(this).each(function(n){t(this)});return $(this).keypress(function(){t(this)})};+
\ No newline at end of file
diff --git a/themes/default/js/plugin/jquery-plugin-orHint.min.js b/themes/default/js/plugin/jquery-plugin-orHint.min.js
@@ -1,22 +1 @@
-/**
- * Input-Hints
- */
-jQuery.fn.orHint = function()
-{
-
- $(this).each(function(i)
- {
- if ($(this).val() == '')
- $(this).val($(this).attr('data-hint')).addClass('hint');
- });
-
- return $(this).focus(function()
- {
- if ($(this).val() == $(this).attr('data-hint'))
- $(this).val('').removeClass('hint');
- }).blur(function()
- {
- if ($(this).val() == '')
- $(this).val($(this).attr('data-hint')).addClass('hint');
- });
-};-
\ No newline at end of file
+;jQuery.fn.orHint=function(){$(this).each(function(t){if($(this).val()=='')$(this).val($(this).attr('data-hint')).addClass('hint')});return $(this).focus(function(){if($(this).val()==$(this).attr('data-hint'))$(this).val('').removeClass('hint')}).blur(function(){if($(this).val()=='')$(this).val($(this).attr('data-hint')).addClass('hint')})};+
\ No newline at end of file
diff --git a/themes/default/js/plugin/jquery-plugin-orLinkify.js b/themes/default/js/plugin/jquery-plugin-orLinkify.js
@@ -16,7 +16,6 @@ jQuery.fn.orLinkify = function()
if ( type == 'post' )
{
- //alert('data: '+$(this).attr('data-data'))
submitLink(this,$(this).attr('data-data') );
}
@@ -57,7 +56,6 @@ jQuery.fn.orLinkify = function()
else if ( type == 'fullscreen' )
{
- //alert('fullscreen fuer: '+$(this).html() );
fullscreen(this);
}
diff --git a/themes/default/js/plugin/jquery-plugin-orLinkify.min.js b/themes/default/js/plugin/jquery-plugin-orLinkify.min.js
@@ -1,74 +1,11 @@
-/**
- * Input-Hints
- */
-jQuery.fn.orLinkify = function()
-{
-
- return $(this).click(function()
- {
- $(this).find('a').first().each( function() {
-
- var type = $(this).attr('data-type');
-
- // Inaktive Menüpunkte sind natürlich nicht anklickbar.
- if ( $(this).parent().hasClass('inactive') )
- return;
-
- if ( type == 'post' )
- {
- //alert('data: '+$(this).attr('data-data'))
- submitLink(this,$(this).attr('data-data') );
- }
-
- else if ( type == 'view' )
- {
- startView(this, $(this).attr('data-method') );
- }
-
- else if ( type == 'modal' )
- {
- startDialog($(this).attr('data-name'),null,$(this).attr('data-method') );
- }
-
- else if ( type == 'dialog' )
- {
- startDialog($(this).attr('data-name'),null,$(this).attr('data-method') );
- }
-
- else if ( type == 'url' )
- {
- submitUrl(this,$(this).attr('data-url') );
- }
-
- else if ( type == 'external' )
- {
- window.open( $(this).attr('data-url'),' _blank' );
- }
-
- else if ( type == 'popup' )
- {
- window.open( $(this).attr('data-url'), 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');
- }
-
- else if ( type == 'help' )
- {
- help(this,$(this).attr('data-url'),$(this).attr('data-suffix') );
- }
-
- else if ( type == 'fullscreen' )
- {
- //alert('fullscreen fuer: '+$(this).html() );
- fullscreen(this);
- }
-
- else if ( type == 'open' )
- {
- openNewAction( $(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),0);
- }
- else
- {
- alert('Fatal: Cannot open link: '+$(this).html() );
- }
- } );
- });
-};-
\ No newline at end of file
+;jQuery.fn.orLinkify=function(){return $(this).click(function(){$(this).find('a').first().each(function(){var t=$(this).attr('data-type');if($(this).parent().hasClass('inactive'))return;if(t=='post'){submitLink(this,$(this).attr('data-data'))}
+else if(t=='view'){startView(this,$(this).attr('data-method'))}
+else if(t=='modal'){startDialog($(this).attr('data-name'),null,$(this).attr('data-method'))}
+else if(t=='dialog'){startDialog($(this).attr('data-name'),null,$(this).attr('data-method'))}
+else if(t=='url'){submitUrl(this,$(this).attr('data-url'))}
+else if(t=='external'){window.open($(this).attr('data-url'),' _blank')}
+else if(t=='popup'){window.open($(this).attr('data-url'),'Popup','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')}
+else if(t=='help'){help(this,$(this).attr('data-url'),$(this).attr('data-suffix'))}
+else if(t=='fullscreen'){fullscreen(this)}
+else if(t=='open'){openNewAction($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),0)}
+else{alert('Fatal: Cannot open link: '+$(this).html())}})})};+
\ No newline at end of file
diff --git a/themes/default/js/plugin/jquery-plugin-orLoadView.min.js b/themes/default/js/plugin/jquery-plugin-orLoadView.min.js
@@ -1,20 +1 @@
-/**
- * Laden einer View.
- */
-jQuery.fn.orLoadView = function()
-{
- $(this).each(function(idx,treeEl)
- {
- var method = $(this).data('method');
- var action = $(this).data('action');
- var id = $(this).data('id');
-
- var panel = $(this).closest('div.panel');
- panel.find('ul.views li.active').removeClass('active');
- $(this).addClass('active');
-
- loadView( panel.find('div.content'),action,method,id);
- });
-
-
-};-
\ No newline at end of file
+;jQuery.fn.orLoadView=function(){$(this).each(function(d,s){var t=$(this).data('method'),a=$(this).data('action'),e=$(this).data('id'),i=$(this).closest('div.panel');i.find('ul.views li.active').removeClass('active');$(this).addClass('active');loadView(i.find('div.content'),a,t,e)})};+
\ No newline at end of file
diff --git a/themes/default/js/plugin/jquery-plugin-orSearch.min.js b/themes/default/js/plugin/jquery-plugin-orSearch.min.js
@@ -1,38 +1,2 @@
-/**
- * Suche mit Dropdown
- */
-jQuery.fn.orSearch = function( options )
-{
- // Create some defaults, extending them with any options that were provided
- var settings = $.extend( {
- 'dropdown': 'unknown'
- }, options);
-
-
- return $(this).keyup( function()
- {
- var val = $(this).val();
- if ( val.length > 3 )
- {
- $(settings.dropdown).html('');
- $.ajax( { 'type':'GET',url:'./dispatcher.php?action=search&subaction=quicksearch&output=json&search='+val, data:null, success:function(data, textStatus, jqXHR)
- {
- for( id in data.output.result )
- {
- var result = data.output.result[id];
-
- // Suchergebnis-Zeile in das Ergebnis schreiben.
- $(settings.dropdown).append('<div class="entry clickable" title="'+result.desc+'"><a href="javascript:void(0);" data-type="open" data-name="'+result.name+'" data-action="'+result.type+'" data-id="'+id+'"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+result.type+'.png" />'+result.name+'</a></div>');
- }
- $(settings.dropdown).orLinkify();
- } } );
- $(settings.dropdown).fadeIn();
-
-
- }
- else
- {
- $(settings.dropdown).fadeOut();
- }
- });
-};-
\ No newline at end of file
+;jQuery.fn.orSearch=function(t){var a=$.extend({'dropdown':'unknown'},t);return $(this).keyup(function(){var t=$(this).val();if(t.length>3){$(a.dropdown).html('');$.ajax({'type':'GET',url:'./dispatcher.php?action=search&subaction=quicksearch&output=json&search='+t,data:null,success:function(n,e,d){for(id in n.output.result){var t=n.output.result[id];$(a.dropdown).append('<div class="entry clickable" title="'+t.desc+'"><a href="javascript:void(0);" data-type="open" data-name="'+t.name+'" data-action="'+t.type+'" data-id="'+id+'"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+t.type+'.png" />'+t.name+'</a></div>')};$(a.dropdown).orLinkify()}});$(a.dropdown).fadeIn()}
+else{$(a.dropdown).fadeOut()}})};+
\ No newline at end of file
diff --git a/themes/default/js/plugin/jquery-plugin-orTree.min.js b/themes/default/js/plugin/jquery-plugin-orTree.min.js
@@ -1,101 +1 @@
-/**
- * Baum darstellen.
- */
-jQuery.fn.orTree = function( options )
-{
- // Create some defaults, extending them with any options that were provided
- var settings = $.extend( {
- 'onSelect': function(){},
- 'type':'root',
- 'id':0,
- 'selectable':Array()
- }, options);
-
- $(this).each(function(idxx,treeEl)
- {
- $(treeEl).closest('div.content').addClass('loader');
- $.getJSON('./dispatcher.php?action=tree&subaction=loadBranch&id='+settings.id+'&type='+settings.type+'&output=json', function(json) {
- $(treeEl).append('<ul class="tree" style="display:none;"/>');
- var ul = $(treeEl).children('ul').first();
- var output = json['output'];
- $.each(output['branch'],function(idx,line)
- {
- if ( !line.action || line.action=='folder' || settings.selectable.length==0 || settings.selectable[0]=='' || jQuery.inArray(line.action, settings.selectable)!=-1 )
- {
- //var img = (line.url!==undefined?'tree_plus':'tree_none');
- $(ul).append( '<li class="object" data-id="'+line.internalId+'" data-type="'+line.type+'"><div class="tree"> </div><div class="entry" data-id="'+line.internalId+'" data-type="'+line.type+'" title="'+ line.description + '"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+line['icon']+'.png" />'+ line.text + '</div></li>' );
- var new_li = $(ul).children('li').last();
- //$(new_li).children('div').unbind('click');
- if ( line.type )
- {
- $(new_li).children('div.tree').addClass('closed');
- $(new_li).children('div.tree').click( function() { $(this).parent().orTree( {type:line.type,id:line.internalId,onSelect:settings.onSelect,selectable:settings.selectable} );} ); // Zweig öffnen
- }
-
- if ( line.action && ( settings.selectable.length==0 || settings.selectable[0]=='' || jQuery.inArray(line.action, settings.selectable)!=-1 ))
- {
- // Onclick-Handler für auswählbare Objekte setzen
- $(new_li).children('div.entry').click( function() {
- //loadViewByName('content',line.url.replace(/&/g,'&'));
- //var url = './dispatcher.php';
- //$.ajax( { 'type':'POST',url:url, data:{'action':'tree','subaction':'select','id':line.id,'type':line.type},success:function(data, textStatus, jqXHR)
- // {
- // doResponse(data,textStatus);
- // } } );
- // Den Objekt-Typ und die Objekt-Id für alle Views setzen (die dies zulassen)
-
- // Neue Action starten.
- $(this).closest('div.content').find('div.entry').removeClass('selected');
- $(this).addClass('selected');
-
- settings.onSelect( $(this).text(), line.action, line.id );
- });
-
- // Drag and drop für die Baum-Inhalte.
- //$(new_li).children('div.entry').draggable( {cursor:'move',revert: 'invalid' });
- }
-
- if ($(new_li).parents('ul.tree').size() <= 2 )
- {
- // Falls eine bestimmte Tiefe nicht erreicht ist, dann
- // den Pfad auch gleich öffnen.
- $(new_li).children('div.tree').click();
- }
- }
-
- });
- //$(ul).children('li:last-child').addClass('last');
- $(ul).slideDown('fast'); // Einblenden
-
- }).fail( function() {
- //
- }).always( function() {
- $(treeEl).closest('div.content').removeClass('loader');
- });
-
- $(treeEl).children('div.tree').unbind('click');
- $(treeEl).children('div.tree').removeClass('closed').addClass('open');
- $(treeEl).children('div.tree').click( function(e) { closeBranch($(e.target).parent(),settings.type,settings.id); } );
- });
-
-
- /**
- *
- * @param li JQuery-Objekt
- * @return
- */
- function closeBranch(li,type,id)
- {
- //alert("schließen:"+$(li).html() );
- $(li).children('ul').slideUp('fast', function() {
-
- $(li).children('ul').remove();
- $(li).children('div.tree').unbind('click');
- $(li).children('div.tree').removeClass('open').addClass('closed');
- //alert( "wieder öffnen: "+$(li).children('div').first().html());
- $(li).children('div.tree').click( function() { $(this).parent().orTree( {type:type,id:id,onSelect:settings.onSelect,selectable:settings.selectable}); });
- //$(li).children('img.tree').attr('src',OR_THEMES_EXT_DIR+'default/images/tree_plus.gif');
- } );
- }
-
-};-
\ No newline at end of file
+;jQuery.fn.orTree=function(t){var e=$.extend({'onSelect':function(){},'type':'root','id':0,'selectable':Array()},t);$(this).each(function(n,t){$(t).closest('div.content').addClass('loader');$.getJSON('./dispatcher.php?action=tree&subaction=loadBranch&id='+e.id+'&type='+e.type+'&output=json',function(i){$(t).append('<ul class="tree" style="display:none;"/>');var n=$(t).children('ul').first(),l=i['output'];$.each(l['branch'],function(i,t){if(!t.action||t.action=='folder'||e.selectable.length==0||e.selectable[0]==''||jQuery.inArray(t.action,e.selectable)!=-1){$(n).append('<li class="object" data-id="'+t.internalId+'" data-type="'+t.type+'"><div class="tree"> </div><div class="entry" data-id="'+t.internalId+'" data-type="'+t.type+'" title="'+t.description+'"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+t['icon']+'.png" />'+t.text+'</div></li>');var l=$(n).children('li').last();if(t.type){$(l).children('div.tree').addClass('closed');$(l).children('div.tree').click(function(){$(this).parent().orTree({type:t.type,id:t.internalId,onSelect:e.onSelect,selectable:e.selectable})})};if(t.action&&(e.selectable.length==0||e.selectable[0]==''||jQuery.inArray(t.action,e.selectable)!=-1)){$(l).children('div.entry').click(function(){$(this).closest('div.content').find('div.entry').removeClass('selected');$(this).addClass('selected');e.onSelect($(this).text(),t.action,t.id)})};if($(l).parents('ul.tree').size()<=2){$(l).children('div.tree').click()}}});$(n).slideDown('fast')}).fail(function(){}).always(function(){$(t).closest('div.content').removeClass('loader')});$(t).children('div.tree').unbind('click');$(t).children('div.tree').removeClass('closed').addClass('open');$(t).children('div.tree').click(function(t){i($(t.target).parent(),e.type,e.id)})});function i(t,i,n){$(t).children('ul').slideUp('fast',function(){$(t).children('ul').remove();$(t).children('div.tree').unbind('click');$(t).children('div.tree').removeClass('open').addClass('closed');$(t).children('div.tree').click(function(){$(this).parent().orTree({type:i,id:n,onSelect:e.onSelect,selectable:e.selectable})})})}};+
\ No newline at end of file
diff --git a/themes/default/js/plugin/jquery-plugin-svg.min.js b/themes/default/js/plugin/jquery-plugin-svg.min.js
@@ -3,62 +3,4 @@
* Copyright (c) 2016 Tiago Porto (tiagoporto.com)
* Released under the MIT license
*/
-
-'use strict';
-
-$.fn.svgToInline = function (options) {
- 'use strict';
-
- var trigger = {
- class: this.selector.replace('.', ''),
- useClass: options && options.useTriggerClass || false
- };
-
- this.each(function () {
- var svg = {
- currency: $(this),
- oldClass: '',
- newClass: '',
- path: $(this).attr('data') || $(this).attr('src')
- },
- request = {
- element: '',
- svgTag: '',
- svgTagWithoutClass: ''
- },
- inputClass = $(this).attr('class').split(' '),
- inputClassLenght = inputClass.length;
-
- if (inputClassLenght > 0) {
- for (var i = 0; i < inputClassLenght; ++i) {
- var space = '';
-
- if (inputClass[i] === trigger.class && !trigger.useClass) {
- continue;
- }
-
- i !== inputClass.length - 1 && (space = ' ');
- inputClass[i] && (svg.newClass += inputClass[i] + space);
- }
- }
-
- $.ajax({
- url: svg.path,
- dataType: 'text',
- success: function success(response) {
- request.element = response.replace(/<[?!][\s\w\"-\/:=?]+>/g, ''), request.svgTag = request.element.match(/<svg[\w\s\t\n:="\\'\/.#-]+>/g);
- request.svgTagWithoutClass = request.svgTag[0].replace(/class=\"[\w\s-_]+\"/, '');
- svg.oldClass = request.svgTag[0].match(/class=\"(.*?)\"/);
-
- // If exist class in svg add to svg.newClass
- svg.oldClass && svg.oldClass[1] && svg.newClass && (svg.newClass = svg.oldClass[1] + ' ' + svg.newClass);
-
- svg.newClass !== '' && (svg.newClass = 'class="' + svg.newClass + '"');
-
- request.svgTagWithoutClass = request.svgTagWithoutClass.replace('>', ' ' + svg.newClass + '>');
-
- svg.currency.replaceWith(request.element.replace(/<svg[\w\s\t\n:="\\'\/.#-]+>/g, request.svgTagWithoutClass));
- }
- });
- });
-};-
\ No newline at end of file
+'use strict';$.fn.svgToInline=function(s){'use strict';var a={class:this.selector.replace('.',''),useClass:s&&s.useTriggerClass||!1};this.each(function(){var s={currency:$(this),oldClass:'',newClass:'',path:$(this).attr('data')||$(this).attr('src')},e={element:'',svgTag:'',svgTagWithoutClass:''},t=$(this).attr('class').split(' '),c=t.length;if(c>0){for(var l=0;l<c;++l){var n='';if(t[l]===a.class&&!a.useClass){continue};l!==t.length-1&&(n=' ');t[l]&&(s.newClass+=t[l]+n)}};$.ajax({url:s.path,dataType:'text',success:function(a){e.element=a.replace(/<[?!][\s\w"-\/:=?]+>/g,''),e.svgTag=e.element.match(/<svg[\w\s\t\n:="\\'\/.#-]+>/g);e.svgTagWithoutClass=e.svgTag[0].replace(/class="[\w\s-_]+"/,'');s.oldClass=e.svgTag[0].match(/class="(.*?)"/);s.oldClass&&s.oldClass[1]&&s.newClass&&(s.newClass=s.oldClass[1]+' '+s.newClass);s.newClass!==''&&(s.newClass='class="'+s.newClass+'"');e.svgTagWithoutClass=e.svgTagWithoutClass.replace('>',' '+s.newClass+'>');s.currency.replaceWith(e.element.replace(/<svg[\w\s\t\n:="\\'\/.#-]+>/g,e.svgTagWithoutClass))}})})};+
\ No newline at end of file