close to prerelase
This commit is contained in:
parent
e55fbb5b67
commit
31022358ed
181 changed files with 2118 additions and 141 deletions
33
werc/apps/cssedit/app.rc
Normal file
33
werc/apps/cssedit/app.rc
Normal file
|
@ -0,0 +1,33 @@
|
|||
fn conf_enable_cssedit {
|
||||
enable_cssedit=yes
|
||||
cssedit_editors_groups=$*
|
||||
conf_enable_app cssedit
|
||||
css_file='_werc/style.css' # Default location, can be changed
|
||||
}
|
||||
|
||||
fn cssedit_init {
|
||||
if(! ~ $#enable_cssedit 0 && check_user $cssedit_editors_groups) {
|
||||
lp=$local_path
|
||||
lp=`{echo $lp | sed 's/index$//'}
|
||||
cssedit_file=$"lp$"css_file
|
||||
|
||||
if(~ 1 $#post_arg_cssedit_edit $#post_arg_cssedit_preview) {
|
||||
handler_body_main=(tpl_handler `{get_lib_file cssedit/edit.tpl apps/cssedit/edit.tpl})
|
||||
}
|
||||
|
||||
if not if(! ~ '' $"post_arg_cssedit_save $"post_arg_css_text) {
|
||||
save_css
|
||||
}
|
||||
|
||||
if not if(~ $"handler_body_main '' || {~ $REQUEST_METHOD GET && test -f $cssedit_file}) {
|
||||
ll_add handlers_bar_left tpl_handler apps/cssedit/sidebar_controls.tpl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn save_css {
|
||||
umask 002
|
||||
echo $post_arg_css_text > $cssedit_file
|
||||
post_redirect $base_url^$req_path
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue