From fa5790c8af3a68111167546ad6d70a7adb9fd21d Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 12 Dec 2014 09:22:15 +0100 Subject: [PATCH] move loading of JS and CSS to template --- settings/templates/users/main.php | 13 +++++++++++++ settings/users.php | 8 -------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/settings/templates/users/main.php b/settings/templates/users/main.php index d2b7652f14..1923f4b049 100644 --- a/settings/templates/users/main.php +++ b/settings/templates/users/main.php @@ -4,6 +4,19 @@ * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ + +script('settings', [ + 'users/deleteHandler', + 'users/filter', + 'users/users', + 'users/groups' +]); +script('core', [ + 'multiselect', + 'singleselect' +]); +style('settings', 'settings'); + $userlistParams = array(); $allGroups=array(); foreach($_["groups"] as $group) { diff --git a/settings/users.php b/settings/users.php index a327cab9b2..75109f9ef7 100644 --- a/settings/users.php +++ b/settings/users.php @@ -7,14 +7,6 @@ OC_Util::checkSubAdminUser(); -// We have some javascript foo! -OC_Util::addScript('settings', 'users/deleteHandler'); -OC_Util::addScript('settings', 'users/filter'); -OC_Util::addScript( 'settings', 'users/users' ); -OC_Util::addScript( 'settings', 'users/groups' ); -OC_Util::addScript( 'core', 'multiselect' ); -OC_Util::addScript( 'core', 'singleselect' ); -OC_Util::addStyle( 'settings', 'settings' ); OC_App::setActiveNavigationEntry( 'core_users' ); $userManager = \OC_User::getManager();