Przeglądaj źródła

#140 - System classes auto-loader: Minor fixes in usage.

AntonLV 11 lat temu
rodzic
commit
cb3dc9e7f1

+ 1 - 1
studio/js/builder_page.js

@@ -175,7 +175,7 @@ BxDolStudioBuilderPage.prototype.deleteBlockImage = function(iId) {
 };
 };
 
 
 BxDolStudioBuilderPage.prototype.onChangeVisibleFor = function(oSelect) {
 BxDolStudioBuilderPage.prototype.onChangeVisibleFor = function(oSelect) {
-	$('#bx-form-element-visible_for_levels').bx_anim($(oSelect).val() == 'all' ? 'hide' : 'show', this.sAnimationEffect, this.iAnimationSpeed);
+	$(oSelect).parents('form:first').find('#bx-form-element-visible_for_levels').bx_anim($(oSelect).val() == 'all' ? 'hide' : 'show', this.sAnimationEffect, this.iAnimationSpeed);
 };
 };
 
 
 BxDolStudioBuilderPage.prototype.onEditBlock = function(oData) {
 BxDolStudioBuilderPage.prototype.onEditBlock = function(oData) {

+ 2 - 0
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -573,6 +573,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
         if(empty($aBlock) || !is_array($aBlock))
         if(empty($aBlock) || !is_array($aBlock))
             return array('msg' => _t('_adm_bp_err_block_not_found'));
             return array('msg' => _t('_adm_bp_err_block_not_found'));
 
 
+		bx_import('BxDolStudioUtils');
         $aForm = array(
         $aForm = array(
             'form_attrs' => array(
             'form_attrs' => array(
                 'id' => 'adm-bp-block-edit',
                 'id' => 'adm-bp-block-edit',
@@ -994,6 +995,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
                 )
                 )
             );
             );
         else
         else
+        	bx_import('BxDolStudioUtils');
             $aInputs = array(
             $aInputs = array(
                 'visible_for' => array(
                 'visible_for' => array(
                     'type' => 'select',
                     'type' => 'select',

+ 1 - 0
studio/template/scripts/BxBaseStudioFormsFields.php

@@ -166,6 +166,7 @@ class BxBaseStudioFormsFields extends BxDolStudioFormsFields
             exit;
             exit;
         }
         }
 
 
+        bx_import('BxDolStudioUtils');
         $aForm = array(
         $aForm = array(
             'form_attrs' => array(
             'form_attrs' => array(
                 'id' => 'adm-form-field-visibility',
                 'id' => 'adm-form-field-visibility',

+ 1 - 0
studio/template/scripts/BxBaseStudioNavigationItems.php

@@ -222,6 +222,7 @@ class BxBaseStudioNavigationItems extends BxDolStudioNavigationItems
             exit;
             exit;
         }
         }
 
 
+		bx_import('BxDolStudioUtils');
         $aForm = array(
         $aForm = array(
             'form_attrs' => array(
             'form_attrs' => array(
                 'id' => 'adm-nav-item-create',
                 'id' => 'adm-nav-item-create',