Commit 944925f8 authored by Kevin Deldycke's avatar Kevin Deldycke

Admin toolbar is now floating in the default style.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10180 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7cf98de0
...@@ -168,18 +168,67 @@ form#main_form div.wrapper div.field label {\n ...@@ -168,18 +168,67 @@ form#main_form div.wrapper div.field label {\n
/* Admin toolbox widget style\n /* Admin toolbox widget style\n
----------------------------------------------- */\n ----------------------------------------------- */\n
\n \n
#adminToolbox ul {\n form#main_form div.wrapper div.adminToolbox {\n
position: fixed;\n
z-index: 200;\n
top: .2em;\n
right: .2em;\n
margin: 0;\n
padding: 0;\n
background-color: #fff7cd;\n
border: 1px solid #f77;\n
}\n
\n
div.adminToolbox label {\n
display: none;\n
}\n
\n
/* admin toolbox sub section title */\n
div.adminToolbox h3 {\n
padding: .5em 0;\n
margin-left: -1em;\n
font-size: inherit;\n
}\n
\n
/* admin toolbox title */\n
div.adminToolbox > div > h3 {\n
background: #f77;\n
padding: .5em;\n
margin: 0;\n
color: #fff;\n
cursor: pointer;\n
}\n
\n
div.adminToolbox > div > h3:hover {\n
background: #f00;\n
}\n
\n
div.adminToolbox > div.input > div.adminSection {\n
border-bottom: 1px dotted #f77;\n
padding: .5em .5em 1em 1.5em;\n
}\n
\n
div.adminToolbox ul {\n
list-style: none;\n list-style: none;\n
}\n }\n
\n \n
#adminToolbox li {\n div.adminToolbox li {\n
margin: 0;\n margin: 0;\n
}\n }\n
\n \n
#adminToolbox li > a {\n div.adminToolbox li > a {\n
text-decoration: none;\n text-decoration: none;\n
}\n }\n
\n \n
div.adminToolbox button,\n
div.adminToolbox li > a {\n
margin: .1em 0;\n
padding: .2em;\n
}\n
\n
div.adminToolbox button[type="submit"] {\n
display: none;\n
}\n
\n \n
\n \n
\n \n
...@@ -248,19 +297,22 @@ input[type="image"] {\n ...@@ -248,19 +297,22 @@ input[type="image"] {\n
background-color: transparent;\n background-color: transparent;\n
}\n }\n
\n \n
/* Admin toolbox edit buttons have the same style as actions buttons */\n
#adminToolbox li > a,\n
button {\n button {\n
margin: .8em .5em;\n margin: .8em .5em;\n
border: 1px #ddd solid;\n
padding: .3em;\n padding: .3em;\n
}\n
\n
/* Admin toolbox edit buttons have the same style as actions buttons */\n
div.adminToolbox li > a,\n
button {\n
border: 1px #ddd solid;\n
color: #999;\n color: #999;\n
background: #eee;\n background: #eee;\n
cursor: pointer;\n cursor: pointer;\n
display: block;\n display: block;\n
}\n }\n
\n \n
#adminToolbox li > a:hover,\n div.adminToolbox li > a:hover,\n
button:hover {\n button:hover {\n
color: #333;\n color: #333;\n
background: #b0cfcb;\n background: #b0cfcb;\n
......
...@@ -150,7 +150,9 @@ ...@@ -150,7 +150,9 @@
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
...@@ -213,7 +215,7 @@ ...@@ -213,7 +215,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>adminToolbox</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -304,4 +306,23 @@ ...@@ -304,4 +306,23 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>not: here/portal_membership/isAnonymousUser</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -112,11 +112,9 @@ ...@@ -112,11 +112,9 @@
<tal:block metal:use-macro="template/macros/form"/>\n <tal:block metal:use-macro="template/macros/form"/>\n
</tal:block>\n </tal:block>\n
\n \n
<tal:block tal:define="agg_list python: layout_form.WebSite_getGroupList([\'header\', \'left\', \'right\', \'footer\'])">\n <tal:block tal:repeat="aggregate python: layout_form.WebSite_getGroupList([\'header\', \'left\', \'right\', \'footer\'])">\n
<tal:block tal:repeat="aggregate agg_list">\n
<tal:block metal:use-macro="here/erp5_web_macros/macros/render_aggregate"/>\n <tal:block metal:use-macro="here/erp5_web_macros/macros/render_aggregate"/>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
\n \n
</tal:block>\n </tal:block>\n
\n \n
......
...@@ -61,17 +61,8 @@ ...@@ -61,17 +61,8 @@
<tal:block\n <tal:block\n
tal:define="is_web_mode python: True;\n tal:define="is_web_mode python: True;\n
portal_type python: here.getPortalType();">\n portal_type python: here.getPortalType();">\n
<!-- widget_list python: [ \'admin_tool_menus\']"\n
, \'admin_tool_edit\'\n
, \'admin_tool_duplicate_document\'\n
, \'admin_tool_duplicate_section\'\n
, \'admin_tool_debug\'\n
]">\n
-->\n
<tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/>\n
\n
\n \n
<div id="adminToolbox">\n <tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/>\n
\n \n
<script type="text/javascript" language="JavaScript" src="admin_toolbox_cookie_utils.js"></script>\n <script type="text/javascript" language="JavaScript" src="admin_toolbox_cookie_utils.js"></script>\n
<script type="text/javascript" language="JavaScript">\n <script type="text/javascript" language="JavaScript">\n
...@@ -79,13 +70,14 @@ ...@@ -79,13 +70,14 @@
// global variables\n // global variables\n
var cookie_name = "erp5_admin_toolbox_hidden_state"\n var cookie_name = "erp5_admin_toolbox_hidden_state"\n
var hidden_class = "doNotDisplay";\n var hidden_class = "doNotDisplay";\n
var displayed_class = "adminSection";\n
var elements_to_hide_name = "adminSection";\n var elements_to_hide_name = "adminSection";\n
\n \n
function hideElements (hide) {\n function hideElements (hide) {\n
if (hide == true) {\n if (hide == true) {\n
new_hidden_class = hidden_class;\n new_hidden_class = hidden_class;\n
} else if (hide == false) {\n } else if (hide == false) {\n
new_hidden_class = "";\n new_hidden_class = displayed_class;\n
} else {\n } else {\n
return;\n return;\n
}\n }\n
...@@ -124,11 +116,13 @@ ...@@ -124,11 +116,13 @@
}\n }\n
-->\n -->\n
</script>\n </script>\n
\n
\n \n
<h3 title="Click to Collapse / Expand administrator toolbar." onclick="autoHide()" class="important"><img src="admin_toolbox.png"/><span name="adminSection"> Admin Tool Box</span></h3>\n <h3 title="Click to Collapse / Expand administrator toolbar." onclick="autoHide()" class="important"><img src="admin_toolbox.png"/><span name="adminSection"> Admin Tool Box</span></h3>\n
\n
\n \n
<!-- Edit button menu -->\n <!-- Edit button menu -->\n
<div name="adminSection">\n <div name="adminSection" class="adminSection">\n
<h3>Edit</h3>\n <h3>Edit</h3>\n
<ul tal:define="edit_links python: context.admin_toolbox_getEditShortcutList(truc=context)">\n <ul tal:define="edit_links python: context.admin_toolbox_getEditShortcutList(truc=context)">\n
<li tal:repeat="link edit_links">\n <li tal:repeat="link edit_links">\n
...@@ -144,40 +138,49 @@ ...@@ -144,40 +138,49 @@
\n \n
\n \n
<!-- Action drop-down contextual menu -->\n <!-- Action drop-down contextual menu -->\n
<div name="adminSection">\n <div name="adminSection" class="adminSection">\n
<h3><tal:block tal:content="portal_type"/> Actions</h3>\n <h3><tal:block tal:content="portal_type"/> Actions</h3>\n
<tal:block metal:use-macro="here/context_box_render/macros/action"/>\n <tal:block metal:use-macro="here/context_box_render/macros/action"/>\n
</div>\n </div>\n
\n \n
\n \n
<!-- Document creation panel -->\n <!-- Document creation panel.\n
<div name="adminSection">\n This part is displayed any document apart Web Site and Web Section.\n
But if Web Site and Web Section have default page, then it will be displayed anyway.\n
-->\n
<div name="adminSection" class="adminSection"\n
tal:condition="python: (portal_type in [\'Web Site\', \'Web Section\'] and here.WebSite_getDefaultWebPageValue()) or not portal_type in [\'Web Site\', \'Web Section\']">\n
\n
<form name="tool_create" method="post" action="WebSite_newContent">\n <form name="tool_create" method="post" action="WebSite_newContent">\n
<input id="document_action_mode" name="document_action_mode" value="clone" type="hidden"/>\n <input id="document_action_mode" name="document_action_mode" value="clone" type="hidden"/>\n
\n \n
<h3>\n <h3>\n
<span id="create_new_document_title"></span>\n <span id="create_new_document_title"></span>\n
<span id="clone_document_title">Clone <tal:block tal:content="python: (portal_type and \'Default \') or \'Current \'"/>Page</span>\n <span id="clone_document_title"><tal:block tal:replace="python: \'Clone %s %s\' % ((portal_type in [\'Web Site\', \'Web Section\'] and \'Default\') or \'Current\', portal_type)"/></span>\n
</h3>\n </h3>\n
\n \n
<!-- TODO: bad use of table ! Generic css class for forms should be used there -->\n <fieldset>\n
<table cellspacing="1" cellpadding="0" border="0">\n <!--legend class="group_title">left</legend-->\n
<tr>\n \n
<td>Title</td>\n <div class="field">\n
<td><input class="input" size="15" type="text" name="title" tal:attributes="value document/getTitle | nothing"/></td>\n <label>Title</label>\n
</tr>\n <div class="input"><input class="input" size="15" type="text" name="title" tal:attributes="value here/getTitle | nothing"/></div>\n
<tr>\n </div>\n
<td>Page URI</td>\n \n
<td><input class="input" size="15" type="text" name="reference" tal:attributes="value document/getReference | nothing"/></td>\n <div class="field">\n
</tr>\n <label>Page URI</label>\n
<tr>\n <div class="input"><input class="input" size="15" type="text" name="reference" tal:attributes="value here/getReference | nothing"/></div>\n
<td>Version</td>\n </div>\n
<td><input class="input" size="5" type="text" name="version" tal:attributes="value document/getVersion | nothing"/></td>\n \n
</tr>\n <div class="field">\n
<tr>\n <label>Version</label>\n
<td>Language</td>\n <div class="input"><input class="input" size="5" type="text" name="version" tal:attributes="value here/getVersion | nothing"/></div>\n
<td><input class="input" size="5" type="text" name="language" tal:attributes="value document/getLanguage | nothing"/></td>\n </div>\n
<!-- No required widget (make the form more complex) -->\n \n
<div class="field">\n
<label>Language</label>\n
<div class="input"><input class="input" size="5" type="text" name="language" tal:attributes="value here/getLanguage | nothing"/></div>\n
<!-- Not a required widget (make the form more complex) -->\n
<!--select name="language" size="1"\n <!--select name="language" size="1"\n
tal:define="language_map python: here.Localizer.get_languages_map()">\n tal:define="language_map python: here.Localizer.get_languages_map()">\n
<tal:block tal:repeat="language language_map">\n <tal:block tal:repeat="language language_map">\n
...@@ -192,7 +195,28 @@ ...@@ -192,7 +195,28 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</select-->\n </select-->\n
</tr>\n </div>\n
\n
<div class="field">\n
<label>Type</label>\n
<div class="input">\n
<select class="input" name="new_portal_type" size="1" onchange="setCreationMode(this)">\n
<option value="None" selected>&mdash; Same as Current &mdash;</option>\n
<tal:block tal:repeat="portal_type python: here.portal_types.objectValues()">\n
<option tal:condition="python: \'web_document\' in getattr(portal_type, \'group_list\', [])"\n
tal:content="portal_type/id"\n
tal:attributes="value portal_type/id"/>\n
</tal:block>\n
</select>\n
</div>\n
</div>\n
\n
<div class="field">\n
<label> </label>\n
<div class="input"><button alt=\'Clone &amp; Edit\' id="clone_action_button" title=\'Clone &amp; Edit\'><img src="admin_toolbox_clone_document.png" id="clone_action_icon"/> <span id="duplicate_document_action">Clone &amp; Edit</span></button></div>\n
</div>\n
\n
</fieldset>\n
\n \n
<script type="text/javascript" language="JavaScript">\n <script type="text/javascript" language="JavaScript">\n
<!--\n <!--\n
...@@ -200,15 +224,15 @@ ...@@ -200,15 +224,15 @@
if (document.images) {\n if (document.images) {\n
clone_icon = new Image();\n clone_icon = new Image();\n
new_icon = new Image();\n new_icon = new Image();\n
clone_icon.src = "clone-document.png";\n clone_icon.src = "admin_toolbox_clone_document.png";\n
new_icon.src = "new-document.png";\n new_icon.src = "admin_toolbox_new_document.png";\n
}\n }\n
\n \n
function setCreationMode (sel) {\n function setCreationMode (sel) {\n
// default is cloning\n // default is cloning\n
var action = \'clone\';\n var action = \'clone\';\n
var action_name = \'Clone &amp; Edit\';\n var action_name = \'Clone &amp; Edit\';\n
var icon = \'clone-document.png\';\n var icon = \'admin_toolbox_clone_document.png\';\n
var clone_class = \'\';\n var clone_class = \'\';\n
var new_title = \'\';\n var new_title = \'\';\n
\n \n
...@@ -217,7 +241,7 @@ ...@@ -217,7 +241,7 @@
if (portal_type != \'None\') {\n if (portal_type != \'None\') {\n
action = \'new\'\n action = \'new\'\n
action_name = \'Create New &amp; Edit\';\n action_name = \'Create New &amp; Edit\';\n
icon = \'new-document.png\';\n icon = \'admin_toolbox_new_document.png\';\n
clone_class = \'doNotDisplay\';\n clone_class = \'doNotDisplay\';\n
new_title = \'Create New Document\';\n new_title = \'Create New Document\';\n
}\n }\n
...@@ -238,46 +262,9 @@ ...@@ -238,46 +262,9 @@
}\n }\n
-->\n -->\n
</script>\n </script>\n
\n
<tr>\n
<td>Type</td>\n
<td>\n
<select class="input" name="new_portal_type" size="1" onchange="setCreationMode(this)">\n
<option value="None" selected>&mdash; Same as Current &mdash;</option>\n
<tal:block tal:repeat="portal_type python: here.portal_types.objectValues()">\n
<option tal:condition="python: \'web_document\' in getattr(portal_type, \'group_list\', [])"\n
tal:content="portal_type/id"\n
tal:attributes="value portal_type/id"/>\n
</tal:block>\n
</select>\n
</td>\n
</tr>\n
<tr>\n
<td colspan="2" class="centeredInner">\n
<button alt=\'Clone &amp; Edit\' id="clone_action_button" title=\'Clone &amp; Edit\'><img src="pictures/clone-document.png" id="clone_action_icon"/> <span id="duplicate_document_action">Clone &amp; Edit</span></button>\n
<!--input type="image" alt="Clone &amp; Edit" title="Clone &amp; Edit" src="pictures/clone-document.png" id="clone_action_icon"/> <span id="duplicate_document_action">Clone &amp; Edit</span-->\n
</td>\n
</tr>\n
</table>\n
\n
</form>\n </form>\n
</div>\n </div>\n
\n \n
\n
<!-- Debug panel -->\n
<!-- TODO: only display this part for manager -->\n
<div name="adminSection">\n
<h3>Debug Menu</h3>\n
<ul>\n
<li class="code">\n
<!-- Display erp5 web globals -->\n
<b>Globals:</b>\n
<tal:block tal:content="python: \'is_web_mode = \' + repr(is_web_mode)" />\n
</li>\n
</ul>\n
</div>\n
\n
</div>\n
</tal:block> </tal:block>
]]></string> </value> ]]></string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>OFS.Image</string>
<string>Image</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>admin_toolbox_clone_document.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1AcZDRMXMK5nmgAAAYhJREFUeNqllcFKw0AQhv+ZbPFB
PJYKBc8ePfsAvl17tw8iBGx7EPQNRKSaxrCb+T3ExMZu0kQHlhyG/fef2W8nQhLb7TPRE2m6xu3t
jWBMkMRm88TD8L5knnu+vLzx9XXHzeaJi8UdSWLo0thhSSJIEoHqT/ry8gLL5YpDDWtXQkSQJEnT
ivv7BwAYLO56T1VFWZa4vr7CbveB9/cM2+0j/ixcua2+qoosy5HnRas1/3IsQpgZ9vtPqCpUFfP5
7IiiGDVR4RAMIRiyLEdReADAdHoeyWffVcywXK54KK4x/MwMRVGAJCaT5E/UHAmXJRuXzrmGjLHU
uN9uvfcQkWb1XVgfNS1hs0r8VAyhpmXH+7K1+RReNTXel3BO4ZyLU2EWQApIay5xCDVnZxOQDiHY
sXDdAhFCRDpb0kUNWe1rCafpGmm67ix5Pp91UlNXFYIdC5+atfVL66LGzBpCTk63WHRRUx2AluNR
wmOoGem4poYtamJV6Jhf2CE1v1sxamwejsU+amLxBcwsVQMFoSFoAAAAAElFTkSuQmCC</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>22</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>507</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>22</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>OFS.Image</string>
<string>Image</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>admin_toolbox_new_document.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="base64">iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1QEbAzc5+RtIdwAAAsZJREFUOMu1k1tIFGEYhp9/5p91
Nzct19Lciog8RJEdsIMhRIRRQSRIXXQVdNFVF0V1HYQ33XQVUUYIFdRFBkGiGBEGYSId6CDJmq5b
ELna7s7uus7u/F2M4mkpXeqFH2a+gWfe//2+TyilmNLDR23TLwuQ4S1e21BfM5ztm5xbOHzoAF6P
MatmWZBMQiIBiSQkEopI/BPfQsFga0dPRUN9Tf9cjrYgZwa43TNOnlOvrNiHZY58ae3o2ZITGMDl
mobmuZ1acZGH9ev2Y5kj71o7enbnBIZpx1NgpSVx5dn4ivdimSOv7j95fTIn8BTcMxnFUHCAWHwA
t3sY/+q1SCt8t6WlpSpr8/4mTQOPR7Br+yYSCQgElLKVEErB97Hh8HJJFdC3aMcAUsL4OIRCkBd4
KIwP15EShMgx4yn9CvQT6upAl7Cm+AnlG3vRdZvlo+9l0dfOdVnBE6m0pf6wJtEoxLsvU7HnJfQ2
oUkNYUhcn29z8sSvwh2lgxezgy1pRCIQiUA0BqYJ8TjETBgbAzMOExsukBoMUn4kg+5RaIagvC5I
OjxGV3/BzazNk9JZCNsGpSBjTz/bCuy+x7jCXYTDUUryg7irawBBZijAl9Y36eoCq+7DqaWns4Kl
dEBKzYYqG/RYM8uO1oFaCUqA7syeVupn87kGiWK/2f68dj5Yn+14JlwpSGy9RbD7PeLjA/yNZWhK
gQ0qNcHrq+3pUNLb9LO3/e78ORbOrGqT6c91vLRkFdpQJ4XHy8iMjJLqC6B7vahUhp3nD0rtWlt5
Y5fq1xayELoOxmT2UkL62zMmBof5MXoMNAMlNCLes8TfflYlK1TtojdPCOcnvsZmUmYEf4GP2NNb
aPEUhXVbuPGiXrjF6KUzuaw0gC4lS5b5nJ5su8K4GSXf5VzeU+hLkSt4pvL9leRni5D/pP8GnhdF
8517/wT8G/5TIRk9cH4vAAAAAElFTkSuQmCC</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>22</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>825</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>22</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2006-09-19 Kevin 2006-09-19 Kevin
* Much more sementical breadcrumb with hierarchical lists. * Much more sementical breadcrumb with hierarchical lists.
* Admin Toolbar: add webdav and direct ERP5 access link. * Admin Toolbar: add webdav and direct ERP5 access link.
* Admin toolbar is now floating in the default style.
2006-09-18 Kevin 2006-09-18 Kevin
* Merge all admin toolbar code in one single page template. * Merge all admin toolbar code in one single page template.
......
445 448
\ No newline at end of file \ No newline at end of file
0.3.37 0.3.38
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment