openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 63dc60c30b7c544aab062648978ecf3f677f9f92
parent 3cc65f5e39f86f5e2fef64efb68a064812a8d6ad
Author: Jan Dankert <devnull@localhost>
Date:   Sun, 21 Oct 2012 01:16:25 +0200

Label des Formular-OK-Buttons per Attribut festlegbar, Cancel-Button ist obligatorisch. CSS für Formulare überarbeitet.

Diffstat:
themes/default/css/openrat.css.php | 110++++++++++++++++++++++++++++++++++++-------------------------------------------
themes/default/include/elements.ini.php | 2+-
themes/default/include/html/form-end.inc.php | 13++++++++++---
themes/default/include/html/form.inc.php | 9+++++++++
themes/default/templates/folder/prop.tpl.src.xml | 2+-
themes/default/templates/folder/pub.tpl.src.xml | 56+++++++++++++++++++++++++++-----------------------------
themes/default/templates/login/login.tpl.src.xml | 2+-
themes/default/templates/profile/edit.tpl.src.xml | 2+-
8 files changed, 100 insertions(+), 96 deletions(-)

diff --git a/themes/default/css/openrat.css.php b/themes/default/css/openrat.css.php @@ -197,8 +197,6 @@ div.window > div.content ul#history > li, div.content a.action, div.content a.help, -div.content input.ok, -div.command > input.submit, div.filler div.headermenu > a.entry, div.filler div.header a.back.button { @@ -228,26 +226,12 @@ ul#history > li.active color:<?php echo $_GET['text_color']; ?>; } -div.content a.action, -div.content a.help, -div.content input.ok, -div.command > input.submit -{ - /*float:left;*/ -} - - a.help { float:right; } -input.ok -{ - x-font-weight:bold; -} - a.help { cursor:help; @@ -255,8 +239,7 @@ a.help a.action:hover, a.help:hover, -div.noaction:hover, -input.ok:hover +div.noaction:hover { text-decoration:none; border-color:<?php echo $_GET['title_text_color']; ?>; @@ -296,13 +279,6 @@ div.dropdown > a { display:block; } -div.dropdown div.entry:hover, -div.dropdown div.entry:hover > a -{ - /* - background-color:<?php echo $_GET['inactive_background_color']; ?>; - */ -} div.dropdown div.entry { padding:2px 5px; @@ -1128,6 +1104,10 @@ div#workbench div.bar > div.frame > div.window.fullscreen > div.content { visibility:hidden; } +.visible +{ + visibility:visible; +} div#workbench @@ -1173,18 +1153,51 @@ div.window { } div.content div.bottom { - height:30px; - width:200px; + xbackground-color: <?php echo $_GET['background_color']; ?>; + height:55px; + width:100%; position:absolute; - bottom:30px; + padding-right:40px; + bottom:0px; right:0px; - opacity:0.7; + visibility:hidden; } + +div.content div.bottom > div.command +{ + xvisibility:visible; + float:right; + z-index:20; +} + div.content > form { padding-bottom:45px; } +input.submit +{ + background-color: <?php echo $_GET['title_background_color']; ?>; + color: <?php echo $_GET['title_text_color']; ?>; + padding: 7px; + border:0px; + -moz-border-radius:7px; /* Mozilla */ + -webkit-border-radius:7px; /* Webkit */ + -khtml-border-radius:7px; /* Konqui */ + border-radius:7px; + margin-left:20px; + -webkit-box-shadow: 0px 0px 15px <?php echo $_GET['background_color']; ?>; + -moz-box-shadow: 0px 0px 15px <?php echo $_GET['background_color']; ?>; + box-shadow: 0px 0px 15px 10px <?php echo $_GET['background_color']; ?>; + cursor:pointer; +} + + +input.submit.ok +{ + font-weight:bold; /* Primäre Aktion in Fettdruck */ +} + /* Pfeile nur anzeigen, wenn Maus über der Titelleiste */ div.views > div.backward_link, @@ -1408,6 +1421,7 @@ form div.input > div.intputholder } form div.input input[type=text], +form div.input input[type=password], form div.input textarea, form div.input select { @@ -1459,9 +1473,9 @@ div.search > div.inputholder padding-top:1px; } -input, -textarea, -select +div.inputholder > input, +div.inputholder > textarea, +div.inputholder > select { border:0px; border-bottom:1px solid <?php echo $_GET['title_text_color']; ?>; @@ -1470,15 +1484,12 @@ select background-color:<?php echo $_GET['title_text_color']; ?>; } -input:hover,input:focus, -textarea:hover,textarea:focus, -select:hover,select:focus +input:focus, +textarea:focus, +select:focus { border:0px; border-bottom:1px solid <?php echo $_GET['inactive_background_color']; ?>; - padding:2px; - margin:0px; - background-color:<?php echo $_GET['title_text_color']; ?>; } @@ -1584,24 +1595,10 @@ dl.notice > dd } -/* R a h m e n */ -div.windowx -{ - border:1px solid <?php echo $_GET['title_background_color']; ?>; - - -moz-border-radius:5px; /* Mozilla */ - -webkit-border-radius:5px; /* Webkit */ - -khtml-border-radius:5px; /* Konqui */ - border-radius:5px; -} - - /* S c h a t t e n */ div.content a.action, div.content a.help, -div.content input.ok, -div#title, -div.xwindow +div#title { -webkit-box-shadow: 3px 2px 5px <?php echo $_GET['title_background_color']; ?>; -moz-box-shadow: 3px 2px 5px <?php echo $_GET['title_background_color']; ?>; @@ -1718,9 +1715,3 @@ div.filler div.header a.back.button { font-size: 0.8em; } - - -div.command -{ - visibility: hidden; -}- \ No newline at end of file diff --git a/themes/default/include/elements.ini.php b/themes/default/include/elements.ini.php @@ -11,7 +11,7 @@ column = width,style,class,colspan,rowspan,header:false,title,url,action,id,na date = date dummy = focus = field:* -form = action,subaction,id,name:,target:_self,method:post,enctype:application/x-www-form-urlencoded,type: +form = action,subaction,id,name:,target:_self,method:post,enctype:application/x-www-form-urlencoded,type:,cancel:true,label,visible:false frame = file,name,scrolling frameset = rows,columns frameset-page=menu diff --git a/themes/default/include/html/form-end.inc.php b/themes/default/include/html/form-end.inc.php @@ -1,8 +1,15 @@ +<!-- Ignore: --><form> + <div class="bottom"> - <div class="command"> - <input type="button" class="submit" value="<?php echo lang('BUTTON_OK') ?>" onclick="$(this).closest('div.window').find('form').submit();" /> - <input type="button" class="submit" value="<?php echo lang('CANCEL') ?>" onclick="$(this).closest('div.window').find('ul.views > li.active').click();" /> + <div class="command <?php echo $attr_tmp_visible?'visible':'invisible' ?>"> + + <input type="button" class="submit ok" value="<?php echo $attr_tmp_ok_label ?>" onclick="$(this).closest('div.window').find('form').submit();" /> + + <!-- Cancel-Button nicht anzeigen, wenn cancel==false. --> + <?php if ($attr_tmp_show_cancel) { ?> + <input type="button" class="submit cancel" value="<?php echo lang('CANCEL') ?>" onclick="$(this).closest('div.window').find('ul.views > li.active').click();" /> + <?php } ?> </div> </div> diff --git a/themes/default/include/html/form.inc.php b/themes/default/include/html/form.inc.php @@ -11,7 +11,16 @@ #ELSE $attr_id = $this->getRequestId(); #END-IF + + #IF-ATTR label# + $attr_tmp_ok_label = $attr_label; + #ELSE + $attr_tmp_ok_label = lang('BUTTON_OK'); + #END-IF + $attr_tmp_show_cancel = $attr_cancel; + $attr_tmp_visible = $attr_visible; + if ($this->isEditable()) { if ($this->isEditMode()) diff --git a/themes/default/templates/folder/prop.tpl.src.xml b/themes/default/templates/folder/prop.tpl.src.xml @@ -1,7 +1,7 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> <header></header> - <form> + <form label="message:global_save"> <group title="message:GLOBAL_PROP"> <part class="line"> diff --git a/themes/default/templates/folder/pub.tpl.src.xml b/themes/default/templates/folder/pub.tpl.src.xml @@ -11,41 +11,39 @@ </if> - <form> - <group title="message:publish"> - <if present="pages"> - <if present="subdirs"> + <form cancel="false" visible="true" label="message:publish"> + <if present="pages"> + <if present="subdirs"> - <part class="line"> - <part class="label"> - </part> - <part class="input"> - <checkbox name="pages"></checkbox> - <label for="pages"> - <text raw="_"></text> - <text text="global_pages"></text> - </label> - </part> + <part class="line"> + <part class="label"> + </part> + <part class="input"> + <checkbox name="pages"></checkbox> + <label for="pages"> + <text raw="_"></text> + <text text="global_pages"></text> + </label> </part> - </if> + </part> </if> - <if present="files"> - <if true="subdirs"> - <part class="line"> - <part class="label"> - </part> - <part class="input"> - <checkbox name="files"></checkbox> - <label for="files"> - <text raw="_"></text> - <text text="global_files"></text> - </label> - </part> + </if> + <if present="files"> + <if true="subdirs"> + <part class="line"> + <part class="label"> + </part> + <part class="input"> + <checkbox name="files"></checkbox> + <label for="files"> + <text raw="_"></text> + <text text="global_files"></text> + </label> </part> + </part> - </if> </if> - </group> + </if> <group title="message:options"> <if present="subdirs"> <part class="line"> diff --git a/themes/default/templates/login/login.tpl.src.xml b/themes/default/templates/login/login.tpl.src.xml @@ -1,7 +1,7 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> <header views="password,register,license"></header> - <form action="login" subaction="login" target="_top"> + <form cancel="false" label="message:menu_login"> <if present="config:login/logo/file"> <if false="property:mustChangePassword"> <if present="config:login/logo/url"> diff --git a/themes/default/templates/profile/edit.tpl.src.xml b/themes/default/templates/profile/edit.tpl.src.xml @@ -1,7 +1,7 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> <header views="mail"></header> - <form> + <form label="message:global_save"> <group title="message:name"> <part class="line"> <part class="label">