From: Michael M Slusarz Date: Mon, 26 Apr 2010 19:32:46 +0000 (-0600) Subject: Improved flag prefs display - no need to show HTML color codes to users X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ec0d1b6c583dbffb2b39aa30575895caa7dea23d;p=horde.git Improved flag prefs display - no need to show HTML color codes to users --- diff --git a/imp/js/flagprefs.js b/imp/js/flagprefs.js index ad93bb061..8f467e2d9 100644 --- a/imp/js/flagprefs.js +++ b/imp/js/flagprefs.js @@ -29,18 +29,21 @@ var ImpFlagPrefs = { return; } - var elt = e.element(), elt2, id; + var elt = e.element(), elt2; while (Object.isElement(elt)) { if (elt.hasClassName('flagcolorpicker')) { elt2 = elt.previous('INPUT'); - id = elt2.readAttribute('id'); new ColorPicker({ color: $F(elt2), draggable: true, offsetParent: elt, resizable: true, - update: [[ id, 'value' ], [ id, 'background' ]] + update: [ + [ elt2, 'value' ], + [ elt2, 'background' ], + [ elt.previous('DIV.flagUser'), 'background' ] + ] }); e.stop(); return; diff --git a/imp/lib/Prefs/Ui.php b/imp/lib/Prefs/Ui.php index d06c1733f..cf97683ae 100644 --- a/imp/lib/Prefs/Ui.php +++ b/imp/lib/Prefs/Ui.php @@ -875,7 +875,6 @@ class IMP_Prefs_Ui if ($val['t'] == 'imapp') { $tmp['label'] = $label; - $tmp['icon'] = $bgstyle; $tmp['imapp'] = true; $tmp['label_name'] = 'label_' . $hash; if ($userflags_locked) { diff --git a/imp/templates/prefs/flags.html b/imp/templates/prefs/flags.html index 409f0d712..1352992f6 100644 --- a/imp/templates/prefs/flags.html +++ b/imp/templates/prefs/flags.html @@ -23,17 +23,14 @@ - -
- + - - - - + + +
diff --git a/imp/themes/screen.css b/imp/themes/screen.css index 1760a9f66..8040113cf 100644 --- a/imp/themes/screen.css +++ b/imp/themes/screen.css @@ -384,6 +384,12 @@ table.accountsmanagement thead td, table.flagmanagement thead td { font-weight: bold; text-decoration: underline; } + +table.flagmanagement div.flagUser { + border: 1px solid gray; + margin-right: 2px; +} + table.accountsmanagement td.required, .accountsNotSecure { color: red; }