AntonLV 7 lat temu
rodzic
commit
58bd9e1036

+ 6 - 5
modules/boonex/events/classes/BxEventsConfig.php

@@ -199,17 +199,18 @@ class BxEventsConfig extends BxBaseModProfileConfig
         );
 
         $this->_aJsClasses = array(
-        	'manage_tools' => 'BxEventsManageTools'
+            'entry' => 'BxEventsEntry',
+            'manage_tools' => 'BxEventsManageTools'
         );
 
         $this->_aJsObjects = array(
-        	'manage_tools' => 'oBxEventsManageTools'
+            'entry' => 'oBxEventsEntry',
+            'manage_tools' => 'oBxEventsManageTools'
         );
 
         $this->_aGridObjects = array(
-        	'common' => $this->CNF['OBJECT_GRID_COMMON'],
-        	'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
-        	
+            'common' => $this->CNF['OBJECT_GRID_COMMON'],
+            'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION']
         );
     }
 

+ 7 - 2
modules/boonex/events/classes/BxEventsFormEntry.php

@@ -112,6 +112,11 @@ class BxEventsFormEntry extends BxBaseModGroupsFormEntry
         }        
     }
 
+    function getCode($bDynamicMode = false)
+    {
+        return $this->_oModule->_oTemplate->getJsCode('entry') . parent::getCode($bDynamicMode);
+    }
+
     function initChecker ($aValues = array (), $aSpecificValues = array())
     {
         if (isset($aValues[$this->_oModule->_oConfig->CNF['FIELD_ID']]))
@@ -253,10 +258,10 @@ class BxEventsFormEntry extends BxBaseModGroupsFormEntry
     function addCssJs ()
     {
         if ((!isset($this->aParams['view_mode']) || !$this->aParams['view_mode']) && !self::$_isCssJsEventsAdded) {
-            $this->oTemplate->addJs('intervals.js');
+            $this->oTemplate->addJs(array('moment-timezone-with-data.js', 'entry.js', 'intervals.js'));
             $this->oTemplate->addCss('informer.css');
             self::$_isCssJsEventsAdded = true;
-        }   
+        }  
 
         parent::addCssJs ();
     }

+ 29 - 0
modules/boonex/events/js/entry.js

@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Events Events
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxEventsEntry(oOptions) {
+    this._sActionsUri = oOptions.sActionUri;
+    this._sActionsUrl = oOptions.sActionUrl;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxEventsEntry' : oOptions.sObjName;
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+
+    var $this = this;
+    $(document).ready(function() {
+        $this.init();
+    });
+}
+
+BxEventsEntry.prototype.init = function() {
+    $("[name = 'timezone']").val(moment.tz.guess());
+};
+
+/** @} */

Plik diff jest za duży
+ 632 - 0
plugins_public/moment-timezone-with-data.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików