From 6a2bd8b29fa8e7e4e70fc392a6c073ea3b518625 Mon Sep 17 00:00:00 2001 From: Olaf Conradi Date: Mon, 31 Dec 2012 00:01:15 +0100 Subject: [PATCH 1/3] Don't replace data-src with src in acl-template On pageload an empty acl-list-item as template is created and not yet replaced. Don't change the data-src for src attributes in those images. --- js/acl.js | 5 ++--- view/theme/frost-mobile/js/acl.js | 5 ++--- view/theme/frost/js/acl.js | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/js/acl.js b/js/acl.js index 36cf74970f..35342a5c14 100644 --- a/js/acl.js +++ b/js/acl.js @@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){ //console.log(html); that.list_content.append(html); }); - $(".acl-list-item img[data-src]").each(function(i, el){ - // Replace data-src attribute with src attribute for every image + $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){ + // Add data-src attribute with src attribute for every image $(el).attr('src', $(el).data("src")); - $(el).removeAttr("data-src"); }); that.update_view(); } diff --git a/view/theme/frost-mobile/js/acl.js b/view/theme/frost-mobile/js/acl.js index 20f0d46189..c22991dd69 100644 --- a/view/theme/frost-mobile/js/acl.js +++ b/view/theme/frost-mobile/js/acl.js @@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){ //console.log(html); that.list_content.append(html); }); - $(".acl-list-item img[data-src]").each(function(i, el){ - // Replace data-src attribute with src attribute for every image + $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){ + // Add data-src attribute with src attribute for every image $(el).attr('src', $(el).data("src")); - $(el).removeAttr("data-src"); }); that.update_view(); } diff --git a/view/theme/frost/js/acl.js b/view/theme/frost/js/acl.js index 6b443b2481..95067f1749 100644 --- a/view/theme/frost/js/acl.js +++ b/view/theme/frost/js/acl.js @@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){ //console.log(html); that.list_content.append(html); }); - $(".acl-list-item img[data-src]").each(function(i, el){ - // Replace data-src attribute with src attribute for every image + $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){ + // Add data-src attribute with src attribute for every image $(el).attr('src', $(el).data("src")); - $(el).removeAttr("data-src"); }); that.update_view(); } From e56c04157909c11905ec9eb85d36f72a2c59c807 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 2 Jan 2013 11:10:24 +0100 Subject: [PATCH 2/3] DE: update to the strings --- view/de/messages.po | 12 ++++++------ view/de/strings.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/view/de/messages.po b/view/de/messages.po index 400dce4390..a3624c4aba 100644 --- a/view/de/messages.po +++ b/view/de/messages.po @@ -16,16 +16,16 @@ # , 2012. # Oliver , 2012. # , 2012. -# , 2011-2012. +# , 2011-2013. # , 2011-2012. # , 2011. msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: http://bugs.friendica.com/\n" -"POT-Creation-Date: 2012-12-31 10:00-0800\n" -"PO-Revision-Date: 2012-12-31 11:02+0000\n" -"Last-Translator: Sennewood \n" +"POT-Creation-Date: 2013-01-01 10:00-0800\n" +"PO-Revision-Date: 2013-01-02 10:07+0000\n" +"Last-Translator: bavatar \n" "Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -9567,11 +9567,11 @@ msgstr "%s mag das nicht." #: ../../include/conversation.php:884 msgid "like this" -msgstr "mag ich" +msgstr "mögen dies" #: ../../include/conversation.php:888 msgid "don't like this" -msgstr "mag ich nicht" +msgstr "mögen dies nicht" #: ../../include/conversation.php:895 msgid "people" diff --git a/view/de/strings.php b/view/de/strings.php index 22b23f79bb..cea444b16a 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -2059,8 +2059,8 @@ $a->strings["Delete Selected Items"] = "Lösche die markierten Beiträge"; $a->strings["Follow Thread"] = "Folge der Unterhaltung"; $a->strings["%s likes this."] = "%s mag das."; $a->strings["%s doesn't like this."] = "%s mag das nicht."; -$a->strings["like this"] = "mag ich"; -$a->strings["don't like this"] = "mag ich nicht"; +$a->strings["like this"] = "mögen dies"; +$a->strings["don't like this"] = "mögen dies nicht"; $a->strings["people"] = "Leute"; $a->strings["and"] = "und"; $a->strings[", and %d other people"] = " und %d andere"; From 2943550fe289c67cbb1fcb50afa79ac2460a929d Mon Sep 17 00:00:00 2001 From: Olaf Conradi Date: Wed, 2 Jan 2013 14:28:13 +0100 Subject: [PATCH 3/3] No need to remove data-src attributes Better comment string also --- js/acl.js | 2 +- js/main.js | 3 +-- view/theme/frost-mobile/js/acl.js | 2 +- view/theme/frost-mobile/js/main.js | 3 +-- view/theme/frost/js/acl.js | 2 +- view/theme/frost/js/main.js | 3 +-- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/js/acl.js b/js/acl.js index 35342a5c14..abdab97da1 100644 --- a/js/acl.js +++ b/js/acl.js @@ -254,7 +254,7 @@ ACL.prototype.populate = function(data){ that.list_content.append(html); }); $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){ - // Add data-src attribute with src attribute for every image + // Add src attribute for images with a data-src attribute $(el).attr('src', $(el).data("src")); }); that.update_view(); diff --git a/js/main.js b/js/main.js index 5cdf2a0804..f17d1eaa0f 100644 --- a/js/main.js +++ b/js/main.js @@ -183,9 +183,8 @@ }); $("img[data-src]", nnm).each(function(i, el){ - // Replace data-src attribute with src attribute for every image + // Add src attribute for images with a data-src attribute $(el).attr('src', $(el).data("src")); - $(el).removeAttr("data-src"); }); } diff --git a/view/theme/frost-mobile/js/acl.js b/view/theme/frost-mobile/js/acl.js index c22991dd69..4e319577f7 100644 --- a/view/theme/frost-mobile/js/acl.js +++ b/view/theme/frost-mobile/js/acl.js @@ -254,7 +254,7 @@ ACL.prototype.populate = function(data){ that.list_content.append(html); }); $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){ - // Add data-src attribute with src attribute for every image + // Add src attribute for images with a data-src attribute $(el).attr('src', $(el).data("src")); }); that.update_view(); diff --git a/view/theme/frost-mobile/js/main.js b/view/theme/frost-mobile/js/main.js index 197d496646..5a15b081bd 100644 --- a/view/theme/frost-mobile/js/main.js +++ b/view/theme/frost-mobile/js/main.js @@ -189,9 +189,8 @@ }); $("img[data-src]", nnm).each(function(i, el){ - // Replace data-src attribute with src attribute for every image + // Add src attribute for images with a data-src attribute $(el).attr('src', $(el).data("src")); - $(el).removeAttr("data-src"); }); } notif = eNotif.attr('count'); diff --git a/view/theme/frost/js/acl.js b/view/theme/frost/js/acl.js index 95067f1749..1c843d7fe3 100644 --- a/view/theme/frost/js/acl.js +++ b/view/theme/frost/js/acl.js @@ -254,7 +254,7 @@ ACL.prototype.populate = function(data){ that.list_content.append(html); }); $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){ - // Add data-src attribute with src attribute for every image + // Add src attribute for images with a data-src attribute $(el).attr('src', $(el).data("src")); }); that.update_view(); diff --git a/view/theme/frost/js/main.js b/view/theme/frost/js/main.js index 91e79ffc38..e47ecff376 100644 --- a/view/theme/frost/js/main.js +++ b/view/theme/frost/js/main.js @@ -181,9 +181,8 @@ }); $("img[data-src]", nnm).each(function(i, el){ - // Replace data-src attribute with src attribute for every image + // Add src attribute for images with a data-src attribute $(el).attr('src', $(el).data("src")); - $(el).removeAttr("data-src"); }); } notif = eNotif.attr('count');