Explorar el Código

Ticket #1249 - Disable addCssJs function in Objects like Vote, Report, etc.

AntonLV hace 8 años
padre
commit
1a95bdf56a

+ 2 - 0
install/sql/system.sql

@@ -4358,6 +4358,7 @@ INSERT INTO `sys_preloader`(`module`, `type`, `content`, `active`) VALUES
 ('system', 'js_system', 'jquery-ui/jquery.ui.position.min.js', 1),
 ('system', 'js_system', 'jquery.easing.js', 1),
 ('system', 'js_system', 'jquery.cookie.min.js', 1),
+('system', 'js_system', 'jquery.form.min.js', 1),
 ('system', 'js_system', 'spin.min.js', 1),
 ('system', 'js_system', 'moment-with-locales.min.js', 1),
 ('system', 'js_system', 'marka/marka.min.js', 1),
@@ -4368,6 +4369,7 @@ INSERT INTO `sys_preloader`(`module`, `type`, `content`, `active`) VALUES
 ('system', 'js_system', 'jquery.webForms.js', 1),
 ('system', 'js_system', 'jquery.dolPopup.js', 1),
 ('system', 'js_system', 'jquery.dolConverLinks.js', 1),
+('system', 'js_system', 'jquery.anim.js', 1),
 ('system', 'js_system', 'BxDolCmts.js', 1),
 ('system', 'js_system', 'BxDolFavorite.js', 1),
 ('system', 'js_system', 'BxDolFeature.js', 1),

+ 4 - 0
template/scripts/BxBaseCmts.php

@@ -32,8 +32,12 @@ class BxBaseCmts extends BxDolCmts
      */
     public function addCssJs ()
     {
+        /*
+         * TODO: Remove after testing (Ticket #1249)
+         * 
         $this->_oTemplate->addCss(array('cmts.css'));
         $this->_oTemplate->addJs(array('jquery.anim.js', 'jquery.form.min.js', 'BxDolCmts.js'));
+        */
 
         $oForm = BxDolForm::getObjectInstance($this->_sFormObject, $this->_sFormDisplayPost);
         $oForm->addCssJs();

+ 7 - 0
template/scripts/BxBaseFavorite.php

@@ -62,6 +62,9 @@ class BxBaseFavorite extends BxDolFavorite
             self::$_sTmplContentDoFavoriteLabel = $this->_oTemplate->getHtml('favorite_do_favorite_label.html');
     }
 
+    /*
+     * TODO: Remove after testing (Ticket #1249)
+     */
     public function addCssJs($bDynamicMode = false)
     {
     	if($bDynamicMode || $this->_bCssJsAdded)
@@ -91,6 +94,9 @@ class BxBaseFavorite extends BxDolFavorite
         );
         $sCode = $this->_sJsObjName . " = new " . $this->_sJsObjClass . "(" . json_encode($aParams) . ");";
 
+        /*
+         * TODO: Remove after testing (Ticket #1249)
+         * 
         if($bDynamicMode) {
 			$sCode = "var " . $this->_sJsObjName . " = null; 
 			$.getScript('" . bx_js_string($this->_oTemplate->getJsUrl('BxDolFavorite.js'), BX_ESCAPE_STR_APOS) . "', function(data, textStatus, jqxhr) {
@@ -102,6 +108,7 @@ class BxBaseFavorite extends BxDolFavorite
         	$sCode = "var " . $sCode;
 
         $this->addCssJs($bDynamicMode);
+        */
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }
 

+ 7 - 0
template/scripts/BxBaseFeature.php

@@ -59,6 +59,9 @@ class BxBaseFeature extends BxDolFeature
             self::$_sTmplContentDoFeatureLabel = $this->_oTemplate->getHtml('feature_do_feature_label.html');
     }
 
+    /*
+     * TODO: Remove after testing (Ticket #1249)
+     */
     public function addCssJs($bDynamicMode = false)
     {
     	if($bDynamicMode || $this->_bCssJsAdded)
@@ -88,6 +91,9 @@ class BxBaseFeature extends BxDolFeature
         );
         $sCode = $this->_sJsObjName . " = new " . $this->_sJsObjClass . "(" . json_encode($aParams) . ");";
 
+        /*
+         * TODO: Remove after testing (Ticket #1249)
+         *
         if($bDynamicMode) {
 			$sCode = "var " . $this->_sJsObjName . " = null; 
 			$.getScript('" . bx_js_string($this->_oTemplate->getJsUrl('BxDolFeature.js'), BX_ESCAPE_STR_APOS) . "', function(data, textStatus, jqxhr) {
@@ -99,6 +105,7 @@ class BxBaseFeature extends BxDolFeature
         	$sCode = "var " . $sCode;
 
         $this->addCssJs($bDynamicMode);
+        */
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }
 

+ 7 - 0
template/scripts/BxBaseReport.php

@@ -68,6 +68,9 @@ class BxBaseReport extends BxDolReport
             self::$_sTmplContentDoReportLabel = $this->_oTemplate->getHtml('report_do_report_label.html');
     }
 
+    /**
+     * TODO: Remove after testing (Ticket #1249)
+     */
     public function addCssJs($bDynamicMode = false)
     {
     	if($bDynamicMode || $this->_bCssJsAdded)
@@ -97,6 +100,9 @@ class BxBaseReport extends BxDolReport
         );
         $sCode = $this->_sJsObjName . " = new " . $this->_sJsObjClass . "(" . json_encode($aParams) . ");";
 
+        /*
+         * TODO: Remove after testing (Ticket #1249)
+         * 
         if($bDynamicMode) {
 			$sCode = "var " . $this->_sJsObjName . " = null; 
 			$.getScript('" . bx_js_string($this->_oTemplate->getJsUrl('BxDolReport.js'), BX_ESCAPE_STR_APOS) . "', function(data, textStatus, jqxhr) {
@@ -108,6 +114,7 @@ class BxBaseReport extends BxDolReport
         	$sCode = "var " . $sCode;
 
         $this->addCssJs($bDynamicMode);
+        */
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }
 

+ 7 - 0
template/scripts/BxBaseScore.php

@@ -67,6 +67,9 @@ class BxBaseScore extends BxDolScore
             self::$_sTmplContentDoVoteLabel = $this->_oTemplate->getHtml('score_do_vote_label.html');
     }
 
+    /*
+     * TODO: Remove after testing (Ticket #1249)
+     */
     public function addCssJs($bDynamicMode = false)
     {
     	if($bDynamicMode || $this->_bCssJsAdded)
@@ -99,6 +102,9 @@ class BxBaseScore extends BxDolScore
         );
         $sCode = $this->_sJsObjName . " = new BxDolScore(" . json_encode($aParamsJs) . ");";
 
+        /*
+         * TODO: Remove after testing (Ticket #1249)
+         *
         if($bDynamicMode) {
 			$sCode = "var " . $this->_sJsObjName . " = null; 
 			$.getScript('" . bx_js_string($this->_oTemplate->getJsUrl('BxDolScore.js'), BX_ESCAPE_STR_APOS) . "', function(data, textStatus, jqxhr) {
@@ -110,6 +116,7 @@ class BxBaseScore extends BxDolScore
         	$sCode = "var " . $sCode;
 
         $this->addCssJs($bDynamicMode);
+        */
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }
 

+ 7 - 0
template/scripts/BxBaseView.php

@@ -65,6 +65,9 @@ class BxBaseView extends BxDolView
         $this->_sTmplNameByList = 'view_by_list.html';
     }
 
+    /*
+     * TODO: Remove after testing (Ticket #1249)
+     */
     public function addCssJs($bDynamicMode = false)
     {
     	if($bDynamicMode || $this->_bCssJsAdded)
@@ -94,6 +97,9 @@ class BxBaseView extends BxDolView
         );
         $sCode = $this->_sJsObjName . " = new BxDolView(" . json_encode($aParams) . ");";
 
+        /*
+         * TODO: Remove after testing (Ticket #1249)
+         *
         if($bDynamicMode) {
 			$sCode = "var " . $this->_sJsObjName . " = null; 
 			$.getScript('" . bx_js_string($this->_oTemplate->getJsUrl('BxDolView.js'), BX_ESCAPE_STR_APOS) . "', function(data, textStatus, jqxhr) {
@@ -105,6 +111,7 @@ class BxBaseView extends BxDolView
         	$sCode = "var " . $sCode;
 
         $this->addCssJs($bDynamicMode);
+        */
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }
 

+ 7 - 0
template/scripts/BxBaseVote.php

@@ -79,6 +79,9 @@ class BxBaseVote extends BxDolVote
             self::$_sTmplContentDoVoteLikesLabel = $this->_oTemplate->getHtml('vote_do_vote_likes_label.html');
     }
 
+    /*
+     * TODO: Remove after testing (Ticket #1249)
+     */
     public function addCssJs($bDynamicMode = false)
     {
     	if($bDynamicMode || $this->_bCssJsAdded)
@@ -109,6 +112,9 @@ class BxBaseVote extends BxDolVote
         );
         $sCode = $this->_sJsObjName . " = new BxDolVote(" . json_encode($aParams) . ");";
 
+        /*
+         * TODO: Remove after testing (Ticket #1249)
+         *
         if($bDynamicMode) {
 			$sCode = "var " . $this->_sJsObjName . " = null; 
 			$.getScript('" . bx_js_string($this->_oTemplate->getJsUrl('BxDolVote.js'), BX_ESCAPE_STR_APOS) . "', function(data, textStatus, jqxhr) {
@@ -120,6 +126,7 @@ class BxBaseVote extends BxDolVote
         	$sCode = "var " . $sCode;
 
         $this->addCssJs($bDynamicMode);
+        */
         return $this->_oTemplate->_wrapInTagJsCode($sCode);
     }