Alex Trofimov vor 7 Jahren
Ursprung
Commit
f37ac9c5b2

+ 2 - 1
install/sql/system.sql

@@ -1370,7 +1370,8 @@ CREATE TABLE `sys_injections` (
 INSERT INTO `sys_injections`(`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
 ('update_cache', 150, 'injection_head', 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:17:"get_cache_updater";s:6:"params";a:0:{}s:5:"class";s:19:"TemplStudioLauncher";}', 0, 1),
 ('sys_head', 0, 'injection_head', 'text', '', 0, 1),
-('sys_body', 0, 'injection_footer', 'text', '', 0, 1);
+('sys_body', 0, 'injection_footer', 'text', '', 0, 1),
+('sys_mobile_apps', 0, 'injection_head', 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:9:"injection";s:6:"params";a:0:{}s:5:"class";s:22:"TemplServiceMobileApps";}', 0, 1);
 
 -- --------------------------------------------------------
 

+ 17 - 0
modules/boonex/decorous/data/template/system/scripts/BxTemplServiceMobileApps.php

@@ -0,0 +1,17 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaTemplate UNA Template Classes
+ * @{
+ */
+
+/**
+ * @see BxBaseServiceMobileApps
+ */
+class BxTemplServiceMobileApps extends BxBaseServiceMobileApps
+{
+}
+
+/** @} */

+ 17 - 0
modules/boonex/ocean/data/template/system/scripts/BxTemplServiceMobileApps.php

@@ -0,0 +1,17 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaTemplate UNA Template Classes
+ * @{
+ */
+
+/**
+ * @see BxBaseServiceMobileApps
+ */
+class BxTemplServiceMobileApps extends BxBaseServiceMobileApps
+{
+}
+
+/** @} */

+ 17 - 0
modules/boonex/protean/data/template/system/scripts/BxTemplServiceMobileApps.php

@@ -0,0 +1,17 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaTemplate UNA Template Classes
+ * @{
+ */
+
+/**
+ * @see BxBaseServiceMobileApps
+ */
+class BxTemplServiceMobileApps extends BxBaseServiceMobileApps
+{
+}
+
+/** @} */

+ 27 - 0
template/mobile_apps_styles.html

@@ -0,0 +1,27 @@
+<style>
+html #bx-toolbar {
+    height:0 !important;
+}
+html .bx-menu-toolbar-padding {
+    padding-top:0 !important;
+}
+html #bx-toolbar-content {
+    display:none;
+}
+html .cd-side-nav,
+html .cd-main-content .content-wrapper {
+    padding-top:0;
+}
+html .cd-main-content .content-wrapper {
+    margin-left:0;
+}
+html .bx-sliding-menu-fullheight {
+    height:100%;
+}
+html  nav.cd-stretchy-nav {
+    display:none;
+}
+html #bx-footer-wrapper {
+    display:none;
+}
+</style>

+ 33 - 0
template/scripts/BxBaseServiceMobileApps.php

@@ -0,0 +1,33 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaBaseView UNA Base Representation Classes
+ * @{
+ */
+
+/**
+ * System services for mobile apps.
+ */
+class BxBaseServiceMobileApps extends BxDol
+{
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+    /**
+     * Get injection code required for mobile apps
+     * @return string with Styles and JS code
+     */
+    public function serviceInjection()
+    {
+        if (false === strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp')) 
+            return '';
+
+        return BxDolTemplate::getInstance()->parseHtmlByName('mobile_apps_styles.html', array());
+    }
+}
+
+/** @} */