Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
f16f1e50
Commit
f16f1e50
authored
15 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
added option to load js files from php
parent
4ff703e9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/lib_base.php
+11
-1
11 additions, 1 deletion
inc/lib_base.php
inc/templates/header.php
+7
-1
7 additions, 1 deletion
inc/templates/header.php
index.php
+1
-1
1 addition, 1 deletion
index.php
with
19 additions
and
3 deletions
inc/lib_base.php
+
11
−
1
View file @
f16f1e50
...
@@ -86,7 +86,7 @@ $loginresult=OC_USER::loginlisener();
...
@@ -86,7 +86,7 @@ $loginresult=OC_USER::loginlisener();
*
*
*/
*/
class
OC_USER
{
class
OC_USER
{
/**
/**
* check if the login button is pressed and logg the user in
* check if the login button is pressed and logg the user in
*
*
...
@@ -125,6 +125,16 @@ class OC_USER {
...
@@ -125,6 +125,16 @@ class OC_USER {
*
*
*/
*/
class
OC_UTIL
{
class
OC_UTIL
{
public
static
$scripts
=
array
();
/**
* add a javascript file
*
* @param url $url
*/
public
static
function
addscript
(
$url
){
self
::
$scripts
[]
=
$url
;
}
/**
/**
* array to store all the optional navigation buttons of the plugins
* array to store all the optional navigation buttons of the plugins
...
...
This diff is collapsed.
Click to expand it.
inc/templates/header.php
+
7
−
1
View file @
f16f1e50
...
@@ -6,9 +6,15 @@
...
@@ -6,9 +6,15 @@
<base
href=
"
<?php
echo
(
$WEBROOT
);
?>
/"
/>
<base
href=
"
<?php
echo
(
$WEBROOT
);
?>
/"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/default.php"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/default.php"
/>
<script
type=
'text/ecmascript'
src=
'
<?php
echo
(
$WEBROOT
)
?>
/js/lib_ajax.js'
></script>
<script
type=
'text/ecmascript'
src=
'
<?php
echo
(
$WEBROOT
)
?>
/js/lib_ajax.js'
></script>
<!-- <script type='text/ecmascript' src='
<?php
echo
(
$WEBROOT
)
?>
/js/timer.js'></script> -->
<!-- <script type='text/ecmascript' src='
<?php
echo
(
$WEBROOT
)
?>
/js/notification.js'></script> -->
<script
type=
'text/ecmascript'
src=
'
<?php
echo
(
$WEBROOT
)
?>
/js/lib_xmlloader.js'
></script>
<script
type=
'text/ecmascript'
src=
'
<?php
echo
(
$WEBROOT
)
?>
/js/lib_xmlloader.js'
></script>
<script
type=
'text/ecmascript'
src=
'
<?php
echo
(
$WEBROOT
)
?>
/js/lib_files.js'
></script>
<script
type=
'text/ecmascript'
src=
'
<?php
echo
(
$WEBROOT
)
?>
/js/lib_files.js'
></script>
<script
type=
'text/ecmascript'
src=
'
<?php
echo
(
$WEBROOT
)
?>
/js/ajax.js'
></script>
<?php
foreach
(
OC_UTIL
::
$scripts
as
$script
){
echo
(
"<script type='text/ecmascript' src='
$WEBROOT
/
$script
'></script>"
);
}
?>
<script
type=
'text/ecmascript'
>
<script
type=
'text/ecmascript'
>
var
WEBROOT
=
'
<?php
echo
(
$WEBROOT
)
?>
'
;
var
WEBROOT
=
'
<?php
echo
(
$WEBROOT
)
?>
'
;
</script>
</script>
...
...
This diff is collapsed.
Click to expand it.
index.php
+
1
−
1
View file @
f16f1e50
...
@@ -31,7 +31,7 @@ if(isset($_GET['file'])) {
...
@@ -31,7 +31,7 @@ if(isset($_GET['file'])) {
}
else
{
}
else
{
OC_UTIL
::
addscript
(
'js/ajax.js'
);
OC_UTIL
::
showheader
();
OC_UTIL
::
showheader
();
OC_FILES
::
showbrowser
(
$CONFIG_DATADIRECTORY
,
$dir
);
OC_FILES
::
showbrowser
(
$CONFIG_DATADIRECTORY
,
$dir
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment