diff options
author | Andrew Dolgov <[email protected]> | 2018-12-06 08:26:52 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-06 08:26:52 +0300 |
commit | 0a41c1a6e1e4d822d5ec970e918f83e7104b60f6 (patch) | |
tree | f66d63f4f77bec0353bdcb1c4be81cce0dbacd5f /classes/pref | |
parent | 6142e153478509fa8505fb86755ecd21291d8a59 (diff) |
update label rendering (and editor)
Diffstat (limited to 'classes/pref')
-rwxr-xr-x | classes/pref/filters.php | 4 | ||||
-rw-r--r-- | classes/pref/labels.php | 17 |
2 files changed, 9 insertions, 12 deletions
diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 0bb1493e5..514e126e1 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -320,10 +320,10 @@ class Pref_Filters extends Handler_Protected { $label_sth->execute([$line['action_param'], $_SESSION['uid']]); if ($label_row = $label_sth->fetch()) { - $fg_color = $label_row["fg_color"]; + //$fg_color = $label_row["fg_color"]; $bg_color = $label_row["bg_color"]; - $name[1] = "<span class=\"labelColorIndicator\" id=\"label-editor-indicator\" style='color : $fg_color; background-color : $bg_color; margin-right : 4px'>α</span>" . $name[1]; + $name[1] = "<i class=\"material-icons\" style='color : $bg_color; margin-right : 4px'>label</i>" . $name[1]; } } diff --git a/classes/pref/labels.php b/classes/pref/labels.php index 1e297818c..498e593fd 100644 --- a/classes/pref/labels.php +++ b/classes/pref/labels.php @@ -29,12 +29,9 @@ class Pref_Labels extends Handler_Protected { $fg_color = $line['fg_color']; $bg_color = $line['bg_color']; - print "<span class=\"labelColorIndicator\" id=\"label-editor-indicator\" style='color : $fg_color; background-color : $bg_color; margin-bottom : 4px; margin-right : 4px'>α</span>"; - - print "<input style=\"font-size : 16px\" name=\"caption\" - dojoType=\"dijit.form.ValidationTextBox\" - required=\"true\" - value=\"".htmlspecialchars($line['caption'])."\">"; + print "<input style='font-size : 16px; color : $fg_color; background : $bg_color; transition : background 0.1s linear' + id='labelEdit_caption' name='caption' dojoType='dijit.form.ValidationTextBox' + required='true' value=\"".htmlspecialchars($line['caption'])."\">"; print "</div>"; print "<div class=\"dlgSec\">" . __("Colors") . "</div>"; @@ -56,8 +53,8 @@ class Pref_Labels extends Handler_Protected { print "<div dojoType=\"dijit.ColorPalette\"> <script type=\"dojo/method\" event=\"onChange\" args=\"fg_color\"> - dijit.byId(\"labelEdit_fgColor\").attr('value', fg_color); - $('label-editor-indicator').setStyle({color: fg_color}); + dijit.byId('labelEdit_fgColor').attr('value', fg_color); + dijit.byId('labelEdit_caption').domNode.setStyle({color: fg_color}); </script> </div>"; print "</div>"; @@ -66,8 +63,8 @@ class Pref_Labels extends Handler_Protected { print "<div dojoType=\"dijit.ColorPalette\"> <script type=\"dojo/method\" event=\"onChange\" args=\"bg_color\"> - dijit.byId(\"labelEdit_bgColor\").attr('value', bg_color); - $('label-editor-indicator').setStyle({backgroundColor: bg_color}); + dijit.byId('labelEdit_bgColor').attr('value', bg_color); + dijit.byId('labelEdit_caption').domNode.setStyle({backgroundColor: bg_color}); </script> </div>"; print "</div>"; |