openrat-cms

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

commit b49c6af13f3e1ab781f2e0d6998d9ec658f6da8b
parent 489733fdc2c526a1ad9a7b7f27847d7dbdd78875
Author: Jan Dankert <devnull@localhost>
Date:   Tue, 15 Jan 2019 23:37:20 +0100

Popup-Fenster mit der Preview aktualisieren, wenn die Seite gewechselt wird oder Daten gespeichert wurden.

Diffstat:
modules/cms-ui/themes/default/html/views/page/preview.php | 2+-
modules/cms-ui/themes/default/html/views/page/preview.tpl.src.xml | 2+-
modules/cms-ui/themes/default/production/combined.min.js | 24++++++++++++------------
modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.js | 25++++++++++++++++++++++---
modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.min.js | 24++++++++++++------------
modules/template-engine/components/html/form/form.js | 4+++-
modules/template-engine/components/html/form/form.min.js | 2+-
7 files changed, 52 insertions(+), 31 deletions(-)

diff --git a/modules/cms-ui/themes/default/html/views/page/preview.php b/modules/cms-ui/themes/default/html/views/page/preview.php @@ -4,7 +4,7 @@ <i class="image-icon image-icon--menu-refresh"></i> </div> - <div class="clickable"> + <div class="toolbar-icon clickable"> <a class="action" target="_self" data-url="<?php echo $preview_url ?>" data-type="popup" data-action="" data-method="preview" data-id="<?php echo OR_ID ?>" data-extra="[]" href="<?php echo Html::url('','','',array()) ?>"> <i class="image-icon image-icon--menu-open_in_new"></i> diff --git a/modules/cms-ui/themes/default/html/views/page/preview.tpl.src.xml b/modules/cms-ui/themes/default/html/views/page/preview.tpl.src.xml @@ -5,7 +5,7 @@ <image menu="refresh" /> </part> - <part class="clickable"> + <part class="toolbar-icon clickable"> <link type="popup" class="action" url="var:preview_url"> <image menu="open_in_new"></image> diff --git a/modules/cms-ui/themes/default/production/combined.min.js b/modules/cms-ui/themes/default/production/combined.min.js @@ -275,17 +275,17 @@ else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseIn else{this.currentItem.show()};if(this.fromOutside&&!e){s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})};if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!e){s.push(function(t){this._trigger("update",t,this._uiHash())})};if(this!==this.currentContainer){if(!e){s.push(function(t){this._trigger("remove",t,this._uiHash())});s.push((function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}).call(this,this.currentContainer));s.push((function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}).call(this,this.currentContainer))}};function o(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}};for(i=this.containers.length-1;i>=0;i--){if(!e){s.push(o("deactivate",this,this.containers[i]))};if(this.containers[i].containerCache.over){s.push(o("out",this,this.containers[i]));this.containers[i].containerCache.over=0}};if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()};if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)};if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex)};this.dragging=!1;if(!e){this._trigger("beforeStop",t,this._uiHash())};this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(!this.cancelHelperRemoval){if(this.helper[0]!==this.currentItem[0]){this.helper.remove()};this.helper=null};if(!e){for(i=0;i<s.length;i++){s[i].call(this,t)};this._trigger("stop",t,this._uiHash())};this.fromOutside=!1;return!this.cancelHelperRemoval},_trigger:function(){if(t.Widget.prototype._trigger.apply(this,arguments)===!1){this.cancel()}},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})); /* ./modules/cms-ui/themes/default/script/plugin/jquery-plugin-orSearch.min.js */;jQuery.fn.orSearch=function(e){var t=$.extend({'dropdown':'unknown'},e);return $(this).keyup(function(){let searchArgument=$(this).val();if(searchArgument.length>3){$(t.dropdown).empty();$.ajax({'type':'GET',url:'./api/?action=search&subaction=quicksearch&output=json&search='+searchArgument,data:null,success:function(e,a,n){for(id in e.output.result){let result=e.output.result[id];let div=$('<div class="entry clickable" title="'+result.desc+'"></div>');let link=$('<a href="./?action='+result.type+'&id='+result.id+'"></a>');$(link).attr('data-type','open').attr('data-name',result.name).attr('data-action',result.type).attr('data-id',result.id).attr('data-extra','[]');$(link).append('<i class="image-icon image-icon--action-'+result.type+'" />');$(link).append('<span>'+result.name+'</span>');$(div).append(link);$(t.dropdown).append(div)};$(t.dropdown).closest('.or-menu').addClass('open');$(t.dropdown).find('.clickable').orLinkify()}})} else{$(t.dropdown).empty()}})}; -/* ./modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.min.js */;jQuery.fn.orLinkify=function(){$(this).find('a').click(function(t){t.preventDefault()});return $(this).click(function(){$(this).find('a').first().each(function(){let type=$(this).attr('data-type');if($(this).parent().hasClass('inactive'))return;if(type=='post'){submitLink(this,$(this).attr('data-data'))} -else if(type=='view'){alert('Error: Link type = view not supported.')} -else if(type=='modal'){alert('Error: Link type = modal not supported.');startDialog($(this).attr('data-name'),null,$(this).attr('data-method'))} -else if(type=='dialog'){startDialog($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-method'),$(this).attr('data-id'),$(this).attr('data-extra'))} -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'){fullscreen(this)} -else if(type=='open'){openNewAction($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),jQuery.parseJSON($(this).attr('data-extra').replace(/'/g,'"')))} -else{alert('Fatal: Cannot open link: '+$(this).html())}})})}; +/* ./modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.min.js */;var popupWindow;jQuery.fn.orLinkify=function(){$(this).find("a").click(function(t){t.preventDefault()});return $(this).click(function(){$(this).find("a").first().each(function(){let type=$(this).attr("data-type");if($(this).parent().hasClass("inactive"))return;if(type=="post"){submitLink(this,$(this).attr("data-data"))} +else if(type=="view"){alert("Error: Link type = view not supported.")} +else if(type=="modal"){alert("Error: Link type = modal not supported.");startDialog($(this).attr("data-name"),null,$(this).attr("data-method"))} +else if(type=="dialog"){startDialog($(this).attr("data-name"),$(this).attr("data-action"),$(this).attr("data-method"),$(this).attr("data-id"),$(this).attr("data-extra"))} +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"){popupWindow=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"){fullscreen(this)} +else if(type=="open"){openNewAction($(this).attr("data-name"),$(this).attr("data-action"),$(this).attr("data-id"),jQuery.parseJSON($(this).attr("data-extra").replace(/'/g,"\"")))} +else{alert("Fatal: Cannot open link: "+$(this).html())}})})};$(document).on("orViewLoaded",function(t,a){if(typeof popupWindow!="undefined")$(t.target).find("a[data-type='popup']").each(function(){popupWindow.location.href=$(this).attr("data-url")})});$(document).on("orDataChanged",function(t,a){if(typeof popupWindow!="undefined")popupWindow.location.reload()}); /* ./modules/cms-ui/themes/default/script/plugin/jquery-plugin-orTree.min.js */;jQuery.fn.orTree=function(){$(this).each(function(a,e){$(e).children('.or-navtree-node-control').click(function(){var a=$(this).parent('.or-navtree-node');if($(a).is('.or-navtree-node--is-open')){$(a).children('ul').slideUp('fast').remove();$(a).removeClass('or-navtree-node--is-open').addClass('or-navtree-node--is-closed').find('.tree-icon').removeClass('image-icon--node-open').addClass('image-icon--node-closed')} else{$(e).closest('div.view').addClass('loader');var o=$(a).data('type'),t=$(a).data('id'),i=$(a).data('extra'),n='./api/?action=tree&subaction=loadBranch&id='+t+'&type='+o+'&output=json';if(typeof i==='string'){jQuery.each(jQuery.parseJSON(i.replace(/'/g,'"')),function(e,a){n=n+'&'+e+'='+a})} else if(typeof i==='object'){jQuery.each(i,function(e,a){n=n+'&'+e+'='+a})} @@ -11010,7 +11010,7 @@ jQuery.trumbowyg={langs:{en:{viewHTML:"View HTML",undo:"Undo",redo:"Redo",format /* ./modules//template-engine/components/html/image/image.min.js */;$(document).on('orViewLoaded',function(o,n){var e=document.querySelectorAll('img.image-icon');SVGInjector(e)}); /* ./modules//template-engine/components/html/group/group.min.js */;$(document).on('orViewLoaded',function(e,o){registerOpenClose($(e.target).find('fieldset.toggle-open-close'))}); /* ./modules//template-engine/components/html/form/form.min.js */;$(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.cancel').click(function(){});$(e.target).find('form').submit(function(e){if($(this).data('target')=='view'){formSubmit($(this));e.preventDefault()}})});function formSubmit(e){var r=$('<div class="notice info"><div class="text loader"></div></div>');$('#noticebar').prepend(r);$(r).show();$(e).find('.error').removeClass('error');var a=$(e).serializeArray(),t={};$(a).each(function(e,r){t[r.name]=r.value});var s=$(e).attr('method').toUpperCase();if(s=='GET'){Workbench.loadViewIntoElement($(e).parent('.view'),t.action,t.subaction,t.id,t)} -else{var o='./api/';$(e).closest('div.content').addClass('loader');o+='?output=json';a['output']='json';if($(e).data('async')||$(e).data('async')=='true'){$('#dialog > .view').html('');$('#dialog').removeClass('is-open').addClass('is-closed')};$.ajax({'type':'POST',url:o,data:a,success:function(t,a,o){$(e).closest('div.content').removeClass('loader');$(r).remove();doResponse(t,a,e)},error:function(t,a,o){$(e).closest('div.content').removeClass('loader');$(r).remove();try{let error=jQuery.parseJSON(t.responseText);notify('','','error',error.error,[error.description])}catch(s){let msg=t.responseText;notify('','','error','Server Error',[msg])}}});$(e).fadeIn()}};function doResponse(e,t,r){if(t!='success'){alert('Server error: '+t);return};$.each(e['notices'],function(t,e){if($(r).data('async')=='true')notifyBrowser(e.text);notify(e.type,e.name,e.status,e.text,e.log);if(e.status=='ok'){if($(r).data('async')!='true'){$('#dialog > .view').html('').hide();$('#dialog').removeClass('is-open').addClass('is-closed');$(r).closest('div.panel').find('div.header ul.views li.action.active').removeClass('dirty')}} +else{var o='./api/';$(e).closest('div.content').addClass('loader');o+='?output=json';a['output']='json';if($(e).data('async')||$(e).data('async')=='true'){$('#dialog > .view').html('');$('#dialog').removeClass('is-open').addClass('is-closed')};$.ajax({'type':'POST',url:o,data:a,success:function(t,a,o){$(e).closest('div.content').removeClass('loader');$(r).remove();doResponse(t,a,e)},error:function(t,a,o){$(e).closest('div.content').removeClass('loader');$(r).remove();try{let error=jQuery.parseJSON(t.responseText);notify('','','error',error.error,[error.description])}catch(s){let msg=t.responseText;notify('','','error','Server Error',[msg])}}});$(e).fadeIn()}};function doResponse(e,t,r){if(t!='success'){alert('Server error: '+t);return};$.each(e['notices'],function(t,e){if($(r).data('async')=='true')notifyBrowser(e.text);notify(e.type,e.name,e.status,e.text,e.log);if(e.status=='ok'){if($(r).data('async')!='true'){$('#dialog > .view').html('').hide();$('#dialog').removeClass('is-open').addClass('is-closed');$(r).closest('div.panel').find('div.header ul.views li.action.active').removeClass('dirty')};$(document).trigger('orDataChanged')} else{}});$.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}; /* ./modules//template-engine/components/html/upload/upload.min.js */;$(document).on('orViewLoaded',function(e,n){var a=$(e.target).find('form'),o=$(e.target).find('div.or-dropzone-upload > div.input');o.on('dragenter',function(e){e.stopPropagation();e.preventDefault();$(this).css('border','1px dotted gray')});o.on('dragover',function(e){e.stopPropagation();e.preventDefault()});o.on('drop',function(e){$(this).css('border','1px dotted red');e.preventDefault();var n=e.originalEvent.dataTransfer.files;handleFileUpload(a,n)});$(e.target).find('input[type=file]').change(function(){var e=$(this).prop('files');handleFileUpload(a,e)})});function handleFileUpload(e,o){for(var t=0,r;r=o[t];t++){var n=new FormData();n.append('file',r);n.append('action','folder');n.append('subaction',$(e).data('method'));n.append('output','json');n.append('token',$(e).find('input[name=token]').val());n.append('id',$(e).find('input[name=id]').val());var a=$('<div class="notice info"><div class="text loader"></div></div>');$('#noticebar').prepend(a);$(a).show();$.ajax({'type':'POST',url:'./api/',cache:!1,contentType:!1,processData:!1,data:n,success:function(n,o,t){$(a).remove();doResponse(n,o,e)},error:function(n,o,d){$(e).closest('div.content').removeClass('loader');$(a).remove();var r;try{var t=jQuery.parseJSON(n.responseText);r=t.error+'/'+t.description+': '+t.reason}catch(i){r=n.responseText};notify('error',r)}})}}; /* ./modules//template-engine/components/html/tree/tree.min.js */;$(document).on('orViewLoaded',function(o,n){}); diff --git a/modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.js b/modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.js @@ -1,6 +1,9 @@ /** * Enable clicking on '.clickable'-Areas. */ + +var popupWindow; + jQuery.fn.orLinkify = function() { @@ -57,7 +60,7 @@ jQuery.fn.orLinkify = function() else if ( type == 'popup' ) { - window.open( $(this).attr('data-url'), 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes'); + popupWindow = window.open( $(this).attr('data-url'), 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes'); } else if ( type == 'help' ) @@ -80,4 +83,21 @@ jQuery.fn.orLinkify = function() } } ); }); -};- \ No newline at end of file +}; + + +$(document).on('orViewLoaded',function(event, data) { + + // Refresh already opened popup windows. + if ( typeof popupWindow != "undefined" ) + $(event.target).find("a[data-type='popup']").each( function() { + popupWindow.location.href = $(this).attr('data-url'); + }); + +}); + +$(document).on('orDataChanged',function(event, data) { + if ( typeof popupWindow != "undefined" ) + popupWindow.location.reload(); +} ); + diff --git a/modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.min.js b/modules/cms-ui/themes/default/script/plugin/jquery-plugin-orLinkify.min.js @@ -1,11 +1,11 @@ -;jQuery.fn.orLinkify=function(){$(this).find('a').click(function(t){t.preventDefault()});return $(this).click(function(){$(this).find('a').first().each(function(){let type=$(this).attr('data-type');if($(this).parent().hasClass('inactive'))return;if(type=='post'){submitLink(this,$(this).attr('data-data'))} -else if(type=='view'){alert('Error: Link type = view not supported.')} -else if(type=='modal'){alert('Error: Link type = modal not supported.');startDialog($(this).attr('data-name'),null,$(this).attr('data-method'))} -else if(type=='dialog'){startDialog($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-method'),$(this).attr('data-id'),$(this).attr('data-extra'))} -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'){fullscreen(this)} -else if(type=='open'){openNewAction($(this).attr('data-name'),$(this).attr('data-action'),$(this).attr('data-id'),jQuery.parseJSON($(this).attr('data-extra').replace(/'/g,'"')))} -else{alert('Fatal: Cannot open link: '+$(this).html())}})})};- \ No newline at end of file +;var popupWindow;jQuery.fn.orLinkify=function(){$(this).find("a").click(function(t){t.preventDefault()});return $(this).click(function(){$(this).find("a").first().each(function(){let type=$(this).attr("data-type");if($(this).parent().hasClass("inactive"))return;if(type=="post"){submitLink(this,$(this).attr("data-data"))} +else if(type=="view"){alert("Error: Link type = view not supported.")} +else if(type=="modal"){alert("Error: Link type = modal not supported.");startDialog($(this).attr("data-name"),null,$(this).attr("data-method"))} +else if(type=="dialog"){startDialog($(this).attr("data-name"),$(this).attr("data-action"),$(this).attr("data-method"),$(this).attr("data-id"),$(this).attr("data-extra"))} +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"){popupWindow=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"){fullscreen(this)} +else if(type=="open"){openNewAction($(this).attr("data-name"),$(this).attr("data-action"),$(this).attr("data-id"),jQuery.parseJSON($(this).attr("data-extra").replace(/'/g,"\"")))} +else{alert("Fatal: Cannot open link: "+$(this).html())}})})};$(document).on("orViewLoaded",function(t,a){if(typeof popupWindow!="undefined")$(t.target).find("a[data-type='popup']").each(function(){popupWindow.location.href=$(this).attr("data-url")})});$(document).on("orDataChanged",function(t,a){if(typeof popupWindow!="undefined")popupWindow.location.reload()});+ \ No newline at end of file diff --git a/modules/template-engine/components/html/form/form.js b/modules/template-engine/components/html/form/form.js @@ -159,7 +159,9 @@ function doResponse(data,status,element) // Da gespeichert wurde, jetzt das 'dirty'-flag zur├╝cksetzen. $(element).closest('div.panel').find('div.header ul.views li.action.active').removeClass('dirty'); } - } + + $(document).trigger('orDataChanged'); + } else // Server liefert Fehler zur├╝ck. { 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(){$(this).closest('form').submit()});$(e.target).find('input.submit.cancel').click(function(){});$(e.target).find('form').submit(function(e){if($(this).data('target')=='view'){formSubmit($(this));e.preventDefault()}})});function formSubmit(e){var r=$('<div class="notice info"><div class="text loader"></div></div>');$('#noticebar').prepend(r);$(r).show();$(e).find('.error').removeClass('error');var a=$(e).serializeArray(),t={};$(a).each(function(e,r){t[r.name]=r.value});var s=$(e).attr('method').toUpperCase();if(s=='GET'){Workbench.loadViewIntoElement($(e).parent('.view'),t.action,t.subaction,t.id,t)} -else{var o='./api/';$(e).closest('div.content').addClass('loader');o+='?output=json';a['output']='json';if($(e).data('async')||$(e).data('async')=='true'){$('#dialog > .view').html('');$('#dialog').removeClass('is-open').addClass('is-closed')};$.ajax({'type':'POST',url:o,data:a,success:function(t,a,o){$(e).closest('div.content').removeClass('loader');$(r).remove();doResponse(t,a,e)},error:function(t,a,o){$(e).closest('div.content').removeClass('loader');$(r).remove();try{let error=jQuery.parseJSON(t.responseText);notify('','','error',error.error,[error.description])}catch(s){let msg=t.responseText;notify('','','error','Server Error',[msg])}}});$(e).fadeIn()}};function doResponse(e,t,r){if(t!='success'){alert('Server error: '+t);return};$.each(e['notices'],function(t,e){if($(r).data('async')=='true')notifyBrowser(e.text);notify(e.type,e.name,e.status,e.text,e.log);if(e.status=='ok'){if($(r).data('async')!='true'){$('#dialog > .view').html('').hide();$('#dialog').removeClass('is-open').addClass('is-closed');$(r).closest('div.panel').find('div.header ul.views li.action.active').removeClass('dirty')}} +else{var o='./api/';$(e).closest('div.content').addClass('loader');o+='?output=json';a['output']='json';if($(e).data('async')||$(e).data('async')=='true'){$('#dialog > .view').html('');$('#dialog').removeClass('is-open').addClass('is-closed')};$.ajax({'type':'POST',url:o,data:a,success:function(t,a,o){$(e).closest('div.content').removeClass('loader');$(r).remove();doResponse(t,a,e)},error:function(t,a,o){$(e).closest('div.content').removeClass('loader');$(r).remove();try{let error=jQuery.parseJSON(t.responseText);notify('','','error',error.error,[error.description])}catch(s){let msg=t.responseText;notify('','','error','Server Error',[msg])}}});$(e).fadeIn()}};function doResponse(e,t,r){if(t!='success'){alert('Server error: '+t);return};$.each(e['notices'],function(t,e){if($(r).data('async')=='true')notifyBrowser(e.text);notify(e.type,e.name,e.status,e.text,e.log);if(e.status=='ok'){if($(r).data('async')!='true'){$('#dialog > .view').html('').hide();$('#dialog').removeClass('is-open').addClass('is-closed');$(r).closest('div.panel').find('div.header ul.views li.action.active').removeClass('dirty')};$(document).trigger('orDataChanged')} else{}});$.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}; \ No newline at end of file