+
+ // Dodaj obecnie oglądany plik do listy recentFiles
+ var recentFiles = [{fileId: fileId, panels: panels}];
+ var count = 1;
+ $.each(self.options.recentFiles, function(index) {
+ if (count < 5 && fileId != self.options.recentFiles[index].fileId) {
+ recentFiles.push(self.options.recentFiles[index]);
+ count++;
+ }
+ });
+ self.options.recentFiles = recentFiles;
+
+ self.options.lastUpdate = new Date().getTime() / 1000;
+ $.log($.toJSON(self.options));