From 7a13688b83fbb9028575a9a3b3c5be1bc76ffc15 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Wed, 25 Sep 2013 17:24:04 -0400 Subject: [PATCH 1/5] BUG 12029 "Sent By column blank in sub process" SOLVED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - "Sent By" column blank in sub process - Problema: Al crear un Proceso y un Sub Proceso, cuando se inicia una tarea del Proceso Padre y se deriva a la tarea del Sub Proceso, en el Inbox el usuario autorizado en el Sub Proceso de la tarea al visualizar la columna "Sent By" no indica quien derivo la tarea mostrando siempre vacia. - Solucion: Cuando se crea un Proceso y Sub Proceso, al iniciar la tarea del Proceso Padre y al derivar el caso a la tarea del Sub Proceso, en el Inbox el usuario autorizado de esa tarea visualizara la columna "Sent By" con el usuario quien derivo el caso. - Se ha creado el trigger SUB_APPLICATION_INSERT para la tabla SUB_APPLICATION, ya que en este punto se crea las delegaciones del Sub Proceso. El trigger corrige el campo PREVIOUS_USR_UID de la tabla APP_CACHE_VIEW que siempre esta vacio, esto cuando la delegacion es de un Sub Proceso. - Se ha aƱgo SQL al archivo "app_cache_view_insert.sql" para corregir el campo en conflicto "APP_CACHE_VIEW.PREVIOUS_USR_UID", ya que este SQL es utilizado para reconstruir la tabla APP_CACHE_VIEW, esto por ejemplo cuando se hace el "Build Cache" que esta en ADMIN>Settings>CasesListCacheBuilder Disponible para la version 2.5.2 --- workflow/engine/classes/class.wsTools.php | 1 + .../engine/classes/model/AppCacheView.php | 41 +++++++++++++++++++ workflow/engine/controllers/installer.php | 8 +++- .../engine/methods/setup/appCacheViewAjax.php | 6 ++- .../setupSchemas/app_cache_view_insert.sql | 12 +++++- .../triggerSubApplicationInsert.sql | 29 +++++++++++++ 6 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 workflow/engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index a697f03f3..01ef1b53b 100755 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -488,6 +488,7 @@ class workspaceTools $triggers[] = $appCache->triggerAppDelegationUpdate($lang, $checkOnly); $triggers[] = $appCache->triggerApplicationUpdate($lang, $checkOnly); $triggers[] = $appCache->triggerApplicationDelete($lang, $checkOnly); + $triggers[] = $appCache->triggerSubApplicationInsert($lang, $checkOnly); $triggers[] = $appCache->triggerContentUpdate($lang, $checkOnly); if ($fill) { diff --git a/workflow/engine/classes/model/AppCacheView.php b/workflow/engine/classes/model/AppCacheView.php index 2230df3a3..f7816c9e1 100755 --- a/workflow/engine/classes/model/AppCacheView.php +++ b/workflow/engine/classes/model/AppCacheView.php @@ -1547,6 +1547,46 @@ class AppCacheView extends BaseAppCacheView return G::LoadTranslation('ID_EXIST'); } + public function triggerSubApplicationInsert($lang, $recreate = false) + { + $cnn = Propel::getConnection("workflow"); + $stmt = $cnn->createStatement(); + + $rs = $stmt->executeQuery("SHOW TRIGGERS", ResultSet::FETCHMODE_ASSOC); + $found = false; + + while ($rs->next()) { + $row = $rs->getRow(); + + if (strtolower($row["Trigger"] == "SUB_APPLICATION_INSERT") && strtoupper($row["Table"]) == "SUB_APPLICATION") { + $found = true; + } + } + + if ($recreate) { + $rs = $stmt->executeQuery("DROP TRIGGER IF EXISTS SUB_APPLICATION_INSERT"); + $found = false; + } + + if (!$found) { + $filenameSql = $this->pathToAppCacheFiles . "triggerSubApplicationInsert.sql"; + + if (!file_exists($filenameSql)) { + throw (new Exception("file triggerSubApplicationInsert.sql doesn't exist")); + } + + $sql = file_get_contents($filenameSql); + $sql = str_replace("{lang}", $lang, $sql); + + $stmt->executeQuery($sql); + + return G::LoadTranslation("ID_CREATED"); + } + + return G::LoadTranslation("ID_EXIST"); + } + + /** * Retrieve the SQL code to create the APP_CACHE_VIEW triggers. * @@ -1559,6 +1599,7 @@ class AppCacheView extends BaseAppCacheView 'triggerApplicationUpdate.sql', 'triggerAppDelegationUpdate.sql', 'triggerAppDelegationInsert.sql', + "triggerSubApplicationInsert.sql", 'triggerContentUpdate.sql' ); diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index bfb7bfd6b..adb927283 100755 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -753,7 +753,9 @@ class Installer extends Controller $this->mysqlQuery( @file_get_contents( PATH_HOME . 'engine/methods/setup/setupSchemas/triggerAppDelegationUpdate.sql' ) ); $this->mysqlQuery( @file_get_contents( PATH_HOME . 'engine/methods/setup/setupSchemas/triggerApplicationUpdate.sql' ) ); $this->mysqlQuery( @file_get_contents( PATH_HOME . 'engine/methods/setup/setupSchemas/triggerApplicationDelete.sql' ) ); + $this->mysqlQuery(@file_get_contents(PATH_HOME . "engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql")); $this->mysqlQuery( @file_get_contents( PATH_HOME . 'engine/methods/setup/setupSchemas/triggerContentUpdate.sql' ) ); + $this->mysqlQuery( "INSERT INTO `CONFIGURATION` ( `CFG_UID`, `CFG_VALUE` @@ -827,6 +829,9 @@ class Installer extends Controller //APPLICATION DELETE $res = $appCache->triggerApplicationDelete( $lang, true ); + //SUB_APPLICATION INSERT + $res = $appCache->triggerSubApplicationInsert($lang, false); + //CONTENT UPDATE $res = $appCache->triggerContentUpdate( $lang, true ); @@ -1038,6 +1043,7 @@ class Installer extends Controller $this->mssqlQuery( @file_get_contents( PATH_HOME . 'engine/plugins/enterprise/data/triggerAppDelegationUpdate.sql' ) ); $this->mssqlQuery( @file_get_contents( PATH_HOME . 'engine/plugins/enterprise/data/triggerApplicationUpdate.sql' ) ); $this->mssqlQuery( @file_get_contents( PATH_HOME . 'engine/plugins/enterprise/data/triggerApplicationDelete.sql' ) ); + $this->mysqlQuery(@file_get_contents(PATH_HOME . "engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql")); $this->mssqlQuery( @file_get_contents( PATH_HOME . 'engine/plugins/enterprise/data/triggerContentUpdate.sql' ) ); $this->mssqlQuery( "INSERT INTO CONFIGURATION ( CFG_UID, @@ -1366,7 +1372,7 @@ class Installer extends Controller $value = array( 'login_defaultLanguage' => "pt-BR", "dateFormat" => 'd \d\e F \d\e Y' - ); + ); $value = serialize($value); $query = "INSERT INTO CONFIGURATION (CFG_UID, CFG_VALUE) VALUES ('ENVIRONMENT_SETTINGS', '".mysql_real_escape_string($value)."')"; diff --git a/workflow/engine/methods/setup/appCacheViewAjax.php b/workflow/engine/methods/setup/appCacheViewAjax.php index e31e6bba8..e9ed60072 100755 --- a/workflow/engine/methods/setup/appCacheViewAjax.php +++ b/workflow/engine/methods/setup/appCacheViewAjax.php @@ -178,6 +178,9 @@ switch ($request) { $res = $appCache->triggerApplicationDelete( $lang, false ); $result->info[] = array ('name' => G::LoadTranslation ( 'ID_CACHE_BUILDER_TRIGGER_APPLICATION_DELETE' ),'value' => $res); + //SUB_APPLICATION INSERT + $res = $appCache->triggerSubApplicationInsert($lang, false); + //CONTENT UPDATE $res = $appCache->triggerContentUpdate( $lang, false ); $result->info[] = array ("name" => G::LoadTranslation ( 'ID_CACHE_BUILDER_TRIGGER_CONTENT_UPDATE' ),"value" => $res); @@ -237,12 +240,13 @@ switch ($request) { $res = $appCache->triggerApplicationDelete( $lang, true ); //$result->info[] = array ('name' => 'Trigger APPLICATION DELETE', 'value'=> $res); + //SUB_APPLICATION INSERT + $res = $appCache->triggerSubApplicationInsert($lang, false); //CONTENT UPDATE $res = $appCache->triggerContentUpdate( $lang, true ); //$result->info[] = array("name" => "Trigger CONTENT UPDATE", "value" => $res); - //build using the method in AppCacheView Class $res = $appCache->fillAppCacheView( $lang ); //$result->info[] = array ('name' => 'build APP_CACHE_VIEW', 'value'=> $res); diff --git a/workflow/engine/methods/setup/setupSchemas/app_cache_view_insert.sql b/workflow/engine/methods/setup/setupSchemas/app_cache_view_insert.sql index 483865798..e3e4ccdf9 100755 --- a/workflow/engine/methods/setup/setupSchemas/app_cache_view_insert.sql +++ b/workflow/engine/methods/setup/setupSchemas/app_cache_view_insert.sql @@ -42,7 +42,17 @@ SELECT APPLICATION.APP_NUMBER, APPLICATION.APP_STATUS, APP_DELEGATION.USR_UID, - APP_LAST_USER.USR_UID, + IF ( + APP_DELEGATION.DEL_PREVIOUS = 0 AND (SELECT SUBAPP.APP_UID FROM SUB_APPLICATION AS SUBAPP WHERE SUBAPP.APP_UID = APP_DELEGATION.APP_UID LIMIT 1) IS NOT NULL, + (SELECT APPDEL2.USR_UID + FROM SUB_APPLICATION AS SUBAPP, APP_DELEGATION AS APPDEL1, APP_DELEGATION AS APPDEL2 + WHERE SUBAPP.APP_UID = APP_DELEGATION.APP_UID AND + SUBAPP.APP_PARENT = APPDEL1.APP_UID AND SUBAPP.DEL_INDEX_PARENT = APPDEL1.DEL_INDEX AND + APPDEL1.APP_UID = APPDEL2.APP_UID AND APPDEL1.DEL_PREVIOUS = APPDEL2.DEL_INDEX + LIMIT 1 + ), + APP_LAST_USER.USR_UID + ) AS PREVIOUS_USR_UID, APP_DELEGATION.TAS_UID, APP_DELEGATION.PRO_UID, substring(APP_DELEGATION.DEL_DELEGATE_DATE,1,19), diff --git a/workflow/engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql b/workflow/engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql new file mode 100644 index 000000000..1829f405e --- /dev/null +++ b/workflow/engine/methods/setup/setupSchemas/triggerSubApplicationInsert.sql @@ -0,0 +1,29 @@ +CREATE TRIGGER SUB_APPLICATION_INSERT BEFORE INSERT ON SUB_APPLICATION +FOR EACH ROW +BEGIN + DECLARE PREVIOUS_USR_UID VARCHAR(32); + + SET @PREVIOUS_USR_UID = ''; + + SET @PREVIOUS_USR_UID = ( + SELECT APPDEL2.USR_UID + FROM APP_DELEGATION AS APPDEL1, APP_DELEGATION AS APPDEL2 + WHERE APPDEL1.APP_UID = NEW.APP_PARENT AND APPDEL1.DEL_INDEX = NEW.DEL_INDEX_PARENT AND + APPDEL1.APP_UID = APPDEL2.APP_UID AND APPDEL1.DEL_PREVIOUS = APPDEL2.DEL_INDEX + LIMIT 1 + ); + + IF (@PREVIOUS_USR_UID IS NULL) THEN + SET @PREVIOUS_USR_UID = ''; + END IF; + + -- Update record in APP_CACHE_VIEW + UPDATE APP_CACHE_VIEW + SET PREVIOUS_USR_UID = @PREVIOUS_USR_UID + WHERE APP_UID = NEW.APP_UID AND DEL_INDEX = (SELECT APPDEL.DEL_INDEX + FROM APP_DELEGATION AS APPDEL + WHERE APPDEL.APP_UID = NEW.APP_UID AND APPDEL.DEL_PREVIOUS = 0 + LIMIT 1 + ); + +END \ No newline at end of file From 2d46b232abe9ec547db39bc9c66cfa297f2018e0 Mon Sep 17 00:00:00 2001 From: jennylee Date: Thu, 26 Sep 2013 09:05:46 -0400 Subject: [PATCH 2/5] BUG-10696 Problema con las ventanas modales. Las ventanas popup del diseniador de procesos se mueven pudiendo estas perderse. Por lo que se aumento una validacion para que el atributo Limit que controla este comportamiento funcione correctamente. --- gulliver/js/maborak/core/module.drag.js | 7 ++++++- workflow/engine/js/dbConnections/main.js | 3 +++ workflow/engine/js/processmap/core/processmap.js | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gulliver/js/maborak/core/module.drag.js b/gulliver/js/maborak/core/module.drag.js index 2f90d9132..425cb8bca 100755 --- a/gulliver/js/maborak/core/module.drag.js +++ b/gulliver/js/maborak/core/module.drag.js @@ -268,7 +268,6 @@ leimnud.Package.Public({ { if(this.options.limit===true) { - var rng=this.parent.dom.positionRange(this.linkRef,false,true); rG={ l:true, t:true @@ -284,6 +283,12 @@ leimnud.Package.Public({ { tL=parseInt(this.elementStart[i].x+(cursor.x-this.cursorStart.x),10); tT=parseInt(this.elementStart[i].y+(cursor.y-this.cursorStart.y),10); + if (tL > (screen.width - (element.clientWidth + 25))) { + rG.l = false; + } + if (tT > (screen.height - (element.clientHeight + 200))) { + rG.t = false; + } if(rG.l) { this.parent.dom.setStyle(this.linkRef[i],{ diff --git a/workflow/engine/js/dbConnections/main.js b/workflow/engine/js/dbConnections/main.js index 9c3c193c4..1cdf99c21 100755 --- a/workflow/engine/js/dbConnections/main.js +++ b/workflow/engine/js/dbConnections/main.js @@ -14,6 +14,7 @@ var oPanel; function newDbConnection() { oPanel = new leimnud.module.panel(); oPanel.options = { + limit :true, size :{w:450,h:380}, position:{x:0,y:0,center:true}, title :G_STRINGS.ID_DBS_NEW, @@ -129,6 +130,7 @@ function editDbConnection(DBS_UID) oPanel = new leimnud.module.panel(); oPanel.options = { + limit :true, size :{w:450,h:380}, position:{x:0,y:0,center:true}, title :G_STRINGS.ID_DBS_EDIT, @@ -235,6 +237,7 @@ function testDBConnection() var myPanel = new leimnud.module.panel(); currentPopupWindow = myPanel; myPanel.options = { + limit :true, size:{w:500,h:400}, position:{center:true}, title: G_STRINGS.DBCONNECTIONS_TEST, diff --git a/workflow/engine/js/processmap/core/processmap.js b/workflow/engine/js/processmap/core/processmap.js index e9897e94c..8b155ea9a 100755 --- a/workflow/engine/js/processmap/core/processmap.js +++ b/workflow/engine/js/processmap/core/processmap.js @@ -2772,6 +2772,7 @@ function showLogCaseSchedulerList(PRO_UID) { mainPanel = new leimnud.module.panel(); mainPanel.options = { + limit :true, size :{w:640,h:450}, position:{x:0,y:0,center:true}, title :"Case Scheduler Log List", From aa183f005f1f8da98f43d0ba0586097c9e514062 Mon Sep 17 00:00:00 2001 From: jennylee Date: Thu, 26 Sep 2013 11:11:04 -0400 Subject: [PATCH 3/5] BUG-10696 Problema con las ventanas modales. Las ventanas popup del diseniador de procesos se mueven pudiendo estas perderse. Por lo que se aumento una validacion para que el atributo Limit que controla este comportamiento funcione correctamente. --- gulliver/js/maborak/core/maborak.loader.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gulliver/js/maborak/core/maborak.loader.js b/gulliver/js/maborak/core/maborak.loader.js index 310ea109a..b87e81c97 100644 --- a/gulliver/js/maborak/core/maborak.loader.js +++ b/gulliver/js/maborak/core/maborak.loader.js @@ -592,11 +592,13 @@ else if(this.type=="group") {this.parent.dom.setStyle(this.options.elements[i],{left:this.elementStart[i].x+(cursor.x-this.cursorStart.x),top:this.elementStart[i].y+(cursor.y-this.cursorStart.y)});}} else if(this.type=="link") {if(this.options.limit===true) -{var rng=this.parent.dom.positionRange(this.linkRef,false,true);rG={l:true,t:true};for(i=0;i(screen.width-(element.clientWidth+25))){rG.l=false;} +if(tT>(screen.height-(element.clientHeight+200))){rG.t=false;} +if(rG.l) {this.parent.dom.setStyle(this.linkRef[i],{left:tL});} if(rG.t) {this.parent.dom.setStyle(this.linkRef[i],{top:tT});}}} @@ -1005,7 +1007,7 @@ mainPanel=new leimnud.module.panel();mainPanel.options={limit:true,size:{w:850,h function showNewProcessMap(PRO_UID) {window.location="../bpmnDesigner?id="+PRO_UID;} function showLogCaseSchedulerList(PRO_UID) -{mainPanel=new leimnud.module.panel();mainPanel.options={size:{w:640,h:450},position:{x:0,y:0,center:true},title:"Case Scheduler Log List",theme:"processmaker",statusBar:false,control:{resize:false,roll:false,drag:true},fx:{modal:true,opacity:true,blinkToFront:false,fadeIn:false,drag:true}};mainPanel.events={remove:function(){delete(mainPanel);}.extend(this)};mainPanel.make();mainPanel.loader.show();var oRPC=new leimnud.module.rpc.xmlhttp({url:'processes_Ajax',args:'action=log_case_scheduler&PRO_UID='+PRO_UID});oRPC.callback=function(rpc){mainPanel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();mainPanel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this);oRPC.make();} +{mainPanel=new leimnud.module.panel();mainPanel.options={limit:true,size:{w:640,h:450},position:{x:0,y:0,center:true},title:"Case Scheduler Log List",theme:"processmaker",statusBar:false,control:{resize:false,roll:false,drag:true},fx:{modal:true,opacity:true,blinkToFront:false,fadeIn:false,drag:true}};mainPanel.events={remove:function(){delete(mainPanel);}.extend(this)};mainPanel.make();mainPanel.loader.show();var oRPC=new leimnud.module.rpc.xmlhttp({url:'processes_Ajax',args:'action=log_case_scheduler&PRO_UID='+PRO_UID});oRPC.callback=function(rpc){mainPanel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();mainPanel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this);oRPC.make();} function exitEditor() {location.href='../processes/mainInit';} function moldTitle(title,size) From 8e773c60283c7c0d6cb77dc64500d9ff2ea6d863 Mon Sep 17 00:00:00 2001 From: Roly Gutierrez Date: Thu, 26 Sep 2013 17:25:03 -0400 Subject: [PATCH 4/5] =?UTF-8?q?BUG-12342=20SOLVED=20C=C3=B3digo=20extra?= =?UTF-8?q?=C3=B1o=20al=20cambiar=20el=20style=20de=20un=20dynaform=20usan?= =?UTF-8?q?do=20IE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulliver/js/maborak/core/maborak.js | 3 ++- gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index e951595bf..3f9779d88 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -2004,7 +2004,8 @@ parent=parent.parent;} if(lastParent===parent){textNode=new tinymce.html.Node('#text',3);textNode.value='\u00a0';node.replace(textNode);}}}});} if(!settings.allow_html_in_named_anchor){self.addAttributeFilter('id,name',function(nodes,name){var i=nodes.length,sibling,prevSibling,parent,node;while(i--){node=nodes[i];if(node.name==='a'&&node.firstChild&&!node.attr('href')){parent=node.parent;sibling=node.lastChild;do{prevSibling=sibling.prev;parent.insert(sibling,node);sibling=prevSibling;}while(sibling);}}});}}})(tinymce);tinymce.html.Writer=function(settings){var html=[],indent,indentBefore,indentAfter,encode,htmlOutput;settings=settings||{};indent=settings.indent;indentBefore=tinymce.makeMap(settings.indent_before||'');indentAfter=tinymce.makeMap(settings.indent_after||'');encode=tinymce.html.Entities.getEncodeFunc(settings.entity_encoding||'raw',settings.entities);htmlOutput=settings.element_format=="html";return{start:function(name,attrs,empty){var i,l,attr,value;if(indent&&indentBefore[name]&&html.length>0){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("expand"));} +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') diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js b/gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js index 16b9c5f03..c137734c3 100644 --- a/gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js +++ b/gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js @@ -4383,6 +4383,11 @@ tinymce.html.Writer = function(settings) { if (attrs) { for (i = 0, l = attrs.length; i < l; i++) { attr = attrs[i]; + + if( attr.value.indexOf("expand") >= 0 ) { + attr.value = attr.value.substring(0, attr.value.indexOf("expand")); + } + html.push(' ', attr.name, '="', encode(attr.value, true), '"'); } } From f3d594207a1c1486080565f781dee866a1479d91 Mon Sep 17 00:00:00 2001 From: Roly Gutierrez Date: Fri, 27 Sep 2013 16:34:40 -0400 Subject: [PATCH 5/5] =?UTF-8?q?BUG-12342=20SOLVED=20adici=C3=B3n=20de=20li?= =?UTF-8?q?sta=20de=20casos=20similares=20que=20producen=20la=20agregaci?= =?UTF-8?q?=C3=B3n=20de=20c=C3=B3digo=20extra=C3=B1o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulliver/js/maborak/core/maborak.js | 2 +- gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index 3f9779d88..bdc113495 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -2004,7 +2004,7 @@ parent=parent.parent;} if(lastParent===parent){textNode=new tinymce.html.Node('#text',3);textNode.value='\u00a0';node.replace(textNode);}}}});} if(!settings.allow_html_in_named_anchor){self.addAttributeFilter('id,name',function(nodes,name){var i=nodes.length,sibling,prevSibling,parent,node;while(i--){node=nodes[i];if(node.name==='a'&&node.firstChild&&!node.attr('href')){parent=node.parent;sibling=node.lastChild;do{prevSibling=sibling.prev;parent.insert(sibling,node);sibling=prevSibling;}while(sibling);}}});}}})(tinymce);tinymce.html.Writer=function(settings){var html=[],indent,indentBefore,indentAfter,encode,htmlOutput;settings=settings||{};indent=settings.indent;indentBefore=tinymce.makeMap(settings.indent_before||'');indentAfter=tinymce.makeMap(settings.indent_after||'');encode=tinymce.html.Entities.getEncodeFunc(settings.entity_encoding||'raw',settings.entities);htmlOutput=settings.element_format=="html";return{start:function(name,attrs,empty){var i,l,attr,value;if(indent&&indentBefore[name]&&html.length>0){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("expand"));} +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 diff --git a/gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js b/gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js index c137734c3..d4b6e0fc8 100644 --- a/gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js +++ b/gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js @@ -4384,8 +4384,11 @@ tinymce.html.Writer = function(settings) { for (i = 0, l = attrs.length; i < l; i++) { attr = attrs[i]; - if( attr.value.indexOf("expand") >= 0 ) { - attr.value = attr.value.substring(0, attr.value.indexOf("expand")); + var list = ['toStr', 'concat', 'get_by_key', 'expand', 'setParent', 'isset_key', 'toJSONString']; + for(var iList = 0; iList < list.length; iList++) { + if( attr.value.indexOf(list[iList]) >= 0 ) { + attr.value = attr.value.substring(0, attr.value.indexOf(list[iList])); + } } html.push(' ', attr.name, '="', encode(attr.value, true), '"');