diff options
Diffstat (limited to 'classes/pref/labels.php')
-rw-r--r-- | classes/pref/labels.php | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/classes/pref/labels.php b/classes/pref/labels.php index 1e297818c..a58e33ac9 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>"; @@ -147,13 +144,11 @@ class Pref_Labels extends Handler_Protected { $sth->execute([$fg, $bg, $id, $_SESSION['uid']]); } - $caption = Labels::find_caption($id, $_SESSION["uid"]); - /* Remove cached data */ $sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET label_cache = '' - WHERE label_cache LIKE ? AND owner_uid = ?"); - $sth->execute(["%$caption%", $_SESSION['uid']]); + WHERE owner_uid = ?"); + $sth->execute([$_SESSION['uid']]); } } @@ -166,13 +161,11 @@ class Pref_Labels extends Handler_Protected { AND owner_uid = ?"); $sth->execute([$id, $_SESSION['uid']]); - $caption = Labels::find_caption($id, $_SESSION["uid"]); - /* Remove cached data */ $sth = $this->pdo->prepare("UPDATE ttrss_user_entries SET label_cache = '' - WHERE label_cache LIKE ? AND owner_uid = ?"); - $sth->execute(["%$caption%", $_SESSION['uid']]); + WHERE owner_uid = ?"); + $sth->execute([$_SESSION['uid']]); } } @@ -262,11 +255,11 @@ class Pref_Labels extends Handler_Protected { function index() { - print "<div id=\"pref-label-wrap\" dojoType=\"dijit.layout.BorderContainer\" gutters=\"false\">"; - print "<div id=\"pref-label-header\" dojoType=\"dijit.layout.ContentPane\" region=\"top\">"; - print "<div id=\"pref-label-toolbar\" dojoType=\"dijit.Toolbar\">"; + print "<div dojoType='dijit.layout.BorderContainer' gutters='false'>"; + print "<div style='padding : 0px' dojoType='dijit.layout.ContentPane' region='top'>"; + print "<div dojoType='dijit.Toolbar'>"; - print "<div dojoType=\"dijit.form.DropDownButton\">". + print "<div dojoType='dijit.form.DropDownButton'>". "<span>" . __('Select')."</span>"; print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">"; print "<div onclick=\"dijit.byId('labelTree').model.setAllChecked(true)\" @@ -287,7 +280,7 @@ class Pref_Labels extends Handler_Protected { print "</div>"; #toolbar print "</div>"; #pane - print "<div id=\"pref-label-content\" dojoType=\"dijit.layout.ContentPane\" region=\"center\">"; + print "<div style='padding : 0px' dojoType=\"dijit.layout.ContentPane\" region=\"center\">"; print "<div id=\"labellistLoading\"> <img src='images/indicator_tiny.gif'>". |