commit 7f18ea4d79178f4eb6fe909b0d4b5119a4ec49d6
parent d533f1ece860fd5b80f5fd0181547a98aa48f574
Author: dankert <dankert@laptop-jan>
Date: Thu, 14 Mar 2013 22:20:11 +0100
Dropdown-Menüs in der Titelleiste.
Diffstat:
6 files changed, 175 insertions(+), 40 deletions(-)
diff --git a/language/de.ini.php b/language/de.ini.php
@@ -1173,3 +1173,11 @@ PAGEELEMENT_USE_FROM_ARCHIVE="Der Inhalt wurde wieder hergestellt."
REMEMBER_ME="Angemeldet bleiben"
MENU_PROGRESS="Vorgänge"
MENU_PROGRESS_DESC="Alle laufenden Vorgänge anzeigen"
+
+MENU_SAVE=Speichern
+MENU_SAVE_DESC=Die aktuelle Datei speichern
+MENU_SAVEALL=Alles speichern
+MENU_SAVEALL_DESC=Alle geöffneten Dateien speichern
+MENU_NEW=Neu
+MENU_NEW_DESC=Neues Objekt anlegen
+EXTRAS=Extras
diff --git a/language/en.ini.php b/language/en.ini.php
@@ -1215,3 +1215,11 @@ WINDOW_FULLSCREEN="Fullscreen"
REMEMBER_ME="Stay logged in"
MENU_PROGRESS="Tasks"
MENU_PROGRESS_DESC="Running tasks"
+
+MENU_SAVE=Save
+MENU_SAVE_DESC=Save open file
+MENU_SAVEALL=Save all
+MENU_SAVEALL_DESC=Save all open files
+MENU_NEW=New
+MENU_NEW_DESC=New file
+EXTRAS=Extras
diff --git a/themes/default/css/openrat.css.php b/themes/default/css/openrat.css.php
@@ -73,19 +73,22 @@ div#header
float:left;
}
+div#header div.projects,
+div#header div.menu,
div#header div.title
{
float:left;
+ margin-right:10px;
+ margin-left :0px;
}
div#header div.user,
div#header div.search,
-div#header div.projects,
div#header div.history
{
float:right;
- margin-right:0px;
- margin-left:24px;
+ margin-right:10px;
+ margin-left :10px;
}
/*
@@ -1867,3 +1870,9 @@ div.container > div.divider.ui-draggable-dragging
z-index: 150;
background-color: <?php echo $_GET['title_background_color']; ?>;
}
+
+div.clickable.filtered.inactive > a
+{
+ color: <?php echo $_GET['inactive_background_color']; ?>;
+}
+
diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js
@@ -952,9 +952,19 @@ function openNewAction( name,action,id,extraId )
//$('div#content > div.panel > div.menu > div.views > ul.views').scrollTo(this);
setNewAction( action,id,extraId );
+
+
}
+function filterMenus(action)
+{
+ $('div.clickable.filtered').addClass('inactive');
+ $('div.clickable.filtered.on-action-'+action).removeClass('inactive');
+}
+
+
+
/**
* Setzt neue Action und aktualisiert alle Fenster.
*
@@ -963,6 +973,7 @@ function openNewAction( name,action,id,extraId )
*/
function setNewAction( action,id,extraId )
{
+ filterMenus(action);
$('div#workbench ul.views > li.action.dependent').attr('data-action',action).attr('data-id',id).attr('data-extra',JSON.stringify(extraId));
// Alle refresh-fähigen Views mit dem neuen Objekt laden.
diff --git a/themes/default/js/plugin/jquery-plugin-orLinkify.js b/themes/default/js/plugin/jquery-plugin-orLinkify.js
@@ -10,6 +10,10 @@ jQuery.fn.orLinkify = function()
var type = $(this).attr('data-type');
+ // Inaktive Menüpunkte sind natürlich nicht anklickbar.
+ if ( $(this).parent().hasClass('inactive') )
+ return;
+
if ( type == 'post' )
{
//alert('data: '+$(this).attr('data-data'))
diff --git a/themes/default/templates/title/show.tpl.src.xml b/themes/default/templates/title/show.tpl.src.xml
@@ -1,42 +1,167 @@
<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">
+<if>
<part class="title">
<image icon="database" align="left"></image>
<if present="dbname">
<text class="titletext" title="message:database" var="dbname"
maxlength="25"></text>
- <text class="titletext" raw=" - "></text>
+ <!-- <text class="titletext" raw=" - "></text>
+ -->
</if>
- <text class="titletext" var="cms_title" title="var:buildinfo"></text>
+ <!-- <text class="titletext" var="cms_title" title="var:buildinfo"></text>-->
</part>
+</if>
- <part class="toolbar-icon clickable">
+ <!-- Menü: Datei -->
+ <part class="menu">
+ <!-- <image icon="file" align="left"></image>-->
+ <text key="file"></text>
+ <image fileext="icon/menu.gif" align="left"></image>
+ <part class="dropdown">
+ <part class="entry clickable filtered on-action-folder on-action-page on-action-file">
+ <link type="dialog" title="message:menu_new_desc" subaction="new">
+ <image icon="new" align="left"></image>
+ <text key="menu_new"></text>
+ </link>
+ </part>
+ <part class="entry clickable">
+ <link type="post" title="message:menu_save_desc" subaction="save">
+ <image icon="save" align="left"></image>
+ <text key="menu_save"></text>
+ </link>
+ </part>
+ <part class="entry clickable">
+ <link type="post" title="message:menu_saveall_desc" subaction="saveall">
+ <image icon="saveall" align="left"></image>
+ <text key="menu_saveall"></text>
+ </link>
+ </part>
+ <part class="entry clickable filtered on-action-page on-action-file on-action-template on-action-pageelement">
+ <link type="dialog" title="message:menu_preview_desc" subaction="preview">
+ <image icon="page" align="left"></image>
+ <text key="menu_preview"></text>
+ </link>
+ </part>
+ <part class="entry clickable">
+ <link type="post" class="entry" title="message:USER_LOGOUT_DESC"
+ action="login" subaction="logout">
+ <image icon="close" align="left"></image>
+ <text key="USER_LOGOUT"></text>
+ </link>
+ </part>
+ </part>
+ </part>
+
+ <!-- Menü: Bearbeiten -->
+ <part class="menu">
+ <!-- <image icon="edit" align="left"></image>-->
+ <text key="edit"></text>
+ <image fileext="icon/menu.gif" align="left"></image>
+ <part class="dropdown">
+ <part class="entry clickable filtered on-action-link on-action-folder on-action-page on-action-template on-action-element on-action-file">
+ <link type="dialog" title="message:menu_prop_desc" subaction="prop">
+ <image icon="page" align="left"></image>
+ <text key="menu_prop"></text>
+ </link>
+ </part>
+ <part class="entry clickable filtered on-action-page on-action-file on-action-folder on-action-pageelement">
+ <link type="dialog" title="message:menu_pub_desc" subaction="pub">
+ <image icon="page" align="left"></image>
+ <text key="menu_pub"></text>
+ </link>
+ </part>
+ <part class="entry clickable filtered on-action-page">
+ <link type="dialog" title="message:menu_changetemplate_desc" subaction="changetemplate">
+ <image icon="page" align="left"></image>
+ <text key="menu_changetemplate"></text>
+ </link>
+ </part>
+ </part>
+ </part>
+
+
+ <!--
+ <part class="history"> <image icon="history" align="left"></image>
+ <text key="history" maxlength="20"></text> <part class="dropdown">
+ <text raw=""></text> </part> </part>
+ -->
+
+ <part class="projects">
+ <!-- <image icon="project" align="left"></image>-->
+ <text class="titletext" key="GLOBAL_PROJECTS"></text>
+ <part class="dropdown">
+ <list list="projects" key="id" value="name">
+ <part class="entry clickable">
+ <image icon="project"></image>
+ <link type="post" action="start" subaction="projectmenu" id="var:id">
+ <text var="name" maxlength="45"></text>
+ </link>
+ </part>
+ </list>
+ </part>
+ <image fileext="icon/menu.gif" align="left"></image>
+ </part>
+
+
+ <!-- Menü: Extras -->
+ <part class="menu">
+ <!-- <image icon="menu" align="left"></image>-->
+ <text key="extras"></text>
+ <image fileext="icon/menu.gif" align="left"></image>
+ <part class="dropdown">
+ <part class="entry clickable filtered on-action-folder on-action-link on-action-user on-action-page on-action-file">
+ <link type="dialog" title="message:menu_rights_desc" subaction="rights">
+ <image icon="page" align="left"></image>
+ <text key="menu_rights"></text>
+ </link>
+ </part>
+ <if true="method:userIsAdmin">
+ <part class="entry clickable">
+ <link type="post" class="entry" action="start" subaction="administration"
+ target="tree" id="-1">
+ <image icon="administration" align="left"></image>
+ <text key="administration"></text>
+ </link>
+ </part>
+ </if>
+ </part>
+ </part>
+
+
+
+
+
+ <part class="toolbar-icon clickable filtered on-action-folder on-action-file on-action-page on-action-link on-action-template on-action-element">
<link type="dialog" subaction="prop" title="message:menu_prop_desc">
<image icon="pageelement" align="left"></image>
</link>
</part>
- <part class="toolbar-icon clickable">
+ <part class="toolbar-icon clickable filtered on-action-folder on-action-file on-action-page on-action-link on-action-user">
<link type="dialog" subaction="rights" title="message:menu_rights_desc">
<image icon="pageelement" align="left"></image>
</link>
</part>
- <part class="toolbar-icon clickable">
+ <part class="toolbar-icon clickable filtered on-action-folder on-action-page on-action-file on-action-pageelement">
<link type="dialog" subaction="pub" title="message:menu_pub_desc">
<image icon="page" align="left"></image>
</link>
</part>
- <part class="toolbar-icon clickable">
+ <part class="toolbar-icon clickable filtered on-action-page">
<link type="dialog" subaction="changetemplate" title="message:menu_changetemplate_desc">
<image icon="template" align="left"></image>
</link>
</part>
- <part class="toolbar-icon clickable">
+ <part class="toolbar-icon clickable filtered on-action-page on-action-file on-action-pageelement on-action-template">
<link type="dialog" subaction="preview" title="message:menu_preview_desc">
<image icon="page" align="left"></image>
</link>
</part>
+
+
+
<part class="search">
<input name="text" hint="message:search" icon="search"></input>
<part class="dropdown">
@@ -62,15 +187,6 @@
<text key="start"></text>
</link>
</part>
- <if true="method:userIsAdmin">
- <part class="entry clickable">
- <link type="post" class="entry" action="start" subaction="administration"
- target="tree" id="-1">
- <image icon="administration" align="left"></image>
- <text key="administration"></text>
- </link>
- </part>
- </if>
<part class="entry clickable">
<link type="post" class="entry" title="message:USER_LOGOUT_DESC"
action="login" subaction="logout">
@@ -81,25 +197,4 @@
</part>
</part>
- <!--
- <part class="history"> <image icon="history" align="left"></image>
- <text key="history" maxlength="20"></text> <part class="dropdown">
- <text raw=""></text> </part> </part>
- -->
-
- <part class="projects">
- <image icon="project" align="left"></image>
- <text class="titletext" key="GLOBAL_PROJECTS"></text>
- <part class="dropdown">
- <list list="projects" key="id" value="name">
- <part class="entry clickable">
- <image icon="project"></image>
- <link type="post" action="start" subaction="projectmenu" id="var:id">
- <text var="name" maxlength="45"></text>
- </link>
- </part>
- </list>
- </part>
- <image fileext="icon/menu.gif" align="left"></image>
- </part>
</output>
\ No newline at end of file