Skip to content

Commit

Permalink
#C12347 bugFix - двойно превеждане на title и ограничение
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuseinov committed May 18, 2016
1 parent 45cad46 commit 63ee81a
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion bank/Accounts.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public function renderContragentBankAccounts($data)
$title = 'Добавяне на нова банкова сметка';
}

$tpl->append(ht::createLink($img, $url, FALSE, 'title=' . tr($title)), 'title');
$tpl->append(ht::createLink($img, $url, FALSE, 'title=' . $title), 'title');
}
}

Expand Down
4 changes: 2 additions & 2 deletions callcenter/Fax.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static function on_AfterRecToVerbal($mvc, &$row, $rec)
static function getTemplateForAddNum($num, $uniqId)
{
// Аттрибути за стилове
$companiesAttr['title'] = tr('Нова фирма');
$companiesAttr['title'] = 'Нова фирма';

// Икона на фирмите
$companiesImg = "<img src=" . sbf('img/16/office-building-add.png') . " width='16' height='16'>";
Expand All @@ -205,7 +205,7 @@ static function getTemplateForAddNum($num, $uniqId)
$text = ht::createLink($companiesImg, array('crm_Companies', 'add', 'fax' => $num, 'ret_url' => TRUE), FALSE, $companiesAttr);

// Аттрибути за стилове
$personsAttr['title'] = tr('Ново лице');
$personsAttr['title'] = 'Ново лице';

// Икона на изображенията
$personsImg = "<img src=" . sbf('img/16/vcard-add.png') . " width='16' height='16'>";
Expand Down
4 changes: 2 additions & 2 deletions callcenter/SMS.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ static function getTemplateForAddNum($num, $uniqId)
$personsAttr = array();

// Аттрибути за стилове
$companiesAttr['title'] = tr('Нова фирма');
$companiesAttr['title'] = 'Нова фирма';

// Икона на фирмите
$companiesImg = "<img src=" . sbf('img/16/office-building-add.png') . " width='16' height='16'>";
Expand All @@ -745,7 +745,7 @@ static function getTemplateForAddNum($num, $uniqId)
$text = ht::createLink($companiesImg, array('crm_Companies', 'add', 'tel' => $num, 'ret_url' => TRUE), FALSE, $companiesAttr);

// Аттрибути за стилове
$personsAttr['title'] = tr('Ново лице');
$personsAttr['title'] = 'Ново лице';

// Икона на изображенията
$personsImg = "<img src=" . sbf('img/16/vcard-add.png') . " width='16' height='16'>";
Expand Down
6 changes: 3 additions & 3 deletions callcenter/Talks.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1758,7 +1758,7 @@ static function getTemplateForAddNum($num, $uniqId, $numArr = FALSE)
if (!haveRole('admin')) return ;

// Аттрибути за стилове
$numbersAttr['title'] = tr('Добави към потребител');
$numbersAttr['title'] = 'Добави към потребител';

// Икона на телефон
$phonesImg = "<img src=" . sbf('img/16/telephone2-add.png') . " width='16' height='16'>";
Expand All @@ -1768,7 +1768,7 @@ static function getTemplateForAddNum($num, $uniqId, $numArr = FALSE)
} else {

// Аттрибути за стилове
$companiesAttr['title'] = tr('Нова фирма');
$companiesAttr['title'] = 'Нова фирма';

// Икона на фирмите
$companiesImg = "<img src=" . sbf('img/16/office-building-add.png') . " width='16' height='16'>";
Expand All @@ -1777,7 +1777,7 @@ static function getTemplateForAddNum($num, $uniqId, $numArr = FALSE)
$text = ht::createLink($companiesImg, array('crm_Companies', 'add', 'tel' => $num, 'ret_url' => TRUE), FALSE, $companiesAttr);

// Аттрибути за стилове
$personsAttr['title'] = tr('Ново лице');
$personsAttr['title'] = 'Ново лице';

// Икона на изображенията
$personsImg = "<img src=" . sbf('img/16/vcard-add.png') . " width='16' height='16'>";
Expand Down
2 changes: 1 addition & 1 deletion colab/Profiles.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private function modifyProfile(&$data)
// Подмяна на линка за смяна на паролата
$data->User->row->password = substr($data->User->row->password, 0, 7);
$changePassUrl = array($this, 'ChangePassword', 'ret_url' => TRUE);
$data->User->row->password .= " " . ht::createLink('(' . tr('cмяна') . ')', $changePassUrl, FALSE, 'title=' . tr('Смяна на парола'));
$data->User->row->password .= " " . ht::createLink('(' . tr('cмяна') . ')', $changePassUrl, FALSE, 'title=Смяна на парола'));
}


Expand Down
2 changes: 1 addition & 1 deletion core/RowToolbar.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function renderHtml_($showWithoutToolbar = NULL)
$layout = new core_ET("<span>[#ROW_TOOLS#]</span>");
foreach ($this->links as $linkObj){
setIfNot($linkObj->attr['hint'], $linkObj->title);
$linkObj->attr['title'] = tr($linkObj->attr['title']);
$linkObj->attr['title'] = $linkObj->attr['title'];
$btn = ht::createLink('', $linkObj->url, tr($linkObj->error ? $linkObj->error : $linkObj->warning), $linkObj->attr);
$layout->append($btn, 'ROW_TOOLS');
}
Expand Down
2 changes: 1 addition & 1 deletion crm/Locations.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public function renderContragentLocations($data)
if ($data->masterMvc->haveRightFor('edit', $data->masterId)) {
$url = array($this, 'add', 'contragentCls' => $data->contragentCls, 'contragentId' => $data->masterId, 'ret_url' => TRUE);
$img = "<img src=" . sbf('img/16/add.png') . " width='16' height='16'>";
$tpl->append(ht::createLink($img, $url, FALSE, 'title=' . tr('Добавяне на нова локация')), 'title');
$tpl->append(ht::createLink($img, $url, FALSE, 'title=Добавяне на нова локация'), 'title');
}
}

Expand Down
2 changes: 1 addition & 1 deletion crm/Personalization.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public static function renderPersonalization($data)
$img = "<img src=" . sbf('img/16/edit.png') . " width='16' height='16'>";

// Създаме линка
$link = ht::createLink($img, $url, FALSE,'title=' . tr('Промяна на персонализация'));
$link = ht::createLink($img, $url, FALSE,'title=Промяна на персонализация');

// Добавяме линка
$tpl->append($link,'title');
Expand Down
8 changes: 4 additions & 4 deletions crm/Profiles.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public static function on_AfterPrepareSingle(crm_Profiles $mvc, $data)
$changePassUrl = array('crm_Profiles', 'changePassword', 'ret_url'=>TRUE);

// Линк за промяна на URL
$changePasswordLink = ht::createLink('(' . tr('cмяна') . ')', $changePassUrl, FALSE, 'title=' . tr('Смяна на парола'));
$changePasswordLink = ht::createLink('(' . tr('cмяна') . ')', $changePassUrl, FALSE, 'title=Смяна на парола');

// Променяме паролата
$data->User->row->password = str_repeat('*', 7) . " " . $changePasswordLink;
Expand All @@ -323,7 +323,7 @@ public static function on_AfterPrepareSingle(crm_Profiles $mvc, $data)
$url = array('core_Users', 'edit', $data->rec->userId, 'ret_url' => TRUE);

// Създаме линка
$data->User->row->editLink = ht::createLink($img, $url, FALSE, 'title=' . tr('Редактиране на потребителски данни'));
$data->User->row->editLink = ht::createLink($img, $url, FALSE, 'title=Редактиране на потребителски данни');
}

if($data->User->rec->state != 'active') {
Expand Down Expand Up @@ -370,7 +370,7 @@ public static function on_AfterPrepareSingle(crm_Profiles $mvc, $data)
reset($userTeams);
$userId = key($userTeams);

$attr = array('ef_icon' => '/img/16/page_go.png', 'title' => tr('Логвания на потребителя'));
$attr = array('ef_icon' => '/img/16/page_go.png', 'title' => 'Логвания на потребителя');

// URL за промяна
$loginLogUrl = array('core_LoginLog', 'list', 'users' => $userId, 'ret_url' => TRUE);
Expand Down Expand Up @@ -408,7 +408,7 @@ public static function on_AfterPrepareSingle(crm_Profiles $mvc, $data)
$attr = array();
$attr['class'] = 'linkWithIcon';
$attr['style'] = 'background-image:url(' . sbf('/img/16/page_go.png') . ');';
$attr['title'] = tr('Екшън лог на потребителя');
$attr['title'] = 'Екшън лог на потребителя';

// URL за промяна
$loginLogUrl = array('log_Data', 'list', 'users' => $userId, 'ret_url' => TRUE);
Expand Down
2 changes: 1 addition & 1 deletion crm/ext/CourtReg.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static function renderCourtReg($data)
$tpl->append(
ht::createLink(
$img, $url, FALSE,
'title=' . tr('Промяна на данните')
'title=Промяна на данните'
),
'title'
);
Expand Down
2 changes: 1 addition & 1 deletion crm/ext/IdCards.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static function renderIdCard($data)
$tpl->append(
ht::createLink(
$img, $url, FALSE,
'title=' . tr('Промяна ЛК')
'title=Промяна ЛК'
),
'title'
);
Expand Down
6 changes: 3 additions & 3 deletions doc/Containers.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ static function getLinkForSingle($id)
$attr = array();
$attr['class'] = 'linkWithIcon';
$attr['style'] = 'background-image:url(' . sbf($doc->getIcon($doc->that)) . ');';
$attr['title'] = tr('Документ') . ': ' . $docRow->title;
$attr['title'] = 'Документ|*: ' . $docRow->title;

// Документа да е линк към single' а на документа
$res = ht::createLink(str::limitLen($docRow->title, 35), $url, NULL, $attr);
Expand Down Expand Up @@ -2564,7 +2564,7 @@ protected static function getLinkForHideDocument($document, $id)
$attr = array();
$attr['ef_icon'] = 'img/16/toggle2.png';
$attr['class'] = 'settings-hide-document';
$attr['title'] = tr('Скриване на документа в нишката');
$attr['title'] = 'Скриване на документа в нишката';
$attr['onclick'] = 'return startUrlFromDataAttr(this);';
$attr['data-url'] = toUrl($url, 'local');

Expand Down Expand Up @@ -2657,7 +2657,7 @@ protected static function renderHiddenDocument($id)
$attr = array();
$attr['ef_icon'] = 'img/16/toggle-expand.png';
$attr['class'] = 'settings-show-document';
$attr['title'] = tr('Показване на целия документ');
$attr['title'] = 'Показване на целия документ';
$attr['onclick'] = 'return startUrlFromDataAttr(this);';
$attr['data-url'] = toUrl($url, 'local');

Expand Down
2 changes: 1 addition & 1 deletion doc/Files.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static function on_AfterRecToVerbal($mvc, $row, $rec)
$docProxyRow = $docProxy->getDocumentRow();

// Атрибутеите на линка
$attr['title'] = tr('Първи документ|*: ') . $docProxyRow->title;
$attr['title'] = 'Първи документ|*: ' . $docProxyRow->title;

// Темата да е линк към single' а на първиа документ документа
$firstContainerLink = $docProxy->getLink(35, $attr);
Expand Down
2 changes: 1 addition & 1 deletion doc/FolderPlg.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public static function on_AfterPrepareSingle($mvc, &$res, $data)
$attr = array();
$attr['class'] = 'linkWithIcon';
$attr['style'] = 'background-image:url(' . sbf('/img/16/page_go.png') . ');';
$attr['title'] = tr('Екшън лог на потребителя');
$attr['title'] = 'Екшън лог на потребителя';

$logUrl = array('log_Data', 'list', 'class' => $mvc->className, 'object' => $data->rec->id, 'Cmd[refresh]' => TRUE, 'ret_url' => TRUE);

Expand Down
4 changes: 2 additions & 2 deletions doc/LikesPlg.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ function on_AfterRecToVerbal(&$mvc, &$row, &$rec, $fields = array())

$attr['ef_icon'] = 'img/16/redheart.png';
$attr['class'] = 'liked';
$attr['title'] = tr('Отказ от харесване');
$attr['title'] = 'Отказ от харесване';

$likesLink = ht::createLink('', $dislikeUrl, NULL, $attr);
} else {
Expand All @@ -394,7 +394,7 @@ function on_AfterRecToVerbal(&$mvc, &$row, &$rec, $fields = array())

$attr['ef_icon'] = 'img/16/grayheart.png';
$attr['class'] = $linkClass;
$attr['title'] = tr('Харесване');
$attr['title'] = 'Харесване';

$likesLink = ht::createLink('', $likeUrl, NULL, $attr);
}
Expand Down
2 changes: 1 addition & 1 deletion plg/Clone.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public static function on_AfterGetCloneLink($mvc, &$res, $rec)
$cloneSbf = sbf("img/16/clone.png");

// Ако не е подадено заглавиет, създаваме линк с иконата
$res = ht::createLink('<img src=' . $cloneSbf . ' width="16" height="16">', $cloneUrl, NULL, 'title=' . tr('Клониране'));
$res = ht::createLink('<img src=' . $cloneSbf . ' width="16" height="16">', $cloneUrl, NULL, 'title=Клониране');
}


Expand Down
2 changes: 1 addition & 1 deletion pos/Receipts.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ public function renderToolsTab($id)
$block->append(ht::createElement('input', array('name' => 'receiptId', 'type' => 'hidden', 'value' => $rec->id)), 'INPUT_FLD');
$block->append(ht::createElement('input', array('name' => 'rowId', 'type' => 'hidden', 'value' => $value)), 'INPUT_FLD');
$block->append(ht::createFnBtn('Код', NULL, NULL, array('class' => "{$disClass} buttonForm", 'id' => 'addProductBtn', 'data-url' => $addUrl, 'title' => 'Продуктов код или баркод')), 'FIRST_TOOLS_ROW');
$block->append(ht::createFnBtn('К-во', NULL, NULL, array('class' => "{$disClass} buttonForm tools-modify", 'data-url' => $modQUrl, 'title' => tr('Промени количество'))), 'FIRST_TOOLS_ROW');
$block->append(ht::createFnBtn('К-во', NULL, NULL, array('class' => "{$disClass} buttonForm tools-modify", 'data-url' => $modQUrl, 'title' => 'Промени количество')), 'FIRST_TOOLS_ROW');
$block->append(ht::createFnBtn('|Отстъпка|* %', NULL, NULL, array('class' => "{$disClass} buttonForm tools-modify", 'data-url' => $discUrl, 'title' => 'Задай отстъпка')), 'FIRST_TOOLS_ROW');
$block->append(ht::createFnBtn('*', NULL, NULL, array('class' => "buttonForm tools-sign", 'title' => 'Умножение', 'value' => '*')), 'FIRST_TOOLS_ROW');

Expand Down
2 changes: 1 addition & 1 deletion price/ListToCustomers.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public static function on_AfterRenderDetail($mvc, &$tpl, $data)
$tpl = $wrapTpl;

if ($data->addUrl && !Mode::is('text', 'xhtml') && !Mode::is('printing')) {
$tpl->append(ht::createLink("<img src=" . sbf('img/16/add.png') . " style='vertical-align: middle; margin-left:5px;'>", $data->addUrl, FALSE, 'title=' . tr('Избор на Ценова политика')), 'title');
$tpl->append(ht::createLink("<img src=" . sbf('img/16/add.png') . " style='vertical-align: middle; margin-left:5px;'>", $data->addUrl, FALSE, 'title=Избор на Ценова политика'), 'title');
}
}

Expand Down

0 comments on commit 63ee81a

Please sign in to comment.