From d840b82fa99347f13254ef0442e65a35a1704340 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 7 Mar 2013 19:15:30 +0800 Subject: [PATCH] insert and remove columns --- app/assets/javascripts/orbitdesktop.js | 80 ++++++++++++------- .../desktop/journal_pages/index.html.erb | 2 +- 2 files changed, 51 insertions(+), 31 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 2a50c3426..f766802fa 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -334,6 +334,55 @@ var orbitDesktop = function(dom){ }) } } + this.insert_new_column = function(index){ + var column_container = $("div[container=true] div.overview"),layout = column_container.attr("content-layout"),base_width = parseInt(column_container.attr("base-width")),column; + var i = (index == 0? 0 : index-1); + var previous_column = column_container.find(".column").eq(i); + if(previous_column.length == 0)return false; + switch(layout){ + case "datalist": + column = $("
-
+
<% @writing_journals.each do |w| %> <%= publication_record w, @view_by%> <% end %>