当前位置: 首页>>代码示例>>PHP>>正文


PHP Util::addscript方法代码示例

本文整理汇总了PHP中OCP\Util::addscript方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::addscript方法的具体用法?PHP Util::addscript怎么用?PHP Util::addscript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OCP\Util的用法示例。


在下文中一共展示了Util::addscript方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 /**
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     \OCP\Util::addscript('core', 'tags');
     \OCP\Util::addStyle($this->appName, 'style');
     \OCP\Util::addStyle($this->appName, 'jquery.Jcrop');
     \OCP\Util::addStyle($this->appName, '3rdparty/fontello/css/animation');
     \OCP\Util::addStyle($this->appName, '3rdparty/fontello/css/fontello');
     \OCP\Util::addStyle($this->appName, '3rdparty/jquery.webui-popover');
     \OCP\Util::addscript($this->appName, 'app');
     \OCP\Util::addscript($this->appName, '3rdparty/jquery.webui-popover');
     \OCP\Util::addscript($this->appName, 'settings');
     \OCP\Util::addscript($this->appName, 'loader');
     \OCP\Util::addscript($this->appName, 'jquery.scrollTo.min');
     \OCP\Util::addscript($this->appName, 'jquery.nicescroll.min');
     \OCP\Util::addscript('files', 'jquery.fileupload');
     \OCP\Util::addscript($this->appName, 'jquery.Jcrop');
     $iosSupport = $this->configInfo->getUserValue($this->userId, $this->appName, 'iossupport');
     $maxUploadFilesize = \OCP\Util::maxUploadFilesize('/');
     $addressbooks = Addressbook::all($this->userId);
     if (count($addressbooks) == 0) {
         Addressbook::addDefault($this->userId);
         $addressbooks = Addressbook::all($this->userId);
     }
     //ContactsApp::addingDummyContacts(50);
     $params = ['uploadMaxFilesize' => $maxUploadFilesize, 'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize), 'iossupport' => $iosSupport, 'addressbooks' => $addressbooks];
     $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
     $csp->addAllowedImageDomain('*');
     $csp->addAllowedFrameDomain('*');
     $response = new TemplateResponse($this->appName, 'index');
     $response->setContentSecurityPolicy($csp);
     $response->setParams($params);
     return $response;
 }
开发者ID:sahne123,项目名称:contactsplus,代码行数:37,代码来源:pagecontroller.php

示例2: index

 /**
  * CAUTION: the @Stuff turn off security checks, for this page no admin is
  *          required and no CSRF check. If you don't know what CSRF is, read
  *          it up in the docs or you might create a security hole. This is
  *          basically the only required method to add this exemption, don't
  *          add it to any other method if you don't exactly know what it does
  *
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     $conf = \OCP\CONFIG::getUserValue(\OCP\User::getUser(), 'firstpassmanrun', 'show', 1);
     $params = array('user' => $this->userId);
     $conf = $this->userId === 'test' ? 1 : $conf;
     if ($conf == 1) {
         \OCP\Util::addscript('passman', 'firstrun');
         $exampleItems = array();
         $exampleItems[0] = array('label' => 'Item 1', 'tags' => array(array('text' => 'Example tag'), array('text' => 'Example tag 2')));
         $exampleItems[1] = array('label' => 'Item 2', 'tags' => array(array('text' => 'Example tag 2'), array('text' => 'Example tag 3')));
         foreach ($exampleItems as $key => $val) {
             $this->itemAPI->create('', '', '', '', '', $val['label'], '', '', '', '', $val['tags'], array());
         }
     }
     $response = new TemplateResponse('passman', 'main', $params);
     $csp = new ContentSecurityPolicy();
     $csp->addAllowedObjectDomain('\'self\'');
     $csp->addAllowedImageDomain('data:');
     $response->setContentSecurityPolicy($csp);
     return $response;
     // templates/main.php
 }
开发者ID:viki53,项目名称:passman,代码行数:32,代码来源:pagecontroller.php

示例3: function

// add an navigation entr
$navigationEntry = function () use($c) {
    return ['id' => $c->getAppName(), 'order' => 1, 'name' => $c->query('L10N')->t('Contacts+'), 'href' => $c->query('URLGenerator')->linkToRoute($c->getAppName() . '.page.index'), 'icon' => $c->query('URLGenerator')->imagePath($c->getAppName(), 'contacts.svg')];
};
$c->getServer()->getNavigationManager()->add($navigationEntry);
if (\OCP\User::isLoggedIn()) {
    \OCP\Util::addScript('contactsplus', 'search');
}
\OC::$server->getSearch()->registerProvider('OCA\\ContactsPlus\\Search\\Provider', array('app' => $contactsAppName));
\OCP\Share::registerBackend(ContactsApp::SHAREADDRESSBOOK, 'OCA\\ContactsPlus\\Share\\Backend\\Addressbook');
\OCP\Share::registerBackend(ContactsApp::SHARECONTACT, 'OCA\\ContactsPlus\\Share\\Backend\\Contact');
\OCP\Util::connectHook('OC_User', 'post_deleteUser', '\\OCA\\ContactsPlus\\Hooks', 'deleteUser');
if (\OCP\User::isLoggedIn() && !\OCP\App::isEnabled('contacts')) {
    $request = $c->query('Request');
    if (isset($request->server['REQUEST_URI'])) {
        $url = $request->server['REQUEST_URI'];
        if (preg_match('%index.php/apps/files(/.*)?%', $url) || preg_match('%index.php/s/(/.*)?%', $url)) {
            \OCP\Util::addscript($contactsAppName, 'loader');
        }
    }
}
if (\OCP\User::isLoggedIn()) {
    $cm = \OC::$server->getContactsManager();
    $cm->register(function () use($cm) {
        $myApp = new Application();
        $addressBooks = $myApp->getContainer()->query('AddressbookController')->getAddressBooksForCM();
        foreach ($addressBooks as $addressBook) {
            $cm->registerAddressBook(new AddressbookProvider($addressBook));
        }
    });
}
开发者ID:ViToni,项目名称:contactsplus,代码行数:31,代码来源:app.php

示例4:

<?php

/**
 * Copyright (c) 2013 Sam Tuke <samtuke@owncloud.com>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
// Add CSS stylesheet
\OC_Util::addStyle('files_encryption', 'settings-personal');
$tmpl = new OCP\Template('files_encryption', 'settings-personal');
$user = \OCP\USER::getUser();
$view = new \OC\Files\View('/');
$util = new \OCA\Files_Encryption\Util($view, $user);
$session = new \OCA\Files_Encryption\Session($view);
$privateKeySet = $session->getPrivateKey() !== false;
// did we tried to initialize the keys for this session?
$initialized = $session->getInitialized();
$recoveryAdminEnabled = \OC::$server->getAppConfig()->getValue('files_encryption', 'recoveryAdminEnabled');
$recoveryEnabledForUser = $util->recoveryEnabledForUser();
$result = false;
if ($recoveryAdminEnabled || !$privateKeySet) {
    \OCP\Util::addscript('files_encryption', 'settings-personal');
    $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
    $tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);
    $tmpl->assign('privateKeySet', $privateKeySet);
    $tmpl->assign('initialized', $initialized);
    $result = $tmpl->fetchPage();
}
return $result;
开发者ID:samj1912,项目名称:repo,代码行数:30,代码来源:settings-personal.php

示例5: array

<?php

\OCP\User::checkLoggedIn();
\OCP\App::checkAppEnabled('ocDashboard');
\OCP\Util::addscript('ocDashboard', 'settings');
OCP\Util::addstyle('ocDashboard', 'ocDashboardSettings');
$user = OCP\User::getUser();
$tmpl = new OCP\Template('ocDashboard', 'settings');
$w = array();
OC::$CLASSPATH['ocdWidgets'] = 'ocDashboard/appinfo/widgetConfigs.php';
OC::$CLASSPATH['ocdFactory'] = 'ocDashboard/lib/factory.php';
foreach (ocdWidgets::$widgets as $widget) {
    $confs = json_decode($widget['conf'], true);
    if (isset($confs) && !empty($confs)) {
        foreach ($confs as $k => $config) {
            if ($config['type'] != 'password') {
                $confs[$k]['value'] = OCP\Config::getUserValue($user, "ocDashboard", "ocDashboard_" . $widget['id'] . "_" . $config['id'], "");
            }
        }
    }
    $enable = OCP\Config::getUserValue($user, "ocDashboard", "ocDashboard_" . $widget['id']);
    $w[] = array("widget" => $widget, "enable" => $enable, "conf" => $confs);
}
//print_r($w);
$tmpl->assign('widgets', $w);
return $tmpl->fetchPage();
开发者ID:kam1katze,项目名称:ocDashboard,代码行数:26,代码来源:settings.php

示例6:

<?php

OC::$CLASSPATH['OCA\\Encryption\\Crypt'] = 'files_encryption/lib/crypt.php';
OC::$CLASSPATH['OCA\\Encryption\\Hooks'] = 'files_encryption/hooks/hooks.php';
OC::$CLASSPATH['OCA\\Encryption\\Util'] = 'files_encryption/lib/util.php';
OC::$CLASSPATH['OCA\\Encryption\\Keymanager'] = 'files_encryption/lib/keymanager.php';
OC::$CLASSPATH['OCA\\Encryption\\Stream'] = 'files_encryption/lib/stream.php';
OC::$CLASSPATH['OCA\\Encryption\\Proxy'] = 'files_encryption/lib/proxy.php';
OC::$CLASSPATH['OCA\\Encryption\\Session'] = 'files_encryption/lib/session.php';
OC::$CLASSPATH['OCA\\Encryption\\Capabilities'] = 'files_encryption/lib/capabilities.php';
OC::$CLASSPATH['OCA\\Encryption\\Helper'] = 'files_encryption/lib/helper.php';
\OCP\Util::addscript('files_encryption', 'encryption');
\OCP\Util::addscript('files_encryption', 'detect-migration');
if (!OC_Config::getValue('maintenance', false)) {
    OC_FileProxy::register(new OCA\Encryption\Proxy());
    // User related hooks
    OCA\Encryption\Helper::registerUserHooks();
    // Sharing related hooks
    OCA\Encryption\Helper::registerShareHooks();
    // Filesystem related hooks
    OCA\Encryption\Helper::registerFilesystemHooks();
    // App manager related hooks
    OCA\Encryption\Helper::registerAppHooks();
    if (!in_array('crypt', stream_get_wrappers())) {
        stream_wrapper_register('crypt', 'OCA\\Encryption\\Stream');
    }
    // check if we are logged in
    if (OCP\User::isLoggedIn()) {
        // ensure filesystem is loaded
        if (!\OC\Files\Filesystem::$loaded) {
            \OC_Util::setupFS();
开发者ID:hjimmy,项目名称:owncloud,代码行数:31,代码来源:app.php

示例7: OC_FilesystemView

<?php

/**
 * Copyright (c) 2011 Robin Appelman <icewind@owncloud.com>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
\OC_Util::checkAdminUser();
$tmpl = new OCP\Template('files_encryption', 'settings-admin');
// Check if an adminRecovery account is enabled for recovering files after lost pwd
$view = new OC_FilesystemView('');
$recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');
$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
\OCP\Util::addscript('files_encryption', 'settings-admin');
\OCP\Util::addscript('core', 'multiselect');
return $tmpl->fetchPage();
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:17,代码来源:settings-admin.php

示例8:

    $font_value = $result[0]['configvalue'];
}
//Lockey by name rule
$query = \OCP\DB::prepare("SELECT * FROM *PREFIX*appconfig where configkey='suffix' and appid='files_w2g' LIMIT 1");
$result = $query->execute()->fetchAll();
if (count($result) >= 1) {
    $naming = $result[0]['configvalue'];
}
//Locked files
$exist = \OCP\DB::prepare("SHOW TABLES LIKE '*PREFIX*" . app::table . "'")->execute()->fetchAll();
if ($exist != null) {
    $result = \OCP\DB::prepare("SELECT * FROM *PREFIX*" . app::table)->execute()->fetchAll();
}
//----------------------------------------------------------------------------------------------------------------------------
\OCP\Util::addscript(app::name, 'admin');
\OCP\Util::addscript(app::name, 'jscolor');
?>
<div class="section" id="multiaccess_settings">
<fieldset class="personalblock">
	<h2><?php 
p($l->t('Manage multiaccess'));
?>
</h2>
	
	<?php 
p($l->t("Here you can set the colors for the locked files."));
echo $naming;
echo '
	<br><br>
	<u>' . $l->t("Background color") . ':</u><br>
	#<input id="multicolor" class="color" type="text" value="' . $value . '" style="width:180px;" name="multicolor" original-title="' . $l->t("choose a valid html color") . '"></input>
开发者ID:Quatral,项目名称:Workin2Gether,代码行数:31,代码来源:admin.php

示例9: Application

namespace OCA\CalendarPlus\AppInfo;

$app = new Application();
$c = $app->getContainer();
$appName = (string) $c->getAppName();
// add an navigation entry
$navigationEntry = function () use($c) {
    return ['id' => $c->getAppName(), 'order' => 1, 'name' => $c->query('L10N')->t('Calendar+'), 'href' => $c->query('URLGenerator')->linkToRoute($c->getAppName() . '.page.index'), 'icon' => $c->query('URLGenerator')->imagePath($c->getAppName(), 'calendar.svg')];
};
$c->getServer()->getNavigationManager()->add($navigationEntry);
//upcoming version search for 8.2 perhaps patch https://github.com/owncloud/core/pull/17339/files
//\OC::$server->getSearch()->registerProvider('OCA\CalendarPlus\Search\Provider', array('app' =>$appName,'apps' =>array('tasksplus')));
\OC::$server->getSearch()->registerProvider('OCA\\CalendarPlus\\Search\\Provider', array('app' => $appName));
if (\OC::$server->getAppManager()->isEnabledForUser('activity')) {
    \OC::$server->getActivityManager()->registerExtension(function () {
        return new \OCA\CalendarPlus\Activity();
    });
}
\OCA\CalendarPlus\Hooks::register();
\OCP\Util::addScript($appName, 'alarm');
if (\OCP\User::isLoggedIn() && !\OCP\App::isEnabled('calendar')) {
    $request = $c->query('Request');
    if (isset($request->server['REQUEST_URI'])) {
        $url = $request->server['REQUEST_URI'];
        if (preg_match('%index.php/apps/files(/.*)?%', $url) || preg_match('%index.php/s/(/.*)?%', $url)) {
            \OCP\Util::addScript($appName, 'loaderimport');
            \OCP\Util::addStyle($appName, '3rdparty/colorPicker');
            \OCP\Util::addscript($appName, '3rdparty/jquery.colorPicker');
        }
    }
}
开发者ID:sahne123,项目名称:calendarplus,代码行数:31,代码来源:app.php

示例10: User_Files_Restore

<?php

/**
 * ownCloud - User Files Restore
 *
 * @author Patrick Paysant <ppaysant@linagora.com>
 * @copyright 2015 CNRS DSI
 * @license This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
 */
namespace OCA\User_Files_Restore;

use OCA\User_Files_Restore\App\User_Files_Restore;
$app = new User_Files_Restore();
$c = $app->getContainer();
/**
 * add navigation
 */
\OCP\App::addNavigationEntry(array('id' => 'user_files_restore', 'order' => 10, 'href' => \OCP\Util::linkToRoute('user_files_restore.page.index'), 'icon' => \OCP\Util::imagePath($c->query('AppName'), 'restoreApp.svg'), 'name' => $c->query('L10N')->t('Restore')));
/**
 * Load js and overlay icon
 */
\OCP\Util::addscript($c->query('AppName'), 'restore');
\OCP\Util::addStyle($c->query('AppName'), 'restore');
开发者ID:CNRS-DSI-Dev,项目名称:user_files_restore,代码行数:23,代码来源:app.php

示例11: sizeof

<?php

\OCP\Util::addScript('ownmnote', 'script');
OCP\Util::addStyle('files_texteditor', 'DroidSansMono/stylesheet');
OCP\Util::addStyle('files_texteditor', 'style');
OCP\Util::addStyle('files_texteditor', 'mobile');
OCP\Util::addscript('files_texteditor', 'editor');
OCP\Util::addscript('files_markdown', 'marked');
OCP\Util::addscript('files_texteditor', 'vendor/ace/src-noconflict/ace');
\OCP\Util::addStyle('ownmnote', 'style');
\OCP\Util::addscript('files_markdown', 'editor');
\OCP\Util::addStyle('files_markdown', 'preview');
\OCP\Util::addStyle('files_markdown', 'highlight-default');
$disableAnnouncement = \OCP\Config::getAppValue('ownmnote', 'disableAnnouncement', '');
$l = OCP\Util::getL10N('ownmnote');
$ocVersionArray = OCP\Util::getVersion();
$ocVersion = "";
$oci = 0;
$ocl = sizeof($ocVersionArray);
foreach ($ocVersionArray as $v) {
    $ocVersion .= $v;
    $oci++;
    if ($oci < $ocl) {
        $ocVersion .= ".";
    }
}
?>
<div id="app">
    <div id="app-navigation">
        <ul id="grouplist">
        </ul>
开发者ID:Viperoo,项目名称:ownmnote,代码行数:31,代码来源:main.php

示例12: VideosManager

 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 * License as published by the Free Software Foundation; either 
 * version 3 of the License, or any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *  
 * You should have received a copy of the GNU Lesser General Public 
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
namespace OCA\Videos;

\OCP\User::checkLoggedIn();
\OCP\JSON::checkAppEnabled('videos');
\OCP\App::setActiveNavigationEntry('videos_index');
\OCP\Util::addStyle('videos', 'style');
\OCP\Util::addScript('videos', 'app');
\OCP\Util::addScript('videos/3rdparty', 'masonry.pkgd');
\OCP\Util::addStyle('files_videoviewer', 'style');
\OCP\Util::addStyle('files_videoviewer', 'mediaelementplayer');
\OCP\Util::addscript('files_videoviewer', 'viewer');
$manager = new VideosManager();
$videos = $manager->getVideos();
$tmpl = new \OCP\Template('videos', 'videos', 'user');
$tmpl->assign('videos', $videos);
$tmpl->printPage();
开发者ID:amin-hedayati,项目名称:videos,代码行数:31,代码来源:index.php

示例13:

 * 
 * This file is part of oclife.
 * 
 * oclife is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * oclife is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with oclife.  If not, see <http://www.gnu.org/licenses/>.
 */
\OCP\App::addNavigationEntry(array('id' => 'oclife', 'order' => 10, 'href' => \OCP\Util::linkToRoute('oclife_index'), 'icon' => \OCP\Util::imagePath('oclife', 'nav-icon.svg'), 'name' => 'Tags'));
// Handle translations
//$l = new \OC_L10N('oclife');
$l = \OCP\Util::getL10N('oclife');
// Add what's needed by TagManager
\OCP\Util::addStyle('oclife', 'bootstrap-tokenfield');
\OCP\Util::addStyle('oclife', 'oclife_fileInfo');
\OCP\Util::addScript('oclife', 'bootstrap-tokenfield/bootstrap-tokenfield');
\OCP\Util::addScript('oclife', 'bootstrap-tokenfield/typeahead.bundle');
\OCP\Util::addScript('oclife', 'bootstrap-tokenfield/affix');
\OCP\App::registerAdmin('oclife', 'settings');
\OCP\Util::addscript('oclife', 'oclife/oclife_fileExtendedInfo');
// Register filesystem hooks to remove thumbnails and tags DB entries
\OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\\OCLife\\utilities', 'cleanupForDelete');
\OCP\Util::connectHook('OC_Filesystem', 'rename', 'OCA\\OCLife\\utilities', 'cleanupForRename');
开发者ID:Greenworker,项目名称:oclife,代码行数:31,代码来源:app.php

示例14:

<?php

/**
 * ownCloud - Files_Reader App
 *
 * @author Frank de Lange
 * @copyright 2015 Frank de Lange
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 */
namespace OCA\Files_Reader\AppInfo;

use OCP\Util;
Util::addscript('files_reader', 'plugin');
开发者ID:RavenB,项目名称:owncloud-apps,代码行数:15,代码来源:app.php

示例15: index

 /**
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     if (\OC::$server->getAppManager()->isEnabledForUser('contactsplus')) {
         $appinfo = \OCP\App::getAppVersion('contactsplus');
         if (version_compare($appinfo, '1.0.6', '>=')) {
             $calId = $this->calendarController->checkBirthdayCalendarByUri('bdaycpltocal_' . $this->userId);
         }
     }
     $calendars = CalendarCalendar::allCalendars($this->userId, false, false, false);
     if (count($calendars) == 0) {
         CalendarCalendar::addDefaultCalendars($this->userId);
         $calendars = CalendarCalendar::allCalendars($this->userId, true);
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "onedayview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "agendaDay");
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "oneweekview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "agendaWeek");
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "onemonthview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "month");
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "listview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "list");
     }
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'currentview', 'month') == "fourweeksview") {
         $this->configInfo->setUserValue($this->userId, $this->appName, 'currentview', "fourweeks");
     }
     \OCP\Util::addStyle($this->appName, '3rdparty/colorPicker');
     \OCP\Util::addscript($this->appName, '3rdparty/jquery.colorPicker');
     \OCP\Util::addScript($this->appName, '3rdparty/fullcalendar');
     \OCP\Util::addStyle($this->appName, '3rdparty/fullcalendar');
     \OCP\Util::addStyle($this->appName, '3rdparty/jquery.timepicker');
     \OCP\Util::addStyle($this->appName, '3rdparty/fontello/css/animation');
     \OCP\Util::addStyle($this->appName, '3rdparty/fontello/css/fontello');
     \OCP\Util::addScript($this->appName, 'jquery.scrollTo.min');
     //\OCP\Util::addScript($this->appName,'timepicker');
     \OCP\Util::addScript($this->appName, '3rdparty/datepair');
     \OCP\Util::addScript($this->appName, '3rdparty/jquery.datepair');
     \OCP\Util::addScript($this->appName, '3rdparty/jquery.timepicker');
     \OCP\Util::addScript($this->appName, "3rdparty/jquery.webui-popover");
     \OCP\Util::addScript($this->appName, "3rdparty/chosen.jquery.min");
     \OCP\Util::addStyle($this->appName, "3rdparty/chosen");
     \OCP\Util::addScript($this->appName, '3rdparty/tag-it');
     \OCP\Util::addStyle($this->appName, '3rdparty/jquery.tagit');
     \OCP\Util::addStyle($this->appName, '3rdparty/jquery.webui-popover');
     if ($this->configInfo->getUserValue($this->userId, $this->appName, 'timezone') == null || $this->configInfo->getUserValue($this->userId, $this->appName, 'timezonedetection') == 'true') {
         \OCP\Util::addScript($this->appName, '3rdparty/jstz-1.0.4.min');
         \OCP\Util::addScript($this->appName, 'geo');
     }
     \OCP\Util::addScript($this->appName, '3rdparty/printThis');
     \OCP\Util::addScript($this->appName, 'app');
     \OCP\Util::addScript($this->appName, 'loaderimport');
     \OCP\Util::addStyle($this->appName, 'style');
     \OCP\Util::addStyle($this->appName, "mobile");
     \OCP\Util::addScript($this->appName, 'jquery.multi-autocomplete');
     \OCP\Util::addScript('core', 'tags');
     \OCP\Util::addScript($this->appName, 'on-event');
     $leftNavAktiv = $this->configInfo->getUserValue($this->userId, $this->appName, 'calendarnav');
     $rightNavAktiv = $this->configInfo->getUserValue($this->userId, $this->appName, 'tasknav');
     $pCalendar = $calendars;
     $pHiddenCal = 'class="isHiddenCal"';
     $pButtonCalAktive = '';
     if ($leftNavAktiv === 'true') {
         $pHiddenCal = '';
         $pButtonCalAktive = 'button-info';
     }
     $pButtonTaskAktive = '';
     $pTaskOutput = '';
     $pRightnavAktiv = $rightNavAktiv;
     $pIsHidden = 'class="isHiddenTask"';
     if ($rightNavAktiv === 'true' && \OC::$server->getAppManager()->isEnabledForUser('tasksplus')) {
         $allowedCals = [];
         foreach ($calendars as $calInfo) {
             $isAktiv = (int) $calInfo['active'];
             if ($this->configInfo->getUserValue($this->userId, $this->appName, 'calendar_' . $calInfo['id']) !== '') {
                 $isAktiv = (int) $this->configInfo->getUserValue($this->userId, $this->appName, 'calendar_' . $calInfo['id']);
             }
             if ($isAktiv === 1) {
                 $allowedCals[] = $calInfo;
             }
         }
         $cDataTimeLine = new \OCA\TasksPlus\Timeline();
         $cDataTimeLine->setCalendars($allowedCals);
         $taskOutPutbyTime = $cDataTimeLine->generateAddonCalendarTodo();
         $paramsList = ['taskOutPutbyTime' => $taskOutPutbyTime];
         $list = new TemplateResponse('tasksplus', 'calendars.tasks.list', $paramsList, '');
         $pButtonTaskAktive = 'button-info';
         $pTaskOutput = $list->render();
         $pIsHidden = '';
     }
     $params = ['calendars' => $pCalendar, 'leftnavAktiv' => $leftNavAktiv, 'isHiddenCal' => $pHiddenCal, 'buttonCalAktive' => $pButtonCalAktive, 'isHidden' => $pIsHidden, 'buttonTaskAktive' => $pButtonTaskAktive, 'taskOutput' => $pTaskOutput, 'rightnavAktiv' => $pRightnavAktiv, 'mailNotificationEnabled' => \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_mail_notification', 'yes'), 'allowShareWithLink' => \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_links', 'yes'), 'mailPublicNotificationEnabled' => \OC::$server->getAppConfig()->getValue('core', 'shareapi_allow_public_notification', 'no')];
     $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
     $csp->addAllowedImageDomain('*');
     $response = new TemplateResponse($this->appName, 'calendar', $params);
     $response->setContentSecurityPolicy($csp);
//.........这里部分代码省略.........
开发者ID:Rotzbua,项目名称:calendarplus,代码行数:101,代码来源:pagecontroller.php


注:本文中的OCP\Util::addscript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。