Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
bcea9d64
Commit
bcea9d64
authored
9 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
removed no longer needed ajax action components
parent
3e2beab5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/plugins/styling/action.php
+0
-48
0 additions, 48 deletions
lib/plugins/styling/action.php
lib/plugins/styling/script.js
+2
-6
2 additions, 6 deletions
lib/plugins/styling/script.js
with
2 additions
and
54 deletions
lib/plugins/styling/action.php
+
0
−
48
View file @
bcea9d64
...
...
@@ -26,8 +26,6 @@ class action_plugin_styling extends DokuWiki_Action_Plugin {
* @return void
*/
public
function
register
(
Doku_Event_Handler
$controller
)
{
$controller
->
register_hook
(
'AJAX_CALL_UNKNOWN'
,
'BEFORE'
,
$this
,
'handle_ajax'
);
$controller
->
register_hook
(
'ACTION_ACT_PREPROCESS'
,
'BEFORE'
,
$this
,
'handle_action'
);
$controller
->
register_hook
(
'TPL_METAHEADER_OUTPUT'
,
'BEFORE'
,
$this
,
'handle_header'
);
}
...
...
@@ -57,52 +55,6 @@ class action_plugin_styling extends DokuWiki_Action_Plugin {
}
}
/**
* Updates the style.ini settings by passing it on to handle() of the admin component
*
* @param Doku_Event $event event object by reference
* @param mixed $param [the parameters passed as fifth argument to register_hook() when this
* handler was registered]
* @return void
*/
public
function
handle_action
(
Doku_Event
&
$event
,
$param
)
{
if
(
$event
->
data
!=
'styling_plugin'
)
return
;
if
(
!
auth_isadmin
())
return
;
$event
->
data
=
'show'
;
/** @var admin_plugin_styling $hlp */
$hlp
=
plugin_load
(
'admin'
,
'styling'
);
$hlp
->
handle
();
}
/**
* Create the style form in the floating Dialog
*
* @param Doku_Event $event event object by reference
* @param mixed $param [the parameters passed as fifth argument to register_hook() when this
* handler was registered]
* @return void
*/
public
function
handle_ajax
(
Doku_Event
&
$event
,
$param
)
{
if
(
$event
->
data
!=
'plugin_styling'
)
return
;
if
(
!
auth_isadmin
())
return
;
$event
->
preventDefault
();
$event
->
stopPropagation
();
global
$ID
;
global
$INPUT
;
$ID
=
getID
();
/** @var admin_plugin_styling $hlp */
$hlp
=
plugin_load
(
'admin'
,
'styling'
);
if
(
$INPUT
->
str
(
'run'
)
==
'preview'
)
{
$hlp
->
run_preview
();
}
else
{
$hlp
->
form
(
true
);
}
}
}
// vim:ts=4:sw=4:et:
This diff is collapsed.
Click to expand it.
lib/plugins/styling/script.js
+
2
−
6
View file @
bcea9d64
...
...
@@ -5,6 +5,8 @@ jQuery(function () {
var
$styling_plugin
=
jQuery
(
'
#plugin__styling
'
);
if
(
!
$styling_plugin
.
length
)
return
;
// add the color picker
$styling_plugin
.
find
(
'
.color
'
).
iris
({});
if
(
!
$styling_plugin
.
hasClass
(
'
ispopup
'
))
{
var
$hl
=
$styling_plugin
.
find
(
'
h1
'
).
first
();
...
...
@@ -18,9 +20,6 @@ jQuery(function () {
return
;
}
// add the color picker
$styling_plugin
.
find
(
'
.color
'
).
iris
({});
// append the loader screen
$loader
=
window
.
opener
.
jQuery
(
'
#plugin__styling_loader
'
);
if
(
!
$loader
.
length
)
{
...
...
@@ -45,8 +44,5 @@ jQuery(function () {
// load preview in main window
var
now
=
new
Date
().
getTime
();
var
$style
=
window
.
opener
.
jQuery
(
'
link[rel=stylesheet][href*="lib/exe/css.php"]
'
);
$style
.
attr
(
'
href
'
,
''
);
$style
.
attr
(
'
href
'
,
DOKU_BASE
+
'
lib/exe/css.php?preview=1&tseed=
'
+
now
);
});
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