add boolean 'sort' property to itemKeys (before, columnWidth implied sort=true, which didn't accommodate sort by random)

This commit is contained in:
rolux 2012-03-08 12:33:20 +01:00
parent 05a96c4671
commit ca0f5c7e1e
3 changed files with 149 additions and 72 deletions

View file

@ -85,13 +85,14 @@
capability: A capability required to see this key capability: A capability required to see this key
columnRequired: If true, the column can't be removed columnRequired: If true, the column can't be removed
columnWidth: Default column width in px columnWidth: Default column width in px
find: If true, will appear as a find option 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 a find option
format: {type: "...", args: [...]}, for special formatting format: {type: "...", args: [...]}, for special formatting
(Ox.formatType(args) will be called) (Ox.formatType(args) will be called)
sort: special sort rule (title, person) sort: If true, one can sort results by this key
sortOperator: sort operator (+, -), in case it differs from the sortOperator: sort operator (+, -), in case it differs from the
default for the key's type (+ for strings, - for numbers) default for the key's type (+ for strings, - for numbers)
sortType: special sort type (title, person)
value: {key: "...", type: "..."}, for keys that are derived value: {key: "...", type: "..."}, for keys that are derived
from other keys (like number of actors), or "capability" from other keys (like number of actors), or "capability"
*/ */
@ -112,7 +113,8 @@
"columnRequired": true, "columnRequired": true,
"columnWidth": 180, "columnWidth": 180,
"find": true, "find": true,
"sort": "title" "sort": true,
"sortType": "title"
}, },
{ {
"id": "director", "id": "director",
@ -124,7 +126,8 @@
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"find": true, "find": true,
"sort": "person" "sort": true,
"sortType": "person"
}, },
{ {
"id": "country", "id": "country",
@ -133,7 +136,8 @@
"autocomplete": true, "autocomplete": true,
"columnWidth": 120, "columnWidth": 120,
"filter": true, "filter": true,
"find": true "find": true,
"sort": true
}, },
{ {
"id": "year", "id": "year",
@ -143,7 +147,8 @@
"autocomplete": true, "autocomplete": true,
"columnWidth": 60, "columnWidth": 60,
"filter": true, "filter": true,
"find": true "find": true,
"sort": true
}, },
{ {
"id": "language", "id": "language",
@ -151,15 +156,17 @@
"type": ["string"], "type": ["string"],
"autocomplete": true, "autocomplete": true,
"columnWidth": 120, "columnWidth": 120,
"filter": true,
"find": true, "find": true,
"filter": true "sort": true
}, },
{ {
"id": "runtime", "id": "runtime",
"title": "Runtime", "title": "Runtime",
"type": "time", "type": "time",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "duration", "args": [0, "short"]} "format": {"type": "duration", "args": [0, "short"]},
"sort": true
}, },
{ {
"id": "writer", "id": "writer",
@ -169,7 +176,8 @@
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"find": true, "find": true,
"sort": "person" "sort": true,
"sortType": "person"
}, },
{ {
"id": "producer", "id": "producer",
@ -179,7 +187,8 @@
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"find": true, "find": true,
"sort": "person" "sort": true,
"sortType": "person"
}, },
{ {
"id": "cinematographer", "id": "cinematographer",
@ -189,7 +198,8 @@
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"find": true, "find": true,
"sort": "person" "sort": true,
"sortType": "person"
}, },
{ {
"id": "editor", "id": "editor",
@ -199,7 +209,8 @@
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"find": true, "find": true,
"sort": "person" "sort": true,
"sortType": "person"
}, },
{ {
"id": "actor", "id": "actor",
@ -208,13 +219,14 @@
"autocomplete": true, "autocomplete": true,
"filter": true, "filter": true,
"find": true, "find": true,
"sort": "person" "sortType": "person"
}, },
{ {
"id": "numberofactors", "id": "numberofactors",
"title": "Number of Actors", "title": "Number of Actors",
"type": "integer", "type": "integer",
"columnWidth": 60, "columnWidth": 60,
"sort": true,
"value": {"key": "actor", "type": "length"} "value": {"key": "actor", "type": "length"}
}, },
{ {
@ -223,7 +235,7 @@
"type": ["string"], "type": ["string"],
"autocomplete": true, "autocomplete": true,
"find": true, "find": true,
"sort": "string" "sortType": "string"
}, },
{ {
"id": "name", "id": "name",
@ -244,7 +256,8 @@
"autocomplete": true, "autocomplete": true,
"columnWidth": 120, "columnWidth": 120,
"filter": true, "filter": true,
"find": true "find": true,
"sort": true
}, },
{ {
"id": "keyword", "id": "keyword",
@ -270,48 +283,55 @@
"title": "Release Date", "title": "Release Date",
"type": "date", "type": "date",
"columnWidth": 120, "columnWidth": 120,
"format": {"type": "date", "args": ["%a, %b %e, %Y"]} "format": {"type": "date", "args": ["%a, %b %e, %Y"]},
"sort": true
}, },
{ {
"id": "budget", "id": "budget",
"title": "Budget", "title": "Budget",
"type": "integer", "type": "integer",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "unit", "args": ["$"]} "format": {"type": "unit", "args": ["$"]},
"sort": true
}, },
{ {
"id": "gross", "id": "gross",
"title": "Gross", "title": "Gross",
"type": "integer", "type": "integer",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "unit", "args": ["$"]} "format": {"type": "unit", "args": ["$"]},
"sort": true
}, },
{ {
"id": "profit", "id": "profit",
"title": "Profit", "title": "Profit",
"type": "integer", "type": "integer",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "unit", "args": ["$"]} "format": {"type": "unit", "args": ["$"]},
"sort": true
}, },
{ {
"id": "rating", "id": "rating",
"title": "Rating", "title": "Rating",
"type": "float", "type": "float",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "unit", "args": ["%", 0]} "format": {"type": "unit", "args": ["%", 0]},
"sort": true
}, },
{ {
"id": "votes", "id": "votes",
"title": "Votes", "title": "Votes",
"type": "float", "type": "float",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "unit", "args": ["%", 2]} "format": {"type": "unit", "args": ["%", 2]},
"sort": true
}, },
{ {
"id": "id", "id": "id",
"title": "ID", "title": "ID",
"type": "string", "type": "string",
"columnWidth": 90 "columnWidth": 90,
"sort": true
}, },
{ {
"id": "subtitles", "id": "subtitles",
@ -324,7 +344,8 @@
"title": "Duration", "title": "Duration",
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "duration", "args": []} "format": {"type": "duration", "args": []},
"sort": true
}, },
{ {
"id": "resolution", "id": "resolution",
@ -332,14 +353,16 @@
"type": ["integer"], "type": ["integer"],
"capability": "canSeeFiles", "capability": "canSeeFiles",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "resolution", "args": ["px"]} "format": {"type": "resolution", "args": ["px"]},
"sort": true
}, },
{ {
"id": "aspectratio", "id": "aspectratio",
"title": "Aspect Ratio", "title": "Aspect Ratio",
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "unit", "args": [":1"]} "format": {"type": "unit", "args": [":1"]},
"sort": true
}, },
{ {
"id": "pixels", "id": "pixels",
@ -347,7 +370,8 @@
"type": "integer", "type": "integer",
"capability": "canSeeFiles", "capability": "canSeeFiles",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "value", "args": ["px"]} "format": {"type": "value", "args": ["px"]},
"sort": true
}, },
{ {
"id": "hue", "id": "hue",
@ -355,6 +379,7 @@
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "color", "args": ["hue"]}, "format": {"type": "color", "args": ["hue"]},
"sort": true,
"sortOperator": "+" "sortOperator": "+"
}, },
{ {
@ -362,20 +387,23 @@
"title": "Saturation", "title": "Saturation",
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "color", "args": ["saturation"]} "format": {"type": "color", "args": ["saturation"]},
"sort": true
}, },
{ {
"id": "lightness", "id": "lightness",
"title": "Lightness", "title": "Lightness",
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "color", "args": ["lightness"]} "format": {"type": "color", "args": ["lightness"]},
"sort": true
}, },
{ {
"id": "volume", "id": "volume",
"title": "Volume", "title": "Volume",
"type": "float", "type": "float",
"columnWidth": 60 "columnWidth": 60,
"sort": true
}, },
{ {
"id": "numberofcuts", "id": "numberofcuts",
@ -383,6 +411,7 @@
"type": "integer", "type": "integer",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "number", "args": []}, "format": {"type": "number", "args": []},
"sort": true,
"value": {"key": "cuts", "type": "length"} "value": {"key": "cuts", "type": "length"}
}, },
{ {
@ -390,6 +419,7 @@
"title": "Cuts per Minute", "title": "Cuts per Minute",
"type": "float", "type": "float",
"columnWidth": 60, "columnWidth": 60,
"sort": true,
"value": {"key": "cuts", "type": "lengthperminute"} "value": {"key": "cuts", "type": "lengthperminute"}
}, },
{ {
@ -398,6 +428,7 @@
"type": "integer", "type": "integer",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "number", "args": []}, "format": {"type": "number", "args": []},
"sort": true,
"value": {"layer": "subtitles", "type": "words"} "value": {"layer": "subtitles", "type": "words"}
}, },
{ {
@ -406,6 +437,7 @@
"type": "float", "type": "float",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "unit", "args": ["wpm"]}, "format": {"type": "unit", "args": ["wpm"]},
"sort": true,
"value": {"layer": "subtitles", "type": "wordsperminute"} "value": {"layer": "subtitles", "type": "wordsperminute"}
}, },
{ {
@ -414,7 +446,8 @@
"type": "integer", "type": "integer",
"capability": "canSeeFiles", "capability": "canSeeFiles",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "value", "args": ["B"]} "format": {"type": "value", "args": ["B"]},
"sort": true
}, },
{ {
"id": "bitrate", "id": "bitrate",
@ -422,14 +455,16 @@
"type": "integer", "type": "integer",
"capability": "canSeeFiles", "capability": "canSeeFiles",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "unit", "args": ["kbps", 0, 0.001]} "format": {"type": "unit", "args": ["kbps", 0, 0.001]},
"sort": true
}, },
{ {
"id": "parts", "id": "parts",
"title": "Number of Parts", "title": "Number of Parts",
"type": "integer", "type": "integer",
"capability": "canSeeFiles", "capability": "canSeeFiles",
"columnWidth": 60 "columnWidth": 60,
"sort": true
}, },
{ {
"id": "numberoffiles", "id": "numberoffiles",
@ -437,6 +472,7 @@
"type": "integer", "type": "integer",
"capability": "canSeeFiles", "capability": "canSeeFiles",
"columnWidth": 60, "columnWidth": 60,
"sort": true,
"value": {"key": "files", "type": "length"} "value": {"key": "files", "type": "length"}
}, },
{ {
@ -451,27 +487,31 @@
"title": "Date Created", "title": "Date Created",
"type": "date", "type": "date",
"columnWidth": 150, "columnWidth": 150,
"format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]} "format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]},
"sort": true
}, },
{ {
"id": "modified", "id": "modified",
"title": "Last Modified", "title": "Last Modified",
"type": "date", "type": "date",
"columnWidth": 150, "columnWidth": 150,
"format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]} "format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]},
"sort": true
}, },
{ {
"id": "accessed", "id": "accessed",
"title": "Last Accessed", "title": "Last Accessed",
"type": "date", "type": "date",
"columnWidth": 150, "columnWidth": 150,
"format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]} "format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]},
"sort": true
}, },
{ {
"id": "timesaccessed", "id": "timesaccessed",
"title": "Times Accessed", "title": "Times Accessed",
"type": "integer", "type": "integer",
"columnWidth": 60 "columnWidth": 60,
"sort": true
}, },
{ {
"id": "rightslevel", "id": "rightslevel",
@ -481,6 +521,7 @@
"format": {"type": "ColorLevel", "args": [ "format": {"type": "ColorLevel", "args": [
["Public", "Relaxed", "Regular", "Restricted", "Private"] ["Public", "Relaxed", "Regular", "Restricted", "Private"]
]}, ]},
"sort": true,
"sortOperator": "+", "sortOperator": "+",
"values": ["Public", "Relaxed", "Regular", "Restricted", "Private", "Unknown"] "values": ["Public", "Relaxed", "Regular", "Restricted", "Private", "Unknown"]
}, },
@ -499,7 +540,8 @@
{ {
"id": "random", "id": "random",
"title": "Random", "title": "Random",
"type": "integer" "type": "integer",
"sort": true
} }
], ],
/* /*
@ -709,4 +751,4 @@
"previewRatio": 1.7777777778, "previewRatio": 1.7777777778,
"resolutions": [96] "resolutions": [96]
} }
} }

View file

@ -81,13 +81,14 @@
capability: A capability required to see this key capability: A capability required to see this key
columnRequired: If true, the column can't be removed columnRequired: If true, the column can't be removed
columnWidth: Default column width in px columnWidth: Default column width in px
find: If true, will appear as a find option
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 a find option
format: {type: "...", args: [...]}, for special formatting format: {type: "...", args: [...]}, for special formatting
(Ox.formatType(args) will be called) (Ox.formatType(args) will be called)
sort: special sort rule (title, person) sort: If true, one can sort results by this key
sortOperator: sort operator (+, -), in case it differs from the sortOperator: sort operator (+, -), in case it differs from the
default for the key's type (+ for strings, - for numbers) default for the key's type (+ for strings, - for numbers)
sortType: special sort type (title, person)
value: {key: "...", type: "..."}, for keys that are derived value: {key: "...", type: "..."}, for keys that are derived
from other keys (like number of actors), or "capability" from other keys (like number of actors), or "capability"
*/ */
@ -107,7 +108,8 @@
"columnRequired": true, "columnRequired": true,
"columnWidth": 180, "columnWidth": 180,
"find": true, "find": true,
"sort": "title" "sort": true,
"sortType": "title"
}, },
{ {
"id": "source", "id": "source",
@ -117,7 +119,8 @@
"description": true, "description": true,
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"find": true "find": true,
"sort": true
}, },
{ {
"id": "project", "id": "project",
@ -127,7 +130,8 @@
"description": true, "description": true,
"columnWidth": 120, "columnWidth": 120,
"filter": true, "filter": true,
"find": true "find": true,
"sort": true
}, },
{ {
"id": "topic", "id": "topic",
@ -136,7 +140,8 @@
"autocomplete": true, "autocomplete": true,
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"find": true "find": true,
"sort": true
}, },
{ {
"id": "name", "id": "name",
@ -152,7 +157,8 @@
"autocomplete": true, "autocomplete": true,
"columnRequired": true, "columnRequired": true,
"columnWidth": 180, "columnWidth": 180,
"sort": "person" "sort": true,
"sortType": "person"
}, },
{ {
"id": "cinematographer", "id": "cinematographer",
@ -160,7 +166,8 @@
"type": ["string"], "type": ["string"],
"autocomplete": true, "autocomplete": true,
"columnWidth": 180, "columnWidth": 180,
"sort": "person" "sort": true,
"sortType": "person"
}, },
{ {
"id": "featuring", "id": "featuring",
@ -170,7 +177,8 @@
"columnRequired": true, "columnRequired": true,
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"sort": "person" "sort": true,
"sortType": "person"
}, },
{ {
"id": "language", "id": "language",
@ -179,7 +187,8 @@
"autocomplete": true, "autocomplete": true,
"columnWidth": 120, "columnWidth": 120,
"filter": true, "filter": true,
"find": true "find": true,
"sort": true
}, },
{ {
"id": "location", "id": "location",
@ -188,14 +197,16 @@
"autocomplete": true, "autocomplete": true,
"columnWidth": 180, "columnWidth": 180,
"filter": true, "filter": true,
"find": true "find": true,
"sort": true
}, },
{ {
"id": "date", "id": "date",
"title": "Date", "title": "Date",
"type": "string", "type": "string",
"columnWidth": 120 "columnWidth": 120,
//"format": {"type": "date", "args": ["%a, %b %e, %Y"]} //"format": {"type": "date", "args": ["%a, %b %e, %Y"]},
"sort": true
}, },
{ {
"id": "summary", "id": "summary",
@ -207,7 +218,8 @@
"id": "id", "id": "id",
"title": "ID", "title": "ID",
"type": "string", "type": "string",
"columnWidth": 90 "columnWidth": 90,
"sort": true
}, },
{ {
"id": "annotations", "id": "annotations",
@ -249,62 +261,72 @@
"id": "numberofannotations", "id": "numberofannotations",
"title": "Annotations", "title": "Annotations",
"type": "integer", "type": "integer",
"columnWidth": 60 "columnWidth": 60,
"sort": true
}, },
{ {
"id": "duration", "id": "duration",
"title": "Duration", "title": "Duration",
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "duration", "args": [0, "short"]} "format": {"type": "duration", "args": [0, "short"]},
"sort": true
}, },
{ {
"id": "resolution", "id": "resolution",
"title": "Resolution", "title": "Resolution",
"type": ["integer"], "type": ["integer"],
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "resolution", "args": ["px"]} "format": {"type": "resolution", "args": ["px"]},
"sort": true
}, },
{ {
"id": "aspectratio", "id": "aspectratio",
"title": "Aspect Ratio", "title": "Aspect Ratio",
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "unit", "args": [":1"]} "format": {"type": "unit", "args": [":1"]},
"sort": true
}, },
{ {
"id": "pixels", "id": "pixels",
"title": "Pixels", "title": "Pixels",
"type": "integer", "type": "integer",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "value", "args": ["px"]} "format": {"type": "value", "args": ["px"]},
"sort": true
}, },
{ {
"id": "hue", "id": "hue",
"title": "Hue", "title": "Hue",
"type": "hue", "type": "hue",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "color", "args": ["hue"]} "format": {"type": "color", "args": ["hue"]},
"sort": true,
"sortOperator": "+"
}, },
{ {
"id": "saturation", "id": "saturation",
"title": "Saturation", "title": "Saturation",
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "color", "args": ["saturation"]} "format": {"type": "color", "args": ["saturation"]},
"sort": true
}, },
{ {
"id": "lightness", "id": "lightness",
"title": "Lightness", "title": "Lightness",
"type": "float", "type": "float",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "color", "args": ["lightness"]} "format": {"type": "color", "args": ["lightness"]},
"sort": true
}, },
{ {
"id": "volume", "id": "volume",
"title": "Volume", "title": "Volume",
"type": "float", "type": "float",
"columnWidth": 60 "columnWidth": 60,
"sort": true
}, },
{ {
"id": "numberofcuts", "id": "numberofcuts",
@ -312,6 +334,7 @@
"type": "integer", "type": "integer",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "number", "args": []}, "format": {"type": "number", "args": []},
"sort": true,
"value": {"key": "cuts", "type": "length"} "value": {"key": "cuts", "type": "length"}
}, },
{ {
@ -319,6 +342,7 @@
"title": "Cuts per Minute", "title": "Cuts per Minute",
"type": "float", "type": "float",
"columnWidth": 60, "columnWidth": 60,
"sort": true,
"value": {"key": "cuts", "type": "lengthperminute"} "value": {"key": "cuts", "type": "lengthperminute"}
}, },
{ {
@ -327,6 +351,7 @@
"type": "integer", "type": "integer",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "number", "args": []}, "format": {"type": "number", "args": []},
"sort": true,
"value": {"layer": "subtitles", "type": "words"} "value": {"layer": "subtitles", "type": "words"}
}, },
{ {
@ -334,6 +359,7 @@
"title": "Words per Minute", "title": "Words per Minute",
"type": "float", "type": "float",
"columnWidth": 60, "columnWidth": 60,
"sort": true,
"value": {"layer": "subtitles", "type": "wordsperminute"} "value": {"layer": "subtitles", "type": "wordsperminute"}
}, },
{ {
@ -342,14 +368,16 @@
"type": "integer", "type": "integer",
"capability": "canSeeFiles", "capability": "canSeeFiles",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "value", "args": ["B"]} "format": {"type": "value", "args": ["B"]},
"sort": true
}, },
{ {
"id": "bitrate", "id": "bitrate",
"title": "Bitrate", "title": "Bitrate",
"type": "integer", "type": "integer",
"columnWidth": 60, "columnWidth": 60,
"format": {"type": "unit", "args": ["kbps"]} "format": {"type": "unit", "args": ["kbps"]},
"sort": true
}, },
{ {
"id": "numberoffiles", "id": "numberoffiles",
@ -357,6 +385,7 @@
"type": "integer", "type": "integer",
"capability": "canSeeFiles", "capability": "canSeeFiles",
"columnWidth": 60, "columnWidth": 60,
"sort": true,
"value": {"key": "files", "type": "length"} "value": {"key": "files", "type": "length"}
}, },
{ {
@ -378,33 +407,38 @@
"title": "Date Created", "title": "Date Created",
"type": "date", "type": "date",
"columnWidth": 120, "columnWidth": 120,
"format": {"type": "date", "args": ["%a, %b %e, %Y"]} "format": {"type": "date", "args": ["%a, %b %e, %Y"]},
"sort": true
}, },
{ {
"id": "modified", "id": "modified",
"title": "Date Modified", "title": "Date Modified",
"type": "date", "type": "date",
"columnWidth": 90 "columnWidth": 90,
"sort": true
}, },
{ {
"id": "accessed", "id": "accessed",
"title": "Date Accessed", "title": "Date Accessed",
"type": "date", "type": "date",
"columnWidth": 90, "columnWidth": 90,
"format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]} "format": {"type": "date", "args": ["%Y-%m-%d %H:%M:%S"]},
"sort": true
}, },
{ {
"id": "timesaccessed", "id": "timesaccessed",
"title": "Times Accessed", "title": "Times Accessed",
"type": "integer", "type": "integer",
"columnWidth": 60 "columnWidth": 60,
"sort": true
}, },
{ {
"id": "license", "id": "license",
"title": "License", "title": "License",
"type": ["string"], "type": ["string"],
"columnWidth": 120, "columnWidth": 120,
"filter": true "filter": true,
"sort": true
}, },
{ {
"id": "rightslevel", "id": "rightslevel",
@ -414,6 +448,7 @@
"format": {"type": "ColorLevel", "args": [ "format": {"type": "ColorLevel", "args": [
["Public", "Restricted", "Private"] ["Public", "Restricted", "Private"]
]}, ]},
"sort": true,
"sortOperator": "+", "sortOperator": "+",
"values": ["Public", "Restricted", "Private", "Unknown"] "values": ["Public", "Restricted", "Private", "Unknown"]
}, },
@ -421,7 +456,7 @@
"id": "random", "id": "random",
"title": "Random", "title": "Random",
"type": "integer", "type": "integer",
"columnWidth": 60 "sort": true
} }
], ],
"itemName": { "itemName": {
@ -634,4 +669,4 @@
"previewRatio": 1.3333333333, "previewRatio": 1.3333333333,
"resolutions": [480, 240, 96] "resolutions": [480, 240, 96]
} }
} }

View file

@ -269,7 +269,7 @@ appPanel
] ]
}, },
sortKeys: Ox.map(pandora.site.itemKeys, function(key) { sortKeys: Ox.map(pandora.site.itemKeys, function(key) {
return key.columnWidth ? Ox.extend(key, { return key.sort ? Ox.extend(key, {
operator: pandora.getSortOperator(key.id) operator: pandora.getSortOperator(key.id)
}) : null; }) : null;
}) })