tinyscrollbar_bug fixed

This commit is contained in:
Harry Bomrah 2013-03-01 17:49:58 +08:00 committed by Rueshyna
parent 2ead541733
commit e69679d3fe
4 changed files with 16 additions and 24 deletions

View File

@ -141,7 +141,6 @@ GEM
jquery-rails jquery-rails
railties (>= 3.1.0) railties (>= 3.1.0)
json (1.7.7) json (1.7.7)
libv8 (3.11.8.13)
mail (2.4.4) mail (2.4.4)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
@ -225,7 +224,6 @@ GEM
rdoc (~> 3.4) rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0) thor (>= 0.14.6, < 2.0)
rake (10.0.3) rake (10.0.3)
rb-readline (0.4.2)
rdoc (3.12.1) rdoc (3.12.1)
json (~> 1.4) json (~> 1.4)
redis (3.0.2) redis (3.0.2)
@ -235,7 +233,6 @@ GEM
chinese_pinyin (>= 0.3.0) chinese_pinyin (>= 0.3.0)
redis (>= 2.1.1) redis (>= 2.1.1)
redis-namespace (>= 1.0.2) redis-namespace (>= 1.0.2)
ref (1.0.2)
resque (1.23.0) resque (1.23.0)
multi_json (~> 1.0) multi_json (~> 1.0)
redis-namespace (~> 1.0) redis-namespace (~> 1.0)
@ -316,9 +313,6 @@ GEM
sunspot (= 1.3.3) sunspot (= 1.3.3)
sunspot_solr (1.3.3) sunspot_solr (1.3.3)
terminal-table (1.4.5) terminal-table (1.4.5)
therubyracer (0.11.3)
libv8 (~> 3.11.8.12)
ref
thor (0.17.0) thor (0.17.0)
tilt (1.3.3) tilt (1.3.3)
tinymce-rails (3.5.8) tinymce-rails (3.5.8)
@ -363,7 +357,6 @@ DEPENDENCIES
jquery-rails (= 2.1.4) jquery-rails (= 2.1.4)
jquery-ui-rails jquery-ui-rails
kaminari! kaminari!
libv8 (~> 3.11.8)
mime-types mime-types
mini_magick mini_magick
mongo_session_store-rails3 (= 3.0.6) mongo_session_store-rails3 (= 3.0.6)
@ -380,7 +373,6 @@ DEPENDENCIES
radius radius
rails (~> 3.2.9) rails (~> 3.2.9)
rake rake
rb-readline
redis (>= 2.1.1) redis (>= 2.1.1)
redis-namespace redis-namespace
redis-search redis-search
@ -401,7 +393,6 @@ DEPENDENCIES
sunspot-rails-tester sunspot-rails-tester
sunspot_mongo sunspot_mongo
sunspot_solr sunspot_solr
therubyracer
tinymce-rails tinymce-rails
uglifier uglifier
watchr watchr

View File

@ -7,15 +7,18 @@
//load = true is used to load the list element by default //load = true is used to load the list element by default
//response-type = "json"|"script"|"xml|html" default is json //response-type = "json"|"script"|"xml|html" default is json
//autocomplete-list = "listname" an array from which autocomplete will be attached to its respective input or textarea //autocomplete-list = "listname" an array from which autocomplete will be attached to its respective input or textarea
//ajax-remote="get/delete/post" this will automatically bind the <a> with remote ajax call. By default if the resposne is html, it ll be inserted in container=true //ajax-remote="get/delete/post/false" this will automatically bind the <a> with remote ajax call. By default if the resposne is html, it ll be inserted in container=true, false option will not make any calls and also stop page refresh
// 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 // 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. //confirm-message ="Some message", this will prompt user with a confirm box and show the message before ajax call is made.
//"toggle-onclick" = "classes to get toggle" this will toggle classes on toggle when a tags are clicked.
//for layout tinyscrollbar //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 //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 //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 //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 //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
//item=true this attribute should be present in the li tag. li with this attribute are considered as a separate item.
$.extend($.expr[':'], { $.extend($.expr[':'], {
@ -279,13 +282,13 @@ var orbitDesktop = function(dom){
break; break;
case "datalist": case "datalist":
no_of_entries = (typeof column_container.attr("per-column") != "undefined"? column_container.attr("per-column") : 4); no_of_entries = (typeof column_container.attr("per-column") != "undefined"? column_container.attr("per-column") : 4);
var entries = column_container.find("li"),x = 0; var entries = column_container.find("li[item=true]"),x = 0;
entries.each(function(i,li){ entries.each(function(i,li){
if(x == 0){ if(x == 0){
column = $("<div class='g_col list_t' style='width:"+base_width+"px'><ul></ul></div"); column = $("<div class='g_col list_t' style='width:"+base_width+"px'><ul></ul></div");
total_columns++; total_columns++;
} }
column.find("ul").append(li); column.find("ul").eq(0).append(li);
x++; x++;
if(x == no_of_entries){ if(x == no_of_entries){
x = 0; x = 0;
@ -309,7 +312,7 @@ var orbitDesktop = function(dom){
$("div[container=true] div.overview").html(temp_div.html()); $("div[container=true] div.overview").html(temp_div.html());
o.tinyscrollbar_ext({ o.tinyscrollbar_ext({
main : ".tinycanvas", main : ".tinycanvas",
fill : base_width * (total_columns++) + 250 fill : base_width * total_columns
}) })
} }

View File

@ -1,10 +1,12 @@
module Panel::PersonalJournal::Desktop::JournalPagesHelper module Panel::PersonalJournal::Desktop::JournalPagesHelper
def publication_record publication, view def publication_record publication, view
content_tag :li, content_tag :li,
"item" => "true",
:class => "list_t_item" do :class => "list_t_item" do
marker + \ marker + \
content(publication, view) + \ content(publication, view) + \
edit_or_delete(publication) edit_or_delete(publication)
end end
end end

View File

@ -7,13 +7,11 @@
<div id="co_author" class="tinycanvas vp"> <div id="co_author" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div> <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> <div class="viewport">
<div class="overview" content-layout="datalist" per-column="5" base-width="300"> <div class="overview" content-layout="datalist" per-column="4" base-width="300">
<ul>
<% @journal_co_authors.each_with_index do |co_author,i| %> <% @journal_co_authors.each_with_index do |co_author,i| %>
<% if ( i % 4 ) == 0 %>
<div class="g_col"> <li class="list_t_item" item="true">
<ul>
<% end %>
<li class="list_t_item">
<ul class="info"> <ul class="info">
<li><div class="name"><%= co_author.co_author %></div></li> <li><div class="name"><%= co_author.co_author %></div></li>
<li><div class="email"><i class="icon-envelope"></i> <%= co_author.email %></div></li> <li><div class="email"><i class="icon-envelope"></i> <%= co_author.email %></div></li>
@ -24,11 +22,9 @@
<%= link_to 'Destroy', panel_personal_journal_desktop_journal_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %> <%= link_to 'Destroy', panel_personal_journal_desktop_journal_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
</div> </div>
</li> </li>
<% if ( i % 4 ) == 3 %>
</ul>
</div>
<% end %>
<% end %> <% end %>
</ul>
</div> </div>
</div> </div>
</div> </div>