forked from 0x2620/pandora
remove site.flags, add 'flag' item key property; update 0xDB config; update filter.js
This commit is contained in:
parent
6c6693e922
commit
f3af1b70a0
3 changed files with 11 additions and 12 deletions
|
@ -86,10 +86,6 @@
|
||||||
included in find annotations.
|
included in find annotations.
|
||||||
*/
|
*/
|
||||||
"clipLayers": ["subtitles"],
|
"clipLayers": ["subtitles"],
|
||||||
/*
|
|
||||||
"flags" sets if in filters, countries and languages have a flag icon.
|
|
||||||
*/
|
|
||||||
"flags": true,
|
|
||||||
/*
|
/*
|
||||||
"help" specifies the sections of the help dialog.
|
"help" specifies the sections of the help dialog.
|
||||||
There isn't much of a point in making changes to this.
|
There isn't much of a point in making changes to this.
|
||||||
|
@ -177,6 +173,7 @@
|
||||||
"columnWidth": 120,
|
"columnWidth": 120,
|
||||||
"filter": true,
|
"filter": true,
|
||||||
"find": true,
|
"find": true,
|
||||||
|
"flag": "country",
|
||||||
"sort": true
|
"sort": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -198,6 +195,7 @@
|
||||||
"columnWidth": 120,
|
"columnWidth": 120,
|
||||||
"filter": true,
|
"filter": true,
|
||||||
"find": true,
|
"find": true,
|
||||||
|
"flag": "language",
|
||||||
"sort": true
|
"sort": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,11 +126,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
/*
|
/*
|
||||||
If "flags" is set to true, then filters for countries and languages will
|
|
||||||
appear with a flag icon.
|
|
||||||
*/
|
|
||||||
"flags": false,
|
|
||||||
/*
|
|
||||||
"help" specifies the sections of the help dialog.
|
"help" specifies the sections of the help dialog.
|
||||||
*/
|
*/
|
||||||
"help": [
|
"help": [
|
||||||
|
@ -176,6 +171,8 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
|
||||||
this key can be added in list view.
|
this key can be added in list view.
|
||||||
"filter": If true, one can filter results by this key
|
"filter": If true, one can filter results by this key
|
||||||
"find": If true, this key will appear as an option in the find element
|
"find": If true, this key will appear as an option in the find element
|
||||||
|
"flag": Can be "country" or "language". If set (and filter is true), a
|
||||||
|
flag icon corresponding to the field's value will be displayed.
|
||||||
"format": {type: string, args: [value, value, ...]}, used for special
|
"format": {type: string, args: [value, value, ...]}, used for special
|
||||||
formatting. This will invoke Ox.formatType(args). For details, see
|
formatting. This will invoke Ox.formatType(args). For details, see
|
||||||
https://oxjs.org/#doc/Ox.formatArea etc.
|
https://oxjs.org/#doc/Ox.formatArea etc.
|
||||||
|
@ -263,6 +260,7 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
|
||||||
"columnWidth": 180,
|
"columnWidth": 180,
|
||||||
"filter": true,
|
"filter": true,
|
||||||
"find": true,
|
"find": true,
|
||||||
|
"flag": "country",
|
||||||
"sort": true
|
"sort": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,12 +15,14 @@ pandora.ui.filter = function(id) {
|
||||||
align: 'left',
|
align: 'left',
|
||||||
id: 'name',
|
id: 'name',
|
||||||
format: function(value) {
|
format: function(value) {
|
||||||
return pandora.site.flags && ['country', 'language'].indexOf(id) > -1
|
return filter.flag
|
||||||
? $('<div>')
|
? $('<div>')
|
||||||
.append(
|
.append(
|
||||||
$('<img>')
|
$('<img>')
|
||||||
.attr({src: Ox[
|
.attr({src: Ox[
|
||||||
id == 'country' ? 'getFlagByGeoname' : 'getFlagByLanguage'
|
filter.flag == 'country'
|
||||||
|
? 'getFlagByGeoname'
|
||||||
|
: 'getFlagByLanguage'
|
||||||
](value, 16)})
|
](value, 16)})
|
||||||
.css({
|
.css({
|
||||||
float: 'left',
|
float: 'left',
|
||||||
|
@ -35,7 +37,8 @@ pandora.ui.filter = function(id) {
|
||||||
.addClass('flagname')
|
.addClass('flagname')
|
||||||
.css({
|
.css({
|
||||||
float: 'left',
|
float: 'left',
|
||||||
width: pandora.user.ui.filterSizes[i] - 68 - Ox.UI.SCROLLBAR_SIZE,
|
width: pandora.user.ui.filterSizes[i]
|
||||||
|
- 68 - Ox.UI.SCROLLBAR_SIZE,
|
||||||
textOverflow: 'ellipsis',
|
textOverflow: 'ellipsis',
|
||||||
overflowX: 'hidden'
|
overflowX: 'hidden'
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue