From a4e350317e4d234dcdc1a671772aff6c9052244c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 15 Feb 2016 11:59:55 +0000 Subject: [PATCH] put a single [Add] button left of nm-header (opening selected type or task if not) and show dates popup right aligned --- infolog/inc/class.infolog_ui.inc.php | 1 - infolog/js/app.js | 15 ++-- infolog/templates/default/app.css | 6 ++ infolog/templates/default/index.xet | 11 +-- infolog/templates/pixelegg/app.css | 106 ++------------------------- infolog/templates/pixelegg/app.less | 82 +-------------------- 6 files changed, 27 insertions(+), 194 deletions(-) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index 5334338848..3d1903b937 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -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) diff --git a/infolog/js/app.js b/infolog/js/app.js index e4156d78d5..9bbbafa18a 100644 --- a/infolog/js/app.js +++ b/infolog/js/app.js @@ -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) { diff --git a/infolog/templates/default/app.css b/infolog/templates/default/app.css index 18cb417236..757cd6e921 100644 --- a/infolog/templates/default/app.css +++ b/infolog/templates/default/app.css @@ -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; } \ No newline at end of file diff --git a/infolog/templates/default/index.xet b/infolog/templates/default/index.xet index 15ab65ccd8..1ce1e1373a 100644 --- a/infolog/templates/default/index.xet +++ b/infolog/templates/default/index.xet @@ -2,13 +2,8 @@ -