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


PHP Util::addStyle方法代码示例

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


在下文中一共展示了Util::addStyle方法的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: loadFrontend

 /**
  * Load the frontend files needed
  */
 public function loadFrontend()
 {
     \OCP\Util::addStyle('ocusagecharts', 'c3js/c3');
     \OCP\Util::addScript('ocusagecharts', 'c3js/d3.min');
     \OCP\Util::addScript('ocusagecharts', 'c3js/c3.min');
     \OCP\Util::addScript('ocusagecharts', 'c3js/initGraphs');
 }
开发者ID:heinekentap,项目名称:ocusagecharts,代码行数:10,代码来源:c3jsbase.php

示例3: index

 /**
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     if (defined('DEBUG') && DEBUG) {
         \OCP\Util::addScript('tasks', 'vendor/angularjs/angular');
         \OCP\Util::addScript('tasks', 'vendor/angularjs/angular-route');
         \OCP\Util::addScript('tasks', 'vendor/angularjs/angular-animate');
         \OCP\Util::addScript('tasks', 'vendor/momentjs/moment');
         \OCP\Util::addScript('tasks', 'vendor/bootstrap/ui-bootstrap-custom-tpls-0.10.0');
     } else {
         \OCP\Util::addScript('tasks', 'vendor/angularjs/angular.min');
         \OCP\Util::addScript('tasks', 'vendor/angularjs/angular-route.min');
         \OCP\Util::addScript('tasks', 'vendor/angularjs/angular-animate.min');
         \OCP\Util::addScript('tasks', 'vendor/momentjs/moment.min');
         \OCP\Util::addScript('tasks', 'vendor/bootstrap/ui-bootstrap-custom-tpls-0.10.0.min');
     }
     \OCP\Util::addScript('tasks', 'public/app');
     \OCP\Util::addScript('tasks', 'vendor/appframework/app');
     \OCP\Util::addScript('tasks', 'vendor/timepicker/jquery.ui.timepicker');
     \OCP\Util::addStyle('tasks', 'style');
     \OCP\Util::addStyle('tasks', 'vendor/bootstrap/bootstrap');
     $date = new \DateTimeZone(\OC_Calendar_App::getTimezone());
     $day = new \DateTime('today', $date);
     $day = $day->format('d');
     // TODO: Make a HTMLTemplateResponse class
     $response = new TemplateResponse('tasks', 'main');
     $response->setParams(array('DOM' => $day));
     return $response;
 }
开发者ID:msbt,项目名称:tasks,代码行数:32,代码来源:pagecontroller.php

示例4: onLoadFilesAppScripts

 /**
  * Load additional scripts when the files app is visible
  */
 public static function onLoadFilesAppScripts()
 {
     Util::addScript('snannyowncloudapi', 'tabview');
     Util::addScript('snannyowncloudapi', 'filesplugin');
     Util::addScript('snannyowncloudapi', 'fileupload');
     Util::addScript('snannyowncloudapi', 'templateutil');
     Util::addStyle('snannyowncloudapi', 'style');
 }
开发者ID:ifremer,项目名称:snanny-owncloudapi,代码行数:11,代码来源:filehook.php

示例5: vendor_style

 function vendor_style($app, $files)
 {
     if (is_array($files)) {
         foreach ($files as $file) {
             \OCP\Util::addStyle('chat', '../vendor/' . $file);
         }
     } else {
         \OCP\Util::addStyle('chat', '../vendor/' . $files);
     }
 }
开发者ID:arun-TK,项目名称:chat,代码行数:10,代码来源:compat.php

示例6: index

 /**
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     if (\OC::$server->getAppManager()->isEnabledForUser('calendarplus')) {
         $csp = new \OCP\AppFramework\Http\ContentSecurityPolicy();
         $csp->addAllowedImageDomain(':data');
         $config = \OC::$server->getConfig();
         $response = new TemplateResponse($this->appName, 'index');
         $response->setParams(array('allowShareWithLink' => $config->getAppValue('core', 'shareapi_allow_links', 'yes'), 'mailNotificationEnabled' => $config->getAppValue('core', 'shareapi_allow_mail_notification', 'no'), 'mailPublicNotificationEnabled' => $config->getAppValue('core', 'shareapi_allow_public_notification', 'no'), 'appname' => TasksApp::$appname, 'calappname' => CalendarApp::$appname));
         $response->setContentSecurityPolicy($csp);
     } else {
         \OCP\Util::addStyle($this->appName, 'style');
         $response = new TemplateResponse($this->appName, 'no-calendar-app');
     }
     return $response;
 }
开发者ID:ejouvin,项目名称:tasksplus,代码行数:19,代码来源:pagecontroller.php

示例7: index

 /**
  * @NoAdminRequired
  * @NoCSRFRequired
  */
 public function index()
 {
     \OC::$server->getNavigationManager()->setActiveEntry($this->appName);
     $importManager = new ImportManager();
     $imppTypes = Properties::getTypesForProperty('IMPP');
     $adrTypes = Properties::getTypesForProperty('ADR');
     $phoneTypes = Properties::getTypesForProperty('TEL');
     $emailTypes = Properties::getTypesForProperty('EMAIL');
     $ims = Properties::getIMOptions();
     $imProtocols = array();
     foreach ($ims as $name => $values) {
         $imProtocols[$name] = $values['displayname'];
     }
     $maxUploadFilesize = \OCP\Util::maxUploadFilesize('/');
     \OCP\Util::addScript('', 'jquery.multiselect');
     \OCP\Util::addScript('', 'tags');
     \OCP\Util::addScript('placeholder');
     \OCP\Util::addScript('3rdparty', 'md5/md5.min');
     \OCP\Util::addScript('jquery.avatar');
     \OCP\Util::addScript('avatar');
     \OCP\Util::addScript('contacts', 'jquery.combobox');
     \OCP\Util::addScript('contacts', 'modernizr.custom');
     \OCP\Util::addScript('contacts', 'app');
     \OCP\Util::addScript('contacts', 'addressbooks');
     \OCP\Util::addScript('contacts', 'contacts');
     \OCP\Util::addScript('contacts', 'storage');
     \OCP\Util::addScript('contacts', 'groups');
     \OCP\Util::addScript('contacts', 'jquery.ocaddnew');
     \OCP\Util::addScript('contacts', 'otherbackendconfig');
     \OCP\Util::addScript('files', 'jquery.fileupload');
     \OCP\Util::addScript('3rdparty/Jcrop', 'jquery.Jcrop');
     \OCP\Util::addStyle('', 'jquery.multiselect');
     \OCP\Util::addStyle('contacts', 'jquery.combobox');
     \OCP\Util::addStyle('contacts', 'jquery.ocaddnew');
     \OCP\Util::addStyle('3rdparty/Jcrop', 'jquery.Jcrop');
     \OCP\Util::addStyle('contacts', 'contacts');
     $response = new TemplateResponse($this->appName, 'contacts');
     $response->setParams(array('uploadMaxFilesize' => $maxUploadFilesize, 'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize), 'phoneTypes' => $phoneTypes, 'emailTypes' => $emailTypes, 'adrTypes' => $adrTypes, 'imppTypes' => $imppTypes, 'imProtocols' => $imProtocols, 'importManager' => $importManager));
     return $response;
 }
开发者ID:WYSAC,项目名称:oregon-owncloud,代码行数:44,代码来源:pagecontroller.php

示例8:

<?php

// JS Scripts
\OCP\Util::addScript('dashboard', 'script');
// CSS Styles
\OCP\Util::addStyle('dashboard', 'widgets');
\OCP\Util::addStyle('dashboard', 'control');
/*
$widgets = $_['enabledWidgets'];
$widgetsJson = OC_JSON::encode($widgets);
*/
?>

<div id="app">
	<div id="app-content">
		<?php 
print_unescaped($this->inc('part.content'));
?>
		<?php 
print_unescaped($this->inc('part.control'));
?>
	</div>
</div>
开发者ID:arnovr,项目名称:dashboard,代码行数:23,代码来源:main.php

示例9: add3rdPartyStyle

 /**
  * @deprecated include javascript and css in template files
  * shorthand for addStyle for files in the 3rdparty directory
  * @param string $name the name of the file without the suffix
  */
 public function add3rdPartyStyle($name)
 {
     \OCP\Util::addStyle($this->appName . '/3rdparty', $name);
 }
开发者ID:loulancn,项目名称:core,代码行数:9,代码来源:api.php

示例10:

<?php

\OCP\Util::addScript('music', 'vendor/underscore/underscore-min');
\OCP\Util::addScript('music', 'vendor/angular/angular.min');
\OCP\Util::addScript('music', 'vendor/angular/angular-route.min');
\OCP\Util::addScript('music', 'vendor/soundmanager/soundmanager2');
\OCP\Util::addScript('music', 'vendor/restangular/restangular.min');
\OCP\Util::addScript('music', 'vendor/angular-gettext/angular-gettext.min');
\OCP\Util::addScript('music', 'public/app');
\OCP\Util::addStyle('music', 'style-playerbar');
\OCP\Util::addStyle('music', 'style-sidebar');
\OCP\Util::addStyle('music', 'style');
\OCP\Util::addStyle('music', 'mobile');
\OCP\Util::addStyle('music', 'tablet');
?>

<div id="app" ng-app="Music" ng-cloak ng-init="started = false; lang = '<?php 
p($_['lang']);
?>
'">

	<div ng-controller="MainController">
		<!-- this will be used to display the flash element to give the user a chance to unblock flash -->
		<div id="sm2-container" ng-class="{started: started}"></div>

		<div id="playerbar" ng-controller="PlayerController" ng-class="{started: started}">
			<div id="play-controls">
				<img ng-click="prev()" class="control small svg" alt="{{'Previous' | translate }}"
					src="<?php 
p(OCP\image_path('music', 'play-previous.svg'));
?>
开发者ID:hjimmy,项目名称:owncloud,代码行数:31,代码来源:main.php

示例11:

<?php

\OCP\Util::addScript('ownboard', 'angular/angular.min');
\OCP\Util::addScript('ownboard', 'public/app');
\OCP\Util::addStyle('ownboard', 'style');
?>

<div class="ng-scope" id="app" ng-app="OwnBoard" ng-controller="OwnBoardController">
	<div id="board-list-left">
		<ul class="board-list">
			<li class=board-list-item" ng-repeat="board in boards" class="{{ board.id == selectedBoardId ? 'selected' : ''}}">
				<a href="#" ng-click="loadBoard(board.id);">{{ board.name }}</a>
				<div class="icon-delete svn delete action" ng-click="deleteBoard(board);"></div>
			</li>
			<li>
				<a href="#" ng-click="showCreateBoard = true;">Add a board...</a>
				<div ng-show="showCreateBoard == true" id="create-board">
					<h1>Create board</h1>
					<hr>
					<h2>Title</h2>
					<span class="board-form-error" ng-show="createBoardError != ''">{{ createBoardError }}</span>
					<form novalidate>
						<input type="textbox" ng-model="board.name"/>
						<input type="submit" value="Add" ng-click="createBoard(board);"/>
						<input type="button" value="Cancel" ng-click="showCreateBoard = false;"/>
					</form>
				</div>
			</li>
		</ul>
	</div>
	<div id="board-right" ng-show="selectedBoardId != 0">
开发者ID:nerzhul,项目名称:ownBoard,代码行数:31,代码来源:main.php

示例12: function

 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 *
 */
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener('OCA\\Files::loadAdditionalScripts', function () {
    \OCP\Util::addScript('oc-backbone-webdav');
    \OCP\Util::addScript('comments', 'app');
    \OCP\Util::addScript('comments', 'commentmodel');
    \OCP\Util::addScript('comments', 'commentcollection');
    \OCP\Util::addScript('comments', 'commentsummarymodel');
    \OCP\Util::addScript('comments', 'commentstabview');
    \OCP\Util::addScript('comments', 'filesplugin');
    \OCP\Util::addStyle('comments', 'comments');
});
$activityManager = \OC::$server->getActivityManager();
$activityManager->registerExtension(function () {
    $application = new \OCP\AppFramework\App('comments');
    /** @var \OCA\Comments\Activity\Extension $extension */
    $extension = $application->getContainer()->query('OCA\\Comments\\Activity\\Extension');
    return $extension;
});
$managerListener = function (\OCP\Comments\CommentsEvent $event) use($activityManager) {
    $application = new \OCP\AppFramework\App('comments');
    /** @var \OCA\Comments\Activity\Listener $listener */
    $listener = $application->getContainer()->query('OCA\\Comments\\Activity\\Listener');
    $listener->commentEvent($event);
};
$eventDispatcher->addListener(\OCP\Comments\CommentsEvent::EVENT_ADD, $managerListener);
开发者ID:stweil,项目名称:owncloud-core,代码行数:31,代码来源:app.php

示例13: isset

<?php

/**
 * ownCloud - Updater plugin
 *
 * @author Victor Dubiniuk
 * @copyright 2012-2013 Victor Dubiniuk victor.dubiniuk@gmail.com
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 */
namespace OCA\Updater;

\OCP\User::checkAdminUser();
\OCP\Util::addScript(App::APP_ID, '3rdparty/angular');
\OCP\Util::addScript(App::APP_ID, 'app');
\OCP\Util::addScript(App::APP_ID, 'controllers');
\OCP\Util::addStyle(App::APP_ID, 'updater');
if (!@file_exists(App::getBackupBase())) {
    Helper::mkdir(App::getBackupBase());
}
$data = App::getFeed();
$isNewVersionAvailable = isset($data['version']) && $data['version'] != '' && $data['version'] !== array();
$tmpl = new \OCP\Template(App::APP_ID, 'admin');
$lastCheck = \OC_Appconfig::getValue('core', 'lastupdatedat');
$tmpl->assign('checkedAt', \OCP\Util::formatDate($lastCheck));
$tmpl->assign('isNewVersionAvailable', $isNewVersionAvailable ? 'true' : 'false');
$tmpl->assign('channels', Channel::getChannels());
$tmpl->assign('currentChannel', Channel::getCurrentChannel());
$tmpl->assign('version', isset($data['versionstring']) ? $data['versionstring'] : '');
return $tmpl->fetchPage();
开发者ID:samj1912,项目名称:repo,代码行数:31,代码来源:admin.php

示例14: function

    // FIXME: no public API for these ?
    \OC_Util::addVendorScript('select2/select2');
    \OC_Util::addVendorStyle('select2/select2');
    \OCP\Util::addScript('select2-toggleselect');
    \OCP\Util::addScript('oc-backbone-webdav');
    \OCP\Util::addScript('systemtags/systemtags');
    \OCP\Util::addScript('systemtags/systemtagmodel');
    \OCP\Util::addScript('systemtags/systemtagsmappingcollection');
    \OCP\Util::addScript('systemtags/systemtagscollection');
    \OCP\Util::addScript('systemtags/systemtagsinputfield');
    \OCP\Util::addScript('systemtags', 'app');
    \OCP\Util::addScript('systemtags', 'systemtagsfilelist');
    \OCP\Util::addScript('systemtags', 'filesplugin');
    \OCP\Util::addScript('systemtags', 'systemtagsinfoview');
    \OCP\Util::addStyle('systemtags');
    \OCP\Util::addStyle('systemtags', 'systemtagsfilelist');
});
$activityManager = \OC::$server->getActivityManager();
$activityManager->registerExtension(function () {
    $application = new \OCP\AppFramework\App('systemtags');
    /** @var \OCA\SystemTags\Activity\Extension $extension */
    $extension = $application->getContainer()->query('OCA\\SystemTags\\Activity\\Extension');
    return $extension;
});
$managerListener = function (ManagerEvent $event) use($activityManager) {
    $application = new \OCP\AppFramework\App('systemtags');
    /** @var \OCA\SystemTags\Activity\Listener $listener */
    $listener = $application->getContainer()->query('OCA\\SystemTags\\Activity\\Listener');
    $listener->event($event);
};
$eventDispatcher->addListener(ManagerEvent::EVENT_CREATE, $managerListener);
开发者ID:ZverAleksey,项目名称:core,代码行数:31,代码来源:app.php

示例15: isset

OCP\Util::addscript('files', 'jquery.iframe-transport');
OCP\Util::addscript('files', 'jquery.fileupload');
OCP\Util::addscript('files', 'jquery-visibility');
OCP\Util::addscript('files', 'fileinfomodel');
OCP\Util::addscript('files', 'filesummary');
OCP\Util::addscript('files', 'breadcrumb');
OCP\Util::addscript('files', 'filelist');
OCP\Util::addscript('files', 'search');
\OCP\Util::addScript('files', 'favoritesfilelist');
\OCP\Util::addScript('files', 'tagsplugin');
\OCP\Util::addScript('files', 'favoritesplugin');
\OCP\Util::addScript('files', 'detailfileinfoview');
\OCP\Util::addScript('files', 'detailtabview');
\OCP\Util::addScript('files', 'mainfileinfodetailview');
\OCP\Util::addScript('files', 'detailsview');
\OCP\Util::addStyle('files', 'detailsView');
\OC_Util::addVendorScript('core', 'handlebars/handlebars');
OCP\App::setActiveNavigationEntry('files_index');
$l = \OC::$server->getL10N('files');
$isIE8 = false;
preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches);
if (count($matches) > 0 && $matches[1] <= 9) {
    $isIE8 = true;
}
// if IE8 and "?dir=path&view=someview" was specified, reformat the URL to use a hash like "#?dir=path&view=someview"
if ($isIE8 && (isset($_GET['dir']) || isset($_GET['view']))) {
    $hash = '#?';
    $dir = isset($_GET['dir']) ? $_GET['dir'] : '/';
    $view = isset($_GET['view']) ? $_GET['view'] : 'files';
    $hash = '#?dir=' . \OCP\Util::encodePath($dir);
    if ($view !== 'files') {
开发者ID:rosarion,项目名称:core,代码行数:31,代码来源:index.php


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