unused function which computes values for the table
This commit is contained in:
parent
4e71c2367a
commit
848f16e8f5
@ -44,14 +44,33 @@ define([
|
|||||||
Cryptpad: Cryptpad,
|
Cryptpad: Cryptpad,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.getResults = function () {
|
||||||
|
if (!module.ready) { return []; }
|
||||||
|
var table = module.rt.proxy.table;
|
||||||
|
var cells = table.cells;
|
||||||
|
var rows = table.rows;
|
||||||
|
|
||||||
|
return Object.keys(rows).map(function (id) {
|
||||||
|
var text = rows[id];
|
||||||
|
var count = Object.keys(cells).filter(function (c) {
|
||||||
|
return c.indexOf(id) !== -1 && cells[c];
|
||||||
|
}).length;
|
||||||
|
return {
|
||||||
|
text: text,
|
||||||
|
count: count,
|
||||||
|
};
|
||||||
|
}).sort(function (a,b) {
|
||||||
|
return b.count - a.count;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
module.Wizard = Wizard;
|
module.Wizard = Wizard;
|
||||||
|
|
||||||
// special UI elements
|
// special UI elements
|
||||||
var $title = $('#title').attr('placeholder', Messages.dateTitleHint || 'title');
|
var $title = $('#title').attr('placeholder', Messages.dateTitleHint || 'title');
|
||||||
var $location = $('#location').attr('placeholder', Messages.dateLocationHint || 'location');
|
|
||||||
var $description = $('#description').attr('placeholder', Messages.dateDescription || 'description');
|
var $description = $('#description').attr('placeholder', Messages.dateDescription || 'description');
|
||||||
|
|
||||||
var items = [$title, $location, $description];
|
var items = [$title, $description];
|
||||||
|
|
||||||
var Uid = function (prefix, f) {
|
var Uid = function (prefix, f) {
|
||||||
f = f || function () {
|
f = f || function () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user