Commit 4845311e authored by Виталий Мурашко's avatar Виталий Мурашко

Merge branch 'master' of http://git.task-on.com/ktask/task-on.com

Conflicts:
	common/modules/users/models/User.php
parents 17f6666c 3f58b15f
...@@ -101,17 +101,23 @@ class UnisenderAPI { ...@@ -101,17 +101,23 @@ class UnisenderAPI {
} }
/** /**
* @param $campaign_id
* @param $message_id * @param $message_id
* @return array * @param $email
* @return array|mixed
*/ */
public function getMessageStatuses($message_id){ public function getMessageStatuses($campaign_id, $message_id, $email){
$this->statuses = $this->callMethod( $result = $this->callMethod(
'checkEmail', 'getCampaignDeliveryStats',
[ [
'email_id' => $message_id 'campaign_id' => $campaign_id
] ]
); );
$this->statuses = Json::decode($this->statuses); if (array_key_exists('result', $result) && array_key_exists('letter_id', $result['result']) && $result['result']['letter_id']==$message_id) {
foreach($result['result']['data'] as $data) {
$this->statuses[] = $data[1];
}
}
return $this->statuses; return $this->statuses;
} }
...@@ -119,8 +125,8 @@ class UnisenderAPI { ...@@ -119,8 +125,8 @@ class UnisenderAPI {
* @return bool * @return bool
*/ */
public function isLinkVisited(){ public function isLinkVisited(){
if (array_key_exists('result', $this->statuses) && array_key_exists('status', $this->statuses['result'])) { foreach($this->statuses as $status) {
if ($this->statuses['result']['status']==ConditionBase::MESSAGE_LINK_VISITED || $this->statuses['result']['status']==ConditionBase::MESSAGE_UNSUBSCRIBED || $this->statuses['result']['status']==ConditionBase::MESSAGE_SPAM_FOLDER) if ($status==ConditionBase::MESSAGE_LINK_VISITED || $status==ConditionBase::MESSAGE_UNSUBSCRIBED || $status==ConditionBase::MESSAGE_SPAM_FOLDER)
return true; return true;
} }
return false; return false;
...@@ -130,8 +136,8 @@ class UnisenderAPI { ...@@ -130,8 +136,8 @@ class UnisenderAPI {
* @return bool * @return bool
*/ */
public function isUnsubscribed(){ public function isUnsubscribed(){
if (array_key_exists('result', $this->statuses) && array_key_exists('status', $this->statuses['result'])) { foreach($this->statuses as $status) {
if ($this->statuses['result']['status']==ConditionBase::MESSAGE_UNSUBSCRIBED) if ($status==ConditionBase::MESSAGE_UNSUBSCRIBED)
return true; return true;
} }
return false; return false;
...@@ -141,8 +147,8 @@ class UnisenderAPI { ...@@ -141,8 +147,8 @@ class UnisenderAPI {
* @return bool * @return bool
*/ */
public function isReaded(){ public function isReaded(){
if (array_key_exists('result', $this->statuses) && array_key_exists('status', $this->statuses['result'])) { foreach($this->statuses as $status) {
if ($this->statuses['result']['status']==ConditionBase::MESSAGE_READ || $this->statuses['result']['status']==ConditionBase::MESSAGE_UNSUBSCRIBED || $this->statuses['result']['status']==ConditionBase::MESSAGE_SPAM_FOLDER) if ($status==ConditionBase::MESSAGE_READ || $status==ConditionBase::MESSAGE_SPAM_FOLDER || $status==ConditionBase::MESSAGE_UNSUBSCRIBED)
return true; return true;
} }
return false; return false;
...@@ -152,8 +158,8 @@ class UnisenderAPI { ...@@ -152,8 +158,8 @@ class UnisenderAPI {
* @return bool * @return bool
*/ */
public function isDelivered(){ public function isDelivered(){
if (array_key_exists('result', $this->statuses) && array_key_exists('status', $this->statuses['result'])) { foreach($this->statuses as $status) {
if ($this->statuses['result']['status']==ConditionBase::MESSAGE_DELIVERED || $this->statuses['result']['status']==ConditionBase::MESSAGE_LINK_VISITED || $this->statuses['result']['status']==ConditionBase::MESSAGE_READ || $this->statuses['result']['status']==ConditionBase::MESSAGE_UNSUBSCRIBED || $this->statuses['result']['status']==ConditionBase::MESSAGE_SPAM_FOLDER) if ($status==ConditionBase::MESSAGE_DELIVERED || $status==ConditionBase::MESSAGE_SPAM_FOLDER || $status==ConditionBase::MESSAGE_LINK_VISITED || $status==ConditionBase::MESSAGE_UNSUBSCRIBED || $status==ConditionBase::MESSAGE_READ)
return true; return true;
} }
return false; return false;
......
...@@ -47,6 +47,11 @@ class SearchBid extends Bid ...@@ -47,6 +47,11 @@ class SearchBid extends Bid
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,
'sort' => [
'defaultOrder' => [
'created_at' => SORT_DESC
]
]
]); ]);
$this->load($params); $this->load($params);
......
<?php <?php
use yii\helpers\Html; use yii\helpers\Html;
use yii\helpers\Url;
use common\modules\bids\models\BidFile; use common\modules\bids\models\BidFile;
?> ?>
...@@ -27,6 +28,10 @@ Email: <?=$model->email?><br> ...@@ -27,6 +28,10 @@ Email: <?=$model->email?><br>
<?php if($session) : ?> <?php if($session) : ?>
<?php $last = $session->lastUrl; ?>
Запрос отправлен со страницы: <a href="<?=Url::to([$last->url], true)?>"><?=Url::to([$last->url], true)?></a>
<hr> <hr>
<?php if($session->utmUrls) : ?> <?php if($session->utmUrls) : ?>
...@@ -46,6 +51,10 @@ Email: <?=$model->email?><br> ...@@ -46,6 +51,10 @@ Email: <?=$model->email?><br>
<?php endforeach; ?> <?php endforeach; ?>
<?php else : ?>
<h3>Данных UTM нет</h3>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
\ No newline at end of file
...@@ -51,6 +51,11 @@ class SearchSession extends Session ...@@ -51,6 +51,11 @@ class SearchSession extends Session
$dataProvider = new ActiveDataProvider([ $dataProvider = new ActiveDataProvider([
'query' => $query, 'query' => $query,
'sort' => [
'defaultOrder' => [
'created_at' => SORT_DESC
]
]
]); ]);
$this->load($params); $this->load($params);
...@@ -61,16 +66,20 @@ class SearchSession extends Session ...@@ -61,16 +66,20 @@ class SearchSession extends Session
return $dataProvider; return $dataProvider;
} }
$query->joinWith('urls'); $query->select(['*', 'urls.time']);
$query->select(['*', new \yii\db\Expression("SUM(".SessionUrl::tableName().".updated_at - ".SessionUrl::tableName().".created_at) as time")]); $queryUrl = SessionUrl::find()
->select('session_id, url, SUM('.SessionUrl::tableName().'.updated_at - '.SessionUrl::tableName().'.created_at) as time')
->andWhere(['url' => $this->blogUrl])
->groupBy('session_id');
$query->leftJoin(['urls' => $queryUrl], 'urls.session_id = id');
// grid filtering conditions // grid filtering conditions
$query->andFilterWhere([ $query->andFilterWhere([
'id' => $this->id, 'id' => $this->id,
'user_id' => $this->user_id, 'user_id' => $this->user_id,
'created_at' => $this->created_at, 'created_at' => $this->created_at
SessionUrl::tableName() . '.url' => $this->blogUrl
]); ]);
$query->andFilterWhere(['like', 'PHPSESSID', $this->PHPSESSID]) $query->andFilterWhere(['like', 'PHPSESSID', $this->PHPSESSID])
......
...@@ -23,16 +23,18 @@ use yii\helpers\Url; ...@@ -23,16 +23,18 @@ use yii\helpers\Url;
<?php foreach ($model->postTags as $tag) : ?> <?php foreach ($model->postTags as $tag) : ?>
<a href="<?=$tag->url;?>"># <?=$tag->name?></a> <a href="<?=$tag->url;?>">#<?=$tag->name?></a>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<div class="article_short_txt"> <div class="article_short_txt">
<div class="preview-image">
<?php if($model->preview) : <?php if($model->preview) :
echo Html::img($model->preview); echo Html::img($model->preview);
endif; ?> endif; ?>
</div>
<?=$model->lang->cutText(650)?> <?=$model->lang->cutText(650)?>
</div> </div>
......
...@@ -30,16 +30,18 @@ use yii\helpers\Url; ...@@ -30,16 +30,18 @@ use yii\helpers\Url;
<?php foreach ($model->postTags as $tag) : ?> <?php foreach ($model->postTags as $tag) : ?>
<a href="<?=$tag->url;?>"># <?=$tag->name?></a> <a href="<?=$tag->url;?>">#<?=$tag->name?></a>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
<div class="article_short_txt"> <div class="article_short_txt">
<div class="preview-image">
<?php if($model->preview) : <?php if($model->preview) :
echo Html::img($model->preview); echo Html::img($model->preview);
endif; ?> endif; ?>
</div>
<?=$model->lang->text?> <?=$model->lang->text?>
</div> </div>
......
...@@ -100,4 +100,12 @@ class Session extends \common\components\ActiveRecordModel ...@@ -100,4 +100,12 @@ class Session extends \common\components\ActiveRecordModel
{ {
return $this->hasMany(SessionUrl::className(), ['session_id' => 'id'])->where(['utm' => 1]); return $this->hasMany(SessionUrl::className(), ['session_id' => 'id'])->where(['utm' => 1]);
} }
/**
* @return \yii\db\ActiveQuery
*/
public function getLastUrl()
{
return $this->hasOne(SessionUrl::className(), ['session_id' => 'id'])->orderBy(['created_at' => SORT_DESC]);
}
} }
...@@ -2,12 +2,22 @@ ...@@ -2,12 +2,22 @@
namespace common\modules\testings\models; namespace common\modules\testings\models;
use common\modules\triggers\components\conditions\conditions\UserSuccessfullyCompletedTheTest;
use common\modules\triggers\components\conditions\conditions\UserUnsuccessfullyCompletedTheTest;
use common\modules\triggers\models\TriggerCondition;
use common\modules\triggers\models\TriggerTrigger;
use Yii; use Yii;
use yii\behaviors\TimestampBehavior; use yii\behaviors\TimestampBehavior;
use yii\db\Expression; use yii\db\Expression;
use common\modules\users\models\User; use common\modules\users\models\User;
/**
* Class Passing
* @package common\modules\testings\models
*
* @property integer $passed
*/
class Passing extends \common\components\ActiveRecordModel class Passing extends \common\components\ActiveRecordModel
{ {
const PAGE_SIZE = 10; const PAGE_SIZE = 10;
...@@ -210,4 +220,42 @@ class Passing extends \common\components\ActiveRecordModel ...@@ -210,4 +220,42 @@ class Passing extends \common\components\ActiveRecordModel
return true; return true;
} }
public function afterSave($insert, $changedAttributes)
{
parent::afterSave($insert, $changedAttributes);
$this->initTriggerByTestFinish(['email' => Yii::$app->user->identity->email]);
}
/**
* @param array $params
* @return bool
*/
public function initTriggerByTestFinish($params=array()) {
/** @var TriggerTrigger[] $actualTriggers */
$actualTriggers = TriggerTrigger::getActualTriggers();
foreach($actualTriggers as $trigger) {
$exists = TriggerCondition::find()->where(['trigger_id'=>$trigger->id, 'condition_id'=>(($this->passed==1) ? UserSuccessfullyCompletedTheTest::CONDITION_ID : UserUnsuccessfullyCompletedTheTest::CONDITION_ID)])->exists();
$count = TriggerCondition::find()->where(['trigger_id'=>$trigger->id])->count();
// Добавляем в расписание срабатывание триггера завершения теста только при условии что у оно триггера есть и оно там одно
if ($exists===true && $count==1) {
$init = $trigger->initAction($params);
if ($init===true) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, Yii::$app->urlManager->createAbsoluteUrl('/triggers/default/rechecktriggers'));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (!curl_exec($curl)) {
$this->addError('passed', curl_error($curl));
return false;
}
return true;
} else {
$this->addError('passed', $init);
return false;
}
}
}
return true;
}
} }
...@@ -21,7 +21,7 @@ class CheckEmailToReading extends ConditionBase implements ConditionInterface { ...@@ -21,7 +21,7 @@ class CheckEmailToReading extends ConditionBase implements ConditionInterface {
} }
/** /**
* @param $message * @param \common\modules\triggers\models\TriggerSchedule $message
* @return bool * @return bool
*/ */
public function check($message){ public function check($message){
...@@ -29,7 +29,7 @@ class CheckEmailToReading extends ConditionBase implements ConditionInterface { ...@@ -29,7 +29,7 @@ class CheckEmailToReading extends ConditionBase implements ConditionInterface {
// Создаем объект унисендера // Создаем объект унисендера
$sender=new UnisenderAPI(); $sender=new UnisenderAPI();
// Делаем запрос на получение статуса сообщения // Делаем запрос на получение статуса сообщения
$sender->getMessageStatuses($message->message_id); $sender->getMessageStatuses($message->campaign_id, $message->message_id, $message->email);
return $sender->isReaded(); return $sender->isReaded();
} }
return true; return true;
......
...@@ -5,13 +5,12 @@ namespace common\modules\triggers\components\conditions\conditions; ...@@ -5,13 +5,12 @@ namespace common\modules\triggers\components\conditions\conditions;
use common\components\UnisenderAPI; use common\components\UnisenderAPI;
use common\modules\triggers\components\conditions\vendor\ConditionBase; use common\modules\triggers\components\conditions\vendor\ConditionBase;
use common\modules\triggers\components\conditions\vendor\ConditionInterface; use common\modules\triggers\components\conditions\vendor\ConditionInterface;
use common\modules\users\models\User;
class CheckUserToRegistration extends ConditionBase implements ConditionInterface{ class CheckUserToRegistration extends ConditionBase implements ConditionInterface{
const CONDITION_ID = 6; const CONDITION_ID = 6;
public $recall=false; public $name = 'Пользователь зарегистрировался';
public $name = 'Пользователь зарегистрировался (Игнорируется оператором "И")';
/** /**
* @param null|string $conditionName * @param null|string $conditionName
...@@ -26,6 +25,7 @@ class CheckUserToRegistration extends ConditionBase implements ConditionInterfac ...@@ -26,6 +25,7 @@ class CheckUserToRegistration extends ConditionBase implements ConditionInterfac
* @return bool * @return bool
*/ */
public function check($message){ public function check($message){
return true; $exists = User::find()->where(['email' => $message->email])->exists();
return $exists;
} }
} }
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: shakarim
* Date: 3/2/16
* Time: 11:36 PM
*/
namespace common\modules\triggers\components\conditions\conditions;
use common\modules\triggers\components\conditions\vendor\ConditionBase;
use common\modules\triggers\components\conditions\vendor\ConditionInterface;
class UserSuccessfullyCompletedTheTest extends ConditionBase implements ConditionInterface {
const CONDITION_ID = 7;
public $name = 'Пользователь успешно сдал тест (игнорируется оператором И)';
/**
* @param null|string $conditionName
* @return $this mixed
*/
public static function init($conditionName=__CLASS__){
return parent::init($conditionName);
}
/**
* @param $message
* @return bool
*/
public function check($message){
return false;
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: shakarim
* Date: 3/2/16
* Time: 11:36 PM
*/
namespace common\modules\triggers\components\conditions\conditions;
use common\modules\triggers\components\conditions\vendor\ConditionBase;
use common\modules\triggers\components\conditions\vendor\ConditionInterface;
class UserUnsuccessfullyCompletedTheTest extends ConditionBase implements ConditionInterface {
const CONDITION_ID = 8;
public $name = 'Пользователь не сдал тест (игнорируется оператором И)';
/**
* @param null|string $conditionName
* @return $this mixed
*/
public static function init($conditionName=__CLASS__){
return parent::init($conditionName);
}
/**
* @param $message
* @return bool
*/
public function check($message){
return false;
}
}
\ No newline at end of file
...@@ -12,6 +12,12 @@ return [ ...@@ -12,6 +12,12 @@ return [
'check-user-to-registration' => [ 'check-user-to-registration' => [
'class' => 'common\modules\triggers\components\conditions\conditions\CheckUserToRegistration', 'class' => 'common\modules\triggers\components\conditions\conditions\CheckUserToRegistration',
], ],
'user-successfully-completed-the-test' => [
'class' => 'common\modules\triggers\components\conditions\conditions\UserSuccessfullyCompletedTheTest',
],
'user-unsuccessfully-completed-the-test' => [
'class' => 'common\modules\triggers\components\conditions\conditions\UserUnsuccessfullyCompletedTheTest',
],
'check-clicking-on-the-link' => [ 'check-clicking-on-the-link' => [
'class' => 'common\modules\triggers\components\conditions\conditions\CheckClickingOnTheLink', 'class' => 'common\modules\triggers\components\conditions\conditions\CheckClickingOnTheLink',
'params' => [ 'params' => [
......
...@@ -130,7 +130,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -130,7 +130,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
public function rules() public function rules()
{ {
return [ return [
/*[['email'], 'required', 'on' => [ [['email'], 'required', 'on' => [
self::SCENARIO_ACTIVATE_REQUEST, self::SCENARIO_ACTIVATE_REQUEST,
self::SCENARIO_CHANGE_PASSWORD_REQUEST, self::SCENARIO_CHANGE_PASSWORD_REQUEST,
self::SCENARIO_CREATE, self::SCENARIO_CREATE,
...@@ -140,7 +140,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -140,7 +140,7 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
self::SCENARIO_UPDATE, self::SCENARIO_UPDATE,
self::SCENARIO_SEND_NEW_PASSWORD, self::SCENARIO_SEND_NEW_PASSWORD,
self::SCENARIO_RECOVER_PASSWORD self::SCENARIO_RECOVER_PASSWORD
], 'message' => 'Пожалуйста, укажите корректный e-mail адрес'],*/ ], 'message' => 'Пожалуйста, укажите корректный e-mail адрес'],
[['send_email'], 'safe'], [['send_email'], 'safe'],
[['fio','name', 'surname'], 'safe', 'on' => [ [['fio','name', 'surname'], 'safe', 'on' => [
self::SCENARIO_CREATE, self::SCENARIO_CREATE,
...@@ -184,11 +184,11 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -184,11 +184,11 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
self::SCENARIO_SEND_NEW_PASSWORD, self::SCENARIO_SEND_NEW_PASSWORD,
self::SCENARIO_LOGIN, self::SCENARIO_LOGIN,
]],*/ ]],*/
/*[['email'], 'unique','on' => [ [['email'], 'unique','on' => [
self::SCENARIO_REGISTRATION, self::SCENARIO_REGISTRATION,
self::SCENARIO_CREATE, self::SCENARIO_CREATE,
], 'message' => 'Данный email уже есть'],*/ ]],
//[['email'], '\common\components\validators\RuEmailValidator'], [['email'], '\common\components\validators\RuEmailValidator'],
[['password_c'], 'compare', 'compareAttribute' => 'password', 'on' => [ [['password_c'], 'compare', 'compareAttribute' => 'password', 'on' => [
self::SCENARIO_REGISTRATION, self::SCENARIO_REGISTRATION,
self::SCENARIO_CHANGE_PASSWORD, self::SCENARIO_CHANGE_PASSWORD,
...@@ -204,11 +204,11 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -204,11 +204,11 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
[['is_deleted'], 'integer','integerOnly' => true], [['is_deleted'], 'integer','integerOnly' => true],
//array('phone', 'integer'), //array('phone', 'integer'),
[['fio'], 'string','min' => 2], [['fio'], 'string','min' => 2],
//[['email'], 'string','max' => 200], [['email'], 'string','max' => 200],
[['source'], 'string','max' => 50], [['source'], 'string','max' => 50],
[['status'], '\yii\validators\RangeValidator', 'range' => ['active','new','blocked'], 'allowArray' => true], [['status'], '\yii\validators\RangeValidator', 'range' => ['active','new','blocked'], 'allowArray' => true],
[['activate_code'], 'safe'], [['activate_code'], 'safe'],
//[['email'], 'filter','filter' => 'trim'], [['email'], 'filter','filter' => 'trim'],
[['csv_file'], 'file', 'mimeTypes' => 'csv', 'on' => [ [['csv_file'], 'file', 'mimeTypes' => 'csv', 'on' => [
self::SCENARIO_CSV_IMPORT, self::SCENARIO_CSV_IMPORT,
]], ]],
...@@ -518,13 +518,19 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -518,13 +518,19 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
public function validate($attributeNames = null, $clearErrors = true) { public function validate($attributeNames = null, $clearErrors = true) {
if (!parent::validate($attributeNames = null, $clearErrors = true)) if (!parent::validate($attributeNames = null, $clearErrors = true))
return false; return false;
/*if ($this->scenario===self::SCENARIO_REGISTRATION) {
if ($this->scenario===self::SCENARIO_REGISTRATION || $this->scenario===self::SCENARIO_SOCIAL_REGISTRATION) {
if (!$this->afterRegistration(['email' => $this->email, 'user_fio' => $this->getFio()])) if (!$this->afterRegistration(['email' => $this->email, 'user_fio' => $this->getFio()]))
return false; return false;
}*/ }
return true; return true;
} }
public function afterDelete()
{
TriggerSchedule::deleteAll(['email' => $this->email]);
}
public function getFio() public function getFio()
{ {
$result = $this->name; $result = $this->name;
...@@ -577,7 +583,9 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter ...@@ -577,7 +583,9 @@ class User extends \common\components\ActiveRecordModel implements IdentityInter
$actualTriggers = TriggerTrigger::getActualTriggers(); $actualTriggers = TriggerTrigger::getActualTriggers();
foreach($actualTriggers as $trigger) { foreach($actualTriggers as $trigger) {
$exists = TriggerCondition::find()->where(['trigger_id'=>$trigger->id, 'condition_id'=>CheckUserToRegistration::CONDITION_ID])->exists(); $exists = TriggerCondition::find()->where(['trigger_id'=>$trigger->id, 'condition_id'=>CheckUserToRegistration::CONDITION_ID])->exists();
if ($exists===true) { $count = TriggerCondition::find()->where(['trigger_id'=>$trigger->id])->count();
// Добавляем в расписание срабатывание триггера регистрации только при условии что у триггера условие регистрации есть и оно там одно
if ($exists===true && $count==1) {
$init = $trigger->initAction($params); $init = $trigger->initAction($params);
if ($init===true) { if ($init===true) {
$curl = curl_init(); $curl = curl_init();
......
...@@ -128,4 +128,8 @@ FileUploadBundle::register($this); ...@@ -128,4 +128,8 @@ FileUploadBundle::register($this);
</div> </div>
</footer> </footer>
<div class="up-button-container">
<div class="up-button"></div>
</div>
<?php echo $this->render('block/callback'); ?> <?php echo $this->render('block/callback'); ?>
\ No newline at end of file
...@@ -15,3 +15,7 @@ ...@@ -15,3 +15,7 @@
</div> </div>
</div> </div>
</footer> </footer>
<div class="up-button-container">
<div class="up-button"></div>
</div>
\ No newline at end of file
...@@ -31,4 +31,8 @@ ...@@ -31,4 +31,8 @@
</div> </div>
</footer> </footer>
<div class="up-button-container">
<div class="up-button"></div>
</div>
<?php echo $this->render('block/callback'); ?> <?php echo $this->render('block/callback'); ?>
\ No newline at end of file
...@@ -264,9 +264,37 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow ...@@ -264,9 +264,37 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
.subsc_blog { .subsc_blog {
margin-top: 50px; margin-top: 50px;
} }
.language-markup { pre code {
font-size: 14px; font-size: 14px;
} }
.article_short_txt ol li {
line-height: 30px;
}
.preview-image {
text-align: center;
}
.up-button {
background: url(../images/up-button.png) no-repeat left top;
width: 56px;
height: 72px;
position: absolute;
left: -80px;
top: 0;
cursor: pointer;
display: none;
}
.up-button:hover {
background-position: right top;
}
.up-button-container {
position: fixed;
width: 970px;
height: 0px;
bottom: 150px;
left: 50%;
margin-left: -485px;
z-index: 2;
}
/* ------------ BLOG MODAL ------------------ */ /* ------------ BLOG MODAL ------------------ */
...@@ -467,6 +495,9 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow ...@@ -467,6 +495,9 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
.gen_mail_top a.toggle_bottom { .gen_mail_top a.toggle_bottom {
margin-top: 50px; margin-top: 50px;
} }
.article_short_txt iframe {
width: 100%;
}
} }
@media (max-width: 768px) { @media (max-width: 768px) {
...@@ -514,6 +545,9 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow ...@@ -514,6 +545,9 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
.subsc_form input, .subsc_blog_form input { .subsc_form input, .subsc_blog_form input {
width: 100%; width: 100%;
} }
pre code {
font-size: 12px;
}
} }
@media only screen and (max-width: 479px) and (min-width: 320px) { @media only screen and (max-width: 479px) and (min-width: 320px) {
...@@ -527,3 +561,12 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow ...@@ -527,3 +561,12 @@ a.toggle_bottom:hover .icon-arrowDown2:after, a.toggle_bottom:active .icon-arrow
display: none; display: none;
} }
} }
@media only screen and (max-width: 479px) {
.article_short_view {
display: none;
}
.article_short_tags {
margin-top: 0;
}
}
\ No newline at end of file
$(document).ready(function() { $(document).ready(function() {
$(window).scroll(function(){
if($(window).scrollTop() > 700)
{
$('.up-button').show();
}
else
{
$('.up-button').hide();
}
});
$('.up-button').click(function(){
$("html, body").animate({ scrollTop: 0 }, "slow");
});
$("a.toggle_bottom").click(function() { $("a.toggle_bottom").click(function() {
var a = $(this); var a = $(this);
$("html, body").animate({ scrollTop: $(a.attr('href')).position().top - 50 }, "slow"); $("html, body").animate({ scrollTop: $(a.attr('href')).position().top - 50 }, "slow");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment