plugins: note,shared - move to iconfont

This commit is contained in:
Andrew Dolgov 2018-12-05 22:19:46 +03:00
parent cd57fd33cc
commit 9703162f57
11 changed files with 25 additions and 18 deletions

View File

@ -5,7 +5,8 @@
flex-wrap : nowrap;
}
.header img, .footer img {
.header img, .footer img,
.footer i {
margin : 0px 4px;
vertical-align: middle;
}

View File

@ -1029,7 +1029,8 @@ body.ttrss_main .hl.published .left i.pub-pic {
flex-wrap: nowrap;
}
.cdm .header img,
.cdm .footer img {
.cdm .footer img,
.cdm .footer i {
margin: 0px 4px;
vertical-align: middle;
}

File diff suppressed because one or more lines are too long

View File

@ -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

View File

@ -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
View File

@ -0,0 +1,3 @@
i.icon-share.shared {
color : #0a0;
}

View File

@ -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");
}
};

View File

@ -1029,7 +1029,8 @@ body.ttrss_main .hl.published .left i.pub-pic {
flex-wrap: nowrap;
}
.cdm .header img,
.cdm .footer img {
.cdm .footer img,
.cdm .footer i {
margin: 0px 4px;
vertical-align: middle;
}

File diff suppressed because one or more lines are too long