BUG 8764 When exporting processes with long names, not display all el SOLVED
- When the title is too long the window is offset by the scroll bar to see a wrong way and also the title. - Molding was conducted in the processmap title and also the link generated in the process_export to trim the name according to the box you have.
This commit is contained in:
@@ -21,7 +21,6 @@ class dashletRssReader implements DashletInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function getXTemplate($className) {
|
public static function getXTemplate($className) {
|
||||||
//Metodo q funcion bien
|
|
||||||
return "<iframe src=\"{page}?DAS_INS_UID={id}\" width=\"{width}\" height=\"207\" frameborder=\"0\"></iframe>";
|
return "<iframe src=\"{page}?DAS_INS_UID={id}\" width=\"{width}\" height=\"207\" frameborder=\"0\"></iframe>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ var processmap=function(){
|
|||||||
limit :true,
|
limit :true,
|
||||||
size :{w:700,h:420},
|
size :{w:700,h:420},
|
||||||
position:{x:50,y:50,center:true},
|
position:{x:50,y:50,center:true},
|
||||||
title :G_STRINGS.ID_PROCESSMAP_EDIT_PROCESS+": "+this.data.db.title.label,
|
title :G_STRINGS.ID_PROCESSMAP_EDIT_PROCESS+": "+ moldTitle(this.data.db.title.label,700),//this.data.db.title.label,s
|
||||||
theme :this.options.theme,
|
theme :this.options.theme,
|
||||||
control :{close:true,resize:false},fx:{modal:true},
|
control :{close:true,resize:false},fx:{modal:true},
|
||||||
statusBar:false,
|
statusBar:false,
|
||||||
@@ -372,7 +372,7 @@ var processmap=function(){
|
|||||||
limit :true,
|
limit :true,
|
||||||
size :{w:600,h:230},
|
size :{w:600,h:230},
|
||||||
position:{x:50,y:50,center:true},
|
position:{x:50,y:50,center:true},
|
||||||
title :G_STRINGS.ID_PROCESSMAP_EXPORT_PROCESS+": "+this.data.db.title.label,
|
title :G_STRINGS.ID_PROCESSMAP_EXPORT_PROCESS+": "+moldTitle(this.data.db.title.label,600),//this.data.db.title.label,
|
||||||
theme :this.options.theme,
|
theme :this.options.theme,
|
||||||
control :{close:true,resize:false},fx:{modal:true},
|
control :{close:true,resize:false},fx:{modal:true},
|
||||||
statusBar:false,
|
statusBar:false,
|
||||||
@@ -2706,3 +2706,15 @@ function exitEditor()
|
|||||||
{
|
{
|
||||||
location.href = '../processes/mainInit';
|
location.href = '../processes/mainInit';
|
||||||
}
|
}
|
||||||
|
function moldTitle(title, size)
|
||||||
|
{
|
||||||
|
size = parseInt(size);
|
||||||
|
chain = parseInt(title.length *6);
|
||||||
|
if ((size - chain) < 0)
|
||||||
|
{
|
||||||
|
chain = parseInt((size/6)-33);
|
||||||
|
newTitle = title.substring(0,chain);
|
||||||
|
title = newTitle+"...";
|
||||||
|
}
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,9 +23,29 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
G::LoadThirdParty('pear/json','class.json');
|
G::LoadThirdParty('pear/json','class.json');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
function myTruncate($cadena,$limit, $break='.', $pad='...') {
|
||||||
|
if (strlen($cadena) <= $limit) {
|
||||||
|
return $cadena;
|
||||||
|
}
|
||||||
|
$breakpoint = strpos($cadena, $break, $limit);
|
||||||
|
if (false !== $breakpoint) {
|
||||||
|
$len =strlen($cadena) - 1;
|
||||||
|
if ($breakpoint < $len) {
|
||||||
|
$cadena = substr($cadena, 0, $breakpoint) . $pad;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $cadena;
|
||||||
|
}
|
||||||
|
function addTitlle($Category, $Id, $Lang) {
|
||||||
|
require_once 'classes/model/Content.php';
|
||||||
|
$content = new Content();
|
||||||
|
$value = $content->load($Category,'', $Id, $Lang);
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
$oJSON = new Services_JSON();
|
$oJSON = new Services_JSON();
|
||||||
$stdObj = $oJSON->decode( $_POST['data'] );
|
$stdObj = $oJSON->decode( $_POST['data'] );
|
||||||
@@ -44,6 +64,18 @@ $Fields = $oProcess->saveSerializedProcess ( $proFields );
|
|||||||
$xpdlFields = $oXpdl->xmdlProcess($sProUid);
|
$xpdlFields = $oXpdl->xmdlProcess($sProUid);
|
||||||
$Fields['FILENAMEXPDL'] = $xpdlFields['FILENAMEXPDL'];
|
$Fields['FILENAMEXPDL'] = $xpdlFields['FILENAMEXPDL'];
|
||||||
$Fields['FILENAME_LINKXPDL'] = $xpdlFields['FILENAME_LINKXPDL'];
|
$Fields['FILENAME_LINKXPDL'] = $xpdlFields['FILENAME_LINKXPDL'];
|
||||||
|
foreach($Fields as $key => $value)
|
||||||
|
{
|
||||||
|
if ($key == 'PRO_TITLE') {
|
||||||
|
$Fields[$key] = myTruncate($value, 65, ' ', '...');
|
||||||
|
}
|
||||||
|
if ($key == 'FILENAME') {
|
||||||
|
$Fields[$key] = myTruncate($value, 60, '_', '...');
|
||||||
|
}
|
||||||
|
if ($key == 'FILENAMEXPDL') {
|
||||||
|
$Fields[$key] = myTruncate($value, 60, '_', '...');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Render page */
|
/* Render page */
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher;
|
||||||
|
|||||||
Reference in New Issue
Block a user