Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Jan 17, 2020
1 parent 2a2243e commit b4c4934
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/assets/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
namespace skeeks\sx\assets;

use yii\helpers\Json;
/**
* Class Core
* @package skeeks\sx\assets
Expand All @@ -25,9 +26,13 @@ public function registerAssetFiles($view)
{
parent::registerAssetFiles($view);

$jsData = Json::encode([
'blocker_wait_text' => \Yii::t('app', 'Подождите...')
]);

$view->registerJs(<<<JS
(function(sx, $, _){
sx.init({});
sx.init({$jsData});
})(sx, sx.$, sx._);
JS
);
Expand Down
4 changes: 3 additions & 1 deletion src/assets/js/components/blocker/BlockerJqueryUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
{
this.applyParentMethod(sx.classes._Blocker, '_init', []);

var wait_text = sx.Config.get('blocker_wait_text');

this.defaultOpts({
message: "<div style='padding: 5px;'>Подождите...</div>",
message: "<div style='padding: 5px;'>" + wait_text + "</div>",
css: {
border: '1px solid #108acb',
padding: '10px;',
Expand Down

0 comments on commit b4c4934

Please sign in to comment.