Wrapping work title see BT#4703

skala
Julio Montoya 14 years ago
parent 2723478f73
commit 4160212e7b
  1. 3
      main/inc/lib/display.lib.php
  2. 2
      main/work/work.lib.php
  3. 6
      main/work/work.php

@ -914,6 +914,7 @@ class Display {
}
$json_encode = json_encode($obj);
if (!empty($data)) {
//Converts the "data":"js_variable" to "data":js_variable othersiwe it will not work
$json_encode = str_replace('"data":"'.$data_var.'"','"data":'.$data_var.'',$json_encode);
@ -921,6 +922,8 @@ class Display {
//Fixing true/false js values that doesn't need the ""
$json_encode = str_replace(':"true"',':true',$json_encode);
//wrap_cell is not a valid jqgrid attributes is a hack to wrap a text
$json_encode = str_replace('"wrap_cell":true','cellattr:function(rowId, tv, rawObject, cm, rdata) { return \'style ="white-space: normal;"\'}',$json_encode);
$json_encode = str_replace(':"false"',':false',$json_encode);
$json_encode = str_replace('"formatter":"action_formatter"','formatter:action_formatter',$json_encode);

@ -1655,7 +1655,7 @@ function get_work_user_list($start, $limit, $column, $direction, $work_id, $wher
$work['lastname'] = Display::div($work['lastname'], array('class' => $class));
$work['username'] = Display::div($work['username'], array('class' => $class));
$work['title'] = Display::div(cut($work['title'], 20), array('class' => $class));
$work['title'] = Display::div($work['title'], array('class' => $class));
//Type
$work['type'] = build_document_icon_tag('file', $work['file']);

@ -1161,8 +1161,8 @@ switch ($action) {
array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false'),
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'username', 'index'=>'username', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false'),
array('name'=>'username', 'index'=>'username', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'),
// array('name'=>'file', 'index'=>'file', 'width'=>'20', 'align'=>'left', 'search' => 'false'),
array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'),
array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true'),
@ -1179,7 +1179,7 @@ switch ($action) {
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'username', 'index'=>'username', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false'),
array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"),
// array('name'=>'file', 'index'=>'file', 'width'=>'20', 'align'=>'left', 'search' => 'false'),
//array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'),
array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true'),

Loading…
Cancel
Save