From dd10b3147c83327ba0d89a4423e913b2463a71a6 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 29 Mar 2013 17:50:21 +0800 Subject: [PATCH] Fix js bug and asset url after merge --- app/assets/javascripts/orbitdesktop.js | 5 +++-- ...desktop-select2.css => desktop-select2.css.erb} | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) rename app/assets/stylesheets/desktop/{desktop-select2.css => desktop-select2.css.erb} (93%) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index f56314834..3a8ac950e 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -409,8 +409,9 @@ var orbitDesktop = function(dom){ x++; if(x == no_of_entries){ x = 0; - temp_div.append(column); - } + temp_div.append(column); + } + }); } total_width = (!isNaN(base_width)) ? (base_width + gutter*2 +1) * total_columns : null; break; diff --git a/app/assets/stylesheets/desktop/desktop-select2.css b/app/assets/stylesheets/desktop/desktop-select2.css.erb similarity index 93% rename from app/assets/stylesheets/desktop/desktop-select2.css rename to app/assets/stylesheets/desktop/desktop-select2.css.erb index 10b475b93..7d0c7d2e1 100644 --- a/app/assets/stylesheets/desktop/desktop-select2.css +++ b/app/assets/stylesheets/desktop/desktop-select2.css.erb @@ -65,7 +65,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013 font-size: 1px; text-decoration: none; border: 0; - background: url("select2/select2.png") right top no-repeat; + background: url(<%= asset_path "desktop/select2/select2.png" %>) right top no-repeat; cursor: pointer; outline: 0; } @@ -119,7 +119,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013 display: block; width: 100%; height: 100%; - background: url("select2/select2.png") no-repeat 0 1px; } + background: url(<%= asset_path "desktop/select2/select2.png" %>) no-repeat 0 1px; } .select2-search { display: inline-block; @@ -152,7 +152,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013 margin-top: 4px; } .select2-search input.select2-active { - background: white image-url("select2-spinner.gif") no-repeat 100%; } + background: white image-url(<%= asset_path "desktop/select2/select2-spinner.gif" %>) no-repeat 100%; } .select2-container-active .select2-choice, .select2-container-active .select2-choices { @@ -265,7 +265,7 @@ disabled look for disabled choices in the results dropdown display: none; } .select2-more-results.select2-active { - background: #f4f4f4 image-url("select2-spinner.gif") no-repeat 100%; } + background: #f4f4f4 image-url(<%= asset_path "desktop/select2/select2-spinner.gif" %>) no-repeat 100%; } .select2-more-results { background: #f4f4f4; @@ -327,7 +327,7 @@ disabled look for disabled choices in the results dropdown background: transparent !important; } .select2-container-multi .select2-choices .select2-search-field input.select2-active { - background: white image-url("select2-spinner.gif") no-repeat 100% !important; } + background: white image-url(<%= asset_path "desktop/select2/select2-spinner.gif" %>) no-repeat 100% !important; } .select2-default { color: #999999 !important; } @@ -363,7 +363,7 @@ disabled look for disabled choices in the results dropdown top: 4px; font-size: 1px; outline: none; - background: url("select2/select2.png") right top no-repeat; } + background: url(<%= asset_path "desktop/select2/select2.png" %>) right top no-repeat; } .select2-container-multi .select2-search-choice-close { left: 3px; } @@ -402,7 +402,7 @@ disabled look for disabled choices in the results dropdown /* Retina-ize icons */ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) { .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b { - background-image: url("select2/select2x2.png") !important; + background-image: url(<%= asset_path "desktop/select2/select2x2.png" %>) !important; background-repeat: no-repeat !important; background-size: 60px 40px !important; }