From e9c0f443b70fac753e38a9e8862b0e891808797f Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 26 Feb 2013 11:47:05 +0800 Subject: [PATCH 1/9] Lot of changes in gridster --- app/assets/javascripts/jquery.gridster.js | 2 + app/assets/javascripts/orbitdesktop.js | 70 ++++++++++++++++--- app/assets/stylesheets/desktop.css | 1 + app/assets/stylesheets/desktop_font.css | 1 + app/assets/stylesheets/desktopmain.css | 78 +++++++++++++++------- app/assets/stylesheets/jquery.gridster.css | 6 +- app/assets/stylesheets/style.css.erb | 2 +- 7 files changed, 123 insertions(+), 37 deletions(-) create mode 100644 app/assets/stylesheets/desktop_font.css mode change 100755 => 100644 app/assets/stylesheets/jquery.gridster.css diff --git a/app/assets/javascripts/jquery.gridster.js b/app/assets/javascripts/jquery.gridster.js index 947f4bb2..e8998514 100755 --- a/app/assets/javascripts/jquery.gridster.js +++ b/app/assets/javascripts/jquery.gridster.js @@ -1328,6 +1328,7 @@ */ fn.draggable = function() { var self = this; + var draggable_options = $.extend(true, {}, this.options.draggable, { offset_left: this.options.widget_margins[0], start: function(event, ui) { @@ -3204,6 +3205,7 @@ max_rows += (+$(w).attr('data-sizey')); }); + this.cols = Math.max(min_cols, cols, this.options.min_cols); this.rows = Math.max(max_rows, this.options.min_rows); diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index a4f58b7c..e1fded1f 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -420,9 +420,10 @@ var orbitDesktop = function(dom){ $.getJSON("/desktop/getgroups",{sectionid:id},function(tiles){ tiles.sort(o.sortJSON("position",true,parseInt)); var tilecolors = o.themesettings.tilecolor; + var totaltiles_in_a_row = 4; var opacity = ["op05","op06","op07","op08","op09"]; var row = 1,col = 1,x = 1,y = 1; - var $group = $('
'); + var $group = $('
'); var $ul = $(''); $.each(tiles,function(i,tile){ @@ -436,21 +437,72 @@ var orbitDesktop = function(dom){ var tilecolor = tilecolors[Math.floor(Math.random()*tilecolors.length)]; var op = opacity[Math.floor(Math.random()*opacity.length)]; if(tile.data_category == "app") - $li = $('
  • '+tile.title+'

  • '); + $li = $('
  • '+tile.title+'

  • '); else - $li = $('
  • Loading...

    '+tile.title+'

  • '); + $li = $('
  • Loading...

    '+tile.title+'

  • '); row = row + y; $ul.append($li); }) $group.append($ul); - console.log($group); $("div#desktop div#group_wrapper").append($group); - o.gridvar = $(".grid ul").gridster({ - widget_margins: [6, 6], - widget_base_dimensions: [120, 120] - }); + var dragged = null,draggable,lastpos = []; + o.gridvar = $(".grid ul").find("> li ").mousedown(function(e){ + !draggable; + dragged = $(this); + lastpos = []; + $(".grid ul li").each(function(){ + lastpos.push({"col":$(this).attr("data-col"),"row":$(this).attr("data-row")}) + }) + }).end() + .gridster({ + widget_margins: [6, 6], + widget_base_dimensions: [120, 120], + avoid_overlapped_widgets: true, + draggable : { + stop: function(event, ui){ + + var widgetchanged_col = dragged.attr("data-col"); + var total = 0; + // console.log(widgetchanged.col); + // console.log(o.gridvar.serialize_changed()); + $(".grid ul li[data-col="+widgetchanged_col+"]").each(function(i,w){ + var size = parseInt($(this).attr("data-sizey")); + if(!isNaN(size)){ + total += size; + } + }) + // other way to calculate the overflow is by top > height of div + if(total>totaltiles_in_a_row){ + revertbacktiles(); + }else{ + console.log(widgetchanged_col-1); + $(".grid ul li[data-col="+(widgetchanged_col-1)+"]").each(function(i,w){ + var sizey = parseInt($(this).attr("data-sizey")); + var sizex = parseInt($(this).attr("data-sizex")); + if(sizey==1){ + sizex = sizex - 1; + } + console.log(sizex); + + if(!isNaN(sizex)){ + total += sizex; + } + }) + if(total>totaltiles_in_a_row){ + revertbacktiles(); + } + } + } + } + }).data('gridster'); + var revertbacktiles = function(){ + lastpos.push({"col":"","row":""}); + $(".grid ul li").each(function(i){ + $(this).attr({"data-col":lastpos[i].col,"data-row":lastpos[i].row}); + }) + } bindHandlers(); o.initializeWidgets(); }) @@ -1219,7 +1271,7 @@ var orbitDesktop = function(dom){ }) }; this.initializeWidgets = function(){ // this function will initialize all the widgets in the desktop - var elements = $("#group_wrapper li.element"); + var elements = $("#group_wrapper li.widget"); $.each(elements,function(){ var widget = $(this); if(widget.attr("data-category")=="widget"){ diff --git a/app/assets/stylesheets/desktop.css b/app/assets/stylesheets/desktop.css index 346c2166..f3746eff 100644 --- a/app/assets/stylesheets/desktop.css +++ b/app/assets/stylesheets/desktop.css @@ -2,6 +2,7 @@ *This is a manifest file that'll automatically include all the stylesheets available in this directory *and any sub-directories. You're free to add application-wide styles to this file and they'll appear at *the top of the compiled file, but it's generally better to create a new file per style scope. + *= require desktop_font *= require style *= require bootstrap *= require bootstrap-orbit diff --git a/app/assets/stylesheets/desktop_font.css b/app/assets/stylesheets/desktop_font.css new file mode 100644 index 00000000..d0a9ec09 --- /dev/null +++ b/app/assets/stylesheets/desktop_font.css @@ -0,0 +1 @@ +@import url(http://fonts.googleapis.com/css?family=Cuprum|Dosis:400,700|Roboto+Condensed:400,700); \ No newline at end of file diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css index 54d85690..f2a5e019 100644 --- a/app/assets/stylesheets/desktopmain.css +++ b/app/assets/stylesheets/desktopmain.css @@ -60,9 +60,30 @@ body { } a, a:hover { text-decoration: none; color: #666; } a:focus { outline: none; } + +/* box-sizing element */ +.appholder, .appname { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.admbg { background-color: #fff; } +.admbg2 { background-color: #ddd; } +.admtxt { color: #666; } +.admtxt:hover { color: #666; } +.hfn { + font-size: 15px; + line-height: 36px; + float: left; + margin: 12px 12px 0 0; + position: relative; + } +.thmtxt { position: relative; } + /* desktop layout */ #container { - margin: 48px 0 0 156px; + padding: 48px 0 0 156px; } #header { padding: 0 0 12px 0; @@ -117,6 +138,7 @@ a:focus { outline: none; } padding: 0 6px; font-size: 15px; position: absolute; + z-index: 9; min-width: 48px; text-align: center; white-space: nowrap; @@ -165,14 +187,28 @@ a:focus { outline: none; } .appname { font-size: 15px; - height: 30px; line-height: 30px; + width: 100%; + height: 30px; + padding: 0 12px; overflow: hidden; cursor: default; + position: absolute; + left: 0; + bottom: 0; z-index: 3; } -.w1.h1 .appname { text-align: center; } -.w2.h2 .appname { font-size: 21px; } +[data-sizex="1"] .appname, .w1.h1 .appname { + text-align: center; +} +[data-sizey="2"] .appname { + font-size: 21px; +} +.hh2 .appname { + position: relative; + width: auto; + padding: 0; +} .appicon { display: block; width: 60px; @@ -180,6 +216,9 @@ a:focus { outline: none; } margin: 0 auto; position: relative; } +[data-sizex="1"] .appicon { + margin-top: 24px; +} #sections .appicon { width: 30px; height: 30px; @@ -189,16 +228,19 @@ a:focus { outline: none; } .appholder { position: relative; z-index: 2; - } -.holder_f .appholder { - position: absolute; + padding: 12px; + padding-bottom: 30px; width: 100%; height: 100%; + overflow: hidden; + } +.fullsize .appholder { + position: absolute; padding: 0; left: 0; top: 0; } -.holder_f .appname { display: none; } +.fullsize .appname { display: none; } .dtitle { font-size: 30px; line-height: 60px; @@ -209,18 +251,6 @@ a:focus { outline: none; } } /*.section_slc { width: 252px; }*/ -.admbg { background-color: #fff; } -.admbg2 { background-color: #ddd; } -.admtxt { color: #666; } -.admtxt:hover { color: #666; } -.hfn { - font-size: 15px; - line-height: 36px; - float: left; - margin: 12px 12px 0 0; - position: relative; - } -.thmtxt { position: relative; } .tile { display: block; width: 100%; @@ -388,10 +418,10 @@ a:focus { outline: none; } .hp { padding-left: 12px; padding-right: 12px; } .vp { padding-top: 12px; padding-bottom: 12px; } .element { - /*margin: 0 12px 12px 0; - float: left;*/ - position: absolute; - /*display:inline-block;*/ + margin: 0 12px 12px 0; + float: left; + position: relative; + display:inline-block; } .group{ float: left; diff --git a/app/assets/stylesheets/jquery.gridster.css b/app/assets/stylesheets/jquery.gridster.css old mode 100755 new mode 100644 index c36d418a..8441eac3 --- a/app/assets/stylesheets/jquery.gridster.css +++ b/app/assets/stylesheets/jquery.gridster.css @@ -37,9 +37,9 @@ .gridster .preview-holder { z-index: 1; position: absolute; - background-color: #fff; - border-color: #fff; - opacity: 0.3; + background-color: #000; + border-color: #000; + opacity: 0.2; } .gridster .player-revert { diff --git a/app/assets/stylesheets/style.css.erb b/app/assets/stylesheets/style.css.erb index f86c9a91..48f79d2a 100644 --- a/app/assets/stylesheets/style.css.erb +++ b/app/assets/stylesheets/style.css.erb @@ -1,6 +1,6 @@ /*style*/ -@import url(http://fonts.googleapis.com/css?family=Cuprum); +/*@import url(http://fonts.googleapis.com/css?family=Cuprum);*/ @font-face{ font-family: 'WebSymbolsRegular'; src: url(<%= asset_path 'websymbols-regular-webfont.eot' %>); From 912080482b313a1171d429ed3a6cebe3d7fc8292 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 27 Feb 2013 11:47:41 +0800 Subject: [PATCH 2/9] some changes for gridster --- app/assets/javascripts/orbitdesktop.js | 83 ++++++++++++++++---------- 1 file changed, 53 insertions(+), 30 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index e1fded1f..08fd3337 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -459,41 +459,55 @@ var orbitDesktop = function(dom){ .gridster({ widget_margins: [6, 6], widget_base_dimensions: [120, 120], - avoid_overlapped_widgets: true, + // avoid_overlapped_widgets: true, draggable : { stop: function(event, ui){ - - var widgetchanged_col = dragged.attr("data-col"); - var total = 0; - // console.log(widgetchanged.col); - // console.log(o.gridvar.serialize_changed()); - $(".grid ul li[data-col="+widgetchanged_col+"]").each(function(i,w){ - var size = parseInt($(this).attr("data-sizey")); - if(!isNaN(size)){ - total += size; - } - }) - // other way to calculate the overflow is by top > height of div - if(total>totaltiles_in_a_row){ - revertbacktiles(); - }else{ - console.log(widgetchanged_col-1); - $(".grid ul li[data-col="+(widgetchanged_col-1)+"]").each(function(i,w){ - var sizey = parseInt($(this).attr("data-sizey")); - var sizex = parseInt($(this).attr("data-sizex")); - if(sizey==1){ - sizex = sizex - 1; - } - console.log(sizex); + // var widgetchanged_col = dragged.attr("data-col"); + // var total = 0; + // // console.log(widgetchanged.col); + // // console.log(o.gridvar.serialize_changed()); + // $(".grid ul li[data-col="+widgetchanged_col+"]").each(function(i,w){ + // var size = parseInt($(this).attr("data-sizey")); + // if(!isNaN(size)){ + // total += size; + // } + // }) + // // other way to calculate the overflow is by top > height of div + // if(total>totaltiles_in_a_row){ + // revertbacktiles(); + // }else{ + // console.log(widgetchanged_col-1); + // $(".grid ul li[data-col="+(widgetchanged_col-1)+"]").each(function(i,w){ + // var sizey = parseInt($(this).attr("data-sizey")); + // var sizex = parseInt($(this).attr("data-sizex")); + // if(sizey==1){ + // sizex = sizex - 1; + // } + // console.log(sizex); - if(!isNaN(sizex)){ - total += sizex; + // if(!isNaN(sizex)){ + // total += sizex; + // } + // }) + // if(total>totaltiles_in_a_row){ + // revertbacktiles(); + // } + // } + + for (var i = 1; i <= 30; i++) { + // var celement = $(".grid ul .widget[data-col="+i+"]:last"); + $(".grid ul .widget[data-col="+i+"]").each(function(){ + var pos = $(this).position(); + if(pos){ + console.log(pos.top + $(this).height() + 6); + if((pos.top + $(this).height() + 6) > 550){ + revertbacktiles(); + + } } }) - if(total>totaltiles_in_a_row){ - revertbacktiles(); - } - } + + } } } }).data('gridster'); @@ -502,6 +516,15 @@ var orbitDesktop = function(dom){ $(".grid ul li").each(function(i){ $(this).attr({"data-col":lastpos[i].col,"data-row":lastpos[i].row}); }) + } + var remove_empty_columns = function(){ + for (var i = 1; i <= 30; i++) { + // var celement = $(".grid ul .widget[data-col="+i+"]:last"); + $(".grid ul .widget[data-col="+i+"]").each(function(){ + + }) + break; + } } bindHandlers(); o.initializeWidgets(); From c82e9a646d4c12fbae5d68234af39f22d1285038 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 27 Feb 2013 18:55:26 +0800 Subject: [PATCH 3/9] tinyscrollbar fixed --- app/assets/javascripts/orbitdesktop.js | 142 +++++++-------- app/views/desktop/allsections.html.erb | 164 +----------------- app/views/desktop/settings/sections.html.erb | 2 +- app/views/desktop/settings/themes.html.erb | 2 +- .../desktop/conference_pages/index.html.erb | 2 +- .../personal_journal/desktop/journal_pages.js | 162 +---------------- .../index.html.erb | 2 +- .../desktop/journal_co_authors/index.html.erb | 2 +- .../desktop/journal_pages/_form.html.erb | 22 ++- .../desktop/journal_pages/index.html.erb | 2 +- .../journal_pages/journal_type.html.erb | 2 +- 11 files changed, 100 insertions(+), 404 deletions(-) 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 @@
                            +
                            From ee5fd18b648c691f1a666d898f62efcdfe040b2f Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 4 Mar 2013 17:44:55 +0800 Subject: [PATCH 8/9] =?UTF-8?q?highlighting=20fixed=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/orbitdesktop.js | 17 +++++++++++++++-- .../desktop/journal_pages/_form.html.erb | 5 +---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index cc47a507..12f194b1 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -395,8 +395,21 @@ var orbitDesktop = function(dom){ // }) } - $('*[content-type=menu] a').removeClass('thmc1 thmtxt active'); - dom.addClass('thmc1 thmtxt active'); + // $('*[content-type=menu] a').removeClass('thmc1 thmtxt active'); + // dom.addClass('thmc1 thmtxt active'); + o.highlight_sub_menu_item(dom); + } + this.highlight_sub_menu_item = function(no){ + $('*[content-type=menu] a').removeClass('thmc1 thmtxt active'); + var dom; + if(typeof no == "number"){ + dom = $('*[content-type=menu] a').eq(no); + dom.addClass('thmc1 thmtxt active'); + }else if(typeof no == "object"){ + dom = no; + dom.addClass('thmc1 thmtxt active'); + } + return dom; } this.initializeDesktop = function(target,url,cache){ //this is for initializing main desktops that are sections and tiles 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 9163cc23..f8cdae36 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 @@ -222,10 +222,7 @@ From dc92ef9f42971dcd33f44ddf1fd66541d8ec2d91 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 5 Mar 2013 11:04:04 +0800 Subject: [PATCH 9/9] simple layout tinyscrollbar fixed --- app/assets/javascripts/orbitdesktop.js | 15 ++++++++++----- app/views/desktop/settings/themes.html.erb | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 12f194b1..bf4ab16c 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -310,11 +310,16 @@ var orbitDesktop = function(dom){ column_container.empty(); $("div[container=true]").html(h); $("div[container=true] div.overview").html(temp_div.html()); - o.tinyscrollbar_ext({ - main : ".tinycanvas", - fill : base_width * total_columns - }) - + if(isNaN(base_width)){ + o.tinyscrollbar_ext({ + main : ".tinycanvas", + }) + }else{ + o.tinyscrollbar_ext({ + main : ".tinycanvas", + fill : base_width * total_columns + }) + } } this.menu_item = function(dom,customload,submenuitem){ if(!customload)customload=false; diff --git a/app/views/desktop/settings/themes.html.erb b/app/views/desktop/settings/themes.html.erb index 04819a7c..d178fba0 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| %>