openrat-cms

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

commit f4e369f5739fd53d7a5c3f845af3eac9486069d8
parent d5e03aa3ef7e577cb737e9b021fc843696f5084a
Author: Jan Dankert <devnull@localhost>
Date:   Mon,  1 Jan 2018 23:56:45 +0100

Keine Inline-Javaskripte. Die CSP darf jetzt Inline-Javascript verbieten. Yeah!

Diffstat:
modules/cms-ui/UI.class.php | 2+-
modules/cms-ui/themes/default/js/openrat.js | 18+++++++-----------
modules/cms-ui/themes/default/js/openrat.min.js | 28++++++++++++++--------------
modules/cms-ui/themes/default/js/plugin/jquery-plugin-orTree.js | 4++--
modules/cms-ui/themes/default/js/plugin/jquery-plugin-orTree.min.js | 4++--
modules/cms-ui/themes/default/layout/index.php | 48------------------------------------------------
modules/cms-ui/themes/default/layout/perspective/window.php | 14--------------
modules/cms-ui/themes/default/templates/tree/tree.tpl.src.xml | 2--
modules/template-engine/components/html/column/Column.class.php | 22+++++++++++++++++-----
modules/template-engine/components/html/column/column.js | 10++++++++++
modules/template-engine/components/html/column/column.min.js | 10++++++++++
modules/template-engine/components/html/editor/editor.js | 2+-
modules/template-engine/components/html/editor/editor.min.js | 4++--
modules/template-engine/components/html/form/Form.class.php | 15+++++++--------
modules/template-engine/components/html/form/form.js | 17++++++++++++++++-
modules/template-engine/components/html/form/form.min.js | 8++++----
modules/template-engine/components/html/tree/component-tree.php | 6+++++-
modules/template-engine/components/html/tree/tree.js | 9+++++++++
modules/template-engine/components/html/tree/tree.min.js | 9+++++++++
19 files changed, 116 insertions(+), 116 deletions(-)

diff --git a/modules/cms-ui/UI.class.php b/modules/cms-ui/UI.class.php @@ -122,7 +122,7 @@ class UI //if (config('security','content-security-policy')) // config is not loaded yet. $contentSecurityPolicyEntries = array( 'default-src \'none\'', - 'script-src \'self\' \'unsafe-inline\'', + 'script-src \'self\'', // No <object>, <embed> or <applet>. 'object-src \'none\'', 'style-src \'self\'', diff --git a/modules/cms-ui/themes/default/js/openrat.js b/modules/cms-ui/themes/default/js/openrat.js @@ -1,12 +1,13 @@ -$('html').removeClass('nojs'); - // Default-Subaction var DEFAULT_CONTENT_ACTION = 'edit'; +var OR_THEMES_EXT_DIR = 'modules/cms-ui/themes/'; $(document).ready(function() { + // JS is available. + $('html').removeClass('nojs'); refreshAll(); @@ -142,10 +143,9 @@ function refreshWorkbench() registerWorkbenchEvents(); }); - //alert('go'); - + - loadTree(); // ?? + // Modale Dialoge //$('form.login, form.profile').dialog( { modal:true, resizable:false, width:760, height:600, draggable: false } ); @@ -366,6 +366,8 @@ function registerWorkbenchEvents() { fullscreen( this ); } ); + + loadTree(); // Initial Loading of the navigationtree } @@ -528,12 +530,6 @@ function registerViewEvents( viewEl ) $(viewEl).find('input').change( function() { $(this).closest('div.panel').find('ul.views li.action.active').addClass('dirty'); }); - - - - - - } diff --git a/modules/cms-ui/themes/default/js/openrat.min.js b/modules/cms-ui/themes/default/js/openrat.min.js @@ -1,19 +1,19 @@ -;$('html').removeClass('nojs');var DEFAULT_CONTENT_ACTION='edit';$(document).ready(function(){refreshAll();window.setInterval(function(){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,s=$(this),n=a.parent();if($(a).closest('div.panel').attr('id')==$(s).closest('div.panel').attr('id'))$(a).css({top:0,left:0});else $(a).detach().css({top:0,left:0}).appendTo(s).click();if(n.find('li').size()==0){var t=n.closest('div.container');n.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 n=i.draggable,s=$(this),o=n.parent(),d=n.offset(),l=s.offset(),h=d.left-l.left,v=l.left+s.width()-d.left,r=d.top-l.top,c=l.top+s.height()-d.top,t=$('<div class="container"><div class="first" /><div class="divider" /><div class="second"></div>');if(h<Math.min(v,Math.min(r,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')} +;var DEFAULT_CONTENT_ACTION='edit',OR_THEMES_EXT_DIR='modules/cms-ui/themes/';$(document).ready(function(){$('html').removeClass('nojs');refreshAll();window.setInterval(function(){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()});$(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),o=s.parent(),d=s.offset(),l=n.offset(),h=d.left-l.left,v=l.left+n.width()-d.left,r=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(r,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(r,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(r<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')} -else{t.addClass('axle-y');t.children('div.divider').addClass('to-top');t.children('div.first').removeClass('first').addClass('autosize');t.children('div.second').removeClass('first').addClass('resizable')};t.children('div.resizable').addClass('bar').data('size-factor',0.4);$(n).closest('div.panel').clone().addClass('resizable').removeClass('autosize').replaceAll(t.children('div.resizable'));t.find('ul.views > li').remove();$(n).detach().css({top:0,left:0}).appendTo(t.find('ul.views')).click();var a=$(s).closest('div.panel').replaceWith(t);t.children('div.autosize').replaceWith(a);if(a.hasClass('autosize')){t.addClass('autosize').removeClass('resizable')};if(a.hasClass('resizable')){t.addClass('resizable').removeClass('autosize')};a.addClass('autosize').removeClass('resizable');if(o.find('li').length==0){var a=o.closest('div.container');o.closest('div.panel').remove();if(a.hasClass('autosize'))a.children('div.panel').addClass('autosize').removeClass('resizable');else a.children('div.panel').addClass('resizable').removeClass('autosize');a.replaceWith(a.children('div.panel'));resizeWorkbench()};resizeWorkbench();registerWorkbenchEvents()}});if($('div#workbench div.panel.modal').length>0){$('div#workbench div.panel.modal').parent().addClass('modal');$('div#filler').fadeTo(500,0.5);$('div#workbench').addClass('modal')};$('div.container.axle-x > div.divider').draggable({stop:function(e,i){var t=i.position.left,a=$(this).hasClass('to-right')?1:-1;$(this).parent().children('div.resizable').each(function(){var e=((a*t)+$(this).width())/($(this).parent().width());e=Math.min(0.5,Math.max(0.1,e));$(this).data('size-factor',e)});resizeWorkbenchContainer($(this).parent())},axis:'x',revert:!0,revertDuration:0});$('div.container.axle-y > div.divider').draggable({stop:function(e,i){var t=i.position.top,a=$(this).hasClass('to-bottom')?1:-1;$(this).parent().children('div.resizable').each(function(){var e=((a*t)+$(this).height())/($(this).parent().height());e=Math.min(0.5,Math.max(0.1,e));$(this).data('size-factor',e)});resizeWorkbenchContainer($(this).parent())},axis:'y',revert:!0,revertDuration:0});$('ul.views > li.action').click(function(){$(this).orLoadView()});$('div.header').dblclick(function(){fullscreen(this)})};function refreshTitleBar(){$('div#header').load(createUrl('title','show',0),function(){$(this).fadeIn('slow');registerHeaderEvents()})};function loadViewByName(e,i){alert('loadViewByName');loadView($('div#'+e),i)};function loadView(e,i,t,n,s){var a=$(e).children('div.sheet.action-'+i+'.method-'+t+'.id-'+n);if(a.length==0){$(e).children('div.sheet').hide();a=$('<div class="sheet action-'+i+' method-'+t+' id-'+n+'" />');$(e).append(a)} +else{t.addClass('axle-y');t.children('div.divider').addClass('to-top');t.children('div.first').removeClass('first').addClass('autosize');t.children('div.second').removeClass('first').addClass('resizable')};t.children('div.resizable').addClass('bar').data('size-factor',0.4);$(s).closest('div.panel').clone().addClass('resizable').removeClass('autosize').replaceAll(t.children('div.resizable'));t.find('ul.views > li').remove();$(s).detach().css({top:0,left:0}).appendTo(t.find('ul.views')).click();var a=$(n).closest('div.panel').replaceWith(t);t.children('div.autosize').replaceWith(a);if(a.hasClass('autosize')){t.addClass('autosize').removeClass('resizable')};if(a.hasClass('resizable')){t.addClass('resizable').removeClass('autosize')};a.addClass('autosize').removeClass('resizable');if(o.find('li').length==0){var a=o.closest('div.container');o.closest('div.panel').remove();if(a.hasClass('autosize'))a.children('div.panel').addClass('autosize').removeClass('resizable');else a.children('div.panel').addClass('resizable').removeClass('autosize');a.replaceWith(a.children('div.panel'));resizeWorkbench()};resizeWorkbench();registerWorkbenchEvents()}});if($('div#workbench div.panel.modal').length>0){$('div#workbench div.panel.modal').parent().addClass('modal');$('div#filler').fadeTo(500,0.5);$('div#workbench').addClass('modal')};$('div.container.axle-x > div.divider').draggable({stop:function(e,i){var t=i.position.left,a=$(this).hasClass('to-right')?1:-1;$(this).parent().children('div.resizable').each(function(){var e=((a*t)+$(this).width())/($(this).parent().width());e=Math.min(0.5,Math.max(0.1,e));$(this).data('size-factor',e)});resizeWorkbenchContainer($(this).parent())},axis:'x',revert:!0,revertDuration:0});$('div.container.axle-y > div.divider').draggable({stop:function(e,i){var t=i.position.top,a=$(this).hasClass('to-bottom')?1:-1;$(this).parent().children('div.resizable').each(function(){var e=((a*t)+$(this).height())/($(this).parent().height());e=Math.min(0.5,Math.max(0.1,e));$(this).data('size-factor',e)});resizeWorkbenchContainer($(this).parent())},axis:'y',revert:!0,revertDuration:0});$('ul.views > li.action').click(function(){$(this).orLoadView()});$('div.header').dblclick(function(){fullscreen(this)});loadTree()};function refreshTitleBar(){$('div#header').load(createUrl('title','show',0),function(){$(this).fadeIn('slow');registerHeaderEvents()})};function loadViewByName(e,i){alert('loadViewByName');loadView($('div#'+e),i)};function loadView(e,i,t,s,n){var a=$(e).children('div.sheet.action-'+i+'.method-'+t+'.id-'+s);if(a.length==0){$(e).children('div.sheet').hide();a=$('<div class="sheet action-'+i+' method-'+t+' id-'+s+'" />');$(e).append(a)} else{if(a.is(':visible')){return} -else{$(e).children('div.sheet').hide();a.show();return}};var d=createUrl(i,t,n,s);$(a).empty().fadeTo(1,0.7).addClass('loader').html('').load(d,function(e,i,t){$(a).fadeTo(350,1);if(i=='error'){$(a).html('');$(a).removeClass('loader');notify('error',e);return};$(a).removeClass('loader');registerViewEvents(a)})};function registerViewEvents(e){$(e).trigger('orViewLoaded');$(e).find('input[data-hint]').orHint();$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('div.headermenu > a').each(function(e,i){});$(e).find('div.header > a.back').each(function(i,t){$(t).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(i,t,a){var n=$(e).parent();$(n).find('input[type=text]').attr('value',i);$(n).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > div.entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,i){var t=i.draggable,a=$(this).parent();startDialog($(this).text(),$(t).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(t).attr('data-type'),'subaction':'copy','id':$(t).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(t).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).closest('div.panel').find('ul.views li.action.active').addClass('dirty')})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('div#header .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('div#header .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('div#header').trigger('orHeaderLoaded');$('div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('div.search input').orHint();$('div.search input').orSearch({dropdown:'div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){if($('div#panel-tree li.action').data('action')=='tree'){$('div#panel-tree div.content > div.sheet.action-tree.method-tree').html('&nbsp;');$('div#panel-tree div.content > div.sheet.action-tree.method-tree').orTree({type:'root',id:0,onSelect:function(e,i,t){openNewAction(e,i,t,'')}});$('div#panel-tree div.content > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click();$('div#panel-tree div.content > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click()}};function submitUrl(e,i){postUrl(i,e);refreshAllRefreshables()};function postUrl(e,i){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,t,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,t,i)}})};function startView(e,i){var t=$('#panel-content').find('li.active').data('action'),a=$('#panel-content').find('li.active').data('id');loadView($(e).closest('div.panel').find('div.content'),t,i,a)};function startDialog(e,i,t,a,n){if(i==null||i.length==0)i=$('#panel-content').find('li.active').data('action');if(a==null||a.length==0)a=$('#panel-content').find('li.active').data('id');$('div#filler').fadeTo(500,0.5);$('div#dialog').html('<div class="header"><ul class="views"><li class="action active"><img class="icon" title="" src="./themes/default/images/icon/'+t+'.png" /><div class="tabname" style="width:100px;">'+e+'</div></li></ul></div><div class="content" />');$('div#dialog').data('id',a);$('div#dialog').show();loadView($('div#dialog div.content'),i,t,a,n)};function modalView(e,i){var t=$(e).closest('div.panel').find('li.active').attr('data-action'),a=$(e).closest('div.panel').find('li.active').attr('data-method'),n=$(e).closest('div.panel').find('li.active').attr('data-id');$(e).closest('div.content').modal({'overlayClose':'true','xxxonClose':function(){alert('close)')}});loadView($(e).closest('div.content'),t,a,n)};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,i,t,a){setTitle(e);$('ul#history li.active').removeClass('active');if($('ul#history li.'+i+'.id'+t).length>0){$('ul#history li.'+i+'.id'+t).addClass('active')} +else{$(e).children('div.sheet').hide();a.show();return}};var d=createUrl(i,t,s,n);$(a).empty().fadeTo(1,0.7).addClass('loader').html('').load(d,function(e,i,t){$(a).fadeTo(350,1);if(i=='error'){$(a).html('');$(a).removeClass('loader');notify('error',e);return};$(a).removeClass('loader');registerViewEvents(a)})};function registerViewEvents(e){$(e).trigger('orViewLoaded');$(e).find('input[data-hint]').orHint();$(e).closest('div.panel').find('div.header div.dropdown div.entry.perview').remove();$(e).find('div.headermenu > a').each(function(e,i){});$(e).find('div.header > a.back').each(function(i,t){$(t).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(i,t,a){var s=$(e).parent();$(s).find('input[type=text]').attr('value',i);$(s).find('input[type=hidden]').attr('value',a)}})});$('div.content li.object').draggable({cursor:'move',revert:'invalid'});$('div.content li.object > div.entry[data-type=\'folder\']').droppable({accept:'li.object',hoverClass:'drophover',activeClass:'dropactive',drop:function(e,i){var t=i.draggable,a=$(this).parent();startDialog($(this).text(),$(t).attr('data-type'),'copy',$(a).attr('data-id'),{'action':$(t).attr('data-type'),'subaction':'copy','id':$(t).attr('data-id'),'targetFolderId':$(a).attr('data-id')});$(t).detach().css({top:0,left:0}).appendTo(a).click()}});$(e).find('input').change(function(){$(this).closest('div.panel').find('ul.views li.action.active').addClass('dirty')})};function registerHeaderEvents(){$('body').click(function(){$('.toolbar-icon.menu').parent().removeClass('open')});$('div#header .toolbar-icon.menu').click(function(e){e.stopPropagation();$(this).parent().toggleClass('open')});$('div#header .toolbar-icon.menu').mouseover(function(){$(this).parent().find('.toolbar-icon.menu').removeClass('open');$(this).addClass('open')});$('div#header').trigger('orHeaderLoaded');$('div.search input').blur(function(){$('div.search input div.dropdown').fadeOut()});$('div.search input').orHint();$('div.search input').orSearch({dropdown:'div.search div.dropdown'})};function fullscreen(e){$(e).closest('div.panel').fadeOut('fast',function(){$(this).toggleClass('fullscreen').fadeIn('fast')})};function loadTree(){if($('div#panel-tree li.action').data('action')=='tree'){$('div#panel-tree div.content > div.sheet.action-tree.method-tree').html('&nbsp;');$('div#panel-tree div.content > div.sheet.action-tree.method-tree').orTree({type:'root',id:0,onSelect:function(e,i,t){openNewAction(e,i,t,'')}});$('div#panel-tree div.content > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click();$('div#panel-tree div.content > div.sheet.action-tree.method-tree > ul.tree > div.tree').delay(500).click()}};function submitUrl(e,i){postUrl(i,e);refreshAllRefreshables()};function postUrl(e,i){e+='&output=json';$.ajax({'type':'POST',url:e,data:{},success:function(e,t,a){$('div.panel div.status div.loader').html('&nbsp;');doResponse(e,t,i)}})};function startView(e,i){var t=$('#panel-content').find('li.active').data('action'),a=$('#panel-content').find('li.active').data('id');loadView($(e).closest('div.panel').find('div.content'),t,i,a)};function startDialog(e,i,t,a,s){if(i==null||i.length==0)i=$('#panel-content').find('li.active').data('action');if(a==null||a.length==0)a=$('#panel-content').find('li.active').data('id');$('div#filler').fadeTo(500,0.5);$('div#dialog').html('<div class="header"><ul class="views"><li class="action active"><img class="icon" title="" src="./themes/default/images/icon/'+t+'.png" /><div class="tabname" style="width:100px;">'+e+'</div></li></ul></div><div class="content" />');$('div#dialog').data('id',a);$('div#dialog').show();loadView($('div#dialog div.content'),i,t,a,s)};function modalView(e,i){var t=$(e).closest('div.panel').find('li.active').attr('data-action'),a=$(e).closest('div.panel').find('li.active').attr('data-method'),s=$(e).closest('div.panel').find('li.active').attr('data-id');$(e).closest('div.content').modal({'overlayClose':'true','xxxonClose':function(){alert('close)')}});loadView($(e).closest('div.content'),t,a,s)};function setTitle(e){if(e)$('head > title').text(e+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};function openNewAction(e,i,t,a){setTitle(e);$('ul#history li.active').removeClass('active');if($('ul#history li.'+i+'.id'+t).length>0){$('ul#history li.'+i+'.id'+t).addClass('active')} else{$('ul#history').append('<li class="action active '+i+' id'+t+'"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+i+'.png" title="" />'+e+'</li>');$('ul#history li.active').click(function(){$('ul#history li.active').removeClass('active');$(this).addClass('active');setNewAction(i,t,a)})};$('div#panel-content > div.header > ul.views li.active').removeClass('active');if($('div#panel-content > div.header > ul.views > li.'+i+'.id'+t).length>0){$('div#panel-content > div.header > ul.views > li.'+i+'.id'+t).addClass('active')} -else{$('div#panel-content > div.header > ul.views > li.active').removeClass('active');var n=7;if($('div#panel-content > div.header > ul.views > li.action').length>=n)$('div#panel-content > div.header > ul.views > li.action').first().remove();$('div#panel-content > div.header > ul.views').append('<li class="action active '+i+' id'+t+'" title="'+e+'" data-action="'+i+'" data-id="'+t+'" data-method="'+DEFAULT_CONTENT_ACTION+'"><img class="icon" src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+i+'.png" title="" /><div class="tabname">'+e+'</div><img class="close icon" src="'+OR_THEMES_EXT_DIR+'default/images/icon/close.gif" title="" /></li>');resizeTabs($('div#contentbar'),!0);$('div#panel-content > div.header > ul.views').scrollLeft(9999);$('div#panel-content > div.header > ul.views img.close').click(function(){setTitle('');var i=$(this).closest('li.action').data('action'),t=$(this).closest('li.action').data('id');$('div#workbench div.content > div.sheet.action-'+i+'.id-'+t).remove();if($(this).closest('li.action').hasClass('active')){$('div#workbench div.refreshable div.content').html('');var e=$(this).closest('ul.views');$(this).parent().remove();$(e).find('li.action').last().click()} +else{$('div#panel-content > div.header > ul.views > li.active').removeClass('active');var s=7;if($('div#panel-content > div.header > ul.views > li.action').length>=s)$('div#panel-content > div.header > ul.views > li.action').first().remove();$('div#panel-content > div.header > ul.views').append('<li class="action active '+i+' id'+t+'" title="'+e+'" data-action="'+i+'" data-id="'+t+'" data-method="'+DEFAULT_CONTENT_ACTION+'"><img class="icon" src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+i+'.png" title="" /><div class="tabname">'+e+'</div><img class="close icon" src="'+OR_THEMES_EXT_DIR+'default/images/icon/close.gif" title="" /></li>');resizeTabs($('div#contentbar'),!0);$('div#panel-content > div.header > ul.views').scrollLeft(9999);$('div#panel-content > div.header > ul.views img.close').click(function(){setTitle('');var i=$(this).closest('li.action').data('action'),t=$(this).closest('li.action').data('id');$('div#workbench div.content > div.sheet.action-'+i+'.id-'+t).remove();if($(this).closest('li.action').hasClass('active')){$('div#workbench div.refreshable div.content').html('');var e=$(this).closest('ul.views');$(this).parent().remove();$(e).find('li.action').last().click()} else{$(this).parent().remove()};resizeTabs($('div#panel-content'),!0)});$('div#panel-content > div.header > ul.views > li.active').click(function(){$('div#panel-content > div.header > ul.views li.active').removeClass('active');$(this).addClass('active');setTitle($(this).children('div.tabname').text());setNewAction(i,t,a)});resizeTabs($('div#panel-content '))};setNewAction(i,t,a)};function filterMenus(e){$('div.clickable').addClass('active');$('div.clickable.filtered').removeClass('active').addClass('inactive');$('div.clickable.filtered.on-action-'+e).addClass('active').removeClass('inactive')};function setNewAction(e,i,t){filterMenus(e);$('div#workbench ul.views > li.action.dependent').attr('data-action',e).attr('data-id',i).attr('data-extra',JSON.stringify(t));refreshAllRefreshables()};function setNewId(e){$('div#workbench div.refreshable').attr('data-id',e);refreshAllRefreshables()};function notifyBrowser(e){if(!('Notification' in window)){return} else if(Notification.permission==='granted'){var i=new Notification(e)} -else if(Notification.permission!=='denied'){Notification.requestPermission(function(i){if(i==='granted'){var t=new Notification(e)}})}};function setUserStyle(e){var i=$('html'),t=i.attr('class').split(/\s+/);$.each(t,function(e,t){if(t.startsWith('theme-')){i.removeClass(t)}});i.addClass('theme-'+e.toLowerCase())};function insert(e,i,t){var a=document.forms[0].elements[e];a.focus();if(typeof document.selection!='undefined'){var d=document.selection.createRange(),n=d.text;d.text=i+n+t;d=document.selection.createRange();if(n.length==0){d.move('character',-t.length)} -else{d.moveStart('character',i.length+n.length+t.length)};d.select()} -else if(typeof a.selectionStart!='undefined'){var l=a.selectionStart,o=a.selectionEnd,n=a.value.substring(l,o);a.value=a.value.substr(0,l)+i+n+t+a.value.substr(o);var s;if(n.length==0){s=l+i.length} -else{s=l+i.length+n.length+t.length};a.selectionStart=s;a.selectionEnd=s} -else{s=a.value.length;var n=prompt('Text');a.value=a.value.substr(0,s)+i+n+t+a.value.substr(s)}};function loadSubaction(e,i,t,a){alert('nobody should call loadSubaction()');var s={skin:'v2',baseHref:OR_THEMES_EXT_DIR+'../editor/editor/',customConfig:'config-openrat.js',filebrowserUploadUrl:'./dispatcher.php?action=filebrowser&subaction=directupload&name=upload',filebrowserBrowseUrl:'./dispatcher.php?action=filebrowser&subaction=browse'};var n=$(e).parent().parent().parent('div.panel').children('div.content').first();$(n).load(createUrl(i,t,a)+' div.content',null,function(){var e=CKEDITOR.instances[$('textarea.editor').attr('name')];if(e)e.destroy();CKEDITOR.replace('text',{customConfig:'config-openrat.js'})});$(e).parent().parent().find('.active').removeClass('active');$(e).parent().addClass('active')};function createUrl(e,i,t,n){var a='./';if(typeof n==='string'){a+='?action='+e+'&subaction='+i+'&id='+t;jQuery.each(jQuery.parseJSON(n),function(e,i){a=a+'&'+e+'='+i})} -else if(typeof n==='object'){a+='?0=0';jQuery.each(n,function(e,i){a=a+'&'+i.name+'='+i.value})} -else{a+='?action='+e+'&subaction='+i+'&id='+t};console.log('URL='+a);return a};function resizeWorkbenchContainer(e){var t=e.width(),a=e.height(),n=e.children('div.resizable').data('size-factor');if(!n)n=0.3;var s=e.hasClass('axle-x');if(s){var i=Math.floor(t*n);e.find('div.panel.resizable').css('width',''+i+'px');e.find('div.panel.resizable > div.content').css('height',''+(a-26)+'px');e.find('div.panel.autosize ').css('width',''+(t-i-9)+'px');e.find('div.panel.autosize > div.content').css('height',''+(a-26)+'px');e.children('div.resizable').css('width',''+i+'px');e.children('div.resizable').css('height',''+a+'px');e.children('div.autosize').css('width',''+(t-i-9)+'px');e.children('div.autosize').css('height',''+a+'px');e.children('div.divider').css('height',''+a+'px')} -else{var i=Math.floor(a*n);e.find('div.panel.resizable ').css('width',''+t+'px');e.find('div.panel.resizable > div.content').css('height',''+(i-26)+'px');e.find('div.panel.autosize ').css('width',''+t+'px');e.find('div.panel.autosize > div.content').css('height',''+(a-i-26)+'px');e.children('div.resizable').css('width',''+t+'px');e.children('div.resizable').css('height',''+i+'px');e.children('div.autosize').css('width',''+t+'px');e.children('div.autosize').css('height',''+(a-i-5)+'px');e.children('div.divider').css('width',''+t+'px')};e.children('div.panel').each(function(){resizeTabs($(this))});$(e).children('div.container').each(function(){resizeWorkbenchContainer($(this))})};function resizeWorkbench(){var i=$(window).width(),t=$(window).height(),a=40,e=$('div#workbench > div.container');e.css('width',''+(i-6)+'px');e.css('height',''+(t-a-6)+'px');resizeWorkbenchContainer(e)};function resizeTabs(e){var t=$(e).find('div.header li.action').length,i=Math.floor((($(e).width()-18)/t)-39);if($(e).is('#panel-content'))i-=24;i=Math.min(90,Math.max(5,i));$(e).find('li.action div.tabname').width(i)};function help(e,i,t){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(i+a+'/'+n+t,'OpenRat_Help','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')};function notify(e,i){var t=$('<div class="notice '+e+'"><div class="text">'+i+'</div></div>');$('#noticebar').prepend(t);notifyBrowser(i);$(t).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})})};- \ No newline at end of file +else if(Notification.permission!=='denied'){Notification.requestPermission(function(i){if(i==='granted'){var t=new Notification(e)}})}};function setUserStyle(e){var i=$('html'),t=i.attr('class').split(/\s+/);$.each(t,function(e,t){if(t.startsWith('theme-')){i.removeClass(t)}});i.addClass('theme-'+e.toLowerCase())};function insert(e,i,t){var a=document.forms[0].elements[e];a.focus();if(typeof document.selection!='undefined'){var d=document.selection.createRange(),s=d.text;d.text=i+s+t;d=document.selection.createRange();if(s.length==0){d.move('character',-t.length)} +else{d.moveStart('character',i.length+s.length+t.length)};d.select()} +else if(typeof a.selectionStart!='undefined'){var l=a.selectionStart,o=a.selectionEnd,s=a.value.substring(l,o);a.value=a.value.substr(0,l)+i+s+t+a.value.substr(o);var n;if(s.length==0){n=l+i.length} +else{n=l+i.length+s.length+t.length};a.selectionStart=n;a.selectionEnd=n} +else{n=a.value.length;var s=prompt('Text');a.value=a.value.substr(0,n)+i+s+t+a.value.substr(n)}};function loadSubaction(e,i,t,a){alert('nobody should call loadSubaction()');var n={skin:'v2',baseHref:OR_THEMES_EXT_DIR+'../editor/editor/',customConfig:'config-openrat.js',filebrowserUploadUrl:'./dispatcher.php?action=filebrowser&subaction=directupload&name=upload',filebrowserBrowseUrl:'./dispatcher.php?action=filebrowser&subaction=browse'};var s=$(e).parent().parent().parent('div.panel').children('div.content').first();$(s).load(createUrl(i,t,a)+' div.content',null,function(){var e=CKEDITOR.instances[$('textarea.editor').attr('name')];if(e)e.destroy();CKEDITOR.replace('text',{customConfig:'config-openrat.js'})});$(e).parent().parent().find('.active').removeClass('active');$(e).parent().addClass('active')};function createUrl(e,i,t,s){var a='./';if(typeof s==='string'){a+='?action='+e+'&subaction='+i+'&id='+t;jQuery.each(jQuery.parseJSON(s),function(e,i){a=a+'&'+e+'='+i})} +else if(typeof s==='object'){a+='?0=0';jQuery.each(s,function(e,i){a=a+'&'+i.name+'='+i.value})} +else{a+='?action='+e+'&subaction='+i+'&id='+t};console.log('URL='+a);return a};function resizeWorkbenchContainer(e){var t=e.width(),a=e.height(),s=e.children('div.resizable').data('size-factor');if(!s)s=0.3;var n=e.hasClass('axle-x');if(n){var i=Math.floor(t*s);e.find('div.panel.resizable').css('width',''+i+'px');e.find('div.panel.resizable > div.content').css('height',''+(a-26)+'px');e.find('div.panel.autosize ').css('width',''+(t-i-9)+'px');e.find('div.panel.autosize > div.content').css('height',''+(a-26)+'px');e.children('div.resizable').css('width',''+i+'px');e.children('div.resizable').css('height',''+a+'px');e.children('div.autosize').css('width',''+(t-i-9)+'px');e.children('div.autosize').css('height',''+a+'px');e.children('div.divider').css('height',''+a+'px')} +else{var i=Math.floor(a*s);e.find('div.panel.resizable ').css('width',''+t+'px');e.find('div.panel.resizable > div.content').css('height',''+(i-26)+'px');e.find('div.panel.autosize ').css('width',''+t+'px');e.find('div.panel.autosize > div.content').css('height',''+(a-i-26)+'px');e.children('div.resizable').css('width',''+t+'px');e.children('div.resizable').css('height',''+i+'px');e.children('div.autosize').css('width',''+t+'px');e.children('div.autosize').css('height',''+(a-i-5)+'px');e.children('div.divider').css('width',''+t+'px')};e.children('div.panel').each(function(){resizeTabs($(this))});$(e).children('div.container').each(function(){resizeWorkbenchContainer($(this))})};function resizeWorkbench(){var i=$(window).width(),t=$(window).height(),a=40,e=$('div#workbench > div.container');e.css('width',''+(i-6)+'px');e.css('height',''+(t-a-6)+'px');resizeWorkbenchContainer(e)};function resizeTabs(e){var t=$(e).find('div.header li.action').length,i=Math.floor((($(e).width()-18)/t)-39);if($(e).is('#panel-content'))i-=24;i=Math.min(90,Math.max(5,i));$(e).find('li.action div.tabname').width(i)};function help(e,i,t){var a=$(e).closest('div.panel').find('li.action.active').attr('data-action'),s=$(e).closest('div.panel').find('li.action.active').attr('data-method');window.open(i+a+'/'+s+t,'OpenRat_Help','location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes')};function notify(e,i){var t=$('<div class="notice '+e+'"><div class="text">'+i+'</div></div>');$('#noticebar').prepend(t);notifyBrowser(i);$(t).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})})};+ \ No newline at end of file diff --git a/modules/cms-ui/themes/default/js/plugin/jquery-plugin-orTree.js b/modules/cms-ui/themes/default/js/plugin/jquery-plugin-orTree.js @@ -15,7 +15,7 @@ jQuery.fn.orTree = function( options ) { $(treeEl).closest('div.content').addClass('loader'); $.getJSON('./api/?action=tree&subaction=loadBranch&id='+settings.id+'&type='+settings.type+'&output=json', function(json) { - $(treeEl).append('<ul class="tree" style="display:none;"/>'); + $(treeEl).append('<ul class="tree"/>'); var ul = $(treeEl).children('ul').first(); var output = json['output']; $.each(output['branch'],function(idx,line) @@ -23,7 +23,7 @@ jQuery.fn.orTree = function( options ) 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">&nbsp;</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>' ); + $(ul).append( '<li class="object" data-id="'+line.internalId+'" data-type="'+line.type+'"><div class="tree">&nbsp;</div><div class="entry" data-id="'+line.internalId+'" data-type="'+line.type+'" title="'+ line.description + '"><img src="modules/cms-ui/themes/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 ) diff --git a/modules/cms-ui/themes/default/js/plugin/jquery-plugin-orTree.min.js b/modules/cms-ui/themes/default/js/plugin/jquery-plugin-orTree.min.js @@ -1 +1 @@ -;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('./api/?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">&nbsp;</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').length<=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 +;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('./api/?action=tree&subaction=loadBranch&id='+e.id+'&type='+e.type+'&output=json',function(i){$(t).append('<ul class="tree"/>');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">&nbsp;</div><div class="entry" data-id="'+t.internalId+'" data-type="'+t.type+'" title="'+t.description+'"><img src="modules/cms-ui/themes/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').length<=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/modules/cms-ui/themes/default/layout/index.php b/modules/cms-ui/themes/default/layout/index.php @@ -33,55 +33,8 @@ <link rel="stylesheet" type="text/css" href="<?php echo Html::url('index','themestyle') ?>" /> </head> -<?php -$ping_url = @$viewCache['header']['ping_url' ]; -$ping_timeout = @$viewCache['header']['ping_timeout']; - ?> -<?php if (!empty($ping_url)) { ?> -<script type="text/javascript"> - <!-- - function ping() { - $.getJSON('<?php echo str_replace('&amp;','&',$ping_url) ?>', function(json) {}); - window.setTimeout("ping()", <?php echo $ping_timeout*1000 ?>); - } - - //window.setTimeout("ping()", <?php echo $ping_timeout*1000 ?>); - - window.addEventListener('DOMContentLoaded', function () - { - window.setTimeout("ping()", 5000); - }, false); - - // --> - </script> -<?php } ?> - - <body> -<script type="text/javascript"> -<!-- -// Konstanten -var OR_THEMES_EXT_DIR = '<?php echo OR_THEMES_DIR ?>'; -var OR_CONTROLLER_FILE = '<?php echo OR_CONTROLLER_FILE ?>'; -var REQ_PARAM_TOKEN = '<?php echo REQ_PARAM_TOKEN ?>'; -var REQ_PARAM_ACTION = '<?php echo REQ_PARAM_ACTION ?>'; -var REQ_PARAM_SUBACTION = '<?php echo REQ_PARAM_SUBACTION ?>'; -var REQ_PARAM_TARGETSUBACTION = '<?php echo REQ_PARAM_TARGETSUBACTION ?>'; -var REQ_PARAM_ID = '<?php echo REQ_PARAM_ID ?>'; -var REQ_PARAM_OBJECT_ID = '<?php echo REQ_PARAM_OBJECT_ID ?>'; -var REQ_PARAM_LANGUAGE_ID = '<?php echo REQ_PARAM_LANGUAGE_ID ?>'; -var REQ_PARAM_MODEL_ID = '<?php echo REQ_PARAM_MODEL_ID ?>'; -var REQ_PARAM_PROJECT_ID = '<?php echo REQ_PARAM_PROJECT_ID ?>'; -var REQ_PARAM_ELEMENT_ID = '<?php echo REQ_PARAM_ELEMENT_ID ?>'; -var REQ_PARAM_TEMPLATE_ID = '<?php echo REQ_PARAM_TEMPLATE_ID ?>'; -var REQ_PARAM_DATABASE_ID = '<?php echo REQ_PARAM_DATABASE_ID ?>'; -var REQ_PARAM_TARGET = '<?php echo REQ_PARAM_TARGET ?>'; -// --> -</script> - - -<?php global $viewCache; /* Debug-Information */ if (@$showDuration||true) { echo "<!-- Output Variables are:\n";echo str_replace('-->','-- >',print_r($viewCache,true));echo "\n-->";} ?> <div id="noticebar"> </div> @@ -105,7 +58,6 @@ var REQ_PARAM_TARGET = '<?php echo REQ_PARAM_TARGET ?>'; <form class="invisible" target="temp" action=""> <input type="text" id="uname" name="l1" /><input id="upassword" type="password" name="l2" /><input type="submit" /> </form> -<iframe src="about:blank" name="temp" class="invisiblex" width="0px" height="0px" style="width:0px;height:0px;"></iframe> <div id="filler"> </div> diff --git a/modules/cms-ui/themes/default/layout/perspective/window.php b/modules/cms-ui/themes/default/layout/perspective/window.php @@ -60,20 +60,6 @@ function view_header( $name ) ?> </ul> -<script name="javascript" type="text/javascript"> -<!-- -<?php -if ( $name=='content' && count(@$preselectedobjects)>0 ) -{ - global $preselectedobjects; - $object = $preselectedobjects[ count($preselectedobjects)-1]; -?> -setTimeout( function() { openNewAction( '<?php echo $object->name; ?>','<?php echo $object->getType() ?>','<?php echo $object->objectid ?>',0 );} ,500); -<?php -} -?> -//--> -</script> <div class="panel-icon"> <?php if (!empty($viewlist) || $name=='content') { /* Fenster-MenĂ¼ anzeigen (sofern Views vorhanden) */ ?> diff --git a/modules/cms-ui/themes/default/templates/tree/tree.tpl.src.xml b/modules/cms-ui/themes/default/templates/tree/tree.tpl.src.xml @@ -1,6 +1,4 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> <header views="projecttimeline,userprojecttimeline" /> - - <insert function="loadTree"></insert> </output> \ No newline at end of file diff --git a/modules/template-engine/components/html/column/Column.class.php b/modules/template-engine/components/html/column/Column.class.php @@ -18,13 +18,13 @@ class ColumnComponent extends Component protected function begin() { + $styleClasses = array(); echo '<td'; if ( ! empty($this->width)) echo ' width="'.$this->htmlvalue($this->width).'"'; if ( ! empty($this->style)) echo ' style="'.$this->htmlvalue($this->style).'"'; - if ( ! empty($this->class)) - echo ' class="'.$this->htmlvalue($this->class).'"'; + if ( ! empty($this->colspan)) echo ' colspan="'.$this->htmlvalue($this->colspan).'"'; if ( ! empty($this->rowspan)) @@ -33,9 +33,21 @@ class ColumnComponent extends Component echo ' rowspan="'.$this->htmlvalue($this->rowspan).'"'; if ( ! empty($this->title)) echo ' title="'.$this->htmlvalue($this->title).'"'; - if ( ! empty($this->id)) - echo ' onclick="javascript:openNewAction('."'".$this->htmlvalue($this->name)."','".$this->htmlvalue($this->action)."','".$this->htmlvalue($this->id)."');".'"'; - echo '>'; + + if ( ! empty($this->id)) + { + echo ' data-name="'.$this->htmlvalue($this->name).'"'; + echo ' data-action="'.$this->htmlvalue($this->action).'"'; + echo ' data-id="'.$this->htmlvalue($this->id).'"'; + $styleClasses[] = 'clickable'; + } + if ( ! empty($this->class)) + $styleClasses[] = $this->htmlvalue($this->class); + + if ( sizeof($styleClasses) > 0) + echo ' class="'.implode(' ',$styleClasses).'"'; + + echo '>'; } diff --git a/modules/template-engine/components/html/column/column.js b/modules/template-engine/components/html/column/column.js @@ -0,0 +1,9 @@ +// View loaded... +$(document).on('orViewLoaded',function(event, data) { + + // Clickable Columns. + $(event.target).find('td.clickable').click(function () { + openNewAction($(this).data('name'), $(this).data('action'), $(this).data('id'), 0); + }) + +});+ \ No newline at end of file diff --git a/modules/template-engine/components/html/column/column.min.js b/modules/template-engine/components/html/column/column.min.js @@ -0,0 +1,9 @@ +// View loaded... +$(document).on('orViewLoaded',function(event, data) { + + // Clickable Columns. + $(event.target).find('td.clickable').click(function () { + openNewAction($(this).data('name'), $(this).data('action'), $(this).data('id'), 0); + }) + +});+ \ No newline at end of file diff --git a/modules/template-engine/components/html/editor/editor.js b/modules/template-engine/components/html/editor/editor.js @@ -28,7 +28,7 @@ $(document).on('orViewLoaded',function(event, data) { //$(event.target).find('.wikieditor').markItUp(markitupSettings); // HTML-Editor - var wymSettings = {lang: 'de',basePath: OR_THEMES_EXT_DIR+'../editor/wymeditor/wymeditor/', + var wymSettings = {lang: 'de',basePath: 'modules/cms-ui/editor/wymeditor/wymeditor/', toolsItems: [ {'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'}, {'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'}, diff --git a/modules/template-engine/components/html/editor/editor.min.js b/modules/template-engine/components/html/editor/editor.min.js @@ -1 +1 @@ -;$(document).on('orViewLoaded',function(e,s){if($(e.target).find('textarea#pageelement_edit_editor').size()>0){var t=CKEDITOR.instances['pageelement_edit_editor'];if(t){CKEDITOR.remove(t)};CKEDITOR.replace('pageelement_edit_editor',{customConfig:'config-openrat.js'})};var i={markupSet:[{name:'Bold',key:'B',openWith:'*',closeWith:'*'},{name:'Italic',key:'I',openWith:'_',closeWith:'_'},{name:'Stroke through',key:'S',openWith:'--',closeWith:'--'},{separator:'-----------------'},{name:'Bulleted List',openWith:'*',closeWith:'',multiline:!0,openBlockWith:'\n',closeBlockWith:'\n'},{name:'Numeric List',openWith:'#',closeWith:'',multiline:!0,openBlockWith:'\n',closeBlockWith:'\n'},{separator:'---------------'},{name:'Picture',key:'P',replaceWith:'{[![Source:!:http://]!]" alt="[![Alternative text]!]" }'},{name:'Link',key:'L',openWith:'""->"[![Link:!:http://]!]"',closeWith:'"',placeHolder:'Your text to link...'},{separator:'---------------'},{name:'Clean',className:'clean',replaceWith:function(e){return e.selection.replace(/<(.*?)>/g,'')}},{name:'Preview',className:'preview',call:'preview'}]};var o={lang:'de',basePath:OR_THEMES_EXT_DIR+'../editor/wymeditor/wymeditor/',toolsItems:[{'name':'Bold','title':'Strong','css':'wym_tools_strong'},{'name':'Italic','title':'Emphasis','css':'wym_tools_emphasis'},{'name':'Superscript','title':'Superscript','css':'wym_tools_superscript'},{'name':'Subscript','title':'Subscript','css':'wym_tools_subscript'},{'name':'InsertOrderedList','title':'Ordered_List','css':'wym_tools_ordered_list'},{'name':'InsertUnorderedList','title':'Unordered_List','css':'wym_tools_unordered_list'},{'name':'Indent','title':'Indent','css':'wym_tools_indent'},{'name':'Outdent','title':'Outdent','css':'wym_tools_outdent'},{'name':'Undo','title':'Undo','css':'wym_tools_undo'},{'name':'Redo','title':'Redo','css':'wym_tools_redo'},{'name':'CreateLink','title':'Link','css':'wym_tools_link'},{'name':'Unlink','title':'Unlink','css':'wym_tools_unlink'},{'name':'InsertImage','title':'Image','css':'wym_tools_image'},{'name':'InsertTable','title':'Table','css':'wym_tools_table'},{'name':'Paste','title':'Paste_From_Word','css':'wym_tools_paste'},{'name':'ToggleHtml','title':'HTML','css':'wym_tools_html'},{'name':'Preview','title':'Preview','css':'wym_tools_preview'}]};$(e.target).find('textarea').orAutoheight();$(e.target).find('textarea.editor__ace-editor').each(function(){var t=$(this),s=$('<div class="editor__code-editor" />').insertAfter(t),e=ace.edit(s.get(0)),o=t.data('mode');e.renderer.setShowGutter(!0);e.setTheme('ace/theme/github');e.getSession().setTabSize(4);e.getSession().setUseWrapMode(!0);e.setHighlightActiveLine(!0);e.getSession().setValue(t.val());e.getSession().setMode('ace/mode/'+o);e.getSession().on('change',function(s){t.val(e.getSession().getValue())});t.closest('form').submit(function(){t.val(e.getSession().getValue())})});$(e.target).find('textarea.editor__code-editor').each(function(){var t=CodeMirror.fromTextArea(this,{lineNumbers:!0});var e=this;$(e).closest('form').submit(function(){var s=t.getValue();$(e).val(s)})})});- \ No newline at end of file +;$(document).on('orViewLoaded',function(e,i){if($(e.target).find('textarea#pageelement_edit_editor').length>0){var t=CKEDITOR.instances['pageelement_edit_editor'];if(t){CKEDITOR.remove(t)};CKEDITOR.replace('pageelement_edit_editor',{customConfig:'config-openrat.js'})};var o={markupSet:[{name:'Bold',key:'B',openWith:'*',closeWith:'*'},{name:'Italic',key:'I',openWith:'_',closeWith:'_'},{name:'Stroke through',key:'S',openWith:'--',closeWith:'--'},{separator:'-----------------'},{name:'Bulleted List',openWith:'*',closeWith:'',multiline:!0,openBlockWith:'\n',closeBlockWith:'\n'},{name:'Numeric List',openWith:'#',closeWith:'',multiline:!0,openBlockWith:'\n',closeBlockWith:'\n'},{separator:'---------------'},{name:'Picture',key:'P',replaceWith:'{[![Source:!:http://]!]" alt="[![Alternative text]!]" }'},{name:'Link',key:'L',openWith:'""->"[![Link:!:http://]!]"',closeWith:'"',placeHolder:'Your text to link...'},{separator:'---------------'},{name:'Clean',className:'clean',replaceWith:function(e){return e.selection.replace(/<(.*?)>/g,'')}},{name:'Preview',className:'preview',call:'preview'}]};var s={lang:'de',basePath:'modules/cms-ui/editor/wymeditor/wymeditor/',toolsItems:[{'name':'Bold','title':'Strong','css':'wym_tools_strong'},{'name':'Italic','title':'Emphasis','css':'wym_tools_emphasis'},{'name':'Superscript','title':'Superscript','css':'wym_tools_superscript'},{'name':'Subscript','title':'Subscript','css':'wym_tools_subscript'},{'name':'InsertOrderedList','title':'Ordered_List','css':'wym_tools_ordered_list'},{'name':'InsertUnorderedList','title':'Unordered_List','css':'wym_tools_unordered_list'},{'name':'Indent','title':'Indent','css':'wym_tools_indent'},{'name':'Outdent','title':'Outdent','css':'wym_tools_outdent'},{'name':'Undo','title':'Undo','css':'wym_tools_undo'},{'name':'Redo','title':'Redo','css':'wym_tools_redo'},{'name':'CreateLink','title':'Link','css':'wym_tools_link'},{'name':'Unlink','title':'Unlink','css':'wym_tools_unlink'},{'name':'InsertImage','title':'Image','css':'wym_tools_image'},{'name':'InsertTable','title':'Table','css':'wym_tools_table'},{'name':'Paste','title':'Paste_From_Word','css':'wym_tools_paste'},{'name':'ToggleHtml','title':'HTML','css':'wym_tools_html'},{'name':'Preview','title':'Preview','css':'wym_tools_preview'}]};$(e.target).find('textarea').orAutoheight();$(e.target).find('textarea.editor__ace-editor').each(function(){var t=$(this),i=$('<div class="editor__code-editor" />').insertAfter(t),e=ace.edit(i.get(0)),s=t.data('mode');e.renderer.setShowGutter(!0);e.setTheme('ace/theme/github');e.getSession().setTabSize(4);e.getSession().setUseWrapMode(!0);e.setHighlightActiveLine(!0);e.getSession().setValue(t.val());e.getSession().setMode('ace/mode/'+s);e.getSession().on('change',function(i){t.val(e.getSession().getValue())});t.closest('form').submit(function(){t.val(e.getSession().getValue())})});$(e.target).find('textarea.editor__code-editor').each(function(){var t=$(this).data('mode'),i=$(this).data('mimetype');if(i.length>0)t=i;var s=CodeMirror.fromTextArea(this,{lineNumbers:!0,viewportMargin:Infinity,mode:t});var e=this;$(e).closest('form').submit(function(){var t=s.getValue();$(e).val(t)})})});+ \ No newline at end of file diff --git a/modules/template-engine/components/html/form/Form.class.php b/modules/template-engine/components/html/form/Form.class.php @@ -31,8 +31,6 @@ class FormComponent extends Component public $type = ''; - private $submitFunction = 'formSubmit( $(this) ); return false;'; - protected function begin() { if (empty($this->label)) @@ -54,10 +52,11 @@ class FormComponent extends Component echo ' class="' . $this->htmlvalue($this->action) . '"'; echo ' data-async="' . $this->htmlvalue($this->async) . '"'; echo ' data-autosave="' . $this->htmlvalue($this->autosave) . '"'; - echo ' onSubmit="' . $this->htmlvalue($this->submitFunction) . '">'; - - echo '<input type="submit" class="invisible" />'; // why this? - + echo '>'; + + // Enable Submit on Enter + echo '<input type="submit" class="invisible" />'; + echo '<input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" />'; echo '<input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="' . $this->htmlvalue($this->action) . '" />'; echo '<input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="' . $this->htmlvalue($this->subaction) . '" />'; @@ -71,12 +70,12 @@ class FormComponent extends Component echo '<div class="bottom">'; echo "<div class=\"command {$this->visible}\">"; - echo "<input type=\"button\" class=\"submit ok\" value=\"{$label}\" onclick=\"$(this).closest('div.sheet').find('form').submit(); \" />"; + echo "<input type=\"button\" class=\"submit ok\" value=\"{$label}\" />"; // Cancel-Button nicht anzeigen, wenn cancel==false. if ($this->cancel) { - echo '<input type="button" class="submit cancel" value="<?php echo lang("CANCEL") ?>" onclick="' . "$(div#dialog').hide(); $('div#filler').fadeOut(500); $(this).closest('div.panel').find('ul.views > li.active').click();" . '" />'; + echo '<input type="button" class="submit cancel" value="<?php echo lang("CANCEL") ?>" />'; } echo '</div>'; echo '</div>'; diff --git a/modules/template-engine/components/html/form/form.js b/modules/template-engine/components/html/form/form.js @@ -10,9 +10,24 @@ $(document).on('orViewLoaded',function(event, data) { // Autosave in Formularen. Bei Veränderungen wird das Formular sofort abgeschickt. $(event.target).find('form[data-autosave="true"] input[type="checkbox"]').click( function() { - formSubmit( $(this).closest('form') ); + $(this).closest('form').submit(); }); + // After click to "OK" the form is submitted. + $(event.target).find('input.submit.ok').click( function() { + $(this).closest('form').submit(); + }); + + $(event.target).find('input.submit.cancel').click( function() { + // TODO: cancel dialog screen (if clicked in dialog) + }); + + // Submithandler for the whole form. + $(event.target).find('form').submit(function( event ) { + formSubmit($(this)); + event.preventDefault(); + }); + } ); diff --git a/modules/template-engine/components/html/form/form.min.js b/modules/template-engine/components/html/form/form.min.js @@ -1,3 +1,3 @@ -;$(document).on('orViewLoaded',function(e,t){if($('div.panel form input[type=password]').length>0&&$('#uname').attr('value')!=''){$('div.panel form input[name=login_name] ').attr('value',$('#uname').attr('value'));$('div.panel form input[name=login_password]').attr('value',$('#upassword').attr('value'))};$(e.target).find('form[data-autosave="true"] input[type="checkbox"]').click(function(){formSubmit($(this).closest('form'))})});function formSubmit(e){if($('div.panel form input[type=password]').length>0){$('#uname').attr('value',$('div.panel form input[name=login_name]').attr('value'));$('#upassword').attr('value',$('div.panel form input[name=login_password]').attr('value'));$('#uname').closest('form').submit()};if($('#pageelement_edit_editor').length>0){var r=CKEDITOR.instances['pageelement_edit_editor'];if(r){var l=r.getData();$('#pageelement_edit_editor').html(l)}};var t=$('<div class="notice info"><div class="text loader"></div></div>');$('#noticebar').prepend(t);$(t).show();$(e).find('.error').removeClass('error');var a=$(e).serializeArray(),d=$(e).attr('method').toUpperCase();if(d=='GET'){var i=$(e).data('action'),n=$(e).data('method'),s=$(e).data('id');loadView($(e).closest('div.content'),i,n,s,a)} -else{var o='./api/';$(e).closest('div.content').addClass('loader');o+='?output=json';a['output']='json';if($(e).data('async')||$(e).data('async')=='true'){$('div#dialog').html('').hide();$('div#filler').fadeOut(500)};$.ajax({'type':'POST',url:o,data:a,success:function(a,o,r){$(e).closest('div.content').removeClass('loader');$(t).remove();doResponse(a,o,e)},error:function(a,o,n){$(e).closest('div.content').removeClass('loader');$(t).remove();var i;try{var r=jQuery.parseJSON(a.responseText);i=r.error+'/'+r.description+': '+r.reason}catch(s){i=a.responseText};notify('error',i)}});$(e).fadeIn()}};function doResponse(e,t,a){if(t!='success'){alert('Server error: '+t);return};$.each(e['notices'],function(t,e){var o=$('<div class="notice '+e.status+'"><div class="text">'+e.text+'</div></div>');notifyBrowser(e.text);$.each(e.log,function(e,t){$(o).append('<div class="log">'+t+'</div>')});$('#noticebar').prepend(o);$(o).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});var r;if(e.status=='ok'){r=3;if($(a).data('async')!='true'){$('div#dialog').html('').hide();$('div#filler').fadeOut(500);$(a).closest('div.panel').find('div.header ul.views li.action.active').removeClass('dirty')}} -else{r=8};setTimeout(function(){$(o).fadeOut('slow').remove()},r*1000)});$.each(e['errors'],function(e,t){$('input[name='+t+']').addClass('error').parent().addClass('error').parents('fieldset').addClass('show').addClass('open')});if(!e.control){};if(e.control.redirect)window.location.href=e.control.redirect;if(e.control.new_style)setUserStyle(e.control.new_style);if(e.control.refresh)refreshAll();else if(e.control.next_view)startView($(a).closest('div.content'),e.control.next_view);else if(e.errors.length==0)$(a).closest('div.panel').find('li.action.active').orLoadView()};- \ No newline at end of file +;$(document).on('orViewLoaded',function(e,t){if($('div.panel form input[type=password]').length>0&&$('#uname').attr('value')!=''){$('div.panel form input[name=login_name] ').attr('value',$('#uname').attr('value'));$('div.panel form input[name=login_password]').attr('value',$('#upassword').attr('value'))};$(e.target).find('form[data-autosave="true"] input[type="checkbox"]').click(function(){$(this).closest('form').submit()});$(e.target).find('input.submit.ok').click(function(){$(this).closest('form').submit()});$(e.target).find('input.submit.cancel').click(function(){});$(e.target).find('form').submit(function(e){formSubmit($(this));e.preventDefault()})});function formSubmit(e){if($('div.panel form input[type=password]').length>0){$('#uname').attr('value',$('div.panel form input[name=login_name]').attr('value'));$('#upassword').attr('value',$('div.panel form input[name=login_password]').attr('value'));$('#uname').closest('form').submit()};if($('#pageelement_edit_editor').length>0){var o=CKEDITOR.instances['pageelement_edit_editor'];if(o){var d=o.getData();$('#pageelement_edit_editor').html(d)}};var t=$('<div class="notice info"><div class="text loader"></div></div>');$('#noticebar').prepend(t);$(t).show();$(e).find('.error').removeClass('error');var a=$(e).serializeArray(),l=$(e).attr('method').toUpperCase();if(l=='GET'){var r=$(e).data('action'),n=$(e).data('method'),s=$(e).data('id');loadView($(e).closest('div.content'),r,n,s,a)} +else{var i='./api/';$(e).closest('div.content').addClass('loader');i+='?output=json';a['output']='json';if($(e).data('async')||$(e).data('async')=='true'){$('div#dialog').html('').hide();$('div#filler').fadeOut(500)};$.ajax({'type':'POST',url:i,data:a,success:function(a,i,o){$(e).closest('div.content').removeClass('loader');$(t).remove();doResponse(a,i,e)},error:function(a,i,n){$(e).closest('div.content').removeClass('loader');$(t).remove();var r;try{var o=jQuery.parseJSON(a.responseText);r=o.error+'/'+o.description+': '+o.reason}catch(s){r=a.responseText};notify('error',r)}});$(e).fadeIn()}};function doResponse(e,t,a){if(t!='success'){alert('Server error: '+t);return};$.each(e['notices'],function(t,e){var i=$('<div class="notice '+e.status+'"><div class="text">'+e.text+'</div></div>');notifyBrowser(e.text);$.each(e.log,function(e,t){$(i).append('<div class="log">'+t+'</div>')});$('#noticebar').prepend(i);$(i).fadeIn().click(function(){$(this).fadeOut('fast',function(){$(this).remove()})});var o;if(e.status=='ok'){o=3;if($(a).data('async')!='true'){$('div#dialog').html('').hide();$('div#filler').fadeOut(500);$(a).closest('div.panel').find('div.header ul.views li.action.active').removeClass('dirty')}} +else{o=8};setTimeout(function(){$(i).fadeOut('slow').remove()},o*1000)});$.each(e['errors'],function(e,t){$('input[name='+t+']').addClass('error').parent().addClass('error').parents('fieldset').addClass('show').addClass('open')});if(!e.control){};if(e.control.redirect)window.location.href=e.control.redirect;if(e.control.new_style)setUserStyle(e.control.new_style);if(e.control.refresh)refreshAll();else if(e.control.next_view)startView($(a).closest('div.content'),e.control.next_view);else if(e.errors.length==0)$(a).closest('div.panel').find('li.action.active').orLoadView()};+ \ No newline at end of file diff --git a/modules/template-engine/components/html/tree/component-tree.php b/modules/template-engine/components/html/tree/component-tree.php @@ -12,7 +12,11 @@ function component_tree( $contents ) echo '<li>'; echo '<div class="tree" />'; - echo '<div class="entry '.($selected?' selected':'').'" onclick="javascript:openNewAction( \''.$el['name'].'\',\''.$el['type'].'\',\''.$el['id'].'\',0 );">'; + echo '<div class="entry clickable'.($selected?' selected':'').'"'; + echo ' data-name="'.$el['name'].'"'; + echo ' data-action="'.$el['type'].'"'; + echo ' data-id="'.$el['id'].'"'; + echo '>'; echo '<img src="'.OR_THEMES_DIR.'default/images/icon_'.$el['type'].'.png" />'; echo $el['name']; echo '</div>'; diff --git a/modules/template-engine/components/html/tree/tree.js b/modules/template-engine/components/html/tree/tree.js @@ -0,0 +1,8 @@ +// View loaded... +$(document).on('orViewLoaded',function(event, data) { + + // Clickable. + $(event.target).find('div.entry.clickable').click(function () { + openNewAction($(this).data('name'), $(this).data('action'), $(this).data('id'), 0); + }) +});+ \ No newline at end of file diff --git a/modules/template-engine/components/html/tree/tree.min.js b/modules/template-engine/components/html/tree/tree.min.js @@ -0,0 +1,8 @@ +// View loaded... +$(document).on('orViewLoaded',function(event, data) { + + // Clickable. + $(event.target).find('div.entry.clickable').click(function () { + openNewAction($(this).data('name'), $(this).data('action'), $(this).data('id'), 0); + }) +});+ \ No newline at end of file