diff --git a/pandora/static/js/pandora.js b/pandora/static/js/pandora.js index ff7386d..f828bf4 100755 --- a/pandora/static/js/pandora.js +++ b/pandora/static/js/pandora.js @@ -50,9 +50,15 @@ $(function() { { id: "map", title: "on Map" }, { id: "calendar", title: "on Calendar" }, ], + sections: [ + { id: "history", title: "History" }, + { id: "lists", title: "My Lists" }, + { id: "public", title: "Public Lists" }, + { id: "featured", title: "Featured Lists" } + ], sortKeys: [ - { id: "title", title: "Title", operator: "", align: "left", width: 180 }, - { id: "director", title: "Director", operator: "", align: "left", width: 180 }, + { id: "title", title: "Title", operator: "", align: "left", width: 180, removable: false }, + { id: "director", title: "Director", operator: "", align: "left", width: 180, removable: false }, { id: "country", title: "Country", operator: "", align: "left", width: 120 }, { id: "year", title: "Year", operator: "-", align: "right", width: 60 }, { id: "language", title: "Language", operator: "", align: "left", width: 120 }, @@ -109,6 +115,7 @@ $(function() { itemView: "info", listsSize: 192, listView: "list", + sections: ["history", "lists", "public", "featured"], showGroups: true, showInfo: true, showLists: true, @@ -124,6 +131,10 @@ $(function() { user = config.userSettings, $ui = { groups: [] + }, + ui = { + infoRatio: 4 / 3, + selectedMovies: [] }; // App @@ -158,20 +169,8 @@ $(function() { {}, { id: "preferences", title: "Preferences", disabled: true, keyboard: "control ," }, {}, - { id: "login", title: "Login" } - ] }, - { id: "edit", title: "Edit", items: [ - { id: "undo", title: "Undo", disabled: true, keyboard: "control z" }, - { id: "redo", title: "Redo", disabled: true, keyboard: "shift control z" }, - {}, - { id: "cut", title: "Cut", disabled: true, keyboard: "control x" }, - { id: "copy", title: "Copy", disabled: true, keyboard: "control c" }, - { id: "paste", title: "Paste", disabled: true, keyboard: "control v" }, - { id: "delete", title: "Delete", disabled: true, keyboard: "delete" }, - {}, - { id: "selectall", title: "Select All", disabled: true, keyboard: "control a" }, - { id: "selectnone", title: "Select None", disabled: true, keyboard: "shift control a" }, - { id: "invertselection", title: "Invert Selection", disabled: true, keyboard: "alt control a" } + { id: "register", title: "Create an Account..." }, + { id: "login", title: "Login..." } ] }, { id: "list", title: "List", items: [ { id: "history", title: "History", items: [ @@ -188,11 +187,25 @@ $(function() { { id: "newlist", title: "New List...", keyboard: "control n" }, { id: "newlistfromselection", title: "New List from Selection...", disabled: true, keyboard: "shift control n" }, { id: "newsmartlist", title: "New Smart List...", keyboard: "alt control n" }, + { id: "newsmartlistfromresults", title: "New Smart List from Results...", keyboard: "shift alt control n" }, {}, - { id: "addtolist", title: "Add Selected Movie to List...", disabled: true }, + { id: "addmovietolist", title: ["Add Selected Movie to List...", "Add Selected Movies to List..."], disabled: true }, {}, { id: "setposterframe", title: "Set Poster Frame", disabled: true } ]}, + { id: "edit", title: "Edit", items: [ + { id: "undo", title: "Undo", disabled: true, keyboard: "control z" }, + { id: "redo", title: "Redo", disabled: true, keyboard: "shift control z" }, + {}, + { id: "cut", title: "Cut", disabled: true, keyboard: "control x" }, + { id: "copy", title: "Copy", disabled: true, keyboard: "control c" }, + { id: "paste", title: "Paste", disabled: true, keyboard: "control v" }, + { id: "delete", title: "Delete", disabled: true, keyboard: "delete" }, + {}, + { id: "selectall", title: "Select All", disabled: true, keyboard: "control a" }, + { id: "selectnone", title: "Select None", disabled: true, keyboard: "shift control a" }, + { id: "invertselection", title: "Invert Selection", disabled: true, keyboard: "alt control a" } + ] }, { id: "view", title: "View", items: [ { id: "movies", title: "View Movies", items: $.map(config.listViews, function(view, i) { return $.extend({ @@ -210,7 +223,7 @@ $(function() { { id: "video", title: "Video" } ] }, {}, - { id: "movie", title: "Open Movie", items: $.map(config.itemViews, function(view, i) { + { id: "openmovie", title: ["Open Movie", "Open Movies"], disabled: true, items: $.map(config.itemViews, function(view, i) { return view; }) }, {}, @@ -257,6 +270,51 @@ $(function() { ] }); +// Lists + + $ui.lists = new Ox.Element(); + $ui.sections = []; + $.each(user.ui.sections, function(i, id) { + var section = new Ox.CollapsePanel({ + size: "small", + title: Ox.getObjectById(config.sections, id).title + }); + $ui.sections.push(section); + section.$content.append( + $("