Show More
@@ -1,68 +1,69 b'' | |||||
1 | bc8fce57a613175450b8b6d933cdd85f22c04658 1.1 |
|
1 | bc8fce57a613175450b8b6d933cdd85f22c04658 1.1 | |
2 | 784258eb652c563c288ca7652c33f52cd4733d83 1.1-stable |
|
2 | 784258eb652c563c288ca7652c33f52cd4733d83 1.1-stable | |
3 | 1b53a22467a8fccc798935d7a26efe78e4bc7b25 1.2-stable |
|
3 | 1b53a22467a8fccc798935d7a26efe78e4bc7b25 1.2-stable | |
4 | 1713fb7543386089e364c39703b79e57d3d851f0 1.3 |
|
4 | 1713fb7543386089e364c39703b79e57d3d851f0 1.3 | |
5 | 80f183ebbe132ea8433eacae9431360f31fe7083 1.4 |
|
5 | 80f183ebbe132ea8433eacae9431360f31fe7083 1.4 | |
6 | 4330ff5a2bf6c543d8aaae8a43de1dc062f3bd13 1.4.1 |
|
6 | 4330ff5a2bf6c543d8aaae8a43de1dc062f3bd13 1.4.1 | |
7 | 8531d7b001392289a6b761f38c73a257606552ad 1.5 |
|
7 | 8531d7b001392289a6b761f38c73a257606552ad 1.5 | |
8 | 78e843c8b04b5a81cee5aa24601e305fae75da24 1.5.1 |
|
8 | 78e843c8b04b5a81cee5aa24601e305fae75da24 1.5.1 | |
9 | 4f92838730ed9aa1d17651bbcdca19a097fd0c37 1.6 |
|
9 | 4f92838730ed9aa1d17651bbcdca19a097fd0c37 1.6 | |
10 | 4bac2f37ea463337ddd27f98e7985407a74de504 1.7 |
|
10 | 4bac2f37ea463337ddd27f98e7985407a74de504 1.7 | |
11 | 1c4febea92c6503ae557fba73b2768659ae90d24 1.7.1 |
|
11 | 1c4febea92c6503ae557fba73b2768659ae90d24 1.7.1 | |
12 | 56a4a4578fc454ee455e33dd74a2cc82234bcb59 1.7.2 |
|
12 | 56a4a4578fc454ee455e33dd74a2cc82234bcb59 1.7.2 | |
13 | 34d6f3d5deb22be56b6c1512ec654bd7f6e03bcc 1.7.3 |
|
13 | 34d6f3d5deb22be56b6c1512ec654bd7f6e03bcc 1.7.3 | |
14 | f5cca33d29c673b67d43f310bebc4e3a21c6d04c 1.7.4 |
|
14 | f5cca33d29c673b67d43f310bebc4e3a21c6d04c 1.7.4 | |
15 | 7f7c33ba6e3f3797ca866c5ed5d358a2393f1371 1.8 |
|
15 | 7f7c33ba6e3f3797ca866c5ed5d358a2393f1371 1.8 | |
16 | a6b9dd9547bdc17b681502efcceb17aa5c09adf4 1.8.1 |
|
16 | a6b9dd9547bdc17b681502efcceb17aa5c09adf4 1.8.1 | |
17 | 8318fa1615d1946e4519f5735ae880909521990d 2.0 |
|
17 | 8318fa1615d1946e4519f5735ae880909521990d 2.0 | |
18 | e23590ee7e2067a3f0fc3cbcfd66404b47127feb 2.1 |
|
18 | e23590ee7e2067a3f0fc3cbcfd66404b47127feb 2.1 | |
19 | 4d998aba79e4abf0a2e78e93baaa2c2800b1c49c 2.2 |
|
19 | 4d998aba79e4abf0a2e78e93baaa2c2800b1c49c 2.2 | |
20 | 07fdef4ac33a859250d03f17c594089792bca615 2.2.1 |
|
20 | 07fdef4ac33a859250d03f17c594089792bca615 2.2.1 | |
21 | bcc74d45f060ecd3ff06ff448165aea0d026cb3e 2.2.2 |
|
21 | bcc74d45f060ecd3ff06ff448165aea0d026cb3e 2.2.2 | |
22 | b0e629ff24eb47a449ecfb455dc6cc600d18c9e2 2.2.3 |
|
22 | b0e629ff24eb47a449ecfb455dc6cc600d18c9e2 2.2.3 | |
23 | 1b52ba60f17fd7c90912c14d9d17e880b7952d01 2.2.4 |
|
23 | 1b52ba60f17fd7c90912c14d9d17e880b7952d01 2.2.4 | |
24 | 957e2fec91468f739b0fc2b9936d564505048c68 2.3.0 |
|
24 | 957e2fec91468f739b0fc2b9936d564505048c68 2.3.0 | |
25 | bb91141c6ea5c822ccbe2d46c3c48bdab683b77d 2.4.0 |
|
25 | bb91141c6ea5c822ccbe2d46c3c48bdab683b77d 2.4.0 | |
26 | 97eb184637e5691b288eaf6b03e8971f3364c239 2.5.0 |
|
26 | 97eb184637e5691b288eaf6b03e8971f3364c239 2.5.0 | |
27 | 119fafc5381b933bf30d97be0b278349f6135075 2.5.1 |
|
27 | 119fafc5381b933bf30d97be0b278349f6135075 2.5.1 | |
28 | d528d76d3242cced614fa11bb63f3d342e4e1d09 2.5.2 |
|
28 | d528d76d3242cced614fa11bb63f3d342e4e1d09 2.5.2 | |
29 | 1b631781ced34fbdeec032e7674bc4e131724699 2.6.0 |
|
29 | 1b631781ced34fbdeec032e7674bc4e131724699 2.6.0 | |
30 | 0f2ef17dc0de678ada279bf7eedf6c5585f1fd7a 2.6.1 |
|
30 | 0f2ef17dc0de678ada279bf7eedf6c5585f1fd7a 2.6.1 | |
31 | d53fc814a424d7fd90f23025c87b87baa164450e 2.7.0 |
|
31 | d53fc814a424d7fd90f23025c87b87baa164450e 2.7.0 | |
32 | 836d8bb9fcd930b952b9a02029442c71c2441983 2.8.0 |
|
32 | 836d8bb9fcd930b952b9a02029442c71c2441983 2.8.0 | |
33 | dfb6c481b1a2c33705de9a9b5304bc924c46b202 2.8.1 |
|
33 | dfb6c481b1a2c33705de9a9b5304bc924c46b202 2.8.1 | |
34 | 4a5bec08ccfb47a27f9e98698f12dd5b7246623b 2.8.2 |
|
34 | 4a5bec08ccfb47a27f9e98698f12dd5b7246623b 2.8.2 | |
35 | 604935b98f5b5e4a5e903594f048046e1fbb3519 2.8.3 |
|
35 | 604935b98f5b5e4a5e903594f048046e1fbb3519 2.8.3 | |
36 | c48ffdc671566069ed0f33644da1229277f3cd18 2.9.0 |
|
36 | c48ffdc671566069ed0f33644da1229277f3cd18 2.9.0 | |
37 | d66dc192d4e089ba85325afeef5229b73cb0fde4 2.10.0 |
|
37 | d66dc192d4e089ba85325afeef5229b73cb0fde4 2.10.0 | |
38 | 1c22a38cca9ae3bee13d6f263792c0629d0061f6 2.10.1 |
|
38 | 1c22a38cca9ae3bee13d6f263792c0629d0061f6 2.10.1 | |
39 | 3076e0d03339f3b41dcc71fb6af2b4169920846c 2.11.0 |
|
39 | 3076e0d03339f3b41dcc71fb6af2b4169920846c 2.11.0 | |
40 | 9cffa58fae74952b8ffe70328af88a5df17059c1 2.12.0 |
|
40 | 9cffa58fae74952b8ffe70328af88a5df17059c1 2.12.0 | |
41 | f5caa9e46201ed5b3f1e31655fb4d57bc1b89ab1 3.0.0 |
|
41 | f5caa9e46201ed5b3f1e31655fb4d57bc1b89ab1 3.0.0 | |
42 | df2ee5df6e73363c8d8fd8f22b87e1a2b21544d4 3.1.0 |
|
42 | df2ee5df6e73363c8d8fd8f22b87e1a2b21544d4 3.1.0 | |
43 | 3504151c4799f4e33fb7ff846b119d5693c74145 3.2.0 |
|
43 | 3504151c4799f4e33fb7ff846b119d5693c74145 3.2.0 | |
44 | a03f50d9723e618d011fde7dcc7288bc6861346e 3.2.1 |
|
44 | a03f50d9723e618d011fde7dcc7288bc6861346e 3.2.1 | |
45 | 507a67acbf2e8dc287ba796fa7e5700f8f725bac 3.2.2 |
|
45 | 507a67acbf2e8dc287ba796fa7e5700f8f725bac 3.2.2 | |
46 | 1376f5fc44354b4dff69631ad187d57690c0d460 3.3.0 |
|
46 | 1376f5fc44354b4dff69631ad187d57690c0d460 3.3.0 | |
47 | 21e5d408a1a59aec0e3a97cb206d70c8ce34e9b8 3.3.1 |
|
47 | 21e5d408a1a59aec0e3a97cb206d70c8ce34e9b8 3.3.1 | |
48 | f2d19a1cde13d82a3803a7d73a4f9c114ed00e7e 3.3.2 |
|
48 | f2d19a1cde13d82a3803a7d73a4f9c114ed00e7e 3.3.2 | |
49 | bb195ee1fe07d68b6fccfdde1dbe7c4dd430e15d 3.3.3 |
|
49 | bb195ee1fe07d68b6fccfdde1dbe7c4dd430e15d 3.3.3 | |
50 | 19785af352684884f94566785ba1b13b3ddc5216 3.4.0 |
|
50 | 19785af352684884f94566785ba1b13b3ddc5216 3.4.0 | |
51 | 757b4ada4ca121db4296b13ec0df491645db8fd0 3.5.0 |
|
51 | 757b4ada4ca121db4296b13ec0df491645db8fd0 3.5.0 | |
52 | 3da1a2d02072eec5419956265dcd8c7f47155c12 4.0.0 |
|
52 | 3da1a2d02072eec5419956265dcd8c7f47155c12 4.0.0 | |
53 | da8f0f9d5099ee8b22aa317b91beb06543011f1d 4.1.0 |
|
53 | da8f0f9d5099ee8b22aa317b91beb06543011f1d 4.1.0 | |
54 | 9619ecc0f79b705c94b3ac873896809eaf7779a6 4.1.1 |
|
54 | 9619ecc0f79b705c94b3ac873896809eaf7779a6 4.1.1 | |
55 | c1cb275ca4ed13d2205c1e9f073d0260cb0db58b 4.2.0 |
|
55 | c1cb275ca4ed13d2205c1e9f073d0260cb0db58b 4.2.0 | |
56 | 4553bf1fa38e2f926e6f38c31e964abdb518411c 4.3.0 |
|
56 | 4553bf1fa38e2f926e6f38c31e964abdb518411c 4.3.0 | |
57 | 5479c7f5f3e00d9886b07803eeee8edd9e26a9d8 4.4.0 |
|
57 | 5479c7f5f3e00d9886b07803eeee8edd9e26a9d8 4.4.0 | |
58 | 9a6dc4edfecb2c6f734116f85dc22f73fde21e47 4.5.0 |
|
58 | 9a6dc4edfecb2c6f734116f85dc22f73fde21e47 4.5.0 | |
59 | 0b571b3a99ef6accdf0b2b89431180c80911bf15 4.6.0 |
|
59 | 0b571b3a99ef6accdf0b2b89431180c80911bf15 4.6.0 | |
60 | c4f7fde891d9d268977ebabea77aeac8ae492932 4.7.0 |
|
60 | c4f7fde891d9d268977ebabea77aeac8ae492932 4.7.0 | |
61 | 0caa02d51f32f8695ec22bdf0cb72d1a440a6c31 4.7.1 |
|
61 | 0caa02d51f32f8695ec22bdf0cb72d1a440a6c31 4.7.1 | |
62 | 75a09d9014b924c41ee13d564b4c0f5d58e80eee 4.8.0 |
|
62 | 75a09d9014b924c41ee13d564b4c0f5d58e80eee 4.8.0 | |
63 | bae7433522fa514100fd5686d4fbb6c163b62536 4.8.1 |
|
63 | bae7433522fa514100fd5686d4fbb6c163b62536 4.8.1 | |
64 | 1c30df471d2d5f05d93ad401011a10078b70d1b2 4.9.0 |
|
64 | 1c30df471d2d5f05d93ad401011a10078b70d1b2 4.9.0 | |
65 | f781e25fcd29c996d7db34f7f2870eb5588c84dc 4.9.1 |
|
65 | f781e25fcd29c996d7db34f7f2870eb5588c84dc 4.9.1 | |
66 | 7c9be4c674aca21bfeca37b40b4623614ec8573d 4.9.2 |
|
66 | 7c9be4c674aca21bfeca37b40b4623614ec8573d 4.9.2 | |
67 | 944575007b175c10b47e6735afcffe83685b1981 4.10.0 |
|
67 | 944575007b175c10b47e6735afcffe83685b1981 4.10.0 | |
68 | 84c8b976685942be27d91756d5fba2b2b31d810c 4.10.1 |
|
68 | 84c8b976685942be27d91756d5fba2b2b31d810c 4.10.1 | |
|
69 | 2f9d7bc70eefbcfac840fea2727a8dd969292382 4.11.0 |
@@ -1,51 +1,51 b'' | |||||
1 | [Version] |
|
1 | [Version] | |
2 |
Version = 4.1 |
|
2 | Version = 4.11.0 June | |
3 | SiteName = Neboard DEV |
|
3 | SiteName = Neboard DEV | |
4 |
|
4 | |||
5 | [Cache] |
|
5 | [Cache] | |
6 | # Timeout for caching, if cache is used |
|
6 | # Timeout for caching, if cache is used | |
7 | CacheTimeout = 600 |
|
7 | CacheTimeout = 600 | |
8 |
|
8 | |||
9 | [Forms] |
|
9 | [Forms] | |
10 | # Max post length in characters |
|
10 | # Max post length in characters | |
11 | MaxTextLength = 30000 |
|
11 | MaxTextLength = 30000 | |
12 | MaxFileSize = 8000000 |
|
12 | MaxFileSize = 8000000 | |
13 | LimitFirstPosting = true |
|
13 | LimitFirstPosting = true | |
14 | LimitPostingSpeed = false |
|
14 | LimitPostingSpeed = false | |
15 | PowDifficulty = 0 |
|
15 | PowDifficulty = 0 | |
16 | # Delay in seconds |
|
16 | # Delay in seconds | |
17 | PostingDelay = 30 |
|
17 | PostingDelay = 30 | |
18 | Autoban = false |
|
18 | Autoban = false | |
19 | DefaultTag = test |
|
19 | DefaultTag = test | |
20 | MaxFileCount = 5 |
|
20 | MaxFileCount = 5 | |
21 | AdditionalSpoilerSpaces = false |
|
21 | AdditionalSpoilerSpaces = false | |
22 | BanWhitelist = 127.0.0.1 |
|
22 | BanWhitelist = 127.0.0.1 | |
23 |
|
23 | |||
24 | [Messages] |
|
24 | [Messages] | |
25 | # Thread bumplimit |
|
25 | # Thread bumplimit | |
26 | MaxPostsPerThread = 10 |
|
26 | MaxPostsPerThread = 10 | |
27 | ThreadArchiveDays = 300 |
|
27 | ThreadArchiveDays = 300 | |
28 | AnonymousMode = false |
|
28 | AnonymousMode = false | |
29 |
|
29 | |||
30 | [View] |
|
30 | [View] | |
31 | DefaultTheme = md |
|
31 | DefaultTheme = md | |
32 | DefaultImageViewer = simple |
|
32 | DefaultImageViewer = simple | |
33 | LastRepliesCount = 3 |
|
33 | LastRepliesCount = 3 | |
34 | ThreadsPerPage = 3 |
|
34 | ThreadsPerPage = 3 | |
35 | PostsPerPage = 10 |
|
35 | PostsPerPage = 10 | |
36 | ImagesPerPageGallery = 20 |
|
36 | ImagesPerPageGallery = 20 | |
37 | MaxLandingThreads = 20 |
|
37 | MaxLandingThreads = 20 | |
38 | MaxLandingPosts = 10 |
|
38 | MaxLandingPosts = 10 | |
39 | Themes=md:Mystic Dark,md_centered:Mystic Dark (centered),sw:Snow White,pg:Photon Grey,ad:Amanita Dark,iw:Inocibe White |
|
39 | Themes=md:Mystic Dark,md_centered:Mystic Dark (centered),sw:Snow White,pg:Photon Grey,ad:Amanita Dark,iw:Inocibe White | |
40 | ImageViewers=simple:Simple,popup:Popup |
|
40 | ImageViewers=simple:Simple,popup:Popup | |
41 |
|
41 | |||
42 | [Storage] |
|
42 | [Storage] | |
43 | # Enable archiving threads instead of deletion when the thread limit is reached |
|
43 | # Enable archiving threads instead of deletion when the thread limit is reached | |
44 | ArchiveThreads = true |
|
44 | ArchiveThreads = true | |
45 |
|
45 | |||
46 | [RSS] |
|
46 | [RSS] | |
47 | MaxItems = 20 |
|
47 | MaxItems = 20 | |
48 |
|
48 | |||
49 | [External] |
|
49 | [External] | |
50 | ImageSearchHost= |
|
50 | ImageSearchHost= | |
51 | SourceFetcherTripcode= |
|
51 | SourceFetcherTripcode= |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -1,93 +1,97 b'' | |||||
1 | # SOME DESCRIPTIVE TITLE. |
|
1 | # SOME DESCRIPTIVE TITLE. | |
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
|
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | # This file is distributed under the same license as the PACKAGE package. |
|
3 | # This file is distributed under the same license as the PACKAGE package. | |
4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
|
4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | # |
|
5 | # | |
6 | #, fuzzy |
|
6 | #, fuzzy | |
7 | msgid "" |
|
7 | msgid "" | |
8 | msgstr "" |
|
8 | msgstr "" | |
9 | "Project-Id-Version: PACKAGE VERSION\n" |
|
9 | "Project-Id-Version: PACKAGE VERSION\n" | |
10 | "Report-Msgid-Bugs-To: \n" |
|
10 | "Report-Msgid-Bugs-To: \n" | |
11 | "POT-Creation-Date: 2015-09-04 18:47+0300\n" |
|
11 | "POT-Creation-Date: 2015-09-04 18:47+0300\n" | |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
|
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
|
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
|
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | "Language: \n" |
|
15 | "Language: \n" | |
16 | "MIME-Version: 1.0\n" |
|
16 | "MIME-Version: 1.0\n" | |
17 | "Content-Type: text/plain; charset=UTF-8\n" |
|
17 | "Content-Type: text/plain; charset=UTF-8\n" | |
18 | "Content-Transfer-Encoding: 8bit\n" |
|
18 | "Content-Transfer-Encoding: 8bit\n" | |
19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
|
19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" | |
20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" |
|
20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" | |
21 |
|
21 | |||
22 | #: static/js/3party/jquery-ui.min.js:8 |
|
22 | #: static/js/3party/jquery-ui.min.js:8 | |
23 | msgid "'" |
|
23 | msgid "'" | |
24 | msgstr "" |
|
24 | msgstr "" | |
25 |
|
25 | |||
26 | #: static/js/refpopup.js:72 |
|
26 | #: static/js/refpopup.js:72 | |
27 | msgid "Loading..." |
|
27 | msgid "Loading..." | |
28 | msgstr "ΠΠ°Π³ΡΡΠ·ΠΊΠ°..." |
|
28 | msgstr "ΠΠ°Π³ΡΡΠ·ΠΊΠ°..." | |
29 |
|
29 | |||
30 | #: static/js/refpopup.js:91 |
|
30 | #: static/js/refpopup.js:91 | |
31 | msgid "Post not found" |
|
31 | msgid "Post not found" | |
32 | msgstr "Π‘ΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½ΠΎ" |
|
32 | msgstr "Π‘ΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½ΠΎ" | |
33 |
|
33 | |||
34 | #: static/js/thread_update.js:261 |
|
34 | #: static/js/thread_update.js:261 | |
35 | msgid "message" |
|
35 | msgid "message" | |
36 | msgid_plural "messages" |
|
36 | msgid_plural "messages" | |
37 | msgstr[0] "ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅" |
|
37 | msgstr[0] "ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅" | |
38 | msgstr[1] "ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΡ" |
|
38 | msgstr[1] "ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΡ" | |
39 | msgstr[2] "ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ" |
|
39 | msgstr[2] "ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ" | |
40 |
|
40 | |||
41 | #: static/js/thread_update.js:262 |
|
41 | #: static/js/thread_update.js:262 | |
42 | msgid "image" |
|
42 | msgid "image" | |
43 | msgid_plural "images" |
|
43 | msgid_plural "images" | |
44 | msgstr[0] "ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅" |
|
44 | msgstr[0] "ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅" | |
45 | msgstr[1] "ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ" |
|
45 | msgstr[1] "ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΡ" | |
46 | msgstr[2] "ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΉ" |
|
46 | msgstr[2] "ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΉ" | |
47 |
|
47 | |||
48 | #: static/js/thread_update.js:445 |
|
48 | #: static/js/thread_update.js:445 | |
49 | msgid "Sending message..." |
|
49 | msgid "Sending message..." | |
50 | msgstr "ΠΡΠΏΡΠ°Π²ΠΊΠ° ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΡ..." |
|
50 | msgstr "ΠΡΠΏΡΠ°Π²ΠΊΠ° ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΡ..." | |
51 |
|
51 | |||
52 | #: static/js/thread_update.js:449 |
|
52 | #: static/js/thread_update.js:449 | |
53 | msgid "Server error!" |
|
53 | msgid "Server error!" | |
54 | msgstr "ΠΡΠΈΠ±ΠΊΠ° ΡΠ΅ΡΠ²Π΅ΡΠ°!" |
|
54 | msgstr "ΠΡΠΈΠ±ΠΊΠ° ΡΠ΅ΡΠ²Π΅ΡΠ°!" | |
55 |
|
55 | |||
56 | msgid "Computing PoW..." |
|
56 | msgid "Computing PoW..." | |
57 | msgstr "Π Π°ΡΡΡΡ PoW..." |
|
57 | msgstr "Π Π°ΡΡΡΡ PoW..." | |
58 |
|
58 | |||
59 | msgid "Duplicates search" |
|
59 | msgid "Duplicates search" | |
60 | msgstr "ΠΠΎΠΈΡΠΊ Π΄ΡΠ±Π»ΠΈΠΊΠ°ΡΠΎΠ²" |
|
60 | msgstr "ΠΠΎΠΈΡΠΊ Π΄ΡΠ±Π»ΠΈΠΊΠ°ΡΠΎΠ²" | |
61 |
|
61 | |||
62 | msgid "Add local sticker" |
|
62 | msgid "Add local sticker" | |
63 | msgstr "ΠΠΎΠ±Π°Π²ΠΈΡΡ Π»ΠΎΠΊΠ°Π»ΡΠ½ΡΠΉ ΡΡΠΈΠΊΠ΅Ρ" |
|
63 | msgstr "ΠΠΎΠ±Π°Π²ΠΈΡΡ Π»ΠΎΠΊΠ°Π»ΡΠ½ΡΠΉ ΡΡΠΈΠΊΠ΅Ρ" | |
64 |
|
64 | |||
65 | msgid "Input sticker name" |
|
65 | msgid "Input sticker name" | |
66 | msgstr "ΠΠ²Π΅Π΄ΠΈΡΠ΅ Π½Π°Π·Π²Π°Π½ΠΈΠ΅ ΡΡΠΈΠΊΠ΅ΡΠ°" |
|
66 | msgstr "ΠΠ²Π΅Π΄ΠΈΡΠ΅ Π½Π°Π·Π²Π°Π½ΠΈΠ΅ ΡΡΠΈΠΊΠ΅ΡΠ°" | |
67 |
|
67 | |||
68 | msgid "Images posted: " |
|
68 | msgid "Images posted: " | |
69 | msgstr "ΠΡΡΠ°Π²Π»Π΅Π½Π½ΡΡ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΉ: " |
|
69 | msgstr "ΠΡΡΠ°Π²Π»Π΅Π½Π½ΡΡ ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΉ: " | |
70 |
|
70 | |||
71 | msgid "Ban and delete" |
|
71 | msgid "Ban and delete" | |
72 | msgstr "ΠΠ°Π±Π°Π½ΠΈΡΡ ΠΈ ΡΠ΄Π°Π»ΠΈΡΡ" |
|
72 | msgstr "ΠΠ°Π±Π°Π½ΠΈΡΡ ΠΈ ΡΠ΄Π°Π»ΠΈΡΡ" | |
73 |
|
73 | |||
74 | msgid "Are you sure?" |
|
74 | msgid "Are you sure?" | |
75 | msgstr "ΠΡ ΡΠ²Π΅ΡΠ΅Π½Ρ?" |
|
75 | msgstr "ΠΡ ΡΠ²Π΅ΡΠ΅Π½Ρ?" | |
76 |
|
76 | |||
77 | msgid "Ban" |
|
77 | msgid "Ban" | |
78 | msgstr "ΠΠ°Π±Π°Π½ΠΈΡΡ" |
|
78 | msgstr "ΠΠ°Π±Π°Π½ΠΈΡΡ" | |
79 |
|
79 | |||
80 | msgid "Delete post" |
|
80 | msgid "Delete post" | |
81 | msgstr "Π£Π΄Π°Π»ΠΈΡΡ ΠΏΠΎΡΡ" |
|
81 | msgstr "Π£Π΄Π°Π»ΠΈΡΡ ΠΏΠΎΡΡ" | |
82 |
|
82 | |||
83 | msgid "Delete thread" |
|
83 | msgid "Delete thread" | |
84 | msgstr "Π£Π΄Π°Π»ΠΈΡΡ ΡΠ΅ΠΌΡ" |
|
84 | msgstr "Π£Π΄Π°Π»ΠΈΡΡ ΡΠ΅ΠΌΡ" | |
85 |
|
85 | |||
86 | msgid "Edit" |
|
86 | msgid "Edit" | |
87 | msgstr "ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ" |
|
87 | msgstr "ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ" | |
88 |
|
88 | |||
89 | msgid "Edit thread" |
|
89 | msgid "Edit thread" | |
90 | msgstr "ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ ΡΠ΅ΠΌΡ" |
|
90 | msgstr "ΠΠ·ΠΌΠ΅Π½ΠΈΡΡ ΡΠ΅ΠΌΡ" | |
91 |
|
91 | |||
92 | msgid "Hide/show" |
|
92 | msgid "Hide/show" | |
93 | msgstr "Π‘ΠΊΡΡΡΡ/ΠΏΠΎΠΊΠ°Π·Π°ΡΡ" |
|
93 | msgstr "Π‘ΠΊΡΡΡΡ/ΠΏΠΎΠΊΠ°Π·Π°ΡΡ" | |
|
94 | ||||
|
95 | msgid "Rollover thread" | |||
|
96 | msgstr "ΠΠ΅ΡΠ΅ΠΊΠ°ΡΠΈΡΡ ΡΠ΅ΠΌΡ" | |||
|
97 |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -1,93 +1,97 b'' | |||||
1 | # SOME DESCRIPTIVE TITLE. |
|
1 | # SOME DESCRIPTIVE TITLE. | |
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
|
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | # This file is distributed under the same license as the PACKAGE package. |
|
3 | # This file is distributed under the same license as the PACKAGE package. | |
4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
|
4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | # |
|
5 | # | |
6 | #, fuzzy |
|
6 | #, fuzzy | |
7 | msgid "" |
|
7 | msgid "" | |
8 | msgstr "" |
|
8 | msgstr "" | |
9 | "Project-Id-Version: PACKAGE VERSION\n" |
|
9 | "Project-Id-Version: PACKAGE VERSION\n" | |
10 | "Report-Msgid-Bugs-To: \n" |
|
10 | "Report-Msgid-Bugs-To: \n" | |
11 | "POT-Creation-Date: 2015-09-04 18:47+0300\n" |
|
11 | "POT-Creation-Date: 2015-09-04 18:47+0300\n" | |
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
|
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
|
13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
|
14 | "Language-Team: LANGUAGE <LL@li.org>\n" | |
15 | "Language: \n" |
|
15 | "Language: \n" | |
16 | "MIME-Version: 1.0\n" |
|
16 | "MIME-Version: 1.0\n" | |
17 | "Content-Type: text/plain; charset=UTF-8\n" |
|
17 | "Content-Type: text/plain; charset=UTF-8\n" | |
18 | "Content-Transfer-Encoding: 8bit\n" |
|
18 | "Content-Transfer-Encoding: 8bit\n" | |
19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
|
19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" | |
20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" |
|
20 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" | |
21 |
|
21 | |||
22 | #: static/js/3party/jquery-ui.min.js:8 |
|
22 | #: static/js/3party/jquery-ui.min.js:8 | |
23 | msgid "'" |
|
23 | msgid "'" | |
24 | msgstr "" |
|
24 | msgstr "" | |
25 |
|
25 | |||
26 | #: static/js/refpopup.js:72 |
|
26 | #: static/js/refpopup.js:72 | |
27 | msgid "Loading..." |
|
27 | msgid "Loading..." | |
28 | msgstr "ΠΠ°Π²Π°Π½ΡΠ°ΠΆΠ΅Π½Π½Ρ..." |
|
28 | msgstr "ΠΠ°Π²Π°Π½ΡΠ°ΠΆΠ΅Π½Π½Ρ..." | |
29 |
|
29 | |||
30 | #: static/js/refpopup.js:91 |
|
30 | #: static/js/refpopup.js:91 | |
31 | msgid "Post not found" |
|
31 | msgid "Post not found" | |
32 | msgstr "ΠΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ Π½Π΅ Π·Π½Π°ΠΉΠ΄Π΅Π½Π΅" |
|
32 | msgstr "ΠΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ Π½Π΅ Π·Π½Π°ΠΉΠ΄Π΅Π½Π΅" | |
33 |
|
33 | |||
34 | #: static/js/thread_update.js:261 |
|
34 | #: static/js/thread_update.js:261 | |
35 | msgid "message" |
|
35 | msgid "message" | |
36 | msgid_plural "messages" |
|
36 | msgid_plural "messages" | |
37 | msgstr[0] "ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ" |
|
37 | msgstr[0] "ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ" | |
38 | msgstr[1] "ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ" |
|
38 | msgstr[1] "ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ" | |
39 | msgstr[2] "ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Ρ" |
|
39 | msgstr[2] "ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Ρ" | |
40 |
|
40 | |||
41 | #: static/js/thread_update.js:262 |
|
41 | #: static/js/thread_update.js:262 | |
42 | msgid "image" |
|
42 | msgid "image" | |
43 | msgid_plural "images" |
|
43 | msgid_plural "images" | |
44 | msgstr[0] "Π·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½Π½Ρ" |
|
44 | msgstr[0] "Π·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½Π½Ρ" | |
45 | msgstr[1] "Π·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½Π½Ρ" |
|
45 | msgstr[1] "Π·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½Π½Ρ" | |
46 | msgstr[2] "Π·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½Ρ" |
|
46 | msgstr[2] "Π·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½Ρ" | |
47 |
|
47 | |||
48 | #: static/js/thread_update.js:445 |
|
48 | #: static/js/thread_update.js:445 | |
49 | msgid "Sending message..." |
|
49 | msgid "Sending message..." | |
50 | msgstr "ΠΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ Π½Π°Π΄ΡΠΈΠ»Π°ΡΡΡΡΡ..." |
|
50 | msgstr "ΠΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ Π½Π°Π΄ΡΠΈΠ»Π°ΡΡΡΡΡ..." | |
51 |
|
51 | |||
52 | #: static/js/thread_update.js:449 |
|
52 | #: static/js/thread_update.js:449 | |
53 | msgid "Server error!" |
|
53 | msgid "Server error!" | |
54 | msgstr "Π‘Π΅ΡΠ²Π΅Ρ Π½Π΅Π·Π΄ΡΠΆΠ°Ρ! ΠΠ°Ρ ΠΎΠ΄ΡΡΠ΅ ΠΏΡΠ·Π½ΡΡΠ΅!" |
|
54 | msgstr "Π‘Π΅ΡΠ²Π΅Ρ Π½Π΅Π·Π΄ΡΠΆΠ°Ρ! ΠΠ°Ρ ΠΎΠ΄ΡΡΠ΅ ΠΏΡΠ·Π½ΡΡΠ΅!" | |
55 |
|
55 | |||
56 | msgid "Computing PoW..." |
|
56 | msgid "Computing PoW..." | |
57 | msgstr "Π ΠΎΠ·ΡΠ°Ρ ΠΎΠ²ΡΡΡΡΡΡ PoW..." |
|
57 | msgstr "Π ΠΎΠ·ΡΠ°Ρ ΠΎΠ²ΡΡΡΡΡΡ PoW..." | |
58 |
|
58 | |||
59 | msgid "Duplicates search" |
|
59 | msgid "Duplicates search" | |
60 | msgstr "ΠΠΎΡΡΠΊ Π΄ΡΠ±Π»ΡΠΊΠ°ΡΡΠ²" |
|
60 | msgstr "ΠΠΎΡΡΠΊ Π΄ΡΠ±Π»ΡΠΊΠ°ΡΡΠ²" | |
61 |
|
61 | |||
62 | msgid "Add local sticker" |
|
62 | msgid "Add local sticker" | |
63 | msgstr "ΠΠΎΠ΄Π°ΡΠΈ Π»ΠΎΠΊΠ°Π»ΡΠ½ΠΈΠΉ ΡΡΡΠΊΠ΅Ρ" |
|
63 | msgstr "ΠΠΎΠ΄Π°ΡΠΈ Π»ΠΎΠΊΠ°Π»ΡΠ½ΠΈΠΉ ΡΡΡΠΊΠ΅Ρ" | |
64 |
|
64 | |||
65 | msgid "Input sticker name" |
|
65 | msgid "Input sticker name" | |
66 | msgstr "ΠΠ²Π΅Π΄ΡΡΡ Π½Π°Π·Π²Ρ ΡΡΡΠΊΠ΅ΡΠ°" |
|
66 | msgstr "ΠΠ²Π΅Π΄ΡΡΡ Π½Π°Π·Π²Ρ ΡΡΡΠΊΠ΅ΡΠ°" | |
67 |
|
67 | |||
68 | msgid "Images posted: " |
|
68 | msgid "Images posted: " | |
69 | msgstr "ΠΡΡΠ°Π²Π»Π΅Π½ΠΈΡ Π·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½Ρ: " |
|
69 | msgstr "ΠΡΡΠ°Π²Π»Π΅Π½ΠΈΡ Π·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½Ρ: " | |
70 |
|
70 | |||
71 | msgid "Ban and delete" |
|
71 | msgid "Ban and delete" | |
72 | msgstr "ΠΠ°Π±Π»ΠΎΠΊΡΠ²Π°ΡΠΈ ΠΉ Π²ΠΈΠ΄Π°Π»ΠΈΡΠΈ" |
|
72 | msgstr "ΠΠ°Π±Π»ΠΎΠΊΡΠ²Π°ΡΠΈ ΠΉ Π²ΠΈΠ΄Π°Π»ΠΈΡΠΈ" | |
73 |
|
73 | |||
74 | msgid "Are you sure?" |
|
74 | msgid "Are you sure?" | |
75 | msgstr "Π§ΠΈ Π²ΠΈ ΠΏΠ΅Π²Π½Ρ?" |
|
75 | msgstr "Π§ΠΈ Π²ΠΈ ΠΏΠ΅Π²Π½Ρ?" | |
76 |
|
76 | |||
77 | msgid "Ban" |
|
77 | msgid "Ban" | |
78 | msgstr "ΠΠ°Π±Π»ΠΎΠΊΡΠ²Π°ΡΠΈ" |
|
78 | msgstr "ΠΠ°Π±Π»ΠΎΠΊΡΠ²Π°ΡΠΈ" | |
79 |
|
79 | |||
80 | msgid "Delete post" |
|
80 | msgid "Delete post" | |
81 | msgstr "ΠΠΈΠ΄Π°Π»ΠΈΡΠΈ ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ" |
|
81 | msgstr "ΠΠΈΠ΄Π°Π»ΠΈΡΠΈ ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ" | |
82 |
|
82 | |||
83 | msgid "Delete thread" |
|
83 | msgid "Delete thread" | |
84 | msgstr "ΠΠΈΡΠ²Π°ΡΠΈ Π½ΠΈΡΠΊΡ" |
|
84 | msgstr "ΠΠΈΡΠ²Π°ΡΠΈ Π½ΠΈΡΠΊΡ" | |
85 |
|
85 | |||
86 | msgid "Edit" |
|
86 | msgid "Edit" | |
87 | msgstr "ΠΠΌΡΠ½ΠΈΡΠΈ" |
|
87 | msgstr "ΠΠΌΡΠ½ΠΈΡΠΈ" | |
88 |
|
88 | |||
89 | msgid "Edit thread" |
|
89 | msgid "Edit thread" | |
90 | msgstr "ΠΠΌΡΠ½ΠΈΡΠΈ Π½ΠΈΡΠΊΡ" |
|
90 | msgstr "ΠΠΌΡΠ½ΠΈΡΠΈ Π½ΠΈΡΠΊΡ" | |
91 |
|
91 | |||
92 | msgid "Hide/show" |
|
92 | msgid "Hide/show" | |
93 | msgstr "ΠΡΠΈΡ ΠΎΠ²Π°ΡΠΈ/Π²ΡΠ΄ΠΎΠ±ΡΠ°Π·ΠΈΡΠΈ" |
|
93 | msgstr "ΠΡΠΈΡ ΠΎΠ²Π°ΡΠΈ/Π²ΡΠ΄ΠΎΠ±ΡΠ°Π·ΠΈΡΠΈ" | |
|
94 | ||||
|
95 | msgid "Rollover thread" | |||
|
96 | msgstr "ΠΠ΅ΡΠ΅ΠΊΠΎΡΠΈΡΠΈ Π½ΠΈΡΠΊΡ" | |||
|
97 |
@@ -1,364 +1,373 b'' | |||||
1 | /* |
|
1 | /* | |
2 | @licstart The following is the entire license notice for the |
|
2 | @licstart The following is the entire license notice for the | |
3 | JavaScript code in this page. |
|
3 | JavaScript code in this page. | |
4 |
|
4 | |||
5 |
|
5 | |||
6 | Copyright (C) 2013 neko259 |
|
6 | Copyright (C) 2013 neko259 | |
7 |
|
7 | |||
8 | The JavaScript code in this page is free software: you can |
|
8 | The JavaScript code in this page is free software: you can | |
9 | redistribute it and/or modify it under the terms of the GNU |
|
9 | redistribute it and/or modify it under the terms of the GNU | |
10 | General Public License (GNU GPL) as published by the Free Software |
|
10 | General Public License (GNU GPL) as published by the Free Software | |
11 | Foundation, either version 3 of the License, or (at your option) |
|
11 | Foundation, either version 3 of the License, or (at your option) | |
12 | any later version. The code is distributed WITHOUT ANY WARRANTY; |
|
12 | any later version. The code is distributed WITHOUT ANY WARRANTY; | |
13 | without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 | without even the implied warranty of MERCHANTABILITY or FITNESS | |
14 | FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. |
|
14 | FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. | |
15 |
|
15 | |||
16 | As additional permission under GNU GPL version 3 section 7, you |
|
16 | As additional permission under GNU GPL version 3 section 7, you | |
17 | may distribute non-source (e.g., minimized or compacted) forms of |
|
17 | may distribute non-source (e.g., minimized or compacted) forms of | |
18 | that code without the copy of the GNU GPL normally required by |
|
18 | that code without the copy of the GNU GPL normally required by | |
19 | section 4, provided you include this license notice and a URL |
|
19 | section 4, provided you include this license notice and a URL | |
20 | through which recipients can access the Corresponding Source. |
|
20 | through which recipients can access the Corresponding Source. | |
21 |
|
21 | |||
22 | @licend The above is the entire license notice |
|
22 | @licend The above is the entire license notice | |
23 | for the JavaScript code in this page. |
|
23 | for the JavaScript code in this page. | |
24 | */ |
|
24 | */ | |
25 |
|
25 | |||
26 | var ITEM_VOLUME_LEVEL = 'volumeLevel'; |
|
26 | var ITEM_VOLUME_LEVEL = 'volumeLevel'; | |
27 | var ITEM_HIDDEN_POSTS = 'hiddenPosts'; |
|
27 | var ITEM_HIDDEN_POSTS = 'hiddenPosts'; | |
28 |
|
28 | |||
29 | var IMAGE_TYPES = ['image/png', 'image/jpg', 'image/jpeg', 'image/bmp', 'image/gif']; |
|
29 | var IMAGE_TYPES = ['image/png', 'image/jpg', 'image/jpeg', 'image/bmp', 'image/gif']; | |
30 |
|
30 | |||
31 | /** |
|
31 | /** | |
32 | * An email is a hidden file to prevent spam bots from posting. It has to be |
|
32 | * An email is a hidden file to prevent spam bots from posting. It has to be | |
33 | * hidden. |
|
33 | * hidden. | |
34 | */ |
|
34 | */ | |
35 | function hideEmailFromForm() { |
|
35 | function hideEmailFromForm() { | |
36 | $('.form-email').parent().parent().hide(); |
|
36 | $('.form-email').parent().parent().hide(); | |
37 | } |
|
37 | } | |
38 |
|
38 | |||
39 | /** |
|
39 | /** | |
40 | * Highlight code blocks with code highlighter |
|
40 | * Highlight code blocks with code highlighter | |
41 | */ |
|
41 | */ | |
42 | function highlightCode(node) { |
|
42 | function highlightCode(node) { | |
43 | node.find('pre code').each(function(i, e) { |
|
43 | node.find('pre code').each(function(i, e) { | |
44 | hljs.highlightBlock(e); |
|
44 | hljs.highlightBlock(e); | |
45 | }); |
|
45 | }); | |
46 | } |
|
46 | } | |
47 |
|
47 | |||
48 | function updateFavPosts(data) { |
|
48 | function updateFavPosts(data) { | |
49 | var includePostBody = $('#fav-panel').is(":visible"); |
|
49 | var includePostBody = $('#fav-panel').is(":visible"); | |
50 |
|
50 | |||
51 | var allNewPostCount = 0; |
|
51 | var allNewPostCount = 0; | |
52 |
|
52 | |||
53 | if (includePostBody) { |
|
53 | if (includePostBody) { | |
54 | var favoriteThreadPanel = $('#fav-panel'); |
|
54 | var favoriteThreadPanel = $('#fav-panel'); | |
55 | favoriteThreadPanel.empty(); |
|
55 | favoriteThreadPanel.empty(); | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | $.each($.parseJSON(data), function (_, dict) { |
|
58 | $.each($.parseJSON(data), function (_, dict) { | |
59 | var newPostCount = dict.new_post_count; |
|
59 | var newPostCount = dict.new_post_count; | |
60 | allNewPostCount += newPostCount; |
|
60 | allNewPostCount += newPostCount; | |
61 |
|
61 | |||
62 | if (includePostBody) { |
|
62 | if (includePostBody) { | |
63 | var favThreadNode = $('<div class="post"></div>'); |
|
63 | var favThreadNode = $('<div class="post"></div>'); | |
64 | favThreadNode.append($(dict.post_url)); |
|
64 | favThreadNode.append($(dict.post_url)); | |
65 | favThreadNode.append(' '); |
|
65 | favThreadNode.append(' '); | |
66 | favThreadNode.append($('<span class="title">' + dict.title + '</span>')); |
|
66 | favThreadNode.append($('<span class="title">' + dict.title + '</span>')); | |
67 |
|
67 | |||
68 | if (newPostCount > 0) { |
|
68 | if (newPostCount > 0) { | |
69 | favThreadNode.append(' (<a href="' + dict.newest_post_link + '">+' + newPostCount + "</a>)"); |
|
69 | favThreadNode.append(' (<a href="' + dict.newest_post_link + '">+' + newPostCount + "</a>)"); | |
70 | } |
|
70 | } | |
71 |
|
71 | |||
72 | favoriteThreadPanel.append(favThreadNode); |
|
72 | favoriteThreadPanel.append(favThreadNode); | |
73 |
|
73 | |||
74 | addRefLinkPreview(favThreadNode[0]); |
|
74 | addRefLinkPreview(favThreadNode[0]); | |
75 | } |
|
75 | } | |
76 | }); |
|
76 | }); | |
77 |
|
77 | |||
78 | var newPostCountNode = $('#new-fav-post-count'); |
|
78 | var newPostCountNode = $('#new-fav-post-count'); | |
79 | if (allNewPostCount > 0) { |
|
79 | if (allNewPostCount > 0) { | |
80 | newPostCountNode.text('(+' + allNewPostCount + ')'); |
|
80 | newPostCountNode.text('(+' + allNewPostCount + ')'); | |
81 | newPostCountNode.show(); |
|
81 | newPostCountNode.show(); | |
82 | } else { |
|
82 | } else { | |
83 | newPostCountNode.hide(); |
|
83 | newPostCountNode.hide(); | |
84 | } |
|
84 | } | |
85 | } |
|
85 | } | |
86 |
|
86 | |||
87 | function initFavPanel() { |
|
87 | function initFavPanel() { | |
88 | var favPanelButton = $('#fav-panel-btn'); |
|
88 | var favPanelButton = $('#fav-panel-btn'); | |
89 | if (favPanelButton.length > 0 && typeof SharedWorker != 'undefined') { |
|
89 | if (favPanelButton.length > 0 && typeof SharedWorker != 'undefined') { | |
90 | var worker = new SharedWorker($('body').attr('data-update-script')); |
|
90 | var worker = new SharedWorker($('body').attr('data-update-script')); | |
91 | worker.port.onmessage = function(e) { |
|
91 | worker.port.onmessage = function(e) { | |
92 | updateFavPosts(e.data); |
|
92 | updateFavPosts(e.data); | |
93 | }; |
|
93 | }; | |
94 | worker.onerror = function(event){ |
|
94 | worker.onerror = function(event){ | |
95 | throw new Error(event.message + " (" + event.filename + ":" + event.lineno + ")"); |
|
95 | throw new Error(event.message + " (" + event.filename + ":" + event.lineno + ")"); | |
96 | }; |
|
96 | }; | |
97 | worker.port.start(); |
|
97 | worker.port.start(); | |
98 |
|
98 | |||
99 | $(favPanelButton).click(function() { |
|
99 | $(favPanelButton).click(function() { | |
100 | var favPanel = $('#fav-panel'); |
|
100 | var favPanel = $('#fav-panel'); | |
101 | favPanel.toggle(); |
|
101 | favPanel.toggle(); | |
102 |
|
102 | |||
103 | worker.port.postMessage({ includePostBody: favPanel.is(':visible')}); |
|
103 | worker.port.postMessage({ includePostBody: favPanel.is(':visible')}); | |
104 |
|
104 | |||
105 | return false; |
|
105 | return false; | |
106 | }); |
|
106 | }); | |
107 |
|
107 | |||
108 | $(document).on('keyup.removepic', function(e) { |
|
108 | $(document).on('keyup.removepic', function(e) { | |
109 | if(e.which === 27) { |
|
109 | if(e.which === 27) { | |
110 | $('#fav-panel').hide(); |
|
110 | $('#fav-panel').hide(); | |
111 | } |
|
111 | } | |
112 | }); |
|
112 | }); | |
113 | } |
|
113 | } | |
114 | } |
|
114 | } | |
115 |
|
115 | |||
116 | function setVolumeLevel(level) { |
|
116 | function setVolumeLevel(level) { | |
117 | localStorage.setItem(ITEM_VOLUME_LEVEL, level); |
|
117 | localStorage.setItem(ITEM_VOLUME_LEVEL, level); | |
118 | } |
|
118 | } | |
119 |
|
119 | |||
120 | function getVolumeLevel() { |
|
120 | function getVolumeLevel() { | |
121 | var level = localStorage.getItem(ITEM_VOLUME_LEVEL); |
|
121 | var level = localStorage.getItem(ITEM_VOLUME_LEVEL); | |
122 | if (level == null) { |
|
122 | if (level == null) { | |
123 | level = 1.0; |
|
123 | level = 1.0; | |
124 | } |
|
124 | } | |
125 | return level |
|
125 | return level | |
126 | } |
|
126 | } | |
127 |
|
127 | |||
128 | function processVolumeUser(node) { |
|
128 | function processVolumeUser(node) { | |
129 | if (!window.localStorage) return; |
|
129 | if (!window.localStorage) return; | |
130 | node.prop("volume", getVolumeLevel()); |
|
130 | node.prop("volume", getVolumeLevel()); | |
131 | node.on('volumechange', function(event) { |
|
131 | node.on('volumechange', function(event) { | |
132 | setVolumeLevel(event.target.volume); |
|
132 | setVolumeLevel(event.target.volume); | |
133 | $("video,audio").prop("volume", getVolumeLevel()); |
|
133 | $("video,audio").prop("volume", getVolumeLevel()); | |
134 | }); |
|
134 | }); | |
135 | } |
|
135 | } | |
136 |
|
136 | |||
137 | function getHiddenPosts() { |
|
137 | function getHiddenPosts() { | |
138 | var arr = Array(); |
|
138 | var arr = Array(); | |
139 | var hiddenPosts = localStorage && localStorage.getItem(ITEM_HIDDEN_POSTS); |
|
139 | var hiddenPosts = localStorage && localStorage.getItem(ITEM_HIDDEN_POSTS); | |
140 | if (hiddenPosts) { |
|
140 | if (hiddenPosts) { | |
141 | arr = JSON.parse(hiddenPosts); |
|
141 | arr = JSON.parse(hiddenPosts); | |
142 | } |
|
142 | } | |
143 | return arr; |
|
143 | return arr; | |
144 | } |
|
144 | } | |
145 |
|
145 | |||
146 | function processPostHiding(posts) { |
|
146 | function processPostHiding(posts) { | |
147 | if (!window.localStorage) return; |
|
147 | if (!window.localStorage) return; | |
148 | var hiddenPosts = getHiddenPosts(); |
|
148 | var hiddenPosts = getHiddenPosts(); | |
149 |
|
149 | |||
150 | $.each(posts, function(index) { |
|
150 | $.each(posts, function(index) { | |
151 | var post = $(this); |
|
151 | var post = $(this); | |
152 | if (hiddenPosts.indexOf(post.attr("id")) > -1) { |
|
152 | if (hiddenPosts.indexOf(post.attr("id")) > -1) { | |
153 | post.toggleClass("hidden_post"); |
|
153 | post.toggleClass("hidden_post"); | |
154 | } |
|
154 | } | |
155 | }); |
|
155 | }); | |
156 | } |
|
156 | } | |
157 |
|
157 | |||
158 | /** |
|
158 | /** | |
159 | * Add all scripts than need to work on post, when the post is added to the |
|
159 | * Add all scripts than need to work on post, when the post is added to the | |
160 | * document. |
|
160 | * document. | |
161 | */ |
|
161 | */ | |
162 | function addScriptsToPost(post) { |
|
162 | function addScriptsToPost(post) { | |
163 | addRefLinkPreview(post[0]); |
|
163 | addRefLinkPreview(post[0]); | |
164 | highlightCode(post); |
|
164 | highlightCode(post); | |
165 | processVolumeUser(post.find("video,audio")); |
|
165 | processVolumeUser(post.find("video,audio")); | |
166 | processPostHiding([post]); |
|
166 | processPostHiding([post]); | |
167 | } |
|
167 | } | |
168 |
|
168 | |||
169 | /** |
|
169 | /** | |
170 | * Fix compatibility issues with some rare browsers |
|
170 | * Fix compatibility issues with some rare browsers | |
171 | */ |
|
171 | */ | |
172 | function compatibilityCrutches() { |
|
172 | function compatibilityCrutches() { | |
173 | if (window.operamini) { |
|
173 | if (window.operamini) { | |
174 | $('#form textarea').each(function() { this.placeholder = ''; }); |
|
174 | $('#form textarea').each(function() { this.placeholder = ''; }); | |
175 | } |
|
175 | } | |
176 | } |
|
176 | } | |
177 |
|
177 | |||
178 | function togglePostHidden(postId) { |
|
178 | function togglePostHidden(postId) { | |
179 | var hiddenPosts = getHiddenPosts(); |
|
179 | var hiddenPosts = getHiddenPosts(); | |
180 |
|
180 | |||
181 | var elIndex = hiddenPosts.indexOf(postId); |
|
181 | var elIndex = hiddenPosts.indexOf(postId); | |
182 | if (elIndex > -1) { |
|
182 | if (elIndex > -1) { | |
183 | hiddenPosts.splice(elIndex, 1); |
|
183 | hiddenPosts.splice(elIndex, 1); | |
184 | } else { |
|
184 | } else { | |
185 | hiddenPosts.push(postId); |
|
185 | hiddenPosts.push(postId); | |
186 | } |
|
186 | } | |
187 | localStorage.setItem(ITEM_HIDDEN_POSTS, JSON.stringify(hiddenPosts)); |
|
187 | localStorage.setItem(ITEM_HIDDEN_POSTS, JSON.stringify(hiddenPosts)); | |
188 |
|
188 | |||
189 | $('#' + postId).toggleClass("hidden_post"); |
|
189 | $('#' + postId).toggleClass("hidden_post"); | |
190 | } |
|
190 | } | |
191 |
|
191 | |||
192 | function addContextMenu() { |
|
192 | function addContextMenu() { | |
193 | $.contextMenu({ |
|
193 | $.contextMenu({ | |
194 | selector: '.file-menu', |
|
194 | selector: '.file-menu', | |
195 | trigger: 'left', |
|
195 | trigger: 'left', | |
196 |
|
196 | |||
197 | build: function($trigger, e) { |
|
197 | build: function($trigger, e) { | |
198 | var fileSearchUrl = $trigger.data('search-url'); |
|
198 | var fileSearchUrl = $trigger.data('search-url'); | |
199 | var isImage = IMAGE_TYPES.indexOf($trigger.data('type')) > -1; |
|
199 | var isImage = IMAGE_TYPES.indexOf($trigger.data('type')) > -1; | |
200 | var hasUrl = fileSearchUrl.length > 0; |
|
200 | var hasUrl = fileSearchUrl.length > 0; | |
201 | var id = $trigger.data('id'); |
|
201 | var id = $trigger.data('id'); | |
202 | return { |
|
202 | return { | |
203 | items: { |
|
203 | items: { | |
204 | duplicates: { |
|
204 | duplicates: { | |
205 | name: gettext('Duplicates search'), |
|
205 | name: gettext('Duplicates search'), | |
206 | callback: function(key, opts) { |
|
206 | callback: function(key, opts) { | |
207 | window.location = '/feed/?image=' + $trigger.data('filename'); |
|
207 | window.location = '/feed/?image=' + $trigger.data('filename'); | |
208 | } |
|
208 | } | |
209 | }, |
|
209 | }, | |
210 | google: { |
|
210 | google: { | |
211 | name: 'Google', |
|
211 | name: 'Google', | |
212 | visible: isImage && hasUrl, |
|
212 | visible: isImage && hasUrl, | |
213 | callback: function(key, opts) { |
|
213 | callback: function(key, opts) { | |
214 | window.location = 'https://www.google.com/searchbyimage?image_url=' + fileSearchUrl; |
|
214 | window.location = 'https://www.google.com/searchbyimage?image_url=' + fileSearchUrl; | |
215 | } |
|
215 | } | |
216 | }, |
|
216 | }, | |
217 | iqdb: { |
|
217 | iqdb: { | |
218 | name: 'IQDB', |
|
218 | name: 'IQDB', | |
219 | visible: isImage && hasUrl, |
|
219 | visible: isImage && hasUrl, | |
220 | callback: function(key, opts) { |
|
220 | callback: function(key, opts) { | |
221 | window.location = 'http://iqdb.org/?url=' + fileSearchUrl; |
|
221 | window.location = 'http://iqdb.org/?url=' + fileSearchUrl; | |
222 | } |
|
222 | } | |
223 | }, |
|
223 | }, | |
224 | tineye: { |
|
224 | tineye: { | |
225 | name: 'TinEye', |
|
225 | name: 'TinEye', | |
226 | visible: isImage && hasUrl, |
|
226 | visible: isImage && hasUrl, | |
227 | callback: function(key, opts) { |
|
227 | callback: function(key, opts) { | |
228 | window.location = 'http://tineye.com/search?url=' + fileSearchUrl; |
|
228 | window.location = 'http://tineye.com/search?url=' + fileSearchUrl; | |
229 | } |
|
229 | } | |
230 | }, |
|
230 | }, | |
231 | addAlias: { |
|
231 | addAlias: { | |
232 | name: gettext('Add local sticker'), |
|
232 | name: gettext('Add local sticker'), | |
233 | callback: function(key, opts) { |
|
233 | callback: function(key, opts) { | |
234 | var alias = prompt(gettext('Input sticker name')); |
|
234 | var alias = prompt(gettext('Input sticker name')); | |
235 | if (alias) { |
|
235 | if (alias) { | |
236 | window.location = '/stickers/?action=add&name=' + alias + '&id=' + id; |
|
236 | window.location = '/stickers/?action=add&name=' + alias + '&id=' + id; | |
237 | } |
|
237 | } | |
238 | } |
|
238 | } | |
239 | } |
|
239 | } | |
240 | } |
|
240 | } | |
241 | }; |
|
241 | }; | |
242 | } |
|
242 | } | |
243 | }); |
|
243 | }); | |
244 |
|
244 | |||
245 | $.contextMenu({ |
|
245 | $.contextMenu({ | |
246 | selector: '.post .post-menu', |
|
246 | selector: '.post .post-menu', | |
247 | trigger: 'left', |
|
247 | trigger: 'left', | |
248 | build: function($trigger, e) { |
|
248 | build: function($trigger, e) { | |
249 | var canEditPost = PERMS['change_post']; |
|
249 | var canEditPost = PERMS['change_post']; | |
250 | var canDeletePost = PERMS['delete_post']; |
|
250 | var canDeletePost = PERMS['delete_post']; | |
251 | var canEditThread = PERMS['change_thread']; |
|
251 | var canEditThread = PERMS['change_thread']; | |
252 | var canDeleteThread = PERMS['delete_thread']; |
|
252 | var canDeleteThread = PERMS['delete_thread']; | |
253 |
|
253 | |||
254 | var post = $trigger.parents('.post'); |
|
254 | var post = $trigger.parents('.post'); | |
255 |
|
255 | |||
256 | var isOpening = post.data('opening') === 'True'; |
|
256 | var isOpening = post.data('opening') === 'True'; | |
257 | var threadId = post.data('thread-id'); |
|
257 | var threadId = post.data('thread-id'); | |
258 | var hasGlobalId = post.data('has-global-id') === 'True'; |
|
258 | var hasGlobalId = post.data('has-global-id') === 'True'; | |
259 |
|
259 | |||
260 | var posterIp = $trigger.siblings('.pub_time').attr('title'); |
|
260 | var posterIp = $trigger.siblings('.pub_time').attr('title'); | |
261 | var hasIp = posterIp != null; |
|
261 | var hasIp = posterIp != null; | |
262 |
|
262 | |||
263 | var postId = post.attr('id'); |
|
263 | var postId = post.attr('id'); | |
264 |
|
264 | |||
265 | return { |
|
265 | return { | |
266 | items: { |
|
266 | items: { | |
267 | hide: { |
|
267 | hide: { | |
268 | name: gettext('Hide/show'), |
|
268 | name: gettext('Hide/show'), | |
269 | callback: function(key, opt) { |
|
269 | callback: function(key, opt) { | |
270 | togglePostHidden(postId); |
|
270 | togglePostHidden(postId); | |
271 | }, |
|
271 | }, | |
272 | visible: !!localStorage |
|
272 | visible: !!localStorage | |
273 | }, |
|
273 | }, | |
274 | edit: { |
|
274 | edit: { | |
275 | name: gettext('Edit'), |
|
275 | name: gettext('Edit'), | |
276 | callback: function(key, opt) { |
|
276 | callback: function(key, opt) { | |
277 | window.location = '/admin/boards/post/' + postId + '/change/'; |
|
277 | window.location = '/admin/boards/post/' + postId + '/change/'; | |
278 | }, |
|
278 | }, | |
279 | visible: canEditPost |
|
279 | visible: canEditPost | |
280 | }, |
|
280 | }, | |
281 | deletePost: { |
|
281 | deletePost: { | |
282 | name: gettext('Delete post'), |
|
282 | name: gettext('Delete post'), | |
283 | callback: function(key, opt) { |
|
283 | callback: function(key, opt) { | |
284 | window.location = '/admin/boards/post/' + postId + '/delete/'; |
|
284 | window.location = '/admin/boards/post/' + postId + '/delete/'; | |
285 | }, |
|
285 | }, | |
286 | visible: !isOpening && canDeletePost |
|
286 | visible: !isOpening && canDeletePost | |
287 | }, |
|
287 | }, | |
288 | editThread: { |
|
288 | editThread: { | |
289 | name: gettext('Edit thread'), |
|
289 | name: gettext('Edit thread'), | |
290 | callback: function(key, opt) { |
|
290 | callback: function(key, opt) { | |
291 | window.location = '/admin/boards/thread/' + threadId + '/change/'; |
|
291 | window.location = '/admin/boards/thread/' + threadId + '/change/'; | |
292 | }, |
|
292 | }, | |
293 | visible: isOpening && canEditThread |
|
293 | visible: isOpening && canEditThread | |
294 | }, |
|
294 | }, | |
295 | deleteThread: { |
|
295 | deleteThread: { | |
296 | name: gettext('Delete thread'), |
|
296 | name: gettext('Delete thread'), | |
297 | callback: function(key, opt) { |
|
297 | callback: function(key, opt) { | |
298 | window.location = '/admin/boards/thread/' + threadId + '/delete/'; |
|
298 | window.location = '/admin/boards/thread/' + threadId + '/delete/'; | |
299 | }, |
|
299 | }, | |
300 | visible: isOpening && canDeleteThread |
|
300 | visible: isOpening && canDeleteThread | |
301 | }, |
|
301 | }, | |
302 | findByIp: { |
|
302 | findByIp: { | |
303 | name: 'IP = ' + posterIp, |
|
303 | name: 'IP = ' + posterIp, | |
304 | callback: function(key, opt) { |
|
304 | callback: function(key, opt) { | |
305 | window.location = '/feed/?ip=' + posterIp; |
|
305 | window.location = '/feed/?ip=' + posterIp; | |
306 | }, |
|
306 | }, | |
307 | visible: canEditPost && hasIp |
|
307 | visible: canEditPost && hasIp | |
308 | }, |
|
308 | }, | |
309 | raw: { |
|
309 | raw: { | |
310 | name: 'RAW', |
|
310 | name: 'RAW', | |
311 | callback: function(key, opt) { |
|
311 | callback: function(key, opt) { | |
312 | window.location = '/post_xml/' + postId; |
|
312 | window.location = '/post_xml/' + postId; | |
313 | }, |
|
313 | }, | |
314 | visible: canEditPost && hasGlobalId |
|
314 | visible: canEditPost && hasGlobalId | |
315 | }, |
|
315 | }, | |
316 | ban: { |
|
316 | ban: { | |
317 | name: gettext('Ban'), |
|
317 | name: gettext('Ban'), | |
318 | callback: function(key, opt) { |
|
318 | callback: function(key, opt) { | |
319 | if (confirm(gettext('Are you sure?'))) { |
|
319 | if (confirm(gettext('Are you sure?'))) { | |
320 | window.location = '/utils?method=ban&post_id=' + postId; |
|
320 | window.location = '/utils?method=ban&post_id=' + postId; | |
321 | } |
|
321 | } | |
322 | }, |
|
322 | }, | |
323 | visible: canEditPost && hasIp |
|
323 | visible: canEditPost && hasIp | |
324 | }, |
|
324 | }, | |
325 | banAndDelete: { |
|
325 | banAndDelete: { | |
326 | name: gettext('Ban and delete'), |
|
326 | name: gettext('Ban and delete'), | |
327 | callback: function(key, opt) { |
|
327 | callback: function(key, opt) { | |
328 | if (confirm(gettext('Are you sure?'))) { |
|
328 | if (confirm(gettext('Are you sure?'))) { | |
329 | window.location = '/utils?method=ban_and_delete&post_id=' + postId; |
|
329 | window.location = '/utils?method=ban_and_delete&post_id=' + postId; | |
330 | } |
|
330 | } | |
331 | }, |
|
331 | }, | |
332 | visible: hasIp && canDeletePost |
|
332 | visible: hasIp && canDeletePost | |
|
333 | }, | |||
|
334 | rollover: { | |||
|
335 | name: gettext('Rollover thread'), | |||
|
336 | callback: function(key, opt) { | |||
|
337 | if (confirm(gettext('Are you sure?'))) { | |||
|
338 | window.location = '/all/?t_from_id=' + postId + '#form'; | |||
|
339 | } | |||
|
340 | }, | |||
|
341 | visible: isOpening | |||
333 | } |
|
342 | } | |
334 | } |
|
343 | } | |
335 | }; |
|
344 | }; | |
336 | } |
|
345 | } | |
337 | }); |
|
346 | }); | |
338 | } |
|
347 | } | |
339 |
|
348 | |||
340 | $( document ).ready(function() { |
|
349 | $( document ).ready(function() { | |
341 | hideEmailFromForm(); |
|
350 | hideEmailFromForm(); | |
342 |
|
351 | |||
343 | $("a[href='#top']").click(function() { |
|
352 | $("a[href='#top']").click(function() { | |
344 | $("html, body").animate({ scrollTop: 0 }, "slow"); |
|
353 | $("html, body").animate({ scrollTop: 0 }, "slow"); | |
345 | return false; |
|
354 | return false; | |
346 | }); |
|
355 | }); | |
347 |
|
356 | |||
348 | addImgPreview(); |
|
357 | addImgPreview(); | |
349 |
|
358 | |||
350 | addRefLinkPreview(); |
|
359 | addRefLinkPreview(); | |
351 |
|
360 | |||
352 | highlightCode($(document)); |
|
361 | highlightCode($(document)); | |
353 |
|
362 | |||
354 | initFavPanel(); |
|
363 | initFavPanel(); | |
355 |
|
364 | |||
356 | var volumeUsers = $("video,audio"); |
|
365 | var volumeUsers = $("video,audio"); | |
357 | processVolumeUser(volumeUsers); |
|
366 | processVolumeUser(volumeUsers); | |
358 |
|
367 | |||
359 | addContextMenu(); |
|
368 | addContextMenu(); | |
360 |
|
369 | |||
361 | compatibilityCrutches(); |
|
370 | compatibilityCrutches(); | |
362 |
|
371 | |||
363 | processPostHiding($('.post')); |
|
372 | processPostHiding($('.post')); | |
364 | }); |
|
373 | }); |
@@ -1,136 +1,151 b'' | |||||
1 | from django.core.paginator import EmptyPage |
|
1 | from django.core.paginator import EmptyPage | |
2 | from django.http import Http404 |
|
2 | from django.http import Http404 | |
3 | from django.shortcuts import render, redirect |
|
3 | from django.shortcuts import render, redirect | |
4 | from django.urls import reverse |
|
4 | from django.urls import reverse | |
5 | from django.utils.decorators import method_decorator |
|
5 | from django.utils.decorators import method_decorator | |
6 | from django.views.decorators.csrf import csrf_protect |
|
6 | from django.views.decorators.csrf import csrf_protect | |
7 |
|
7 | |||
8 | from boards import settings |
|
8 | from boards import settings | |
9 | from boards.abstracts.constants import PARAM_PAGE |
|
9 | from boards.abstracts.constants import PARAM_PAGE | |
10 | from boards.abstracts.paginator import get_paginator |
|
10 | from boards.abstracts.paginator import get_paginator | |
11 | from boards.abstracts.settingsmanager import get_settings_manager, \ |
|
11 | from boards.abstracts.settingsmanager import get_settings_manager, \ | |
12 | SETTING_ONLY_FAVORITES, SETTING_SUBSCRIBE_BY_DEFAULT |
|
12 | SETTING_ONLY_FAVORITES, SETTING_SUBSCRIBE_BY_DEFAULT | |
13 | from boards.forms import ThreadForm, PlainErrorList |
|
13 | from boards.forms import ThreadForm, PlainErrorList | |
14 | from boards.models import Post, Thread |
|
14 | from boards.models import Post, Thread | |
15 | from boards.settings import SECTION_VIEW |
|
15 | from boards.settings import SECTION_VIEW | |
16 | from boards.views.base import BaseBoardView, CONTEXT_FORM |
|
16 | from boards.views.base import BaseBoardView, CONTEXT_FORM | |
17 | from boards.views.mixins import PaginatedMixin, \ |
|
17 | from boards.views.mixins import PaginatedMixin, \ | |
18 | DispatcherMixin, PARAMETER_METHOD |
|
18 | DispatcherMixin, PARAMETER_METHOD | |
19 |
|
19 | |||
20 | ORDER_BUMP = 'bump' |
|
20 | ORDER_BUMP = 'bump' | |
21 |
|
21 | |||
22 | PARAM_ORDER = 'order' |
|
22 | PARAM_ORDER = 'order' | |
23 |
|
23 | |||
24 | FORM_TAGS = 'tags' |
|
24 | FORM_TAGS = 'tags' | |
25 | FORM_TEXT = 'text' |
|
25 | FORM_TEXT = 'text' | |
26 | FORM_TITLE = 'title' |
|
26 | FORM_TITLE = 'title' | |
27 | FORM_IMAGE = 'image' |
|
27 | FORM_IMAGE = 'image' | |
28 | FORM_THREADS = 'threads' |
|
28 | FORM_THREADS = 'threads' | |
29 |
|
29 | |||
30 | TAG_DELIMITER = ' ' |
|
30 | TAG_DELIMITER = ' ' | |
31 |
|
31 | |||
32 | PARAMETER_CURRENT_PAGE = 'current_page' |
|
32 | PARAMETER_CURRENT_PAGE = 'current_page' | |
33 | PARAMETER_PAGINATOR = 'paginator' |
|
33 | PARAMETER_PAGINATOR = 'paginator' | |
34 | PARAMETER_THREADS = 'threads' |
|
34 | PARAMETER_THREADS = 'threads' | |
35 | PARAMETER_ADDITIONAL = 'additional_params' |
|
35 | PARAMETER_ADDITIONAL = 'additional_params' | |
36 | PARAMETER_RSS_URL = 'rss_url' |
|
36 | PARAMETER_RSS_URL = 'rss_url' | |
37 |
|
37 | |||
38 | TEMPLATE = 'boards/all_threads.html' |
|
38 | TEMPLATE = 'boards/all_threads.html' | |
39 | DEFAULT_PAGE = 1 |
|
39 | DEFAULT_PAGE = 1 | |
40 |
|
40 | |||
41 |
|
41 | |||
42 | class AllThreadsView(BaseBoardView, PaginatedMixin, DispatcherMixin): |
|
42 | class AllThreadsView(BaseBoardView, PaginatedMixin, DispatcherMixin): | |
43 |
|
43 | |||
44 | tag_name = '' |
|
44 | tag_name = '' | |
45 |
|
45 | |||
46 | def __init__(self): |
|
46 | def __init__(self): | |
47 | self.settings_manager = None |
|
47 | self.settings_manager = None | |
48 | super(AllThreadsView, self).__init__() |
|
48 | super(AllThreadsView, self).__init__() | |
49 |
|
49 | |||
50 | @method_decorator(csrf_protect) |
|
50 | @method_decorator(csrf_protect) | |
51 | def get(self, request, form: ThreadForm=None): |
|
51 | def get(self, request, form: ThreadForm=None): | |
52 | page = request.GET.get(PARAM_PAGE, DEFAULT_PAGE) |
|
52 | page = request.GET.get(PARAM_PAGE, DEFAULT_PAGE) | |
53 |
|
53 | |||
54 | params = self.get_context_data(request=request) |
|
54 | params = self.get_context_data(request=request) | |
55 |
|
55 | |||
56 | subscribe_by_default = get_settings_manager(request).get_setting( |
|
56 | subscribe_by_default = get_settings_manager(request).get_setting( | |
57 | SETTING_SUBSCRIBE_BY_DEFAULT, False) |
|
57 | SETTING_SUBSCRIBE_BY_DEFAULT, False) | |
58 |
|
58 | |||
59 | if not form: |
|
59 | if not form: | |
60 | form = ThreadForm(error_class=PlainErrorList, |
|
60 | t_from_id = request.GET.get('t_from_id') | |
61 | initial={FORM_TAGS: self.tag_name, |
|
61 | if t_from_id: | |
62 | 'subscribe': subscribe_by_default}) |
|
62 | source_op = Post.objects.get(id=int(t_from_id)) | |
|
63 | tags_str = ' '.join([tag.get_name() for tag in source_op.get_thread().get_tags()]) | |||
|
64 | post_link = '[post]{}[/post]'.format(source_op.id) #FIXME To constants | |||
|
65 | new_title = source_op.get_title() + ' NEW' # TODO More intelligent name change | |||
|
66 | ||||
|
67 | form = ThreadForm(error_class=PlainErrorList, | |||
|
68 | initial={ | |||
|
69 | FORM_TAGS: tags_str, | |||
|
70 | 'subscribe': subscribe_by_default, | |||
|
71 | FORM_TEXT: post_link, | |||
|
72 | FORM_TITLE: new_title, | |||
|
73 | }) | |||
|
74 | else: | |||
|
75 | form = ThreadForm(error_class=PlainErrorList, | |||
|
76 | initial={FORM_TAGS: self.tag_name, | |||
|
77 | 'subscribe': subscribe_by_default}) | |||
63 |
|
78 | |||
64 | self.settings_manager = get_settings_manager(request) |
|
79 | self.settings_manager = get_settings_manager(request) | |
65 |
|
80 | |||
66 | threads = self.get_threads() |
|
81 | threads = self.get_threads() | |
67 |
|
82 | |||
68 | order = request.GET.get(PARAM_ORDER, ORDER_BUMP) |
|
83 | order = request.GET.get(PARAM_ORDER, ORDER_BUMP) | |
69 | if order == ORDER_BUMP: |
|
84 | if order == ORDER_BUMP: | |
70 | threads = threads.order_by('-bump_time') |
|
85 | threads = threads.order_by('-bump_time') | |
71 | else: |
|
86 | else: | |
72 | threads = threads.filter(replies__opening=True)\ |
|
87 | threads = threads.filter(replies__opening=True)\ | |
73 | .order_by('-replies__pub_time') |
|
88 | .order_by('-replies__pub_time') | |
74 | threads = threads.distinct() |
|
89 | threads = threads.distinct() | |
75 |
|
90 | |||
76 | paginator = get_paginator(threads, settings.get_int( |
|
91 | paginator = get_paginator(threads, settings.get_int( | |
77 | SECTION_VIEW, 'ThreadsPerPage'), |
|
92 | SECTION_VIEW, 'ThreadsPerPage'), | |
78 | link=self.get_reverse_url(), |
|
93 | link=self.get_reverse_url(), | |
79 | params=request.GET.dict()) |
|
94 | params=request.GET.dict()) | |
80 | paginator.current_page = int(page) |
|
95 | paginator.current_page = int(page) | |
81 |
|
96 | |||
82 | try: |
|
97 | try: | |
83 | threads = paginator.page(page).object_list |
|
98 | threads = paginator.page(page).object_list | |
84 | except EmptyPage: |
|
99 | except EmptyPage: | |
85 | raise Http404() |
|
100 | raise Http404() | |
86 |
|
101 | |||
87 | params[PARAMETER_THREADS] = threads |
|
102 | params[PARAMETER_THREADS] = threads | |
88 | params[CONTEXT_FORM] = form |
|
103 | params[CONTEXT_FORM] = form | |
89 | params[PARAMETER_RSS_URL] = self.get_rss_url() |
|
104 | params[PARAMETER_RSS_URL] = self.get_rss_url() | |
90 |
|
105 | |||
91 | params.update(self.get_page_context(paginator, page)) |
|
106 | params.update(self.get_page_context(paginator, page)) | |
92 |
|
107 | |||
93 | return render(request, TEMPLATE, params) |
|
108 | return render(request, TEMPLATE, params) | |
94 |
|
109 | |||
95 | @method_decorator(csrf_protect) |
|
110 | @method_decorator(csrf_protect) | |
96 | def post(self, request): |
|
111 | def post(self, request): | |
97 | if PARAMETER_METHOD in request.POST: |
|
112 | if PARAMETER_METHOD in request.POST: | |
98 | self.dispatch_method(request) |
|
113 | self.dispatch_method(request) | |
99 |
|
114 | |||
100 | return redirect(self.get_reverse_url()) |
|
115 | return redirect(self.get_reverse_url()) | |
101 |
|
116 | |||
102 | form = ThreadForm(request.POST, request.FILES, |
|
117 | form = ThreadForm(request.POST, request.FILES, | |
103 | error_class=PlainErrorList, session=request.session) |
|
118 | error_class=PlainErrorList, session=request.session) | |
104 |
|
119 | |||
105 | if form.is_valid(): |
|
120 | if form.is_valid(): | |
106 | return Post.objects.create_from_form(request, form, None) |
|
121 | return Post.objects.create_from_form(request, form, None) | |
107 | if form.need_to_ban: |
|
122 | if form.need_to_ban: | |
108 | # Ban user because he is suspected to be a bot |
|
123 | # Ban user because he is suspected to be a bot | |
109 | self._ban_current_user(request) |
|
124 | self._ban_current_user(request) | |
110 |
|
125 | |||
111 | return self.get(request, form) |
|
126 | return self.get(request, form) | |
112 |
|
127 | |||
113 | def get_reverse_url(self): |
|
128 | def get_reverse_url(self): | |
114 | return reverse('index') |
|
129 | return reverse('index') | |
115 |
|
130 | |||
116 | def get_threads(self): |
|
131 | def get_threads(self): | |
117 | """ |
|
132 | """ | |
118 | Gets list of threads that will be shown on a page. |
|
133 | Gets list of threads that will be shown on a page. | |
119 | """ |
|
134 | """ | |
120 |
|
135 | |||
121 | threads = Thread.objects\ |
|
136 | threads = Thread.objects\ | |
122 | .exclude(tags__in=self.settings_manager.get_hidden_tags()) |
|
137 | .exclude(tags__in=self.settings_manager.get_hidden_tags()) | |
123 | if self.settings_manager.get_setting(SETTING_ONLY_FAVORITES): |
|
138 | if self.settings_manager.get_setting(SETTING_ONLY_FAVORITES): | |
124 | fav_tags = self.settings_manager.get_fav_tags() |
|
139 | fav_tags = self.settings_manager.get_fav_tags() | |
125 | if len(fav_tags) > 0: |
|
140 | if len(fav_tags) > 0: | |
126 | threads = threads.filter(tags__in=fav_tags) |
|
141 | threads = threads.filter(tags__in=fav_tags) | |
127 |
|
142 | |||
128 | return threads |
|
143 | return threads | |
129 |
|
144 | |||
130 | def get_rss_url(self): |
|
145 | def get_rss_url(self): | |
131 | return self.get_reverse_url() + 'rss/' |
|
146 | return self.get_reverse_url() + 'rss/' | |
132 |
|
147 | |||
133 | def toggle_fav(self, request): |
|
148 | def toggle_fav(self, request): | |
134 | settings_manager = get_settings_manager(request) |
|
149 | settings_manager = get_settings_manager(request) | |
135 | settings_manager.set_setting(SETTING_ONLY_FAVORITES, |
|
150 | settings_manager.set_setting(SETTING_ONLY_FAVORITES, | |
136 | not settings_manager.get_setting(SETTING_ONLY_FAVORITES, False)) |
|
151 | not settings_manager.get_setting(SETTING_ONLY_FAVORITES, False)) |
General Comments 0
You need to be logged in to leave comments.
Login now