mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 10:05:56 +00:00
plugins: note,shared - move to iconfont
This commit is contained in:
@@ -22,10 +22,8 @@ class Note extends Plugin {
|
||||
|
||||
|
||||
function hook_article_button($line) {
|
||||
return "<img src=\"plugins/note/note.png\"
|
||||
style=\"cursor : pointer\" style=\"cursor : pointer\"
|
||||
onclick=\"Plugins.Note.edit(".$line["id"].")\"
|
||||
class='tagsPic' title='".__('Edit article note')."'>";
|
||||
return "<i class='material-icons' onclick=\"Plugins.Note.edit(".$line["id"].")\"
|
||||
style='cursor : pointer' title='".__('Edit article note')."'>note_add</i>";
|
||||
}
|
||||
|
||||
function edit() {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 500 B |
@@ -20,6 +20,10 @@ class Share extends Plugin {
|
||||
return file_get_contents(dirname(__FILE__) . "/share.js");
|
||||
}
|
||||
|
||||
function get_css() {
|
||||
return file_get_contents(dirname(__FILE__) . "/share.css");
|
||||
}
|
||||
|
||||
function get_prefs_js() {
|
||||
return file_get_contents(dirname(__FILE__) . "/share_prefs.js");
|
||||
}
|
||||
@@ -72,12 +76,11 @@ class Share extends Plugin {
|
||||
}
|
||||
|
||||
function hook_article_button($line) {
|
||||
$img = $line['uuid'] ? "share.png" : "notshared.png";
|
||||
$img_class = $line['uuid'] ? "shared" : "";
|
||||
|
||||
return "<img id='SHARE-IMG-".$line['int_id']."' src=\"plugins/share/$img\"
|
||||
class='tagsPic' style=\"cursor : pointer\"
|
||||
onclick=\"Plugins.Share.shareArticle(".$line['int_id'].")\"
|
||||
title='".__('Share by URL')."'>";
|
||||
return "<i id='SHARE-IMG-".$line['int_id']."' class='material-icons icon-share $img_class'
|
||||
style='cursor : pointer' onclick=\"Plugins.Share.shareArticle(".$line['int_id'].")\"
|
||||
title='".__('Share by URL')."'>share</i>";
|
||||
}
|
||||
|
||||
function shareArticle() {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 657 B |
3
plugins/share/share.css
Normal file
3
plugins/share/share.css
Normal file
@@ -0,0 +1,3 @@
|
||||
i.icon-share.shared {
|
||||
color : #0a0;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ Plugins.Share = {
|
||||
new Effect.Highlight(e);
|
||||
|
||||
const img = $("SHARE-IMG-" + id);
|
||||
if (img) img.src = img.src.replace("notshared.png", "share.png");
|
||||
img.addClassName("shared");
|
||||
|
||||
Notify.close();
|
||||
|
||||
@@ -54,8 +54,8 @@ Plugins.Share = {
|
||||
xhrPost("backend.php", query, () => {
|
||||
notify("Article unshared.");
|
||||
|
||||
var img = $("SHARE-IMG-" + id);
|
||||
if (img) img.src = img.src.replace("share.png", "notshared.png");
|
||||
const img = $("SHARE-IMG-" + id);
|
||||
img.removeClassName("shared");
|
||||
|
||||
dialog.hide();
|
||||
});
|
||||
@@ -68,7 +68,7 @@ Plugins.Share = {
|
||||
dialog.show();
|
||||
|
||||
const img = $("SHARE-IMG-" + id);
|
||||
if (img) img.src = img.src.replace("notshared.png", "share.png");
|
||||
img.addClassName("shared");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user