This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
BX.addCustomEvent('bx.crm.entityeditor:oninit', (event, context) => { | |
let fields = context.model.getData() | |
console.log(fields) | |
}) | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
BX.addCustomEvent('Kanban.Column:onAddedToGrid', (e) => { | |
e.canAddItem = false | |
e.canEdit = false | |
e.droppable = false | |
e.dragTargetColumn = false | |
e.isTotalFrozen = true | |
e.grid.canAddColumn = false | |
e.grid.canEditColumn = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let codes = [ | |
'NAME', | |
'LAST_NAME', | |
'SECOND_NAME' | |
] | |
BX.addCustomEvent('BX.UI.EntityConfigurationManager:onInitialize', (e) => { | |
let id = e.getId() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Bitrix\Main\Loader; | |
use Bitrix\Tasks\CheckList\Task\TaskCheckListFacade; | |
Loader::IncludeModule('tasks'); | |
$taskId = 104; | |
$userId = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Склонение существительных после числительных. | |
* | |
* @param string $value Значение | |
* @param array $words Массив вариантов, например: array('товар', 'товара', 'товаров') | |
* @param bool $show Включает значение $value в результирующею строку | |
* @return string | |
*/ | |
public function num_word($value, $words, $show = true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -iname "*.wav"|while read fname; do | |
converted_name=${fname/.wav/.mp3} | |
if ! [ -f "$converted_name" ]; then | |
echo "does not exist [$converted_name]" | |
lame "$fname" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
\Bitrix\Main\Loader::includeModule('crm'); | |
$categoryID = 0; | |
$stages = \CCrmDeal::GetStages($categoryID); | |
$semanticStages = array_map(function($item) use ($categoryID){ | |
$stage = $item['STATUS_ID']; | |
$semanticTitle = \CCrmDeal::GetStageSemantics($stage, $categoryID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Emoji | |
{ | |
const EMOJI = [ | |
"\xF0\x9F\x91\xA8\xE2\x80\x8D\xE2\x9D\xA4\xEF\xB8\x8F\xE2\x80\x8D\xF0\x9F\x92\x8B\xE2\x80\x8D\xF0\x9F\x91\xA8", | |
"\xF0\x9F\x91\xA9\xE2\x80\x8D\xE2\x9D\xA4\xEF\xB8\x8F\xE2\x80\x8D\xF0\x9F\x92\x8B\xE2\x80\x8D\xF0\x9F\x91\xA9", | |
"\xF0\x9F\x91\xA8\xE2\x80\x8D\xF0\x9F\x91\xA9\xE2\x80\x8D\xF0\x9F\x91\xA6\xE2\x80\x8D\xF0\x9F\x91\xA6", | |
"\xF0\x9F\x91\xA8\xE2\x80\x8D\xF0\x9F\x91\xA8\xE2\x80\x8D\xF0\x9F\x91\xA7\xE2\x80\x8D\xF0\x9F\x91\xA6", | |
"\xF0\x9F\x91\xA8\xE2\x80\x8D\xF0\x9F\x91\xA9\xE2\x80\x8D\xF0\x9F\x91\xA7\xE2\x80\x8D\xF0\x9F\x91\xA6", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$users = \Bitrix\Main\UserTable::getList([ | |
"order" => [ | |
"RAND" => "asc" | |
], | |
'runtime' => array( | |
new \Bitrix\Main\Entity\ExpressionField('RAND', 'RAND()') | |
), | |
"limit" => 10 | |
])->fetchAll(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//\Bitrix\Main\Page\Asset::getInstance()->addJs('/bitrix/js/crm/activity_planner.min.js'); | |
var planner = new BX.Crm.Activity.Planner(); | |
planner.showEdit({ | |
ID : activityid | |
}); |