From cf7f7aa29ce6536eceff27d118a7c95b38602661 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 8 Oct 2013 12:47:31 +0800 Subject: [PATCH] Fix tag page slide issues --- app/assets/javascripts/lib/jquery.pageslide.js | 7 +++++++ app/views/admin/module_tags/index.js.erb | 2 +- app/views/admin/tags/index.js.erb | 2 +- config/locales/new_ui.en.yml | 4 +++- config/locales/new_ui.zh_tw.yml | 2 ++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/lib/jquery.pageslide.js b/app/assets/javascripts/lib/jquery.pageslide.js index f72406ae..d25948ed 100644 --- a/app/assets/javascripts/lib/jquery.pageslide.js +++ b/app/assets/javascripts/lib/jquery.pageslide.js @@ -55,6 +55,13 @@ } else { $viewPage.find('.content').load(url, function(){ $viewPage.clone(true).appendTo( $pageslide.empty() ).show(); + if($('#filter-default-tag').length) { + $('#filter-default-tag').fastLiveFilter('.add-default-tags-list', '.filter-item', '.tag'); + addTagsTab(); + $('#view-page .card').cardCheck({ + item: $('#view-page input[type="checkbox"]'), + }); + }; if(callback)callback.call(this,$viewPage,element); }); } diff --git a/app/views/admin/module_tags/index.js.erb b/app/views/admin/module_tags/index.js.erb index 699910e1..d9f4ae22 100644 --- a/app/views/admin/module_tags/index.js.erb +++ b/app/views/admin/module_tags/index.js.erb @@ -5,6 +5,6 @@ $("#tags_index").html("<%= j render 'index' %>") $.pageslide.close(); openSlide(); $('.card').cardCheck({ - check: $('.card input[type="checkbox"]'), + item: $('.card input[type="checkbox"]'), }); checkedLength() \ No newline at end of file diff --git a/app/views/admin/tags/index.js.erb b/app/views/admin/tags/index.js.erb index d100fe76..ac7e2ee1 100644 --- a/app/views/admin/tags/index.js.erb +++ b/app/views/admin/tags/index.js.erb @@ -4,6 +4,6 @@ $("#tags_index").html("<%= j render 'index' %>") $.pageslide.close(); openSlide(); $('.card').cardCheck({ - check: $('.card input[type="checkbox"]'), + item: $('.card input[type="checkbox"]'), }); checkedLength() \ No newline at end of file diff --git a/config/locales/new_ui.en.yml b/config/locales/new_ui.en.yml index c064a883..0b338819 100644 --- a/config/locales/new_ui.en.yml +++ b/config/locales/new_ui.en.yml @@ -2,6 +2,7 @@ en: add_category: Add category add_link: Add link add_page: Add page + add_tags: Add Tags add_to_default: Add to default alternative: Alternative approval_setting: Approval Setting @@ -70,4 +71,5 @@ en: error: tag: Error when updating category tag: Error when updating tag - url_alt: Alternative text \ No newline at end of file + url_alt: Alternative text + use_default: Use Default \ No newline at end of file diff --git a/config/locales/new_ui.zh_tw.yml b/config/locales/new_ui.zh_tw.yml index b6bdfd4e..908cdf23 100644 --- a/config/locales/new_ui.zh_tw.yml +++ b/config/locales/new_ui.zh_tw.yml @@ -2,6 +2,7 @@ zh_tw: add_category: 新增類別 add_link: 新增連結 add_page: 新增頁面 + add_tags: Add Tags add_to_default: 加入預設 alternative: 註解 approval_setting: 審核設定 @@ -71,3 +72,4 @@ zh_tw: tag: 更新類別時發生錯誤 tag: 更新標籤時發生錯誤 url_alt: 註解 + use_default: Use Default