put a single [Add] button left of nm-header (opening selected type or task if not) and show dates popup right aligned

This commit is contained in:
Ralf Becker 2016-02-15 11:59:55 +00:00
parent aff27b4aaa
commit a4e350317e
6 changed files with 27 additions and 194 deletions

View File

@ -948,7 +948,6 @@ class infolog_ui
}
}
}
$values['nm']['header_row'] = 'infolog.index.header_right';
if ($values['nm']['filter']=='bydate')
{
foreach (array_keys($values['nm']['col_filter']) as $colfk)

View File

@ -214,6 +214,7 @@ app.classes.infolog = AppJS.extend(
if (filter && dates)
{
dates.set_disabled(false);
jQuery(this.et2.getWidgetById('startdate').getDOMNode()).find('input').focus();
}
break;
default:
@ -591,7 +592,7 @@ app.classes.infolog = AppJS.extend(
}
}
var extras = {
type: _type || nm_value.filter || "",
type: _type || nm_value.col_filter.info_type || "task",
cat_id: nm_value.cat_id || "",
action: nm_value.action || _action || "",
// egw_link can handle arrays, but server is expecting CSV
@ -660,7 +661,7 @@ app.classes.infolog = AppJS.extend(
* Insert text at the cursor position (or end) of a text field
*
* @param {et2_inputWidget|string} widget Either a widget object or it's ID
* @param {string} [text=timestamp username] Text to insert
* @param {string} text [text=timestamp username] Text to insert
*/
insert_text: function(widget, text)
{
@ -681,7 +682,7 @@ app.classes.infolog = AppJS.extend(
{
var now = new Date();
text = date(egw.preference('dateformat') + ' ' + (egw.preference("timeformat") === "12" ? "h:ia" : "H:i")+' ',now);
// Get properly formatted user name
var user = parseInt(egw.user('account_id'));
var accounts = egw.accounts('accounts');
@ -701,7 +702,7 @@ app.classes.infolog = AppJS.extend(
var browser = ((input.selectionStart || input.selectionStart == "0") ?
"standards" : (document.selection ? "ie" : false ) );
var pos = 0
var pos = 0;
// Find cursor or selection
if (browser == "ie")
@ -713,7 +714,7 @@ app.classes.infolog = AppJS.extend(
}
else if (browser == "standards")
{
pos = input.selectionStart
pos = input.selectionStart;
};
// Insert the text
@ -758,10 +759,10 @@ app.classes.infolog = AppJS.extend(
/**
* Make sure stylite javascript is loaded, and call the given callback when it is
*
*
* @param {function} callback
* @param {object} attrs
*
*
*/
_get_stylite: function(callback,attrs)
{

View File

@ -99,4 +99,10 @@ div#infolog-edit_infolog-edit-description {
#infolog-index #infolog-index_nm .egwGridView_scrollarea table.egwGridView_grid ul.et2_link_string li.et2_link {
display: inline-block;
}
div#infolog-index_infolog-index-dates {
position: absolute;
right: 12px;
top: 41px;
}

View File

@ -2,13 +2,8 @@
<!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
<!-- $Id$ -->
<overlay>
<template id="infolog.index.header_right" template="" lang="" group="0" version="1.9.001">
<hbox>
<description value="Add:" class="infolog_headertext"/>
<button statustext="Add a new ToDo" label="ToDo" id="add[task]" onclick="app.infolog.add_with_extras(widget,'task','$cont[action]','$cont[action_id]');" image="task"/>
<button statustext="Add a new Phonecall" label="Phonecall" id="add[phone]" onclick="app.infolog.add_with_extras(widget,'phone','$cont[action]','$cont[action_id]');" image="phone"/>
<button statustext="Add a new Note" label="Note" id="add[note]" onclick="app.infolog.add_with_extras(widget,'note','$cont[action]','$cont[action_id]');" image="note"/>
</hbox>
<template id="infolog.index.add" template="" lang="" group="0" version="1.9.001">
<button statustext="Add" id="add" image="add" background_image="true" onclick="app.infolog.add_with_extras(widget,'','$cont[action]','$cont[action_id]');"/>
</template>
<template id="infolog.index.dates" template="" lang="" group="0" version="1.9.001">
<hbox>
@ -164,7 +159,7 @@
<template id="header_right"/>
</row>
<row>
<nextmatch id="nm" template="infolog.index.rows" header_left="infolog.index.dates" span="all"/>
<nextmatch id="nm" template="infolog.index.rows" header_left="infolog.index.add" header_right="infolog.index.dates" span="all"/>
</row>
<row>
<hbox class=" ">

View File

@ -39,7 +39,7 @@
}
.normal,
.normal_done {
color: black;
color: #000000;
}
.high {
color: #cc0000;
@ -172,6 +172,11 @@ div#infolog-edit_infolog-edit-description {
#infolog-index #infolog-index_nm .egwGridView_scrollarea table.egwGridView_grid ul.et2_link_string li.et2_link {
display: inline-block;
}
div#infolog-index_infolog-index-dates {
position: absolute;
right: 12px;
top: 41px;
}
/* #############################################################################
// iframe
// Rahmen + padding**/
@ -240,105 +245,6 @@ div#infolog-edit_infolog-edit-description {
position: relative;
top: 5px;
}
#infolog-index #infolog-index_nm #infolog-index_infolog-index-header_right div.et2_box_widget {
/*border: 1px solid #0C5DA5;*/
/*box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);*/
/*text-shadow: none;*/
height: 24px;
margin-top: 0px;
margin-left: 12px;
padding: 4px;
/*background-color: @gray_10;*/
position: relative;
top: 5px;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-top-left-radius: 10px;
-moz-border-radius-topright: 3px;
-moz-border-radius-bottomright: 3px;
-moz-border-radius-bottomleft: 3px;
-moz-border-radius-topleft: 10px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
border-top-left-radius: 10px;
/*.background-clip(padding-box);*/
background-image: none !important;
transition: all 0.5s linear;
-webkit-transition: all 0.5s linear;
/* Safari */
/* &:before {
content: "+";
font-size: 20px;
color: @egw_color_1_a;
line-height: 1px;
position: relative;
top: 2px;
text-shadow: 1px 1px 2px #000;*/
/*.Complete_Button_Icon_normal;*/
/*.dimension_width_height_sm;*/
/*}*/
/*Text ""hinzufügen" "*/
/*MouseOver*/
/* &:hover {
.box_shadow_standard_light_hover;
background-color: fade(@egw_color_2_a, 80%) !important;
.border_radius_button_lefttop;
.dimension_height_sm;
&:before {content: ""; font-size: 1em;padding-left: 5px;}
Text
span {visibility: hidden; display: none;};
img {.scale; margin: 0 5px; background: @gray_0;}
}*/
}
#infolog-index #infolog-index_nm #infolog-index_infolog-index-header_right div.et2_box_widget span {
display: none;
}
#infolog-index #infolog-index_nm #infolog-index_infolog-index-header_right div.et2_box_widget img {
/*.gradient_vertical (@egw_color_2_a, @egw_color_2_a);*/
/*.background_color_10_gray;*/
-webkit-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5);
border: 1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
width: 20px;
height: 20px;
margin-left: 0.5em;
padding: 0px;
margin-top: 0px;
vertical-align: middle;
}
#infolog-index #infolog-index_nm #infolog-index_infolog-index-header_right div.et2_box_widget img:hover {
/*.background_color_20_gray;*/
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
-moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
border: 1px solid rgba(0, 0, 0, 0.5);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #189800;
}
#infolog-index #infolog-index_nm #infolog-index_infolog-index-header_right div.et2_box_widget img:active {
/*.background_color_30_gray;*/
border: 1px solid rgba(0, 0, 0, 0.9);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.5);
-moz-box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.5);
box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.5);
background-color: #1aa200;
}
#infolog-index #infolog-index_nm #infolog-index_infolog-index-header_right div.et2_box_widget img:last-child {
margin-right: 5px;
}
#infolog-index #infolog-index_nm table.egwGridView_outer thead tr th.optcol .selectcols {
margin-top: 1.5%;
}

View File

@ -132,80 +132,6 @@
}
// box for add stuff
#infolog-index_infolog-index-header_right{
div.et2_box_widget{
/*border: 1px solid #0C5DA5;*/
/*box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);*/
/*text-shadow: none;*/
.dimension_height_m;
margin-top: 0px;
margin-left: 12px;
padding: 4px;
/*background-color: @gray_10;*/
position: relative;
top: 5px;
.border_radius(3px, 3px, 3px, 10px);
background-image: none !important;
transition: all 0.5s linear;
-webkit-transition: all 0.5s linear; /* Safari */
/* &:before {
content: "+";
font-size: 20px;
color: @egw_color_1_a;
line-height: 1px;
position: relative;
top: 2px;
text-shadow: 1px 1px 2px #000;*/
/*.Complete_Button_Icon_normal;*/
/*.dimension_width_height_sm;*/
/*}*/
/*Text ""hinzufügen" "*/
span {display: none;}
// IMG
img {
/*.gradient_vertical (@egw_color_2_a, @egw_color_2_a);*/
.Complete_Button_Icon_normal;
.dimension_width_height_sm;
margin-left: 0.5em;
padding: 0px;
margin-top: 0px;
vertical-align: middle;
&:hover{.Complete_Button_Icon_hover ; background-color: @color_positive_action;}
&:active { .Complete_Button_Icon_active ; background-color: @color_positive_action_active;}
}
img:last-child {margin-right: 5px;};
/*MouseOver*/
/* &:hover {
.box_shadow_standard_light_hover;
background-color: fade(@egw_color_2_a, 80%) !important;
.border_radius_button_lefttop;
.dimension_height_sm;
&:before {content: ""; font-size: 1em;padding-left: 5px;}
Text
span {visibility: hidden; display: none;};
img {.scale; margin: 0 5px; background: @gray_0;}
}*/
}
}// END BOX WIDGET
// ##################################
// Listendarstellung
.egwGridView_outer {}
@ -407,7 +333,7 @@ button#infolog-edit_timestamp {
/* tablets and smartphones */
@media only screen and (max-device-width:1024px) {
#infolog-index_nm .gridCont_0_div_col_0.innerContainer {
min-width: auto;
}
@ -451,7 +377,7 @@ button#infolog-edit_timestamp {
overflow: hidden;
padding-right: 8px;
}
}
}
ul[id^='infolog-index_'][id$='filelinks]']
{
white-space: nowrap !important;
@ -460,7 +386,7 @@ button#infolog-edit_timestamp {
span[id^='infolog-index_'][id$='info_subject]'] {
white-space: nowrap;
}
}
}
label[id^='infolog-index_'][id$='info_link]']
{
white-space: nowrap;
@ -470,7 +396,7 @@ button#infolog-edit_timestamp {
.mob-fontsize-s;
font-weight: normal;
}
infolog_rowHasSubs span.arrow,
infolog_rowHasSubs span.arrow,
table.egwGridView_grid span.arrow.closed{
display: none !important;
}