tinyscrollbar_bug fixed

This commit is contained in:
Harry Bomrah 2013-03-01 17:49:58 +08:00
parent 9b8ab2a2c1
commit c1cb5e5ffb
4 changed files with 16 additions and 24 deletions

View File

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

View File

@ -7,15 +7,18 @@
//load = true is used to load the list element by default
//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
//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
//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
//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
//item=true this attribute should be present in the li tag. li with this attribute are considered as a separate item.
$.extend($.expr[':'], {
@ -279,13 +282,13 @@ var orbitDesktop = function(dom){
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;
var entries = column_container.find("li[item=true]"),x = 0;
entries.each(function(i,li){
if(x == 0){
column = $("<div class='g_col list_t' style='width:"+base_width+"px'><ul></ul></div");
total_columns++;
}
column.find("ul").append(li);
column.find("ul").eq(0).append(li);
x++;
if(x == no_of_entries){
x = 0;
@ -309,7 +312,7 @@ var orbitDesktop = function(dom){
$("div[container=true] div.overview").html(temp_div.html());
o.tinyscrollbar_ext({
main : ".tinycanvas",
fill : base_width * (total_columns++) + 250
fill : base_width * total_columns
})
}

View File

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

View File

@ -7,13 +7,11 @@
<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="viewport">
<div class="overview" content-layout="datalist" per-column="5" base-width="300">
<% @journal_co_authors.each_with_index do |co_author,i| %>
<% if ( i % 4 ) == 0 %>
<div class="g_col">
<div class="overview" content-layout="datalist" per-column="4" base-width="300">
<ul>
<% end %>
<li class="list_t_item">
<% @journal_co_authors.each_with_index do |co_author,i| %>
<li class="list_t_item" item="true">
<ul class="info">
<li><div class="name"><%= co_author.co_author %></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" %>
</div>
</li>
<% if ( i % 4 ) == 3 %>
<% end %>
</ul>
</div>
<% end %>
<% end %>
</div>
</div>
</div>