diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-02-07 00:25:50 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-02-14 22:35:58 +0200 |
commit | 051bd0e339407ec40664db8e84d2060c5b5ea7d1 (patch) | |
tree | 520c0c5c5993791f0e366bf67cf711698412bdce /web | |
parent | 38ac196b2f00c1e13a0928cd892384bc296c8a98 (diff) | |
download | aconf-051bd0e339407ec40664db8e84d2060c5b5ea7d1.tar.bz2 aconf-051bd0e339407ec40664db8e84d2060c5b5ea7d1.tar.xz |
web client: split long rows
Diffstat (limited to 'web')
-rw-r--r-- | web/client.js | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/web/client.js b/web/client.js index 4a9d396..8240b16 100644 --- a/web/client.js +++ b/web/client.js @@ -39,7 +39,8 @@ require( $.ajax("/login", { type: "POST", data: JSON.stringify({ - username: $("#username").val(), password: $("#password").val() + username: $("#username").val(), + password: $("#password").val() }) }).done(function(data, status, xhr) { @@ -62,7 +63,9 @@ require( (layout ? require("acf2/layout/" + layout) : Inline).extend({ - createEl: function() { return $("#content").empty(); }, + createEl: function() { + return $("#content").empty(); + }, wrap: function() { return this.el; }, requestData: function(value, meta) { return $.Deferred().resolve(data, data.meta); @@ -110,9 +113,10 @@ require( var extraFields = false; _.each(data.meta.fields, function(field) { - if (!field.visible) return; + if (!field.visible) return; - if (!type.isTreeNode(field)) extraFields = true; + if (!type.isTreeNode(field)) + extraFields = true; else if (data.data[field.name]) tnFields.push(field); }); @@ -123,7 +127,9 @@ require( } function addItem(path, ui_name, status, current) { - var el = $("<li>").html(dom.objectRef(path).text(ui_name)); + var el = $("<li>").html( + dom.objectRef(path).text(ui_name) + ); el.prop("class", status); if (current) el.addClass("current"); target.append(el); @@ -171,7 +177,8 @@ require( ( tabLevel && _.isString(data) ) ? pth.join(p, data) : path, - tabLevel && _.isObject(data) ? data : null + tabLevel && _.isObject(data) ? + data : null ); }) .fail(function(data) { |