Fix most go lint warnings
Cette révision appartient à :
Parent
a931b47bff
révision
d9142a73c3
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"alt-require": true,
|
||||
"attr-lowercase": true,
|
||||
"attr-no-duplication": true,
|
||||
"attr-unsafe-chars": true,
|
||||
"attr-value-double-quotes": false,
|
||||
"attr-value-not-empty": false,
|
||||
"doctype-first": true,
|
||||
"doctype-html5": true,
|
||||
"head-script-disabled": true,
|
||||
"href-abs-or-rel": false,
|
||||
"id-class-ad-disabled": true,
|
||||
"id-class-value": "dash",
|
||||
"id-unique": true,
|
||||
"inline-script-disabled": true,
|
||||
"inline-style-disabled": true,
|
||||
"space-tab-mixed-disabled": "space2",
|
||||
"spec-char-escape": true,
|
||||
"src-not-empty": true,
|
||||
"style-disabled": true,
|
||||
"tag-pair": true,
|
||||
"tag-self-close": false,
|
||||
"tagname-lowercase": true,
|
||||
"title-require": true
|
||||
}
|
|
@ -16,4 +16,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define({ "api": [
|
||||
{
|
||||
define({
|
||||
"api": [{
|
||||
"type": "get",
|
||||
"url": "/search/",
|
||||
"title": "Search Torrents",
|
||||
|
@ -8,8 +8,7 @@ define({ "api": [
|
|||
"group": "Torrents",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "String[]",
|
||||
"optional": false,
|
||||
|
@ -133,45 +132,37 @@ define({ "api": [
|
|||
},
|
||||
"success": {
|
||||
"fields": {
|
||||
"Success 200": [
|
||||
{
|
||||
"Success 200": [{
|
||||
"group": "Success 200",
|
||||
"type": "Object[]",
|
||||
"optional": false,
|
||||
"field": "torrents",
|
||||
"description": "<p>List of torrent object (see view for the properties).</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n {\n\t\t\t\"torrents\": [...],\n\t\t\t\"queryRecordCount\": 50,\n\t\t\t\"totalRecordCount\": 798414\n\t\t}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/api.go",
|
||||
"groupTitle": "Torrents",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "String[]",
|
||||
"optional": false,
|
||||
"field": "errors",
|
||||
"description": "<p>List of errors messages with a 404 error message in it.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -183,8 +174,7 @@ define({ "api": [
|
|||
"group": "Torrents",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "String[]",
|
||||
"optional": false,
|
||||
|
@ -308,45 +298,37 @@ define({ "api": [
|
|||
},
|
||||
"success": {
|
||||
"fields": {
|
||||
"Success 200": [
|
||||
{
|
||||
"Success 200": [{
|
||||
"group": "Success 200",
|
||||
"type": "Object[]",
|
||||
"optional": false,
|
||||
"field": "torrents",
|
||||
"description": "<p>List of torrent object (see view for the properties).</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n {\n\t\t\t[...]\n\t\t}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/_apidoc.js",
|
||||
"groupTitle": "Torrents",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "String[]",
|
||||
"optional": false,
|
||||
"field": "errors",
|
||||
"description": "<p>List of errors messages with a 404 error message in it.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -358,21 +340,18 @@ define({ "api": [
|
|||
"group": "Torrents",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "Number",
|
||||
"optional": false,
|
||||
"field": "id",
|
||||
"description": "<p>Torrent unique ID.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
"success": {
|
||||
"fields": {
|
||||
"Success 200": [
|
||||
{
|
||||
"Success 200": [{
|
||||
"group": "Success 200",
|
||||
"type": "Number",
|
||||
"optional": false,
|
||||
|
@ -535,35 +514,29 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n\t{\n\t\"id\": 952801,\n\t\"name\": \"[HorribleSubs] Uchouten Kazoku S2 [720p]\",\n\t\"status\": 1,\n\t\"hash\": \"6E4D96F7A0B0456672E80B150CCB7C15868CD47D\",\n\t\"date\": \"2017-07-05T11:01:39Z\",\n\t\"filesize\": 4056160259,\n\t\"description\": \"<p>Unofficial batch</p>\\n\",\n\t\"comments\": [],\n\t\"sub_category\": \"5\",\n\t\"category\": \"3\",\n\t\"anidb_id\": \"\",\n\t\"downloads\": 0,\n\t\"uploader_id\": 7177,\n\t\"uploader_name\": \"DarAR92\",\n\t\"uploader_old\": \"\",\n\t\"website_link\": \"http://horriblesubs.info/\",\n\t\"languages\": [\n\t\"en-us\"\n\t],\n\t\"magnet\": \"magnet:?xt=urn:btih:6E4D96F7A0B0456672E80B150CCB7C15868CD47D&dn=%5BHorribleSubs%5D+Uchouten+Kazoku+S2+%5B720p%5D&tr=http://nyaa.tracker.wf:7777/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://tracker.doko.moe:6969&tr=http://tracker.anirena.com:80/announce&tr=http://anidex.moe:6969/announce&tr=udp://tracker.opentrackr.org:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://zer0day.ch:1337&tr=udp://9.rarbg.com:2710/announce&tr=udp://tracker2.christianbro.pw:6969/announce&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://eddie4.nl:6969/announce&tr=udp://tracker.doko.moe:6969/announce\",\n\t\"torrent\": \"https://nyaa.pantsu.cat/download/6E4D96F7A0B0456672E80B150CCB7C15868CD47D\",\n\t\"seeders\": 4,\n\t\"leechers\": 2,\n\t\"completed\": 28,\n\t\"last_scrape\": \"2017-07-07T07:48:32.509635Z\",\n\t\"file_list\": [\n\t{\n\t\"path\": \"[HorribleSubs] Uchouten Kazoku S2 - 01[720p].mkv\",\n\t\"filesize\": 338250895\n\t},\n\t{\n\t\"path\": \"[HorribleSubs] Uchouten Kazoku S2 - 12 [720p].mkv\",\n\t\"filesize\": 338556275\n\t}\n\t]\n\t}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/api.go",
|
||||
"groupTitle": "Torrents",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "String[]",
|
||||
"optional": false,
|
||||
"field": "errors",
|
||||
"description": "<p>List of errors messages with a 404 error message in it.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -575,47 +548,39 @@ define({ "api": [
|
|||
"group": "Torrents",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "Number",
|
||||
"optional": false,
|
||||
"field": "id",
|
||||
"description": "<p>Torrent unique ID.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
"success": {
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": "HTTP/1.1 200 OK",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/api.go",
|
||||
"groupTitle": "Torrents",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "String[]",
|
||||
"optional": false,
|
||||
"field": "errors",
|
||||
"description": "<p>List of errors messages with a 404 error message in it.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -627,21 +592,18 @@ define({ "api": [
|
|||
"group": "Torrents",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "Number",
|
||||
"optional": false,
|
||||
"field": "id",
|
||||
"description": "<p>Torrent unique ID.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
"success": {
|
||||
"fields": {
|
||||
"Success 200": [
|
||||
{
|
||||
"Success 200": [{
|
||||
"group": "Success 200",
|
||||
"type": "Object[]",
|
||||
"optional": false,
|
||||
|
@ -664,35 +626,29 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n {\n\t\t\t\"torrents\": [...],\n\t\t\t\"queryRecordCount\": 50,\n\t\t\t\"totalRecordCount\": 798414\n\t\t}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/api.go",
|
||||
"groupTitle": "Torrents",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "String[]",
|
||||
"optional": false,
|
||||
"field": "errors",
|
||||
"description": "<p>List of errors messages with a 404 error message in it.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -704,8 +660,7 @@ define({ "api": [
|
|||
"group": "Torrents",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "String",
|
||||
"optional": false,
|
||||
|
@ -780,8 +735,7 @@ define({ "api": [
|
|||
},
|
||||
"success": {
|
||||
"fields": {
|
||||
"Success 200": [
|
||||
{
|
||||
"Success 200": [{
|
||||
"group": "Success 200",
|
||||
"type": "Boolean",
|
||||
"optional": false,
|
||||
|
@ -804,20 +758,17 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": "HTTP/1.1 200 OK",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/api.go",
|
||||
"groupTitle": "Torrents",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "Boolean",
|
||||
"optional": false,
|
||||
|
@ -840,13 +791,11 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -858,8 +807,7 @@ define({ "api": [
|
|||
"group": "Torrents",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "String",
|
||||
"optional": false,
|
||||
|
@ -941,8 +889,7 @@ define({ "api": [
|
|||
},
|
||||
"success": {
|
||||
"fields": {
|
||||
"Success 200": [
|
||||
{
|
||||
"Success 200": [{
|
||||
"group": "Success 200",
|
||||
"type": "Boolean",
|
||||
"optional": false,
|
||||
|
@ -965,20 +912,17 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": "HTTP/1.1 200 OK",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/api.go",
|
||||
"groupTitle": "Torrents",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "Boolean",
|
||||
"optional": false,
|
||||
|
@ -1001,13 +945,11 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1019,8 +961,7 @@ define({ "api": [
|
|||
"group": "Users",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "String",
|
||||
"optional": false,
|
||||
|
@ -1039,8 +980,7 @@ define({ "api": [
|
|||
},
|
||||
"success": {
|
||||
"fields": {
|
||||
"Success 200": [
|
||||
{
|
||||
"Success 200": [{
|
||||
"group": "Success 200",
|
||||
"type": "Boolean",
|
||||
"optional": false,
|
||||
|
@ -1063,20 +1003,17 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n\t\t{\n\t\t\tdata:\n \t\t[{\n\t\t\t\t\tuser_id:1,\n\t\t\t\t\tusername:\"username\",\n\t\t\t\t\tstatus:1,\n\t\t\t\t\ttoken:\"token\",\n\t\t\t\t\tmd5:\"\",\n\t\t\t\t\tcreated_at:\"date\",\n\t\t\t\t\tliking_count:0,\n\t\t\t\t\tliked_count:0\n\t\t\t\t}],\n\t\t\tinfos: [\"Logged\", ... ],\n\t\t\tok:true\n\t\t}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/api.go",
|
||||
"groupTitle": "Users",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "Boolean",
|
||||
"optional": false,
|
||||
|
@ -1099,13 +1036,11 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1117,21 +1052,18 @@ define({ "api": [
|
|||
"group": "Users",
|
||||
"parameter": {
|
||||
"fields": {
|
||||
"Parameter": [
|
||||
{
|
||||
"Parameter": [{
|
||||
"group": "Parameter",
|
||||
"type": "Number",
|
||||
"optional": false,
|
||||
"field": "id",
|
||||
"description": "<p>User ID.</p>"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
"success": {
|
||||
"fields": {
|
||||
"Success 200": [
|
||||
{
|
||||
"Success 200": [{
|
||||
"group": "Success 200",
|
||||
"type": "Boolean",
|
||||
"optional": false,
|
||||
|
@ -1154,20 +1086,17 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Success-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n\t\t{\n\t\t\tdata:\n \t\t[{\n\t\t\t\t\tuser_id:1,\n\t\t\t\t\tusername:\"username\",\n\t\t\t\t\tstatus:1,\n\t\t\t\t\tmd5:\"\",\n\t\t\t\t\tcreated_at:\"date\",\n\t\t\t\t\tliking_count:0,\n\t\t\t\t\tliked_count:0\n\t\t\t\t}],\n\t\t\tinfos: [\"Logged\", ... ],\n\t\t\tok:true\n\t\t}",
|
||||
"type": "json"
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
"filename": "controllers/api/api.go",
|
||||
"groupTitle": "Users",
|
||||
"error": {
|
||||
"fields": {
|
||||
"Error 4xx": [
|
||||
{
|
||||
"Error 4xx": [{
|
||||
"group": "Error 4xx",
|
||||
"type": "Boolean",
|
||||
"optional": false,
|
||||
|
@ -1190,13 +1119,12 @@ define({ "api": [
|
|||
}
|
||||
]
|
||||
},
|
||||
"examples": [
|
||||
{
|
||||
"examples": [{
|
||||
"title": "Error-Response:",
|
||||
"content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }",
|
||||
"type": "json"
|
||||
}]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
] });
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>Loading...</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
@ -10,39 +11,34 @@
|
|||
<link href="css/style.css" rel="stylesheet" media="screen, print">
|
||||
<link href="img/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<script src="vendor/polyfill.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</head>
|
||||
|
||||
<script id="template-sidenav" type="text/x-handlebars-template">
|
||||
<nav id="scrollingNav">
|
||||
<body>
|
||||
|
||||
<script id="template-sidenav" type="text/x-handlebars-template">
|
||||
<nav id="scrollingNav">
|
||||
<div class="sidenav-search">
|
||||
<input class="form-control search" type="text" placeholder="{{__ "Filter..."}}">
|
||||
<input class="form-control search" type="text" placeholder="{{__ " Filter... "}}">
|
||||
<span class="search-reset">x</span>
|
||||
</div>
|
||||
<ul class="sidenav nav nav-list list">
|
||||
{{#each nav}}
|
||||
{{#if title}}
|
||||
{{#if isHeader}}
|
||||
{{#if isFixed}}
|
||||
{{#each nav}} {{#if title}} {{#if isHeader}} {{#if isFixed}}
|
||||
<li class="nav-fixed nav-header navbar-btn nav-list-item" data-group="{{group}}"><a href="#api-{{group}}">{{underscoreToSpace title}}</a></li>
|
||||
{{else}}
|
||||
<li class="nav-header nav-list-item" data-group="{{group}}"><a href="#api-{{group}}">{{underscoreToSpace title}}</a></li>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{/if}} {{else}}
|
||||
<li class="{{#if hidden}}hide {{/if}}" data-group="{{group}}" data-name="{{name}}" data-version="{{version}}">
|
||||
<a href="#api-{{group}}-{{name}}" class="nav-list-item">{{title}}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{/if}} {{/if}} {{/each}}
|
||||
</ul>
|
||||
</nav>
|
||||
</script>
|
||||
</nav>
|
||||
</script>
|
||||
|
||||
<script id="template-project" type="text/x-handlebars-template">
|
||||
<script id="template-project" type="text/x-handlebars-template">
|
||||
<div class="pull-left">
|
||||
<h1>{{name}}</h1>
|
||||
{{#if description}}<h2>{{{nl2br description}}}</h2>{{/if}}
|
||||
<h1>{{name}}</h1> {{#if description}}
|
||||
<h2>{{{nl2br description}}}</h2>{{/if}}
|
||||
</div>
|
||||
{{#if template.withCompare}}
|
||||
<div class="pull-right">
|
||||
|
@ -62,46 +58,42 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
<div class="clearfix"></div>
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script id="template-header" type="text/x-handlebars-template">
|
||||
<script id="template-header" type="text/x-handlebars-template">
|
||||
{{#if content}}
|
||||
<div id="api-_">{{{content}}}</div>
|
||||
{{/if}}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script id="template-footer" type="text/x-handlebars-template">
|
||||
<script id="template-footer" type="text/x-handlebars-template">
|
||||
{{#if content}}
|
||||
<div id="api-_footer">{{{content}}}</div>
|
||||
{{/if}}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script id="template-generator" type="text/x-handlebars-template">
|
||||
{{#if template.withGenerator}}
|
||||
{{#if generator}}
|
||||
<script id="template-generator" type="text/x-handlebars-template">
|
||||
{{#if template.withGenerator}} {{#if generator}}
|
||||
<div class="content">
|
||||
{{__ "Generated with"}} <a href="{{{generator.url}}}">{{{generator.name}}}</a> {{{generator.version}}} - {{{generator.time}}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</script>
|
||||
{{/if}} {{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-sections" type="text/x-handlebars-template">
|
||||
<script id="template-sections" type="text/x-handlebars-template">
|
||||
<section id="api-{{group}}">
|
||||
<h1>{{underscoreToSpace title}}</h1>
|
||||
{{#if description}}
|
||||
<h1>{{underscoreToSpace title}}</h1> {{#if description}}
|
||||
<p>{{{nl2br description}}}</p>
|
||||
{{/if}}
|
||||
{{#each articles}}
|
||||
{{/if}} {{#each articles}}
|
||||
<div id="api-{{group}}-{{name}}">
|
||||
{{{article}}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</section>
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script id="template-article" type="text/x-handlebars-template">
|
||||
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}">
|
||||
<script id="template-article" type="text/x-handlebars-template">
|
||||
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide" {{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}">
|
||||
<div class="pull-left">
|
||||
<h1>{{article.groupTitle}}{{#if article.title}} - {{article.title}}{{/if}}</h1>
|
||||
</div>
|
||||
|
@ -123,35 +115,23 @@
|
|||
<div class="clearfix"></div>
|
||||
|
||||
{{#if article.deprecated}}
|
||||
<p class="deprecated"><span>{{__ "DEPRECATED"}}</span>
|
||||
{{{markdown article.deprecated.content}}}
|
||||
<p class="deprecated"><span>{{__ "DEPRECATED"}}</span> {{{markdown article.deprecated.content}}}
|
||||
</p>
|
||||
{{/if}}
|
||||
|
||||
{{#if article.description}}
|
||||
{{/if}} {{#if article.description}}
|
||||
<p>{{{nl2br article.description}}}</p>
|
||||
{{/if}}
|
||||
<span class="type type__{{toLowerCase article.type}}">{{toLowerCase article.type}}</span>
|
||||
<pre class="prettyprint language-html" data-type="{{toLowerCase article.type}}"><code>{{article.url}}</code></pre>
|
||||
|
||||
{{#if article.permission}}
|
||||
<pre class="prettyprint language-html" data-type="{{toLowerCase article.type}}"><code>{{article.url}}</code></pre> {{#if article.permission}}
|
||||
<p>
|
||||
{{__ "Permission:"}}
|
||||
{{#each article.permission}}
|
||||
{{name}}
|
||||
{{#if title}}
|
||||
{{__ "Permission:"}} {{#each article.permission}} {{name}} {{#if title}}
|
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{title}}" data-content="{{nl2br description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</button> {{/if}} {{/each}}
|
||||
</p>
|
||||
{{/if}}
|
||||
|
||||
{{#if_gt article.examples.length compare=0}}
|
||||
{{/if}} {{#if_gt article.examples.length compare=0}}
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
{{#each article.examples}}
|
||||
<li{{#if_eq @index compare=0}} class="active"{{/if_eq}}>
|
||||
<li{{#if_eq @index compare=0}} class="active" {{/if_eq}}>
|
||||
<a href="#examples-{{../id}}-{{@index}}">{{title}}</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
@ -164,26 +144,21 @@
|
|||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if_gt}}
|
||||
|
||||
{{subTemplate "article-param-block" params=article.header _hasType=_hasTypeInHeaderFields section="header"}}
|
||||
{{subTemplate "article-param-block" params=article.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
|
||||
{{subTemplate "article-param-block" params=article.success _hasType=_hasTypeInSuccessFields section="success"}}
|
||||
{{subTemplate "article-param-block" params=article.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
|
||||
|
||||
{{subTemplate "article-sample-request" article=article id=id}}
|
||||
{{/if_gt}} {{subTemplate "article-param-block" params=article.header _hasType=_hasTypeInHeaderFields section="header"}} {{subTemplate "article-param-block" params=article.parameter _hasType=_hasTypeInParameterFields section="parameter"}} {{subTemplate
|
||||
"article-param-block" params=article.success _hasType=_hasTypeInSuccessFields section="success"}} {{subTemplate "article-param-block" params=article.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}} {{subTemplate "article-sample-request"
|
||||
article=article id=id}}
|
||||
</article>
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script id="template-article-param-block" type="text/x-handlebars-template">
|
||||
{{#if params}}
|
||||
{{#each params.fields}}
|
||||
<script id="template-article-param-block" type="text/x-handlebars-template">
|
||||
{{#if params}} {{#each params.fields}}
|
||||
<h2>{{__ @key}}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
|
||||
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
|
||||
{{#if ../_hasType}}
|
||||
<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
|
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -197,13 +172,11 @@
|
|||
</td>
|
||||
{{/if}}
|
||||
<td>
|
||||
{{{nl2br description}}}
|
||||
{{#if defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}}
|
||||
{{#if size}}<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}}
|
||||
{{#if allowedValues}}<p class="type-size">{{__ "Allowed values:"}}
|
||||
{{#each allowedValues}}
|
||||
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
|
||||
{{/each}}
|
||||
{{{nl2br description}}} {{#if defaultValue}}
|
||||
<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}} {{#if size}}
|
||||
<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}} {{#if allowedValues}}
|
||||
<p class="type-size">{{__ "Allowed values:"}} {{#each allowedValues}}
|
||||
<code>{{{this}}}</code>{{#unless @last}}, {{/unless}} {{/each}}
|
||||
</p>
|
||||
{{/if}}
|
||||
</td>
|
||||
|
@ -211,11 +184,10 @@
|
|||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/each}}
|
||||
{{#if_gt params.examples.length compare=0}}
|
||||
{{/each}} {{#if_gt params.examples.length compare=0}}
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
{{#each params.examples}}
|
||||
<li{{#if_eq @index compare=0}} class="active"{{/if_eq}}>
|
||||
<li{{#if_eq @index compare=0}} class="active" {{/if_eq}}>
|
||||
<a href="#{{../section}}-examples-{{../id}}-{{@index}}">{{title}}</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
|
@ -228,11 +200,10 @@
|
|||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if_gt}}
|
||||
{{/if}}
|
||||
</script>
|
||||
{{/if_gt}} {{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-article-sample-request" type="text/x-handlebars-template">
|
||||
<script id="template-article-sample-request" type="text/x-handlebars-template">
|
||||
{{#if article.sampleRequest}}
|
||||
<h2>{{__ "Send a Sample Request"}}</h2>
|
||||
<form class="form-horizontal">
|
||||
|
@ -245,10 +216,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{#if article.header}}
|
||||
{{#if article.header.fields}}
|
||||
<h3>{{__ "Headers"}}</h3>
|
||||
{{#each article.header.fields}}
|
||||
{{#if article.header}} {{#if article.header.fields}}
|
||||
<h3>{{__ "Headers"}}</h3> {{#each article.header.fields}}
|
||||
<h4><input type="radio" data-sample-request-header-group-id="sample-request-header-{{@index}}" name="{{../id}}-sample-request-header" value="{{@index}}" class="sample-request-header sample-request-switch" {{#if_eq @index compare=0}} checked{{/if_eq}} />{{@key}}</h4>
|
||||
<div class="{{../id}}-sample-request-header-fields{{#if_gt @index compare=0}} hide{{/if_gt}}">
|
||||
{{#each this}}
|
||||
|
@ -261,27 +230,20 @@
|
|||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if article.parameter}}
|
||||
{{#if article.parameter.fields}}
|
||||
<h3>{{__ "Parameters"}}</h3>
|
||||
{{#each article.parameter.fields}}
|
||||
{{/each}} {{/if}} {{/if}} {{#if article.parameter}} {{#if article.parameter.fields}}
|
||||
<h3>{{__ "Parameters"}}</h3> {{#each article.parameter.fields}}
|
||||
<h4><input type="radio" data-sample-request-param-group-id="sample-request-param-{{@index}}" name="{{../id}}-sample-request-param" value="{{@index}}" class="sample-request-param sample-request-switch" {{#if_eq @index compare=0}} checked{{/if_eq}} />{{@key}}</h4>
|
||||
<div class="form-group {{../id}}-sample-request-param-fields{{#if_gt @index compare=0}} hide{{/if_gt}}">
|
||||
{{#each this}}
|
||||
<label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
|
||||
<div class="input-group">
|
||||
<input id="sample-request-param-field-{{field}}" type="text" placeholder="{{field}}" class="form-control sample-request-param" data-sample-request-param-name="{{field}}" data-sample-request-param-group="sample-request-param-{{@../index}}" {{#if optional}}data-sample-request-param-optional="true"{{/if}}>
|
||||
<input id="sample-request-param-field-{{field}}" type="text" placeholder="{{field}}" class="form-control sample-request-param" data-sample-request-param-name="{{field}}" data-sample-request-param-group="sample-request-param-{{@../index}}" {{#if optional}}data-sample-request-param-optional="true"
|
||||
{{/if}}>
|
||||
<div class="input-group-addon">{{{type}}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}} {{/if}} {{/if}}
|
||||
|
||||
<div class="form-group">
|
||||
<div class="controls pull-right">
|
||||
|
@ -298,10 +260,10 @@
|
|||
</fieldset>
|
||||
</form>
|
||||
{{/if}}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script id="template-compare-article" type="text/x-handlebars-template">
|
||||
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}" data-compare-version="{{compare.version}}">
|
||||
<script id="template-compare-article" type="text/x-handlebars-template">
|
||||
<article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide" {{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}" data-compare-version="{{compare.version}}">
|
||||
<div class="pull-left">
|
||||
<h1>{{underscoreToSpace article.group}} - {{{showDiff article.title compare.title}}}</h1>
|
||||
</div>
|
||||
|
@ -327,316 +289,213 @@
|
|||
|
||||
{{#if article.description}}
|
||||
<p>{{{showDiff article.description compare.description "nl2br"}}}</p>
|
||||
{{else}}
|
||||
{{#if compare.description}}
|
||||
{{else}} {{#if compare.description}}
|
||||
<p>{{{showDiff "" compare.description "nl2br"}}}</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}} {{/if}}
|
||||
|
||||
<pre class="prettyprint language-html" data-type="{{toLowerCase article.type}}"><code>{{{showDiff article.url compare.url}}}</code></pre>
|
||||
|
||||
{{subTemplate "article-compare-permission" article=article compare=compare}}
|
||||
<pre class="prettyprint language-html" data-type="{{toLowerCase article.type}}"><code>{{{showDiff article.url compare.url}}}</code></pre> {{subTemplate "article-compare-permission" article=article compare=compare}}
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
{{#each_compare_title article.examples compare.examples}}
|
||||
{{#if typeSame}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
{{#each_compare_title article.examples compare.examples}} {{#if typeSame}}
|
||||
<li{{#if_eq index compare=0}} class="active" {{/if_eq}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
{{/if}} {{#if typeIns}}
|
||||
<li{{#if_eq index compare=0}} class="active" {{/if_eq}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
{{/if}} {{#if typeDel}}
|
||||
<li{{#if_eq index compare=0}} class="active" {{/if_eq}}>
|
||||
<a href="#compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each_compare_title}}
|
||||
{{/if}} {{/each_compare_title}}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
{{#each_compare_title article.examples compare.examples}}
|
||||
|
||||
{{#if typeSame}}
|
||||
{{#each_compare_title article.examples compare.examples}} {{#if typeSame}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{source.type}}"><code>{{{showDiff source.content compare.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
{{/if}} {{#if typeIns}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{source.type}}"><code>{{{source.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
{{/if}} {{#if typeDel}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{compare.type}}"><code>{{{compare.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{/each_compare_title}}
|
||||
{{/if}} {{/each_compare_title}}
|
||||
</div>
|
||||
|
||||
{{subTemplate "article-compare-param-block" source=article.parameter compare=compare.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
|
||||
{{subTemplate "article-compare-param-block" source=article.success compare=compare.success _hasType=_hasTypeInSuccessFields section="success"}}
|
||||
{{subTemplate "article-compare-param-block" source=article.error compare=compare.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
|
||||
|
||||
{{subTemplate "article-sample-request" article=article id=id}}
|
||||
{{subTemplate "article-compare-param-block" source=article.parameter compare=compare.parameter _hasType=_hasTypeInParameterFields section="parameter"}} {{subTemplate "article-compare-param-block" source=article.success compare=compare.success _hasType=_hasTypeInSuccessFields
|
||||
section="success"}} {{subTemplate "article-compare-param-block" source=article.error compare=compare.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}} {{subTemplate "article-sample-request" article=article id=id}}
|
||||
|
||||
</article>
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script id="template-article-compare-permission" type="text/x-handlebars-template">
|
||||
<script id="template-article-compare-permission" type="text/x-handlebars-template">
|
||||
<p>
|
||||
{{__ "Permission:"}}
|
||||
{{#each_compare_list_field article.permission compare.permission field="name"}}
|
||||
{{#if source}}
|
||||
{{#if typeSame}}
|
||||
{{source.name}}
|
||||
{{#if source.title}}
|
||||
{{__ "Permission:"}} {{#each_compare_list_field article.permission compare.permission field="name"}} {{#if source}} {{#if typeSame}} {{source.name}} {{#if source.title}}
|
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</button>
|
||||
{{#unless _last}}, {{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<ins>{{source.name}}</ins>
|
||||
{{#if source.title}}
|
||||
</button> {{#unless _last}}, {{/unless}} {{/if}} {{/if}} {{#if typeIns}}
|
||||
<ins>{{source.name}}</ins> {{#if source.title}}
|
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</button>
|
||||
{{#unless _last}}, {{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<del>{{source.name}}</del>
|
||||
{{#if source.title}}
|
||||
</button> {{#unless _last}}, {{/unless}} {{/if}} {{/if}} {{#if typeDel}}
|
||||
<del>{{source.name}}</del> {{#if source.title}}
|
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</button>
|
||||
{{#unless _last}}, {{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if typeSame}}
|
||||
{{compare.name}}
|
||||
{{#if compare.title}}
|
||||
</button> {{#unless _last}}, {{/unless}} {{/if}} {{/if}} {{else}} {{#if typeSame}} {{compare.name}} {{#if compare.title}}
|
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</button>
|
||||
{{#unless _last}}, {{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<ins>{{compare.name}}</ins>
|
||||
{{#if compare.title}}
|
||||
</button> {{#unless _last}}, {{/unless}} {{/if}} {{/if}} {{#if typeIns}}
|
||||
<ins>{{compare.name}}</ins> {{#if compare.title}}
|
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</button>
|
||||
{{#unless _last}}, {{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<del>{{compare.name}}</del>
|
||||
{{#if compare.title}}
|
||||
</button> {{#unless _last}}, {{/unless}} {{/if}} {{/if}} {{#if typeDel}}
|
||||
<del>{{compare.name}}</del> {{#if compare.title}}
|
||||
<button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
|
||||
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
|
||||
</button>
|
||||
{{#unless _last}}, {{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each_compare_list_field}}
|
||||
</button> {{#unless _last}}, {{/unless}} {{/if}} {{/if}} {{/if}} {{/each_compare_list_field}}
|
||||
</p>
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<script id="template-article-compare-param-block" type="text/x-handlebars-template">
|
||||
{{#if source}}
|
||||
{{#each_compare_keys source.fields compare.fields}}
|
||||
{{#if typeSame}}
|
||||
<script id="template-article-compare-param-block" type="text/x-handlebars-template">
|
||||
{{#if source}} {{#each_compare_keys source.fields compare.fields}} {{#if typeSame}}
|
||||
<h2>{{__ source.key}}</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
|
||||
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
|
||||
{{#if ../_hasType}}
|
||||
<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
|
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{subTemplate "article-compare-param-block-body" source=source.value compare=compare.value _hasType=../_hasType}}
|
||||
</table>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
{{/if}} {{#if typeIns}}
|
||||
<h2><ins>{{__ source.key}}</ins></h2>
|
||||
<table class="ins">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
|
||||
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
|
||||
{{#if ../_hasType}}
|
||||
<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
|
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{subTemplate "article-compare-param-block-body" source=source.value compare=source.value _hasType=../_hasType}}
|
||||
</table>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
{{/if}} {{#if typeDel}}
|
||||
<h2><del>{{__ compare.key}}</del></h2>
|
||||
<table class="del">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
|
||||
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
|
||||
{{#if ../_hasType}}
|
||||
<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
|
||||
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{subTemplate "article-compare-param-block-body" source=compare.value compare=compare.value _hasType=../_hasType}}
|
||||
</table>
|
||||
{{/if}}
|
||||
{{/each_compare_keys}}
|
||||
|
||||
{{#if source.examples}}
|
||||
{{/if}} {{/each_compare_keys}} {{#if source.examples}}
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
{{#each_compare_title source.examples compare.examples}}
|
||||
{{#if typeSame}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
{{#each_compare_title source.examples compare.examples}} {{#if typeSame}}
|
||||
<li{{#if_eq index compare=0}} class="active" {{/if_eq}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
{{/if}} {{#if typeIns}}
|
||||
<li{{#if_eq index compare=0}} class="active" {{/if_eq}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
|
||||
{{/if}} {{#if typeDel}}
|
||||
<li{{#if_eq index compare=0}} class="active" {{/if_eq}}>
|
||||
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each_compare_title}}
|
||||
{{/if}} {{/each_compare_title}}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
{{#each_compare_title source.examples compare.examples}}
|
||||
|
||||
{{#if typeSame}}
|
||||
{{#each_compare_title source.examples compare.examples}} {{#if typeSame}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{source.type}}"><code>{{{showDiff source.content compare.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
{{/if}} {{#if typeIns}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{source.type}}"><code>{{{source.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
{{/if}} {{#if typeDel}}
|
||||
<div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
|
||||
<pre class="prettyprint language-{{source.type}}" data-type="{{compare.type}}"><code>{{{compare.content}}}</code></pre>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each_compare_title}}
|
||||
{{/if}} {{/each_compare_title}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</script>
|
||||
{{/if}} {{/if}}
|
||||
</script>
|
||||
|
||||
<script id="template-article-compare-param-block-body" type="text/x-handlebars-template">
|
||||
<script id="template-article-compare-param-block-body" type="text/x-handlebars-template">
|
||||
<tbody>
|
||||
{{#each_compare_field source compare}}
|
||||
{{#if typeSame}}
|
||||
{{#each_compare_field source compare}} {{#if typeSame}}
|
||||
<tr>
|
||||
<td class="code">
|
||||
{{{splitFill source.field "." " "}}}
|
||||
{{#if source.optional}}
|
||||
{{#if compare.optional}} <span class="label label-optional">{{__ "optional"}}</span>
|
||||
{{else}} <span class="label label-optional label-ins">{{__ "optional"}}</span>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
|
||||
{{/if}}
|
||||
{{{splitFill source.field "." " "}}} {{#if source.optional}} {{#if compare.optional}} <span class="label label-optional">{{__ "optional"}}</span> {{else}} <span class="label label-optional label-ins">{{__ "optional"}}</span> {{/if}}
|
||||
{{else}} {{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}} {{/if}}
|
||||
</td>
|
||||
|
||||
{{#if source.type}}
|
||||
{{#if compare.type}}
|
||||
{{#if source.type}} {{#if compare.type}}
|
||||
<td>{{{showDiff source.type compare.type}}}</td>
|
||||
{{else}}
|
||||
<td>{{{source.type}}}</td>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if compare.type}}
|
||||
{{/if}} {{else}} {{#if compare.type}}
|
||||
<td>{{{compare.type}}}</td>
|
||||
{{else}}
|
||||
{{#if ../../../../_hasType}}<td></td>{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}} {{#if ../../../../_hasType}}
|
||||
<td></td>{{/if}} {{/if}} {{/if}}
|
||||
<td>
|
||||
{{{showDiff source.description compare.description "nl2br"}}}
|
||||
{{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{showDiff source.defaultValue compare.defaultValue}}}</code><p>{{/if}}
|
||||
{{{showDiff source.description compare.description "nl2br"}}} {{#if source.defaultValue}}
|
||||
<p class="default-value">{{__ "Default value:"}} <code>{{{showDiff source.defaultValue compare.defaultValue}}}</code>
|
||||
<p>{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeIns}}
|
||||
{{/if}} {{#if typeIns}}
|
||||
<tr class="ins">
|
||||
<td class="code">
|
||||
{{{splitFill source.field "." " "}}}
|
||||
{{#if source.optional}} <span class="label label-optional label-ins">{{__ "optional"}}</span>{{/if}}
|
||||
{{{splitFill source.field "." " "}}} {{#if source.optional}} <span class="label label-optional label-ins">{{__ "optional"}}</span>{{/if}}
|
||||
</td>
|
||||
|
||||
{{#if source.type}}
|
||||
<td>{{{source.type}}}</td>
|
||||
{{else}}
|
||||
{{{typRowTd}}}
|
||||
{{/if}}
|
||||
{{else}} {{{typRowTd}}} {{/if}}
|
||||
|
||||
<td>
|
||||
{{{nl2br source.description}}}
|
||||
{{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{source.defaultValue}}}</code><p>{{/if}}
|
||||
{{{nl2br source.description}}} {{#if source.defaultValue}}
|
||||
<p class="default-value">{{__ "Default value:"}} <code>{{{source.defaultValue}}}</code>
|
||||
<p>{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDel}}
|
||||
{{/if}} {{#if typeDel}}
|
||||
<tr class="del">
|
||||
<td class="code">
|
||||
{{{splitFill compare.field "." " "}}}
|
||||
{{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
|
||||
{{{splitFill compare.field "." " "}}} {{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
|
||||
</td>
|
||||
|
||||
{{#if compare.type}}
|
||||
<td>{{{compare.type}}}</td>
|
||||
{{else}}
|
||||
{{{typRowTd}}}
|
||||
{{/if}}
|
||||
{{else}} {{{typRowTd}}} {{/if}}
|
||||
|
||||
<td>
|
||||
{{{nl2br compare.description}}}
|
||||
{{#if compare.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{compare.defaultValue}}}</code><p>{{/if}}
|
||||
{{{nl2br compare.description}}} {{#if compare.defaultValue}}
|
||||
<p class="default-value">{{__ "Default value:"}} <code>{{{compare.defaultValue}}}</code>
|
||||
<p>{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
|
||||
{{/each_compare_field}}
|
||||
{{/if}} {{/each_compare_field}}
|
||||
</tbody>
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div id="sidenav" class="span2"></div>
|
||||
<div id="content">
|
||||
|
@ -647,23 +506,33 @@
|
|||
<div id="generator"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="loader">
|
||||
<div id="loader">
|
||||
<div class="spinner">
|
||||
<div class="spinner-container container1">
|
||||
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
|
||||
<div class="circle1"></div>
|
||||
<div class="circle2"></div>
|
||||
<div class="circle3"></div>
|
||||
<div class="circle4"></div>
|
||||
</div>
|
||||
<div class="spinner-container container2">
|
||||
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
|
||||
<div class="circle1"></div>
|
||||
<div class="circle2"></div>
|
||||
<div class="circle3"></div>
|
||||
<div class="circle4"></div>
|
||||
</div>
|
||||
<div class="spinner-container container3">
|
||||
<div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
|
||||
<div class="circle1"></div>
|
||||
<div class="circle2"></div>
|
||||
<div class="circle3"></div>
|
||||
<div class="circle4"></div>
|
||||
</div>
|
||||
<p>Loading...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script data-main="main.js" src="vendor/require.min.js"></script>
|
||||
</body>
|
||||
|
||||
<script data-main="main.js" src="vendor/require.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
ca: {
|
||||
'Allowed values:' : 'Valors permesos:',
|
||||
'Allowed values:': 'Valors permesos:',
|
||||
'Compare all with predecessor': 'Comparar tot amb versió anterior',
|
||||
'compare changes to:' : 'comparar canvis amb:',
|
||||
'compared to' : 'comparat amb',
|
||||
'Default value:' : 'Valor per defecte:',
|
||||
'Description' : 'Descripció',
|
||||
'Field' : 'Camp',
|
||||
'General' : 'General',
|
||||
'Generated with' : 'Generat amb',
|
||||
'Name' : 'Nom',
|
||||
'No response values.' : 'Sense valors en la resposta.',
|
||||
'optional' : 'opcional',
|
||||
'Parameter' : 'Paràmetre',
|
||||
'Permission:' : 'Permisos:',
|
||||
'Response' : 'Resposta',
|
||||
'Send' : 'Enviar',
|
||||
'Send a Sample Request' : 'Enviar una petició d\'exemple',
|
||||
'show up to version:' : 'mostrar versió:',
|
||||
'Size range:' : 'Tamany de rang:',
|
||||
'Type' : 'Tipus',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'comparar canvis amb:',
|
||||
'compared to': 'comparat amb',
|
||||
'Default value:': 'Valor per defecte:',
|
||||
'Description': 'Descripció',
|
||||
'Field': 'Camp',
|
||||
'General': 'General',
|
||||
'Generated with': 'Generat amb',
|
||||
'Name': 'Nom',
|
||||
'No response values.': 'Sense valors en la resposta.',
|
||||
'optional': 'opcional',
|
||||
'Parameter': 'Paràmetre',
|
||||
'Permission:': 'Permisos:',
|
||||
'Response': 'Resposta',
|
||||
'Send': 'Enviar',
|
||||
'Send a Sample Request': 'Enviar una petició d\'exemple',
|
||||
'show up to version:': 'mostrar versió:',
|
||||
'Size range:': 'Tamany de rang:',
|
||||
'Type': 'Tipus',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
de: {
|
||||
'Allowed values:' : 'Erlaubte Werte:',
|
||||
'Allowed values:': 'Erlaubte Werte:',
|
||||
'Compare all with predecessor': 'Vergleiche alle mit ihren Vorgängern',
|
||||
'compare changes to:' : 'vergleiche Änderungen mit:',
|
||||
'compared to' : 'verglichen mit',
|
||||
'Default value:' : 'Standardwert:',
|
||||
'Description' : 'Beschreibung',
|
||||
'Field' : 'Feld',
|
||||
'General' : 'Allgemein',
|
||||
'Generated with' : 'Erstellt mit',
|
||||
'Name' : 'Name',
|
||||
'No response values.' : 'Keine Rückgabewerte.',
|
||||
'optional' : 'optional',
|
||||
'Parameter' : 'Parameter',
|
||||
'Permission:' : 'Berechtigung:',
|
||||
'Response' : 'Antwort',
|
||||
'Send' : 'Senden',
|
||||
'Send a Sample Request' : 'Eine Beispielanfrage senden',
|
||||
'show up to version:' : 'zeige bis zur Version:',
|
||||
'Size range:' : 'Größenbereich:',
|
||||
'Type' : 'Typ',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'vergleiche Änderungen mit:',
|
||||
'compared to': 'verglichen mit',
|
||||
'Default value:': 'Standardwert:',
|
||||
'Description': 'Beschreibung',
|
||||
'Field': 'Feld',
|
||||
'General': 'Allgemein',
|
||||
'Generated with': 'Erstellt mit',
|
||||
'Name': 'Name',
|
||||
'No response values.': 'Keine Rückgabewerte.',
|
||||
'optional': 'optional',
|
||||
'Parameter': 'Parameter',
|
||||
'Permission:': 'Berechtigung:',
|
||||
'Response': 'Antwort',
|
||||
'Send': 'Senden',
|
||||
'Send a Sample Request': 'Eine Beispielanfrage senden',
|
||||
'show up to version:': 'zeige bis zur Version:',
|
||||
'Size range:': 'Größenbereich:',
|
||||
'Type': 'Typ',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
es: {
|
||||
'Allowed values:' : 'Valores permitidos:',
|
||||
'Allowed values:': 'Valores permitidos:',
|
||||
'Compare all with predecessor': 'Comparar todo con versión anterior',
|
||||
'compare changes to:' : 'comparar cambios con:',
|
||||
'compared to' : 'comparado con',
|
||||
'Default value:' : 'Valor por defecto:',
|
||||
'Description' : 'Descripción',
|
||||
'Field' : 'Campo',
|
||||
'General' : 'General',
|
||||
'Generated with' : 'Generado con',
|
||||
'Name' : 'Nombre',
|
||||
'No response values.' : 'Sin valores en la respuesta.',
|
||||
'optional' : 'opcional',
|
||||
'Parameter' : 'Parámetro',
|
||||
'Permission:' : 'Permisos:',
|
||||
'Response' : 'Respuesta',
|
||||
'Send' : 'Enviar',
|
||||
'Send a Sample Request' : 'Enviar una petición de ejemplo',
|
||||
'show up to version:' : 'mostrar a versión:',
|
||||
'Size range:' : 'Tamaño de rango:',
|
||||
'Type' : 'Tipo',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'comparar cambios con:',
|
||||
'compared to': 'comparado con',
|
||||
'Default value:': 'Valor por defecto:',
|
||||
'Description': 'Descripción',
|
||||
'Field': 'Campo',
|
||||
'General': 'General',
|
||||
'Generated with': 'Generado con',
|
||||
'Name': 'Nombre',
|
||||
'No response values.': 'Sin valores en la respuesta.',
|
||||
'optional': 'opcional',
|
||||
'Parameter': 'Parámetro',
|
||||
'Permission:': 'Permisos:',
|
||||
'Response': 'Respuesta',
|
||||
'Send': 'Enviar',
|
||||
'Send a Sample Request': 'Enviar una petición de ejemplo',
|
||||
'show up to version:': 'mostrar a versión:',
|
||||
'Size range:': 'Tamaño de rango:',
|
||||
'Type': 'Tipo',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
fr: {
|
||||
'Allowed values:' : 'Valeurs autorisées :',
|
||||
'Allowed values:': 'Valeurs autorisées :',
|
||||
'Compare all with predecessor': 'Tout comparer avec ...',
|
||||
'compare changes to:' : 'comparer les changements à :',
|
||||
'compared to' : 'comparer à',
|
||||
'Default value:' : 'Valeur par défaut :',
|
||||
'Description' : 'Description',
|
||||
'Field' : 'Champ',
|
||||
'General' : 'Général',
|
||||
'Generated with' : 'Généré avec',
|
||||
'Name' : 'Nom',
|
||||
'No response values.' : 'Aucune valeur de réponse.',
|
||||
'optional' : 'optionnel',
|
||||
'Parameter' : 'Paramètre',
|
||||
'Permission:' : 'Permission :',
|
||||
'Response' : 'Réponse',
|
||||
'Send' : 'Envoyer',
|
||||
'Send a Sample Request' : 'Envoyer une requête représentative',
|
||||
'show up to version:' : 'Montrer à partir de la version :',
|
||||
'Size range:' : 'Ordre de grandeur :',
|
||||
'Type' : 'Type',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'comparer les changements à :',
|
||||
'compared to': 'comparer à',
|
||||
'Default value:': 'Valeur par défaut :',
|
||||
'Description': 'Description',
|
||||
'Field': 'Champ',
|
||||
'General': 'Général',
|
||||
'Generated with': 'Généré avec',
|
||||
'Name': 'Nom',
|
||||
'No response values.': 'Aucune valeur de réponse.',
|
||||
'optional': 'optionnel',
|
||||
'Parameter': 'Paramètre',
|
||||
'Permission:': 'Permission :',
|
||||
'Response': 'Réponse',
|
||||
'Send': 'Envoyer',
|
||||
'Send a Sample Request': 'Envoyer une requête représentative',
|
||||
'show up to version:': 'Montrer à partir de la version :',
|
||||
'Size range:': 'Ordre de grandeur :',
|
||||
'Type': 'Type',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
it: {
|
||||
'Allowed values:' : 'Valori permessi:',
|
||||
'Allowed values:': 'Valori permessi:',
|
||||
'Compare all with predecessor': 'Confronta tutto con versioni precedenti',
|
||||
'compare changes to:' : 'confronta modifiche con:',
|
||||
'compared to' : 'confrontato con',
|
||||
'Default value:' : 'Valore predefinito:',
|
||||
'Description' : 'Descrizione',
|
||||
'Field' : 'Campo',
|
||||
'General' : 'Generale',
|
||||
'Generated with' : 'Creato con',
|
||||
'Name' : 'Nome',
|
||||
'No response values.' : 'Nessun valore di risposta.',
|
||||
'optional' : 'opzionale',
|
||||
'Parameter' : 'Parametro',
|
||||
'Permission:' : 'Permessi:',
|
||||
'Response' : 'Risposta',
|
||||
'Send' : 'Invia',
|
||||
'Send a Sample Request' : 'Invia una richiesta di esempio',
|
||||
'show up to version:' : 'mostra alla versione:',
|
||||
'Size range:' : 'Intervallo dimensione:',
|
||||
'Type' : 'Tipo',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'confronta modifiche con:',
|
||||
'compared to': 'confrontato con',
|
||||
'Default value:': 'Valore predefinito:',
|
||||
'Description': 'Descrizione',
|
||||
'Field': 'Campo',
|
||||
'General': 'Generale',
|
||||
'Generated with': 'Creato con',
|
||||
'Name': 'Nome',
|
||||
'No response values.': 'Nessun valore di risposta.',
|
||||
'optional': 'opzionale',
|
||||
'Parameter': 'Parametro',
|
||||
'Permission:': 'Permessi:',
|
||||
'Response': 'Risposta',
|
||||
'Send': 'Invia',
|
||||
'Send a Sample Request': 'Invia una richiesta di esempio',
|
||||
'show up to version:': 'mostra alla versione:',
|
||||
'Size range:': 'Intervallo dimensione:',
|
||||
'Type': 'Tipo',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -13,7 +13,7 @@ define([
|
|||
'./locales/vi.js',
|
||||
'./locales/zh.js',
|
||||
'./locales/zh_cn.js'
|
||||
], function() {
|
||||
], function () {
|
||||
var langId = (navigator.language || navigator.userLanguage).toLowerCase().replace('-', '_');
|
||||
var language = langId.substr(0, 2);
|
||||
var locales = {};
|
||||
|
@ -22,10 +22,10 @@ define([
|
|||
for (property in arguments[index])
|
||||
locales[property] = arguments[index][property];
|
||||
}
|
||||
if ( ! locales['en'])
|
||||
if (!locales['en'])
|
||||
locales['en'] = {};
|
||||
|
||||
if ( ! locales[langId] && ! locales[language])
|
||||
if (!locales[langId] && !locales[language])
|
||||
language = 'en';
|
||||
|
||||
var locale = (locales[langId] ? locales[langId] : locales[language]);
|
||||
|
@ -42,9 +42,9 @@ define([
|
|||
}
|
||||
|
||||
return {
|
||||
__ : __,
|
||||
locales : locales,
|
||||
locale : locale,
|
||||
__: __,
|
||||
locales: locales,
|
||||
locale: locale,
|
||||
setLanguage: setLanguage
|
||||
};
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
nl: {
|
||||
'Allowed values:' : 'Toegestane waarden:',
|
||||
'Allowed values:': 'Toegestane waarden:',
|
||||
'Compare all with predecessor': 'Vergelijk alle met voorgaande versie',
|
||||
'compare changes to:' : 'vergelijk veranderingen met:',
|
||||
'compared to' : 'vergelijk met',
|
||||
'Default value:' : 'Standaard waarde:',
|
||||
'Description' : 'Omschrijving',
|
||||
'Field' : 'Veld',
|
||||
'General' : 'Algemeen',
|
||||
'Generated with' : 'Gegenereerd met',
|
||||
'Name' : 'Naam',
|
||||
'No response values.' : 'Geen response waardes.',
|
||||
'optional' : 'optioneel',
|
||||
'Parameter' : 'Parameter',
|
||||
'Permission:' : 'Permissie:',
|
||||
'Response' : 'Antwoorden',
|
||||
'Send' : 'Sturen',
|
||||
'Send a Sample Request' : 'Stuur een sample aanvragen',
|
||||
'show up to version:' : 'toon tot en met versie:',
|
||||
'Size range:' : 'Maatbereik:',
|
||||
'Type' : 'Type',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'vergelijk veranderingen met:',
|
||||
'compared to': 'vergelijk met',
|
||||
'Default value:': 'Standaard waarde:',
|
||||
'Description': 'Omschrijving',
|
||||
'Field': 'Veld',
|
||||
'General': 'Algemeen',
|
||||
'Generated with': 'Gegenereerd met',
|
||||
'Name': 'Naam',
|
||||
'No response values.': 'Geen response waardes.',
|
||||
'optional': 'optioneel',
|
||||
'Parameter': 'Parameter',
|
||||
'Permission:': 'Permissie:',
|
||||
'Response': 'Antwoorden',
|
||||
'Send': 'Sturen',
|
||||
'Send a Sample Request': 'Stuur een sample aanvragen',
|
||||
'show up to version:': 'toon tot en met versie:',
|
||||
'Size range:': 'Maatbereik:',
|
||||
'Type': 'Type',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
pl: {
|
||||
'Allowed values:' : 'Dozwolone wartości:',
|
||||
'Allowed values:': 'Dozwolone wartości:',
|
||||
'Compare all with predecessor': 'Porównaj z poprzednimi wersjami',
|
||||
'compare changes to:' : 'porównaj zmiany do:',
|
||||
'compared to' : 'porównaj do:',
|
||||
'Default value:' : 'Wartość domyślna:',
|
||||
'Description' : 'Opis',
|
||||
'Field' : 'Pole',
|
||||
'General' : 'Generalnie',
|
||||
'Generated with' : 'Wygenerowano z',
|
||||
'Name' : 'Nazwa',
|
||||
'No response values.' : 'Brak odpowiedzi.',
|
||||
'optional' : 'opcjonalny',
|
||||
'Parameter' : 'Parametr',
|
||||
'Permission:' : 'Uprawnienia:',
|
||||
'Response' : 'Odpowiedź',
|
||||
'Send' : 'Wyślij',
|
||||
'Send a Sample Request' : 'Wyślij przykładowe żądanie',
|
||||
'show up to version:' : 'pokaż do wersji:',
|
||||
'Size range:' : 'Zakres rozmiaru:',
|
||||
'Type' : 'Typ',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'porównaj zmiany do:',
|
||||
'compared to': 'porównaj do:',
|
||||
'Default value:': 'Wartość domyślna:',
|
||||
'Description': 'Opis',
|
||||
'Field': 'Pole',
|
||||
'General': 'Generalnie',
|
||||
'Generated with': 'Wygenerowano z',
|
||||
'Name': 'Nazwa',
|
||||
'No response values.': 'Brak odpowiedzi.',
|
||||
'optional': 'opcjonalny',
|
||||
'Parameter': 'Parametr',
|
||||
'Permission:': 'Uprawnienia:',
|
||||
'Response': 'Odpowiedź',
|
||||
'Send': 'Wyślij',
|
||||
'Send a Sample Request': 'Wyślij przykładowe żądanie',
|
||||
'show up to version:': 'pokaż do wersji:',
|
||||
'Size range:': 'Zakres rozmiaru:',
|
||||
'Type': 'Typ',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
'pt_br': {
|
||||
'Allowed values:' : 'Valores permitidos:',
|
||||
'Allowed values:': 'Valores permitidos:',
|
||||
'Compare all with predecessor': 'Compare todos com antecessores',
|
||||
'compare changes to:' : 'comparar alterações com:',
|
||||
'compared to' : 'comparado com',
|
||||
'Default value:' : 'Valor padrão:',
|
||||
'Description' : 'Descrição',
|
||||
'Field' : 'Campo',
|
||||
'General' : 'Geral',
|
||||
'Generated with' : 'Gerado com',
|
||||
'Name' : 'Nome',
|
||||
'No response values.' : 'Sem valores de resposta.',
|
||||
'optional' : 'opcional',
|
||||
'Parameter' : 'Parâmetro',
|
||||
'Permission:' : 'Permissão:',
|
||||
'Response' : 'Resposta',
|
||||
'Send' : 'Enviar',
|
||||
'Send a Sample Request' : 'Enviar um Exemplo de Pedido',
|
||||
'show up to version:' : 'aparecer para a versão:',
|
||||
'Size range:' : 'Faixa de tamanho:',
|
||||
'Type' : 'Tipo',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'comparar alterações com:',
|
||||
'compared to': 'comparado com',
|
||||
'Default value:': 'Valor padrão:',
|
||||
'Description': 'Descrição',
|
||||
'Field': 'Campo',
|
||||
'General': 'Geral',
|
||||
'Generated with': 'Gerado com',
|
||||
'Name': 'Nome',
|
||||
'No response values.': 'Sem valores de resposta.',
|
||||
'optional': 'opcional',
|
||||
'Parameter': 'Parâmetro',
|
||||
'Permission:': 'Permissão:',
|
||||
'Response': 'Resposta',
|
||||
'Send': 'Enviar',
|
||||
'Send a Sample Request': 'Enviar um Exemplo de Pedido',
|
||||
'show up to version:': 'aparecer para a versão:',
|
||||
'Size range:': 'Faixa de tamanho:',
|
||||
'Type': 'Tipo',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
ro: {
|
||||
'Allowed values:' : 'Valori permise:',
|
||||
'Allowed values:': 'Valori permise:',
|
||||
'Compare all with predecessor': 'Compară toate cu versiunea precedentă',
|
||||
'compare changes to:' : 'compară cu versiunea:',
|
||||
'compared to' : 'comparat cu',
|
||||
'Default value:' : 'Valoare implicită:',
|
||||
'Description' : 'Descriere',
|
||||
'Field' : 'Câmp',
|
||||
'General' : 'General',
|
||||
'Generated with' : 'Generat cu',
|
||||
'Name' : 'Nume',
|
||||
'No response values.' : 'Nici o valoare returnată.',
|
||||
'optional' : 'opțional',
|
||||
'Parameter' : 'Parametru',
|
||||
'Permission:' : 'Permisiune:',
|
||||
'Response' : 'Răspuns',
|
||||
'Send' : 'Trimite',
|
||||
'Send a Sample Request' : 'Trimite o cerere de probă',
|
||||
'show up to version:' : 'arată până la versiunea:',
|
||||
'Size range:' : 'Interval permis:',
|
||||
'Type' : 'Tip',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'compară cu versiunea:',
|
||||
'compared to': 'comparat cu',
|
||||
'Default value:': 'Valoare implicită:',
|
||||
'Description': 'Descriere',
|
||||
'Field': 'Câmp',
|
||||
'General': 'General',
|
||||
'Generated with': 'Generat cu',
|
||||
'Name': 'Nume',
|
||||
'No response values.': 'Nici o valoare returnată.',
|
||||
'optional': 'opțional',
|
||||
'Parameter': 'Parametru',
|
||||
'Permission:': 'Permisiune:',
|
||||
'Response': 'Răspuns',
|
||||
'Send': 'Trimite',
|
||||
'Send a Sample Request': 'Trimite o cerere de probă',
|
||||
'show up to version:': 'arată până la versiunea:',
|
||||
'Size range:': 'Interval permis:',
|
||||
'Type': 'Tip',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
ru: {
|
||||
'Allowed values:' : 'Допустимые значения:',
|
||||
'Allowed values:': 'Допустимые значения:',
|
||||
'Compare all with predecessor': 'Сравнить с предыдущей версией',
|
||||
'compare changes to:' : 'сравнить с:',
|
||||
'compared to' : 'в сравнении с',
|
||||
'Default value:' : 'По умолчанию:',
|
||||
'Description' : 'Описание',
|
||||
'Field' : 'Название',
|
||||
'General' : 'Общая информация',
|
||||
'Generated with' : 'Сгенерировано с помощью',
|
||||
'Name' : 'Название',
|
||||
'No response values.' : 'Нет значений для ответа.',
|
||||
'optional' : 'необязательный',
|
||||
'Parameter' : 'Параметр',
|
||||
'Permission:' : 'Разрешено:',
|
||||
'Response' : 'Ответ',
|
||||
'Send' : 'Отправить',
|
||||
'Send a Sample Request' : 'Отправить тестовый запрос',
|
||||
'show up to version:' : 'показать версию:',
|
||||
'Size range:' : 'Ограничения:',
|
||||
'Type' : 'Тип',
|
||||
'url' : 'URL'
|
||||
'compare changes to:': 'сравнить с:',
|
||||
'compared to': 'в сравнении с',
|
||||
'Default value:': 'По умолчанию:',
|
||||
'Description': 'Описание',
|
||||
'Field': 'Название',
|
||||
'General': 'Общая информация',
|
||||
'Generated with': 'Сгенерировано с помощью',
|
||||
'Name': 'Название',
|
||||
'No response values.': 'Нет значений для ответа.',
|
||||
'optional': 'необязательный',
|
||||
'Parameter': 'Параметр',
|
||||
'Permission:': 'Разрешено:',
|
||||
'Response': 'Ответ',
|
||||
'Send': 'Отправить',
|
||||
'Send a Sample Request': 'Отправить тестовый запрос',
|
||||
'show up to version:': 'показать версию:',
|
||||
'Size range:': 'Ограничения:',
|
||||
'Type': 'Тип',
|
||||
'url': 'URL'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
tr: {
|
||||
'Allowed values:' : 'İzin verilen değerler:',
|
||||
'Allowed values:': 'İzin verilen değerler:',
|
||||
'Compare all with predecessor': 'Tümünü öncekiler ile karşılaştır',
|
||||
'compare changes to:' : 'değişiklikleri karşılaştır:',
|
||||
'compared to' : 'karşılaştır',
|
||||
'Default value:' : 'Varsayılan değer:',
|
||||
'Description' : 'Açıklama',
|
||||
'Field' : 'Alan',
|
||||
'General' : 'Genel',
|
||||
'Generated with' : 'Oluşturan',
|
||||
'Name' : 'İsim',
|
||||
'No response values.' : 'Dönüş verisi yok.',
|
||||
'optional' : 'opsiyonel',
|
||||
'Parameter' : 'Parametre',
|
||||
'Permission:' : 'İzin:',
|
||||
'Response' : 'Dönüş',
|
||||
'Send' : 'Gönder',
|
||||
'Send a Sample Request' : 'Örnek istek gönder',
|
||||
'show up to version:' : 'bu versiyona kadar göster:',
|
||||
'Size range:' : 'Boyut aralığı:',
|
||||
'Type' : 'Tip',
|
||||
'url' : 'url'
|
||||
'compare changes to:': 'değişiklikleri karşılaştır:',
|
||||
'compared to': 'karşılaştır',
|
||||
'Default value:': 'Varsayılan değer:',
|
||||
'Description': 'Açıklama',
|
||||
'Field': 'Alan',
|
||||
'General': 'Genel',
|
||||
'Generated with': 'Oluşturan',
|
||||
'Name': 'İsim',
|
||||
'No response values.': 'Dönüş verisi yok.',
|
||||
'optional': 'opsiyonel',
|
||||
'Parameter': 'Parametre',
|
||||
'Permission:': 'İzin:',
|
||||
'Response': 'Dönüş',
|
||||
'Send': 'Gönder',
|
||||
'Send a Sample Request': 'Örnek istek gönder',
|
||||
'show up to version:': 'bu versiyona kadar göster:',
|
||||
'Size range:': 'Boyut aralığı:',
|
||||
'Type': 'Tip',
|
||||
'url': 'url'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
vi: {
|
||||
'Allowed values:' : 'Giá trị chấp nhận:',
|
||||
'Allowed values:': 'Giá trị chấp nhận:',
|
||||
'Compare all with predecessor': 'So sánh với tất cả phiên bản trước',
|
||||
'compare changes to:' : 'so sánh sự thay đổi với:',
|
||||
'compared to' : 'so sánh với',
|
||||
'Default value:' : 'Giá trị mặc định:',
|
||||
'Description' : 'Chú thích',
|
||||
'Field' : 'Trường dữ liệu',
|
||||
'General' : 'Tổng quan',
|
||||
'Generated with' : 'Được tạo bởi',
|
||||
'Name' : 'Tên',
|
||||
'No response values.' : 'Không có kết quả trả về.',
|
||||
'optional' : 'Tùy chọn',
|
||||
'Parameter' : 'Tham số',
|
||||
'Permission:' : 'Quyền hạn:',
|
||||
'Response' : 'Kết quả',
|
||||
'Send' : 'Gửi',
|
||||
'Send a Sample Request' : 'Gửi một yêu cầu mẫu',
|
||||
'show up to version:' : 'hiển thị phiên bản:',
|
||||
'Size range:' : 'Kích cỡ:',
|
||||
'Type' : 'Kiểu',
|
||||
'url' : 'liên kết'
|
||||
'compare changes to:': 'so sánh sự thay đổi với:',
|
||||
'compared to': 'so sánh với',
|
||||
'Default value:': 'Giá trị mặc định:',
|
||||
'Description': 'Chú thích',
|
||||
'Field': 'Trường dữ liệu',
|
||||
'General': 'Tổng quan',
|
||||
'Generated with': 'Được tạo bởi',
|
||||
'Name': 'Tên',
|
||||
'No response values.': 'Không có kết quả trả về.',
|
||||
'optional': 'Tùy chọn',
|
||||
'Parameter': 'Tham số',
|
||||
'Permission:': 'Quyền hạn:',
|
||||
'Response': 'Kết quả',
|
||||
'Send': 'Gửi',
|
||||
'Send a Sample Request': 'Gửi một yêu cầu mẫu',
|
||||
'show up to version:': 'hiển thị phiên bản:',
|
||||
'Size range:': 'Kích cỡ:',
|
||||
'Type': 'Kiểu',
|
||||
'url': 'liên kết'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
zh: {
|
||||
'Allowed values:' : '允許值:',
|
||||
'Allowed values:': '允許值:',
|
||||
'Compare all with predecessor': '預先比較所有',
|
||||
'compare changes to:' : '比較變更:',
|
||||
'compared to' : '對比',
|
||||
'Default value:' : '默認值:',
|
||||
'Description' : '描述',
|
||||
'Field' : '字段',
|
||||
'General' : '概括',
|
||||
'Generated with' : '生成工具',
|
||||
'Name' : '名稱',
|
||||
'No response values.' : '無對應資料.',
|
||||
'optional' : '選項',
|
||||
'Parameter' : '參數',
|
||||
'Permission:' : '允許:',
|
||||
'Response' : '回應',
|
||||
'Send' : '發送',
|
||||
'Send a Sample Request' : '發送試用需求',
|
||||
'show up to version:' : '顯示到版本:',
|
||||
'Size range:' : '尺寸範圍:',
|
||||
'Type' : '類型',
|
||||
'url' : '網址'
|
||||
'compare changes to:': '比較變更:',
|
||||
'compared to': '對比',
|
||||
'Default value:': '默認值:',
|
||||
'Description': '描述',
|
||||
'Field': '字段',
|
||||
'General': '概括',
|
||||
'Generated with': '生成工具',
|
||||
'Name': '名稱',
|
||||
'No response values.': '無對應資料.',
|
||||
'optional': '選項',
|
||||
'Parameter': '參數',
|
||||
'Permission:': '允許:',
|
||||
'Response': '回應',
|
||||
'Send': '發送',
|
||||
'Send a Sample Request': '發送試用需求',
|
||||
'show up to version:': '顯示到版本:',
|
||||
'Size range:': '尺寸範圍:',
|
||||
'Type': '類型',
|
||||
'url': '網址'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
define({
|
||||
'zh_cn': {
|
||||
'Allowed values:' : '允许值:',
|
||||
'Allowed values:': '允许值:',
|
||||
'Compare all with predecessor': '与所有较早的比较',
|
||||
'compare changes to:' : '将当前版本与指定版本比较:',
|
||||
'compared to' : '相比于',
|
||||
'Default value:' : '默认值:',
|
||||
'Description' : '描述',
|
||||
'Field' : '字段',
|
||||
'General' : '概要',
|
||||
'Generated with' : '基于',
|
||||
'Name' : '名称',
|
||||
'No response values.' : '无返回值.',
|
||||
'optional' : '可选',
|
||||
'Parameter' : '参数',
|
||||
'Permission:' : '权限:',
|
||||
'Response' : '返回',
|
||||
'Send' : '发送',
|
||||
'Send a Sample Request' : '发送示例请求',
|
||||
'show up to version:' : '显示到指定版本:',
|
||||
'Size range:' : '取值范围:',
|
||||
'Type' : '类型',
|
||||
'url' : '网址'
|
||||
'compare changes to:': '将当前版本与指定版本比较:',
|
||||
'compared to': '相比于',
|
||||
'Default value:': '默认值:',
|
||||
'Description': '描述',
|
||||
'Field': '字段',
|
||||
'General': '概要',
|
||||
'Generated with': '基于',
|
||||
'Name': '名称',
|
||||
'No response values.': '无返回值.',
|
||||
'optional': '可选',
|
||||
'Parameter': '参数',
|
||||
'Permission:': '权限:',
|
||||
'Response': '返回',
|
||||
'Send': '发送',
|
||||
'Send a Sample Request': '发送示例请求',
|
||||
'show up to version:': '显示到指定版本:',
|
||||
'Size range:': '取值范围:',
|
||||
'Type': '类型',
|
||||
'url': '网址'
|
||||
}
|
||||
});
|
||||
|
|
167
apidoc/main.js
167
apidoc/main.js
|
@ -50,7 +50,7 @@ require([
|
|||
'bootstrap',
|
||||
'pathToRegexp',
|
||||
'list'
|
||||
], function($, _, locale, Handlebars, apiProject, apiData, prettyPrint, sampleRequest, semver, WebFont) {
|
||||
], function ($, _, locale, Handlebars, apiProject, apiData, prettyPrint, sampleRequest, semver, WebFont) {
|
||||
|
||||
// load google web fonts
|
||||
loadGoogleFontCss();
|
||||
|
@ -60,19 +60,19 @@ require([
|
|||
//
|
||||
// Templates
|
||||
//
|
||||
var templateHeader = Handlebars.compile( $('#template-header').html() );
|
||||
var templateFooter = Handlebars.compile( $('#template-footer').html() );
|
||||
var templateArticle = Handlebars.compile( $('#template-article').html() );
|
||||
var templateCompareArticle = Handlebars.compile( $('#template-compare-article').html() );
|
||||
var templateGenerator = Handlebars.compile( $('#template-generator').html() );
|
||||
var templateProject = Handlebars.compile( $('#template-project').html() );
|
||||
var templateSections = Handlebars.compile( $('#template-sections').html() );
|
||||
var templateSidenav = Handlebars.compile( $('#template-sidenav').html() );
|
||||
var templateHeader = Handlebars.compile($('#template-header').html());
|
||||
var templateFooter = Handlebars.compile($('#template-footer').html());
|
||||
var templateArticle = Handlebars.compile($('#template-article').html());
|
||||
var templateCompareArticle = Handlebars.compile($('#template-compare-article').html());
|
||||
var templateGenerator = Handlebars.compile($('#template-generator').html());
|
||||
var templateProject = Handlebars.compile($('#template-project').html());
|
||||
var templateSections = Handlebars.compile($('#template-sections').html());
|
||||
var templateSidenav = Handlebars.compile($('#template-sidenav').html());
|
||||
|
||||
//
|
||||
// apiProject defaults
|
||||
//
|
||||
if ( ! apiProject.template)
|
||||
if (!apiProject.template)
|
||||
apiProject.template = {};
|
||||
|
||||
if (apiProject.template.withCompare == null)
|
||||
|
@ -91,14 +91,14 @@ require([
|
|||
// Data transform
|
||||
//
|
||||
// grouped by group
|
||||
var apiByGroup = _.groupBy(api, function(entry) {
|
||||
var apiByGroup = _.groupBy(api, function (entry) {
|
||||
return entry.group;
|
||||
});
|
||||
|
||||
// grouped by group and name
|
||||
var apiByGroupAndName = {};
|
||||
$.each(apiByGroup, function(index, entries) {
|
||||
apiByGroupAndName[index] = _.groupBy(entries, function(entry) {
|
||||
$.each(apiByGroup, function (index, entries) {
|
||||
apiByGroupAndName[index] = _.groupBy(entries, function (entry) {
|
||||
return entry.name;
|
||||
});
|
||||
});
|
||||
|
@ -107,14 +107,21 @@ require([
|
|||
// sort api within a group by title ASC and custom order
|
||||
//
|
||||
var newList = [];
|
||||
var umlauts = { 'ä': 'ae', 'ü': 'ue', 'ö': 'oe', 'ß': 'ss' }; // TODO: remove in version 1.0
|
||||
$.each (apiByGroupAndName, function(index, groupEntries) {
|
||||
var umlauts = {
|
||||
'ä': 'ae',
|
||||
'ü': 'ue',
|
||||
'ö': 'oe',
|
||||
'ß': 'ss'
|
||||
}; // TODO: remove in version 1.0
|
||||
$.each(apiByGroupAndName, function (index, groupEntries) {
|
||||
// get titles from the first entry of group[].name[] (name has versioning)
|
||||
var titles = [];
|
||||
$.each (groupEntries, function(titleName, entries) {
|
||||
$.each(groupEntries, function (titleName, entries) {
|
||||
var title = entries[0].title;
|
||||
if(title !== undefined) {
|
||||
title.toLowerCase().replace(/[äöüß]/g, function($0) { return umlauts[$0]; });
|
||||
if (title !== undefined) {
|
||||
title.toLowerCase().replace(/[äöüß]/g, function ($0) {
|
||||
return umlauts[$0];
|
||||
});
|
||||
titles.push(title + '#~#' + titleName); // '#~#' keep reference to titleName after sorting
|
||||
}
|
||||
});
|
||||
|
@ -126,10 +133,10 @@ require([
|
|||
titles = sortByOrder(titles, apiProject.order, '#~#');
|
||||
|
||||
// add single elements to the new list
|
||||
titles.forEach(function(name) {
|
||||
titles.forEach(function (name) {
|
||||
var values = name.split('#~#');
|
||||
var key = values[1];
|
||||
groupEntries[key].forEach(function(entry) {
|
||||
groupEntries[key].forEach(function (entry) {
|
||||
newList.push(entry);
|
||||
});
|
||||
});
|
||||
|
@ -145,7 +152,7 @@ require([
|
|||
var apiVersions = {};
|
||||
apiVersions[apiProject.version] = 1;
|
||||
|
||||
$.each(api, function(index, entry) {
|
||||
$.each(api, function (index, entry) {
|
||||
apiGroups[entry.group] = 1;
|
||||
apiGroupTitles[entry.group] = entry.groupTitle || entry.group;
|
||||
apiVersions[entry.version] = 1;
|
||||
|
@ -168,7 +175,7 @@ require([
|
|||
// create Navigationlist
|
||||
//
|
||||
var nav = [];
|
||||
apiGroups.forEach(function(group) {
|
||||
apiGroups.forEach(function (group) {
|
||||
// Mainmenu entry
|
||||
nav.push({
|
||||
group: group,
|
||||
|
@ -178,7 +185,7 @@ require([
|
|||
|
||||
// Submenu
|
||||
var oldName = '';
|
||||
api.forEach(function(entry) {
|
||||
api.forEach(function (entry) {
|
||||
if (entry.group === group) {
|
||||
if (oldName !== entry.name) {
|
||||
nav.push({
|
||||
|
@ -212,18 +219,18 @@ require([
|
|||
*/
|
||||
function add_nav(nav, content, index) {
|
||||
var found_level1 = false;
|
||||
if ( ! content) {
|
||||
if (!content) {
|
||||
return found_level1;
|
||||
}
|
||||
var topics = content.match(/<h(1|2).*?>(.+?)<\/h(1|2)>/gi);
|
||||
if ( topics ) {
|
||||
topics.forEach(function(entry) {
|
||||
var level = entry.substring(2,3);
|
||||
if (topics) {
|
||||
topics.forEach(function (entry) {
|
||||
var level = entry.substring(2, 3);
|
||||
var title = entry.replace(/<.+?>/g, ''); // Remove all HTML tags for the title
|
||||
var entry_tags = entry.match(/id="api-([^\-]+)(?:-(.+))?"/); // Find the group and name in the id property
|
||||
var group = (entry_tags ? entry_tags[1] : null);
|
||||
var name = (entry_tags ? entry_tags[2] : null);
|
||||
if (level==1 && title && group) {
|
||||
if (level == 1 && title && group) {
|
||||
nav.splice(index, 0, {
|
||||
group: group,
|
||||
isHeader: true,
|
||||
|
@ -233,7 +240,7 @@ require([
|
|||
index++;
|
||||
found_level1 = true;
|
||||
}
|
||||
if (level==2 && title && group && name) {
|
||||
if (level == 2 && title && group && name) {
|
||||
nav.splice(index, 0, {
|
||||
group: group,
|
||||
name: name,
|
||||
|
@ -287,28 +294,30 @@ require([
|
|||
var fields = {
|
||||
nav: nav
|
||||
};
|
||||
$('#sidenav').append( templateSidenav(fields) );
|
||||
$('#sidenav').append(templateSidenav(fields));
|
||||
|
||||
// render Generator
|
||||
$('#generator').append( templateGenerator(apiProject) );
|
||||
$('#generator').append(templateGenerator(apiProject));
|
||||
|
||||
// render Project
|
||||
_.extend(apiProject, { versions: apiVersions});
|
||||
$('#project').append( templateProject(apiProject) );
|
||||
_.extend(apiProject, {
|
||||
versions: apiVersions
|
||||
});
|
||||
$('#project').append(templateProject(apiProject));
|
||||
|
||||
// render apiDoc, header/footer documentation
|
||||
if (apiProject.header)
|
||||
$('#header').append( templateHeader(apiProject.header) );
|
||||
$('#header').append(templateHeader(apiProject.header));
|
||||
|
||||
if (apiProject.footer)
|
||||
$('#footer').append( templateFooter(apiProject.footer) );
|
||||
$('#footer').append(templateFooter(apiProject.footer));
|
||||
|
||||
//
|
||||
// Render Sections and Articles
|
||||
//
|
||||
var articleVersions = {};
|
||||
var content = '';
|
||||
apiGroups.forEach(function(groupEntry) {
|
||||
apiGroups.forEach(function (groupEntry) {
|
||||
var articles = [];
|
||||
var oldName = '';
|
||||
var fields = {};
|
||||
|
@ -317,13 +326,13 @@ require([
|
|||
articleVersions[groupEntry] = {};
|
||||
|
||||
// render all articles of a group
|
||||
api.forEach(function(entry) {
|
||||
if(groupEntry === entry.group) {
|
||||
api.forEach(function (entry) {
|
||||
if (groupEntry === entry.group) {
|
||||
if (oldName !== entry.name) {
|
||||
// determine versions
|
||||
api.forEach(function(versionEntry) {
|
||||
api.forEach(function (versionEntry) {
|
||||
if (groupEntry === versionEntry.group && entry.name === versionEntry.name) {
|
||||
if ( ! articleVersions[entry.group].hasOwnProperty(entry.name) ) {
|
||||
if (!articleVersions[entry.group].hasOwnProperty(entry.name)) {
|
||||
articleVersions[entry.group][entry.name] = [];
|
||||
}
|
||||
articleVersions[entry.group][entry.name].push(versionEntry.version);
|
||||
|
@ -372,25 +381,32 @@ require([
|
|||
};
|
||||
content += templateSections(fields);
|
||||
});
|
||||
$('#sections').append( content );
|
||||
$('#sections').append(content);
|
||||
|
||||
// Bootstrap Scrollspy
|
||||
$(this).scrollspy({ target: '#scrollingNav', offset: 18 });
|
||||
$(this).scrollspy({
|
||||
target: '#scrollingNav',
|
||||
offset: 18
|
||||
});
|
||||
|
||||
// Content-Scroll on Navigation click.
|
||||
$('.sidenav').find('a').on('click', function(e) {
|
||||
$('.sidenav').find('a').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var id = $(this).attr('href');
|
||||
if ($(id).length > 0)
|
||||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 400);
|
||||
$('html,body').animate({
|
||||
scrollTop: parseInt($(id).offset().top)
|
||||
}, 400);
|
||||
window.location.hash = $(this).attr('href');
|
||||
});
|
||||
|
||||
// Quickjump on Pageload to hash position.
|
||||
if(window.location.hash) {
|
||||
if (window.location.hash) {
|
||||
var id = window.location.hash;
|
||||
if ($(id).length > 0)
|
||||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) }, 0);
|
||||
$('html,body').animate({
|
||||
scrollTop: parseInt($(id).offset().top)
|
||||
}, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -402,8 +418,10 @@ require([
|
|||
*/
|
||||
function _hasTypeInFields(fields) {
|
||||
var result = false;
|
||||
$.each(fields, function(name) {
|
||||
result = result || _.some(fields[name], function(item) { return item.type; });
|
||||
$.each(fields, function (name) {
|
||||
result = result || _.some(fields[name], function (item) {
|
||||
return item.type;
|
||||
});
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
@ -413,14 +431,14 @@ require([
|
|||
*/
|
||||
function initDynamic() {
|
||||
// Bootstrap popover
|
||||
$('button[data-toggle="popover"]').popover().click(function(e) {
|
||||
$('button[data-toggle="popover"]').popover().click(function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
var version = $('#version strong').html();
|
||||
$('#sidenav li').removeClass('is-new');
|
||||
if (apiProject.template.withCompare) {
|
||||
$('#sidenav li[data-version=\'' + version + '\']').each(function(){
|
||||
$('#sidenav li[data-version=\'' + version + '\']').each(function () {
|
||||
var group = $(this).data('group');
|
||||
var name = $(this).data('name');
|
||||
var length = $('#sidenav li[data-group=\'' + group + '\'][data-name=\'' + name + '\']').length;
|
||||
|
@ -459,7 +477,7 @@ require([
|
|||
// HTML-Template specific jQuery-Functions
|
||||
//
|
||||
// Change Main Version
|
||||
$('#versions li.version a').on('click', function(e) {
|
||||
$('#versions li.version a').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var selectedVersion = $(this).html();
|
||||
|
@ -470,7 +488,7 @@ require([
|
|||
$('#sidenav li:not(.nav-fixed)').addClass('hide');
|
||||
|
||||
// show 1st equal or lower Version of each entry
|
||||
$('article[data-version]').each(function(index) {
|
||||
$('article[data-version]').each(function (index) {
|
||||
var group = $(this).data('group');
|
||||
var name = $(this).data('name');
|
||||
var version = $(this).data('version');
|
||||
|
@ -487,7 +505,7 @@ require([
|
|||
});
|
||||
|
||||
// show 1st equal or lower Version of each entry
|
||||
$('article[data-version]').each(function(index) {
|
||||
$('article[data-version]').each(function (index) {
|
||||
var group = $(this).data('group');
|
||||
$('section#api-' + group).removeClass('hide');
|
||||
if ($('section#api-' + group + ' article:visible').length === 0) {
|
||||
|
@ -508,7 +526,7 @@ require([
|
|||
$('article .versions li.version a').on('click', changeVersionCompareTo);
|
||||
|
||||
// compare url-parameter
|
||||
$.urlParam = function(name) {
|
||||
$.urlParam = function (name) {
|
||||
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
|
||||
return (results && results[1]) ? results[1] : null;
|
||||
};
|
||||
|
@ -519,7 +537,9 @@ require([
|
|||
|
||||
if (window.location.hash) {
|
||||
var id = window.location.hash;
|
||||
$('html,body').animate({ scrollTop: parseInt($(id).offset().top) - 18 }, 0);
|
||||
$('html,body').animate({
|
||||
scrollTop: parseInt($(id).offset().top) - 18
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -527,7 +547,7 @@ require([
|
|||
* Initialize search
|
||||
*/
|
||||
var options = {
|
||||
valueNames: [ 'nav-list-item' ]
|
||||
valueNames: ['nav-list-item']
|
||||
};
|
||||
var endpointsList = new List('scrollingNav', options);
|
||||
|
||||
|
@ -539,18 +559,17 @@ require([
|
|||
/**
|
||||
* Detect ESC key to reset search
|
||||
*/
|
||||
$(document).keyup(function(e) {
|
||||
$(document).keyup(function (e) {
|
||||
if (e.keyCode === 27) $('span.search-reset').click();
|
||||
});
|
||||
|
||||
/**
|
||||
* Search reset
|
||||
*/
|
||||
$('span.search-reset').on('click', function() {
|
||||
$('span.search-reset').on('click', function () {
|
||||
$('#scrollingNav .sidenav-search input.search')
|
||||
.val("")
|
||||
.focus()
|
||||
;
|
||||
.focus();
|
||||
endpointsList.search();
|
||||
});
|
||||
|
||||
|
@ -575,7 +594,7 @@ require([
|
|||
if (compareVersion === selectedVersion)
|
||||
return;
|
||||
|
||||
if ( ! compareVersion && version == selectedVersion)
|
||||
if (!compareVersion && version == selectedVersion)
|
||||
return;
|
||||
|
||||
if (compareVersion && articleVersions[group][name][0] === selectedVersion || version === selectedVersion) {
|
||||
|
@ -586,7 +605,7 @@ require([
|
|||
|
||||
var sourceEntry = {};
|
||||
var compareEntry = {};
|
||||
$.each(apiByGroupAndName[group][name], function(index, entry) {
|
||||
$.each(apiByGroupAndName[group][name], function (index, entry) {
|
||||
if (entry.version === version)
|
||||
sourceEntry = entry;
|
||||
if (entry.version === selectedVersion)
|
||||
|
@ -655,17 +674,17 @@ require([
|
|||
*/
|
||||
function changeAllVersionCompareTo(e) {
|
||||
e.preventDefault();
|
||||
$('article:visible .versions').each(function(){
|
||||
$('article:visible .versions').each(function () {
|
||||
var $root = $(this).parents('article');
|
||||
var currentVersion = $root.data('version');
|
||||
var $foundElement = null;
|
||||
$(this).find('li.version a').each(function() {
|
||||
$(this).find('li.version a').each(function () {
|
||||
var selectVersion = $(this).html();
|
||||
if (selectVersion < currentVersion && ! $foundElement)
|
||||
if (selectVersion < currentVersion && !$foundElement)
|
||||
$foundElement = $(this);
|
||||
});
|
||||
|
||||
if($foundElement)
|
||||
if ($foundElement)
|
||||
$foundElement.trigger('click');
|
||||
});
|
||||
initDynamic();
|
||||
|
@ -687,7 +706,9 @@ require([
|
|||
reversed.forEach(function (item, index) {
|
||||
var parts = item.field.split(".");
|
||||
if (parts.length - 1 == dot_count) {
|
||||
var fields_names = fields.map(function (item) { return item.field; });
|
||||
var fields_names = fields.map(function (item) {
|
||||
return item.field;
|
||||
});
|
||||
if (parts.slice(1).length >= 1) {
|
||||
var prefix = parts.slice(0, parts.length - 1).join(".");
|
||||
var prefix_index = fields_names.indexOf(prefix);
|
||||
|
@ -745,7 +766,7 @@ require([
|
|||
*/
|
||||
function renderArticle(group, name, version) {
|
||||
var entry = {};
|
||||
$.each(apiByGroupAndName[group][name], function(index, currentEntry) {
|
||||
$.each(apiByGroupAndName[group][name], function (index, currentEntry) {
|
||||
if (currentEntry.version === version)
|
||||
entry = currentEntry;
|
||||
});
|
||||
|
@ -783,7 +804,7 @@ require([
|
|||
*/
|
||||
function loadGoogleFontCss() {
|
||||
WebFont.load({
|
||||
active: function() {
|
||||
active: function () {
|
||||
// Update scrollspy
|
||||
$(window).scrollspy('refresh')
|
||||
},
|
||||
|
@ -802,22 +823,22 @@ require([
|
|||
*/
|
||||
function sortByOrder(elements, order, splitBy) {
|
||||
var results = [];
|
||||
order.forEach (function(name) {
|
||||
order.forEach(function (name) {
|
||||
if (splitBy)
|
||||
elements.forEach (function(element) {
|
||||
elements.forEach(function (element) {
|
||||
var parts = element.split(splitBy);
|
||||
var key = parts[1]; // reference keep for sorting
|
||||
if (key == name)
|
||||
results.push(element);
|
||||
});
|
||||
else
|
||||
elements.forEach (function(key) {
|
||||
elements.forEach(function (key) {
|
||||
if (key == name)
|
||||
results.push(name);
|
||||
});
|
||||
});
|
||||
// Append all other entries that ar not defined in order
|
||||
elements.forEach(function(element) {
|
||||
elements.forEach(function (element) {
|
||||
if (results.indexOf(element) === -1)
|
||||
results.push(element);
|
||||
});
|
||||
|
|
|
@ -13,8 +13,11 @@ import (
|
|||
|
||||
var config *Config
|
||||
var once sync.Once
|
||||
|
||||
// Configpaths default configuration file paths
|
||||
var Configpaths = []string{"config/config.yml", "config/default_config.yml"}
|
||||
|
||||
// Get config variable
|
||||
func Get() *Config {
|
||||
once.Do(func() {
|
||||
config = &Config{}
|
||||
|
|
|
@ -54,7 +54,7 @@ func getTorrentList(c *gin.Context) (torrents []models.Torrent, createdAsTime ti
|
|||
}
|
||||
|
||||
if userID != "" {
|
||||
userIDnum := 0
|
||||
var userIDnum int
|
||||
userIDnum, err = strconv.Atoi(html.EscapeString(userID))
|
||||
// Should we have a feed for anonymous uploads?
|
||||
if err != nil || userIDnum == 0 {
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
// RSSTorznabHandler : Controller for displaying rss feed, accepting common search arguments
|
||||
func RSSTorznabHandler(c *gin.Context) {
|
||||
t := c.Query("t")
|
||||
rss := ""
|
||||
var rss string
|
||||
title := "Nyaa Pantsu"
|
||||
if config.IsSukebei() {
|
||||
title = "Sukebei Pantsu"
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// Middleware for managing errors on status
|
||||
// ErrorMiddleware for managing errors on status
|
||||
func ErrorMiddleware() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.Next()
|
||||
|
|
|
@ -113,7 +113,7 @@ func torrentManyAction(c *gin.Context) {
|
|||
}
|
||||
|
||||
/* Changes are done, we save */
|
||||
_, err := torrent.UpdateUnscope()
|
||||
_, err = torrent.UpdateUnscope()
|
||||
if err == nil {
|
||||
if torrent.Uploader == nil {
|
||||
torrent.Uploader = &models.User{}
|
||||
|
|
|
@ -14,7 +14,7 @@ func TorrentReassignModPanel(c *gin.Context) {
|
|||
templates.Form(c, "admin/reassign.jet.html", torrentValidator.ReassignForm{})
|
||||
}
|
||||
|
||||
// ExecuteAction : Function for applying the changes from ReassignForm
|
||||
// ExecuteReassign : Function for applying the changes from ReassignForm
|
||||
func ExecuteReassign(f *torrentValidator.ReassignForm) (int, error) {
|
||||
var toBeChanged []uint
|
||||
var err error
|
||||
|
|
|
@ -17,13 +17,13 @@ import (
|
|||
func SeePublicSettingsHandler(c *gin.Context) {
|
||||
_, Tlang := publicSettings.GetTfuncAndLanguageFromRequest(c)
|
||||
availableLanguages := publicSettings.GetAvailableLanguages()
|
||||
languagesJson := templates.LanguagesJSONResponse{Tlang.Tag, availableLanguages}
|
||||
languagesJSON := templates.LanguagesJSONResponse{Tlang.Tag, availableLanguages}
|
||||
contentType := c.Request.Header.Get("Content-Type")
|
||||
if contentType == "application/json" {
|
||||
c.Header("Content-Type", "application/json")
|
||||
c.JSON(http.StatusOK, languagesJson)
|
||||
c.JSON(http.StatusOK, languagesJSON)
|
||||
} else {
|
||||
templates.Form(c, "site/user/public/settings.jet.html", languagesJson)
|
||||
templates.Form(c, "site/user/public/settings.jet.html", languagesJSON)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,4 +4,4 @@ You can use this API without being logged or any token API
|
|||
|
||||
## Except for Upload
|
||||
|
||||
When you upload, you have to provide your username and api token!
|
||||
When you upload, you have to provide your username and API token!
|
||||
|
|
|
@ -1440,16 +1440,16 @@
|
|||
"translation": "%s must be less than the current Date & Time"
|
||||
},
|
||||
{
|
||||
"id":"error_less_array",
|
||||
"translation":"%s must contain less than %s items"
|
||||
"id": "error_less_array",
|
||||
"translation": "%s must contain less than %s items"
|
||||
},
|
||||
{
|
||||
"id": "error_less_length",
|
||||
"translation": "%s must be less than %s in length"
|
||||
},
|
||||
{
|
||||
"id":"error_less_number",
|
||||
"translation":"%s must be less than %s"
|
||||
"id": "error_less_number",
|
||||
"translation": "%s must be less than %s"
|
||||
},
|
||||
{
|
||||
"id": "error_less_equal_date",
|
||||
|
@ -1476,35 +1476,35 @@
|
|||
"translation": "%s must be equal or less to %s"
|
||||
},
|
||||
{
|
||||
"id":"error_max_length",
|
||||
"translation":"Maximal length of %s required for the input: %s"
|
||||
"id": "error_max_length",
|
||||
"translation": "Maximal length of %s required for the input: %s"
|
||||
},
|
||||
{
|
||||
"id":"error_max_number",
|
||||
"translation":"%s must be %s or less"
|
||||
"id": "error_max_number",
|
||||
"translation": "%s must be %s or less"
|
||||
},
|
||||
{
|
||||
"id":"error_max_array",
|
||||
"translation":"%s must contain at maximum %s items"
|
||||
"id": "error_max_array",
|
||||
"translation": "%s must contain at maximum %s items"
|
||||
},
|
||||
{
|
||||
"id":"error_length",
|
||||
"translation":"Length of %s required for the input: %s"
|
||||
"id": "error_length",
|
||||
"translation": "Length of %s required for the input: %s"
|
||||
},
|
||||
{
|
||||
"id":"error_equal",
|
||||
"id": "error_equal",
|
||||
"translation": "%s is not equal to %s"
|
||||
},
|
||||
{
|
||||
"id":"error_same_value",
|
||||
"id": "error_same_value",
|
||||
"translation": "Field '%s' must have the same value as the field '%s'"
|
||||
},
|
||||
{
|
||||
"id":"error_field",
|
||||
"id": "error_field",
|
||||
"translation": "Unexpected error on field: %s"
|
||||
},
|
||||
{
|
||||
"id":"error_not_equal",
|
||||
"id": "error_not_equal",
|
||||
"translation": "%s should not be equal to %s"
|
||||
},
|
||||
{
|
||||
|
@ -1680,7 +1680,7 @@
|
|||
"translation": "No username/password entered"
|
||||
},
|
||||
{
|
||||
"id":"account_banned",
|
||||
"id": "account_banned",
|
||||
"translation": "Account banned"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1437,7 +1437,7 @@
|
|||
},
|
||||
{
|
||||
"id": "error_less_array",
|
||||
"translation":"%s doit contenir moins de %s items"
|
||||
"translation": "%s doit contenir moins de %s items"
|
||||
},
|
||||
{
|
||||
"id": "error_less_length",
|
||||
|
@ -1445,7 +1445,7 @@
|
|||
},
|
||||
{
|
||||
"id": "error_less_number",
|
||||
"translation":"%s doit être inférieur à %s"
|
||||
"translation": "%s doit être inférieur à %s"
|
||||
},
|
||||
{
|
||||
"id": "error_less_equal_date",
|
||||
|
|
|
@ -1364,11 +1364,11 @@
|
|||
"translation": "Minimal length of %s required for the input: %s"
|
||||
},
|
||||
{
|
||||
"id":"error_max_length",
|
||||
"translation":"Maximal length of %s required for the input: %s"
|
||||
"id": "error_max_length",
|
||||
"translation": "Maximal length of %s required for the input: %s"
|
||||
},
|
||||
{
|
||||
"id":"error_same_value",
|
||||
"id": "error_same_value",
|
||||
"translation": "Must be same %s"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1440,7 +1440,7 @@
|
|||
"translation": "%s は現在の日付および時刻より小さくなければなりません"
|
||||
},
|
||||
{
|
||||
"id":"error_less_array",
|
||||
"id": "error_less_array",
|
||||
"translation": "%s は %s 個未満のアイテムを含む必要があります"
|
||||
},
|
||||
{
|
||||
|
@ -1448,7 +1448,7 @@
|
|||
"translation": "%s は長さが %s 未満でなければなりません"
|
||||
},
|
||||
{
|
||||
"id":"error_less_number",
|
||||
"id": "error_less_number",
|
||||
"translation": "%s は %s 未満でなければなりません"
|
||||
},
|
||||
{
|
||||
|
@ -1476,35 +1476,35 @@
|
|||
"translation": "%s は %s 以下でなければなりません"
|
||||
},
|
||||
{
|
||||
"id":"error_max_length",
|
||||
"id": "error_max_length",
|
||||
"translation": "必要な入力値 %s の最大長: %s"
|
||||
},
|
||||
{
|
||||
"id":"error_max_number",
|
||||
"id": "error_max_number",
|
||||
"translation": "%s は %s 以下でなければなりません"
|
||||
},
|
||||
{
|
||||
"id":"error_max_array",
|
||||
"id": "error_max_array",
|
||||
"translation": "%s にはアイテム %s 個まで含める必要があります"
|
||||
},
|
||||
{
|
||||
"id":"error_length",
|
||||
"id": "error_length",
|
||||
"translation": "必要な入力値 %s の長さ: %s"
|
||||
},
|
||||
{
|
||||
"id":"error_equal",
|
||||
"id": "error_equal",
|
||||
"translation": "%s は %s と等しくありません"
|
||||
},
|
||||
{
|
||||
"id":"error_same_value",
|
||||
"id": "error_same_value",
|
||||
"translation": "同じ %s である必要があります"
|
||||
},
|
||||
{
|
||||
"id":"error_field",
|
||||
"id": "error_field",
|
||||
"translation": "フィールドで予期せぬエラーが発生しました: %s"
|
||||
},
|
||||
{
|
||||
"id":"error_not_equal",
|
||||
"id": "error_not_equal",
|
||||
"translation": "%s は %s と同じであってはなりません"
|
||||
},
|
||||
{
|
||||
|
@ -1680,7 +1680,7 @@
|
|||
"translation": "ユーザー名またはパスワードが入力されていません"
|
||||
},
|
||||
{
|
||||
"id":"account_banned",
|
||||
"id": "account_banned",
|
||||
"translation": "アカウントは BAN されています"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/patrickmn/go-cache"
|
||||
)
|
||||
|
||||
// C global cache variable
|
||||
var C *cache.Cache
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -12,10 +12,12 @@ type Category struct {
|
|||
Name string
|
||||
}
|
||||
|
||||
// Cateogories is a struct defining an array of categories
|
||||
// Categories is a struct defining an array of categories
|
||||
type Categories []Category
|
||||
|
||||
var categories Categories
|
||||
|
||||
// Index variable
|
||||
var Index map[string]int
|
||||
|
||||
// InitCategories init the categories and index variables. Exported for tests
|
||||
|
|
|
@ -159,7 +159,7 @@ func setUserToContext(c *gin.Context, val *models.User) {
|
|||
context.Set(c.Request, UserContextKey, val)
|
||||
}
|
||||
|
||||
// RetrieveUser retrieves a user.
|
||||
// RetrieveUserFromRequest retrieves a user.
|
||||
func RetrieveUserFromRequest(c *gin.Context, id uint) (*models.User, bool, uint, int, error) {
|
||||
var user models.User
|
||||
var currentUserID uint
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/gorilla/feeds"
|
||||
)
|
||||
|
||||
// private wrapper around the RssFeed which gives us the <rss>..</rss> xml
|
||||
// rssFeedXML private wrapper around the RssFeed which gives us the <rss>..</rss> xml
|
||||
type rssFeedXML struct {
|
||||
XMLName xml.Name `xml:"rss"`
|
||||
Xmlns string `xml:"xmlns:torznab,attr,omitempty"`
|
||||
|
@ -23,6 +23,7 @@ type rssFeedXML struct {
|
|||
Caps *RssCaps `xml:"caps,omitempty"`
|
||||
}
|
||||
|
||||
// RssImage RSS image struct
|
||||
type RssImage struct {
|
||||
XMLName xml.Name `xml:"image"`
|
||||
URL string `xml:"url"`
|
||||
|
@ -32,6 +33,7 @@ type RssImage struct {
|
|||
Height int `xml:"height,omitempty"`
|
||||
}
|
||||
|
||||
// RssTextInput RSS text struct
|
||||
type RssTextInput struct {
|
||||
XMLName xml.Name `xml:"textInput"`
|
||||
Title string `xml:"title"`
|
||||
|
@ -40,11 +42,13 @@ type RssTextInput struct {
|
|||
Link string `xml:"link"`
|
||||
}
|
||||
|
||||
// RssMagnetLink RSS struct for magnet links
|
||||
type RssMagnetLink struct {
|
||||
XMLName xml.Name `xml:"link"`
|
||||
Text string `xml:",cdata"`
|
||||
}
|
||||
|
||||
// RssFeed RSS feed struct
|
||||
type RssFeed struct {
|
||||
XMLName xml.Name `xml:"channel"`
|
||||
Xmlns string `xml:"-"`
|
||||
|
@ -70,6 +74,7 @@ type RssFeed struct {
|
|||
Items []*RssItem
|
||||
}
|
||||
|
||||
// RssItem struct for rss feed items
|
||||
type RssItem struct {
|
||||
XMLName xml.Name `xml:"item"`
|
||||
Title string `xml:"title"` // required
|
||||
|
@ -86,6 +91,7 @@ type RssItem struct {
|
|||
Torznab []*RssTorznab
|
||||
}
|
||||
|
||||
// RssCaps xml struct for torznab caps
|
||||
type RssCaps struct {
|
||||
XMLName xml.Name `xml:"caps"`
|
||||
Server *RssServer `xml:"server,omitempty"`
|
||||
|
@ -95,6 +101,7 @@ type RssCaps struct {
|
|||
Categories *RssCategories `xml:"categories,omitempty"`
|
||||
}
|
||||
|
||||
// RssServer basic server information
|
||||
type RssServer struct {
|
||||
XMLName xml.Name `xml:"server"`
|
||||
Xmlns string `xml:"xmlns,attr"`
|
||||
|
@ -106,18 +113,21 @@ type RssServer struct {
|
|||
Image string `xml:"image,attr"`
|
||||
}
|
||||
|
||||
// RssLimits struct for max results
|
||||
type RssLimits struct {
|
||||
XMLName xml.Name `xml:"limits"`
|
||||
Max string `xml:"max,attr"`
|
||||
Default string `xml:"default,attr"`
|
||||
}
|
||||
|
||||
// RssRegistration torznab registration information
|
||||
type RssRegistration struct {
|
||||
XMLName xml.Name `xml:"registration"`
|
||||
Available string `xml:"available,attr"`
|
||||
Open string `xml:"open,attr"`
|
||||
}
|
||||
|
||||
// RssSearching struct for supported search types
|
||||
type RssSearching struct {
|
||||
XMLName xml.Name `xml:"searching"`
|
||||
Search *RssSearch `xml:"search,omitempty"`
|
||||
|
@ -125,16 +135,19 @@ type RssSearching struct {
|
|||
MovieSearch *RssSearch `xml:"movie-search,omitempty"`
|
||||
}
|
||||
|
||||
// RssSearch struct for supported searching params
|
||||
type RssSearch struct {
|
||||
Available string `xml:"available,attr"`
|
||||
SupportedParams string `xml:"supportedParams,attr,omitempty"`
|
||||
}
|
||||
|
||||
// RssCategories categories for rss
|
||||
type RssCategories struct {
|
||||
XMLName xml.Name `xml:"categories"`
|
||||
Category []*RssCategoryTorznab
|
||||
}
|
||||
|
||||
// RssCategoryTorznab categories for torznab
|
||||
type RssCategoryTorznab struct {
|
||||
XMLName xml.Name `xml:"category"`
|
||||
ID string `xml:"id,attr"`
|
||||
|
@ -143,6 +156,7 @@ type RssCategoryTorznab struct {
|
|||
Description string `xml:"description,attr,omitempty"`
|
||||
}
|
||||
|
||||
// RssSubCat sub category
|
||||
type RssSubCat struct {
|
||||
XMLName xml.Name `xml:"subcat"`
|
||||
ID string `xml:"id,attr"`
|
||||
|
@ -150,6 +164,7 @@ type RssSubCat struct {
|
|||
Description string `xml:"description,attr,omitempty"`
|
||||
}
|
||||
|
||||
// RssTorrent item for torrents
|
||||
type RssTorrent struct {
|
||||
XMLName xml.Name `xml:"torrent"`
|
||||
Xmlns string `xml:"xmlns,attr"`
|
||||
|
@ -159,6 +174,7 @@ type RssTorrent struct {
|
|||
MagnetURI string `xml:"magnetUri,omitempty"`
|
||||
}
|
||||
|
||||
// RssTorznab feed for torznab
|
||||
type RssTorznab struct {
|
||||
XMLName xml.Name `xml:"torznab:attr,omitempty"`
|
||||
Name string `xml:"name,attr,omitempty"`
|
||||
|
@ -171,6 +187,7 @@ type RssCategory struct {
|
|||
Domain string `xml:"domain"`
|
||||
}
|
||||
|
||||
// RssEnclosure enclosure for downloads
|
||||
type RssEnclosure struct {
|
||||
//RSS 2.0 <enclosure url="http://example.com/file.mp3" length="123456789" type="audio/mpeg" />
|
||||
XMLName xml.Name `xml:"enclosure"`
|
||||
|
@ -179,6 +196,7 @@ type RssEnclosure struct {
|
|||
Type string `xml:"type,attr"`
|
||||
}
|
||||
|
||||
// Rss struct
|
||||
type Rss struct {
|
||||
*feeds.Feed
|
||||
}
|
||||
|
@ -241,22 +259,22 @@ func (r *Rss) RssFeed() *RssFeed {
|
|||
return channel
|
||||
}
|
||||
|
||||
// FeedXml : return an XML-Ready object for an Rss object
|
||||
func (r *Rss) FeedXml() interface{} {
|
||||
// FeedXML : return an XML-Ready object for an Rss object
|
||||
func (r *Rss) FeedXML() interface{} {
|
||||
// only generate version 2.0 feeds for now
|
||||
return r.RssFeed().FeedXml()
|
||||
return r.RssFeed().FeedXML()
|
||||
|
||||
}
|
||||
|
||||
// FeedXml : return an XML-ready object for an RssFeed object
|
||||
func (r *RssFeed) FeedXml() interface{} {
|
||||
// FeedXML : return an XML-ready object for an RssFeed object
|
||||
func (r *RssFeed) FeedXML() interface{} {
|
||||
if r.Xmlns != "" {
|
||||
return &rssFeedXML{Version: "2.0", Encoding: "UTF-8", Channel: r, Xmlns: r.Xmlns}
|
||||
}
|
||||
return &rssFeedXML{Version: "2.0", Encoding: "UTF-8", Channel: r}
|
||||
}
|
||||
|
||||
// FeedXml : return an XML-ready object for an RssFeed object
|
||||
func (r *RssCaps) FeedXml() interface{} {
|
||||
// FeedXML : return an XML-ready object for an RssFeed object
|
||||
func (r *RssCaps) FeedXML() interface{} {
|
||||
return r
|
||||
}
|
||||
|
|
|
@ -29,10 +29,11 @@ var htmlFlags = 0 |
|
|||
md.HTML_HREF_TARGET_BLANK
|
||||
|
||||
func init() {
|
||||
HtmlMdRenderer = md.HtmlRenderer(htmlFlags, "", "")
|
||||
HTMLMdRenderer = md.HtmlRenderer(htmlFlags, "", "")
|
||||
}
|
||||
|
||||
var HtmlMdRenderer md.Renderer
|
||||
// HTMLMdRenderer render for markdown to html
|
||||
var HTMLMdRenderer md.Renderer
|
||||
|
||||
// MarkdownToHTML : convert markdown to html
|
||||
// TODO: restrict certain types of markdown
|
||||
|
@ -41,7 +42,7 @@ func MarkdownToHTML(markdown string) template.HTML {
|
|||
markdown = ">" + markdown[4:]
|
||||
}
|
||||
markdown = strings.Replace(markdown, "\n>", "\n>", -1)
|
||||
unsafe := md.MarkdownOptions([]byte(markdown), HtmlMdRenderer, md.Options{Extensions: mdOptions})
|
||||
unsafe := md.MarkdownOptions([]byte(markdown), HTMLMdRenderer, md.Options{Extensions: mdOptions})
|
||||
html := bluemonday.UGCPolicy().SanitizeBytes(unsafe)
|
||||
return template.HTML(html)
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package structs
|
|||
|
||||
import "github.com/NyaaPantsu/nyaa/models"
|
||||
|
||||
// TorrentCache torrent cache struct
|
||||
type TorrentCache struct {
|
||||
Torrents []models.Torrent
|
||||
Count int
|
||||
|
|
|
@ -17,19 +17,34 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
// ShowAll by default show all torrents
|
||||
ShowAll Status = 0
|
||||
// FilterRemakes filter torrent remakes
|
||||
FilterRemakes = 2
|
||||
// Trusted trusted torrents
|
||||
Trusted = 3
|
||||
// APlus torrents not used anymore
|
||||
APlus = 4
|
||||
)
|
||||
|
||||
// Status torrent status
|
||||
type Status uint8
|
||||
|
||||
// SortMode selected sort mode
|
||||
type SortMode uint8
|
||||
|
||||
// Category torrent categories
|
||||
type Category struct {
|
||||
Main, Sub uint8
|
||||
}
|
||||
|
||||
// SizeBytes size in bytes
|
||||
type SizeBytes uint64
|
||||
|
||||
// DateFilter date to filter for
|
||||
type DateFilter string
|
||||
|
||||
// Categories multiple torrent categories
|
||||
type Categories []*Category
|
||||
|
||||
// TorrentParam defines all parameters that can be provided when searching for a torrent
|
||||
|
|
|
@ -13,6 +13,7 @@ var intEvents struct {
|
|||
funcs []func()
|
||||
}
|
||||
|
||||
// OnInterrupt handles signal interupts
|
||||
func OnInterrupt(fn func()) {
|
||||
intEvents.lock.Lock()
|
||||
intEvents.funcs = append(intEvents.funcs, fn)
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
// Handle handles unix interupts
|
||||
func Handle() {
|
||||
chnl := make(chan os.Signal)
|
||||
signal.Notify(chnl, syscall.SIGHUP, os.Interrupt)
|
||||
|
|
|
@ -139,6 +139,7 @@ func IsUTFLetterNumericValidator(fl validator.FieldLevel) bool {
|
|||
return IsUTFLetterNumeric(value)
|
||||
}
|
||||
|
||||
// DefaultValidator default validator
|
||||
func DefaultValidator(fl validator.FieldLevel) bool {
|
||||
switch fl.Field().Kind() {
|
||||
case reflect.String:
|
||||
|
|
Référencer dans un nouveau ticket