diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 08fd3337..9ed399ae 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -11,6 +11,12 @@ // content-holder = "jquery dom", the returned html of server will be put inside the dom mentioned in content-holder of a tag. this can be used in a tags as attributes //confirm-message ="Some message", this will prompt user with a confirm box and show the message before ajax call is made. +//for layout tinyscrollbar +//content-layout="datalist|column|simple" datalist is for data list from database.. column is usually for forms and some other pages.. simple is without any columns, the page will be displayed as it is.. base width will be considered the default width for tinyscrollbar +//base-width="300" this is the basic width of each column and in case of simple layout it ll be the final width +//per-column="5" this option is only for datalist layout.. this ll specify number of enteries per column.. default is 4 +//column="true" this option is only for column layout... the columns will be formed on this column=true attribute and it should be a div + $.extend($.expr[':'], { 'containsi': function (elem, i, match, array) { @@ -163,8 +169,10 @@ var orbitDesktop = function(dom){ if(typeof data == "string"){ if(ca) $(ca).html(data); - else - $("div[container=true]").html(data); + else{ + o.layout_data(data); + // $("div[container=true]").html(data); + } } if(exe) window.o[o.data_method][exe](data,$e); @@ -251,6 +259,51 @@ var orbitDesktop = function(dom){ }) }; + this.layout_data = function(h){ + var $e = $(h); + var column_container = $e.find("div.overview"); + var layout = column_container.attr("content-layout"), base_width = parseInt(column_container.attr("base-width")), no_of_entries,temp_div = $("
"),total_columns=0; + switch (layout){ + case "simple": + total_columns++; + temp_div.append(column_container.html()); + break; + case "datalist": + no_of_entries = (typeof column_container.attr("per-column") != "undefined"? column_container.attr("per-column") : 4); + var entries = column_container.find("li"),x = 0; + entries.each(function(i,li){ + if(x == 0){ + column = $("
-
- -
+
+ +
diff --git a/app/views/desktop/settings/sections.html.erb b/app/views/desktop/settings/sections.html.erb index dcb92237..db3fc506 100644 --- a/app/views/desktop/settings/sections.html.erb +++ b/app/views/desktop/settings/sections.html.erb @@ -1,7 +1,7 @@
-
+
Section Names
  • diff --git a/app/views/desktop/settings/themes.html.erb b/app/views/desktop/settings/themes.html.erb index fb1ac8a5..04819a7c 100644 --- a/app/views/desktop/settings/themes.html.erb +++ b/app/views/desktop/settings/themes.html.erb @@ -8,7 +8,7 @@
    -
    +
    <% @themes.each do |theme| %> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb index e30c9e4a..efc225db 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb @@ -68,7 +68,7 @@
    -
    +
    <% @writing_conferences.each do |w| %> <%= publication_record w, @view_by%> <% end %> diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js index a3e89dab..6a34ada2 100644 --- a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js +++ b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js @@ -13,11 +13,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // var bindHandlers = function(){ // to bind handlers for list page o.simple_drop_down(); - o.tinyscrollbar_ext({ - main: '.tinycanvas', - fill: '.list_t' - }) - // $("#journal_selection_options a").click(function(){ // switch($(this).attr("href")){ // case "all": @@ -29,26 +24,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // // } // return false; // }) - // $("#journal_view_selection a").click(function(){ - // switch($(this).attr("href")){ - // case "journal": - // journalview(); - // break; - // case "keywords": - // keywordsview(); - // break; - // case "title": - // titleview(); - // break; - // case "abstract": - // abstractview(); - // break; - // case "file": - // fileview(); - // break; - // } - // return false; - // }) } var bindSecondaryHandlers = function(){ @@ -65,125 +40,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // return false; }) } - - - // var journalview = function(){ - // $("#journal_p div#paper_list div.overview").empty(); - // var column = $('
      '), - // counter = 1, - // li; - // $.each(journalData,function(i,journal){ - // $.each(journal.papers,function(j,paper){ - // li = $('
    • '+journal.title+'
      '+paper.title+'
    • '); - // column.find("ul").append(li); - // if(counter%5==0){ - // $("#journal_p div#paper_list div.overview").append(column); - // column = $('
        '); - // } - // counter++; - // }) - // }) - // $("#journal_p div#paper_list div.overview").append(column); - // bindSecondaryHandlers(); - // } - // var fileview = function(){ - // $("#journal_p div#paper_list div.overview").empty(); - // var column = $('
          '), - // counter = 1, - // li = null; - // $.each(journalData,function(i,journal){ - // $.each(journal.papers,function(j,paper){ - // li = null; - // li = $('
        • '); - // li.append('
          '+journal.title+'
          '); - // var file_list = li.find('.list_t_des'); - // $.each(paper.files,function(k,file){ - // var thistitle = file.title; - // if(!thistitle) - // thistitle = ""; - // thistitle = ( thistitle.length > 8 )? thistitle.substring(0,8)+'...' : thistitle; - // if(!file.title){ - // thistitle = "Untitled File"; - // } - // var img = $(''+thistitle+''); - // file_list.append(img); - // }) - // li.append(''); - // column.find("ul").append(li); - // if(counter%3==0){ - // $("#journal_p div#paper_list div.overview").append(column); - // column = $('
            '); - // } - // counter++; - // }) - // }) - // $("#journal_p div#paper_list div.overview").append(column); - // bindSecondaryHandlers(); - // } - // var keywordsview = function(){ - // $("#journal_p div#paper_list div.overview").empty(); - // var column = $('
              '), - // counter = 1, - // li; - // $.each(journalData,function(i,journal){ - // $.each(journal.papers,function(j,paper){ - // li = $('
            • '+paper.title+'
              '+paper.keywords+'
            • '); - // column.find("ul").append(li); - // if(counter%5==0){ - // $("#journal_p div#paper_list div.overview").append(column); - // column = $('
                '); - // } - // counter++; - // }) - // }) - // $("#journal_p div#paper_list div.overview").append(column); - // bindSecondaryHandlers(); - // } - - // var titleview = function(){ - // $("#journal_p div#paper_list div.overview").empty(); - // var column = $('
                  '), - // counter = 1, - // li; - // $.each(journalData,function(i,journal){ - // $.each(journal.papers,function(j,paper){ - // li = $('
                • '+paper.title+'
                • '); - // column.find("ul").append(li); - // if(counter%5==0){ - // $("#journal_p div#paper_list div.overview").append(column); - // column = $('
                    '); - // } - // counter++; - // }) - // }) - // $("#journal_p div#paper_list div.overview").append(column); - // bindSecondaryHandlers(); - // } - - // var abstractview = function(){ - // $("#journal_p div#paper_list div.overview").empty(); - // var column = $('
                      '), - // li; - // $.each(journalData,function(i,journal){ - // $.each(journal.papers,function(j,paper){ - // li = $('
                    • '+paper.title+'
                      '+paper.abstract+'
                    • '); - // column.find("ul").append(li); - // $("#journal_p div#paper_list div.overview").append(column); - // column = $('
                        '); - // }) - // }) - // $("#journal_p div#paper_list div.overview").append(column); - // bindSecondaryHandlers(); - // } - - // var getData = function(){ - // $.getJSON("/panel/personal_journal/desktop/get_journals_json",function(journals){ - // journalData = eval(journals); - // journalview(); - // bindHandlers(); - // }) - // } - // getData(); } this.initializeJournalPapers.paperDelete = function(data,dom){ var parent = dom.parent().parent(); @@ -195,11 +51,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page var bindHandlers = function(){ // to bind handlers for add page o.simple_drop_down(); - - o.tinyscrollbar_ext({ - main: '.tinycanvas', - fill: '.s_grid_con' - }) } bindHandlers(); } @@ -207,10 +58,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this.initializeJournalPapers.journal = function(){ // to open add pages in journal papers page var bindHandlers = function(){ // to bind handlers for add page o.simple_drop_down(); - o.tinyscrollbar_ext({ - main: '.tinycanvas', - fill: '.g_col' - }) + } bindHandlers(); } @@ -226,13 +74,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this.initializeJournalPapers.coauthor = function(){ // to open add pages in coauthor page var bindHandlers = function(){ // to bind handlers for add page o.simple_drop_down(); - - o.tinyscrollbar_ext({ - main: '.tinycanvas', - fill: '.g_col' - }) - - } + } bindHandlers(); } this.initializeJournalPapers.coauthorRelationForm = function(data){ diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb index b96b97dd..ec6bf16a 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb @@ -15,7 +15,7 @@
                        -
                        +
                        <%= render :partial => 'show_form'%>
                        diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb index c6ac1843..c15a5d52 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb @@ -7,7 +7,7 @@
                        -
                        +
                        <% @journal_co_authors.each_with_index do |co_author,i| %> <% if ( i % 4 ) == 0 %>
                        diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb index 4fd93991..189e9590 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb @@ -24,8 +24,9 @@
                        -
                        -
                        +
                        +
                        +
                        • <%= f.fields_for :paper_title_translations do |f| %> @@ -85,7 +86,9 @@
                        -
                        +
                        +
                        +
                        • <%= f.fields_for :authors_translations do |f| %> @@ -158,7 +161,9 @@
                        -
                        +
                        +
                        +
                        • @@ -189,14 +194,18 @@
                        -
                        +
                        +
                        +
                        • <%= f.text_area :note, size: "20x22", placeholder: t("personal_journal.note"), class: "s_grid_6 s_grid full_height"%>
                        -
                        +
                        +
                        +
                        • <%= f.text_area :abstract, size: "20x22", placeholder: t("personal_journal.abstract"), class: "s_grid_6 s_grid full_height"%> @@ -204,6 +213,7 @@
                        +