diff --git a/composer.json b/composer.json index af5ee781d..43604ee38 100644 --- a/composer.json +++ b/composer.json @@ -30,9 +30,9 @@ "laravel/framework": "5.4.*", "luracast/restler": "^3.0", "bshaffer/oauth2-server-php": "v1.0", - "colosa/pmUI": "release/3.2.2-dev", - "colosa/MichelangeloFE": "release/3.2.2-dev", - "colosa/pmdynaform": "release/3.2.2-dev", + "colosa/pmUI": "release/3.2.3-dev", + "colosa/MichelangeloFE": "release/3.2.3-dev", + "colosa/pmdynaform": "release/3.2.3-dev", "google/apiclient": "1.1.6", "dapphp/securimage": "^3.6", "psr/log":"1.0.0", diff --git a/composer.lock b/composer.lock index 5feaa8b7d..19a726d6e 100644 --- a/composer.lock +++ b/composer.lock @@ -51,14 +51,14 @@ }, { "name": "colosa/MichelangeloFE", - "version": "dev-release/3.2.2", + "version": "dev-release/3.2.3", "source": { "type": "git", "url": "git@bitbucket.org:colosa/michelangelofe.git", - "reference": "8ae8cc428412d8c964bc657b2d87ca7ea0194d15" + "reference": "a44fbc3e9d0c9c1ce1f0e7697cedc809f8a3a220" }, "require": { - "colosa/pmui": "release/3.2.2-dev" + "colosa/pmui": "release/3.2.3-dev" }, "type": "library", "description": "ProcessMaker Michelangelo Front End", @@ -66,15 +66,15 @@ "keywords": [ "js app ProcessMaker" ], - "time": "2018-01-27T00:51:59+00:00" + "time": "2018-04-27T20:10:38+00:00" }, { "name": "colosa/pmDynaform", - "version": "dev-release/3.2.2", + "version": "dev-release/3.2.3", "source": { "type": "git", "url": "git@bitbucket.org:colosa/pmdynaform.git", - "reference": "fc2c73afeb721da2c0ddfc15d4ce892049938f4b" + "reference": "fa6a9eb4520a090aaf50e46c90e49596b0794f04" }, "type": "library", "description": "JS Library to render ProcessMaker Dynaforms", @@ -82,15 +82,15 @@ "keywords": [ "js lib ProcessMaker Dynaforms" ], - "time": "2017-11-30T19:21:05+00:00" + "time": "2018-04-16T15:41:04+00:00" }, { "name": "colosa/pmUI", - "version": "dev-release/3.2.2", + "version": "dev-release/3.2.3", "source": { "type": "git", "url": "git@bitbucket.org:colosa/pmui.git", - "reference": "1f25446c547ac61042661f191ea4647ad25ab11d" + "reference": "583402fdb1a5da606d02cc25f4a5573c3ff800b2" }, "type": "library", "description": "JS UI Library", @@ -98,7 +98,7 @@ "keywords": [ "js lib ProcessMaker UI" ], - "time": "2017-10-17T17:56:43+00:00" + "time": "2018-04-19T20:17:00+00:00" }, { "name": "dapphp/securimage", @@ -577,7 +577,7 @@ ], "authors": [ { - "name": "Jean-Marc Trémeaux", + "name": "Jean-Marc Tr??meaux", "homepage": "http://naku.dohcrew.com/", "role": "Developer" }, @@ -1483,7 +1483,7 @@ ], "authors": [ { - "name": "Jean-François Simon", + "name": "Jean-Fran??ois Simon", "email": "jeanfrancois.simon@sensiolabs.com" }, { @@ -2996,7 +2996,7 @@ ], "authors": [ { - "name": "Christian Lück", + "name": "Christian L??ck", "email": "christian@lueck.tv" } ], @@ -3264,7 +3264,7 @@ "homepage": "https://nette.org/contributors" } ], - "description": "⏱ Nette Caching: library with easy-to-use API and many cache backends.", + "description": "??? Nette Caching: library with easy-to-use API and many cache backends.", "homepage": "https://nette.org", "keywords": [ "cache", @@ -3454,7 +3454,7 @@ "homepage": "https://nette.org/contributors" } ], - "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "description": "???? Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", "homepage": "https://nette.org", "keywords": [ "array", @@ -3507,7 +3507,7 @@ ], "authors": [ { - "name": "Ondřej Machulda", + "name": "Ond??ej Machulda", "email": "ondrej.machulda@gmail.com" } ], diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index 586df72bb..1c54b8656 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -1814,7 +1814,7 @@ replace(data).replace(/#/g,'#text').replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,fun return html5;};function getHTML4(){var html4=mapCache.html4;if(!html4){html4=mapCache.html4=unpack({Z:'H|K|N|O|P',Y:'X|form|R|Q',ZG:'E|span|width|align|char|charoff|valign',X:'p|T|div|U|W|isindex|fieldset|table',ZF:'E|align|char|charoff|valign',W:'pre|hr|blockquote|address|center|noframes',ZE:'abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height',ZD:'[E][S]',U:'ul|ol|dl|menu|dir',ZC:'p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q',T:'h1|h2|h3|h4|h5|h6',ZB:'X|S|Q',S:'R|P',ZA:'a|G|J|M|O|P',R:'a|H|K|N|O',Q:'noscript|P',P:'ins|del|script',O:'input|select|textarea|label|button',N:'M|L',M:'em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym',L:'sub|sup',K:'J|I',J:'tt|i|b|u|s|strike',I:'big|small|font|basefont',H:'G|F',G:'br|span|bdo',F:'object|applet|img|map|iframe',E:'A|B|C',D:'accesskey|tabindex|onfocus|onblur',C:'onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',B:'lang|xml:lang|dir',A:'id|class|style|title'},'script[id|charset|type|language|src|defer|xml:space][]'+'style[B|id|type|media|title|xml:space][]'+'object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]'+'param[id|name|value|valuetype|type][]'+'p[E|align][#|S]'+'a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]'+'br[A|clear][]'+'span[E][#|S]'+'bdo[A|C|B][#|S]'+'applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]'+'h1[E|align][#|S]'+'img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]'+'map[B|C|A|name][X|form|Q|area]'+'h2[E|align][#|S]'+'iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]'+'h3[E|align][#|S]'+'tt[E][#|S]'+'i[E][#|S]'+'b[E][#|S]'+'u[E][#|S]'+'s[E][#|S]'+'strike[E][#|S]'+'big[E][#|S]'+'small[E][#|S]'+'font[A|B|size|color|face][#|S]'+'basefont[id|size|color|face][]'+'em[E][#|S]'+'strong[E][#|S]'+'dfn[E][#|S]'+'code[E][#|S]'+'q[E|cite][#|S]'+'samp[E][#|S]'+'kbd[E][#|S]'+'var[E][#|S]'+'cite[E][#|S]'+'abbr[E][#|S]'+'acronym[E][#|S]'+'sub[E][#|S]'+'sup[E][#|S]'+'input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]'+'select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]'+'optgroup[E|disabled|label][option]'+'option[E|selected|disabled|label|value][]'+'textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]'+'label[E|for|accesskey|onfocus|onblur][#|S]'+'button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]'+'h4[E|align][#|S]'+'ins[E|cite|datetime][#|Y]'+'h5[E|align][#|S]'+'del[E|cite|datetime][#|Y]'+'h6[E|align][#|S]'+'div[E|align][#|Y]'+'ul[E|type|compact][li]'+'li[E|type|value][#|Y]'+'ol[E|type|compact|start][li]'+'dl[E|compact][dt|dd]'+'dt[E][#|S]'+'dd[E][#|Y]'+'menu[E|compact][li]'+'dir[E|compact][li]'+'pre[E|width|xml:space][#|ZA]'+'hr[E|align|noshade|size|width][]'+'blockquote[E|cite][#|Y]'+'address[E][#|S|p]'+'center[E][#|Y]'+'noframes[E][#|Y]'+'isindex[A|B|prompt][]'+'fieldset[E][#|legend|Y]'+'legend[E|accesskey|align][#|S]'+'table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]'+'caption[E|align][#|S]'+'col[ZG][]'+'colgroup[ZG][col]'+'thead[ZF][tr]'+'tr[ZF|bgcolor][th|td]'+'th[E|ZE][#|Y]'+'form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]'+'noscript[E][#|Y]'+'td[E|ZE][#|Y]'+'tfoot[ZF][tr]'+'tbody[ZF][tr]'+'area[E|D|shape|coords|href|nohref|alt|target][]'+'base[id|href|target][]'+'body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]');} return html4;};tinymce.html.Schema=function(settings){var self=this,elements={},children={},patternElements=[],validStyles,schemaItems;var whiteSpaceElementsMap,selfClosingElementsMap,shortEndedElementsMap,boolAttrMap,blockElementsMap,nonEmptyElementsMap,customElementsMap={};function createLookupTable(option,default_value,extend){var value=settings[option];if(!value){value=mapCache[option];if(!value){value=makeMap(default_value,' ',makeMap(default_value.toUpperCase(),' '));value=tinymce.extend(value,extend);mapCache[option]=value;}}else{value=makeMap(value,',',makeMap(value.toUpperCase(),' '));} return value;};settings=settings||{};schemaItems=settings.schema=="html5"?getHTML5():getHTML4();if(settings.verify_html===false) -settings.valid_elements='*[*]';if(settings.valid_styles){validStyles={};each(settings.valid_styles,function(value,key){validStyles[key]=tinymce.explode(value);});} +settings.valid_elements='*[*]';settings.valid_children='+body[style],+form[style],+div[style],+td[style],+table[style],+tbody[style],+tr[style],+span[style],+p[style]';if(settings.valid_styles){validStyles={};each(settings.valid_styles,function(value,key){validStyles[key]=tinymce.explode(value);});} whiteSpaceElementsMap=createLookupTable('whitespace_elements','pre script noscript style textarea');selfClosingElementsMap=createLookupTable('self_closing_elements','colgroup dd dt li option p td tfoot th thead tr');shortEndedElementsMap=createLookupTable('short_ended_elements','area base basefont br col frame hr img input isindex link meta param embed source wbr');boolAttrMap=createLookupTable('boolean_attributes','checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls');nonEmptyElementsMap=createLookupTable('non_empty_elements','td th iframe video audio object script',shortEndedElementsMap);textBlockElementsMap=createLookupTable('text_block_elements','h1 h2 h3 h4 h5 h6 p div address pre form '+'blockquote center dir fieldset header footer article section hgroup aside nav figure');blockElementsMap=createLookupTable('block_elements','hr table tbody thead tfoot '+'th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup',textBlockElementsMap);function patternToRegExp(str){return new RegExp('^'+str.replace(/([?+*])/g,'.$1')+'$');};function addValidElements(valid_elements){var ei,el,ai,al,yl,matches,element,attr,attrData,elementName,attrName,attrType,attributes,attributesOrder,prefix,outputName,globalAttributes,globalAttributesOrder,transElement,key,childKey,value,elementRuleRegExp=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,attrRuleRegExp=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,hasPatternsRegExp=/[*?+]/;if(valid_elements){valid_elements=split(valid_elements);if(elements['@']){globalAttributes=elements['@'].attributes;globalAttributesOrder=elements['@'].attributesOrder;} for(ei=0,el=valid_elements.length;ei0){value=html[html.length-1];if(value.length>0&&value!=='\n') html.push('\n');} -html.push('<',name);if(attrs){for(i=0,l=attrs.length;i=0){attr.value=attr.value.substring(0,attr.value.indexOf(list[iList]));}} +html.push(' ',attr.name,'="',encode(attr.value,true),'"');}} if(!empty||htmlOutput) html[html.length]='>';else html[html.length]=' />';if(empty&&indent&&indentAfter[name]&&html.length>0){value=html[html.length-1];if(value.length>0&&value!=='\n') @@ -2012,8 +2011,8 @@ writer.end(name);}}else handler(node);} if(node.type==1&&!settings.inner) walk(node);else -handlers[11](node);return writer.getContent();};}})(tinymce);tinymce.dom={};(function(namespace,expando){var w3cEventModel=!!document.addEventListener;function addEvent(target,name,callback,capture){if(target.addEventListener){target.addEventListener(name,callback,capture||false);}else if(target.attachEvent){target.attachEvent('on'+name,callback);}} -function removeEvent(target,name,callback,capture){if(target.removeEventListener){target.removeEventListener(name,callback,capture||false);}else if(target.detachEvent){target.detachEvent('on'+name,callback);}} +handlers[11](node);return writer.getContent();};}})(tinymce);tinymce.dom={};(function(namespace,expando){var w3cEventModel=!!document.addEventListener;function addEvent(target,name,callback,capture){if(target.addEventListener){if(name!='toStr'&&name!='concatMaborak'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'&&name!='toJSONString'&&name!='isObject'&&name!='isArray'&&name!='isObjectStrict'){target.addEventListener(name,callback,capture||false);}}else if(target.attachEvent){if(name!='toStr'&&name!='concatMaborak'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'&&name!='toJSONString'&&name!='isObject'&&name!='isArray'&&name!='isObjectStrict'){target.attachEvent('on'+name,callback);}}} +function removeEvent(target,name,callback,capture){if(target.removeEventListener){if(name!='toStr'&&name!='concatMaborak'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'&&name!='toJSONString'&&name!='isObject'&&name!='isArray'&&name!='isObjectStrict'){target.removeEventListener(name,callback,capture||false);}}else if(target.detachEvent){if(name!='toStr'&&name!='concatMaborak'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'&&name!='toJSONString'&&name!='isObject'&&name!='isArray'&&name!='isObjectStrict'){target.detachEvent('on'+name,callback);}}} function fix(original_event,data){var name,event=data||{};function returnFalse(){return false;} function returnTrue(){return true;} for(name in original_event){if(name!=="layerX"&&name!=="layerY"){event[name]=original_event[name];}} @@ -2360,13 +2359,13 @@ return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate= return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.matchesSelector=function(node,expr){return Sizzle(expr,null,null,[node]).length>0;};Sizzle.find=function(expr,context,isXML){var set,i,len,match,type,left;if(!expr){return[];} for(i=0,len=Expr.order.length;i= 0 ) { + attr.value = attr.value.substring(0, attr.value.indexOf(list[iList])); + } + } + html.push(' ', attr.name, '="', encode(attr.value, true), '"'); } } @@ -4627,17 +4648,27 @@ tinymce.dom = {}; function addEvent(target, name, callback, capture) { if (target.addEventListener) { - target.addEventListener(name, callback, capture || false); + //conditional statement in order to maintain compatibility with the maborak processmaker library + if(name!='toStr'&&name!='concatMaborak'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'&&name!='toJSONString'&&name!='isObject'&&name!='isArray'&&name!='isObjectStrict'){ + target.addEventListener(name, callback, capture || false); + } } else if (target.attachEvent) { - target.attachEvent('on' + name, callback); + //conditional statement in order to maintain compatibility with the maborak processmaker library + if(name!='toStr'&&name!='concatMaborak'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'&&name!='toJSONString'&&name!='isObject'&&name!='isArray'&&name!='isObjectStrict'){ + target.attachEvent('on' + name, callback); + } } } function removeEvent(target, name, callback, capture) { if (target.removeEventListener) { - target.removeEventListener(name, callback, capture || false); + if(name!='toStr'&&name!='concatMaborak'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'&&name!='toJSONString'&&name!='isObject'&&name!='isArray'&&name!='isObjectStrict'){ + target.removeEventListener(name, callback, capture || false); + } } else if (target.detachEvent) { - target.detachEvent('on' + name, callback); + if(name!='toStr'&&name!='concatMaborak'&&name!='get_by_key'&&name!='expand'&&name!='setParent'&&name!='isset_key'&&name!='toJSONString'&&name!='isObject'&&name!='isArray'&&name!='isObjectStrict'){ + target.detachEvent('on' + name, callback); + } } } @@ -8042,67 +8073,69 @@ Sizzle.filter = function( expr, set, inplace, not ) { while ( expr && set.length ) { for ( type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - filter = Expr.filter[ type ]; - left = match[1]; + if(type!='toStr'&&type!='concatMaborak'&&type!='get_by_key'&&type!='expand'&&type!='setParent'&&type!='isset_key'&&type!='toJSONString'&&type!='isObject'&&type!='isArray'&&type!='isObjectStrict'){ + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + filter = Expr.filter[ type ]; + left = match[1]; - anyFound = false; + anyFound = false; - match.splice(1,1); + match.splice(1,1); - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { + if ( left.substr( left.length - 1 ) === "\\" ) { continue; } - } - if ( match ) { - for ( i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - pass = not ^ found; + if ( curLoop === result ) { + result = []; + } - if ( inplace && found != null ) { - if ( pass ) { + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + pass = not ^ found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); anyFound = true; - - } else { - curLoop[i] = false; } - - } else if ( pass ) { - result.push( item ); - anyFound = true; } } } - } - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; } } } diff --git a/workflow/engine/bin/tasks/cliFlushCache.php b/workflow/engine/bin/tasks/cliFlushCache.php index 2be46226e..4e6805397 100644 --- a/workflow/engine/bin/tasks/cliFlushCache.php +++ b/workflow/engine/bin/tasks/cliFlushCache.php @@ -56,7 +56,7 @@ function run_flush_cache($args, $opts) flush_cache($workspaces[0]); } else { foreach ($workspaces as $workspace) { - passthru("./processmaker flush-cache " . $workspace->name); + passthru(PHP_BINARY . " processmaker flush-cache " . $workspace->name); } } } diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index 2614137b1..e78de67d3 100644 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -379,7 +379,7 @@ function run_workspace_upgrade($args, $opts) } else { $workspaces = get_workspaces_from_args($args); foreach ($workspaces as $workspace) { - passthru('./processmaker upgrade ' . $parameters . ' ' . $workspace->name); + passthru(PHP_BINARY . ' processmaker upgrade ' . $parameters . ' ' . $workspace->name); } } } @@ -435,7 +435,7 @@ function run_upgrade_content($args, $opts) } else { $workspaces = get_workspaces_from_args($args); foreach ($workspaces as $workspace) { - passthru('./processmaker upgrade-content ' . $workspace->name); + passthru(PHP_BINARY . ' processmaker upgrade-content ' . $workspace->name); } } } @@ -491,7 +491,7 @@ function run_translation_upgrade($args, $opts) } else { $workspaces = get_workspaces_from_args($args); foreach ($workspaces as $workspace) { - passthru('./processmaker translation-repair ' . $noXml . $noMafe . ' ' . $workspace->name); + passthru(PHP_BINARY . ' processmaker translation-repair ' . $noXml . $noMafe . ' ' . $workspace->name); } } } @@ -588,7 +588,7 @@ function run_database_upgrade($args, $opts) } else { $workspaces = get_workspaces_from_args($args); foreach ($workspaces as $workspace) { - passthru('./processmaker database-upgrade ' . $workspace->name); + passthru(PHP_BINARY . ' processmaker database-upgrade ' . $workspace->name); } } } @@ -999,7 +999,7 @@ function run_check_workspace_disabled_code($args, $opts) } else { $workspaces = get_workspaces_from_args($args); foreach ($workspaces as $workspace) { - passthru('./processmaker check-workspace-disabled-code ' . $workspace->name); + passthru(PHP_BINARY . ' processmaker check-workspace-disabled-code ' . $workspace->name); } } } @@ -1138,7 +1138,7 @@ function run_migrate_content($args, $opts) } else { $workspaces = get_workspaces_from_args($args); foreach ($workspaces as $workspace) { - passthru('./processmaker migrate-content ' . $lang . ' ' . $workspace->name); + passthru(PHP_BINARY . ' processmaker migrate-content ' . $lang . ' ' . $workspace->name); } } } @@ -1216,7 +1216,7 @@ function run_migrate_plugin($args, $opts) CLI::logging("> Migrating and populating data...\n"); $start = microtime(true); foreach ($workspaces as $workspace) { - passthru('./processmaker migrate-plugins-singleton-information ' . $workspace->name); + passthru(PHP_BINARY . ' processmaker migrate-plugins-singleton-information ' . $workspace->name); } $stop = microtime(true); CLI::logging("<*> Migrating and populating data Singleton took " . ($stop - $start) . " seconds.\n"); diff --git a/workflow/engine/classes/Applications.php b/workflow/engine/classes/Applications.php index 7479c55e6..5919b8bad 100644 --- a/workflow/engine/classes/Applications.php +++ b/workflow/engine/classes/Applications.php @@ -112,8 +112,8 @@ class Applications default: //All status //When the status is TO_DO, we will get all the open threads $sqlData .= " AND (APP_DELEGATION.DEL_THREAD_STATUS = 'OPEN' "; - //When the status is COMPLETED, we will get the last task that with completed the case - $sqlData .= " OR (APP_DELEGATION.DEL_THREAD_STATUS = 'CLOSED' AND APP_DELEGATION.DEL_LAST_INDEX = 1 AND APPLICATION.APP_STATUS_ID = 3)) "; + //When the status is COMPLETED or CANCELLED, we will get the last task that with completed/cancelled the case + $sqlData .= " OR (APP_DELEGATION.DEL_THREAD_STATUS = 'CLOSED' AND APP_DELEGATION.DEL_LAST_INDEX = 1 AND APPLICATION.APP_STATUS_ID IN (3,4))) "; break; } diff --git a/workflow/engine/classes/WorkspaceTools.php b/workflow/engine/classes/WorkspaceTools.php index 2f33477e1..f11a869aa 100644 --- a/workflow/engine/classes/WorkspaceTools.php +++ b/workflow/engine/classes/WorkspaceTools.php @@ -2024,7 +2024,7 @@ class WorkspaceTools CLI::logging("<*> Migrating an populating indexing for APP_CACHE_VIEW process took " . ($stop - $start) . " seconds.\n"); //Updating generated class files for PM Tables - passthru('./processmaker regenerate-pmtable-classes ' . $workspace->name); + passthru(PHP_BINARY . ' processmaker regenerate-pmtable-classes ' . $workspace->name); mysql_close($link); } diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml index 4057cef30..eb8b6899f 100644 --- a/workflow/engine/config/schema.xml +++ b/workflow/engine/config/schema.xml @@ -5689,7 +5689,6 @@ - diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index 2be38b78c..f1a51944b 100644 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -61529,7 +61529,7 @@ INSERT INTO CONFIGURATION (CFG_UID,OBJ_UID,CFG_VALUE,PRO_UID,USR_UID,APP_UID) VA ('AUDIT_LOG','log','s:5:"false";','','',''), ('ENTERPRISE_SETTING_ENCRYPT','','a:2:{s:7:"current";s:6:"sha256";s:8:"previous";s:3:"md5";}','','',''), ('ENVIRONMENT_SETTINGS','','a:1:{s:18:"directoryStructure";i:2;}','','',''), -('MIGRATED_CONTENT','content','a:12:{i:0;s:7:"Groupwf";i:1;s:7:"Process";i:2;s:10:"Department";i:3;s:4:"Task";i:4;s:13:"InputDocument";i:5;s:11:"Application";i:6;s:11:"AppDocument";i:7;s:8:"Dynaform";i:8;s:14:"OutputDocument";i:9;s:11:"ReportTable";i:10;s:8:"Triggers";i:11;s:41:"\ProcessMaker\BusinessModel\WebEntryEvent";}','','',''), +('MIGRATED_CONTENT','content','a:12:{i:0;s:7:"Groupwf";i:1;s:7:"Process";i:2;s:10:"Department";i:3;s:4:"Task";i:4;s:13:"InputDocument";i:5;s:11:"Application";i:6;s:11:"AppDocument";i:7;s:8:"Dynaform";i:8;s:14:"OutputDocument";i:9;s:11:"ReportTable";i:10;s:8:"Triggers";i:11;s:41:"\\ProcessMaker\\BusinessModel\\WebEntryEvent";}','','',''), ('MIGRATED_LIST','list','true','list','list','list'), ('MIGRATED_LIST_UNASSIGNED','list','true','list','list','list'), ('SKIN_CRON','','s:10:"neoclassic";','','',''); diff --git a/workflow/engine/methods/mails/emailsAjax.php b/workflow/engine/methods/mails/emailsAjax.php index b57ee5969..f8fb1adf3 100644 --- a/workflow/engine/methods/mails/emailsAjax.php +++ b/workflow/engine/methods/mails/emailsAjax.php @@ -82,6 +82,7 @@ switch ($req) { } //Date from and to if (!empty($dateFrom) && !empty($dateTo)) { + $dateTo = $dateTo . " 23:59:59"; $criteria->add($criteria->getNewCriterion(AppMessagePeer::APP_MSG_DATE, $dateFrom, Criteria::GREATER_EQUAL)->addAnd($criteria->getNewCriterion(AppMessagePeer::APP_MSG_DATE, $dateTo, Criteria::LESS_EQUAL))); } else { if (!empty($dateFrom)) { diff --git a/workflow/engine/skinEngine/base/css/sprite.css b/workflow/engine/skinEngine/base/css/sprite.css index 515383ed0..6fbc6fd75 100644 --- a/workflow/engine/skinEngine/base/css/sprite.css +++ b/workflow/engine/skinEngine/base/css/sprite.css @@ -28,7 +28,7 @@ Sprite modificado de http://ajaxbestiary.com/Labs/SilkSprite/ .panel_headerBar___processmaker{background:url("/images/ext/gray/toolbar/bg.gif") #F0F0F0 !important} -.button_menu_ext{padding-left:20px !important;height:18px !important;} +.button_menu_ext{height:18px !important;} .button_large_ext{padding-left:20px !important;height:32px !important;} .button_toolbar{padding-left:18px !important;height:18px !important;font-size:15px;cursor:pointer;margin:0 2px 1px 3px;line-height:25px} .ss_accept{background-position:0 0 !important} diff --git a/workflow/engine/skinEngine/neoclassic/css/sprite.css b/workflow/engine/skinEngine/neoclassic/css/sprite.css index 3bd763050..ef65bb558 100644 --- a/workflow/engine/skinEngine/neoclassic/css/sprite.css +++ b/workflow/engine/skinEngine/neoclassic/css/sprite.css @@ -220,7 +220,6 @@ Sprite modificado de http://ajaxbestiary.com/Labs/SilkSprite/ background: url("/skins/neoclassic/images/ext/gray/toolbar/bg.gif") #f0f0f0 !important; } .button_menu_ext { - padding-left: 20px !important; height: 18px !important; } .button_large_ext { diff --git a/workflow/engine/skinEngine/uxmodern/css/sprite.css b/workflow/engine/skinEngine/uxmodern/css/sprite.css index 515383ed0..6fbc6fd75 100644 --- a/workflow/engine/skinEngine/uxmodern/css/sprite.css +++ b/workflow/engine/skinEngine/uxmodern/css/sprite.css @@ -28,7 +28,7 @@ Sprite modificado de http://ajaxbestiary.com/Labs/SilkSprite/ .panel_headerBar___processmaker{background:url("/images/ext/gray/toolbar/bg.gif") #F0F0F0 !important} -.button_menu_ext{padding-left:20px !important;height:18px !important;} +.button_menu_ext{height:18px !important;} .button_large_ext{padding-left:20px !important;height:32px !important;} .button_toolbar{padding-left:18px !important;height:18px !important;font-size:15px;cursor:pointer;margin:0 2px 1px 3px;line-height:25px} .ss_accept{background-position:0 0 !important} diff --git a/workflow/engine/skinEngine/uxs/css/sprite.css b/workflow/engine/skinEngine/uxs/css/sprite.css index 515383ed0..6fbc6fd75 100644 --- a/workflow/engine/skinEngine/uxs/css/sprite.css +++ b/workflow/engine/skinEngine/uxs/css/sprite.css @@ -28,7 +28,7 @@ Sprite modificado de http://ajaxbestiary.com/Labs/SilkSprite/ .panel_headerBar___processmaker{background:url("/images/ext/gray/toolbar/bg.gif") #F0F0F0 !important} -.button_menu_ext{padding-left:20px !important;height:18px !important;} +.button_menu_ext{height:18px !important;} .button_large_ext{padding-left:20px !important;height:32px !important;} .button_toolbar{padding-left:18px !important;height:18px !important;font-size:15px;cursor:pointer;margin:0 2px 1px 3px;line-height:25px} .ss_accept{background-position:0 0 !important} diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php index ca7a33919..b6a644b7c 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php @@ -1106,11 +1106,11 @@ class Cases * @param string $applicationUid Unique id of Case * @param string $userUid Unique id of User * @param string $delIndex - * @param string $bExecuteTriggersBeforeAssignment + * @param boolean $executeTriggersBeforeAssignment * * return array Return an array with Task Case */ - public function updateRouteCase($applicationUid, $userUid, $delIndex) + public function updateRouteCase($applicationUid, $userUid, $delIndex, $executeTriggersBeforeAssignment) { try { if (!$delIndex) { @@ -1124,8 +1124,7 @@ class Cases } $ws = new WsBase(); - $fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, - $bExecuteTriggersBeforeAssignment = false); + $fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, $executeTriggersBeforeAssignment); $array = json_decode(json_encode($fields), true); if ($array ["status_code"] != 0) { throw (new Exception($array ["message"])); diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php index 0ae439238..8b1c4ef9a 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php @@ -547,12 +547,12 @@ class Light * @param string $applicationUid Unique id of Case * @param string $userUid Unique id of User * @param string $delIndex - * @param array $tasks - * @param string $bExecuteTriggersBeforeAssignment + * @param string $tasks + * @param boolean $executeTriggersBeforeAssignment * * return array Return an array with Task Case */ - public function updateRouteCase($applicationUid, $userUid, $delIndex, $tasks) + public function updateRouteCase($applicationUid, $userUid, $delIndex, $tasks, $executeTriggersBeforeAssignment) { try { if (!$delIndex) { @@ -560,8 +560,15 @@ class Light } $ws = new \WsBase(); - $fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, $bExecuteTriggersBeforeAssignment = false, - $tasks); + + $fields = $ws->derivateCase( + $userUid, + $applicationUid, + $delIndex, + $executeTriggersBeforeAssignment, + $tasks + ); + $array = json_decode(json_encode($fields), true); $array['message'] = trim(strip_tags($array['message'])); if ($array ["status_code"] != 0) { diff --git a/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflow.php b/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflow.php index 6083ac8ad..53e01c50b 100644 --- a/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflow.php +++ b/workflow/engine/src/ProcessMaker/Project/Adapter/BpmnWorkflow.php @@ -1311,7 +1311,7 @@ class BpmnWorkflow extends Project\Bpmn $data["PRO_STATUS"] = $projectData['pro_status']; } - if (isset($projectData['prjCreateUser'])){ + if (!empty($projectData['prjCreateUser'])) { $data["PRO_CREATE_USER"] = $projectData['prjCreateUser']; } diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Cases.php b/workflow/engine/src/ProcessMaker/Services/Api/Cases.php index 88eee5761..96c89c39e 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Cases.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Cases.php @@ -860,18 +860,19 @@ class Cases extends Api * * @param string $app_uid {@min 32}{@max 32} * @param string $del_index {@from body} + * @param boolean $executeTriggersBeforeAssignment {@from body} * * @throws RestException * * @access protected * @class AccessControl {@permission PM_CASES} */ - public function doPutRouteCase($app_uid, $del_index = null) + public function doPutRouteCase($app_uid, $del_index = null, $executeTriggersBeforeAssignment = false) { try { $userUid = $this->getUserId(); $cases = new BmCases(); - $cases->updateRouteCase($app_uid, $userUid, $del_index); + $cases->updateRouteCase($app_uid, $userUid, $del_index, $executeTriggersBeforeAssignment); } catch (Exception $e) { throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage())); } diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Light.php b/workflow/engine/src/ProcessMaker/Services/Api/Light.php index f1ead8885..1d5360d38 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Light.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Light.php @@ -1196,6 +1196,7 @@ class Light extends Api * @param string $app_uid {@min 32}{@max 32} * @param int $del_index {@from body} * @param array $tasks {@from body} + * @param boolean $executeTriggersBeforeAssignment {@from body} * * @return array * @throws RestException @@ -1203,11 +1204,11 @@ class Light extends Api * @access protected * @class AccessControl {@permission PM_CASES} */ - public function doPutRouteCase($app_uid, $del_index = null, $tasks = array()) + public function doPutRouteCase($app_uid, $del_index = null, $tasks = array(), $executeTriggersBeforeAssignment = false) { try { $oMobile = new BusinessModelLight(); - $response = $oMobile->updateRouteCase($app_uid, $this->getUserId(), $del_index, $tasks); + $response = $oMobile->updateRouteCase($app_uid, $this->getUserId(), $del_index, $tasks, $executeTriggersBeforeAssignment); } catch (Exception $e) { throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage())); } diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Project.php b/workflow/engine/src/ProcessMaker/Services/Api/Project.php index 85c99abe4..ce382e49a 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Project.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Project.php @@ -32,6 +32,8 @@ class Project extends Api ]; /** + * Get all Projects. + * * @url GET */ public function doGetProjects() @@ -50,8 +52,13 @@ class Project extends Api } /** + * Get a Project by identifier. + * * @url GET /:prj_uid * @param string $prj_uid {@min 32}{@max 32} + * + * @access protected + * @class AccessControl {@permission PM_FACTORY, PM_CASES} */ public function doGetProject($prj_uid) { @@ -68,7 +75,7 @@ class Project extends Api } /** - * Post Project + * Create Project from structure. * * @param string $prj_name * @param array $request_data @@ -89,6 +96,8 @@ class Project extends Api } /** + * Update Project from structure. + * * @url PUT /:prj_uid * @param string $prj_uid {@min 32}{@max 32} */ @@ -113,6 +122,8 @@ class Project extends Api } /** + * Remove Project BPMN. + * * @param string $prj_uid {@min 1}{@max 32} * @url DELETE /:prj_uid * @throws Exception @@ -135,11 +146,13 @@ class Project extends Api * Bulk actions * * @url POST /bulk - * @access protected - * @class AccessControl {@permission PM_FACTORY} + * * @param array $request_data * @return array $response * @throws Exception + * + * @access protected + * @class AccessControl {@permission PM_FACTORY} */ public function bulk($request_data) { @@ -152,6 +165,8 @@ class Project extends Api } /** + * Get a list of exportable objects. + * * @url GET /:prj_uid/export/listObjects * @param string $prj_uid {@min 32}{@max 32} * @return mixed|string @@ -169,6 +184,8 @@ class Project extends Api } /** + * Export Project (Promotion Manager). + * * @url GET /:prj_uid/export-granular * @param string $prj_uid {@min 32}{@max 32} * @param string $objects @@ -191,6 +208,8 @@ class Project extends Api } /** + * Export Project (Normal). + * * @url GET /:prj_uid/export * @param string $prj_uid {@min 32}{@max 32} */ @@ -217,6 +236,8 @@ class Project extends Api } /** + * Import Project. + * * @url POST /import * @param array $request_data * @status 201 @@ -245,6 +266,8 @@ class Project extends Api } /** + * Save an existing Project as another Project. + * * @url POST /save-as * @param string $prj_uid {@from body} * @param string $prj_name {@from body} @@ -258,6 +281,8 @@ class Project extends Api } /** + * Get the Process related to a Project. + * * @url GET /:prj_uid/process * @param string $prj_uid {@min 32}{@max 32} */ @@ -278,6 +303,8 @@ class Project extends Api } /** + * Update the Process related to a Project. + * * @url PUT /:prj_uid/process * @param string $prj_uid {@min 32}{@max 32} * @param array $request_data @@ -297,6 +324,8 @@ class Project extends Api } /** + * Generate a BPMN Project. + * * @url POST /generate-bpmn * @param array $request_data * @status 201 @@ -333,6 +362,8 @@ class Project extends Api } /** + * Get the Dynaforms list of a Project. + * * @url GET /:prj_uid/dynaforms * @param string $prj_uid {@min 32}{@max 32} */ @@ -352,6 +383,8 @@ class Project extends Api } /** + * Get the Input Documents list of a Project. + * * @url GET /:prj_uid/input-documents * @param string $prj_uid {@min 32}{@max 32} */ @@ -371,6 +404,8 @@ class Project extends Api } /** + * Get the Variables list of a Project. + * * @url GET /:prj_uid/variables * @param string $prj_uid {@min 32}{@max 32} */ @@ -390,6 +425,8 @@ class Project extends Api } /** + * Get the list of the Grid Variables of a Project. + * * @url GET /:prj_uid/grid/variables * @url GET /:prj_uid/grid/:grid_uid/variables * @param string $prj_uid {@min 32}{@max 32} @@ -411,6 +448,8 @@ class Project extends Api } /** + * Get the PM Functions definition for the Triggers wizard module + * * @url GET /:prj_uid/trigger-wizards * @param string $prj_uid {@min 32}{@max 32} */ @@ -430,6 +469,8 @@ class Project extends Api } /** + * Update route order of a Process related to a Project. + * * @url PUT /:prj_uid/update-route-order * @param string $prj_uid {@min 32}{@max 32} */ @@ -445,6 +486,8 @@ class Project extends Api } /** + * Update route order of a Project. + * * @url PUT /:prj_uid/update-route-order-from-project * @param string $prj_uid {@min 32}{@max 32} */ diff --git a/workflow/engine/src/ProcessMaker/Services/OAuth2/Server.php b/workflow/engine/src/ProcessMaker/Services/OAuth2/Server.php index 9269c4dc2..866baef3d 100644 --- a/workflow/engine/src/ProcessMaker/Services/OAuth2/Server.php +++ b/workflow/engine/src/ProcessMaker/Services/OAuth2/Server.php @@ -342,7 +342,7 @@ class Server implements iAuthenticate $pmAccessToken = new \PmoauthUserAccessTokens(); $session = $pmAccessToken->getSessionData($token['ACCESS_TOKEN']); - if ($session !== false && array_key_exists($session->getSessionName(), $_COOKIE)) { + if ($session !== false && array_key_exists($session->getSessionName(), $_COOKIE)) { // increase the timeout for local php session cookie $config = \Bootstrap::getSystemConfiguration(); if (isset($config['session.gc_maxlifetime'])) { @@ -356,21 +356,21 @@ class Server implements iAuthenticate setcookie($session->getSessionName(), $_COOKIE[$session->getSessionName()], time() + $lifetime, "/", null, false, true); } + } - //Set User Time Zone - $user = \UsersPeer::retrieveByPK(self::$userId); + //Set User Time Zone + $user = \UsersPeer::retrieveByPK(self::$userId); - if (!is_null($user)) { - $userTimeZone = $user->getUsrTimeZone(); + if (!is_null($user)) { + $userTimeZone = $user->getUsrTimeZone(); - if (trim($userTimeZone) == '') { - $arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace")); + if (trim($userTimeZone) == '') { + $arraySystemConfiguration = System::getSystemConfiguration('', '', config("system.workspace")); - $userTimeZone = $arraySystemConfiguration['time_zone']; - } - - $_SESSION['USR_TIME_ZONE'] = $userTimeZone; + $userTimeZone = $arraySystemConfiguration['time_zone']; } + + $_SESSION['USR_TIME_ZONE'] = $userTimeZone; } return $allowed; diff --git a/workflow/engine/templates/cases/caseMessageHistory.js b/workflow/engine/templates/cases/caseMessageHistory.js index 2bc4df634..e79cb5a1f 100644 --- a/workflow/engine/templates/cases/caseMessageHistory.js +++ b/workflow/engine/templates/cases/caseMessageHistory.js @@ -2,14 +2,12 @@ * @author: Douglas Medrano * May 03, 2011 */ - //var windowMessage; - windowMessage = new Object(); + var windowMessage = new Object(); function onResizeIframe(idIframe){ window.parent.tabIframeWidthFix2(idIframe); } function windowPreviewMessage(rowSelected) { - windowMessage = new Ext.Window({ title: '', width: 600, @@ -138,12 +136,13 @@ - function ajaxPostRequest(url, callback_function, id){ - var d = new Date(); - var time = d.getTime(); + function ajaxPostRequest (url, callback_function, id) { + var d = new Date(), + time = d.getTime(), + return_xml=false, + http_request = false; + url= url + '&nocachetime='+time; - var return_xml=false; - var http_request = false; if (window.XMLHttpRequest){ // Mozilla, Safari,... http_request = new XMLHttpRequest(); @@ -169,21 +168,19 @@ return false; } - http_request.onreadystatechange = function(){ - if (http_request.readyState == 4){ - if (http_request.status == 200){ - if (return_xml){ - eval(callback_function + '(http_request.responseXML)'); + http_request.onreadystatechange = function () { + if (http_request.readyState === 4) { + if (http_request.status === 200) { + if (return_xml) { + eval(callback_function + '(http_request.responseXML)'); + } else { + eval(callback_function + '(http_request.responseText, \'' + id + '\')'); } - else{ - eval(callback_function + '(http_request.responseText, \''+id+'\')'); - } - } - else{ - alert('Error found on request:(Code: ' + http_request.status + ')'); + } else { + alert('Error found on request:(Code: ' + http_request.status + ')'); } } - } + }; http_request.open('GET', url, true); http_request.send(null); } @@ -302,82 +299,77 @@ var ActionTabFrameGlobal = ''; } //!!historyGridList|changeLog - function caseMessageHistory_RSP(response,id){ +function caseMessageHistory_RSP (response, id) { messageHistoryGridListMask.hide(); - if(response==""){ - - Ext.Msg.show({ - title:'', - msg: _('ID_MAIL_SENT_SUCCESSFULLY'), - buttons: Ext.Msg.INFO, - fn: function(){}, - animEl: 'elId', - icon: Ext.MessageBox.INFO, - buttons: Ext.MessageBox.OK - }); - - Ext.destroy(Ext.getCmp('processesGrid')); - - messageHistoryGridList(); + if (response === "") { + Ext.Msg.show({ + title: '', + msg: _('ID_MAIL_SENT_SUCCESSFULLY'), + buttons: Ext.Msg.INFO, + animEl: 'elId', + icon: Ext.MessageBox.INFO, + buttons: Ext.MessageBox.OK + }); + Ext.destroy(Ext.getCmp('processesGrid')); + store.destroy(); + messageHistoryGridList(); } - else{ - alert(response); + else { + alert(response); } - } +} + function messageHistoryGridList () { + var expander, + startDateRender, + escapeHtml, + actionRenderingTranslation, + processesGrid, + viewport; - function messageHistoryGridList(){ store = new Ext.data.GroupingStore({ - remoteSort: true, - proxy : new Ext.data.HttpProxy - ( - { - url: 'caseMessageHistory_Ajax.php?actionAjax=messageHistoryGridList_JXP' - } - ), + remoteSort: true, + proxy: new Ext.data.HttpProxy({ + url: 'caseMessageHistory_Ajax.php?actionAjax=messageHistoryGridList_JXP' + }), + reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', + root: 'data', + fields: [ + {name: 'ID_MESSAGE'}, + {name: 'APP_MSG_TYPE'}, + {name: 'APP_MSG_DATE'}, + {name: 'APP_MSG_SUBJECT'}, + {name: 'APP_MSG_FROM'}, + {name: 'APP_MSG_TO'}, + {name: 'APP_MSG_STATUS'}, + {name: 'APP_MSG_BODY'}, + {name: 'MSGS_HISTORY'} - reader : new Ext.data.JsonReader - ( - { - totalProperty: 'totalCount', - root: 'data', - fields : - [ - {name : 'ID_MESSAGE'}, - {name : 'APP_MSG_TYPE'}, - {name : 'APP_MSG_DATE'}, - {name : 'APP_MSG_SUBJECT'}, - {name : 'APP_MSG_FROM'}, - {name : 'APP_MSG_TO'}, - {name : 'APP_MSG_STATUS'}, - {name : 'APP_MSG_BODY'}, - {name : 'MSGS_HISTORY'} - - ] - } - ) + ] + }) }); - var expander = new Ext.ux.grid.RowExpander({ + expander = new Ext.ux.grid.RowExpander({ tpl : new Ext.Template( '

'+TRANSLATIONS.ID_PRO_DESCRIPTION+': {PRO_DESCRIPTION}


' ) }); - startDateRender = function(v){ + startDateRender = function (v) { var dateString = "-"; - if(v!="-"){ + if (v !== "-") { dateString = _DF(v,"m/d/Y H:i:s"); } return dateString; - } - escapeHtml = function(v){ + }; + escapeHtml = function (v) { var pre = document.createElement('pre'); var text = document.createTextNode( v ); pre.appendChild(text); return pre.innerHTML; - } + }; actionRenderingTranslation = function(v){ var actionTranslate = ""; @@ -399,13 +391,11 @@ var ActionTabFrameGlobal = ''; return actionTranslate; }; - - var processesGrid = new Ext.grid.GridPanel({ + processesGrid = new Ext.grid.GridPanel({ region: 'center', - layout: 'fit', + layout: 'column', id: 'processesGrid', height:500, - //autoWidth : true, width:'', title : '', stateful : true, @@ -413,11 +403,9 @@ var ActionTabFrameGlobal = ''; enableColumnResize: true, enableHdMenu: true, frame:false, - //plugins: expander, - // cls : 'grid_with_checkbox', columnLines: true, viewConfig: { - forceFit:true, + forceFit: true, emptyText: (_('ID_NO_RECORDS_FOUND')) }, cm: new Ext.grid.ColumnModel({ @@ -426,7 +414,6 @@ var ActionTabFrameGlobal = ''; sortable: true }, columns: [ - //expander, {id:'ID_MESSAGE', dataIndex: 'ID_MESSAGE', hidden:true, hideable:false}, {header: _("ID_TYPE"), dataIndex: 'APP_MSG_TYPE', width: 70}, {header: _("ID_DATE_LABEL"), dataIndex: 'APP_MSG_DATE', width: 60, renderer: startDateRender}, @@ -437,7 +424,6 @@ var ActionTabFrameGlobal = ''; {header: _("ID_APP_MSG_BODY"), dataIndex: 'APP_MSG_BODY', width: 50,hidden:true}, {id:'MSGS_HISTORY', dataIndex: 'MSGS_HISTORY', hidden:true, hideable:false}, { - // header: _("ID_RESEND"), xtype: 'actioncolumn', width: 60, items: [ @@ -506,33 +492,15 @@ var ActionTabFrameGlobal = ''; processesGrid.store.load({params: {"actionAjax":"messageHistoryGridList_JXP"}}); - processesGrid.store.on( - 'load', - function() - { - //window.parent.resize_iframe(); - }, - this, - { - single: true - } - ); - processesGrid.on('contextmenu', function (evt) { - evt.preventDefault(); + evt.preventDefault(); }, this); - function emptyReturn(){ - } - - var viewport = new Ext.Viewport({ - layout: 'border', - autoScroll: true, - items: [ - processesGrid - ] - }); - } - //!historyGridList| - - + viewport = new Ext.Viewport({ + layout: 'fit', + autoScroll: true, + items: [ + processesGrid + ] + }); + } \ No newline at end of file