-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix select all functionality for gallery and comments listings
- Loading branch information
1 parent
fd4e062
commit bc9cb2c
Showing
5 changed files
with
141 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
<cms:ignore> | ||
<div class="select_all"> | ||
<label> | ||
<cms:render 'list_checkbox' for_header='1' /> | ||
<strong><cms:localize 'select-deselect' /></strong> | ||
</label> | ||
</div> | ||
</cms:ignore> | ||
<div id="comments-listing"> | ||
<cms:comments | ||
masterpage = k_template_name | ||
page_id = k_selected_pageids | ||
approved = k_selected_status | ||
order = k_selected_order | ||
paginate = '1' | ||
limit = k_selected_limit | ||
show_unpublished = '1' | ||
base_link = k_route_link | ||
token = k_cur_token | ||
> | ||
|
||
<cms:render 'comment_item' /> | ||
|
||
<cms:comments | ||
masterpage = k_template_name | ||
page_id = k_selected_pageids | ||
approved = k_selected_status | ||
order = k_selected_order | ||
paginate = '1' | ||
limit = k_selected_limit | ||
show_unpublished = '1' | ||
base_link = k_route_link | ||
token = k_cur_token | ||
> | ||
<cms:if k_paginated_bottom > | ||
<cms:set my_paginator="<cms:render 'paginator' />" 'parent' /> | ||
|
||
<cms:render 'comment_item' /> | ||
<div class="select-all"> | ||
<cms:render 'list_checkbox' for_header='1' /> | ||
</div> | ||
</cms:if> | ||
</cms:comments> | ||
</div> | ||
|
||
<cms:if k_paginated_bottom > | ||
<cms:set my_paginator="<cms:render 'paginator' />" 'parent' /> | ||
</cms:if> | ||
</cms:comments> | ||
<cms:admin_add_js> | ||
$(function(){ | ||
COUCH.bindCommentsSelect(); | ||
}); | ||
</cms:admin_add_js> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,73 @@ | ||
<div class="gallery-listing"> | ||
<div id="listing"> | ||
<cms:set my_max_items_in_row = '5' /> | ||
<cms:set my_gallery_folder_count='0' /> | ||
<cms:set my_cur_folder_count='0' /> | ||
<cms:set my_page_num="<cms:gpc method='get' var='pg' default='1' />"/> | ||
<div id="gallery-listing"> | ||
<cms:set my_max_items_in_row = '5' /> | ||
<cms:set my_gallery_folder_count='0' /> | ||
<cms:set my_cur_folder_count='0' /> | ||
<cms:set my_page_num="<cms:gpc method='get' var='pg' default='1' />"/> | ||
|
||
<cms:capture into='my_gallery_items' > | ||
<cms:pages | ||
masterpage = k_template_name | ||
id = k_selected_pageids | ||
folder = k_selected_foldername | ||
orderby = k_selected_orderby | ||
order = k_selected_order | ||
custom_field = k_selected_custom_field | ||
paginate = '1' | ||
limit = k_selected_limit | ||
show_unpublished = '1' | ||
show_future_entries = '1' | ||
page_name = "<cms:if k_selected_exclude>NOT <cms:show k_selected_exclude /></cms:if>" | ||
base_link = k_route_link | ||
token = k_cur_token | ||
include_subfolders = '0' | ||
> | ||
<cms:capture into='my_gallery_items' > | ||
<cms:pages | ||
masterpage = k_template_name | ||
id = k_selected_pageids | ||
folder = k_selected_foldername | ||
orderby = k_selected_orderby | ||
order = k_selected_order | ||
custom_field = k_selected_custom_field | ||
paginate = '1' | ||
limit = k_selected_limit | ||
show_unpublished = '1' | ||
show_future_entries = '1' | ||
page_name = "<cms:if k_selected_exclude>NOT <cms:show k_selected_exclude /></cms:if>" | ||
base_link = k_route_link | ||
token = k_cur_token | ||
include_subfolders = '0' | ||
> | ||
|
||
<cms:no_results> | ||
<cms:capture into='my_folder_empty' > | ||
<cms:show_info> | ||
<h4><cms:localize 'folder_empty' /></h4> | ||
</cms:show_info> | ||
</cms:capture> | ||
</cms:no_results> | ||
<cms:no_results> | ||
<cms:capture into='my_folder_empty' > | ||
<cms:show_info> | ||
<h4><cms:localize 'folder_empty' /></h4> | ||
</cms:show_info> | ||
</cms:capture> | ||
</cms:no_results> | ||
|
||
<cms:render 'gallery_item' | ||
max_in_row = my_max_items_in_row | ||
current_pos = k_count | ||
start_from = my_gallery_folder_count | ||
/> | ||
<cms:render 'gallery_item' | ||
max_in_row = my_max_items_in_row | ||
current_pos = k_count | ||
start_from = my_gallery_folder_count | ||
/> | ||
|
||
<cms:if k_paginated_bottom > | ||
<cms:set my_paginator="<cms:render 'paginator' />" 'parent' /> | ||
<cms:if k_paginated_bottom > | ||
<cms:set my_paginator="<cms:render 'paginator' />" 'parent' /> | ||
|
||
<div style="clear:both;"></div> | ||
<div class="select_all"> | ||
<label> | ||
<cms:render 'list_checkbox' for_header='1' /> | ||
<strong><cms:localize 'select-deselect' /></strong> | ||
</label> | ||
</div> | ||
</cms:if> | ||
</cms:pages> | ||
</cms:capture> | ||
<div style="clear:both;"></div> | ||
<div class="select-all"> | ||
<cms:render 'list_checkbox' for_header='1' /> | ||
</div> | ||
</cms:if> | ||
</cms:pages> | ||
</cms:capture> | ||
|
||
<cms:show my_folder_empty /> | ||
<cms:show my_folder_empty /> | ||
|
||
<cms:if my_page_num='1' && "<cms:not k_selected_custom_field />"> | ||
<cms:folders | ||
childof=k_selected_foldername | ||
hierarchical='1' | ||
depth='1' | ||
orderby='weight'> | ||
<cms:if my_page_num='1' && "<cms:not k_selected_custom_field />"> | ||
<cms:folders | ||
childof=k_selected_foldername | ||
hierarchical='1' | ||
depth='1' | ||
orderby='weight'> | ||
|
||
<cms:set my_gallery_folder_count=k_total_folders scope='parent' /> | ||
<cms:incr my_cur_folder_count /> | ||
<cms:set my_gallery_folder_count=k_total_folders scope='parent' /> | ||
<cms:incr my_cur_folder_count /> | ||
|
||
<cms:render 'gallery_folder' | ||
max_in_row = my_max_items_in_row | ||
current_pos = my_cur_folder_count | ||
/> | ||
</cms:folders> | ||
</cms:if> | ||
<cms:render 'gallery_folder' | ||
max_in_row = my_max_items_in_row | ||
current_pos = my_cur_folder_count | ||
/> | ||
</cms:folders> | ||
</cms:if> | ||
|
||
|
||
<cms:show my_gallery_items /> | ||
</div> | ||
<cms:show my_gallery_items /> | ||
</div> | ||
|
||
<cms:render 'gallery_upload' /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters