From df4d30adc161abd7a15406c59727d4c1b8fcd1c3 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 28 May 2013 13:40:45 -0400 Subject: [PATCH 001/126] Make sure that tag links at the bottom of Docs go to the right place --- includes/addon-taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/addon-taxonomy.php b/includes/addon-taxonomy.php index 1aca3b57..f43fe06f 100644 --- a/includes/addon-taxonomy.php +++ b/includes/addon-taxonomy.php @@ -518,7 +518,7 @@ function bp_docs_get_tag_link( $args = array() ) { $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); - $item_docs_url = bp_docs_get_item_docs_link(); + $item_docs_url = bp_docs_get_archive_link(); $url = apply_filters( 'bp_docs_get_tag_link_url', add_query_arg( 'bpd_tag', urlencode( $tag ), $item_docs_url ), $args, $item_docs_url ); From b8186caca2f9e3078c1f0e9853d2e067218465be Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 28 May 2013 13:41:33 -0400 Subject: [PATCH 002/126] Readme --- readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.txt b/readme.txt index 7b8c4788..a001e219 100755 --- a/readme.txt +++ b/readme.txt @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.4.4 = +* Fixes incorrect tag directory links at the bottom of individual Docs + = 1.4.3 = * Fixes bug introduced in 1.4.2 that prevents certain sorts of Doc editing * Improved localization From 4e3684d71d978e1d1990f23d566f811beb4882ad Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 28 May 2013 13:54:29 -0400 Subject: [PATCH 003/126] Fixes CSS for row-actions in directories. Fixes #327 Props @dcavins --- includes/css/screen.css | 2 +- includes/scss/screen.scss | 4 ++-- readme.txt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index 87eb23eb..ee0b77bc 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable table tr:hover .row-actions{visibility:visible}.doctable table tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0}.entry-content #tags-list li{margin-left:0}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0}.entry-content #tags-list li{margin-left:0}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 98655818..5047005e 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -98,11 +98,11 @@ body.bp-docs div.page ul { margin: 0; } - table tr:hover .row-actions { + tr:hover .row-actions { visibility: visible; } - table tr:nth-child(even) { + tr:nth-child(even) { background-color: $grey; } } diff --git a/readme.txt b/readme.txt index a001e219..bf817aff 100755 --- a/readme.txt +++ b/readme.txt @@ -35,6 +35,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.4.4 = * Fixes incorrect tag directory links at the bottom of individual Docs +* Fixes CSS for hover actions in Docs directory = 1.4.3 = * Fixes bug introduced in 1.4.2 that prevents certain sorts of Doc editing From d0632b3a99d1bc17060461766543c2b5bd1a01bb Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 28 May 2013 21:10:32 -0400 Subject: [PATCH 004/126] When filtering by has-attachment, prevent the pre_get_posts filter from recursing Fixes #313 --- includes/attachments.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/attachments.php b/includes/attachments.php index 07423802..f71d1b35 100644 --- a/includes/attachments.php +++ b/includes/attachments.php @@ -376,6 +376,8 @@ public function filter_directory_posts( $query ) { return; } + remove_action( 'pre_get_posts', array( $this, 'filter_directory_posts' ) ); + $has_attachment = isset( $_REQUEST['has-attachment'] ) && in_array( $_REQUEST['has-attachment'], array( 'yes', 'no' ) ) ? $_REQUEST['has-attachment'] : ''; if ( $has_attachment ) { @@ -384,6 +386,8 @@ public function filter_directory_posts( $query ) { $query_arg = 'yes' === $has_attachment ? 'post__in' : 'post__not_in'; $query->set( $query_arg, array_merge( (array) $post__in, (array) $att_posts ) ); } + + add_action( 'pre_get_posts', array( $this, 'filter_directory_posts' ) ); } public function get_docs_with_attachments() { From 23a75685e5bad551842ad843f4f684804efe631f Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 28 May 2013 21:12:15 -0400 Subject: [PATCH 005/126] Readme update --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index bf817aff..71123fda 100755 --- a/readme.txt +++ b/readme.txt @@ -34,6 +34,7 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == = 1.4.4 = +* Fixes recursion problem that caused fatal errors when filtering by has-attachment on some setups * Fixes incorrect tag directory links at the bottom of individual Docs * Fixes CSS for hover actions in Docs directory From c5bd423012412a19603973a41ddcf476bb31dd05 Mon Sep 17 00:00:00 2001 From: Will McFarland Date: Fri, 14 Jun 2013 14:02:23 -0700 Subject: [PATCH 006/126] only call apache_setenv if it's available, fixes #318 --- includes/attachments.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/attachments.php b/includes/attachments.php index f71d1b35..0f7d9901 100644 --- a/includes/attachments.php +++ b/includes/attachments.php @@ -474,7 +474,9 @@ public static function filename_is_safe( $filename ) { */ public static function generate_headers( $filename ) { // Disable compression - @apache_setenv( 'no-gzip', 1 ); + if ( function_exists( 'apache_setenv' ) ) { + @apache_setenv( 'no-gzip', 1 ); + } @ini_set( 'zlib.output_compression', 'Off' ); // @todo Make this more configurable From bbb1f5c5de6eb01495e220cc1d9f1ba027bec365 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 18 Jun 2013 15:49:55 -0400 Subject: [PATCH 007/126] Readme update --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 71123fda..ef77652a 100755 --- a/readme.txt +++ b/readme.txt @@ -37,6 +37,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fixes recursion problem that caused fatal errors when filtering by has-attachment on some setups * Fixes incorrect tag directory links at the bottom of individual Docs * Fixes CSS for hover actions in Docs directory +* Fixes bug that may cause fatal errors when using private attachments on setups other than vanilla Apache = 1.4.3 = * Fixes bug introduced in 1.4.2 that prevents certain sorts of Doc editing From 83b4156f4875835f1af975fb0bad2bc6140ce8d4 Mon Sep 17 00:00:00 2001 From: Ptah Dunbar Date: Tue, 18 Jun 2013 18:45:17 +0200 Subject: [PATCH 008/126] Remove dependency with BuddyPress Activity. fixes #339 --- includes/component.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/component.php b/includes/component.php index 83f19824..756954f0 100644 --- a/includes/component.php +++ b/includes/component.php @@ -859,6 +859,10 @@ function post_activity( $query ) { * @param obj WP_Post object */ public function delete_doc_activity( $new_status, $old_status, $post ) { + if ( ! bp_is_active( 'activity' ) ) { + return; + } + if ( bp_docs_get_post_type_name() != $post->post_type ) { return; } From 34bf9e33bd428d08db0c72ec89f98ac0298c2212 Mon Sep 17 00:00:00 2001 From: Ptah Dunbar Date: Tue, 18 Jun 2013 18:52:56 +0200 Subject: [PATCH 009/126] Remove dependency with BuddyPress Groups. --- includes/access-query.php | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/includes/access-query.php b/includes/access-query.php index 06d25414..01931559 100644 --- a/includes/access-query.php +++ b/includes/access-query.php @@ -31,17 +31,23 @@ protected function set_up_levels() { // For now this kind of check is up to whoever's instantiating if ( $this->user_id != 0 ) { $levels[] = bp_docs_get_access_term_loggedin(); - - $this->set_up_user_groups(); - - // group-members - foreach ( $this->user_groups['groups'] as $member_group ) { - $this->levels[] = bp_docs_get_access_term_group_member( $member_group ); - } - - // admins-mods - foreach ( $this->user_groups['admin_mod_of'] as $adminmod_group ) { - $this->levels[] = bp_docs_get_access_term_group_adminmod( $adminmod_group ); + + if ( bp_is_active('groups') ) { + + $this->set_up_user_groups(); + + if ( isset($this->user_groups['groups']) ) { + foreach ( $this->user_groups['groups'] as $member_group ) { + $this->levels[] = bp_docs_get_access_term_group_member( $member_group ); + } + } + + // admins-mods + if ( isset($this->user_groups['admin_mod_of']) ) { + foreach ( $this->user_groups['admin_mod_of'] as $adminmod_group ) { + $this->levels[] = bp_docs_get_access_term_group_adminmod( $adminmod_group ); + } + } } // no-one From 3681b5f3c92f9d488ef7834cf7930cb9b404035a Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 18 Jun 2013 15:54:52 -0400 Subject: [PATCH 010/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index ef77652a..36fe140d 100755 --- a/readme.txt +++ b/readme.txt @@ -38,6 +38,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fixes incorrect tag directory links at the bottom of individual Docs * Fixes CSS for hover actions in Docs directory * Fixes bug that may cause fatal errors when using private attachments on setups other than vanilla Apache +* Removes incidental dependencies on Activity and Groups components = 1.4.3 = * Fixes bug introduced in 1.4.2 that prevents certain sorts of Doc editing From 0c440f63fcc69be18cc9a8f72c761dc46aec6f55 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 18 Jun 2013 16:07:07 -0400 Subject: [PATCH 011/126] Make the buddypress-docs directory slug customizable Fixes #341 Props @ptahdunbar --- bp-docs.php | 6 +++++- includes/attachments.php | 4 ++-- includes/component.php | 14 +++++++------- includes/templatetags-edit.php | 6 +++--- includes/templatetags.php | 2 +- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/bp-docs.php b/bp-docs.php index 284ac990..25d1a991 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -168,9 +168,13 @@ function loaded() { * @since 1.0-beta */ function load_constants() { + if ( ! defined( 'BP_DOCS_PLUGIN_SLUG' ) ) { + define( 'BP_DOCS_PLUGIN_SLUG', 'buddypress-docs' ); + } + // You should never really need to override this bad boy if ( !defined( 'BP_DOCS_INSTALL_PATH' ) ) - define( 'BP_DOCS_INSTALL_PATH', WP_PLUGIN_DIR . '/buddypress-docs/' ); + define( 'BP_DOCS_INSTALL_PATH', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . BP_DOCS_PLUGIN_SLUG . DIRECTORY_SEPARATOR ); // Ditto if ( !defined( 'BP_DOCS_INCLUDES_PATH' ) ) diff --git a/includes/attachments.php b/includes/attachments.php index 0f7d9901..197e0b7e 100644 --- a/includes/attachments.php +++ b/includes/attachments.php @@ -336,7 +336,7 @@ function mod_upload_dir( $uploads ) { function enqueue_scripts() { if ( bp_docs_is_doc_edit() || bp_docs_is_doc_create() ) { - wp_enqueue_script( 'bp-docs-attachments', plugins_url( 'buddypress-docs/includes/js/attachments.js' ), array( 'media-editor', 'media-views' ), false, true ); + wp_enqueue_script( 'bp-docs-attachments', plugins_url( BP_DOCS_PLUGIN_SLUG . '/includes/js/attachments.js' ), array( 'media-editor', 'media-views' ), false, true ); } } @@ -506,7 +506,7 @@ public static function icon_dir( $dir ) { public static function icon_dir_uri( $url ) { if ( bp_docs_is_docs_component() ) { - $url = plugins_url( 'buddypress-docs/lib/nuvola' ); + $url = plugins_url( BP_DOCS_PLUGIN_SLUG . '/lib/nuvola' ); } return $url; } diff --git a/includes/component.php b/includes/component.php index 756954f0..62a578e6 100644 --- a/includes/component.php +++ b/includes/component.php @@ -862,7 +862,7 @@ public function delete_doc_activity( $new_status, $old_status, $post ) { if ( ! bp_is_active( 'activity' ) ) { return; } - + if ( bp_docs_get_post_type_name() != $post->post_type ) { return; } @@ -989,7 +989,7 @@ function remove_edit_lock() { * @since 1.0-beta */ function set_includes_url() { - $this->includes_url = plugins_url() . '/buddypress-docs/includes/'; + $this->includes_url = plugins_url() . BP_DOCS_PLUGIN_SLUG . '/includes/'; } /** @@ -1063,7 +1063,7 @@ public static function filter_markup() { * @since 1.0-beta */ function enqueue_scripts() { - wp_register_script( 'bp-docs-js', plugins_url( 'buddypress-docs/includes/js/bp-docs.js' ), array( 'jquery' ) ); + wp_register_script( 'bp-docs-js', plugins_url( BP_DOCS_PLUGIN_SLUG . '/includes/js/bp-docs.js' ), array( 'jquery' ) ); // This is for edit/create scripts if ( bp_docs_is_doc_edit() @@ -1080,19 +1080,19 @@ function enqueue_scripts() { wp_enqueue_script( 'editor' ); wp_enqueue_script( 'utils' ); - wp_register_script( 'bp-docs-idle-js', plugins_url( 'buddypress-docs/includes/js/idle.js' ), array( 'jquery', 'bp-docs-js' ) ); + wp_register_script( 'bp-docs-idle-js', plugins_url( BP_DOCS_PLUGIN_SLUG . '/includes/js/idle.js' ), array( 'jquery', 'bp-docs-js' ) ); wp_enqueue_script( 'bp-docs-idle-js' ); - wp_register_script( 'jquery-colorbox', plugins_url( 'buddypress-docs/lib/js/colorbox/jquery.colorbox-min.js' ), array( 'jquery' ) ); + wp_register_script( 'jquery-colorbox', plugins_url( BP_DOCS_PLUGIN_SLUG . '/lib/js/colorbox/jquery.colorbox-min.js' ), array( 'jquery' ) ); wp_enqueue_script( 'jquery-colorbox' ); // Edit mode requires bp-docs-js to be dependent on TinyMCE, so we must // reregister bp-docs-js with the correct dependencies wp_deregister_script( 'bp-docs-js' ); - wp_register_script( 'bp-docs-js', plugins_url( 'buddypress-docs/includes/js/bp-docs.js' ), array( 'jquery', 'editor' ) ); + wp_register_script( 'bp-docs-js', plugins_url( BP_DOCS_PLUGIN_SLUG . '/includes/js/bp-docs.js' ), array( 'jquery', 'editor' ) ); wp_register_script( 'word-counter', site_url() . '/wp-admin/js/word-count.js', array( 'jquery' ) ); - wp_enqueue_script( 'bp-docs-edit-validation', plugins_url( 'buddypress-docs/includes/js/edit-validation.js' ), array( 'jquery' ) ); + wp_enqueue_script( 'bp-docs-edit-validation', plugins_url( BP_DOCS_PLUGIN_SLUG . '/includes/js/edit-validation.js' ), array( 'jquery' ) ); } // Only load our JS on the right sorts of pages. Generous to account for diff --git a/includes/templatetags-edit.php b/includes/templatetags-edit.php index d4700642..52897fed 100644 --- a/includes/templatetags-edit.php +++ b/includes/templatetags-edit.php @@ -238,9 +238,9 @@ function(ed) { */ function bp_docs_add_external_tinymce_plugins( $plugins ) { if ( bp_docs_is_bp_docs_page() ) { - $plugins['table'] = WP_PLUGIN_URL . '/buddypress-docs/lib/js/tinymce/plugins/table/editor_plugin.js'; - $plugins['tabindent'] = WP_PLUGIN_URL . '/buddypress-docs/lib/js/tinymce/plugins/tabindent/editor_plugin.js'; - $plugins['print'] = WP_PLUGIN_URL . '/buddypress-docs/lib/js/tinymce/plugins/print/editor_plugin.js'; + $plugins['table'] = WP_PLUGIN_URL . '/'. BP_DOCS_PLUGIN_SLUG . '/lib/js/tinymce/plugins/table/editor_plugin.js'; + $plugins['tabindent'] = WP_PLUGIN_URL . '/'. BP_DOCS_PLUGIN_SLUG . '/lib/js/tinymce/plugins/tabindent/editor_plugin.js'; + $plugins['print'] = WP_PLUGIN_URL . '/'. BP_DOCS_PLUGIN_SLUG . '/lib/js/tinymce/plugins/print/editor_plugin.js'; } return $plugins; diff --git a/includes/templatetags.php b/includes/templatetags.php index 7906777c..51934feb 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -1856,7 +1856,7 @@ function bp_docs_attachment_icon() { return; } - $pc = plugins_url( 'buddypress-docs/includes/images/paperclip.png' ); + $pc = plugins_url( BP_DOCS_PLUGIN_SLUG . '/includes/images/paperclip.png' ); $html = ''; From b043d1568f587fc7c0b6039ae8a66e032305d766 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 18 Jun 2013 16:08:00 -0400 Subject: [PATCH 012/126] Updates readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 36fe140d..6e395958 100755 --- a/readme.txt +++ b/readme.txt @@ -39,6 +39,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fixes CSS for hover actions in Docs directory * Fixes bug that may cause fatal errors when using private attachments on setups other than vanilla Apache * Removes incidental dependencies on Activity and Groups components +* Makes the plugin dir slug customizable = 1.4.3 = * Fixes bug introduced in 1.4.2 that prevents certain sorts of Doc editing From b1340c61530353fe96a97fe84d52c2bf55cb89b1 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 18 Jun 2013 16:12:03 -0400 Subject: [PATCH 013/126] Fixes asset includes_url --- includes/component.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/component.php b/includes/component.php index 62a578e6..19d20fe9 100644 --- a/includes/component.php +++ b/includes/component.php @@ -989,7 +989,7 @@ function remove_edit_lock() { * @since 1.0-beta */ function set_includes_url() { - $this->includes_url = plugins_url() . BP_DOCS_PLUGIN_SLUG . '/includes/'; + $this->includes_url = plugins_url() . '/' . BP_DOCS_PLUGIN_SLUG . '/includes/'; } /** From 0260803bc40b396da244e83b7aca60c9ce1a3619 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 18 Jun 2013 16:14:51 -0400 Subject: [PATCH 014/126] Bumps version numbers to 1.4.4 --- loader.php | 4 ++-- readme.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/loader.php b/loader.php index 28ff9ed8..4669a024 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.4.3 +Version: 1.4.4 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.4.3' ); +define( 'BP_DOCS_VERSION', '1.4.4' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index 6e395958..7805e895 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: boonebgorges, cuny-academic-commons Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 -Tested up to: WordPress 3.5.1, BuddyPress 1.7.2 -Stable tag: 1.4.3 +Tested up to: WordPress 3.5.1, BuddyPress 1.8 +Stable tag: 1.4.4 Adds collaborative Docs to BuddyPress. From e896c3ded7a165967706e900e59c129c96c72c89 Mon Sep 17 00:00:00 2001 From: Will McFarland Date: Mon, 8 Jul 2013 13:26:04 -0700 Subject: [PATCH 015/126] logged-in access level was not being set properly --- includes/access-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/access-query.php b/includes/access-query.php index 01931559..9fa012ec 100644 --- a/includes/access-query.php +++ b/includes/access-query.php @@ -30,7 +30,7 @@ protected function set_up_levels() { // Note that we're not verifying that the user actually exists // For now this kind of check is up to whoever's instantiating if ( $this->user_id != 0 ) { - $levels[] = bp_docs_get_access_term_loggedin(); + $this->levels[] = bp_docs_get_access_term_loggedin(); if ( bp_is_active('groups') ) { From 9112e49fbcde106068d757e3df79ea339db854a7 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 9 Jul 2013 13:55:35 -0400 Subject: [PATCH 016/126] Readme --- readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.txt b/readme.txt index 7805e895..5c5aba44 100755 --- a/readme.txt +++ b/readme.txt @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.4.5 = +* Fixes bug in access filter for "logged-in users" setting + = 1.4.4 = * Fixes recursion problem that caused fatal errors when filtering by has-attachment on some setups * Fixes incorrect tag directory links at the bottom of individual Docs From db156607d8416290f725e11016c88138d9138c03 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 17 Jul 2013 13:43:02 -0400 Subject: [PATCH 017/126] Don't stripslashes() on post content This is already done by wp_update_post(), and doing it twice means breaking LaTeX plugins. See cuny-academic-commons/commons-in-a-box#81 --- includes/query-builder.php | 2 +- readme.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/query-builder.php b/includes/query-builder.php index 610d4579..16e252a2 100644 --- a/includes/query-builder.php +++ b/includes/query-builder.php @@ -437,7 +437,7 @@ function save( $args = false ) { 'post_type' => $this->post_type_name, 'post_title' => $_POST['doc']['title'], 'post_name' => isset( $_POST['doc']['permalink'] ) ? sanitize_title( $_POST['doc']['permalink'] ) : sanitize_title( $_POST['doc']['title'] ), - 'post_content' => stripslashes( sanitize_post_field( 'post_content', $doc_content, 0, 'db' ) ), + 'post_content' => sanitize_post_field( 'post_content', $doc_content, 0, 'db' ), 'post_status' => 'publish' ); diff --git a/readme.txt b/readme.txt index 5c5aba44..f715c99f 100755 --- a/readme.txt +++ b/readme.txt @@ -35,6 +35,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.4.5 = * Fixes bug in access filter for "logged-in users" setting +* Removes stripslashes() on post content, which was causing problems with LaTeX plugins = 1.4.4 = * Fixes recursion problem that caused fatal errors when filtering by has-attachment on some setups From 5caaee85522197d565a50635cfd18c2cc43a0635 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 17 Jul 2013 13:45:34 -0400 Subject: [PATCH 018/126] Bumps version numbers to 1.4.5 --- loader.php | 4 ++-- readme.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/loader.php b/loader.php index 4669a024..624157f1 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.4.4 +Version: 1.4.5 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.4.4' ); +define( 'BP_DOCS_VERSION', '1.4.5' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index f715c99f..5ebe31ab 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 Tested up to: WordPress 3.5.1, BuddyPress 1.8 -Stable tag: 1.4.4 +Stable tag: 1.4.5 Adds collaborative Docs to BuddyPress. From 7567d89a24e5b8c22b5c827fc24fc8a89d6deb62 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 23 Jul 2013 14:07:06 -0400 Subject: [PATCH 019/126] PHP 5.4+ strict standards fixes --- bp-docs.php | 22 +++++++++++----------- includes/access-query.php | 8 ++++---- includes/addon-hierarchy.php | 20 ++++++++++---------- includes/addon-wikitext.php | 13 +++++++------ includes/component.php | 6 +++--- includes/integration-groups.php | 8 ++++---- 6 files changed, 39 insertions(+), 38 deletions(-) diff --git a/bp-docs.php b/bp-docs.php index 25d1a991..b16aa682 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -4,16 +4,6 @@ class BP_Docs { var $post_type_name; var $associated_item_tax_name; - /** - * PHP 4 constructor - * - * @package BuddyPress Docs - * @since 1.0-beta - */ - function bp_docs() { - $this->__construct(); - } - /** * PHP 5 constructor * @@ -64,6 +54,16 @@ function __construct() { add_action( 'admin_init', array( $this, 'flush_rewrite_rules' ) ); } + /** + * PHP 4 constructor + * + * @package BuddyPress Docs + * @since 1.0-beta + */ + function bp_docs() { + $this->__construct(); + } + /** * Loads the textdomain for the plugin * @@ -341,7 +341,7 @@ function load_doc_extras() { // Don't load the History component if post revisions are disabled if ( defined( 'WP_POST_REVISIONS' ) && WP_POST_REVISIONS ) { require_once( BP_DOCS_INCLUDES_PATH . 'addon-history.php' ); - $this->history =& new BP_Docs_History; + $this->history = new BP_Docs_History; } // Load the wikitext addon diff --git a/includes/access-query.php b/includes/access-query.php index 9fa012ec..b9e7dfed 100644 --- a/includes/access-query.php +++ b/includes/access-query.php @@ -6,7 +6,7 @@ class BP_Docs_Access_Query { protected $user_groups = array(); protected $levels = array(); - public function init( $user_id = 0 ) { + public static function init( $user_id = 0 ) { static $instance; if ( empty( $instance ) ) { @@ -31,17 +31,17 @@ protected function set_up_levels() { // For now this kind of check is up to whoever's instantiating if ( $this->user_id != 0 ) { $this->levels[] = bp_docs_get_access_term_loggedin(); - + if ( bp_is_active('groups') ) { $this->set_up_user_groups(); - + if ( isset($this->user_groups['groups']) ) { foreach ( $this->user_groups['groups'] as $member_group ) { $this->levels[] = bp_docs_get_access_term_group_member( $member_group ); } } - + // admins-mods if ( isset($this->user_groups['admin_mod_of']) ) { foreach ( $this->user_groups['admin_mod_of'] as $adminmod_group ) { diff --git a/includes/addon-hierarchy.php b/includes/addon-hierarchy.php index 12ee353c..b7f10f72 100644 --- a/includes/addon-hierarchy.php +++ b/includes/addon-hierarchy.php @@ -11,16 +11,6 @@ class BP_Docs_Hierarchy { var $parent; var $children; - /** - * PHP 4 constructor - * - * @package BuddyPress Docs - * @since 1.0-beta - */ - function bp_docs_hierarchy() { - $this->__construct(); - } - /** * PHP 5 constructor * @@ -41,6 +31,16 @@ function __construct() { add_action( 'bp_docs_single_doc_meta', array( $this, 'show_children' ) ); } + /** + * PHP 4 constructor + * + * @package BuddyPress Docs + * @since 1.0-beta + */ + function bp_docs_hierarchy() { + $this->__construct(); + } + /** * Registers the post taxonomies with the bp_docs post type * diff --git a/includes/addon-wikitext.php b/includes/addon-wikitext.php index 75e1d018..c9860d34 100644 --- a/includes/addon-wikitext.php +++ b/includes/addon-wikitext.php @@ -1,24 +1,25 @@ __construct(); + function __construct() { + add_filter( 'the_content', array( $this, 'bracket_links' ) ); } /** - * PHP 5 constructor + * PHP 4 constructor * * @package BuddyPress Docs * @since 1.2 */ - function __construct() { - add_filter( 'the_content', array( $this, 'bracket_links' ) ); + function bp_docs_wikitext() { + $this->__construct(); } /** diff --git a/includes/component.php b/includes/component.php index 19d20fe9..9186e966 100644 --- a/includes/component.php +++ b/includes/component.php @@ -145,7 +145,7 @@ function setup_hooks() { * @see BP_Docs_Component::enqueue_scripts() * @see BP_Docs_Component::enqueue_styles() */ - function setup_globals() { + function setup_globals( $args = array() ) { global $bp_docs; // Set up the $globals array to be passed along to parent::setup_globals() @@ -180,7 +180,7 @@ function setup_globals() { * * @since 1.3 */ - public function setup_admin_bar() { + public function setup_admin_bar( $wp_admin_nav = array() ) { global $bp; $wp_admin_nav = array(); @@ -290,7 +290,7 @@ function set_current_view( $item_type = false ) { * @since 1.2 * @todo Make the 'Docs' label customizable by the admin */ - function setup_nav() { + function setup_nav( $main_nav = array(), $sub_nav = array() ) { $main_nav = array( 'name' => __( 'Docs', 'bp-docs' ), diff --git a/includes/integration-groups.php b/includes/integration-groups.php index b2064b29..8b84d39c 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -949,7 +949,7 @@ function enable_at_group_creation( $group_id ) { * @package BuddyPress Docs * @since 1.0-beta */ - function create_screen() { + function create_screen( $group_id = null ) { if ( !bp_is_group_creation_step( $this->slug ) ) return false; @@ -965,7 +965,7 @@ function create_screen() { * @since 1.0-beta */ - function create_screen_save() { + function create_screen_save( $group_id = null ) { global $bp; check_admin_referer( 'groups_create_save_' . $this->slug ); @@ -979,7 +979,7 @@ function create_screen_save() { * @package BuddyPress Docs * @since 1.0-beta */ - function edit_screen() { + function edit_screen( $group_id = null ) { if ( !bp_is_group_admin_screen( $this->slug ) ) return false; @@ -1001,7 +1001,7 @@ function edit_screen() { * @package BuddyPress Docs * @since 1.0-beta */ - function edit_screen_save() { + function edit_screen_save( $group_id = null ) { global $bp; if ( !isset( $_POST['save'] ) ) From a846e13ba2dce2aa1c2fce0b9f80a837b15f2150 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 23 Jul 2013 14:07:47 -0400 Subject: [PATCH 020/126] Readme --- readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.txt b/readme.txt index 5ebe31ab..c8b4859b 100755 --- a/readme.txt +++ b/readme.txt @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.4.6 = +* Improved compatibility with PHP 5.4+ + = 1.4.5 = * Fixes bug in access filter for "logged-in users" setting * Removes stripslashes() on post content, which was causing problems with LaTeX plugins From b910bf14b91fe56b1e19598a0b14f6c23b9c1585 Mon Sep 17 00:00:00 2001 From: r-a-y Date: Wed, 21 Aug 2013 20:14:29 -0700 Subject: [PATCH 021/126] Pass $query object to 'bp_docs_activity_args' filter for better customization for plugin devs. --- includes/component.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/component.php b/includes/component.php index 9186e966..d506c464 100644 --- a/includes/component.php +++ b/includes/component.php @@ -840,7 +840,7 @@ function post_activity( $query ) { do_action( 'bp_docs_before_activity_save', $args ); - $activity_id = bp_activity_add( apply_filters( 'bp_docs_activity_args', $args ) ); + $activity_id = bp_activity_add( apply_filters( 'bp_docs_activity_args', $args, $query ) ); do_action( 'bp_docs_after_activity_save', $activity_id, $args ); From 3d27e3a0e8e97b49aed801c2e9aa28c149d9edeb Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 22 Aug 2013 14:19:43 -0400 Subject: [PATCH 022/126] Improve the method used to determine associated group when rewriting activity action This is a more generalized version of r-a-y/buddypress-docs@8ec8f03d1b816af601c2f0949c45d224880a4c02 See #353 --- includes/integration-groups.php | 7 +++++-- readme.txt | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index 8b84d39c..b698142b 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -497,8 +497,11 @@ public static function user_can_associate_doc_with_group( $user_id, $group_id ) * @return str $action The filtered action text */ function activity_action( $action, $user_link, $doc_link, $is_new_doc, $query ) { - if ( $query->item_type == 'group' ) { - $group = groups_get_group( array( 'group_id' => $query->item_id ) ); + $doc_id = isset( $query->doc_id ) ? (int) $query->doc_id : 0; + $group_id = bp_docs_get_associated_group_id( $doc_id ); + + if ( $group_id ) { + $group = groups_get_group( array( 'group_id' => $group_id ) ); $group_url = bp_get_group_permalink( $group ); $group_link = '' . $group->name . ''; diff --git a/readme.txt b/readme.txt index c8b4859b..6d024fab 100755 --- a/readme.txt +++ b/readme.txt @@ -35,6 +35,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.4.6 = * Improved compatibility with PHP 5.4+ +* Fix bug that prevented the activity action from being modified for the associated group = 1.4.5 = * Fixes bug in access filter for "logged-in users" setting From 203d4efaa493bf7c6ca6a21f4b691c96e715cc30 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 22 Aug 2013 15:05:09 -0400 Subject: [PATCH 023/126] Modify activity args when posting a group-associated doc This is necessary to ensure that the edits show up in the group activity stream. Note that this method will not work correctly when associating with multiple docs. More research is needed. Note also that this change means that we can't depend on the doc id being the doc. This is bound to cause problems when using the activity stream in advanced ways, but there is no good alternative at this point. Based on an original implementation by @r-a-y in r-a-y/buddypress-docs@88841ea1f12399ea79184bf5398d59ca29329584 See #353 --- includes/integration-groups.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index b698142b..8f744eba 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -53,6 +53,7 @@ function __construct() { // Filter the activity actions for group docs-related activity add_filter( 'bp_docs_activity_action', array( $this, 'activity_action' ), 10, 5 ); + add_filter( 'bp_docs_activity_args', array( $this, 'activity_args' ), 10, 2 ); add_filter( 'bp_docs_comment_activity_action', array( $this, 'comment_activity_action' ), 10, 5 ); // Filter the activity hide_sitewide parameter to respect group privacy levels @@ -515,6 +516,29 @@ function activity_action( $action, $user_link, $doc_link, $is_new_doc, $query ) return $action; } + /** + * Modify activity arguments before saving so newly-created group docs are + * added into the group activity stream. + * + * @since 1.4.6 + * + * @param array $args Activity arguments + * @param obj $query The BP Docs query object + * @return array + */ + public function activity_args( $args, $query ) { + global $bp; + + $doc_id = isset( $query->doc_id ) ? (int) $query->doc_id : 0; + $group_id = bp_docs_get_associated_group_id( $doc_id ); + + if ( ! empty( $group_id ) ) { + $args['component'] = $bp->groups->id; + $args['item_id'] = $group_id; + } + + return $args; + } /** * Filters the activity action of 'new doc comment' activity to include the group name From fe562131188d610c1fdb33283002521b608ef774 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 22 Aug 2013 15:08:56 -0400 Subject: [PATCH 024/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 6d024fab..68b7107b 100755 --- a/readme.txt +++ b/readme.txt @@ -36,6 +36,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.4.6 = * Improved compatibility with PHP 5.4+ * Fix bug that prevented the activity action from being modified for the associated group +* Fix bug that prevented activity from appearing in group activity streams = 1.4.5 = * Fixes bug in access filter for "logged-in users" setting From c100dc1a3d4800502a1bd72a5b2c33b0f9374208 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 27 Aug 2013 22:39:05 -0400 Subject: [PATCH 025/126] Clear up referer when adding upload_files cap The trick used to dynamically add the upload_files cap for non-admin users involves checking to make sure that we're on an Docs create/edit page by checking $_SERVER['HTTP_REFERER']. (It's necessary to check the referer because the actual check happens on an async call to async-upload.php.) However, when creating a Doc from the context of a group, an additional URL param is added to HTTP_REFERER, with the result that the $referer == create_url check fails. I've fixed the issue by doing some cleanup on the referer before doing the necessary comparisons. In particular, all URL params are now being stripped. A note that this will break things if at some future point the plugin becomes compatibile with non-pretty-permalink setups. Fixes #355 --- includes/attachments.php | 12 ++++++++++-- readme.txt | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/includes/attachments.php b/includes/attachments.php index 197e0b7e..903398d2 100644 --- a/includes/attachments.php +++ b/includes/attachments.php @@ -570,8 +570,16 @@ public static function map_meta_cap( $caps, $cap, $user_id, $args ) { $is_ajax = isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD'] && 'async-upload.php' === substr( $_SERVER['REQUEST_URI'], strrpos( $_SERVER['REQUEST_URI'], '/' ) + 1 ); if ( $is_ajax ) { + // Clean up referer + $referer = $_SERVER['HTTP_REFERER']; + $qp = strpos( $referer, '?' ); + if ( false !== $qp ) { + $referer = substr( $referer, 0, $qp ); + } + $referer = trailingslashit( $referer ); + // Existing Doc - $item_id = self::get_doc_id_from_url( $_SERVER['HTTP_REFERER'] ); + $item_id = self::get_doc_id_from_url( $referer ); if ( $item_id ) { $item = get_post( $item_id ); $is_doc = bp_docs_get_post_type_name() === $item->post_type; @@ -579,7 +587,7 @@ public static function map_meta_cap( $caps, $cap, $user_id, $args ) { // Create Doc if ( ! $is_doc ) { - $is_doc = $_SERVER['HTTP_REFERER'] === bp_docs_get_create_link(); + $is_doc = $referer === bp_docs_get_create_link(); } } else { $is_doc = bp_docs_is_existing_doc() || bp_docs_is_doc_create(); diff --git a/readme.txt b/readme.txt index 68b7107b..2ec57a63 100755 --- a/readme.txt +++ b/readme.txt @@ -37,6 +37,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Improved compatibility with PHP 5.4+ * Fix bug that prevented the activity action from being modified for the associated group * Fix bug that prevented activity from appearing in group activity streams +* Fix bug that prevented attachment uploads on group Doc creation pages = 1.4.5 = * Fixes bug in access filter for "logged-in users" setting From 9cfbd7990ed794cc6454b5f735f93348f90787ca Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 3 Sep 2013 16:17:01 -0400 Subject: [PATCH 026/126] Fixes textdomains from 'buddypress' to 'bp-docs' Props patloq on wordpress.org See http://wordpress.org/support/topic/minor-translation-issue#post-4608405 --- includes/theme-bridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/theme-bridge.php b/includes/theme-bridge.php index 99db1310..0d69ce4c 100644 --- a/includes/theme-bridge.php +++ b/includes/theme-bridge.php @@ -162,7 +162,7 @@ function query_templates( $templates ) { public function directory_dummy_post() { bp_theme_compat_reset_post( array( 'ID' => 0, - 'post_title' => __( 'Docs Directory', 'buddypress' ), + 'post_title' => __( 'Docs Directory', 'bp-docs' ), 'post_author' => 0, 'post_date' => 0, 'post_content' => '', @@ -220,7 +220,7 @@ public function single_content() { public function create_dummy_post() { bp_theme_compat_reset_post( array( 'ID' => 0, - 'post_title' => __( 'Create a Doc', 'buddypress' ), + 'post_title' => __( 'Create a Doc', 'bp-docs' ), 'post_author' => 0, 'post_date' => 0, 'post_content' => '', From 47207e9b14d6706f030f4272813430021740dbe3 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 3 Sep 2013 16:18:14 -0400 Subject: [PATCH 027/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 2ec57a63..f0a427e9 100755 --- a/readme.txt +++ b/readme.txt @@ -38,6 +38,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented the activity action from being modified for the associated group * Fix bug that prevented activity from appearing in group activity streams * Fix bug that prevented attachment uploads on group Doc creation pages +* Fix some textdomain errors = 1.4.5 = * Fixes bug in access filter for "logged-in users" setting From edb8f8d89208817f07c2446447d8d638808b3c19 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 3 Sep 2013 18:40:26 -0400 Subject: [PATCH 028/126] Allow empty content field when creating/editing Fixes #358. Fixes #356 Props @dcavins --- includes/query-builder.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/query-builder.php b/includes/query-builder.php index 16e252a2..eb851c67 100644 --- a/includes/query-builder.php +++ b/includes/query-builder.php @@ -427,12 +427,11 @@ function save( $args = false ) { } } - if ( empty( $_POST['doc']['title'] ) || empty( $doc_content ) ) { - // Both the title and the content fields are required - $result['message'] = __( 'Both the title and the content fields are required.', 'bp-docs' ); - $result['redirect'] = $this->current_view; + if ( empty( $_POST['doc']['title'] ) ) { + // The title field is required + $result['message'] = __( 'The title field is required.', 'bp-docs' ); + $result['redirect'] = ! empty( $this->doc_slug ) ? 'edit' : 'create'; } else { - // If both the title and content fields are filled in, we can proceed $defaults = array( 'post_type' => $this->post_type_name, 'post_title' => $_POST['doc']['title'], From 6ce0eb5c9530896cf32294af4f19125ca84d4cb0 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 3 Sep 2013 18:41:45 -0400 Subject: [PATCH 029/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index f0a427e9..cc9c3cf8 100755 --- a/readme.txt +++ b/readme.txt @@ -39,6 +39,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented activity from appearing in group activity streams * Fix bug that prevented attachment uploads on group Doc creation pages * Fix some textdomain errors +* Allow Docs with empty content field = 1.4.5 = * Fixes bug in access filter for "logged-in users" setting From 83576102810ecc59cda0fd667610b4af08309c67 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 3 Sep 2013 20:57:13 -0400 Subject: [PATCH 030/126] Use bp_docs_get_docs_slug() instead of constant throughout In order to have a reliably customizable slug, it's inefficient to reference the constant directly. Instead, use bp_docs_get_docs_slug(). See #346 --- bp-docs.php | 14 ++++++------- includes/component.php | 20 +++++++++--------- includes/functions.php | 2 +- includes/integration-groups.php | 7 ++++--- includes/integration-users.php | 8 ++++---- includes/query-builder.php | 2 +- includes/templates/docs/single/edit.php | 2 +- includes/templatetags.php | 27 ++++++++++++++++++++++++- 8 files changed, 54 insertions(+), 28 deletions(-) diff --git a/bp-docs.php b/bp-docs.php index b16aa682..cd1bec4d 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -282,7 +282,7 @@ function register_post_type() { 'query_var' => false, 'has_archive' => true, 'rewrite' => array( - 'slug' => bp_docs_get_slug(), + 'slug' => bp_docs_get_docs_slug(), 'with_front' => false ) ) ); @@ -376,11 +376,11 @@ function generate_rewrite_rules( $wp_rewrite ) { */ // Create - BP_DOCS_SLUG . '/' . BP_DOCS_CREATE_SLUG . '/?$' => + bp_docs_get_docs_slug() . '/' . BP_DOCS_CREATE_SLUG . '/?$' => 'index.php?post_type=' . $this->post_type_name . '&name=' . $wp_rewrite->preg_index( 1 ) . '&' . BP_DOCS_CREATE_SLUG . '=1', // My Groups - BP_DOCS_SLUG . '/' . BP_DOCS_MY_GROUPS_SLUG . '/?$' => + bp_docs_get_docs_slug() . '/' . BP_DOCS_MY_GROUPS_SLUG . '/?$' => 'index.php?post_type=' . $this->post_type_name . '&name=' . $wp_rewrite->preg_index( 1 ) . '&' . BP_DOCS_MY_GROUPS_SLUG . '=1', /** @@ -388,15 +388,15 @@ function generate_rewrite_rules( $wp_rewrite ) { */ // Edit - BP_DOCS_SLUG . '/([^/]+)/' . BP_DOCS_EDIT_SLUG . '/?$' => + bp_docs_get_docs_slug() . '/([^/]+)/' . BP_DOCS_EDIT_SLUG . '/?$' => 'index.php?post_type=' . $this->post_type_name . '&name=' . $wp_rewrite->preg_index( 1 ) . '&' . BP_DOCS_EDIT_SLUG . '=1', // History - BP_DOCS_SLUG . '/([^/]+)/' . BP_DOCS_HISTORY_SLUG . '/?$' => + bp_docs_get_docs_slug() . '/([^/]+)/' . BP_DOCS_HISTORY_SLUG . '/?$' => 'index.php?post_type=' . $this->post_type_name . '&name=' . $wp_rewrite->preg_index( 1 ) . '&' . BP_DOCS_HISTORY_SLUG . '=1', // Delete - BP_DOCS_SLUG . '/([^/]+)/' . BP_DOCS_DELETE_SLUG . '/?$' => + bp_docs_get_docs_slug() . '/([^/]+)/' . BP_DOCS_DELETE_SLUG . '/?$' => 'index.php?post_type=' . $this->post_type_name . '&name=' . $wp_rewrite->preg_index( 1 ) . '&' . BP_DOCS_HISTORY_SLUG . '=1' @@ -522,7 +522,7 @@ function flush_rewrite_rules() { // Check to see whether our rules have been registered yet, by // finding a Docs rule and then comparing it to the registered rules foreach ( $wp_rewrite->extra_rules_top as $rewrite => $rule ) { - if ( 0 === strpos( $rewrite, bp_docs_get_slug() ) ) { + if ( 0 === strpos( $rewrite, bp_docs_get_docs_slug() ) ) { $test_rule = $rule; } } diff --git a/includes/component.php b/includes/component.php index d506c464..5b07cc46 100644 --- a/includes/component.php +++ b/includes/component.php @@ -150,8 +150,8 @@ function setup_globals( $args = array() ) { // Set up the $globals array to be passed along to parent::setup_globals() $globals = array( - 'slug' => BP_DOCS_SLUG, - 'root_slug' => isset( $bp->pages->{$this->id}->slug ) ? $bp->pages->{$this->id}->slug : BP_DOCS_SLUG, + 'slug' => bp_docs_get_docs_slug(), + 'root_slug' => isset( $bp->pages->{$this->id}->slug ) ? $bp->pages->{$this->id}->slug : bp_docs_get_docs_slug(), 'has_directory' => false, // Set to false if not required 'notification_callback' => 'bp_docs_format_notifications', 'search_string' => __( 'Search Docs...', 'buddypress' ), @@ -297,13 +297,13 @@ function setup_nav( $main_nav = array(), $sub_nav = array() ) { // Disabled count for now. See https://github.com/boonebgorges/buddypress-docs/issues/261 //'name' => sprintf( __( 'Docs %d', 'bp-docs' ), bp_docs_get_doc_count( bp_displayed_user_id(), 'user' ) ), - 'slug' => bp_docs_get_slug(), + 'slug' => bp_docs_get_docs_slug(), 'position' => 80, 'screen_function' => array( &$this, 'template_loader' ), 'default_subnav_slug' => BP_DOCS_STARTED_SLUG ); - $parent_url = trailingslashit( bp_displayed_user_domain() . bp_docs_get_slug() ); + $parent_url = trailingslashit( bp_displayed_user_domain() . bp_docs_get_docs_slug() ); $mydocs_label = bp_is_my_profile() ? __( 'My Docs ', 'bp-docs' ) : sprintf( __( '%s’s Docs' ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) ); @@ -311,7 +311,7 @@ function setup_nav( $main_nav = array(), $sub_nav = array() ) { 'name' => bp_is_my_profile() ? __( 'Started By Me', 'bp-docs' ) : sprintf( __( 'Started By %s', 'bp-docs' ), bp_get_user_firstname() ), 'slug' => BP_DOCS_STARTED_SLUG, 'parent_url' => $parent_url, - 'parent_slug' => bp_docs_get_slug(), + 'parent_slug' => bp_docs_get_docs_slug(), 'screen_function' => array( &$this, 'template_loader' ), 'position' => 10 ); @@ -320,7 +320,7 @@ function setup_nav( $main_nav = array(), $sub_nav = array() ) { 'name' => bp_is_my_profile() ? __( 'Edited By Me', 'bp-docs' ) : sprintf( __( 'Edited By %s', 'bp-docs' ), bp_get_user_firstname() ), 'slug' => BP_DOCS_EDITED_SLUG, 'parent_url' => $parent_url, - 'parent_slug' => bp_docs_get_slug(), + 'parent_slug' => bp_docs_get_docs_slug(), 'screen_function' => array( &$this, 'template_loader' ), 'position' => 20, ); @@ -508,7 +508,7 @@ function catch_page_load() { bp_core_add_message( __( 'You do not have permission to delete that doc.', 'bp-docs' ), 'error' ); } - bp_core_redirect( home_url( bp_docs_get_slug() ) ); + bp_core_redirect( home_url( bp_docs_get_docs_slug() ) ); } } @@ -618,7 +618,7 @@ function post_comment_activity( $comment_id ) { $component = 'groups'; $item = $group_id; } else { - $component = bp_docs_get_slug(); + $component = bp_docs_get_docs_slug(); $item = 0; } @@ -1097,7 +1097,7 @@ function enqueue_scripts() { // Only load our JS on the right sorts of pages. Generous to account for // different item types - if ( in_array( BP_DOCS_SLUG, $this->slugstocheck ) || bp_docs_is_single_doc() || bp_docs_is_global_directory() || bp_docs_is_doc_create() ) { + if ( in_array( bp_docs_get_docs_slug(), $this->slugstocheck ) || bp_docs_is_single_doc() || bp_docs_is_global_directory() || bp_docs_is_doc_create() ) { wp_enqueue_script( 'bp-docs-js' ); wp_enqueue_script( 'comment-reply' ); wp_localize_script( 'bp-docs-js', 'bp_docs', array( @@ -1118,7 +1118,7 @@ function enqueue_styles() { global $bp; // Load the main CSS only on the proper pages - if ( in_array( BP_DOCS_SLUG, $this->slugstocheck ) || bp_docs_is_docs_component() ) { + if ( in_array( bp_docs_get_docs_slug(), $this->slugstocheck ) || bp_docs_is_docs_component() ) { wp_enqueue_style( 'bp-docs-css', $this->includes_url . 'css/screen.css' ); } diff --git a/includes/functions.php b/includes/functions.php index 4159fe15..b9c74a45 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -393,7 +393,7 @@ function bp_docs_is_docs_component() { $retval = true; } else if ( isset( $p->post_type ) && bp_docs_get_post_type_name() == $p->post_type ) { $retval = true; - } else if ( bp_is_current_component( bp_docs_get_slug() ) ) { + } else if ( bp_is_current_component( bp_docs_get_docs_slug() ) ) { // This covers cases where we're looking at the Docs component of a user $retval = true; } diff --git a/includes/integration-groups.php b/includes/integration-groups.php index 8f744eba..e0b27d34 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -741,8 +741,9 @@ function show_doc_count_in_tab() { } // This will probably only work on BP 1.3+ - if ( !empty( $bp->bp_options_nav[$group_slug] ) && !empty( $bp->bp_options_nav[$group_slug][BP_DOCS_SLUG] ) ) { - $current_tab_name = $bp->bp_options_nav[$group_slug][BP_DOCS_SLUG]['name']; + $docs_slug = bp_docs_get_docs_slug(); + if ( !empty( $bp->bp_options_nav[$group_slug] ) && !empty( $bp->bp_options_nav[$group_slug][ $docs_slug ] ) ) { + $current_tab_name = $bp->bp_options_nav[$group_slug][ $docs_slug ]['name']; $doc_count = groups_get_groupmeta( $bp->groups->current_group->id, 'bp-docs-count' ); @@ -916,7 +917,7 @@ function bp_docs_group_extension() { $this->name = !empty( $bp_docs_tab_name ) ? $bp_docs_tab_name : __( 'Docs', 'bp-docs' ); - $this->slug = BP_DOCS_SLUG; + $this->slug = bp_docs_get_docs_slug(); $this->enable_create_step = $this->enable_create_step(); $this->create_step_position = 18; diff --git a/includes/integration-users.php b/includes/integration-users.php index efb51f6a..2ed8fe87 100644 --- a/includes/integration-users.php +++ b/includes/integration-users.php @@ -112,16 +112,16 @@ function get_doc_slug( $slug ) { */ function setup_single_doc_subnav() { global $bp; - + if ( bp_is_user() && !empty( $bp->bp_docs->current_view ) && in_array( $bp->bp_docs->current_view, array( 'single', 'edit', 'history', 'delete' ) ) ) { $doc = bp_docs_get_current_doc(); - + if ( !empty( $doc ) ) { bp_core_new_subnav_item( array( 'name' => $doc->post_title, 'slug' => $doc->post_name, - 'parent_url' => trailingslashit( bp_loggedin_user_domain() . bp_docs_get_slug() ), - 'parent_slug' => bp_docs_get_slug(), + 'parent_url' => trailingslashit( bp_loggedin_user_domain() . bp_docs_get_docs_slug() ), + 'parent_slug' => bp_docs_get_docs_slug(), 'screen_function' => array( $bp->bp_docs, 'template_loader' ), 'position' => 30, 'user_has_access' => true // todo diff --git a/includes/query-builder.php b/includes/query-builder.php index eb851c67..ac26f656 100644 --- a/includes/query-builder.php +++ b/includes/query-builder.php @@ -553,7 +553,7 @@ function save( $args = false ) { $message_type = $result['redirect'] == 'single' ? 'success' : 'error'; - $redirect_url = trailingslashit( bp_get_root_domain() . '/' . BP_DOCS_SLUG ); + $redirect_url = trailingslashit( bp_get_root_domain() . '/' . bp_docs_get_docs_slug() ); if ( $result['redirect'] == 'single' ) { $redirect_url .= $this->doc_slug; diff --git a/includes/templates/docs/single/edit.php b/includes/templates/docs/single/edit.php index 0acc6dd4..3413b4db 100644 --- a/includes/templates/docs/single/edit.php +++ b/includes/templates/docs/single/edit.php @@ -38,7 +38,7 @@ diff --git a/includes/templatetags.php b/includes/templatetags.php index 51934feb..3f2f4ca7 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -426,7 +426,7 @@ function bp_docs_mydocs_link() { * @since 1.2 */ function bp_docs_get_mydocs_link() { - return apply_filters( 'bp_docs_get_mydocs_link', trailingslashit( bp_loggedin_user_domain() . bp_docs_get_slug() ) ); + return apply_filters( 'bp_docs_get_mydocs_link', trailingslashit( bp_loggedin_user_domain() . bp_docs_get_docs_slug() ) ); } /** @@ -1251,6 +1251,31 @@ function bp_docs_get_slug() { return apply_filters( 'bp_docs_get_slug', $bp->bp_docs->slug ); } +function bp_docs_get_docs_slug() { + global $bp; + + if ( defined( 'BP_DOCS_SLUG' ) ) { + $slug = BP_DOCS_SLUG; + $is_in_wp_config = true; + } else { + $slug = bp_get_option( 'bp-docs-slug' ); + if ( empty( $slug ) ) { + $slug = 'docs'; + } + + // for backward compatibility + define( 'BP_DOCS_SLUG', $slug ); + $is_in_wp_config = false; + } + + // For the settings page + if ( ! isset( $bp->bp_docs->docs_slug_defined_in_wp_config ) ) { + $bp->bp_docs->docs_slug_defined_in_wp_config = $is_in_wp_config; + } + + return apply_filters( 'bp_docs_get_docs_slug', $slug ); +} + /** * Outputs the tabs at the top of the Docs view (All Docs, New Doc, etc) * From 8771dcdacf7a709bf56c71fc17e7b983df8ff6b9 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 3 Sep 2013 20:58:23 -0400 Subject: [PATCH 031/126] Don't define BP_DOCS_SLUG up front. See #346 --- bp-docs.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bp-docs.php b/bp-docs.php index cd1bec4d..df871188 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -185,10 +185,6 @@ function load_constants() { if ( !defined( 'BP_DOCS_INCLUDES_PATH_ABS' ) ) define( 'BP_DOCS_INCLUDES_PATH_ABS', str_replace( ABSPATH, '', BP_DOCS_INCLUDES_PATH ) ); - // The main slug - if ( !defined( 'BP_DOCS_SLUG' ) ) - define( 'BP_DOCS_SLUG', 'docs' ); - // The slug used when viewing a doc category if ( !defined( 'BP_DOCS_CATEGORY_SLUG' ) ) define( 'BP_DOCS_CATEGORY_SLUG', 'category' ); From 11fdb90360437f82c35a5f33eda4b2e5892ee7fd Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 3 Sep 2013 20:58:59 -0400 Subject: [PATCH 032/126] Whitespace and line endings --- bp-docs.php | 2 -- includes/integration-groups.php | 2 +- includes/integration-users.php | 22 +++++++++++----------- loader.php | 2 -- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/bp-docs.php b/bp-docs.php index df871188..096d3a7c 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -545,5 +545,3 @@ function do_integration() { $bp->bp_docs = new BP_Docs_Component; } } - -?> diff --git a/includes/integration-groups.php b/includes/integration-groups.php index e0b27d34..fd826575 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -753,7 +753,7 @@ function show_doc_count_in_tab() { $doc_count = groups_get_groupmeta( $bp->groups->current_group->id, 'bp-docs-count' ); } - $bp->bp_options_nav[$group_slug][BP_DOCS_SLUG]['name'] = sprintf( __( '%s %d', 'bp-docs' ), $current_tab_name, $doc_count ); + $bp->bp_options_nav[$group_slug][ $docs_slug ]['name'] = sprintf( __( '%s %d', 'bp-docs' ), $current_tab_name, $doc_count ); } } diff --git a/includes/integration-users.php b/includes/integration-users.php index 2ed8fe87..88de8047 100644 --- a/includes/integration-users.php +++ b/includes/integration-users.php @@ -14,19 +14,19 @@ function __construct() { add_filter( 'bp_docs_get_item_type', array( &$this, 'get_item_type' ) ); add_filter( 'bp_docs_get_current_view', array( &$this, 'get_current_view' ), 10, 2 ); add_filter( 'bp_docs_this_doc_slug', array( &$this, 'get_doc_slug' ) ); - + // Add the approriate navigation item for single docs add_action( 'wp', array( &$this, 'setup_single_doc_subnav' ), 1 ); - + // These functions are used to keep the user's Doc count up to date add_filter( 'bp_docs_doc_saved', array( $this, 'update_doc_count' ) ); add_filter( 'bp_docs_doc_deleted', array( $this, 'update_doc_count' ) ); - + // Taxonomy helpers add_filter( 'bp_docs_taxonomy_get_item_terms', array( &$this, 'get_user_terms' ) ); add_action( 'bp_docs_taxonomy_save_item_terms', array( &$this, 'save_user_terms' ) ); } - + /** * Check to see whether the query object's item type should be 'user' * @@ -43,7 +43,7 @@ function get_item_type( $type ) { return $type; } - + /** * Sets up the current view when viewing a user page * @@ -75,10 +75,10 @@ function get_current_view( $view, $item_type ) { $view = 'history'; } } - + return $view; } - + /** * Set the doc slug when we are viewing a user doc * @@ -87,7 +87,7 @@ function get_current_view( $view, $item_type ) { */ function get_doc_slug( $slug ) { global $bp; - + if ( bp_is_user() ) { // Doc slug can't be my-docs or create if ( !in_array( bp_current_action(), array( 'my-docs', 'create' ) ) ) { @@ -129,7 +129,7 @@ function setup_single_doc_subnav() { } } } - + /** * Update's a user's Doc count * @@ -138,7 +138,7 @@ function setup_single_doc_subnav() { function update_doc_count() { bp_docs_update_doc_count( bp_loggedin_user_id(), 'user' ); } - + /** * Gets the list of terms used by a user's docs * @@ -180,4 +180,4 @@ function save_user_terms( $terms ) { } -?> \ No newline at end of file +?> diff --git a/loader.php b/loader.php index 624157f1..267699d5 100644 --- a/loader.php +++ b/loader.php @@ -36,5 +36,3 @@ function bp_docs_init() { $bp_docs = new BP_Docs; } add_action( 'bp_include', 'bp_docs_init' ); - -?> From e8f336062c750ed676bc093db146271abf3b886f Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 20:50:51 -0400 Subject: [PATCH 033/126] More complete testing of Docs permalink flushing The previous method would not detect when the main docs slug had been changed to something else --- bp-docs.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bp-docs.php b/bp-docs.php index 096d3a7c..ac9e392e 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -519,12 +519,14 @@ function flush_rewrite_rules() { // finding a Docs rule and then comparing it to the registered rules foreach ( $wp_rewrite->extra_rules_top as $rewrite => $rule ) { if ( 0 === strpos( $rewrite, bp_docs_get_docs_slug() ) ) { + $test_rewrite = $rewrite; $test_rule = $rule; + break; } } $registered_rules = get_option( 'rewrite_rules' ); - if ( is_array( $registered_rules ) && ! in_array( $test_rule, $registered_rules ) ) { + if ( is_array( $registered_rules ) && ( ! isset( $registered_rules[ $test_rewrite ] ) || $test_rule !== $registered_rules[ $test_rewrite ] ) ) { flush_rewrite_rules(); } } From c282143175e5b685b493fbd341709cd485f5b7ca Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 20:53:54 -0400 Subject: [PATCH 034/126] Removing testing code --- bp-docs.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bp-docs.php b/bp-docs.php index ac9e392e..acbe3145 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -531,10 +531,6 @@ function flush_rewrite_rules() { } } - function activation() { - error_log('activating'); - } - /** * Initiates the BP Component extension * From 8e479ca9984c358b03146b13856d1a547f9dc433 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 20:54:22 -0400 Subject: [PATCH 035/126] Whitespace --- includes/admin.php | 68 ++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/includes/admin.php b/includes/admin.php index 9e6c9aad..7c3d4e99 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -23,8 +23,8 @@ function bp_docs_admin() { * * @package BuddyPress Docs * @since 1.1.8 - */ - function __construct() { + */ + function __construct() { // Replace the Dashboard widget if ( !defined( BP_DOCS_REPLACE_RECENT_COMMENTS_DASHBOARD_WIDGET ) || !BP_DOCS_REPLACE_RECENT_COMMENTS_DASHBOARD_WIDGET ) { add_action( 'wp_dashboard_setup', array( $this, 'replace_recent_comments_dashboard_widget' ) ); @@ -33,47 +33,47 @@ function __construct() { function replace_recent_comments_dashboard_widget() { global $wp_meta_boxes; - + // Find the recent comments widget foreach ( $wp_meta_boxes['dashboard'] as $context => $widgets ) { if ( !empty( $widgets ) && !empty( $widgets['core'] ) && is_array( $widgets['core'] ) && array_key_exists( 'dashboard_recent_comments', $widgets['core'] ) ) { // Take note of the context for when we add our widget - $drc_widget_context = $context; - + $drc_widget_context = $context; + // Store the widget so that we have access to its information $drc_widget = $widgets['core']['dashboard_recent_comments']; - + // Store the array keys, so that we can reorder things later $widget_order = array_keys( $widgets['core'] ); - + // Remove the core widget remove_meta_box( 'dashboard_recent_comments', 'dashboard', $drc_widget_context ); - + // No need to continue the loop break; } } - + // If we couldn't find the recent comments widget, it must have been removed. We'll // assume this means we shouldn't add our own if ( empty( $drc_widget ) ) return; - + // Set up and add our widget $recent_comments_title = __( 'Recent Comments' ); - - // Add our widget in the same location + + // Add our widget in the same location wp_add_dashboard_widget( 'dashboard_recent_comments_bp_docs', $recent_comments_title, array( $this, 'wp_dashboard_recent_comments' ), 'wp_dashboard_recent_comments_control' ); - + // Restore the previous widget order. File this under "good citizenship" $wp_meta_boxes['dashboard'][$context]['core']['dashboard_recent_comments'] = $wp_meta_boxes['dashboard'][$context]['core']['dashboard_recent_comments_bp_docs']; - + unset( $wp_meta_boxes['dashboard'][$context]['core']['dashboard_recent_comments_bp_docs'] ); - + // In order to inherit the styles, we're going to spoof the widget ID. Sadness $wp_meta_boxes['dashboard'][$context]['core']['dashboard_recent_comments']['id'] = 'dashboard_recent_comments'; } - + /** * Replicates WP's native recent comments dashboard widget. * @@ -82,65 +82,63 @@ function replace_recent_comments_dashboard_widget() { */ function wp_dashboard_recent_comments() { global $wpdb, $bp; - + if ( current_user_can('edit_posts') ) $allowed_states = array('0', '1'); else $allowed_states = array('1'); - + // Select all comment types and filter out spam later for better query performance. $comments = array(); $start = 0; - + $widgets = get_option( 'dashboard_widget_options' ); $total_items = isset( $widgets['dashboard_recent_comments'] ) && isset( $widgets['dashboard_recent_comments']['items'] ) ? absint( $widgets['dashboard_recent_comments']['items'] ) : 5; - + while ( count( $comments ) < $total_items && $possible = $wpdb->get_results( "SELECT c.*, p.post_type AS comment_post_post_type FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) { - - foreach ( $possible as $comment ) { + + foreach ( $possible as $comment ) { if ( count( $comments ) >= $total_items ) break; - + // Is the user allowed to read this doc? if ( $bp->bp_docs->post_type_name == $comment->comment_post_post_type && !bp_docs_user_can( 'read', get_current_user_ID(), $comment->comment_post_ID ) ) continue; - + if ( in_array( $comment->comment_approved, $allowed_states ) && current_user_can( 'read_post', $comment->comment_post_ID ) ) $comments[] = $comment; } - + $start = $start + 50; } - + if ( $comments ) : ?> - +
- +
- + views(); ?> - +

- + \ No newline at end of file From 287dc6519c22fd6ce1318fe874c65053f5c7e067 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 20:55:01 -0400 Subject: [PATCH 036/126] Introduces bp_docs_get_group_tab_name(). --- includes/integration-groups.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index fd826575..918ba42c 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -902,7 +902,7 @@ class BP_Docs_Group_Extension extends BP_Group_Extension { function bp_docs_group_extension() { global $bp; - $bp_docs_tab_name = get_option( 'bp-docs-tab-name' ); + $bp_docs_tab_name = bp_docs_get_group_tab_name(); if ( !empty( $bp->groups->current_group->id ) ) $this->maybe_group_id = $bp->groups->current_group->id; @@ -1449,3 +1449,13 @@ function bp_docs_get_group_id_from_term_slug( $term_slug ) { function bp_docs_get_term_slug_from_group_id( $group_id ) { return 'bp_docs_associated_group_' . (int) $group_id; } + +/** + * Get the name to show in the group tab + * + * @since 1.5 + * @return string + */ +function bp_docs_get_group_tab_name() { + return apply_filters( 'bp_docs_get_group_tab_name', get_option( 'bp-docs-tab-name', __( 'Docs', 'bp-docs' ) ) ); +} From 61639ddb17e4594f7d93f8c7f46d26604450acd1 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 20:55:27 -0400 Subject: [PATCH 037/126] Refactor of admin panel This changeset moves the admin panel from under the BuddyPress settings panel to under the BuddyPress Docs top-level CPT menu. This means better adherence to the WordPress Settings API. This changeset also introduces support for changing the main Docs slug through the admin panel. This is a variation on something originally patched by @dcavins. Fixes #346. --- includes/admin.php | 94 ++++++++++++++++++++++++++++++++- includes/integration-groups.php | 60 --------------------- includes/templatetags.php | 4 +- 3 files changed, 95 insertions(+), 63 deletions(-) diff --git a/includes/admin.php b/includes/admin.php index 7c3d4e99..526e6666 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -29,8 +29,100 @@ function __construct() { if ( !defined( BP_DOCS_REPLACE_RECENT_COMMENTS_DASHBOARD_WIDGET ) || !BP_DOCS_REPLACE_RECENT_COMMENTS_DASHBOARD_WIDGET ) { add_action( 'wp_dashboard_setup', array( $this, 'replace_recent_comments_dashboard_widget' ) ); } + + // Set up menus + add_action( 'admin_menu', array( $this, 'setup_menus' ) ); + add_action( 'admin_menu', array( $this, 'setup_settings' ) ); + } + + public function setup_menus() { + // Settings + add_submenu_page( + 'edit.php?post_type=' . bp_docs_get_post_type_name(), + __( 'BuddyPress Docs Settings', 'bp-docs' ), + __( 'Settings', 'bp-docs' ), + 'manage_options', + 'bp-docs-settings', + array( $this, 'settings_cb' ) + ); + } + + public function settings_cb() { + ?> +
+
+

+ + + +
+
+ bp_docs->docs_slug_defined_in_wp_config['slug']; + + ?> + disabled="disabled" /> +

wp-config.php, so it cannot be edited here.', 'bp-docs' ) ?>

+ + + +

language file for BuddyPress Docs.", 'bp-docs' ) ?>

+ + BuddyPress > Settings - * - * @package BuddyPress Docs - * @since 1.1.6 - */ - function admin_screen_fields() { - - ?> - - - - - - - - group_tab_name_setting_markup() ?> - - - - - -

language file for BuddyPress Docs.", 'bp-docs' ) ?>

- -

define( 'BP_DOCS_SLUG', 'collaborations' ); in your wp-config.php file, replacing 'collaborations' with your custom slug.", 'bp-docs' ) ?>

- bp_docs->docs_slug_defined_in_wp_config ) ) { - $bp->bp_docs->docs_slug_defined_in_wp_config = $is_in_wp_config; + if ( ! isset( $bp->bp_docs->slug_defined_in_wp_config['slug'] ) ) { + $bp->bp_docs->slug_defined_in_wp_config['slug'] = (int) $is_in_wp_config; } return apply_filters( 'bp_docs_get_docs_slug', $slug ); From 84fe42f21c66127b2c4cc4421fde9342f188bfe6 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 20:57:10 -0400 Subject: [PATCH 038/126] E_STRICT --- includes/integration-groups.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index 45a79861..0fc0f58b 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -1383,7 +1383,8 @@ function bp_docs_get_group_term( $group_id ) { } function bp_docs_get_group_id_from_term_slug( $term_slug ) { - return intval( array_pop( explode( 'bp_docs_associated_group_', $term_slug ) ) ); + $ts = explode( 'bp_docs_associated_group_', $term_slug ); + return intval( array_pop( $ts ) ); } function bp_docs_get_term_slug_from_group_id( $group_id ) { From 9bd818490b5e7ec2a6c4b45c06c0485634cd2335 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 21:00:24 -0400 Subject: [PATCH 039/126] Use 'bp_moderate' to show Settings panel This ensures correct permissions on Multisite networks --- includes/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin.php b/includes/admin.php index 526e6666..19e7b67d 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -41,7 +41,7 @@ public function setup_menus() { 'edit.php?post_type=' . bp_docs_get_post_type_name(), __( 'BuddyPress Docs Settings', 'bp-docs' ), __( 'Settings', 'bp-docs' ), - 'manage_options', + 'bp_moderate', 'bp-docs-settings', array( $this, 'settings_cb' ) ); From 1fa53875ea257b37b744ec19495ae167f808b512 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 21:00:53 -0400 Subject: [PATCH 040/126] Readme --- readme.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index cc9c3cf8..2cf755d4 100755 --- a/readme.txt +++ b/readme.txt @@ -33,13 +33,15 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == -= 1.4.6 = -* Improved compatibility with PHP 5.4+ += 1.5 = +* New standalone Settings panel, under Dashboard > BuddyPress Docs +* Main Docs slug can now be changed via the admin * Fix bug that prevented the activity action from being modified for the associated group * Fix bug that prevented activity from appearing in group activity streams * Fix bug that prevented attachment uploads on group Doc creation pages * Fix some textdomain errors * Allow Docs with empty content field +* Improved compatibility with PHP 5.4+ = 1.4.5 = * Fixes bug in access filter for "logged-in users" setting From df557d08e09dfe85f56b3f562d83b9571e1d84fc Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 21:09:00 -0400 Subject: [PATCH 041/126] Make user tab name configurable Props @dcavins for the original patch Fixes #345 --- includes/admin.php | 27 +++++++++++++++++++++++++++ includes/component.php | 4 ++-- includes/integration-users.php | 14 +++++++++++++- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/includes/admin.php b/includes/admin.php index 19e7b67d..62239321 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -79,6 +79,24 @@ public function setup_settings() { ); register_setting( 'bp-docs-settings', 'bp-docs-slug', 'rawurlencode' ); + // Users + add_settings_section( + 'bp-docs-users', + __( 'Users', 'bp-docs' ), + array( $this, 'users_section' ), + 'bp-docs-settings' + ); + + // Users - Tab name + add_settings_field( + 'bp-docs-user-tab-name', + __( 'User Tab Name', 'bp-docs' ), + array( $this, 'user_tab_name_setting_markup' ), + 'bp-docs-settings', + 'bp-docs-users' + ); + register_setting( 'bp-docs-settings', 'bp-docs-user-tab-name' ); + // Groups if ( bp_is_active( 'groups' ) ) { add_settings_section( @@ -123,6 +141,15 @@ public function group_tab_name_setting_markup() { + +

language file for BuddyPress Docs.", 'bp-docs' ) ?>

+ + __( 'Docs', 'bp-docs' ), + 'name' => bp_docs_get_user_tab_name(), // Disabled count for now. See https://github.com/boonebgorges/buddypress-docs/issues/261 //'name' => sprintf( __( 'Docs %d', 'bp-docs' ), bp_docs_get_doc_count( bp_displayed_user_id(), 'user' ) ), diff --git a/includes/integration-users.php b/includes/integration-users.php index 88de8047..5fb4d490 100644 --- a/includes/integration-users.php +++ b/includes/integration-users.php @@ -180,4 +180,16 @@ function save_user_terms( $terms ) { } -?> +/** + * Get the name to show in the users tab + * + * @since 1.5 + * @return string + */ +function bp_docs_get_user_tab_name() { + $name = get_option( 'bp-docs-user-tab-name' ); + if ( empty( $name ) ) { + $name = __( 'Docs', 'bp-docs' ); + } + return apply_filters( 'bp_docs_get_user_tab_name', $name ); +} From ced5f9861f1637b0cfa1ce3b031b6e07f54ed420 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 21:39:54 -0400 Subject: [PATCH 042/126] Removes copypasta from tax term lookup functions --- includes/functions.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index b9c74a45..f039d6b8 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -589,14 +589,10 @@ function bp_docs_get_access_term_user( $user_id = false ) { * Get the access term corresponding to group-members for a given group * * @since 1.2 - * @param int|bool $user_id Defaults to logged in user + * @param int $group_id * @return string The term slug */ function bp_docs_get_access_term_group_member( $user_id = false ) { - if ( false === $user_id ) { - $user_id = bp_loggedin_user_id(); - } - return apply_filters( 'bp_docs_get_access_term_group_member', 'bp_docs_access_group_member_' . intval( $user_id ) ); } @@ -604,14 +600,10 @@ function bp_docs_get_access_term_group_member( $user_id = false ) { * Get the access term corresponding to admins-mods for a given group * * @since 1.2 - * @param int|bool $user_id Defaults to logged in user + * @param int $group_id * @return string The term slug */ function bp_docs_get_access_term_group_adminmod( $user_id = false ) { - if ( false === $user_id ) { - $user_id = bp_loggedin_user_id(); - } - return apply_filters( 'bp_docs_get_access_term_group_adminmod', 'bp_docs_access_group_adminmod_' . intval( $user_id ) ); } From f23371fc77a4cdb04808b8a9b8c732c6cf5894be Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 21:40:14 -0400 Subject: [PATCH 043/126] Fix admins-mods setting Somehow, the admins-mods permissions settings was never fully implemented. Whoops. Fixes #343 --- includes/integration-groups.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index 0fc0f58b..e4c3d658 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -353,13 +353,21 @@ function user_can( $user_can, $action, $user_id, $doc_id = false ) { break; case 'creator' : - if ( $doc->post_author == $user_id ) + if ( $doc->post_author == $user_id ) { $user_can = true; + } break; case 'group-members' : - if ( groups_is_user_member( $user_id, $group_id ) ) + if ( groups_is_user_member( $user_id, $group_id ) ) { + $user_can = true; + } + break; + + case 'admins-mods' : + if ( groups_is_user_admin( $user_id, $group_id ) || groups_is_user_mod( $user_id, $group_id ) ) { $user_can = true; + } break; case 'no-one' : From 30db8d5be9fe9609a94b47097021ad0c5d3d9feb Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 21:41:28 -0400 Subject: [PATCH 044/126] Better fallback in bp_docs_get_group_tab_name() --- includes/integration-groups.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index e4c3d658..bc985d45 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -1406,5 +1406,9 @@ function bp_docs_get_term_slug_from_group_id( $group_id ) { * @return string */ function bp_docs_get_group_tab_name() { - return apply_filters( 'bp_docs_get_group_tab_name', get_option( 'bp-docs-tab-name', __( 'Docs', 'bp-docs' ) ) ); + $name = get_option( 'bp-docs-tab-name' ); + if ( empty( $name ) ) { + $name = __( 'Docs', 'bp-docs' ); + } + return apply_filters( 'bp_docs_get_group_tab_name', $name ); } From f5a7b0c8a70575f2b08dcb403e73130e8c91cb07 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 21:41:43 -0400 Subject: [PATCH 045/126] Readme update --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 2cf755d4..2305e92d 100755 --- a/readme.txt +++ b/readme.txt @@ -40,6 +40,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented activity from appearing in group activity streams * Fix bug that prevented attachment uploads on group Doc creation pages * Fix some textdomain errors +* Fix "admins and mods of..." permissions setting * Allow Docs with empty content field * Improved compatibility with PHP 5.4+ From 5a26871ce9ac7f2fb97f15d6da2751f81ac5cbe1 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 22:13:45 -0400 Subject: [PATCH 046/126] Better attachment URL formation Also adds bp_docs_attachment_url_base filter Props @wdfee Fixes #344 --- includes/templatetags.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/templatetags.php b/includes/templatetags.php index f794f9cd..449d2916 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -1811,10 +1811,10 @@ function bp_docs_attachment_item_markup( $attachment_id, $format = 'full' ) { $markup = ''; $attachment = get_post( $attachment_id ); - $attachment_ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $attachment->guid ); + $attachment_url = apply_filters( 'bp_docs_attachment_url_base', wp_get_attachment_url( $attachment->ID ), $attachment ); - $attachment_url = $attachment->guid; - $attachment_filename = basename( $attachment->guid ); + $attachment_ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $attachment_url ); + $attachment_filename = basename( $attachment_url ); if ( 'full' === $format ) { $attachment_delete_html = ''; From 46394a6cab3f98d8a038c4d4646103bcc4fde7ab Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 22:38:28 -0400 Subject: [PATCH 047/126] Whitespace --- includes/addon-hierarchy.php | 126 +++++++++++++++++------------------ 1 file changed, 62 insertions(+), 64 deletions(-) diff --git a/includes/addon-hierarchy.php b/includes/addon-hierarchy.php index b7f10f72..f95921da 100644 --- a/includes/addon-hierarchy.php +++ b/includes/addon-hierarchy.php @@ -74,7 +74,7 @@ function save_post( $query ) { $args = array( 'ID' => $query->doc_id, - 'post_parent' => $post_parent + 'post_parent' => $post_parent, ); // Don't let a revision get saved here @@ -95,13 +95,13 @@ function save_post( $query ) { * @package BuddyPress Docs * @since 1.0-beta */ - function show_parent() { - global $post, $wp_query; + function show_parent() { + global $post, $wp_query; - $html = ''; - $parent = false; + $html = ''; + $parent = false; - if ( ! empty( $post->post_parent ) ) { + if ( ! empty( $post->post_parent ) ) { $parent = get_post( $post->post_parent ); if ( !empty( $parent->ID ) ) { $parent_url = bp_docs_get_doc_link( $parent->ID ); @@ -109,69 +109,67 @@ function show_parent() { $html = "

" . __( 'Parent: ', 'bp-docs' ) . "$parent_title

"; } - } + } - echo apply_filters( 'bp_docs_hierarchy_show_parent', $html, $parent ); - } + echo apply_filters( 'bp_docs_hierarchy_show_parent', $html, $parent ); + } - /** + /** * Display links to the doc's children * * @package BuddyPress Docs * @since 1.0 */ - function show_children() { - global $bp, $wp_query, $post; - - // Get the child posts - $child_posts_args = array( - 'post_type' => $bp->bp_docs->post_type_name, - 'post_parent' => get_the_ID() - ); - - $child_posts = new WP_Query( $child_posts_args ); - - // Workaround for WP funniness - $wp_query_stash = $wp_query; - $post_stash = $post; - - // Assemble the link data out of the query - $child_data = array(); - if ( $child_posts->have_posts() ) { - while ( $child_posts->have_posts() ) { - $child_posts->the_post(); - - $child_id = get_the_ID(); - $child_data[$child_id] = array( - 'post_name' => get_the_title(), - 'post_link' => bp_docs_get_doc_link( $child_id ) - ); - } - } - - // Workaround for WP funniness - $wp_query = $wp_query_stash; - $post = $post_stash; - - $child_data = apply_filters( 'bp_docs_hierarchy_child_data', $child_data ); - - // Create the HTML - $html = ''; - if ( !empty( $child_data ) ) { - $html .= '

' . __( 'Children: ', 'bp-docs' ); - - $children_html = array(); - foreach( $child_data as $child ) { - $children_html[] = '' . $child['post_name'] . ''; - } - - $html .= implode( ', ', $children_html ); - - $html .= '

'; - } - - echo apply_filters( 'bp_docs_hierarchy_show_children', $html, $child_data ); - } -} + function show_children() { + global $bp, $wp_query, $post; + + // Get the child posts + $child_posts_args = array( + 'post_type' => $bp->bp_docs->post_type_name, + 'post_parent' => get_the_ID() + ); + + $child_posts = new WP_Query( $child_posts_args ); + + // Workaround for WP funniness + $wp_query_stash = $wp_query; + $post_stash = $post; + + // Assemble the link data out of the query + $child_data = array(); + if ( $child_posts->have_posts() ) { + while ( $child_posts->have_posts() ) { + $child_posts->the_post(); + + $child_id = get_the_ID(); + $child_data[$child_id] = array( + 'post_name' => get_the_title(), + 'post_link' => bp_docs_get_doc_link( $child_id ) + ); + } + } + + // Workaround for WP funniness + $wp_query = $wp_query_stash; + $post = $post_stash; + + $child_data = apply_filters( 'bp_docs_hierarchy_child_data', $child_data ); + + // Create the HTML + $html = ''; + if ( !empty( $child_data ) ) { + $html .= '

' . __( 'Children: ', 'bp-docs' ); + + $children_html = array(); + foreach( $child_data as $child ) { + $children_html[] = '' . $child['post_name'] . ''; + } -?> + $html .= implode( ', ', $children_html ); + + $html .= '

'; + } + + echo apply_filters( 'bp_docs_hierarchy_show_children', $html, $child_data ); + } +} From 327974af3d94db99977cd9bd4ba053564fe05adb Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 22:38:38 -0400 Subject: [PATCH 048/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 2305e92d..940a3af2 100755 --- a/readme.txt +++ b/readme.txt @@ -41,6 +41,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented attachment uploads on group Doc creation pages * Fix some textdomain errors * Fix "admins and mods of..." permissions setting +* Improve the way attachment URLs are built * Allow Docs with empty content field * Improved compatibility with PHP 5.4+ From 50664f57fa21ad823d366efc0debe3cb36db946e Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 23:01:41 -0400 Subject: [PATCH 049/126] Remove post_parent relationships when a parent is deleted Fixes #335 --- includes/addon-hierarchy.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/includes/addon-hierarchy.php b/includes/addon-hierarchy.php index f95921da..be60f37b 100644 --- a/includes/addon-hierarchy.php +++ b/includes/addon-hierarchy.php @@ -29,6 +29,9 @@ function __construct() { // Display a doc's children on its single doc page add_action( 'bp_docs_single_doc_meta', array( $this, 'show_children' ) ); + + // When a Doc is deleted, mark its children as parentless + add_action( 'bp_docs_doc_deleted', array( $this, 'deleted_parent' ) ); } /** @@ -172,4 +175,28 @@ function show_children() { echo apply_filters( 'bp_docs_hierarchy_show_children', $html, $child_data ); } + + /** + * When a Doc is deleted, mark its children as having no parent + * + * @since 1.5 + * @param array $args The $delete_args array from bp_docs_trash_dac() + */ + public function deleted_parent( $args ) { + if ( ! isset( $args['ID'] ) ) { + return; + } + + $children = get_children( array( + 'post_parent' => $args['ID'], + 'post_type' => bp_docs_get_post_type_name(), + ), ARRAY_A ); + + foreach ( $children as $cid => $child ) { + wp_update_post( array( + 'ID' => $child['ID'], + 'post_parent' => 0, + ) ); + } + } } From 973487c9e899f2a1c97109acb2b5cbcf86b0a5da Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 23:15:54 -0400 Subject: [PATCH 050/126] Improve "edited by me" logic The previous logic did not account for published posts by the user See #332 --- includes/query-builder.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/includes/query-builder.php b/includes/query-builder.php index ac26f656..fb9ab064 100644 --- a/includes/query-builder.php +++ b/includes/query-builder.php @@ -258,14 +258,22 @@ function get_edited_by_post_ids() { // @todo - Not sure how this will scale $posts = get_posts( array( 'author' => $editor_id, - 'post_status' => 'inherit', - 'post_type' => 'revision', + 'post_status' => array( 'inherit', 'publish' ), + 'post_type' => array( 'revision', bp_docs_get_post_type_name() ), 'posts_per_page' => -1, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, ) ); - $post_ids = array_merge( $post_ids, array_unique( wp_list_pluck( $posts, 'post_parent' ) ) ); + $this_author_post_ids = array(); + foreach ( $posts as $post ) { + if ( 'revision' === $post->post_type ) { + $this_author_post_ids[] = $post->post_parent; + } else { + $this_author_post_ids[] = $post->ID; + } + } + $post_ids = array_merge( $post_ids, $this_author_post_ids ); } // @todo Might be faster to let the dupes through and let MySQL optimize From 47fd8869ab7ba303d49143c732ca426bfecdf798 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 23:17:58 -0400 Subject: [PATCH 051/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 940a3af2..a886e1a5 100755 --- a/readme.txt +++ b/readme.txt @@ -41,6 +41,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented attachment uploads on group Doc creation pages * Fix some textdomain errors * Fix "admins and mods of..." permissions setting +* More accurate list of items on "Edited by..." tab * Improve the way attachment URLs are built * Allow Docs with empty content field * Improved compatibility with PHP 5.4+ From b32932f54d763b2fa6bb8e942ee19e6ba160ebe5 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 4 Sep 2013 23:47:00 -0400 Subject: [PATCH 052/126] Create admin toggle for enabling attachments Fixes #326 --- includes/admin.php | 32 ++++++++++++++++++++++++ includes/attachments.php | 12 ++++++++- includes/templates/docs/docs-loop.php | 12 ++++++--- includes/templates/docs/single/edit.php | 2 +- includes/templates/docs/single/index.php | 2 +- 5 files changed, 53 insertions(+), 7 deletions(-) diff --git a/includes/admin.php b/includes/admin.php index 62239321..c5d1a723 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -116,6 +116,24 @@ public function setup_settings() { ); register_setting( 'bp-docs-settings', 'bp-docs-tab-name' ); } + + // Attachments + add_settings_section( + 'bp-docs-attachments', + __( 'Attachments', 'bp-docs' ), + array( $this, 'attachments_section' ), + 'bp-docs-settings' + ); + + // Users - Tab name + add_settings_field( + 'bp-docs-enable-attachments', + __( 'Enable Attachments', 'bp-docs' ), + array( $this, 'enable_attachments_setting_markup' ), + 'bp-docs-settings', + 'bp-docs-attachments' + ); + register_setting( 'bp-docs-settings', 'bp-docs-enable-attachments' ); } public function slug_setting_markup() { @@ -150,6 +168,20 @@ public function user_tab_name_setting_markup() { + +

+ + - + + + @@ -38,9 +40,11 @@ - - - + + + + + diff --git a/includes/templates/docs/single/edit.php b/includes/templates/docs/single/edit.php index 3413b4db..27db0d7b 100644 --- a/includes/templates/docs/single/edit.php +++ b/includes/templates/docs/single/edit.php @@ -58,7 +58,7 @@ - +
diff --git a/includes/templates/docs/single/index.php b/includes/templates/docs/single/index.php index 56bd9b4f..e5dd6429 100644 --- a/includes/templates/docs/single/index.php +++ b/includes/templates/docs/single/index.php @@ -23,7 +23,7 @@
- +

From 7375034995a55b94f31b02b18e9cb5b8a9e95b36 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 09:24:19 -0400 Subject: [PATCH 053/126] Adds hooks to Docs templates. Fixes #298 --- includes/templates/docs/docs-header.php | 6 ++++++ includes/templates/docs/single/edit.php | 4 ++++ includes/templates/docs/single/index.php | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/includes/templates/docs/docs-header.php b/includes/templates/docs/docs-header.php index 3333329f..b7ce7376 100644 --- a/includes/templates/docs/docs-header.php +++ b/includes/templates/docs/docs-header.php @@ -1,3 +1,5 @@ + + + +
@@ -36,3 +40,5 @@

+ + diff --git a/includes/templates/docs/single/edit.php b/includes/templates/docs/single/edit.php index 27db0d7b..539df71a 100644 --- a/includes/templates/docs/single/edit.php +++ b/includes/templates/docs/single/edit.php @@ -42,6 +42,8 @@
+ +
@@ -58,6 +60,8 @@
+ +
diff --git a/includes/templates/docs/single/index.php b/includes/templates/docs/single/index.php index e5dd6429..811e7a9b 100644 --- a/includes/templates/docs/single/index.php +++ b/includes/templates/docs/single/index.php @@ -19,10 +19,14 @@ + +
+ +

From c4a5f7a8398164536af3e298452948c5cf3f03ce Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 09:24:51 -0400 Subject: [PATCH 054/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index a886e1a5..37443a19 100755 --- a/readme.txt +++ b/readme.txt @@ -44,6 +44,7 @@ This plugin is in active development. For feature requests and bug reports, visi * More accurate list of items on "Edited by..." tab * Improve the way attachment URLs are built * Allow Docs with empty content field +* Add hooks to templates * Improved compatibility with PHP 5.4+ = 1.4.5 = From 46427401eaef5604085d0b003b8476e2cdce58cb Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 09:27:22 -0400 Subject: [PATCH 055/126] Add filter to wp_editor() args in edit template Fixes #289 --- includes/templates/docs/single/edit.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/templates/docs/single/edit.php b/includes/templates/docs/single/edit.php index 539df71a..51bb1294 100644 --- a/includes/templates/docs/single/edit.php +++ b/includes/templates/docs/single/edit.php @@ -49,10 +49,11 @@
false, - 'dfw' => false + 'dfw' => false, ) ); + wp_editor( bp_docs_get_edit_doc_content(), 'doc_content', $wp_editor_args ); } else { the_editor( bp_docs_get_edit_doc_content(), 'doc_content', 'doc[title]', false ); } From 6355ccdbe13cad897a6557e1f89c1ca063dae466 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 09:45:55 -0400 Subject: [PATCH 056/126] Add excerpt length admin setting. See #241 --- includes/admin.php | 20 ++++++++++++++++++++ includes/formatting.php | 9 +++++++-- includes/templates/docs/docs-loop.php | 4 +++- readme.txt | 1 + 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/includes/admin.php b/includes/admin.php index c5d1a723..efc43a30 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -79,6 +79,16 @@ public function setup_settings() { ); register_setting( 'bp-docs-settings', 'bp-docs-slug', 'rawurlencode' ); + // General - Excerpt length + add_settings_field( + 'bp-docs-excerpt-length', + __( 'Directory Excerpt Length', 'bp-docs' ), + array( $this, 'excerpt_length_setting_markup' ), + 'bp-docs-settings', + 'bp-docs-general' + ); + register_setting( 'bp-docs-settings', 'bp-docs-excerpt-length', 'absint' ); + // Users add_settings_section( 'bp-docs-users', @@ -149,6 +159,16 @@ public function slug_setting_markup() { + +

0 to disable these excerpts.", 'bp-docs' ) ?>

+ + - + + +
diff --git a/readme.txt b/readme.txt index 37443a19..73bdb4ea 100755 --- a/readme.txt +++ b/readme.txt @@ -40,6 +40,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented activity from appearing in group activity streams * Fix bug that prevented attachment uploads on group Doc creation pages * Fix some textdomain errors +* Add Directory Excerpt Length admin option * Fix "admins and mods of..." permissions setting * More accurate list of items on "Edited by..." tab * Improve the way attachment URLs are built From c8634e518ebae9a4127e993d6dd7f18556e71e44 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 09:46:40 -0400 Subject: [PATCH 057/126] Whitespace --- includes/formatting.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/formatting.php b/includes/formatting.php index 48bff638..1ee2b134 100644 --- a/includes/formatting.php +++ b/includes/formatting.php @@ -46,9 +46,7 @@ function bp_docs_tags_comma_space( $tags ) { $tags = explode( ',', $tags ); $tags = implode( ', ', $tags ); } - + return $tags; } add_filter( 'terms_to_edit', 'bp_docs_tags_comma_space' ); - -?> \ No newline at end of file From 140594973e3093d6e708bdefa8a2cc411115d1c0 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 10:22:55 -0400 Subject: [PATCH 058/126] Fix "minimum role to associate with group" setting Previously, when Doc creation happened within groups, it was possible for the group admin to limit who was able to create Docs within the group, by group role. Once Docs were moved out of groups, and "group Doc creation" became "association of a Doc with a group", this functionatily broke. The current changeset reintroduces it. Fixes #233 --- includes/functions.php | 19 +++++++++++++++++ includes/integration-groups.php | 11 +++++----- includes/templates/docs/docs-header.php | 2 +- includes/templates/docs/docs-loop.php | 2 +- includes/templatetags.php | 27 +++++++++++++++++++++++++ 5 files changed, 54 insertions(+), 7 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index f039d6b8..3fef79e2 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -324,6 +324,25 @@ function bp_docs_user_can( $action = 'edit', $user_id = false, $doc_id = false ) return $user_can; } +/** + * Can the current user create a Doc in this context? + * + * Is sensitive to group contexts (and the "associated with" permissions + * levels) + * + * @since 1.5 + * @return bool + */ +function bp_docs_current_user_can_create_in_context() { + if ( function_exists( 'bp_is_group' ) && bp_is_group() ) { + $can_create = bp_docs_current_user_can( 'associate_with_group' ); + } else { + $can_create = bp_docs_current_user_can( 'create' ); + } + + return apply_filters( 'bp_docs_current_user_can_create_in_context', $can_create ); +} + /** * Update the Doc count for a given item * diff --git a/includes/integration-groups.php b/includes/integration-groups.php index bc985d45..6325057d 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -267,8 +267,9 @@ function user_can( $user_can, $action, $user_id, $doc_id = false ) { $doc = bp_docs_get_current_doc(); // If we still haven't got a post by now, query based on doc id - if ( empty( $doc ) ) + if ( empty( $doc ) && ! empty( $doc_id ) ) { $doc = get_post( $doc_id ); + } if ( ! empty( $doc ) ) { $doc_settings = get_post_meta( $doc->ID, 'bp_docs_settings', true ); @@ -290,8 +291,8 @@ function user_can( $user_can, $action, $user_id, $doc_id = false ) { } // Default to the current group, but get the associated doc if not - $group_id = 0; - if ( ! empty( $doc ) ) { + $group_id = bp_get_current_group_id(); + if ( ! $group_id && ! empty( $doc ) ) { $group_id = bp_docs_get_associated_group_id( $doc->ID, $doc ); $group = groups_get_group( array( 'group_id' => $group_id ) ); } @@ -301,7 +302,7 @@ function user_can( $user_can, $action, $user_id, $doc_id = false ) { } switch ( $action ) { - case 'create' : + case 'associate_with_group' : $group_settings = groups_get_groupmeta( $group_id, 'bp-docs' ); // Provide a default value for legacy backpat @@ -1060,7 +1061,7 @@ function admin_markup() { diff --git a/includes/templatetags.php b/includes/templatetags.php index b60af887..858a278d 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -1845,14 +1845,17 @@ function bp_docs_get_doc_attachments( $doc_id = null ) { return array(); } - $atts = get_posts( array( + $atts_args = apply_filters( 'bp_docs_get_doc_attachments_args', array( 'post_type' => 'attachment', 'post_parent' => $doc_id, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'posts_per_page' => -1, - ) ); - return $atts; + ), $doc_id ); + + $atts = get_posts( $atts_args ); + + return apply_filters( 'bp_docs_get_doc_attachments', $atts, $doc_id ); } // @todo make
  • optional? From 2149cb9ca3396dbd42b22baa0eba8acbb91a89bc Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Dec 2013 10:18:48 -0500 Subject: [PATCH 095/126] When a user has not edited any Docs, force no entries for is_edited_by This prevents all documents from showing when a user has not edited any Docs. Fixes #332 --- includes/query-builder.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/query-builder.php b/includes/query-builder.php index fb9ab064..9c0a9477 100644 --- a/includes/query-builder.php +++ b/includes/query-builder.php @@ -276,6 +276,12 @@ function get_edited_by_post_ids() { $post_ids = array_merge( $post_ids, $this_author_post_ids ); } + // If the list is empty (the users haven't edited any Docs yet) + // force 0 so that no items are shown + if ( empty( $post_ids ) ) { + $post_ids = array( 0 ); + } + // @todo Might be faster to let the dupes through and let MySQL optimize return array_unique( $post_ids ); } From 7edd6444d4f9e652e032b4e64a3b0ef94aaf20ed Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Dec 2013 10:22:20 -0500 Subject: [PATCH 096/126] Update readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 129832c8..2fad87e4 100755 --- a/readme.txt +++ b/readme.txt @@ -35,6 +35,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.5.6 = * Allow current filter to be toggled by reclicking filter name +* Fix bug in "Edited by Me" logic when user has not edited any Docs = 1.5.5 = * Fix bug with permalinks in groups, introduced in change to is_singular() From 81cde5eb462d053b86e69df683ed7ea769050eb6 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Dec 2013 10:37:53 -0500 Subject: [PATCH 097/126] Display Trashed Docs on Started By Me page With some permissions schemas, it's possible for users to delete each other's Docs. This leaves them with Docs that have disappeared into the ether. This changeset shows deleted docs to users when viewing their Started By Me list. See #370 --- includes/css/screen.css | 2 +- includes/query-builder.php | 9 +++++++- includes/scss/screen.scss | 11 +++++++++ includes/templates/docs/docs-loop.php | 4 ++-- includes/templatetags.php | 33 +++++++++++++++++++++++++++ 5 files changed, 55 insertions(+), 4 deletions(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index 1af3eaaf..14f84917 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.doctable .bp-docs-trashed-doc-notice{color:red}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} diff --git a/includes/query-builder.php b/includes/query-builder.php index 9c0a9477..e987b310 100644 --- a/includes/query-builder.php +++ b/includes/query-builder.php @@ -54,7 +54,8 @@ function __construct( $args = array() ) { 'orderby' => 'modified', // 'modified', 'title', 'author', 'created' 'paged' => 1, 'posts_per_page' => 10, - 'search_terms' => '' + 'search_terms' => '', + 'status' => 'publish', ); $r = wp_parse_args( $args, $defaults ); @@ -217,6 +218,12 @@ function get_wp_query() { $wp_query_args['author'] = implode( ',', wp_parse_id_list( $this->query_args['author_id'] ) ); } + // If this is the user's "started by me" library, we'll include trashed posts + // Any edit to a trashed post restores it to status 'publish' + if ( ! empty( $this->query_args['author_id'] ) && $this->query_args['author_id'] == get_current_user_id() ) { + $wp_query_args['post_status'] = array( 'publish', 'trash' ); + } + // If an edited_by_id param has been passed, get a set // of post ids that have revisions authored by that user if ( ! empty( $this->query_args['edited_by_id'] ) ) { diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 769e9dd4..94c6da76 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -93,6 +93,9 @@ body.bp-docs div.page ul { } .doctable { + border-collapse: separate; + border-spacing: 0; + p { padding: 0; margin: 0; @@ -105,6 +108,14 @@ body.bp-docs div.page ul { tr:nth-child(even) { background-color: $grey; } + + .bp-doc-trashed-doc .attachment-clip-cell { + border-left: 4px solid red; + } + + .bp-docs-trashed-doc-notice { + color: red; + } } /* Theme compat overrides */ diff --git a/includes/templates/docs/docs-loop.php b/includes/templates/docs/docs-loop.php index c5524b0f..9616dc08 100644 --- a/includes/templates/docs/docs-loop.php +++ b/includes/templates/docs/docs-loop.php @@ -39,7 +39,7 @@
  • - + >
    - + diff --git a/includes/templates/docs/docs-header.php b/includes/templates/docs/docs-header.php index b7ce7376..89482e43 100644 --- a/includes/templates/docs/docs-header.php +++ b/includes/templates/docs/docs-header.php @@ -3,7 +3,7 @@ diff --git a/includes/templates/docs/docs-loop.php b/includes/templates/docs/docs-loop.php index 777fabe9..c5524b0f 100644 --- a/includes/templates/docs/docs-loop.php +++ b/includes/templates/docs/docs-loop.php @@ -93,7 +93,7 @@ - +

    create one?', 'bp-docs' ), bp_docs_get_create_link() ) ?>

    diff --git a/includes/templatetags.php b/includes/templatetags.php index 449d2916..d9b3fb38 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -725,6 +725,33 @@ function bp_docs_doc_associated_group_markup() { global $groups_template; bp_has_groups( $groups_args ); + // Filter out the groups where associate_with permissions forbid + $removed = 0; + foreach ( $groups_template->groups as $gtg_key => $gtg ) { + $this_group_settings = groups_get_groupmeta( $gtg->id, 'bp-docs' ); + if ( isset( $this_group_settings['can-create'] ) && in_array( $this_group_settings['can-create'], array( 'admin', 'mod' ) ) ) { + $is_admin = groups_is_user_admin( bp_loggedin_user_id(), $gtg->id ); + if ( 'mod' == $this_group_settings['can-create'] ) { + $is_mod = groups_is_user_mod( bp_loggedin_user_id(), $gtg->id ); + $remove = ! $is_mod && ! $is_admin; + } else { + $remove = ! $is_admin; + } + + if ( $remove ) { + unset( $groups_template->groups[ $gtg_key ] ); + $removed++; + } + } + } + + // cleanup, if necessary from filter above + if ( $removed ) { + $groups_template->groups = array_values( $groups_template->groups ); + $groups_template->group_count = $groups_template->group_count - $removed; + $groups_template->total_group_count = $groups_template->total_group_count - $removed; + } + ?>
    From c5fa1e506da5f74844924940f5230443350f47d2 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 10:24:49 -0400 Subject: [PATCH 059/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 73bdb4ea..9201ca86 100755 --- a/readme.txt +++ b/readme.txt @@ -39,6 +39,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented the activity action from being modified for the associated group * Fix bug that prevented activity from appearing in group activity streams * Fix bug that prevented attachment uploads on group Doc creation pages +* Recast "minimum role to create Doc in group" in terms of group association * Fix some textdomain errors * Add Directory Excerpt Length admin option * Fix "admins and mods of..." permissions setting From 37f47f5dd7ee8bbf7daf71e52981b8426dfa9e59 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 10:31:53 -0400 Subject: [PATCH 060/126] Don't let non-admin-mods use adminmods Permissions settings This was causing users to lock themselves out of Docs. Fixes #312 --- includes/integration-groups.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index 6325057d..687eb5f1 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -430,10 +430,18 @@ public static function get_access_options( $options, $settings_field, $doc_id = 'label' => sprintf( __( 'Members of %s', 'bp-docs' ), $group->name ) ); - $options[50] = array( - 'name' => 'admins-mods', - 'label' => sprintf( __( 'Admins and mods of %s', 'bp-docs' ), $group->name ) - ); + // "Admins and mods" setting only available to admins and mods + // Otherwise users end up locking themselves out + $group_settings = groups_get_groupmeta( $group_id, 'bp-docs' ); + $is_admin = groups_is_user_admin( bp_loggedin_user_id(), $group_id ); + $is_mod = groups_is_user_mod( bp_loggedin_user_id(), $group_id ); + + if ( $is_admin || $is_mod ) { + $options[50] = array( + 'name' => 'admins-mods', + 'label' => sprintf( __( 'Admins and mods of %s', 'bp-docs' ), $group->name ) + ); + } // Group-associated docs should have the edit/post // permissions limited to group-members by default. If From 7da8c12d036721d6c7811ee2f9eb92585a30db22 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 10:32:28 -0400 Subject: [PATCH 061/126] Whitespace --- includes/integration-groups.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index 687eb5f1..228c0c6f 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -412,12 +412,11 @@ public static function get_access_options( $options, $settings_field, $doc_id = } else if ( isset( $_GET['associated_group_id'] ) ) { $group_id = intval( $_GET['associated_group_id'] ); } else if ( isset( $_GET['group'] ) ) { - $maybe_group = BP_Groups_Group::get_id_from_slug( $_GET['group'] ); - if ( $maybe_group ) { - $group_id = $maybe_group; + $maybe_group = BP_Groups_Group::get_id_from_slug( $_GET['group'] ); + if ( $maybe_group ) { + $group_id = $maybe_group; } } - } $can_associate = self::user_can_associate_doc_with_group( bp_loggedin_user_id(), $group_id ); From 2180cc9344acf2da95da3828dea112b0dc7f45c1 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 10:33:15 -0400 Subject: [PATCH 062/126] Readme --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 9201ca86..5f1dc950 100755 --- a/readme.txt +++ b/readme.txt @@ -42,7 +42,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Recast "minimum role to create Doc in group" in terms of group association * Fix some textdomain errors * Add Directory Excerpt Length admin option -* Fix "admins and mods of..." permissions setting +* Fix "admins and mods of..." permissions setting and prevent non-admin-mods from locking themselves out of Docs * More accurate list of items on "Edited by..." tab * Improve the way attachment URLs are built * Allow Docs with empty content field From 7837500f5d02042cd16d37cea04af930e6b9ff9e Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 10:50:31 -0400 Subject: [PATCH 063/126] Fixes my-groups view For some reason, this was never actually implemented --- includes/integration-groups.php | 6 +++++- includes/templatetags.php | 25 ++++++++++++++++++++++++- includes/theme-bridge.php | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/includes/integration-groups.php b/includes/integration-groups.php index 228c0c6f..b65965f7 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -176,10 +176,14 @@ function get_current_view( $view, $item_type ) { */ function pre_query_args( $query_args, $bp_docs_query ) { if ( ! empty( $bp_docs_query->query_args['group_id'] ) ) { + $terms = array(); + foreach ( (array) $bp_docs_query->query_args['group_id'] as $gid ) { + $terms[] = bp_docs_get_term_slug_from_group_id( $gid ); + } $query_args['tax_query'][] = array( 'taxonomy' => bp_docs_get_associated_item_tax_name(), 'field' => 'slug', - 'terms' => bp_docs_get_term_slug_from_group_id( $bp_docs_query->query_args['group_id'] ), + 'terms' => $terms, ); } return $query_args; diff --git a/includes/templatetags.php b/includes/templatetags.php index d9b3fb38..3ad150ce 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -38,7 +38,14 @@ function bp_docs_has_docs( $args = array() ) { // Build some intelligent defaults // Default to current group id, if available - $d_group_id = bp_is_group() ? bp_get_current_group_id() : array(); + if ( bp_is_group() ) { + $d_group_id = bp_get_current_group_id(); + } else if ( bp_docs_is_mygroups_directory() ) { + $my_groups = groups_get_user_groups( bp_loggedin_user_id() ); + $d_group_id = ! empty( $my_groups['total'] ) ? $my_groups['groups'] : array( 0 ); + } else { + $d_group_id = array(); + } // If this is a Started By tab, set the author ID $d_author_id = bp_docs_is_started_by() ? bp_displayed_user_id() : array(); @@ -1755,6 +1762,22 @@ function bp_docs_is_global_directory() { return apply_filters( 'bp_docs_is_global_directory', $is_global_directory ); } +/** + * Is this the My Groups directory? + * + * @since 1.5 + * @return bool + */ +function bp_docs_is_mygroups_directory() { + $is_mygroups_directory = false; + + if ( is_post_type_archive( bp_docs_get_post_type_name() ) && get_query_var( BP_DOCS_MY_GROUPS_SLUG ) && ! get_query_var( BP_DOCS_CREATE_SLUG ) ) { + $is_mygroups_directory = true; + } + + return apply_filters( 'bp_docs_is_mygroups_directory', $is_mygroups_directory ); +} + function bp_docs_get_sidebar() { if ( $template = apply_filters( 'bp_docs_sidebar_template', '' ) ) { load_template( $template ); diff --git a/includes/theme-bridge.php b/includes/theme-bridge.php index 0d69ce4c..fe634f05 100644 --- a/includes/theme-bridge.php +++ b/includes/theme-bridge.php @@ -96,7 +96,7 @@ public function is_docs() { add_filter( 'bp_get_buddypress_template', array( $this, 'query_templates' ) ); - if ( bp_docs_is_global_directory() ) { + if ( bp_docs_is_global_directory() || bp_docs_is_mygroups_directory() ) { bp_update_is_directory( true, 'docs' ); do_action( 'bp_docs_screen_index' ); From 78e690dcb82b90f8c73eb3070d106615c99fc2cc Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 10:52:14 -0400 Subject: [PATCH 064/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 5f1dc950..1bb10545 100755 --- a/readme.txt +++ b/readme.txt @@ -41,6 +41,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented attachment uploads on group Doc creation pages * Recast "minimum role to create Doc in group" in terms of group association * Fix some textdomain errors +* Fix My Groups view * Add Directory Excerpt Length admin option * Fix "admins and mods of..." permissions setting and prevent non-admin-mods from locking themselves out of Docs * More accurate list of items on "Edited by..." tab From 5a519e41881386a985c256b7beb1d54f008a412e Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 12:08:27 -0400 Subject: [PATCH 065/126] Better form action creation for attachment directory filter --- includes/attachments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/attachments.php b/includes/attachments.php index ad11d2fd..a2533d01 100644 --- a/includes/attachments.php +++ b/includes/attachments.php @@ -522,7 +522,7 @@ public static function filter_type( $types ) { public static function filter_markup() { $has_attachment = isset( $_REQUEST['has-attachment'] ) && in_array( $_REQUEST['has-attachment'], array( 'yes', 'no' ) ) ? $_REQUEST['has-attachment'] : ''; - $form_action = wp_guess_url(); + $form_action = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; foreach ( $_GET as $k => $v ) { $form_action = remove_query_arg( $k, $form_action ); } From e289e619cd7e3e55d0926d19724dce4ea1d437ae Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 5 Sep 2013 12:09:13 -0400 Subject: [PATCH 066/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 1bb10545..fd0f4814 100755 --- a/readme.txt +++ b/readme.txt @@ -41,6 +41,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug that prevented attachment uploads on group Doc creation pages * Recast "minimum role to create Doc in group" in terms of group association * Fix some textdomain errors +* Fix incorrect form action for "has-attachment" filter in some cases * Fix My Groups view * Add Directory Excerpt Length admin option * Fix "admins and mods of..." permissions setting and prevent non-admin-mods from locking themselves out of Docs From fbe6b87415f42910f43ca2ce4c81ebca4054bdcf Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Fri, 6 Sep 2013 09:47:20 -0400 Subject: [PATCH 067/126] No need for a PHP 4 constructor --- includes/admin.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/includes/admin.php b/includes/admin.php index efc43a30..116ef569 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -9,17 +9,7 @@ class BP_Docs_Admin { /** - * PHP 4 constructor - * - * @package BuddyPress Docs - * @since 1.1.8 - */ - function bp_docs_admin() { - $this->__construct(); - } - - /** - * PHP 5 constructor + * Constructor * * @package BuddyPress Docs * @since 1.1.8 From ae1e7c260b482fb18c0fcab6cc1617a4c8d752e7 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Sep 2013 13:27:38 -0400 Subject: [PATCH 068/126] Adds method property to class definition --- includes/component.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/component.php b/includes/component.php index 7dc975d8..574622dd 100644 --- a/includes/component.php +++ b/includes/component.php @@ -25,6 +25,7 @@ class BP_Docs_Component extends BP_Component { var $includes_url; var $current_view; + var $slug_defined_in_wp_config = array(); /** * Constructor From 06ea481b016dba7cd09ef139006042e47ac478e7 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Sep 2013 13:57:48 -0400 Subject: [PATCH 069/126] Bumps version numbers to 1.5 --- loader.php | 4 ++-- readme.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/loader.php b/loader.php index 267699d5..37a93091 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.4.5 +Version: 1.5 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.4.5' ); +define( 'BP_DOCS_VERSION', '1.5' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index fd0f4814..820a019a 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: boonebgorges, cuny-academic-commons Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 -Tested up to: WordPress 3.5.1, BuddyPress 1.8 -Stable tag: 1.4.5 +Tested up to: WordPress 3.6, BuddyPress 1.8.1 +Stable tag: 1.5 Adds collaborative Docs to BuddyPress. From 826c028d29d94acf4c690854ab345d4a3ff347df Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Sep 2013 13:58:58 -0400 Subject: [PATCH 070/126] Temp rollback to 1.4.5 stable while I generate pot --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 820a019a..e0cb46e8 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 Tested up to: WordPress 3.6, BuddyPress 1.8.1 -Stable tag: 1.5 +Stable tag: 1.4.5 Adds collaborative Docs to BuddyPress. From b447b251672f289da679c0ce9834d654435a20ef Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Sep 2013 14:52:28 -0400 Subject: [PATCH 071/126] Update POT for 1.5 --- languages/bp-docs.pot | 416 +++++++++++++++++++++++++----------------- 1 file changed, 247 insertions(+), 169 deletions(-) diff --git a/languages/bp-docs.pot b/languages/bp-docs.pot index 36042471..67e69abe 100644 --- a/languages/bp-docs.pot +++ b/languages/bp-docs.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/buddypress-docs\n" -"POT-Creation-Date: 2013-05-24 17:18:20+00:00\n" +"POT-Creation-Date: 2013-09-09 18:47:51+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -35,9 +35,9 @@ msgstr "" msgid "Edit Doc" msgstr "" -#: bp-docs.php:261 includes/integration-groups.php:746 -#: includes/integration-groups.php:1268 -#: includes/templates/docs/docs-header.php:36 +#: bp-docs.php:261 includes/integration-groups.php:800 +#: includes/integration-groups.php:1266 +#: includes/templates/docs/docs-header.php:40 msgid "New Doc" msgstr "" @@ -57,8 +57,8 @@ msgstr "" msgid "No Docs found in Trash" msgstr "" -#: bp-docs.php:272 includes/component.php:39 -#: includes/integration-groups.php:1063 +#: bp-docs.php:272 includes/component.php:40 +#: includes/integration-groups.php:1061 msgid "BuddyPress Docs" msgstr "" @@ -86,11 +86,11 @@ msgstr "" msgid "You are not allowed to view that Doc's history." msgstr "" -#: includes/addon-hierarchy.php:110 +#: includes/addon-hierarchy.php:113 msgid "Parent: " msgstr "" -#: includes/addon-hierarchy.php:161 +#: includes/addon-hierarchy.php:164 msgid "Children: " msgstr "" @@ -139,7 +139,7 @@ msgstr "" msgid "Date Created" msgstr "" -#: includes/addon-history.php:429 includes/templates/docs/docs-loop.php:23 +#: includes/addon-history.php:429 includes/templates/docs/docs-loop.php:25 msgid "Author" msgstr "" @@ -147,8 +147,8 @@ msgstr "" msgid "Actions" msgstr "" -#: includes/addon-history.php:458 includes/integration-groups.php:755 -#: includes/templatetags.php:907 +#: includes/addon-history.php:458 includes/integration-groups.php:809 +#: includes/templatetags.php:941 msgid "History" msgstr "" @@ -164,7 +164,7 @@ msgstr "" msgid "Tags: %s" msgstr "" -#: includes/addon-taxonomy.php:357 includes/templates/docs/single/edit.php:97 +#: includes/addon-taxonomy.php:357 includes/templates/docs/single/edit.php:104 msgid "Tags" msgstr "" @@ -193,240 +193,318 @@ msgstr "" msgid "+ %s" msgstr "" -#: includes/admin.php:63 +#: includes/admin.php:32 includes/admin.php:44 +msgid "BuddyPress Docs Settings" +msgstr "" + +#: includes/admin.php:33 +msgid "Settings" +msgstr "" + +#: includes/admin.php:57 +msgid "General" +msgstr "" + +#: includes/admin.php:65 +msgid "Slug" +msgstr "" + +#: includes/admin.php:75 +msgid "Directory Excerpt Length" +msgstr "" + +#: includes/admin.php:85 +msgid "Users" +msgstr "" + +#: includes/admin.php:93 +msgid "User Tab Name" +msgstr "" + +#: includes/admin.php:104 +msgid "Groups" +msgstr "" + +#: includes/admin.php:112 +msgid "Group Tab Name" +msgstr "" + +#: includes/admin.php:123 includes/attachments.php:517 +#: includes/templates/docs/single/edit.php:68 +#: includes/templates/docs/single/index.php:32 includes/templatetags.php:1952 +msgid "Attachments" +msgstr "" + +#: includes/admin.php:131 +msgid "Enable Attachments" +msgstr "" + +#: includes/admin.php:147 +msgid "Change the slug used to build Docs URLs." +msgstr "" + +#: includes/admin.php:147 +msgid "" +"You have already defined this value in wp-config.php, so it " +"cannot be edited here." +msgstr "" + +#: includes/admin.php:157 +msgid "" +"Excerpts are shown on Docs directories, to provide better context. If your " +"theme or language requires longer or shorter excerpts, change this value. " +"Set to 0 to disable these excerpts." +msgstr "" + +#: includes/admin.php:167 +msgid "" +"Change the word on the BuddyPress group tab from 'Docs' to whatever you'd " +"like. Keep in mind that this will not change the text anywhere else on the " +"page. For a more thorough text change, create a language file for BuddyPress Docs." +msgstr "" + +#: includes/admin.php:177 +msgid "" +"Change the word on users' Docs tabs from 'Docs' to whatever you'd like. Keep " +"in mind that this will not change the text anywhere else on the page. For a " +"more thorough text change, create a language file for BuddyPress Docs." +msgstr "" + +#: includes/admin.php:187 +msgid "Enabled" +msgstr "" + +#: includes/admin.php:188 +msgid "Disabled" +msgstr "" + +#: includes/admin.php:190 +msgid "Allow users to add attachments to their Docs." +msgstr "" + +#: includes/admin.php:224 msgid "Recent Comments" msgstr "" -#: includes/admin.php:138 +#: includes/admin.php:299 msgid "No comments yet." msgstr "" -#: includes/attachments.php:61 includes/attachments.php:68 +#: includes/attachments.php:65 includes/attachments.php:72 msgid "File not found." msgstr "" -#: includes/attachments.php:289 +#: includes/attachments.php:293 msgid "Attachment deleted" msgstr "" -#: includes/attachments.php:291 +#: includes/attachments.php:295 msgid "Could not delete attachment" msgstr "" -#: includes/attachments.php:507 includes/templates/docs/single/edit.php:62 -#: includes/templates/docs/single/index.php:28 includes/templatetags.php:1867 -msgid "Attachments" -msgstr "" - -#: includes/attachments.php:523 +#: includes/attachments.php:533 msgid "Has attachment?" msgstr "" -#: includes/attachments.php:525 +#: includes/attachments.php:535 msgid "Yes" msgstr "" -#: includes/attachments.php:526 +#: includes/attachments.php:536 msgid "No" msgstr "" -#: includes/attachments.php:527 +#: includes/attachments.php:537 msgid "Doesn’t matter" msgstr "" -#: includes/attachments.php:529 +#: includes/attachments.php:539 msgid "Filter" msgstr "" -#: includes/component.php:157 +#: includes/component.php:158 msgid "Search Docs..." msgstr "" -#: includes/component.php:190 includes/component.php:296 -#: includes/integration-groups.php:740 includes/integration-groups.php:810 -#: includes/integration-groups.php:880 -msgid "Docs" -msgstr "" - -#: includes/component.php:203 includes/component.php:311 -#: includes/templatetags.php:1272 +#: includes/component.php:204 includes/component.php:312 +#: includes/templatetags.php:1331 msgid "Started By Me" msgstr "" -#: includes/component.php:210 includes/component.php:320 -#: includes/templatetags.php:1273 +#: includes/component.php:211 includes/component.php:321 +#: includes/templatetags.php:1332 msgid "Edited By Me" msgstr "" -#: includes/component.php:217 includes/templatetags.php:1297 +#: includes/component.php:218 includes/templatetags.php:1356 msgid "Create New Doc" msgstr "" -#: includes/component.php:308 +#: includes/component.php:309 msgid "My Docs " msgstr "" -#: includes/component.php:308 +#: includes/component.php:309 msgid "%s’s Docs" msgstr "" -#: includes/component.php:311 +#: includes/component.php:312 msgid "Started By %s" msgstr "" -#: includes/component.php:320 +#: includes/component.php:321 msgid "Edited By %s" msgstr "" -#: includes/component.php:409 +#: includes/component.php:410 msgid "" "This doc is currently being edited by %s. To prevent overwrites, you cannot " "edit until that user has finished. Please try again in a few minutes." msgstr "" -#: includes/component.php:422 +#: includes/component.php:423 msgid "You do not have permission to edit the doc." msgstr "" -#: includes/component.php:438 +#: includes/component.php:439 msgid "You do not have permission to create a Doc in this group." msgstr "" -#: includes/component.php:454 +#: includes/component.php:455 msgid "You do not have permission to view this Doc's history." msgstr "" -#: includes/component.php:478 +#: includes/component.php:479 msgid "Lock successfully removed" msgstr "" -#: includes/component.php:503 +#: includes/component.php:504 msgid "Doc successfully deleted!" msgstr "" -#: includes/component.php:505 +#: includes/component.php:506 msgid "Could not delete doc." msgstr "" -#: includes/component.php:508 +#: includes/component.php:509 msgid "You do not have permission to delete that doc." msgstr "" -#: includes/component.php:640 +#: includes/component.php:641 msgid "%1$s commented on the doc %2$s" msgstr "" -#: includes/component.php:736 +#: includes/component.php:737 msgid "Show New Docs" msgstr "" -#: includes/component.php:737 +#: includes/component.php:738 msgid "Show Doc Edits" msgstr "" -#: includes/component.php:738 +#: includes/component.php:739 msgid "Show Doc Comments" msgstr "" -#: includes/component.php:805 +#: includes/component.php:806 msgid "%1$s created the doc %2$s" msgstr "" -#: includes/component.php:807 +#: includes/component.php:808 msgid "%1$s edited the doc %2$s" msgstr "" -#: includes/component.php:1037 includes/component.php:1049 +#: includes/component.php:1042 includes/component.php:1054 msgid "Search" msgstr "" -#: includes/component.php:1100 +#: includes/component.php:1105 msgid "Upload File" msgstr "" -#: includes/component.php:1101 +#: includes/component.php:1106 msgid "OK" msgstr "" -#: includes/component.php:1102 +#: includes/component.php:1107 msgid "Still working?" msgstr "" #: includes/functions.php:160 +msgctxt "" +"Description for the associated-item taxonomy term. Of the form \"Docs " +"associated with the [item-type] [item-name]\" - item-type is group, user, etc" msgid "Docs associated with the %1$s %2$s" msgstr "" -#: includes/functions.php:480 includes/templatetags.php:1363 +#: includes/functions.php:499 includes/templatetags.php:1432 msgid "Logged-in Users" msgstr "" -#: includes/functions.php:485 includes/templatetags.php:1365 +#: includes/functions.php:504 includes/templatetags.php:1434 msgid "The Doc author only" msgstr "" -#: includes/functions.php:493 includes/templatetags.php:1362 +#: includes/functions.php:512 includes/templatetags.php:1431 msgid "Anyone" msgstr "" -#: includes/integration-groups.php:424 +#: includes/integration-groups.php:433 msgid "Members of %s" msgstr "" -#: includes/integration-groups.php:429 +#: includes/integration-groups.php:445 msgid "Admins and mods of %s" msgstr "" -#: includes/integration-groups.php:506 +#: includes/integration-groups.php:526 msgid "%1$s created the doc %2$s in the group %3$s" msgstr "" -#: includes/integration-groups.php:508 +#: includes/integration-groups.php:528 msgid "%1$s edited the doc %2$s in the group %3$s" msgstr "" -#: includes/integration-groups.php:535 +#: includes/integration-groups.php:578 msgid "%1$s commented on the doc %2$s in the group %3$s" msgstr "" -#: includes/integration-groups.php:609 +#: includes/integration-groups.php:652 msgid "Group" msgstr "" -#: includes/integration-groups.php:718 +#: includes/integration-groups.php:772 msgid "%s %d" msgstr "" -#: includes/integration-groups.php:753 -#: includes/templates/docs/docs-header.php:26 includes/templatetags.php:903 -#: includes/templatetags.php:1466 -msgid "Edit" -msgstr "" - -#: includes/integration-groups.php:795 -msgid "BuddyPress Docs group tab name:" -msgstr "" - -#: includes/integration-groups.php:822 -msgid "BuddyPress Docs Settings" +#: includes/integration-groups.php:794 includes/integration-groups.php:878 +#: includes/integration-groups.php:1423 includes/integration-users.php:192 +msgid "Docs" msgstr "" -#: includes/integration-groups.php:825 -msgid "Group Tab Name" +#: includes/integration-groups.php:807 +#: includes/templates/docs/docs-header.php:30 includes/templatetags.php:937 +#: includes/templatetags.php:1535 +msgid "Edit" msgstr "" -#: includes/integration-groups.php:981 +#: includes/integration-groups.php:979 msgid "Save Changes" msgstr "" -#: includes/integration-groups.php:1006 +#: includes/integration-groups.php:1004 msgid "There was an error saving, please try again" msgstr "" -#: includes/integration-groups.php:1008 +#: includes/integration-groups.php:1006 msgid "Settings saved successfully" msgstr "" -#: includes/integration-groups.php:1065 +#: includes/integration-groups.php:1063 msgid "" "BuddyPress Docs is a powerful tool for collaboration with members of your " "group. A cross between document editor and wiki, BuddyPress Docs allows you " @@ -434,101 +512,101 @@ msgid "" "can then sort and tag in a way that helps your group to get work done." msgstr "" -#: includes/integration-groups.php:1068 +#: includes/integration-groups.php:1066 msgid "Enable BuddyPress Docs for this group" msgstr "" -#: includes/integration-groups.php:1072 +#: includes/integration-groups.php:1070 msgid "Options" msgstr "" -#: includes/integration-groups.php:1077 -msgid "Minimum role to create new Docs:" +#: includes/integration-groups.php:1075 +msgid "Minimum role to associate Docs with this group:" msgstr "" -#: includes/integration-groups.php:1082 +#: includes/integration-groups.php:1080 msgid "Group admin" msgstr "" -#: includes/integration-groups.php:1083 +#: includes/integration-groups.php:1081 msgid "Group moderator" msgstr "" -#: includes/integration-groups.php:1084 +#: includes/integration-groups.php:1082 msgid "Group member" msgstr "" -#: includes/integration-groups.php:1265 +#: includes/integration-groups.php:1263 msgid "View Docs" msgstr "" -#: includes/query-builder.php:402 +#: includes/query-builder.php:410 msgid "Unknown error. Please try again." msgstr "" -#: includes/query-builder.php:422 +#: includes/query-builder.php:430 msgid "You are not allowed to associate a Doc with that group." msgstr "" -#: includes/query-builder.php:432 -msgid "Both the title and the content fields are required." +#: includes/query-builder.php:440 +msgid "The title field is required." msgstr "" -#: includes/query-builder.php:462 +#: includes/query-builder.php:469 msgid "There was an error when creating the doc." msgstr "" -#: includes/query-builder.php:471 +#: includes/query-builder.php:478 msgid "Doc successfully created!" msgstr "" -#: includes/query-builder.php:491 +#: includes/query-builder.php:498 msgid "There was an error when saving the doc." msgstr "" -#: includes/query-builder.php:500 +#: includes/query-builder.php:507 msgid "" "You idled a bit too long while in Edit mode. In order to allow others to " "edit the doc you were working on, your changes have been autosaved. Click " "the Edit button to return to Edit mode." msgstr "" -#: includes/query-builder.php:503 +#: includes/query-builder.php:510 msgid "Doc successfully edited!" msgstr "" -#: includes/query-builder.php:534 +#: includes/query-builder.php:541 msgid "" "Your Doc was successfully saved, but some of your access settings have been " "changed to match the Doc's permissions." msgstr "" -#: includes/templates/docs/docs-header.php:21 includes/templatetags.php:900 +#: includes/templates/docs/docs-header.php:25 includes/templatetags.php:934 msgid "Read" msgstr "" -#: includes/templates/docs/docs-loop.php:19 +#: includes/templates/docs/docs-loop.php:21 #: includes/templates/docs/single/edit.php:34 msgid "Title" msgstr "" -#: includes/templates/docs/docs-loop.php:27 +#: includes/templates/docs/docs-loop.php:29 msgid "Created" msgstr "" -#: includes/templates/docs/docs-loop.php:31 +#: includes/templates/docs/docs-loop.php:33 msgid "Last Edited" msgstr "" -#: includes/templates/docs/docs-loop.php:80 +#: includes/templates/docs/docs-loop.php:86 msgid "Viewing %1$s-%2$s of %3$s docs" msgstr "" -#: includes/templates/docs/docs-loop.php:91 +#: includes/templates/docs/docs-loop.php:97 msgid "There are no docs for this view. Why not create one?" msgstr "" -#: includes/templates/docs/docs-loop.php:93 +#: includes/templates/docs/docs-loop.php:99 msgid "There are no docs for this view." msgstr "" @@ -560,60 +638,60 @@ msgstr "" msgid "Permalink" msgstr "" -#: includes/templates/docs/single/edit.php:46 +#: includes/templates/docs/single/edit.php:48 msgid "Content" msgstr "" -#: includes/templates/docs/single/edit.php:70 +#: includes/templates/docs/single/edit.php:77 msgid "Associated Group" msgstr "" -#: includes/templates/docs/single/edit.php:84 +#: includes/templates/docs/single/edit.php:91 msgid "Access" msgstr "" -#: includes/templates/docs/single/edit.php:103 +#: includes/templates/docs/single/edit.php:110 msgid "Tags are words or phrases that help to describe and organize your Docs." msgstr "" -#: includes/templates/docs/single/edit.php:104 +#: includes/templates/docs/single/edit.php:111 msgid "" "Separate tags with commas (for example: orchestra, snare drum, piccolo, " "Brahms)" msgstr "" -#: includes/templates/docs/single/edit.php:118 +#: includes/templates/docs/single/edit.php:125 msgid "Parent" msgstr "" -#: includes/templates/docs/single/edit.php:124 +#: includes/templates/docs/single/edit.php:131 msgid "Select a parent for this Doc." msgstr "" -#: includes/templates/docs/single/edit.php:126 +#: includes/templates/docs/single/edit.php:133 msgid "" "(Optional) Assigning a parent Doc means that a link to the parent will " "appear at the bottom of this Doc, and a link to this Doc will appear at the " "bottom of the parent." msgstr "" -#: includes/templates/docs/single/edit.php:147 +#: includes/templates/docs/single/edit.php:154 msgid "Save" msgstr "" -#: includes/templates/docs/single/edit.php:147 +#: includes/templates/docs/single/edit.php:154 msgid "Cancel" msgstr "" -#: includes/templates/docs/single/edit.php:150 includes/templatetags.php:1795 +#: includes/templates/docs/single/edit.php:157 includes/templatetags.php:1880 msgid "Delete" msgstr "" -#: includes/templates/docs/single/edit.php:180 +#: includes/templates/docs/single/edit.php:187 msgid "Are you still there?" msgstr "" -#: includes/templates/docs/single/edit.php:182 +#: includes/templates/docs/single/edit.php:189 msgid "" "In order to prevent overwriting content, only one person can edit a given " "doc at a time. For that reason, you must periodically ensure the system that " @@ -622,7 +700,7 @@ msgid "" "others can access the doc." msgstr "" -#: includes/templates/docs/single/edit.php:184 +#: includes/templates/docs/single/edit.php:191 msgid "I'm still editing!" msgstr "" @@ -681,170 +759,170 @@ msgstr "" msgid "(no parent)" msgstr "" -#: includes/templatetags.php:191 +#: includes/templatetags.php:198 msgid "You are viewing all docs." msgstr "" -#: includes/templatetags.php:200 +#: includes/templatetags.php:207 msgid "" "View All Docs" msgstr "" -#: includes/templatetags.php:210 +#: includes/templatetags.php:217 msgid "Filter by: %s" msgstr "" -#: includes/templatetags.php:287 +#: includes/templatetags.php:294 msgid "You are searching for docs containing the term %s" msgstr "" -#: includes/templatetags.php:731 +#: includes/templatetags.php:765 msgid "Which group should this Doc be associated with?" msgstr "" -#: includes/templatetags.php:732 +#: includes/templatetags.php:766 msgid "" "(Optional) Note that the Access settings available for this Doc may be " "limited by the privacy settings of the group you choose." msgstr "" -#: includes/templatetags.php:737 +#: includes/templatetags.php:771 msgid "None" msgstr "" -#: includes/templatetags.php:784 +#: includes/templatetags.php:818 msgid "%s member" msgstr "" -#: includes/templatetags.php:784 +#: includes/templatetags.php:818 msgid "%s members" msgstr "" -#: includes/templatetags.php:788 +#: includes/templatetags.php:822 msgid "Public Group" msgstr "" -#: includes/templatetags.php:792 +#: includes/templatetags.php:826 msgid "Private Group" msgstr "" -#: includes/templatetags.php:796 +#: includes/templatetags.php:830 msgid "Hidden Group" msgstr "" -#: includes/templatetags.php:835 +#: includes/templatetags.php:869 msgid "Who can read this doc?" msgstr "" -#: includes/templatetags.php:839 +#: includes/templatetags.php:873 msgid "Who can edit this doc?" msgstr "" -#: includes/templatetags.php:843 +#: includes/templatetags.php:877 msgid "Who can read comments on this doc?" msgstr "" -#: includes/templatetags.php:847 +#: includes/templatetags.php:881 msgid "Who can post comments on this doc?" msgstr "" -#: includes/templatetags.php:851 +#: includes/templatetags.php:885 msgid "Who can view the history of this doc?" msgstr "" -#: includes/templatetags.php:1102 +#: includes/templatetags.php:1136 msgid "«" msgstr "" -#: includes/templatetags.php:1103 +#: includes/templatetags.php:1137 msgid "»" msgstr "" -#: includes/templatetags.php:1266 +#: includes/templatetags.php:1325 msgid "All Docs" msgstr "" -#: includes/templatetags.php:1270 +#: includes/templatetags.php:1329 msgid "%s's Docs" msgstr "" -#: includes/templatetags.php:1276 +#: includes/templatetags.php:1335 msgid "My Groups" msgstr "" -#: includes/templatetags.php:1348 +#: includes/templatetags.php:1417 msgid "Group: " msgstr "" -#: includes/templatetags.php:1350 +#: includes/templatetags.php:1419 msgid " %s" msgstr "" -#: includes/templatetags.php:1364 +#: includes/templatetags.php:1433 msgid "My Friends" msgstr "" -#: includes/templatetags.php:1366 +#: includes/templatetags.php:1435 msgid "Just Me" msgstr "" -#: includes/templatetags.php:1370 +#: includes/templatetags.php:1439 msgid "Members of: %s" msgstr "" -#: includes/templatetags.php:1371 +#: includes/templatetags.php:1440 msgid "Admins and mods of the group %s" msgstr "" -#: includes/templatetags.php:1375 +#: includes/templatetags.php:1444 msgid "The Doc author only (that's you!)" msgstr "" -#: includes/templatetags.php:1382 +#: includes/templatetags.php:1451 msgid "This Doc can be read by: %s" msgstr "" -#: includes/templatetags.php:1386 +#: includes/templatetags.php:1455 msgid "This Doc can be edited by: %s" msgstr "" -#: includes/templatetags.php:1390 +#: includes/templatetags.php:1459 msgid "Comments are visible to: %s" msgstr "" -#: includes/templatetags.php:1394 +#: includes/templatetags.php:1463 msgid "Comments can be posted by: %s" msgstr "" -#: includes/templatetags.php:1398 +#: includes/templatetags.php:1467 msgid "History can be viewed by: %s" msgstr "" -#: includes/templatetags.php:1440 +#: includes/templatetags.php:1509 msgid "Private" msgstr "" -#: includes/templatetags.php:1443 +#: includes/templatetags.php:1512 msgid "Public" msgstr "" -#: includes/templatetags.php:1446 +#: includes/templatetags.php:1515 msgid "Limited" msgstr "" -#: includes/templatetags.php:1451 +#: includes/templatetags.php:1520 msgid "Access: %s" msgstr "" -#: includes/templatetags.php:1452 +#: includes/templatetags.php:1521 msgid "Show Details" msgstr "" -#: includes/templatetags.php:1468 +#: includes/templatetags.php:1537 msgid "Hide Details" msgstr "" -#: includes/templatetags.php:1742 +#: includes/templatetags.php:1827 msgid "Add Files" msgstr "" From c8bf8dccc3b421c36302123ef1709f78eb821581 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Sep 2013 14:54:10 -0400 Subject: [PATCH 072/126] Bumps stable tag to 1.5 --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index e0cb46e8..820a019a 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 Tested up to: WordPress 3.6, BuddyPress 1.8.1 -Stable tag: 1.4.5 +Stable tag: 1.5 Adds collaborative Docs to BuddyPress. From 97ede33965620c7727bc5df5b4336483ee427007 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 10 Sep 2013 04:16:52 -0400 Subject: [PATCH 073/126] Add stubs for settings sections callbacks Fixes #360 --- includes/admin.php | 5 +++++ readme.txt | 3 +++ 2 files changed, 8 insertions(+) diff --git a/includes/admin.php b/includes/admin.php index 116ef569..f4b49392 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -136,6 +136,11 @@ public function setup_settings() { register_setting( 'bp-docs-settings', 'bp-docs-enable-attachments' ); } + public function general_section() {} + public function users_section() {} + public function groups_section() {} + public function attachments_section() {} + public function slug_setting_markup() { global $bp; diff --git a/readme.txt b/readme.txt index 820a019a..e63700b5 100755 --- a/readme.txt +++ b/readme.txt @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.5.1 = +* Fix debug warnings on Settings page + = 1.5 = * New standalone Settings panel, under Dashboard > BuddyPress Docs * Main Docs slug can now be changed via the admin From 71aa8fe189d1626eca48ab88fbf39b0767db663c Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 10 Sep 2013 04:19:08 -0400 Subject: [PATCH 074/126] Fix incorrect variable name to cache whether slug is set in wp-config --- includes/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin.php b/includes/admin.php index f4b49392..01b4d798 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -145,7 +145,7 @@ public function slug_setting_markup() { global $bp; $slug = bp_docs_get_docs_slug(); - $is_in_wp_config = 1 === $bp->bp_docs->docs_slug_defined_in_wp_config['slug']; + $is_in_wp_config = 1 === $bp->bp_docs->slug_defined_in_wp_config['slug']; ?> disabled="disabled" /> From 1a8ec7a9b81792ad698f8a7313b60dad56add344 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 10 Sep 2013 04:19:57 -0400 Subject: [PATCH 075/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index e63700b5..e24bf92e 100755 --- a/readme.txt +++ b/readme.txt @@ -35,6 +35,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.5.1 = * Fix debug warnings on Settings page +* Fix bug with Settings page when BP_DOCS_SLUG is set in wp-config.php = 1.5 = * New standalone Settings panel, under Dashboard > BuddyPress Docs From 3bc76b6719348527ce06532d6da57c344fdde589 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 17 Sep 2013 19:34:53 -0400 Subject: [PATCH 076/126] Use bp_docs_get_doc_settings() wrapper throughout This ensures certain Doc settings are always populated, even when the associated postmeta has been removed --- includes/attachments.php | 2 +- includes/caps.php | 2 +- includes/component.php | 2 +- includes/functions.php | 2 +- includes/integration-groups.php | 2 +- includes/templatetags.php | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/attachments.php b/includes/attachments.php index a2533d01..63ffe08c 100644 --- a/includes/attachments.php +++ b/includes/attachments.php @@ -215,7 +215,7 @@ public function get_htaccess_path() { public function get_is_private() { // if ( is_null( $this->is_private ) ) { $doc_id = $this->get_doc_id(); - $doc_settings = (array) get_post_meta( $doc_id, 'bp_docs_settings', true ); + $doc_settings = bp_docs_get_doc_settings( $doc_id ); $this->is_private = isset( $doc_settings['read'] ) && 'anyone' !== $doc_settings['read']; // } diff --git a/includes/caps.php b/includes/caps.php index 10a3c8c2..aee0fcc6 100644 --- a/includes/caps.php +++ b/includes/caps.php @@ -46,7 +46,7 @@ function bp_docs_map_meta_caps( $caps, $cap, $user_id, $args ) { } $post_type = get_post_type_object( $doc->post_type ); - $doc_settings = get_post_meta( $doc->ID, 'bp_docs_settings', true ); + $doc_settings = bp_docs_get_doc_settings( $doc_id ); // Reset all caps. We bake from scratch $caps = array(); diff --git a/includes/component.php b/includes/component.php index 574622dd..f45fe02f 100644 --- a/includes/component.php +++ b/includes/component.php @@ -606,7 +606,7 @@ function post_comment_activity( $comment_id ) { // Until better individual activity item privacy controls are available in BP, // comments will only be shown in the activity stream if "Who can read comments on // this doc?" is set to "Anyone", "Logged-in Users" or "Group members" - $doc_settings = get_post_meta( $doc_id, 'bp_docs_settings', true ); + $doc_settings = bp_docs_get_doc_settings( $doc_id ); if ( ! empty( $doc_settings['read_comments'] ) && ! in_array( $doc_settings['read_comments'], array( 'anyone', 'loggedin', 'group-members' ) ) ) { return false; diff --git a/includes/functions.php b/includes/functions.php index 3fef79e2..94782e32 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -281,7 +281,7 @@ function bp_docs_user_can( $action = 'edit', $user_id = false, $doc_id = false ) $user_can = false; if ( ! empty( $doc ) ) { - $doc_settings = get_post_meta( $doc_id, 'bp_docs_settings', true ); + $doc_settings = bp_docs_get_doc_settings( $doc_id ); $the_setting = isset( $doc_settings[ $action ] ) ? $doc_settings[ $action ] : ''; if ( empty( $the_setting ) ) { diff --git a/includes/integration-groups.php b/includes/integration-groups.php index b65965f7..afce5810 100644 --- a/includes/integration-groups.php +++ b/includes/integration-groups.php @@ -276,7 +276,7 @@ function user_can( $user_can, $action, $user_id, $doc_id = false ) { } if ( ! empty( $doc ) ) { - $doc_settings = get_post_meta( $doc->ID, 'bp_docs_settings', true ); + $doc_settings = bp_docs_get_doc_settings( $doc->ID ); // Manage settings don't always get set on doc creation, so we need a default if ( empty( $doc_settings['manage'] ) ) diff --git a/includes/templatetags.php b/includes/templatetags.php index 3ad150ce..9e9362fc 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -861,7 +861,7 @@ function bp_docs_doc_settings_markup( $doc_id = 0, $group_id = 0 ) { $doc_id = is_single() ? get_the_ID() : 0; } - $doc_settings = (array) get_post_meta( $doc_id, 'bp_docs_settings', true ); + $doc_settings = bp_docs_get_doc_settings( $doc_id ); $settings_fields = array( 'read' => array( @@ -895,7 +895,7 @@ function bp_docs_doc_settings_markup( $doc_id = 0, $group_id = 0 ) { } function bp_docs_access_options_helper( $settings_field, $doc_id = 0, $group_id = 0 ) { - $doc_settings = get_post_meta( $doc_id, 'bp_docs_settings', true ); + $doc_settings = bp_docs_get_doc_settings( $doc_id ); $setting = isset( $doc_settings[ $settings_field['name'] ] ) ? $doc_settings[ $settings_field['name'] ] : ''; ?> From dbc1cb936a99b3cb684365369d9d09291b2039f8 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 17 Sep 2013 19:41:45 -0400 Subject: [PATCH 077/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index e24bf92e..3dfdbf0b 100755 --- a/readme.txt +++ b/readme.txt @@ -34,6 +34,7 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == = 1.5.1 = +* Fix bug that prevented settings from being populated in some cases, resulting in improper permissions * Fix debug warnings on Settings page * Fix bug with Settings page when BP_DOCS_SLUG is set in wp-config.php From 0de94887d0b1a7b8ddf7b3441cf2f1cb69d0170c Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 17 Sep 2013 19:43:31 -0400 Subject: [PATCH 078/126] Bump version numbers to 1.5.1 --- loader.php | 4 ++-- readme.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/loader.php b/loader.php index 37a93091..07f6abec 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.5 +Version: 1.5.1 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.5' ); +define( 'BP_DOCS_VERSION', '1.5.1' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index 3dfdbf0b..dea61d76 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: boonebgorges, cuny-academic-commons Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 -Tested up to: WordPress 3.6, BuddyPress 1.8.1 -Stable tag: 1.5 +Tested up to: WordPress 3.6.1, BuddyPress 1.8.1 +Stable tag: 1.5.1 Adds collaborative Docs to BuddyPress. From 16553f7dab37e379aa3803dee06b7240bd08c999 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 17 Sep 2013 19:45:10 -0400 Subject: [PATCH 079/126] Add 'manage' cap to defaults --- includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 94782e32..64c91aea 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -447,7 +447,8 @@ function bp_docs_get_doc_settings( $doc_id = 0 ) { 'edit' => 'loggedin', 'read_comments' => 'anyone', 'post_comments' => 'anyone', - 'view_history' => 'anyone' + 'view_history' => 'anyone', + 'manage' => 'creator', ); $doc_settings = wp_parse_args( $saved_settings, $default_settings ); From 0af51f45ca53f0881fdbfc2043cec9c7fb016b39 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 28 Oct 2013 15:06:42 -0400 Subject: [PATCH 080/126] Use is_singular() rather than is_single() to check whether current page is single Doc --- includes/templatetags.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/templatetags.php b/includes/templatetags.php index 9e9362fc..e6dfcfdf 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -1246,8 +1246,7 @@ function bp_docs_is_existing_doc() { return false; } - $post_type_obj = get_queried_object(); - return is_single() && isset( $post_type_obj->post_type ) && bp_docs_get_post_type_name() == $post_type_obj->post_type; + return is_singular( bp_docs_get_post_type_name() ); } /** @@ -1604,7 +1603,7 @@ function bp_docs_is_single_doc() { // There's an odd bug in WP_Query that causes errors when attempting to access // get_queried_object() too early. The check for $wp_query->post is a workaround - if ( is_single() && ! empty( $wp_query->post ) ) { + if ( is_singular() && ! empty( $wp_query->post ) ) { $post = get_queried_object(); if ( isset( $post->post_type ) && bp_docs_get_post_type_name() == $post->post_type ) { From 88562793f42d211efec5fb5f76e1aac1db09ba8b Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 29 Oct 2013 17:02:04 -0400 Subject: [PATCH 081/126] Bump version numbers to 1.5.2 --- loader.php | 4 ++-- readme.txt | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/loader.php b/loader.php index 07f6abec..2b4a7820 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.5.1 +Version: 1.5.2 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.5.1' ); +define( 'BP_DOCS_VERSION', '1.5.2' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index dea61d76..42e1a36a 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: boonebgorges, cuny-academic-commons Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 -Tested up to: WordPress 3.6.1, BuddyPress 1.8.1 -Stable tag: 1.5.1 +Tested up to: WordPress 3.7, BuddyPress 1.8.1 +Stable tag: 1.5.2 Adds collaborative Docs to BuddyPress. @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.5.2 = +* Compatibility with WordPress 3.7 + = 1.5.1 = * Fix bug that prevented settings from being populated in some cases, resulting in improper permissions * Fix debug warnings on Settings page From 1166f8011b7b83fb7bc2605eaa5a0ef55444d999 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 30 Oct 2013 13:56:40 -0400 Subject: [PATCH 082/126] More 'is_singular' fixes --- includes/templatetags.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/templatetags.php b/includes/templatetags.php index e6dfcfdf..9572bfc2 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -347,7 +347,7 @@ function bp_docs_doc_link( $doc_id = false ) { */ function bp_docs_get_doc_link( $doc_id = false ) { if ( false === $doc_id ) { - if ( is_single() && $q = get_queried_object() ) { + if ( is_singular() && $q = get_queried_object() ) { $doc_id = isset( $q->ID ) ? $q->ID : 0; } else if ( get_the_ID() ) { $doc_id = get_the_ID(); @@ -715,7 +715,7 @@ function bp_docs_doc_associated_group_markup() { } // If the selected group is still 0, see if there's something in the db - if ( ! $selected_group && is_single() ) { + if ( ! $selected_group && is_singular() ) { $selected_group = bp_docs_get_associated_group_id( get_the_ID() ); } @@ -797,7 +797,7 @@ function bp_docs_associated_group_summary( $group_id = 0 ) { $group_slug = $_GET['group']; $group_id = BP_Groups_Group::get_id_from_slug( $group_slug ); } else { - $doc_id = is_single() ? get_the_ID() : 0; + $doc_id = is_singular() ? get_the_ID() : 0; $group_id = bp_docs_get_associated_group_id( $doc_id ); } } @@ -858,7 +858,7 @@ function bp_docs_doc_settings_markup( $doc_id = 0, $group_id = 0 ) { global $bp; if ( ! $doc_id ) { - $doc_id = is_single() ? get_the_ID() : 0; + $doc_id = is_singular() ? get_the_ID() : 0; } $doc_settings = bp_docs_get_doc_settings( $doc_id ); From 38119ea4e2feef32ae4cd6a7a77f802e5e028950 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 30 Oct 2013 13:57:50 -0400 Subject: [PATCH 083/126] Version number to 1.5.3 --- loader.php | 4 ++-- readme.txt | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/loader.php b/loader.php index 2b4a7820..a654ec47 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.5.2 +Version: 1.5.3 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.5.2' ); +define( 'BP_DOCS_VERSION', '1.5.3' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index 42e1a36a..301694d3 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: boonebgorges, cuny-academic-commons Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 -Tested up to: WordPress 3.7, BuddyPress 1.8.1 -Stable tag: 1.5.2 +Tested up to: WordPress 3.7.1, BuddyPress 1.8.1 +Stable tag: 1.5.3 Adds collaborative Docs to BuddyPress. @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.5.3 = +* More compatibility with WordPress 3.7 + = 1.5.2 = * Compatibility with WordPress 3.7 From 5c1f543a6da23c5ab1d432a330b2ab4c464aa341 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Fri, 1 Nov 2013 11:45:48 -0400 Subject: [PATCH 084/126] Set query_var to true when registering bp_docs post type With query_var set to false, individual Doc URLs were 404ing when permalink settings were set to "Post name". See http://core.trac.wordpress.org/ticket/25798 --- bp-docs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bp-docs.php b/bp-docs.php index acbe3145..6f7521f2 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -275,7 +275,7 @@ function register_post_type() { 'show_ui' => $this->show_cpt_ui(), 'hierarchical' => true, 'supports' => array( 'title', 'editor', 'revisions', 'excerpt', 'comments', 'author' ), - 'query_var' => false, + 'query_var' => true, 'has_archive' => true, 'rewrite' => array( 'slug' => bp_docs_get_docs_slug(), From 7d59f972d0683131d21cfaeac1353b64229c63c3 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Fri, 1 Nov 2013 11:50:26 -0400 Subject: [PATCH 085/126] Bump version numbers to 1.5.4 --- loader.php | 4 ++-- readme.txt | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/loader.php b/loader.php index a654ec47..3885020b 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.5.3 +Version: 1.5.4 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.5.3' ); +define( 'BP_DOCS_VERSION', '1.5.4' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index 301694d3..a757f1ac 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 Tested up to: WordPress 3.7.1, BuddyPress 1.8.1 -Stable tag: 1.5.3 +Stable tag: 1.5.4 Adds collaborative Docs to BuddyPress. @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.5.4 = +* Fix bug with WP 3.7 that caused single Docs to 404 when Permalinks were set to Page Name. + = 1.5.3 = * More compatibility with WordPress 3.7 From 3865a8047e1c01243ce1c630eb51caa8557d8f32 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Fri, 1 Nov 2013 19:53:40 -0400 Subject: [PATCH 086/126] Fix bug in the way doc permalinks are built inside of groups Using is_singular() is not a sufficient check because any groups pages is technically part of the Groups WP page. --- includes/templatetags.php | 2 +- readme.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/templatetags.php b/includes/templatetags.php index 9572bfc2..b60af887 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -347,7 +347,7 @@ function bp_docs_doc_link( $doc_id = false ) { */ function bp_docs_get_doc_link( $doc_id = false ) { if ( false === $doc_id ) { - if ( is_singular() && $q = get_queried_object() ) { + if ( is_singular( bp_docs_get_post_type_name() ) && $q = get_queried_object() ) { $doc_id = isset( $q->ID ) ? $q->ID : 0; } else if ( get_the_ID() ) { $doc_id = get_the_ID(); diff --git a/readme.txt b/readme.txt index a757f1ac..833ded62 100755 --- a/readme.txt +++ b/readme.txt @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.5.5 = +* Fix bug with permalinks in groups, introduced in change to is_singular() + = 1.5.4 = * Fix bug with WP 3.7 that caused single Docs to 404 when Permalinks were set to Page Name. From bdb86dcca13e23555cfd591b664f9a64876ee596 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Fri, 1 Nov 2013 19:56:45 -0400 Subject: [PATCH 087/126] Bump version numbers to 1.5.5 --- loader.php | 4 ++-- readme.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/loader.php b/loader.php index 3885020b..15f428b4 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.5.4 +Version: 1.5.5 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.5.4' ); +define( 'BP_DOCS_VERSION', '1.5.5' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index 833ded62..ba5ca5d7 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 Tested up to: WordPress 3.7.1, BuddyPress 1.8.1 -Stable tag: 1.5.4 +Stable tag: 1.5.5 Adds collaborative Docs to BuddyPress. From 1ca0868f545a6a816551e8759f58efef5dbc1713 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 4 Nov 2013 13:03:21 -0500 Subject: [PATCH 088/126] Update fr_FR. Thanks to Xavier Jiminez --- credits.txt | 2 +- languages/bp-docs-fr_FR.po | 1089 ++++++++++++++++++++++++++++-------- 2 files changed, 846 insertions(+), 245 deletions(-) diff --git a/credits.txt b/credits.txt index b426f00a..5a7e7775 100644 --- a/credits.txt +++ b/credits.txt @@ -16,7 +16,7 @@ Huge thanks go out to the individuals who donate their translations, making plug - Spanish: Selu Vega - Italian: Luca Camellini - German: Birgit, HansRuedi Keller -- French: stbouvier +- French: stbouvier, Xavier Jimenez - Swedish: Thomas Schneider - Brazilian Portuguese: John Morgenthaler - European Portuguese: André Barriguinha diff --git a/languages/bp-docs-fr_FR.po b/languages/bp-docs-fr_FR.po index 76eeb10e..ae392810 100755 --- a/languages/bp-docs-fr_FR.po +++ b/languages/bp-docs-fr_FR.po @@ -4,431 +4,1032 @@ msgid "" msgstr "" "Project-Id-Version: Buddypres Doc\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/buddypress-docs\n" -"POT-Creation-Date: 2011-03-31 13:49:02+00:00\n" +"POT-Creation-Date: 2013-09-09 18:47:51+00:00\n" +"PO-Revision-Date: 2013-10-30 15:53+0100\n" +"Last-Translator: xavier jimenez \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2011-06-28 13:00+0100\n" -"Last-Translator: \n" -"X-Poedit-Language: Français\n" -"X-Poedit-Country: FRENCH\n" -"Language-Team: \n" +"X-Generator: Poedit 1.5.7\n" -#: bp-docs.php:164 +#: bp-docs.php:256 msgctxt "post type general name" msgid "BuddyPress Docs" msgstr "Buddypress Docs" -#: bp-docs.php:165 +#: bp-docs.php:257 msgctxt "post type singular name" msgid "Doc" msgstr "Document" -#: bp-docs.php:166 +#: bp-docs.php:258 msgctxt "add new" msgid "Add New" msgstr "Ajouter nouveau" -#: bp-docs.php:167 +#: bp-docs.php:259 msgid "Add New Doc" msgstr "Ajouter nouveau document" -#: bp-docs.php:168 +#: bp-docs.php:260 msgid "Edit Doc" msgstr "Editer" -#: bp-docs.php:169 -#: includes/integration-groups.php:666 -#: includes/templates/docs/edit-doc.php:23 +#: bp-docs.php:261 includes/integration-groups.php:800 +#: includes/integration-groups.php:1266 +#: includes/templates/docs/docs-header.php:40 msgid "New Doc" msgstr "Nouveau document" -#: bp-docs.php:170 +#: bp-docs.php:262 msgid "View Doc" msgstr "Voir le document" -#: bp-docs.php:171 +#: bp-docs.php:263 msgid "Search Docs" msgstr "Chercher un document" -#: bp-docs.php:172 +#: bp-docs.php:264 msgid "No Docs found" msgstr "Aucun document trouvé" -#: bp-docs.php:173 +#: bp-docs.php:265 msgid "No Docs found in Trash" msgstr "Aucun document dans la corbeille" -#: bp-docs.php:180 -#: includes/integration-groups.php:568 +#: bp-docs.php:272 includes/component.php:40 +#: includes/integration-groups.php:1061 msgid "BuddyPress Docs" msgstr "BuddyPress Docs" -#: bp-docs.php:197 +#: bp-docs.php:291 msgid "Associated Items" msgstr "Objets associés" -#: bp-docs.php:198 +#: bp-docs.php:292 msgid "Associated Item" msgstr "Objet associé" -#: includes/templatetags-edit.php:104 -msgid "(no parent)" -msgstr "(aucun document parent)" +#: bp-docs.php:486 +msgid "You are not allowed to read that Doc." +msgstr "Vous ne pouvez pas consulter ce document" -#: includes/integration-bp.php:135 -msgid "This doc is currently being edited by %s. To prevent overwrites, you cannot edit until that user has finished. Please try again in a few minutes." -msgstr "Ce document est actuellement édité par %s. Pour éviter que votre travail ne soit écrasé, vous ne pouvez pas éditer ce document tant que l'utilisateur n'a pas terminé. Réessayez dans quelques minutes." +#: bp-docs.php:490 +msgid "You are not allowed to create Docs." +msgstr "Vous n'êtes pas autorisé à créer des documents" -#: includes/integration-bp.php:145 -msgid "You do not have permission to edit the doc." +#: bp-docs.php:494 +msgid "You are not allowed to edit that Doc." msgstr "Vous ne pouvez pas éditer ce document." -#: includes/integration-bp.php:167 -msgid "Lock successfully removed" -msgstr "Blocage levé" +#: bp-docs.php:498 +msgid "You are not allowed to view that Doc's history." +msgstr "Vous n'êtes pas autorisé à consulter l'historique de ce document." -#: includes/integration-bp.php:201 -msgid "Doc successfully deleted!" -msgstr "Document supprimé !" +#: includes/addon-hierarchy.php:113 +msgid "Parent: " +msgstr "Document parent :" -#: includes/integration-bp.php:203 -msgid "You do not have permission to delete that doc." -msgstr "Vous ne pouvez pas supprimer ce fichier" +#: includes/addon-hierarchy.php:164 +msgid "Children: " +msgstr "Documents enfants :" -#: includes/integration-bp.php:268 -msgid "Show New Docs" -msgstr "Montrer les nouveaux documents" +#: includes/addon-history.php:117 +msgid "You have successfully restored the Doc to the revision from %s." +msgstr "Mise à jour effectuée avec succès depuis %s" -#: includes/integration-bp.php:269 -msgid "Show Doc Edits" -msgstr "Montrer les documents édités" +#: includes/addon-history.php:165 +msgid "Compare Revisions of “%1$s”" +msgstr "Comparer les Versions de “%1$s”" -#: includes/integration-bp.php:270 -msgid "Show Doc Comments" -msgstr "Montrer les commentaires des documents" +#: includes/addon-history.php:166 includes/addon-history.php:195 +msgid "Revisions" +msgstr "Version" -#: includes/integration-bp.php:336 -msgid "%1$s created the doc %2$s" -msgstr "%1$s a créé le document %2$s" +#: includes/addon-history.php:194 +msgid "Revision for “%1$s” created on %2$s" +msgstr "Version pour “%1$s” créée le %2$s" -#: includes/integration-bp.php:338 -msgid "%1$s edited the doc %2$s" -msgstr "%1$s a édité le document %2$s" +#. translators: post revision: 1: when, 2: author name +#: includes/addon-history.php:360 +msgctxt "post revision" +msgid "%1$s by %2$s" +msgstr "%1$s par %2$s" -#: includes/integration-bp.php:450 -msgid "%1$s commented on the doc %2$s" -msgstr "%1$s a commenté le document %2$s" +#: includes/addon-history.php:387 +msgid "Restore" +msgstr "Restaurer" -#: includes/integration-bp.php:570 -msgid "Still working?" -msgstr "Travail toujours en cours ?" +#: includes/addon-history.php:410 +msgid "Compare Revisions" +msgstr "Comparer les révisions" + +#. translators: column name in revisons +#: includes/addon-history.php:426 +msgid "Old" +msgstr "Anciennes" + +#. translators: column name in revisons +#: includes/addon-history.php:427 +msgid "New" +msgstr "Nouveau document" + +#. translators: column name in revisons +#: includes/addon-history.php:428 +msgid "Date Created" +msgstr "Créé le" + +#: includes/addon-history.php:429 includes/templates/docs/docs-loop.php:25 +msgid "Author" +msgstr "Auteur" + +#: includes/addon-history.php:430 +msgid "Actions" +msgstr "Actions" + +#: includes/addon-history.php:458 includes/integration-groups.php:809 +#: includes/templatetags.php:941 +msgid "History" +msgstr "Historique" + +#: includes/addon-taxonomy.php:87 +msgid "Docs Tags" +msgstr "Tags" + +#: includes/addon-taxonomy.php:88 +msgid "Docs Tag" +msgstr "Tag du document" -#: includes/query-builder.php:151 -msgid "Groups that have docs associated with them" -msgstr "Groupes ayant des documents associés" +#: includes/addon-taxonomy.php:225 +msgid "Tags: %s" +msgstr "Tags : %s" + +#: includes/addon-taxonomy.php:357 includes/templates/docs/single/edit.php:104 +msgid "Tags" +msgstr "Tags" + +#: includes/addon-taxonomy.php:409 +msgid "You are viewing docs with the following tags: %s" +msgstr "Vous visualisez des documents portant les tags suivants: %s" + +#: includes/addon-taxonomy.php:418 +msgid "Tag" +msgstr "Tag" + +#: includes/addon-taxonomy.php:446 +msgid "(%d)" +msgstr "(%d)" + +#: includes/addon-taxonomy.php:528 +msgid "Docs tagged %s" +msgstr "Documents taggés %s" + +#: includes/addon-taxonomy.php:587 +msgid "Most Used" +msgstr "Plus usité" + +#. translators: %s: add new taxonomy label +#: includes/addon-taxonomy.php:611 +msgid "+ %s" +msgstr "+ %s" + +#: includes/admin.php:32 includes/admin.php:44 +msgid "BuddyPress Docs Settings" +msgstr "Paramètres de \"BuddyPress Docs\"" + +#: includes/admin.php:33 +msgid "Settings" +msgstr "Configuration" -#: includes/query-builder.php:155 -msgid "Users that have docs associated with them" -msgstr "Utilisateurs ayant des documents associés" +#: includes/admin.php:57 +msgid "General" +msgstr "Général" -#: includes/query-builder.php:164 +#: includes/admin.php:65 +msgid "Slug" +msgstr "" + +#: includes/admin.php:75 +msgid "Directory Excerpt Length" +msgstr "Taille de l'extrait du répertoire" + +#: includes/admin.php:85 +msgid "Users" +msgstr "Utilisateurs" + +#: includes/admin.php:93 +msgid "User Tab Name" +msgstr "Nom de l'onglet pour un utilisateur" + +#: includes/admin.php:104 msgid "Groups" msgstr "Groupes" -#: includes/query-builder.php:361 -msgid "Unknown error. Please try again." -msgstr "Erreur inconnue. Réessayez." +#: includes/admin.php:112 +msgid "Group Tab Name" +msgstr "Nom de l'onglet pour les groupes" -#: includes/query-builder.php:367 -msgid "Both the title and the content fields are required." -msgstr "Titre et contenu sont requis." +#: includes/admin.php:123 includes/attachments.php:517 +#: includes/templates/docs/single/edit.php:68 +#: includes/templates/docs/single/index.php:32 includes/templatetags.php:1952 +msgid "Attachments" +msgstr "Pièces jointes" -#: includes/query-builder.php:387 -msgid "There was an error when creating the doc." -msgstr "Erreur pendant la création du document" +#: includes/admin.php:131 +msgid "Enable Attachments" +msgstr "Autoriser les pièces jointes" -#: includes/query-builder.php:399 -msgid "Doc successfully created!" -msgstr "Document créé !" +#: includes/admin.php:147 +msgid "Change the slug used to build Docs URLs." +msgstr "Modifier le \"slug\" utilisé pour construire les URL vers Docs" -#: includes/query-builder.php:418 -msgid "There was an error when saving the doc." -msgstr "Erreur pendant l'enregistrement" +#: includes/admin.php:147 +msgid "" +"You have already defined this value in wp-config.php, so it " +"cannot be edited here." +msgstr "" +"Vous avez déjà défini cette valeur dans wp-config.php ; elle ne " +"peut donc pas être modifiée ici." -#: includes/query-builder.php:427 -msgid "You idled a bit too long while in Edit mode. In order to allow others to edit the doc you were working on, your changes have been autosaved. Click the Edit button to return to Edit mode." -msgstr "Vous êtes resté longtemps en mode édition ; pour permettre aux autres usagers d'éditer le document sur lequel vous travailliez, vos changements ont été automatiquement sauvegardés. Cliquez sur le bouton Editer pour retourner en mode édition." +#: includes/admin.php:157 +msgid "" +"Excerpts are shown on Docs directories, to provide better context. If your " +"theme or language requires longer or shorter excerpts, change this value. " +"Set to 0 to disable these excerpts." +msgstr "" +"Les résumés sont affichés dans les vues listant de nombreux documents. Si " +"votre thème ou langue nécessitent des résumés plus longs ou plus courts, " +"modifiez cette valeur. Une valeur de 0 désactive l'affichage " +"des résumés." -#: includes/query-builder.php:430 -msgid "Doc successfully edited!" -msgstr "Document édité avec succès !" +#: includes/admin.php:167 +msgid "" +"Change the word on the BuddyPress group tab from 'Docs' to whatever you'd " +"like. Keep in mind that this will not change the text anywhere else on the " +"page. For a more thorough text change, create a language file for BuddyPress Docs." +msgstr "" -#: includes/addon-hierarchy.php:100 -msgid "Parent: " -msgstr "Document parent :" +#: includes/admin.php:177 +msgid "" +"Change the word on users' Docs tabs from 'Docs' to whatever you'd like. Keep " +"in mind that this will not change the text anywhere else on the page. For a " +"more thorough text change, create a language file for BuddyPress Docs." +msgstr "" -#: includes/addon-hierarchy.php:143 -msgid "Children: " -msgstr "Documents enfants :" +#: includes/admin.php:187 +msgid "Enabled" +msgstr "Activé" -#: includes/integration-groups.php:276 -msgid "Doc creator only (%s)" -msgstr "Uniquement le créateur du document (%s)" +#: includes/admin.php:188 +msgid "Disabled" +msgstr "Désactivé" -#: includes/integration-groups.php:278 -msgid "Doc creator only (that's you!)" -msgstr "Uniquement le créateur du document (c'est vous !)" +#: includes/admin.php:190 +msgid "Allow users to add attachments to their Docs." +msgstr "" +"Permettre aux utilisateurs d'ajouter des pièces jointes à leurs documents" -#: includes/integration-groups.php:286 -msgid "Who can edit this doc?" -msgstr "Qui peut éditer ce document ?" +#: includes/admin.php:224 +msgid "Recent Comments" +msgstr "Commentaires récents" -#: includes/integration-groups.php:290 -#: includes/integration-groups.php:307 -#: includes/integration-groups.php:328 -msgid "All members of the group" -msgstr "Tous les membres du groupe" +#: includes/admin.php:299 +msgid "No comments yet." +msgstr "Aucun commentaire." -#: includes/integration-groups.php:295 -#: includes/integration-groups.php:310 -#: includes/integration-groups.php:331 -msgid "Only admins and mods of this group" -msgstr "Uniquement les administrateurs et modérateurs du groupe" +#: includes/attachments.php:65 includes/attachments.php:72 +msgid "File not found." +msgstr "Fichier introuvable." -#: includes/integration-groups.php:303 -msgid "Who can post comments on this doc?" -msgstr "Qui peut poster des commentaires sur ce document ?" +#: includes/attachments.php:293 +msgid "Attachment deleted" +msgstr "Pièce jointe supprimée" -#: includes/integration-groups.php:313 -#: includes/integration-groups.php:334 -msgid "No one" -msgstr "Personne" +#: includes/attachments.php:295 +msgid "Could not delete attachment" +msgstr "Impossible de supprimer la pièce jointe" -#: includes/integration-groups.php:320 -msgid "Who can read comments on this doc?" -msgstr "Qui peut lire les commentaires de ce document ?" +#: includes/attachments.php:533 +msgid "Has attachment?" +msgstr "A des pièces jointes ?" + +#: includes/attachments.php:535 +msgid "Yes" +msgstr "Oui" + +#: includes/attachments.php:536 +msgid "No" +msgstr "Non" + +#: includes/attachments.php:537 +msgid "Doesn’t matter" +msgstr "Sans importance" + +#: includes/attachments.php:539 +msgid "Filter" +msgstr "Filtrer" + +#: includes/component.php:158 +msgid "Search Docs..." +msgstr "Chercher un document" + +#: includes/component.php:204 includes/component.php:312 +#: includes/templatetags.php:1331 +msgid "Started By Me" +msgstr "Créés par moi" + +#: includes/component.php:211 includes/component.php:321 +#: includes/templatetags.php:1332 +msgid "Edited By Me" +msgstr "Modifiés par moi" + +#: includes/component.php:218 includes/templatetags.php:1356 +msgid "Create New Doc" +msgstr "Nouveau document" + +#: includes/component.php:309 +msgid "My Docs " +msgstr "Mes Documents" + +#: includes/component.php:309 +msgid "%s’s Docs" +msgstr "" + +#: includes/component.php:312 +msgid "Started By %s" +msgstr "Créés par %s" + +#: includes/component.php:321 +msgid "Edited By %s" +msgstr "Modifiés par %s" + +#: includes/component.php:410 +msgid "" +"This doc is currently being edited by %s. To prevent overwrites, you cannot " +"edit until that user has finished. Please try again in a few minutes." +msgstr "" +"Ce document est actuellement édité par %s. Pour éviter que votre travail ne " +"soit écrasé, vous ne pouvez pas éditer ce document tant que l'utilisateur " +"n'a pas terminé. Réessayez dans quelques minutes." + +#: includes/component.php:423 +msgid "You do not have permission to edit the doc." +msgstr "Vous ne pouvez pas éditer ce document." + +#: includes/component.php:439 +msgid "You do not have permission to create a Doc in this group." +msgstr "Vous ne pouvez pas créer un document pour ce groupe." + +#: includes/component.php:455 +msgid "You do not have permission to view this Doc's history." +msgstr "Vous n'êtes pas autorisé à consulter l'hstorique de ce document." + +#: includes/component.php:479 +msgid "Lock successfully removed" +msgstr "Blocage levé" + +#: includes/component.php:504 +msgid "Doc successfully deleted!" +msgstr "Document supprimé !" + +#: includes/component.php:506 +msgid "Could not delete doc." +msgstr "Impossible de supprimer le document." + +#: includes/component.php:509 +msgid "You do not have permission to delete that doc." +msgstr "Vous ne pouvez pas supprimer ce fichier" -#: includes/integration-groups.php:325 +#: includes/component.php:641 +msgid "%1$s commented on the doc %2$s" +msgstr "%1$s a commenté le document %2$s" + +#: includes/component.php:737 +msgid "Show New Docs" +msgstr "Montrer les nouveaux documents" + +#: includes/component.php:738 +msgid "Show Doc Edits" +msgstr "Montrer les documents édités" + +#: includes/component.php:739 +msgid "Show Doc Comments" +msgstr "Montrer les commentaires des documents" + +#: includes/component.php:806 +msgid "%1$s created the doc %2$s" +msgstr "%1$s a créé le document %2$s" + +#: includes/component.php:808 +msgid "%1$s edited the doc %2$s" +msgstr "%1$s a édité le document %2$s" + +#: includes/component.php:1042 includes/component.php:1054 +msgid "Search" +msgstr "Recherche" + +#: includes/component.php:1105 +msgid "Upload File" +msgstr "Envoyer le fichier" + +#: includes/component.php:1106 +msgid "OK" +msgstr "" + +#: includes/component.php:1107 +msgid "Still working?" +msgstr "Travail toujours en cours ?" + +#: includes/functions.php:160 +msgctxt "" +"Description for the associated-item taxonomy term. Of the form \"Docs " +"associated with the [item-type] [item-name]\" - item-type is group, user, etc" +msgid "Docs associated with the %1$s %2$s" +msgstr "Documents associés avec le %1$s %2$s" + +#: includes/functions.php:499 includes/templatetags.php:1432 +msgid "Logged-in Users" +msgstr "Utilisateurs connectés" + +#: includes/functions.php:504 includes/templatetags.php:1434 +msgid "The Doc author only" +msgstr "L'auteur uniquement" + +#: includes/functions.php:512 includes/templatetags.php:1431 msgid "Anyone" msgstr "Tout le monde" -#: includes/integration-groups.php:362 +#: includes/integration-groups.php:433 +msgid "Members of %s" +msgstr "Membres de %s" + +#: includes/integration-groups.php:445 +msgid "Admins and mods of %s" +msgstr "Administrateurs et modérateurs de %s" + +#: includes/integration-groups.php:526 msgid "%1$s created the doc %2$s in the group %3$s" msgstr "%1$s a créé le document %2$s dans le groupe %3$s" -#: includes/integration-groups.php:364 +#: includes/integration-groups.php:528 msgid "%1$s edited the doc %2$s in the group %3$s" msgstr "%1$s a édité le document %2$s dans le groupe %3$s" -#: includes/integration-groups.php:391 +#: includes/integration-groups.php:578 msgid "%1$s commented on the doc %2$s in the group %3$s" msgstr "%1$s a commenté le document %2$s dans le groupe %3$s" -#: includes/integration-groups.php:449 +#: includes/integration-groups.php:652 +msgid "Group" +msgstr "Groupe" + +#: includes/integration-groups.php:772 +msgid "%s %d" +msgstr "" + +#: includes/integration-groups.php:794 includes/integration-groups.php:878 +#: includes/integration-groups.php:1423 includes/integration-users.php:192 msgid "Docs" msgstr "Documents" -#: includes/integration-groups.php:517 +#: includes/integration-groups.php:807 +#: includes/templates/docs/docs-header.php:30 includes/templatetags.php:937 +#: includes/templatetags.php:1535 +msgid "Edit" +msgstr "Editer" + +#: includes/integration-groups.php:979 msgid "Save Changes" msgstr "Enregistrer les modifications" -#: includes/integration-groups.php:548 +#: includes/integration-groups.php:1004 msgid "There was an error saving, please try again" msgstr "Erreur pendant la sauvegarde, merci de réessayer" -#: includes/integration-groups.php:550 +#: includes/integration-groups.php:1006 msgid "Settings saved successfully" msgstr "La configuration a été sauvegardée" -#: includes/integration-groups.php:570 -msgid "BuddyPress Docs is a powerful tool for collaboration with members of your group. A cross between document editor and wiki, BuddyPress Docs allows you to co-author and co-edit documents with your fellow group members, which you can then sort and tag in a way that helps your group to get work done." -msgstr "Buddypress Docs est un outil puissant pour la collaboration entre membres de votre groupe. A mi-chemin entre l'éditeur et le wiki, BuddyPress Docs vous permet de co-écrire et co-éditer des documents avec les autres membres du groupe, documents que vous pouvez ensuite trier et tagger de manière à aider votre groupe a avancé" +#: includes/integration-groups.php:1063 +msgid "" +"BuddyPress Docs is a powerful tool for collaboration with members of your " +"group. A cross between document editor and wiki, BuddyPress Docs allows you " +"to co-author and co-edit documents with your fellow group members, which you " +"can then sort and tag in a way that helps your group to get work done." +msgstr "" +"Buddypress Docs est un outil puissant pour la collaboration entre membres de " +"votre groupe. A mi-chemin entre l'éditeur et le wiki, BuddyPress Docs vous " +"permet de co-écrire et co-éditer des documents avec les autres membres du " +"groupe, documents que vous pouvez ensuite trier et tagger de manière à aider " +"votre groupe a avancé" + +#: includes/integration-groups.php:1066 +msgid "Enable BuddyPress Docs for this group" +msgstr "Activer \"BuddyPress Docs\" pour ce groupe" + +#: includes/integration-groups.php:1070 +msgid "Options" +msgstr "Options" + +#: includes/integration-groups.php:1075 +msgid "Minimum role to associate Docs with this group:" +msgstr "Rôle minimal pour povoir associer des documents avec ce groupe:" + +#: includes/integration-groups.php:1080 +msgid "Group admin" +msgstr "Administrateur du groupe" + +#: includes/integration-groups.php:1081 +msgid "Group moderator" +msgstr "Modérateur du groupe" -#: includes/integration-groups.php:663 +#: includes/integration-groups.php:1082 +msgid "Group member" +msgstr "Membre du groupe" + +#: includes/integration-groups.php:1263 msgid "View Docs" msgstr "Voir les documents" -#: includes/addon-taxonomy.php:86 -msgid "Docs Tags" -msgstr "Tags" +#: includes/query-builder.php:410 +msgid "Unknown error. Please try again." +msgstr "Erreur inconnue. Réessayez." -#: includes/addon-taxonomy.php:87 -msgid "Docs Tag" -msgstr "Tag du document" +#: includes/query-builder.php:430 +msgid "You are not allowed to associate a Doc with that group." +msgstr "Vous n'êtes pas autorisé à associer un document à ce groupe" -#: includes/addon-taxonomy.php:212 -msgid "Tags: %s" -msgstr "Tags : %s" +#: includes/query-builder.php:440 +msgid "The title field is required." +msgstr "Veuillez saisir un titre" -#: includes/addon-taxonomy.php:343 -#: includes/templates/docs/edit-doc.php:50 -msgid "Tags" -msgstr "Tags" +#: includes/query-builder.php:469 +msgid "There was an error when creating the doc." +msgstr "Erreur pendant la création du document" -#: includes/addon-taxonomy.php:392 -msgid "You are viewing docs with the following tags: %s" -msgstr "Vous visualisez des documents portant les tags suivants: %s" +#: includes/query-builder.php:478 +msgid "Doc successfully created!" +msgstr "Document créé !" -#: includes/addon-taxonomy.php:414 -msgid "Filter by tag" -msgstr "Filtrer par tag" +#: includes/query-builder.php:498 +msgid "There was an error when saving the doc." +msgstr "Erreur pendant l'enregistrement" -#: includes/addon-taxonomy.php:420 -msgid "(%d)" +#: includes/query-builder.php:507 +msgid "" +"You idled a bit too long while in Edit mode. In order to allow others to " +"edit the doc you were working on, your changes have been autosaved. Click " +"the Edit button to return to Edit mode." msgstr "" +"Vous êtes resté longtemps en mode édition ; pour permettre aux autres " +"usagers d'éditer le document sur lequel vous travailliez, vos changements " +"ont été automatiquement sauvegardés. Cliquez sur le bouton Editer pour " +"retourner en mode édition." -#: includes/addon-taxonomy.php:502 -msgid "Docs tagged %s" -msgstr "Documents taggés %s" - -#: includes/addon-taxonomy.php:561 -msgid "Most Used" -msgstr "Plus usité" +#: includes/query-builder.php:510 +msgid "Doc successfully edited!" +msgstr "Document édité avec succès !" -#: includes/addon-taxonomy.php:585 -msgid "+ %s" +#: includes/query-builder.php:541 +msgid "" +"Your Doc was successfully saved, but some of your access settings have been " +"changed to match the Doc's permissions." msgstr "" +"Votre document a été enregistré. Quelques ajustements à vos autorisations " +"ont été faits pour s'accorder avec les droits associés au document." -#: includes/templatetags.php:69 -msgid "You are viewing all docs." -msgstr "Vous visualisez tous les documents." +#: includes/templates/docs/docs-header.php:25 includes/templatetags.php:934 +msgid "Read" +msgstr "Lire" -#: includes/templatetags.php:78 -msgid "View All Docs" -msgstr "Voir tous les documents" +#: includes/templates/docs/docs-loop.php:21 +#: includes/templates/docs/single/edit.php:34 +msgid "Title" +msgstr "Titre" -#: includes/templatetags.php:113 -msgid "You are searching for docs containing the term %s" -msgstr "Vous recherchez des documents contenant le terme %s " +#: includes/templates/docs/docs-loop.php:29 +msgid "Created" +msgstr "Créateur" -#: includes/templatetags.php:441 -msgid "View" -msgstr "Voir" +#: includes/templates/docs/docs-loop.php:33 +msgid "Last Edited" +msgstr "Dernière édition" -#: includes/templatetags.php:444 -#: includes/templates/docs/single-doc.php:8 -msgid "Edit" -msgstr "Editer" +#: includes/templates/docs/docs-loop.php:86 +msgid "Viewing %1$s-%2$s of %3$s docs" +msgstr "%1$s-%2$s de %3$s documents" -#: includes/templatetags.php:679 -msgid "«" -msgstr "«" +#: includes/templates/docs/docs-loop.php:97 +msgid "There are no docs for this view. Why not create one?" +msgstr "" +"Il n'y a pas de document pour cette vue. Pourquoi ne pas en créer un?" -#: includes/templatetags.php:680 -msgid "»" -msgstr "»" +#: includes/templates/docs/docs-loop.php:99 +msgid "There are no docs for this view." +msgstr "Aucun document à afficher." -#: includes/templates/docs/comments.php:22 +#: includes/templates/docs/index.php:23 includes/theme-bridge.php:165 +msgid "Docs Directory" +msgstr "Base documentaire" + +#: includes/templates/docs/single/comments.php:27 msgid "Discussion (%d)" msgstr "Discussion (%d)" -#: includes/templates/docs/comments.php:44 +#: includes/templates/docs/single/comments.php:49 msgid "There are no comments for this doc yet." msgstr "Il n'y a pas encore de commentaire." -#: includes/templates/docs/comments.php:53 +#: includes/templates/docs/single/comments.php:58 msgid "Comment display has been disabled on this doc." msgstr "Visualisation des commentaires désactivée." -#: includes/templates/docs/comments.php:62 +#: includes/templates/docs/single/comments.php:67 msgid "Comment posting has been disabled on this doc." msgstr "Commentaires désactivés." -#: includes/templates/docs/edit-doc.php:14 +#: includes/templates/docs/single/edit.php:23 msgid "You have been idle for " msgstr "vous êtes inactif depuis " -#: includes/templates/docs/edit-doc.php:32 -#: includes/templates/docs/docs-loop.php:25 -msgid "Title" -msgstr "Titre" +#: includes/templates/docs/single/edit.php:40 +msgid "Permalink" +msgstr "" -#: includes/templates/docs/edit-doc.php:36 +#: includes/templates/docs/single/edit.php:48 msgid "Content" msgstr "contenu" -#: includes/templates/docs/edit-doc.php:56 +#: includes/templates/docs/single/edit.php:77 +msgid "Associated Group" +msgstr "Groupe associé" + +#: includes/templates/docs/single/edit.php:91 +msgid "Access" +msgstr "Accéder" + +#: includes/templates/docs/single/edit.php:110 msgid "Tags are words or phrases that help to describe and organize your Docs." -msgstr "Les tags sont des mots ou phrases qui aident à décrire et organiser vos documents." +msgstr "" +"Les tags sont des mots ou phrases qui aident à décrire et organiser vos " +"documents." -#: includes/templates/docs/edit-doc.php:57 -msgid "Separate tags with commas (for example: orchestra, snare drum, piccolo, Brahms)" -msgstr "Séparer les tags avec des virgules (par exemple : orchestre, contrebasse, Brahms)" +#: includes/templates/docs/single/edit.php:111 +msgid "" +"Separate tags with commas (for example: orchestra, snare drum, piccolo, " +"Brahms)" +msgstr "" +"Séparer les tags avec des virgules (par exemple : orchestre, " +"contrebasse, Brahms)" -#: includes/templates/docs/edit-doc.php:71 +#: includes/templates/docs/single/edit.php:125 msgid "Parent" msgstr "Document parent" -#: includes/templates/docs/edit-doc.php:77 +#: includes/templates/docs/single/edit.php:131 msgid "Select a parent for this Doc." msgstr "Sélectionner un document parent pour ce document." -#: includes/templates/docs/edit-doc.php:79 -msgid "(Optional) Assigning a parent Doc means that a link to the parent will appear at the bottom of this Doc, and a link to this Doc will appear at the bottom of the parent." -msgstr "(Optionnel) Assigner un document parent fera qu'un lien au document parent apparaîtra au bas de ce document, et inversement." - -#: includes/templates/docs/edit-doc.php:94 -msgid "Settings" -msgstr "Configuration" +#: includes/templates/docs/single/edit.php:133 +msgid "" +"(Optional) Assigning a parent Doc means that a link to the parent will " +"appear at the bottom of this Doc, and a link to this Doc will appear at the " +"bottom of the parent." +msgstr "" +"(Optionnel) Assigner un document parent fera qu'un lien au document parent " +"apparaîtra au bas de ce document, et inversement." -#: includes/templates/docs/edit-doc.php:112 +#: includes/templates/docs/single/edit.php:154 msgid "Save" msgstr "Sauvegarder" -#: includes/templates/docs/edit-doc.php:112 +#: includes/templates/docs/single/edit.php:154 msgid "Cancel" msgstr "Annuler" -#: includes/templates/docs/edit-doc.php:131 +#: includes/templates/docs/single/edit.php:157 includes/templatetags.php:1880 +msgid "Delete" +msgstr "Supprimer" + +#: includes/templates/docs/single/edit.php:187 msgid "Are you still there?" msgstr "Etes-vous toujours là ?" -#: includes/templates/docs/edit-doc.php:133 -msgid "In order to prevent overwriting content, only one person can edit a given doc at a time. For that reason, you must periodically ensure the system that you're still actively editing. If you are idle for more than 30 minutes, your changes will be auto-saved, and you'll be sent out of Edit mode so that others can access the doc." -msgstr "Pour éviter que du contenu ne soit écrasé, une seule personne à la fois peut éditer un document donné. Pour cette raison, vous devez régulièrement vous assurez que vous êtes toujours en cours d'édition. Si vous êtes inactif plus de 30 minutes, vos changements seront automatiquement sauvegardés, et vous quitterez le mode édition pour permettre aux autres d'accéder au document" +#: includes/templates/docs/single/edit.php:189 +msgid "" +"In order to prevent overwriting content, only one person can edit a given " +"doc at a time. For that reason, you must periodically ensure the system that " +"you're still actively editing. If you are idle for more than 30 minutes, " +"your changes will be auto-saved, and you'll be sent out of Edit mode so that " +"others can access the doc." +msgstr "" +"Pour éviter que du contenu ne soit écrasé, une seule personne à la fois peut " +"éditer un document donné. Pour cette raison, vous devez régulièrement vous " +"assurez que vous êtes toujours en cours d'édition. Si vous êtes inactif plus " +"de 30 minutes, vos changements seront automatiquement sauvegardés, et vous " +"quitterez le mode édition pour permettre aux autres d'accéder au document" -#: includes/templates/docs/edit-doc.php:135 +#: includes/templates/docs/single/edit.php:191 msgid "I'm still editing!" msgstr "Je suis toujours en mode édition !" -#: includes/templates/docs/docs-loop.php:8 -msgid "Search" -msgstr "Recherche" +#: includes/templates/docs/single/history.php:9 +msgid "Click on a revision date from the list below to view that revision." +msgstr "" +"Cliquez sur une date ci-dessous pour consulter la version correspondante." -#: includes/templates/docs/docs-loop.php:29 -msgid "Author" -msgstr "Auteur" +#: includes/templates/docs/single/history.php:11 +msgid "" +"Alternatively, you can compare two revisions by selecting them in the 'Old' " +"and 'New' columns, and clicking 'Compare Revisions'." +msgstr "" +"Vous pouvez également comparer deux versions en les sélectionnant dans les " +"colonnes 'Anciennes' et 'Nouvelles\", puis en cliquant sur 'Comparer les " +"versions'" -#: includes/templates/docs/docs-loop.php:33 -msgid "Created" -msgstr "Créateur" +#: includes/templates/docs/single/history.php:22 +msgid "Older: %s" +msgstr "Plus ancien : %s" -#: includes/templates/docs/docs-loop.php:37 -msgid "Last Edited" -msgstr "Dernière édition" +#: includes/templates/docs/single/history.php:23 +msgid "Newer: %s" +msgstr "Plus récent : %s" -#: includes/templates/docs/docs-loop.php:80 -msgid "Viewing %1$s-%2$s of %3$s docs" -msgstr "%1$s-%2$s de %3$s documents" +#: includes/templates/docs/single/history.php:30 +msgid "" +"You are currently viewing a revision titled \"%1$s\", saved on %2$s by %3$s" +msgstr "" +"Vous visualisez une version nommée \"%1$s\", enregistrée le %2$s par %3$s" -#: includes/templates/docs/docs-loop.php:90 -msgid "There are no docs for this view. Why not create one?" -msgstr "Il n'y a pas de document pour cette vue. Pourquoi ne pas en créer un?" +#: includes/templates/docs/single/history.php:52 +msgid "These revisions are identical." +msgstr "Ces versions sont identiques" -#: includes/templates/docs/single-doc.php:15 +#: includes/templates/docs/single/index.php:7 msgid "Locked" msgstr "Bloqué" -#: includes/templates/docs/single-doc.php:17 -msgid "This doc is currently being edited by %1$s. In order to prevent edit conflicts, only one user can edit a doc at a time." -msgstr "Ce document est actuellement édité par %1$s. Pour éviter des conflits, un seul utilisateur à la fois peut éditer le document." +#: includes/templates/docs/single/index.php:7 +msgid "(click for more info)" +msgstr "(clicques pour plus d'info)" -#: includes/templates/docs/single-doc.php:20 -msgid "Please try again in a few minutes. Or, as an admin, you can force cancel the edit lock." -msgstr "S'il-vous-plaît réessayez dans quelques minutes. Ou, en tant qu'administrateur, vous pouvez forcer le déblocage de l'édition." +#: includes/templates/docs/single/index.php:9 +msgid "" +"This doc is currently being edited by %1$s. In order to prevent edit " +"conflicts, only one user can edit a doc at a time." +msgstr "" +"Ce document est actuellement édité par %1$s. Pour éviter des conflits, un " +"seul utilisateur à la fois peut éditer le document." + +#: includes/templates/docs/single/index.php:12 +msgid "" +"Please try again in a few minutes. Or, as an admin, you can force cancel the edit lock." +msgstr "" +"S'il-vous-plaît réessayez dans quelques minutes. Ou, en tant " +"qu'administrateur, vous pouvez forcer le déblocage de " +"l'édition." -#: includes/templates/docs/single-doc.php:22 +#: includes/templates/docs/single/index.php:14 msgid "Please try again in a few minutes." msgstr "S'il-vous-plaît réessayez dans quelques minutes." +#: includes/templatetags-edit.php:115 +msgid "(no parent)" +msgstr "(aucun document parent)" + +#: includes/templatetags.php:198 +msgid "You are viewing all docs." +msgstr "Vous visualisez tous les documents." + +#: includes/templatetags.php:207 +msgid "" +"View All Docs" +msgstr "" +"Voir tous les documents" + +#: includes/templatetags.php:217 +msgid "Filter by: %s" +msgstr "Filtrer par: %s" + +#: includes/templatetags.php:294 +msgid "You are searching for docs containing the term %s" +msgstr "Vous recherchez des documents contenant le terme %s " + +#: includes/templatetags.php:765 +msgid "Which group should this Doc be associated with?" +msgstr "A quel groupe ce document doit-il être rattaché ?" + +#: includes/templatetags.php:766 +msgid "" +"(Optional) Note that the Access settings available for this Doc may be " +"limited by the privacy settings of the group you choose." +msgstr "" +"(option) Notez que les droits d'accès à ce document peuvent être limités par " +"ceux du groupe que vous choisirez." + +#: includes/templatetags.php:771 +msgid "None" +msgstr "Aucun" + +#: includes/templatetags.php:818 +msgid "%s member" +msgstr "%s membre" + +#: includes/templatetags.php:818 +msgid "%s members" +msgstr "%s membres" + +#: includes/templatetags.php:822 +msgid "Public Group" +msgstr "Groupe Public" + +#: includes/templatetags.php:826 +msgid "Private Group" +msgstr "Groupe Privé" + +#: includes/templatetags.php:830 +msgid "Hidden Group" +msgstr "Groupe Caché" + +#: includes/templatetags.php:869 +msgid "Who can read this doc?" +msgstr "Qui peut lire ce document ?" + +#: includes/templatetags.php:873 +msgid "Who can edit this doc?" +msgstr "Qui peut éditer ce document ?" + +#: includes/templatetags.php:877 +msgid "Who can read comments on this doc?" +msgstr "Qui peut lire les commentaires de ce document ?" + +#: includes/templatetags.php:881 +msgid "Who can post comments on this doc?" +msgstr "Qui peut poster des commentaires sur ce document ?" + +#: includes/templatetags.php:885 +msgid "Who can view the history of this doc?" +msgstr "Qui peut consulter l'historique de ce document ?" + +#: includes/templatetags.php:1136 +msgid "«" +msgstr "«" + +#: includes/templatetags.php:1137 +msgid "»" +msgstr "»" + +#: includes/templatetags.php:1325 +msgid "All Docs" +msgstr "Tous les Documents" + +#: includes/templatetags.php:1329 +msgid "%s's Docs" +msgstr "Documents de %s" + +#: includes/templatetags.php:1335 +msgid "My Groups" +msgstr "Mes Groupes" + +#: includes/templatetags.php:1417 +msgid "Group: " +msgstr "Groupe:" + +#: includes/templatetags.php:1419 +msgid " %s" +msgstr "" + +#: includes/templatetags.php:1433 +msgid "My Friends" +msgstr "Mes Relations" + +#: includes/templatetags.php:1435 +msgid "Just Me" +msgstr "Moi uniquement" + +#: includes/templatetags.php:1439 +msgid "Members of: %s" +msgstr "Membres de: %s" + +#: includes/templatetags.php:1440 +msgid "Admins and mods of the group %s" +msgstr "Administrateurs et Modérateurs du groupe %s" + +#: includes/templatetags.php:1444 +msgid "The Doc author only (that's you!)" +msgstr "Uniquement le créateur du document (c'est vous !)" + +#: includes/templatetags.php:1451 +msgid "This Doc can be read by: %s" +msgstr "Ce document peut être consulté par : %s" + +#: includes/templatetags.php:1455 +msgid "This Doc can be edited by: %s" +msgstr "Ce document peut être modifié par : %s" + +#: includes/templatetags.php:1459 +msgid "Comments are visible to: %s" +msgstr "Commentaires visibles pour: %s" + +#: includes/templatetags.php:1463 +msgid "Comments can be posted by: %s" +msgstr "Les commentaires peuvent être postés par : %s" + +#: includes/templatetags.php:1467 +msgid "History can be viewed by: %s" +msgstr "L'historique peut être consulté par: %s" + +#: includes/templatetags.php:1509 +msgid "Private" +msgstr "Privé" + +#: includes/templatetags.php:1512 +msgid "Public" +msgstr "Public" + +#: includes/templatetags.php:1515 +msgid "Limited" +msgstr "Limité" + +#: includes/templatetags.php:1520 +msgid "Access: %s" +msgstr "Accès: %s" + +#: includes/templatetags.php:1521 +msgid "Show Details" +msgstr "Voir les détails" + +#: includes/templatetags.php:1537 +msgid "Hide Details" +msgstr "Cacher les détails" + +#: includes/templatetags.php:1827 +msgid "Add Files" +msgstr "Ajouter des fichiers" + +#: includes/theme-bridge.php:223 +msgid "Create a Doc" +msgstr "Créer un document" + +#: includes/upgrade.php:40 +msgid "Upgrade complete!" +msgstr "Mise à jour terminée!" + +#: includes/upgrade.php:61 includes/upgrade.php:99 +msgid "" +"Thanks for updating BuddyPress Docs. We need to run a few quick operations " +"before your new Docs is ready to use." +msgstr "" + +#: includes/upgrade.php:62 +msgid "Click here to start the upgrade." +msgstr "" + +#: includes/upgrade.php:70 includes/upgrade.php:91 +msgid "BuddyPress Docs Upgrade" +msgstr "Mise à jour de \"BuddyPress Docs\"" + +#: includes/upgrade.php:71 +msgid "Upgrade" +msgstr "" + +#: includes/upgrade.php:101 +msgid "Start the upgrade" +msgstr "" + +#: includes/upgrade.php:107 +msgid "Migrating..." +msgstr "" + +#: includes/upgrade.php:138 +msgid "Migration complete! Dashboard" +msgstr "" + +#: includes/upgrade.php:243 +msgid "Docs associated with the group %s" +msgstr "Documents associés au groupe %s" + +#: includes/upgrade.php:258 +msgid "Group terms migrated. Now migrating Doc access terms...." +msgstr "" + +#: includes/upgrade.php:306 +msgid "Migrated %s of %s Docs. Migrating...." +msgstr "" + +#~ msgid "All members of the group" +#~ msgstr "Tous les membres du groupe" + +#~ msgid "No one" +#~ msgstr "Personne" + +#~ msgid "View" +#~ msgstr "Voir" From ba17bc76ac53a3b9186c76e2092821d3d0a76862 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 4 Nov 2013 13:03:48 -0500 Subject: [PATCH 089/126] Adds missing fr_FR changes --- languages/bp-docs-fr_FR.mo | Bin 10465 -> 19117 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/languages/bp-docs-fr_FR.mo b/languages/bp-docs-fr_FR.mo index b612a66d8d9bc74806e6b815bd8cc125f4e2106e..af405a022b8341476f80f521678beb4433421290 100755 GIT binary patch literal 19117 zcmbW83zS_~S;tRlN@;3A3I&8dc2Xvj(A-JVw6;vrwCN-bX_F@8RiGf8x%bS>N$)*p za?ZUonIQ58A5=jpf)7L#NqAIIP~@S)v|!~aE+0#m;B(z4%|1Dbt_DwmTfsMj-v@pQ zybk;e@EPF6mq*caKnGp|-UY4&kB8@%ffw_9GGGC&;rR@B7JMc6N^s*-m>)a~UJCvW zsCItsD2*;)$XI9=SX)I1wN_1_Mv{RF6S?h5rsK((6;n1gEfgP`Q(b)eSw>)<~4 z`EYoD8A_pft^n139VohO0yX{wsCn-MwcZzjTHg$~1)K*(xA%gg%ZEV8#m7SZ!{CKH ze+kt1e-!Hf0(>0Le-CQhe*m8b{yQkSy$oR&y{`t<|5{Msa?7u3ABf$PEj z;0)LX)$Wf$jsKUR+J6HSo&E*X`2PcHe`}m?|5Q->x)RiU2SBwu0jl4^81yZnK*(Nz#*6dVT~I0^0rUkhFbJ_2q6{|!{TYp(V7aUVFw^Axxl zd;pvWKMlSG9DlZ#)6avB=dXa;&$mI*h_lqHRc>!w#VNLYY5LM&^es^9yy8Z`&kdmX@Z5kC0S|(r%RQjv_7&iz;Jd&lfgb>$ z41NN9D)>bZQxp9ysPQgD2=x9kQ0=b)#h)#p18)G;?|68B5)_@z1bj89b^b7@aoz#S z{=6U5ejWj}zkdP04gMFX@%{;=QT>HC`*|+~wVr2z8h-?I;AZd{;6YIHOo3N`^Pu|Q zAMgQCbp3fy{Qn5}6mSug-2N#j{rekGdU_Q~_eS`+8{4z8lo@i^Fph6u(b_ zqU#)}dENv{Zr=uKp3i{V-xtBFz&{7o?mt2C^KrX8J{{Ejo56d*mx7x2-Zl~{J!KiKmS$WGk87> zir*=yaqb820ndTkzzcSJzq1{@hUa_1E5Vn8vdeD=5rOC{;A_CkZYPES-wcW`FPre~ zr$EWaYr)IGp9QZ49|XS#{0b<(eGSz6Z-H9Rg?qf+y#^E=j)FVD0z_1!2SK&_I=B_Q zaIdGs4d7io-wd+#=yjmz{t!3{{s$=iyXFpJaqxK{tcvajZva0BY92XpOhL30RKFtN z&wwm3`ZQR8kAEIA4laOW;77slfL{mS3jXze&#$>VJ-^=oihpkfp8)W8wQf;FBn4DGyU#PT5Ggf^r{4pC6`tn(|W06DiN3=<{^S(?6ag%>N0QMyjjnM{gkr258w z%F)v8$(v=gp&g&<G#0`jOIL&jOj z#^NsZ?KHd3b#vQiXfvO-+b*7+P2$4QMiiLLyWPCw@+qEDn|-s3v(`|5U+*5JcM?`I zHn`Bc^KRl7q{((Sn@L%^GU;|%d+Fl2IBmz1?Zi#xMZEymi5J{t!Uj4<1>hC z#m$9&Z(DQXJbxGRo@>tJd6_VOvz<2YvoSk)kwE^b9P(v(SmCDVIyX{AJIij7XVbfO z#%`uarfyk3Qm%L1wA)T@S$`r;=G|_nC3dXeHT1Z1OT266me4u!dkQe_szFD}!6xEc z8SQSh+#P8<@!#%d21cj0lfpF-y_2^}v4X{|P%8=sVdi~Uo4(}pu2&`noX=g%9C5cB zH)o_YRz<(Gu#Jq-x|N=W|yib7`sdItX7T?W8GYi3OcX zkVg--Tcft(QFbv(_ja$7m0og;`06n_5k@^yjX25zvV}ZLqTNiU$;+-plCg{A)(EN2 zo2e=1J}K>B#r|&6S^5kW>Ych4D@7v*s(9V&&g4aOd#}}6I9y2dOuLpmyQ4uKmo{|A zXQzv}l`N}AA<(;gJ}IVptUk}%CTx%aY0eACi>aDVyE8$_jj3$6@cbKdyIr%$SLBcSf-j{B6OV=8U-KEhEZa4ErY49JKGih_CmIBz2xiT-X9?aj3r^WBs&7+QHQ)ZI(tW6#EA$gllx^6x%?qkvn)tiX3 zX3~x(X5wsGil4Z$-J6zpGGOi|duh96OmN4K94Ki&Lk0G0+(i?nv=AMQY9{81BTy zweB`B+VCqroo9Im$w`XNm^&o@VrIVM)=LQoI(RA7>wDF;(OsBLUJ|}%aVL4nde?CE z8wc}DiZ`3l+w78VbIqzFT8Lo5!k)CilI6vM+k3j16ti7-Ajzh?Gtr(P8v4@g;aCwt z^S2D@%AUC_)V#fb&RXQKE?V{`7@rm1_;A2pl=d{^4K}?aj>j_N^%IebrL4 zQ~PIIM`+cG0x7*llr#B!rXbCh*b3WB6YLD?I$Pv(X^VgZW1AFME~NH!cg*ddlKqkQ zPdbUi_O&q`y%_6JB&T`|Qo1%?nl8L!ibA~;&q79SR+a{_n2X!JWK8B<6Ygy0tz_5M zom&i56O4eSDwBGQu}D7I6lW^$Wi5La6{*%-(%6wQ+LvTW5x1j#=9%oTI~Gs6yOB^| ziSNaehwmY}^X>5K^hNmmON^b>m(laEPknEFYxKOd)xui&Ie19io}^2RL`!TR!dqcw zRb&LuV^#K#c7ltQ9Ae_uMf+hG3v1vRlXW-4NJJi^?q&%s;HvDH zM!`N$6F!*JQWO~zGj$;Q9Tvh-ftJwT2N#_lCYu4$yp=ZbT?;PB%AO((xrPNyqD(uT zkbzOEeLN5oawtHt`B-%&C1!ZjR)`lZwxe_Awr_P%zSotgnJ{^&kpCmP!1&@M^F|rZ zB`qJLXg2?*wEg#>!IYD3Cu3C3XzT-~q3>`WUgI=qm13qGn z4&;QNL#CrhIuN;KZw#cr4czN-1#ZznI}22?U;oJ@?_ipxonFTkxw)IZ<@AbXafSu& z(-O_`=pdd(P_qK!tNq3A2;yMCDl`xh+u$0kZJE8k98bp#$-mf5v6jHbvB%KF z9V%cZ`a@qSUO$>04Cr@ZxtfVMNL-@G-6YTCxDA(>NXLq9Qen`&!@Wtuk;p@+JCek$ z=t$C(#8lp$XX#}E`l#6);&Lxt`3{*!b4OMCGCGP_+8^hmCTcjJHD>}CD+a%hjg9fB zupF8xLSQ+ydB*hWE!FbdxQP%0idE2RqZ%fs>~8#O*Bc8tloP1eE=k8UbW2*mJ5!GYmX=niQ` zUJjwP+SFXbpm-e`YDaC^=d3LKl7Uue;O?1OFjqFD13qw(F_#8FJ6q1YSDvIO*d>gF ztT29wYOd6FUgrcGlP;!DtfX4o(5TkZ4?WZl<*$NvA3NacvaURYhJkc@phyUurK{(0 zaZ8)yeO8aMtuc!gcbdIIx`UUQOtg=B9;cuYm$QPSG`m6QGKF#I;%sUksq^=shtwQ> z-{|-B=<_n`F-1zlUO9L*4X^0l*3g4mIyW(dNm^s>G1%8*%5y}=v->gy zZ6*WD`;A561T2|FGP=n+YT7vzR?HO1dG&)JJ(ZEAN?>38#aD^KqH9Ce&vG0jkF*D>tv@+KxDwHmJ8WO>hU z=u8|!YKIBJhJLFTCS~+OvKmtKzIdsRwm)#LHAB&I>qU|ESYAaYm1|Ji#j=&vNMgDj z`)NZITb~XXP$UZeA4xD0j@2tz(k~bRx^V7ZWo(lzlPa36+RDiHsI3C2SQleqCIiL# zqn768L>U>vmaLsl1;hiY>tclozdPoolug3})yu9(T4mcHPn~YFk@~Y#O>O)@D;-3Y z4zYPEvoDggaxOI40+~~z3{K{5u9#{~f%=0fQ zkl5SHr6jgZ#BDKafs_E&LGmNxYUd=yT>gkOKiiN=OQ*+XXJ*5337O0}b5}M8x2bh8 zfINraf{kyo^LC&WO{6>*hNR5t7sfc;?B5R zdvO23z5R`E8{4{e!e{3i#~|xC2JLir3z^9@+ab9s;Oi~NkKNI@x!+E!m`aMq-i*8j z^c{CMBjsyf(C`TeTi)T^WOv)xjbk^h_19o=QP79Zp&rPq^aI1_X9tXQE;CDw^lOG&0H z#4W4xe)jL~eH*R9cTLl*a%%Qyf3xGl@MZ|Z7d z+fEQgT=?eeE z0}Gx_7teC<=}zV;IZxwf+tyV{1`)D`haq!_!Q#2;xNQ<*Q8%%q_RSQM98rT5nh~~K zJZG14d6vcG0D=Z9h$3N{G12JmtckSpbyPGMy;~Es;Rzwz-d$GCQSs;BN`7U#^o)n zi@6s?sZfNo11i9NIbMlIrD$WS(v|@oyx>EJVZIW*VF7cwD!c{N9bYGHkX#`(1)=q( zJ!*E1t%x1abLA^OBdvTmjbuXd#^O2dTNr=}dr~Oom7x|P?$VQ{v5n|N>#5gOiSg#z z5|w6Z{4`$Xl$2#mGIDZzOoQuH%AM&uBuW;~GC6dNIi?qwl>Rn}!MMcFns9q}mi5|6 zLHexs1N#ipky61$VK*sn`syJ)~h zl$Lu&23Hbf#e=uE49Z;VTcogz__9F>$y)*;r~J{rVG? zfq-qxQ;?AkS4q~3_IH@iUtZEMsGWu;oj9nGt2gXBHKl!*Sl<-Vrr#OU7ooAzKm`s#aL^UWJHNbt*BB-pPgKBbCpUeF6lRr&PfWW zJgR6cg-=CSiR(yb2q+c6Ygi>PG#{?$lP|(VV`G)AW zm%c>_>NI@vIIyJ%8ax zYpfg!%|@;F;Di>X=oXO7QP0OLO-#Bna2;=L&Jg=>uc)If=5@>+$4vO|TF8>Cz*@~E zOMV}^Zq1di!%t>_?b{|PB*3gY7jNFyFsZV%I9wf7tgW&`hGA$EjnISSv85X z;6j+ey9c5d-C5M(M?Y$_yC6(s9ma{fRqQfQ>z(a*aJr0V>tDj@zEhsy7eO#m5QKt3 z2d@@oVxt42K1-tq1)5#wqfD7>jH@iTHe97$27lyqr%VYkMI93mT)-UshGKo0+jY@l z`C%C^xi3w@CWBStjEY>L)ADsOp$*sjs!H%FI?y6>JmQ0}Qd2~;VRagtu?CC{!j{1b zl9`&!O9jTlZY0g+waBiX5u-V}nrE{g-qT(a)sjhWsIiO@8J0T8JdKya)cMnZ7F4pMV*cdiK!hLY$@D@>*Ac% zL6Bj>npgD!gFLgs(GUdqGlaryYHBq^qEbj!O~~&#$kTWqA9&?&GLe_txg?Wrw39ji zbgBm)9}IS3V8)T3#Rk!}U~FXY$yDUX;)k_zU1r9_R^rZVKBuFCH~Xwn8d%#3?*lkM zd5sz8N)RgdFc7TZAT4XlX-`KI&hB}7mx~D3nJ8}5dHb-dRuU)RzhHA4vQNliH z(a zG0Iv*A?ooGwLI(z=?jUl4xX>iRhmJdxbwwmQuw)=;gG>u zx$kRpPbB;tvW*&*_$O$MlyEVG$nS5vY?R+duxTCA zF)xZv;8}fE31+1~v`%LhktN00aDO`13kX7Ik&=EYbr>tm56x3~Uq9EdN^2V?zW&~L zFQ+M)ZGK21ysZM546*=^6RCSkOg0)c&X8B+mBdp)&Bbc{F&&Le;I6FkLgWU#R%g`%JkQ8?RotOTA$36xau4))`SLKUd#{*NU%N z*lAANI|Ka}o)b#=WTQUVmP}%ab<%~JGJ%#`WKn|-mwGnnqsT|;AMD+*JM&XMnj(-~ zvZW2R>r-if#E-THZ+y;A*)SVFY4#BbIt5=V(_q$xbF>+0e~r!|7!eBh=*}-;fF+f2 zzlld~|t zE04vYwP_yMn~2JFah=^v$D%n&*6{hVl~@MwG#Y{FyBA?8I&zt#`axsr9=6ZYCUc_1)P+uCWsCd96 zjk)JnN38fHzW@#=d89xq4z|c28~6o5wdN_3l|DV}O5N)DA7C5#Exz^_e%^Q~)*U#j Y6X*?JbNTCD3oLYJzvKd=J~T%E3kQxmW&i*H delta 3546 zcma)+du$ZP8NkQ9Ap`;jI}jI-jh~zkpD`~RgWs=&cWeVOAzj}s_J;EG218&zr4^rb4Q`cPZ-_wAjD)K+Ro z_wDbSow@m*vsW(Wy|*uOd-nv@nD=@pwt@p1dPE;a231>Bk(uy zURbzLsdX?0=flAq<8XrcF?bhTu}G;-s3G%=I*K9(cu;IU3s=Aka4EbD?}68H>uKWx{=a>(QY@(sxE}7w@e~xtuH^VlxD@;9I?75G-hvY8FQG&@>+URz zpg6c0&VhR%L90GUQ0ig01POt@k= z0_6{#Pz>yZ;`sn%t2zP;U=qr{Ps37pHaEWl#ldgn-d~3!%zptTfL_u`jA}Q`$N_^W z;=mC61Wdt$@Enwb-iPH1f}+`!w6iw zocvd#Y$YGEVF-@Fv+#L1D_^O(@N-bZFF@J<3KT={Lox6nluUgDrG)>0VxWjd681pJ zSO6R0vrtO$`U>hFL-`{wq*+R71o^{0xD7rIzYD(u$({;0r2;+$B_l7v5lZ+5EMXp_ zQ8vT)`|}hChQF;oqT@v@S!zMQMPK!&X=bzYq7oTadk~ald#a=0Qog}HuI+Ple9gsD349bRQprrJ(P!4zj zR>29l0p5g^QO&^$$x{VTB8))!-vdzo*AJysHk5sjLUAyYWkx-NA{(EBV)#W^4!;K1 z!XLuV;Q1dQZK1}nA{jUfW&aECE_ew_2403#LtTd&z6+&C{sgzee?qahMN0q~Iu%7C zIs`Akb5IT}rl8nV5hxM$LW$r(DEmj?Ap9Z}hyD!3@wwbZ>5&MO9@wAb2`D{t9!f@D zhJDyqS5d^kJi?WT@8NL(ZiIF49IS*lAkM2_!6)IoGQNWF43t}P2AA@4( zG7K{VC4<+YIPznd*@p646iH1LZi~kj+zwAe>DC)i_I(7!ky;+Y13Y%X4E!s+0VTEH zrcs1%LP`BkVIJIt#1R>X5I)lqe|F3U;++_jG|xh096_R?rWApOnUQHn?p-$=MC6*u zkO1TgV^eKHBx5ojM)n|5IvEx+cgFrFnMj255E%`~UStdM5F*j^Au0i;^Y4xq>v?=aG0Mwi`QT9LF)q}^?*!V76m zEq`fI%GJj$&rSu^=I#8RwTXn@ZI9^=H?CTfNj++h4%wcs-J?1fvGuU$rjMKUl~v}k zm4yxIV8r!Qn;VRTi-8j)ZEd9z;VkZ^0#4OO9XpxuH72xYpGZ5Nomg+Ktt^>ZSg8kQXwZbJGmo?YZZYnv>TmQek4Mwb> z(%0i|y2Si$)gjZrI{!dm4G-H1UGA&SgcF31FvKn=8Q7j48rSSl-4dOj13_4U9XMZ(t&X3|>(=5I&48{n=kz7hP!d_}P=GPlJLaT@o6Y%>hs^fUPV?2$ zuTQKivUG{!bW zVzI_p%#_p&nyZnO8J0IkH*A&VSS%8&i^Ud6-lBb;mGYBP)JDDNV05o5rlUKp)NtAw zwi|U9>(iGl$NzY--A$(gZ=ALLox9t6I48R~+Gks%oTAF>%E+;fyQ8CY;Pj+U+U7?! zOU#n!Li1|Pt^c?NH>0P`d+Q6$JNY%Hy0+Y$uf2D5pPTmipC8@;4<^#tD%s{Qu__a* z(;HjUft~hLpA*pAc7Q!;;I#H(w%7gjsx6&JjPK_zYxp+XDdwSBJ>2BK#`x{7id$c$A z`{Vw$a}7>N);P9xLV~;FP`1rEZmOu^N?vD&?WLUQ2?Cs+q%d4Y)s}SQl!oM-oSu}~ zi8S1sBwuOYA>C@Xn?7k<={u*I54Sa}+Dp5-DK0{P$~lp?CHyeImYJ;83+^QMNYk&) z+uM6h&5mi4*KC`on~Tjvvt^u?GBerouDQ@wHMON}XI^c8;3OSC%+mjeL=Cu(XKuH* x8n5G&IowfTp6mL7dAfVM8SiN}AN2gKy7f_)T6#K_bv#?N<9CWCpPsN@>R$l1lo$X2 From 8e4e66e06336f88c53a288c0052645410252026e Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 20 Nov 2013 14:56:12 -0500 Subject: [PATCH 090/126] Allow directory filters to be toggled by reclicking filter title --- includes/js/bp-docs.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/js/bp-docs.js b/includes/js/bp-docs.js index d03c5bce..ec7b0b1d 100644 --- a/includes/js/bp-docs.js +++ b/includes/js/bp-docs.js @@ -93,7 +93,9 @@ jQuery(document).ready(function($){ var filter_title = $(this); var filter_title_id = filter_title.attr('id'); var filter_id = filter_title_id.split('-').pop(); - + var filter_to_show_id = 'docs-filter-section-' + filter_id; + var showing_filter_id = $('.docs-filter-section-open').attr('id'); + $('.docs-filter-title').removeClass( 'current' ); filter_title.addClass( 'current' ); @@ -105,7 +107,9 @@ jQuery(document).ready(function($){ } $.when( all_section_slideup() ).done(function(){ - $('#docs-filter-section-' + filter_id).fadeIn(); + if ( filter_to_show_id != showing_filter_id ) { + $('#' + filter_to_show_id).fadeIn().addClass( 'docs-filter-section-open' ); + } }); return false; }); From 65aef9fa778f7b7ac09e5dc4117763b2f9b671c4 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 21 Nov 2013 09:53:02 -0500 Subject: [PATCH 091/126] Tags filter interface improvements This is a first pass, in particular for long tag lists --- includes/css/screen.css | 2 +- includes/js/bp-docs.js | 70 +++++++++++++++++++++++++++++++++++++-- includes/scss/screen.scss | 28 ++++++++++++++-- readme.txt | 3 ++ 4 files changed, 97 insertions(+), 6 deletions(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index ee0b77bc..1af3eaaf 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0}.entry-content #tags-list li{margin-left:0}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} diff --git a/includes/js/bp-docs.js b/includes/js/bp-docs.js index ec7b0b1d..42abf2f6 100644 --- a/includes/js/bp-docs.js +++ b/includes/js/bp-docs.js @@ -83,12 +83,45 @@ jQuery(document).ready(function($){ }); }); + /** Directory filters ************************************************/ + + var hidden_tag_counter = 0, + tag_button_action, + $dfsection, + $dfsection_tags = $( '#docs-filter-section-tags' ), + $dfsection_tags_list = $dfsection_tags.find( 'ul#tags-list' ), + $dfsection_tags_items = $dfsection_tags_list.children( 'li' ); + + // Set up filter sections + // - hide if necessary $('.docs-filter-section').each(function(){ - if ( ! $(this).hasClass( 'docs-filter-section-open' ) ) { - $(this).hide(); + $dfsection = $(this); + // Open sections: + if ( ! $dfsection.hasClass( 'docs-filter-section-open' ) ) { + $dfsection.hide(); } }); + // Collapse the Tags filter if it contains greater than 10 items + if ( $dfsection_tags_items.length > 10 ) { + tags_section_collapse( $dfsection_tags ); + } + + $dfsection_tags.on( 'click', 'a.tags-action-button', function( e ) { + $dfsection_tags.slideUp( 300, function() { + tag_button_action = $( e.target ).hasClass( 'tags-unhide' ) ? 'expand' : 'collapse'; + + if ( 'expand' == tag_button_action ) { + tags_section_expand( $dfsection_tags ); + } else if ( 'collapse' == tag_button_action ) { + tags_section_collapse( $dfsection_tags ); + } + + $dfsection_tags.slideDown(); + } ); + return false; + } ); + $('.docs-filter-title').on('click',function(e){ var filter_title = $(this); var filter_title_id = filter_title.attr('id'); @@ -114,6 +147,39 @@ jQuery(document).ready(function($){ return false; }); + /** + * Collapse the Tags filter section + */ + function tags_section_collapse( $section ) { + $section.find( 'a.tags-hide' ).remove(); + + $dfsection_tags_items.each( function( k, v ) { + if ( k > 4 ) { + $( v ).addClass( 'hidden-tag' ); + hidden_tag_counter++; + } + } ); + + // Add an ellipses item + var st = '… and %d more'; + st = st.replace( /%d/, hidden_tag_counter ); + + $dfsection_tags_list.append( '
  • ' + st + '
  • ' ); + + $dfsection_tags.append( 'show all tags' ); + } + + /** + * Expand the Tags filter section + */ + function tags_section_expand( $section ) { + $section.find( 'a.tags-unhide' ).remove(); + $section.find( '.tags-ellipses' ).remove(); + $dfsection_tags_items.removeClass( 'hidden-tag' ); + $dfsection_tags.append( 'show fewer tags' ); + hidden_tag_counter = 0; + } + function focus_in_content_area(e){ var code = e.keyCode || e.which; if ( code == 9 ) { diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 5047005e..769e9dd4 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -486,6 +486,19 @@ a.docs-filter-title.current { font-size: .8em; padding: 6px 10px; margin-top: 8px; + transition: max-height 2s ease; + overflow: hidden; + position: relative; +} + +#docs-filter-section-tags a.tags-action-button, +#docs-filter-section-tags a.tags-action-button:visited { + line-height: 3em; + text-decoration: none; + background: #fff; + background-opacity: .5; + border-radius: 3px; + padding: 5px 10px; } body.js .docs-filter-section { @@ -512,10 +525,19 @@ p#filter-by-tag { .entry-content ul#tags-list { list-style-type: none; margin-bottom: 0; -} + padding: 0; -.entry-content #tags-list li { - margin-left: 0; + li { + margin-left: 0; + + &.hidden-tag { + display: none; + } + + &.tags-ellipses { + font-style: italic; + } + } } .groups-cell ul li img.avatar { diff --git a/readme.txt b/readme.txt index ba5ca5d7..129832c8 100755 --- a/readme.txt +++ b/readme.txt @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.5.6 = +* Allow current filter to be toggled by reclicking filter name + = 1.5.5 = * Fix bug with permalinks in groups, introduced in change to is_singular() From 271d8291fde14c0cf6d1e012a84cade516308b94 Mon Sep 17 00:00:00 2001 From: David Cavins Date: Thu, 21 Nov 2013 13:18:19 -0600 Subject: [PATCH 092/126] Adds css columns to tag list and moves show button --- includes/css/screen.css | 2 +- includes/js/bp-docs.js | 6 +++--- includes/scss/screen.scss | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index 1af3eaaf..c1abebbd 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} diff --git a/includes/js/bp-docs.js b/includes/js/bp-docs.js index 42abf2f6..61ee7f09 100644 --- a/includes/js/bp-docs.js +++ b/includes/js/bp-docs.js @@ -154,7 +154,7 @@ jQuery(document).ready(function($){ $section.find( 'a.tags-hide' ).remove(); $dfsection_tags_items.each( function( k, v ) { - if ( k > 4 ) { + if ( k > 6 ) { $( v ).addClass( 'hidden-tag' ); hidden_tag_counter++; } @@ -166,7 +166,7 @@ jQuery(document).ready(function($){ $dfsection_tags_list.append( '
  • ' + st + '
  • ' ); - $dfsection_tags.append( 'show all tags' ); + $dfsection_tags.prepend( 'show all tags' ); } /** @@ -176,7 +176,7 @@ jQuery(document).ready(function($){ $section.find( 'a.tags-unhide' ).remove(); $section.find( '.tags-ellipses' ).remove(); $dfsection_tags_items.removeClass( 'hidden-tag' ); - $dfsection_tags.append( 'show fewer tags' ); + $dfsection_tags.prepend( 'show fewer tags' ); hidden_tag_counter = 0; } diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 769e9dd4..5abfffc5 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -8,6 +8,15 @@ $dark_grey: #ccc; $grey_text: #757575; $toggle_radius: 2px; +@mixin multi-columns($columns, $column_gap) { + -moz-column-count: $columns; + -moz-column-gap: $column_gap; + -webkit-column-count: $columns; + -webkit-column-gap: $column_gap; + column-count: $columns; + column-gap: $column_gap; +} + .hide-if-no-js { display: none; } @@ -526,6 +535,7 @@ p#filter-by-tag { list-style-type: none; margin-bottom: 0; padding: 0; + @include multi-columns(2, 10%); li { margin-left: 0; @@ -795,3 +805,16 @@ table.diff { table#post-revisions { margin-top: 20px; } + +//Media query for larger screens +@media screen and (min-width:50em) { + .entry-content ul#tags-list { + @include multi-columns(4, 5%); + } +} +//Media query for larger screens +@media screen and (min-width:71em) { + .entry-content ul#tags-list { + @include multi-columns(5, 5%); + } +} \ No newline at end of file From 61151f1a3258e81b27fa07315a90d5578782b4d6 Mon Sep 17 00:00:00 2001 From: David Cavins Date: Fri, 22 Nov 2013 13:58:02 -0600 Subject: [PATCH 093/126] Improve tag show/hide button appearance This works well with the browsers that can handle the multi-column, but looks dorky with IE 7 & 8. --- includes/css/screen.css | 2 +- includes/scss/screen.scss | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index c1abebbd..ac9b9655 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:block;line-height:3em;text-decoration:none;text-align:center;background:#fff;background-opacity:.5;border-radius:3px;margin-bottom:1em}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 5abfffc5..405f25b8 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -502,12 +502,14 @@ a.docs-filter-title.current { #docs-filter-section-tags a.tags-action-button, #docs-filter-section-tags a.tags-action-button:visited { + display: block; // Let the button span the entire box line-height: 3em; text-decoration: none; + text-align: center; background: #fff; background-opacity: .5; border-radius: 3px; - padding: 5px 10px; + margin-bottom: 1em; } body.js .docs-filter-section { From 22da7a7bed0721c1a7f2b256cf9b3af8127d9114 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 2 Dec 2013 16:05:28 -0500 Subject: [PATCH 094/126] Filter and access changes for attachment revisions --- includes/attachments.php | 4 +--- includes/templates/docs/single/history.php | 2 ++ includes/templatetags.php | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/includes/attachments.php b/includes/attachments.php index 63ffe08c..b7136ef4 100644 --- a/includes/attachments.php +++ b/includes/attachments.php @@ -234,10 +234,8 @@ public function set_doc_id( $doc_id ) { /** * Attempt to auto-detect a doc ID - * - * Marked protected because it sucks and is subject to change */ - protected function get_doc_id() { + public function get_doc_id() { if ( ! empty( $this->override_doc_id ) ) { diff --git a/includes/templates/docs/single/history.php b/includes/templates/docs/single/history.php index 338611cd..c8b9727d 100644 --- a/includes/templates/docs/single/history.php +++ b/includes/templates/docs/single/history.php @@ -48,6 +48,8 @@ + +

    @@ -47,7 +47,7 @@ - + diff --git a/includes/templatetags.php b/includes/templatetags.php index 858a278d..b249b222 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -1963,3 +1963,36 @@ function bp_docs_doc_attachment_drawer() { echo $html; } +/** + * Add classes to a row in the document list table. + * + * Currently supports: bp-doc-trashed-doc + * + * @since 1.5.5 + */ +function bp_docs_doc_row_classes() { + $classes = array(); + + if ( get_post_status( get_the_ID() ) == 'trash' ) { + $classes[] = 'bp-doc-trashed-doc'; + } + + // Pass the classes out as an array for easy unsetting or adding new elements + $classes = apply_filters( 'bp_docs_doc_row_classes', $classes ); + + if ( ! empty( $classes ) ) { + $classes = implode( ' ', $classes ); + echo ' class="' . esc_attr( $classes ) . '"'; + } +} + +/** + * Add "Trash" notice next to deleted Docs. + * + * @since 1.5.5 + */ +function bp_docs_doc_trash_notice() { + if ( get_post_status( get_the_ID() ) == 'trash' ) { + echo ' ' . __( 'Trash', 'bp-docs' ) . ''; + } +} From 4e9751ccf35765ef9b7c1e730320aaa36e236e4a Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Dec 2013 12:08:49 -0500 Subject: [PATCH 098/126] Improve tabs appearance on Twenty Thirteen and other themes that add padding to ul --- includes/css/screen.css | 2 +- includes/scss/screen.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index 14f84917..d2df55fe 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.doctable .bp-docs-trashed-doc-notice{color:red}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.doctable .bp-docs-trashed-doc-notice{color:red}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 94c6da76..6645f6c5 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -39,6 +39,10 @@ body.bp-docs div.page ul { .doc-tabs { overflow: hidden; + ul { + padding-left: 0; + } + li { float: left; margin: 0 5px; From 3575377e6082a683c0bab1f462cf47a6b0198b2a Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Dec 2013 12:09:12 -0500 Subject: [PATCH 099/126] Whitespace --- includes/query-builder.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/query-builder.php b/includes/query-builder.php index e987b310..f71398a3 100644 --- a/includes/query-builder.php +++ b/includes/query-builder.php @@ -234,8 +234,7 @@ function get_wp_query() { // Set the taxonomy query. Filtered so that plugins can alter the query // Filtering by groups also happens in this way - $wp_query_args['tax_query'] = apply_filters( - 'bp_docs_tax_query', $wp_query_args['tax_query'], $this ); + $wp_query_args['tax_query'] = apply_filters( 'bp_docs_tax_query', $wp_query_args['tax_query'], $this ); if ( !empty( $this->query_args['parent_id'] ) ) { $wp_query_args['post_parent'] = $this->query_args['parent_id']; @@ -245,8 +244,7 @@ function get_wp_query() { // Filter these arguments just before they're sent to WP_Query // Devs: This allows you to send any custom parameter you'd like, and modify the // query appropriately - $wp_query_args = apply_filters( 'bp_docs_pre_query_args', - $wp_query_args, $this ); + $wp_query_args = apply_filters( 'bp_docs_pre_query_args', $wp_query_args, $this ); $this->query = new WP_Query( $wp_query_args ); From 69dce17596d755e5edb0da4cb6a1438f863092d6 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Dec 2013 20:09:20 -0500 Subject: [PATCH 100/126] Improve Trashed Doc workflow - Allow site admins and Doc authors to access the single-Doc view of Docs that are in the Trash - Provide "Remove from Trash" links in Docs directory and on single-Doc pages, to enable front-end removal from the trash Fixes #370 Props @dcavins for the help with this issue --- bp-docs.php | 68 +++++++++++++++++- includes/component.php | 22 ++++++ includes/css/screen.css | 2 +- includes/functions.php | 29 +++++++- includes/scss/screen.scss | 16 ++++- includes/templates/docs/docs-header.php | 2 +- includes/templates/docs/index.php | 4 +- includes/templates/docs/single/edit.php | 6 +- includes/templates/docs/single/index.php | 3 + includes/templatetags.php | 88 +++++++++++++++++++++++- 10 files changed, 226 insertions(+), 14 deletions(-) diff --git a/bp-docs.php b/bp-docs.php index 6f7521f2..f4c08202 100644 --- a/bp-docs.php +++ b/bp-docs.php @@ -209,6 +209,10 @@ function load_constants() { if ( !defined( 'BP_DOCS_DELETE_SLUG' ) ) define( 'BP_DOCS_DELETE_SLUG', 'delete' ); + // The slug used when deleting a doc + if ( !defined( 'BP_DOCS_UNTRASH_SLUG' ) ) + define( 'BP_DOCS_UNTRASH_SLUG', 'untrash' ); + // The slug used for the Started section of My Docs if ( !defined( 'BP_DOCS_STARTED_SLUG' ) ) define( 'BP_DOCS_STARTED_SLUG', 'started' ); @@ -356,6 +360,7 @@ function add_rewrite_tags() { add_rewrite_tag( '%%' . BP_DOCS_EDIT_SLUG . '%%', '([1]{1,})' ); add_rewrite_tag( '%%' . BP_DOCS_HISTORY_SLUG . '%%', '([1]{1,})' ); add_rewrite_tag( '%%' . BP_DOCS_DELETE_SLUG . '%%', '([1]{1,})' ); + add_rewrite_tag( '%%' . BP_DOCS_UNTRASH_SLUG . '%%', '([1]{1,})' ); add_rewrite_tag( '%%' . BP_DOCS_CREATE_SLUG . '%%', '([1]{1,})' ); add_rewrite_tag( '%%' . BP_DOCS_MY_GROUPS_SLUG . '%%', '([1]{1,})' ); } @@ -393,8 +398,11 @@ function generate_rewrite_rules( $wp_rewrite ) { // Delete bp_docs_get_docs_slug() . '/([^/]+)/' . BP_DOCS_DELETE_SLUG . '/?$' => - 'index.php?post_type=' . $this->post_type_name . '&name=' . $wp_rewrite->preg_index( 1 ) . '&' . BP_DOCS_HISTORY_SLUG . '=1' + 'index.php?post_type=' . $this->post_type_name . '&name=' . $wp_rewrite->preg_index( 1 ) . '&' . BP_DOCS_HISTORY_SLUG . '=1', + // Untrash + bp_docs_get_docs_slug() . '/([^/]+)/' . BP_DOCS_UNTRASH_SLUG . '/?$' => + 'index.php?post_type=' . $this->post_type_name . '&name=' . $wp_rewrite->preg_index( 1 ) . '&' . BP_DOCS_UNTRASH_SLUG . '=1', ); @@ -450,6 +458,64 @@ function parse_query( $posts_query ) { if ( $posts_query->get( BP_DOCS_MY_GROUPS_SLUG ) ) { $posts_query->is_404 = false; } + + // For single Doc views, allow access to 'deleted' items + // that the current user is the admin of + if ( $posts_query->is_single && bp_docs_get_post_type_name() === $posts_query->get( 'post_type' ) ) { + + $doc_slug = $posts_query->get( 'name' ); + + // Direct query, because barf + global $wpdb; + $author_id = $wpdb->get_var( $wpdb->prepare( + "SELECT post_author FROM {$wpdb->posts} WHERE post_type = %s AND post_name = %s", + bp_docs_get_post_type_name(), + $doc_slug + ) ); + + // Post author or mod can visit it + if ( $author_id && ( $author_id == get_current_user_id() || current_user_can( 'bp_moderate' ) ) ) { + $posts_query->set( 'post_status', array( 'publish', 'trash' ) ); + + // Make the 'trash' post status public + add_filter( 'posts_request', array( $this, 'make_trash_public' ) ); + + // ... and undo that when we're done + add_filter( 'the_posts', array( $this, 'remove_make_trash_public' ) ); + } + } + } + + /** + * Make the 'trash' post status public. + * + * This is an unavoidable hack for cases where we want a trashed doc + * to be visitable by the post author or by an admin. + * + * Access is public because it needs to be accessible by + * call_user_func(), but should *not* be called directly. + * + * @since BuddyPress 1.5.5 + * + * @param $request Passthrough. + */ + public function make_trash_public( $request ) { + global $wp_post_statuses; + $wp_post_statuses['trash']->public = true; + return $request; + } + + /** + * Reverse the public-trash hack applied in self::make_trash_public() + * + * @since BuddyPress 1.5.5 + * + * @param $posts Passthrough. + */ + public function remove_make_trash_public( $posts ) { + global $wp_post_statuses; + $wp_post_statuses['trash']->public = false; + return $posts; } /** diff --git a/includes/component.php b/includes/component.php index f45fe02f..8d29aace 100644 --- a/includes/component.php +++ b/includes/component.php @@ -511,6 +511,24 @@ function catch_page_load() { bp_core_redirect( home_url( bp_docs_get_docs_slug() ) ); } + + if ( bp_docs_is_doc_read() && ! empty( $_GET['untrash'] ) && ! empty( $_GET['doc_id'] ) ) { + check_admin_referer( 'bp_docs_untrash' ); + + $untrash_doc_id = absint( $_GET['doc_id'] ); + + if ( bp_docs_current_user_can( 'manage', $untrash_doc_id ) ) { + if ( bp_docs_untrash_doc( $untrash_doc_id ) ) { + bp_core_add_message( __( 'Doc successfully removed from Trash!', 'bp-docs' ) ); + } else { + bp_core_add_message( __( 'Could not remove Doc from Trash.', 'bp-docs' ) ); + } + } else { + bp_core_add_message( __( 'You do not have permission to remove that Doc from the Trash.', 'bp-docs' ), 'error' ); + } + + bp_core_redirect( bp_docs_get_doc_link( $untrash_doc_id ) ); + } } /** @@ -1003,6 +1021,10 @@ function body_class( $classes ) { $classes[] = 'bp-docs'; } + if ( bp_docs_is_doc_trashed() ) { + $classes[] = 'trashed-doc'; + } + return $classes; } diff --git a/includes/css/screen.css b/includes/css/screen.css index d2df55fe..023487cc 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.doctable .bp-docs-trashed-doc-notice{color:red}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} diff --git a/includes/functions.php b/includes/functions.php index 64c91aea..af40d22b 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -257,8 +257,6 @@ function bp_docs_user_can( $action = 'edit', $user_id = false, $doc_id = false ) // Only certain actions are checked against doc_ids $need_doc_ids_actions = apply_filters( 'bp_docs_need_doc_ids_actions', array( 'edit', 'manage', 'view_history', 'read', 'read_comments', 'post_comments' ) ); - $doc_id = false; - // Grant all permissions on documents being created if ( false === $doc_id && bp_docs_is_doc_create() ) { return true; @@ -278,6 +276,10 @@ function bp_docs_user_can( $action = 'edit', $user_id = false, $doc_id = false ) } } + if ( ! isset( $doc ) ) { + $doc = get_post( $doc_id ); + } + $user_can = false; if ( ! empty( $doc ) ) { @@ -485,6 +487,29 @@ function bp_docs_trash_doc( $doc_id = 0 ) { return false; } +/** + * Remove a Doc from the Trash. + * + * @since 1.5.5 + * @param int $doc_id ID of the Doc to be untrashed. + * @return bool True on success, otherwise false. + */ +function bp_docs_untrash_doc( $doc_id = 0 ) { + do_action( 'bp_docs_before_doc_untrash', $doc_id ); + + $untrashed = wp_update_post( array( + 'ID' => $doc_id, + 'post_status' => 'publish', + ) ); + + if ( $untrashed ) { + do_action( 'bp_docs_doc_untrashed', $doc_id ); + return true; + } + + return false; +} + /** * Outputs a list of access options * diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 6645f6c5..ae42fb17 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -116,10 +116,12 @@ body.bp-docs div.page ul { .bp-doc-trashed-doc .attachment-clip-cell { border-left: 4px solid red; } +} - .bp-docs-trashed-doc-notice { - color: red; - } +.bp-docs-trashed-doc-notice { + color: red; + font-size: .9em; + font-style: italic; } /* Theme compat overrides */ @@ -611,6 +613,14 @@ div.doc-content { #bp-docs-single-doc-header { overflow: hidden; } + +body.trashed-doc { + #buddypress { + border-left: 4px solid red; + padding-left: 10px; + } +} + div.doc-permissions { float: right; width: 35%; diff --git a/includes/templates/docs/docs-header.php b/includes/templates/docs/docs-header.php index 89482e43..02193024 100644 --- a/includes/templates/docs/docs-header.php +++ b/includes/templates/docs/docs-header.php @@ -13,7 +13,7 @@
    -

    +

    Trash

    diff --git a/includes/templates/docs/index.php b/includes/templates/docs/index.php index ab180b0c..669cb1da 100644 --- a/includes/templates/docs/index.php +++ b/includes/templates/docs/index.php @@ -16,7 +16,9 @@
    - + + + diff --git a/includes/templates/docs/single/edit.php b/includes/templates/docs/single/edit.php index 51bb1294..09f013d0 100644 --- a/includes/templates/docs/single/edit.php +++ b/includes/templates/docs/single/edit.php @@ -149,12 +149,14 @@ - + - + + +
    diff --git a/includes/templates/docs/single/index.php b/includes/templates/docs/single/index.php index 811e7a9b..32dec01e 100644 --- a/includes/templates/docs/single/index.php +++ b/includes/templates/docs/single/index.php @@ -1,4 +1,7 @@
    + + + diff --git a/includes/templatetags.php b/includes/templatetags.php index b249b222..6dd91477 100644 --- a/includes/templatetags.php +++ b/includes/templatetags.php @@ -941,6 +941,10 @@ function bp_docs_doc_action_links() { $links[] = '' . __( 'History', 'bp-docs' ) . ''; } + if ( bp_docs_current_user_can( 'manage', get_the_ID() ) && bp_docs_is_doc_trashed( get_the_ID() ) ) { + $links[] = '' . __( 'Untrash', 'bp-docs' ) . ''; + } + echo implode( ' | ', $links ); } @@ -1112,6 +1116,66 @@ function bp_docs_get_delete_doc_link() { return apply_filters( 'bp_docs_get_delete_doc_link', $delete_link, $doc_permalink ); } + +/** + * Echo the URL to remove a Doc from the Trash. + * + * @since 1.5.5 + */ +function bp_docs_remove_from_trash_link( $doc_id = false ) { + echo bp_docs_get_remove_from_trash_link( $doc_id ); +} + /** + * Get the URL for removing a Doc from the Trash. + * + * @since 1.5.5 + * + * @param $doc_id ID of the Doc. + * @return string URL for Doc untrashing. + */ + function bp_docs_get_remove_from_trash_link( $doc_id ) { + $doc_permalink = bp_docs_get_doc_link( $doc_id ); + + $untrash_link = wp_nonce_url( add_query_arg( array( + BP_DOCS_UNTRASH_SLUG => '1', + 'doc_id' => intval( $doc_id ), + ), $doc_permalink ), 'bp_docs_untrash' ); + + return apply_filters( 'bp_docs_get_remove_from_trash_link', $untrash_link, $doc_permalink ); + } + +/** + * Echo the Delete/Untrash link for use on single Doc pages. + * + * @since 1.5.5 + * + * @param int $doc_id Optional. Default: current Doc. + */ +function bp_docs_delete_doc_button( $doc_id = false ) { + echo bp_docs_get_delete_doc_button( $doc_id ); +} + /** + * Get HTML for the Delete/Untrash link used on single Doc pages. + * + * @since 1.5.5 + * + * @param int $doc_id Optional. Default: ID of current Doc. + * @return string HTML of Delete/Remove from Trash link. + */ + function bp_docs_get_delete_doc_button( $doc_id = false ) { + if ( ! $doc_id ) { + $doc_id = bp_docs_is_existing_doc() ? get_queried_object_id() : get_the_ID(); + } + + if ( bp_docs_is_doc_trashed( $doc_id ) ) { + $button = '' . __( 'Remove from Trash', 'bp-docs' ) . ''; + } else { + $button = '' . __( 'Delete', 'bp-docs' ) . ''; + } + + return $button; + } + /** * Echo the pagination links for the doc list view * @@ -1481,7 +1545,7 @@ function bp_docs_doc_permissions_snapshot( $args = array() ) { ); foreach ( $settings as $l => $v ) { - if ( 'anyone' == $v || $public_settings[ $l ] == $v ) { + if ( 'anyone' == $v || ( isset( $public_settings[ $l ] ) && $public_settings[ $l ] == $v ) ) { $anyone_count++; @@ -1502,7 +1566,7 @@ function bp_docs_doc_permissions_snapshot( $args = array() ) { } } - $settings_count = count( $settings ); + $settings_count = count( $public_settings ); if ( $settings_count == $private_count ) { $summary = 'private'; $summary_label = __( 'Private', 'bp-docs' ); @@ -1993,6 +2057,24 @@ function bp_docs_doc_row_classes() { */ function bp_docs_doc_trash_notice() { if ( get_post_status( get_the_ID() ) == 'trash' ) { - echo ' ' . __( 'Trash', 'bp-docs' ) . ''; + echo ' ' . __( 'Trash', 'bp-docs' ) . ''; } } + +/** + * Is the given Doc trashed? + * + * @since 1.5.5 + * + * @param int $doc_id Optional. ID of the doc. Default: current doc. + * @return bool True if doc is trashed, otherwise false. + */ +function bp_docs_is_doc_trashed( $doc_id = false ) { + if ( ! $doc_id ) { + $doc = get_queried_object(); + } else { + $doc = get_post( $doc_id ); + } + + return isset( $doc->post_status ) && 'trash' == $doc->post_status; +} From 53993eecd64d2b4c70f09f2a4b0b620ae394ae2b Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Dec 2013 20:11:54 -0500 Subject: [PATCH 101/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 2fad87e4..3389d7df 100755 --- a/readme.txt +++ b/readme.txt @@ -36,6 +36,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.5.6 = * Allow current filter to be toggled by reclicking filter name * Fix bug in "Edited by Me" logic when user has not edited any Docs +* Show deleted Docs on Started By Me tab, so they can be easily restored = 1.5.5 = * Fix bug with permalinks in groups, introduced in change to is_singular() From 6053559d4a8b240d729d343956cb9ecd12545898 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 9 Dec 2013 20:33:04 -0500 Subject: [PATCH 102/126] Force BP theme compatibility on for Docs pages, when available This should improve compatibility with BP 1.9 See #372 --- includes/theme-bridge.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/includes/theme-bridge.php b/includes/theme-bridge.php index fe634f05..13261c98 100644 --- a/includes/theme-bridge.php +++ b/includes/theme-bridge.php @@ -42,7 +42,7 @@ function bp_docs_template_include( $template = '' ) { return $template; } - $do_theme_compat = class_exists( 'BP_Theme_Compat' ) && apply_filters( 'bp_docs_do_theme_compat', true, $template ); + $do_theme_compat = bp_docs_do_theme_compat(); if ( $do_theme_compat ) { @@ -65,6 +65,20 @@ function bp_docs_template_include( $template = '' ) { } add_filter( 'template_include', 'bp_docs_template_include', 6 ); +/** + * Should we do theme compatibility? + * + * Do it whenever it's available in BuddyPress (whether enabled or not for the + * theme more generally) + * + * @since 1.5.6 + * + * @return bool + */ +function bp_docs_do_theme_compat() { + return class_exists( 'BP_Theme_Compat' ) && apply_filters( 'bp_docs_do_theme_compat', true, $template ); +} + /** * Theme Compat * @@ -96,6 +110,8 @@ public function is_docs() { add_filter( 'bp_get_buddypress_template', array( $this, 'query_templates' ) ); + add_filter( 'bp_use_theme_compat_with_current_theme', 'bp_docs_do_theme_compat' ); + if ( bp_docs_is_global_directory() || bp_docs_is_mygroups_directory() ) { bp_update_is_directory( true, 'docs' ); From 528b0ffed5be74b54b16438b450a2cd38b92a45a Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 15 Dec 2013 20:52:33 -0500 Subject: [PATCH 103/126] Don't let logged-out users access the Create page. Fixes #374 --- includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index af40d22b..7b9c7198 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -257,8 +257,9 @@ function bp_docs_user_can( $action = 'edit', $user_id = false, $doc_id = false ) // Only certain actions are checked against doc_ids $need_doc_ids_actions = apply_filters( 'bp_docs_need_doc_ids_actions', array( 'edit', 'manage', 'view_history', 'read', 'read_comments', 'post_comments' ) ); - // Grant all permissions on documents being created - if ( false === $doc_id && bp_docs_is_doc_create() ) { + // Grant all permissions on documents being created, as long as the + // user is logged in + if ( is_user_logged_in() && ( false === $doc_id ) && bp_docs_is_doc_create() ) { return true; } From f24ef964182bbcd458719f0f42b6af796a01a026 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 15 Dec 2013 20:53:17 -0500 Subject: [PATCH 104/126] Update readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 3389d7df..1a0f3474 100755 --- a/readme.txt +++ b/readme.txt @@ -37,6 +37,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Allow current filter to be toggled by reclicking filter name * Fix bug in "Edited by Me" logic when user has not edited any Docs * Show deleted Docs on Started By Me tab, so they can be easily restored +* Prevent logged-out user from accessing Create page = 1.5.5 = * Fix bug with permalinks in groups, introduced in change to is_singular() From 6242ac8bb5c9923872e31537355a67c2c6ce351a Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 15 Dec 2013 20:53:49 -0500 Subject: [PATCH 105/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 1a0f3474..09a66d23 100755 --- a/readme.txt +++ b/readme.txt @@ -38,6 +38,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Fix bug in "Edited by Me" logic when user has not edited any Docs * Show deleted Docs on Started By Me tab, so they can be easily restored * Prevent logged-out user from accessing Create page +* Improved compatibility with BuddyPress 1.9 = 1.5.5 = * Fix bug with permalinks in groups, introduced in change to is_singular() From b6210e8ee4837e7d177326d66887645a93ffd486 Mon Sep 17 00:00:00 2001 From: David Cavins Date: Thu, 21 Nov 2013 13:18:19 -0600 Subject: [PATCH 106/126] Adds css columns to tag list and moves show button --- includes/css/screen.css | 2 +- includes/js/bp-docs.js | 6 +++--- includes/scss/screen.scss | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index 023487cc..3fba8832 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} diff --git a/includes/js/bp-docs.js b/includes/js/bp-docs.js index 42abf2f6..61ee7f09 100644 --- a/includes/js/bp-docs.js +++ b/includes/js/bp-docs.js @@ -154,7 +154,7 @@ jQuery(document).ready(function($){ $section.find( 'a.tags-hide' ).remove(); $dfsection_tags_items.each( function( k, v ) { - if ( k > 4 ) { + if ( k > 6 ) { $( v ).addClass( 'hidden-tag' ); hidden_tag_counter++; } @@ -166,7 +166,7 @@ jQuery(document).ready(function($){ $dfsection_tags_list.append( '
  • ' + st + '
  • ' ); - $dfsection_tags.append( 'show all tags' ); + $dfsection_tags.prepend( 'show all tags' ); } /** @@ -176,7 +176,7 @@ jQuery(document).ready(function($){ $section.find( 'a.tags-unhide' ).remove(); $section.find( '.tags-ellipses' ).remove(); $dfsection_tags_items.removeClass( 'hidden-tag' ); - $dfsection_tags.append( 'show fewer tags' ); + $dfsection_tags.prepend( 'show fewer tags' ); hidden_tag_counter = 0; } diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index ae42fb17..dbdba8f8 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -8,6 +8,15 @@ $dark_grey: #ccc; $grey_text: #757575; $toggle_radius: 2px; +@mixin multi-columns($columns, $column_gap) { + -moz-column-count: $columns; + -moz-column-gap: $column_gap; + -webkit-column-count: $columns; + -webkit-column-gap: $column_gap; + column-count: $columns; + column-gap: $column_gap; +} + .hide-if-no-js { display: none; } @@ -543,6 +552,7 @@ p#filter-by-tag { list-style-type: none; margin-bottom: 0; padding: 0; + @include multi-columns(2, 10%); li { margin-left: 0; @@ -820,3 +830,16 @@ table.diff { table#post-revisions { margin-top: 20px; } + +//Media query for larger screens +@media screen and (min-width:50em) { + .entry-content ul#tags-list { + @include multi-columns(4, 5%); + } +} +//Media query for larger screens +@media screen and (min-width:71em) { + .entry-content ul#tags-list { + @include multi-columns(5, 5%); + } +} From 9b3828f157054d9bc68cafc7b919a30089fa9d6f Mon Sep 17 00:00:00 2001 From: David Cavins Date: Fri, 22 Nov 2013 13:58:02 -0600 Subject: [PATCH 107/126] Improve tag show/hide button appearance This works well with the browsers that can handle the multi-column, but looks dorky with IE 7 & 8. Props @dcavins Fixes #371 --- includes/css/screen.css | 2 +- includes/scss/screen.scss | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index 3fba8832..ea337770 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;border-radius:3px;padding:5px 10px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}.entry-content ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}.entry-content ul#tags-list li{margin-left:0}.entry-content ul#tags-list li.hidden-tag{display:none}.entry-content ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:block;line-height:3em;text-decoration:none;text-align:center;background:#fff;background-opacity:.5;border-radius:3px;margin-bottom:1em}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}ul#tags-list li{margin-left:0}ul#tags-list li.hidden-tag{display:none}ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index dbdba8f8..78ef0c75 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -519,12 +519,14 @@ a.docs-filter-title.current { #docs-filter-section-tags a.tags-action-button, #docs-filter-section-tags a.tags-action-button:visited { + display: block; // Let the button span the entire box line-height: 3em; text-decoration: none; + text-align: center; background: #fff; background-opacity: .5; border-radius: 3px; - padding: 5px 10px; + margin-bottom: 1em; } body.js .docs-filter-section { @@ -548,7 +550,7 @@ p#filter-by-tag { margin-top: 8px; } -.entry-content ul#tags-list { +ul#tags-list { list-style-type: none; margin-bottom: 0; padding: 0; From 57b7a7c5926ffbe6c0d2580c7f87ad8edf04a292 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 15 Dec 2013 21:04:58 -0500 Subject: [PATCH 108/126] readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 09a66d23..0e26e51e 100755 --- a/readme.txt +++ b/readme.txt @@ -37,6 +37,7 @@ This plugin is in active development. For feature requests and bug reports, visi * Allow current filter to be toggled by reclicking filter name * Fix bug in "Edited by Me" logic when user has not edited any Docs * Show deleted Docs on Started By Me tab, so they can be easily restored +* Improved interface for Tags directory filter when many tags are present * Prevent logged-out user from accessing Create page * Improved compatibility with BuddyPress 1.9 From 13eb769b89fdc937ef1e9882e8b89294cf5ffb74 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 15 Dec 2013 21:08:15 -0500 Subject: [PATCH 109/126] Bump version numbers to 1.5.6 --- loader.php | 4 ++-- readme.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/loader.php b/loader.php index 15f428b4..c119d786 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.5.5 +Version: 1.5.6 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.5.5' ); +define( 'BP_DOCS_VERSION', '1.5.6' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index 0e26e51e..021200ed 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: boonebgorges, cuny-academic-commons Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 -Tested up to: WordPress 3.7.1, BuddyPress 1.8.1 -Stable tag: 1.5.5 +Tested up to: WordPress 3.8, BuddyPress 1.9 +Stable tag: 1.5.6 Adds collaborative Docs to BuddyPress. From 2be3e5b1d00c7911197a554ed796f018f77773c6 Mon Sep 17 00:00:00 2001 From: boonebgorges Date: Mon, 16 Dec 2013 02:12:27 +0000 Subject: [PATCH 110/126] POT update for 1.5.6 git-svn-id: http://plugins.svn.wordpress.org/buddypress-docs/trunk@822831 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- languages/bp-docs.pot | 232 +++++++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 102 deletions(-) diff --git a/languages/bp-docs.pot b/languages/bp-docs.pot index 67e69abe..ccbe2c6d 100644 --- a/languages/bp-docs.pot +++ b/languages/bp-docs.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/buddypress-docs\n" -"POT-Creation-Date: 2013-09-09 18:47:51+00:00\n" +"POT-Creation-Date: 2013-12-16 02:11:43+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -12,77 +12,77 @@ msgstr "" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -#: bp-docs.php:256 +#: bp-docs.php:260 msgctxt "post type general name" msgid "BuddyPress Docs" msgstr "" -#: bp-docs.php:257 +#: bp-docs.php:261 msgctxt "post type singular name" msgid "Doc" msgstr "" -#: bp-docs.php:258 +#: bp-docs.php:262 msgctxt "add new" msgid "Add New" msgstr "" -#: bp-docs.php:259 +#: bp-docs.php:263 msgid "Add New Doc" msgstr "" -#: bp-docs.php:260 +#: bp-docs.php:264 msgid "Edit Doc" msgstr "" -#: bp-docs.php:261 includes/integration-groups.php:800 +#: bp-docs.php:265 includes/integration-groups.php:800 #: includes/integration-groups.php:1266 #: includes/templates/docs/docs-header.php:40 msgid "New Doc" msgstr "" -#: bp-docs.php:262 +#: bp-docs.php:266 msgid "View Doc" msgstr "" -#: bp-docs.php:263 +#: bp-docs.php:267 msgid "Search Docs" msgstr "" -#: bp-docs.php:264 +#: bp-docs.php:268 msgid "No Docs found" msgstr "" -#: bp-docs.php:265 +#: bp-docs.php:269 msgid "No Docs found in Trash" msgstr "" -#: bp-docs.php:272 includes/component.php:40 +#: bp-docs.php:276 includes/component.php:40 #: includes/integration-groups.php:1061 msgid "BuddyPress Docs" msgstr "" -#: bp-docs.php:291 +#: bp-docs.php:295 msgid "Associated Items" msgstr "" -#: bp-docs.php:292 +#: bp-docs.php:296 msgid "Associated Item" msgstr "" -#: bp-docs.php:486 +#: bp-docs.php:552 msgid "You are not allowed to read that Doc." msgstr "" -#: bp-docs.php:490 +#: bp-docs.php:556 msgid "You are not allowed to create Docs." msgstr "" -#: bp-docs.php:494 +#: bp-docs.php:560 msgid "You are not allowed to edit that Doc." msgstr "" -#: bp-docs.php:498 +#: bp-docs.php:564 msgid "You are not allowed to view that Doc's history." msgstr "" @@ -229,9 +229,9 @@ msgstr "" msgid "Group Tab Name" msgstr "" -#: includes/admin.php:123 includes/attachments.php:517 +#: includes/admin.php:123 includes/attachments.php:515 #: includes/templates/docs/single/edit.php:68 -#: includes/templates/docs/single/index.php:32 includes/templatetags.php:1952 +#: includes/templates/docs/single/index.php:35 includes/templatetags.php:2018 msgid "Attachments" msgstr "" @@ -239,24 +239,24 @@ msgstr "" msgid "Enable Attachments" msgstr "" -#: includes/admin.php:147 +#: includes/admin.php:152 msgid "Change the slug used to build Docs URLs." msgstr "" -#: includes/admin.php:147 +#: includes/admin.php:152 msgid "" "You have already defined this value in wp-config.php, so it " "cannot be edited here." msgstr "" -#: includes/admin.php:157 +#: includes/admin.php:162 msgid "" "Excerpts are shown on Docs directories, to provide better context. If your " "theme or language requires longer or shorter excerpts, change this value. " "Set to 0 to disable these excerpts." msgstr "" -#: includes/admin.php:167 +#: includes/admin.php:172 msgid "" "Change the word on the BuddyPress group tab from 'Docs' to whatever you'd " "like. Keep in mind that this will not change the text anywhere else on the " @@ -265,7 +265,7 @@ msgid "" "urls/'>language file for BuddyPress Docs." msgstr "" -#: includes/admin.php:177 +#: includes/admin.php:182 msgid "" "Change the word on users' Docs tabs from 'Docs' to whatever you'd like. Keep " "in mind that this will not change the text anywhere else on the page. For a " @@ -274,23 +274,23 @@ msgid "" "a> for BuddyPress Docs." msgstr "" -#: includes/admin.php:187 +#: includes/admin.php:192 msgid "Enabled" msgstr "" -#: includes/admin.php:188 +#: includes/admin.php:193 msgid "Disabled" msgstr "" -#: includes/admin.php:190 +#: includes/admin.php:195 msgid "Allow users to add attachments to their Docs." msgstr "" -#: includes/admin.php:224 +#: includes/admin.php:229 msgid "Recent Comments" msgstr "" -#: includes/admin.php:299 +#: includes/admin.php:304 msgid "No comments yet." msgstr "" @@ -298,31 +298,31 @@ msgstr "" msgid "File not found." msgstr "" -#: includes/attachments.php:293 +#: includes/attachments.php:291 msgid "Attachment deleted" msgstr "" -#: includes/attachments.php:295 +#: includes/attachments.php:293 msgid "Could not delete attachment" msgstr "" -#: includes/attachments.php:533 +#: includes/attachments.php:531 msgid "Has attachment?" msgstr "" -#: includes/attachments.php:535 +#: includes/attachments.php:533 msgid "Yes" msgstr "" -#: includes/attachments.php:536 +#: includes/attachments.php:534 msgid "No" msgstr "" -#: includes/attachments.php:537 +#: includes/attachments.php:535 msgid "Doesn’t matter" msgstr "" -#: includes/attachments.php:539 +#: includes/attachments.php:537 msgid "Filter" msgstr "" @@ -331,16 +331,16 @@ msgid "Search Docs..." msgstr "" #: includes/component.php:204 includes/component.php:312 -#: includes/templatetags.php:1331 +#: includes/templatetags.php:1394 msgid "Started By Me" msgstr "" #: includes/component.php:211 includes/component.php:321 -#: includes/templatetags.php:1332 +#: includes/templatetags.php:1395 msgid "Edited By Me" msgstr "" -#: includes/component.php:218 includes/templatetags.php:1356 +#: includes/component.php:218 includes/templatetags.php:1419 msgid "Create New Doc" msgstr "" @@ -394,43 +394,55 @@ msgstr "" msgid "You do not have permission to delete that doc." msgstr "" -#: includes/component.php:641 +#: includes/component.php:522 +msgid "Doc successfully removed from Trash!" +msgstr "" + +#: includes/component.php:524 +msgid "Could not remove Doc from Trash." +msgstr "" + +#: includes/component.php:527 +msgid "You do not have permission to remove that Doc from the Trash." +msgstr "" + +#: includes/component.php:659 msgid "%1$s commented on the doc %2$s" msgstr "" -#: includes/component.php:737 +#: includes/component.php:755 msgid "Show New Docs" msgstr "" -#: includes/component.php:738 +#: includes/component.php:756 msgid "Show Doc Edits" msgstr "" -#: includes/component.php:739 +#: includes/component.php:757 msgid "Show Doc Comments" msgstr "" -#: includes/component.php:806 +#: includes/component.php:824 msgid "%1$s created the doc %2$s" msgstr "" -#: includes/component.php:808 +#: includes/component.php:826 msgid "%1$s edited the doc %2$s" msgstr "" -#: includes/component.php:1042 includes/component.php:1054 +#: includes/component.php:1064 includes/component.php:1076 msgid "Search" msgstr "" -#: includes/component.php:1105 +#: includes/component.php:1127 msgid "Upload File" msgstr "" -#: includes/component.php:1106 +#: includes/component.php:1128 msgid "OK" msgstr "" -#: includes/component.php:1107 +#: includes/component.php:1129 msgid "Still working?" msgstr "" @@ -441,15 +453,15 @@ msgctxt "" msgid "Docs associated with the %1$s %2$s" msgstr "" -#: includes/functions.php:499 includes/templatetags.php:1432 +#: includes/functions.php:526 includes/templatetags.php:1495 msgid "Logged-in Users" msgstr "" -#: includes/functions.php:504 includes/templatetags.php:1434 +#: includes/functions.php:531 includes/templatetags.php:1497 msgid "The Doc author only" msgstr "" -#: includes/functions.php:512 includes/templatetags.php:1431 +#: includes/functions.php:539 includes/templatetags.php:1494 msgid "Anyone" msgstr "" @@ -488,7 +500,7 @@ msgstr "" #: includes/integration-groups.php:807 #: includes/templates/docs/docs-header.php:30 includes/templatetags.php:937 -#: includes/templatetags.php:1535 +#: includes/templatetags.php:1598 msgid "Edit" msgstr "" @@ -540,47 +552,51 @@ msgstr "" msgid "View Docs" msgstr "" -#: includes/query-builder.php:410 +#: includes/query-builder.php:421 msgid "Unknown error. Please try again." msgstr "" -#: includes/query-builder.php:430 +#: includes/query-builder.php:441 msgid "You are not allowed to associate a Doc with that group." msgstr "" -#: includes/query-builder.php:440 +#: includes/query-builder.php:451 msgid "The title field is required." msgstr "" -#: includes/query-builder.php:469 +#: includes/query-builder.php:480 msgid "There was an error when creating the doc." msgstr "" -#: includes/query-builder.php:478 +#: includes/query-builder.php:489 msgid "Doc successfully created!" msgstr "" -#: includes/query-builder.php:498 +#: includes/query-builder.php:509 msgid "There was an error when saving the doc." msgstr "" -#: includes/query-builder.php:507 +#: includes/query-builder.php:518 msgid "" "You idled a bit too long while in Edit mode. In order to allow others to " "edit the doc you were working on, your changes have been autosaved. Click " "the Edit button to return to Edit mode." msgstr "" -#: includes/query-builder.php:510 +#: includes/query-builder.php:521 msgid "Doc successfully edited!" msgstr "" -#: includes/query-builder.php:541 +#: includes/query-builder.php:552 msgid "" "Your Doc was successfully saved, but some of your access settings have been " "changed to match the Doc's permissions." msgstr "" +#: includes/templates/docs/docs-header.php:16 includes/templatetags.php:2060 +msgid "This Doc is in the Trash" +msgstr "" + #: includes/templates/docs/docs-header.php:25 includes/templatetags.php:934 msgid "Read" msgstr "" @@ -610,7 +626,7 @@ msgstr "" msgid "There are no docs for this view." msgstr "" -#: includes/templates/docs/index.php:23 includes/theme-bridge.php:165 +#: includes/templates/docs/index.php:25 includes/theme-bridge.php:181 msgid "Docs Directory" msgstr "" @@ -683,15 +699,11 @@ msgstr "" msgid "Cancel" msgstr "" -#: includes/templates/docs/single/edit.php:157 includes/templatetags.php:1880 -msgid "Delete" -msgstr "" - -#: includes/templates/docs/single/edit.php:187 +#: includes/templates/docs/single/edit.php:189 msgid "Are you still there?" msgstr "" -#: includes/templates/docs/single/edit.php:189 +#: includes/templates/docs/single/edit.php:191 msgid "" "In order to prevent overwriting content, only one person can edit a given " "doc at a time. For that reason, you must periodically ensure the system that " @@ -700,7 +712,7 @@ msgid "" "others can access the doc." msgstr "" -#: includes/templates/docs/single/edit.php:191 +#: includes/templates/docs/single/edit.php:193 msgid "I'm still editing!" msgstr "" @@ -727,31 +739,31 @@ msgid "" "You are currently viewing a revision titled \"%1$s\", saved on %2$s by %3$s" msgstr "" -#: includes/templates/docs/single/history.php:52 +#: includes/templates/docs/single/history.php:54 msgid "These revisions are identical." msgstr "" -#: includes/templates/docs/single/index.php:7 +#: includes/templates/docs/single/index.php:10 msgid "Locked" msgstr "" -#: includes/templates/docs/single/index.php:7 +#: includes/templates/docs/single/index.php:10 msgid "(click for more info)" msgstr "" -#: includes/templates/docs/single/index.php:9 +#: includes/templates/docs/single/index.php:12 msgid "" "This doc is currently being edited by %1$s. In order to prevent edit " "conflicts, only one user can edit a doc at a time." msgstr "" -#: includes/templates/docs/single/index.php:12 +#: includes/templates/docs/single/index.php:15 msgid "" "Please try again in a few minutes. Or, as an admin, you can force cancel the edit lock." msgstr "" -#: includes/templates/docs/single/index.php:14 +#: includes/templates/docs/single/index.php:17 msgid "Please try again in a few minutes." msgstr "" @@ -830,103 +842,119 @@ msgstr "" msgid "Who can view the history of this doc?" msgstr "" -#: includes/templatetags.php:1136 +#: includes/templatetags.php:945 +msgid "Untrash" +msgstr "" + +#: includes/templatetags.php:1171 +msgid "Remove from Trash" +msgstr "" + +#: includes/templatetags.php:1173 includes/templatetags.php:1946 +msgid "Delete" +msgstr "" + +#: includes/templatetags.php:1200 msgid "«" msgstr "" -#: includes/templatetags.php:1137 +#: includes/templatetags.php:1201 msgid "»" msgstr "" -#: includes/templatetags.php:1325 +#: includes/templatetags.php:1388 msgid "All Docs" msgstr "" -#: includes/templatetags.php:1329 +#: includes/templatetags.php:1392 msgid "%s's Docs" msgstr "" -#: includes/templatetags.php:1335 +#: includes/templatetags.php:1398 msgid "My Groups" msgstr "" -#: includes/templatetags.php:1417 +#: includes/templatetags.php:1480 msgid "Group: " msgstr "" -#: includes/templatetags.php:1419 +#: includes/templatetags.php:1482 msgid " %s" msgstr "" -#: includes/templatetags.php:1433 +#: includes/templatetags.php:1496 msgid "My Friends" msgstr "" -#: includes/templatetags.php:1435 +#: includes/templatetags.php:1498 msgid "Just Me" msgstr "" -#: includes/templatetags.php:1439 +#: includes/templatetags.php:1502 msgid "Members of: %s" msgstr "" -#: includes/templatetags.php:1440 +#: includes/templatetags.php:1503 msgid "Admins and mods of the group %s" msgstr "" -#: includes/templatetags.php:1444 +#: includes/templatetags.php:1507 msgid "The Doc author only (that's you!)" msgstr "" -#: includes/templatetags.php:1451 +#: includes/templatetags.php:1514 msgid "This Doc can be read by: %s" msgstr "" -#: includes/templatetags.php:1455 +#: includes/templatetags.php:1518 msgid "This Doc can be edited by: %s" msgstr "" -#: includes/templatetags.php:1459 +#: includes/templatetags.php:1522 msgid "Comments are visible to: %s" msgstr "" -#: includes/templatetags.php:1463 +#: includes/templatetags.php:1526 msgid "Comments can be posted by: %s" msgstr "" -#: includes/templatetags.php:1467 +#: includes/templatetags.php:1530 msgid "History can be viewed by: %s" msgstr "" -#: includes/templatetags.php:1509 +#: includes/templatetags.php:1572 msgid "Private" msgstr "" -#: includes/templatetags.php:1512 +#: includes/templatetags.php:1575 msgid "Public" msgstr "" -#: includes/templatetags.php:1515 +#: includes/templatetags.php:1578 msgid "Limited" msgstr "" -#: includes/templatetags.php:1520 +#: includes/templatetags.php:1583 msgid "Access: %s" msgstr "" -#: includes/templatetags.php:1521 +#: includes/templatetags.php:1584 msgid "Show Details" msgstr "" -#: includes/templatetags.php:1537 +#: includes/templatetags.php:1600 msgid "Hide Details" msgstr "" -#: includes/templatetags.php:1827 +#: includes/templatetags.php:1890 msgid "Add Files" msgstr "" -#: includes/theme-bridge.php:223 +#: includes/templatetags.php:2060 +msgid "Trash" +msgstr "" + +#: includes/theme-bridge.php:239 msgid "Create a Doc" msgstr "" From 2cef3959790da21c6b83a8cc92c23e0a1a8960ce Mon Sep 17 00:00:00 2001 From: David Cavins Date: Mon, 16 Dec 2013 11:27:02 -0600 Subject: [PATCH 111/126] Improve "show more tags" appearance in old IE Slight de-dorkification for users of IE8 and IE7. --- includes/css/screen.css | 2 +- includes/scss/screen.scss | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/includes/css/screen.css b/includes/css/screen.css index ea337770..f1b56fa3 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:block;line-height:3em;text-decoration:none;text-align:center;background:#fff;background-opacity:.5;border-radius:3px;margin-bottom:1em}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}ul#tags-list li{margin-left:0}ul#tags-list li.hidden-tag{display:none}ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:inline;line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;padding:5px 10px;border-radius:3px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}ul#tags-list li{margin-left:0}ul#tags-list li.hidden-tag{display:none}ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 4em){#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:block;margin-bottom:1em;padding:0;text-align:center}}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 78ef0c75..bd24798b 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -519,14 +519,15 @@ a.docs-filter-title.current { #docs-filter-section-tags a.tags-action-button, #docs-filter-section-tags a.tags-action-button:visited { - display: block; // Let the button span the entire box + display: inline; line-height: 3em; text-decoration: none; - text-align: center; + // text-align: center; background: #fff; background-opacity: .5; + padding: 5px 10px; border-radius: 3px; - margin-bottom: 1em; + // margin-bottom: 1em; } body.js .docs-filter-section { @@ -833,13 +834,23 @@ table#post-revisions { margin-top: 20px; } -//Media query for larger screens +//Media query for most screens, unseen by IE 7 or 8 +@media screen and (min-width:4em) { + #docs-filter-section-tags a.tags-action-button, + #docs-filter-section-tags a.tags-action-button:visited { + display: block; // Let the button span the entire box + margin-bottom: 1em; + padding: 0; + text-align: center; + } +} +//Media query for larger screens, like tablet @media screen and (min-width:50em) { .entry-content ul#tags-list { @include multi-columns(4, 5%); } } -//Media query for larger screens +//Media query for larger screens, like desktop @media screen and (min-width:71em) { .entry-content ul#tags-list { @include multi-columns(5, 5%); From 944f15776cc138559fdf587d0809f428ecd2380a Mon Sep 17 00:00:00 2001 From: David Cavins Date: Mon, 16 Dec 2013 11:36:31 -0600 Subject: [PATCH 112/126] Clean up Remove commented-out code. --- includes/scss/screen.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index bd24798b..395e597e 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -522,12 +522,10 @@ a.docs-filter-title.current { display: inline; line-height: 3em; text-decoration: none; - // text-align: center; background: #fff; background-opacity: .5; padding: 5px 10px; border-radius: 3px; - // margin-bottom: 1em; } body.js .docs-filter-section { From 80a0c74c8d1b2df2e007ee91d734431ad1d76e3e Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 16 Dec 2013 13:37:42 -0500 Subject: [PATCH 113/126] Readme --- readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.txt b/readme.txt index 021200ed..bfe38bf3 100755 --- a/readme.txt +++ b/readme.txt @@ -33,6 +33,9 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == += 1.5.7 = +* Improve appearance of tags filter on IE < 9 + = 1.5.6 = * Allow current filter to be toggled by reclicking filter name * Fix bug in "Edited by Me" logic when user has not edited any Docs From 947bdc4c902e6155a477cba94865549f2c6cc904 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Thu, 23 Jan 2014 20:36:53 -0500 Subject: [PATCH 114/126] Streamline attachments javascript Initialize the necessary elements on $(document).ready(), rather than on every click. See #362 Hat tip to @yura121 --- includes/js/attachments.js | 55 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/includes/js/attachments.js b/includes/js/attachments.js index a9673ce2..add486fb 100644 --- a/includes/js/attachments.js +++ b/includes/js/attachments.js @@ -10,37 +10,12 @@ window.wp = window.wp || {}; event.preventDefault(); - // If the media frame already exists, reopen it. - if ( file_frame ) { - file_frame.open(); - return; - } - - BP_Docs_MediaFrame = wp.media.view.MediaFrame.Select.extend({ - browseRouter: function( view ) { - view.set({ - upload: { - text: wp.media.view.l10n.uploadFilesTitle, - priority: 20 - } - }); - } - }); - - file_frame = new BP_Docs_MediaFrame({ - title: bp_docs.upload_title, - button: { - text: bp_docs.upload_button, - }, - multiple: false - }); - - file_frame.open(); - // Change to upload mode - Library = file_frame.states.get('library'); Library.frame.content.mode('upload'); + // Open the dialog + file_frame.open(); + return; }); @@ -60,6 +35,18 @@ window.wp = window.wp || {}; } ); }; + // Extension of the WP media view for our use + BP_Docs_MediaFrame = wp.media.view.MediaFrame.Select.extend({ + browseRouter: function( view ) { + view.set({ + upload: { + text: wp.media.view.l10n.uploadFilesTitle, + priority: 20 + } + }); + } + }); + doc_id = wp.media.model.settings.post.id; if ( 0 == doc_id ) { @@ -72,4 +59,16 @@ window.wp = window.wp || {}; }; wp.media.ajax( 'bp_docs_create_dummy_doc', options ); } + + $(document).ready(function(){ + file_frame = new BP_Docs_MediaFrame({ + title: bp_docs.upload_title, + button: { + text: bp_docs.upload_button, + }, + multiple: false + }); + + Library = file_frame.states.get('library'); + }); })(jQuery); From 82c95309aa7272dcdf443f7a92b67b365763f362 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 28 Jan 2014 22:17:48 -0500 Subject: [PATCH 115/126] Fix PHP notice --- includes/theme-bridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/theme-bridge.php b/includes/theme-bridge.php index 13261c98..dff7c9ff 100644 --- a/includes/theme-bridge.php +++ b/includes/theme-bridge.php @@ -75,7 +75,7 @@ function bp_docs_template_include( $template = '' ) { * * @return bool */ -function bp_docs_do_theme_compat() { +function bp_docs_do_theme_compat( $template = false ) { return class_exists( 'BP_Theme_Compat' ) && apply_filters( 'bp_docs_do_theme_compat', true, $template ); } From 0d3717f6070d705d39439e8a9a8136343953ddb6 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 28 Jan 2014 22:20:12 -0500 Subject: [PATCH 116/126] Show row actions without hover for mobile devices --- includes/component.php | 6 +++++- includes/css/screen.css | 2 +- includes/scss/screen.scss | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/component.php b/includes/component.php index 8d29aace..73de252c 100644 --- a/includes/component.php +++ b/includes/component.php @@ -1025,7 +1025,11 @@ function body_class( $classes ) { $classes[] = 'trashed-doc'; } - return $classes; + if ( wp_is_mobile() ) { + $classes[] = 'mobile'; + } + + return array_unique( $classes ); } /** diff --git a/includes/css/screen.css b/includes/css/screen.css index f1b56fa3..42d3276a 100644 --- a/includes/css/screen.css +++ b/includes/css/screen.css @@ -1 +1 @@ -.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:inline;line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;padding:5px 10px;border-radius:3px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}ul#tags-list li{margin-left:0}ul#tags-list li.hidden-tag{display:none}ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 4em){#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:block;margin-bottom:1em;padding:0;text-align:center}}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} +.hide-if-no-js{display:none}.description{font-weight:normal;font-style:italic}.description code{font-style:normal;background:#eee;padding:2px 4px}#bp-create-doc-button{float:right;margin:5px 19px;font-weight:bold}body.bp-docs div.page ul{list-style-type:none}#bp-docs-all-docs{width:auto}.doc-tabs{overflow:hidden}.doc-tabs ul{padding-left:0}.doc-tabs li{float:left;margin:0 5px;list-style-type:none}.doc-tabs li:first-child{margin-left:0}.doc-tabs li a{background:#f1f1f1;text-decoration:none;display:block;padding:4px 10px;border-radius:5px 5px 0 0}.doc-tabs li.current a{background:#f3f3f3;color:#555;font-weight:bold}.doc-header h4{margin-bottom:15px !important}.docs-filter{display:block;width:400px;float:left;margin-bottom:15px}.doc-search{float:right;width:250px;text-align:right}.docs-filter-tags{width:100%}.docs-filter-tags ul li{display:block;width:120px;float:left;padding:6px}.doctable{border-collapse:separate;border-spacing:0}.doctable p{padding:0;margin:0}.doctable tr:hover .row-actions{visibility:visible}.doctable tr:nth-child(even){background-color:#f3f3f3}.doctable .bp-doc-trashed-doc .attachment-clip-cell{border-left:4px solid red}.bp-docs-trashed-doc-notice{color:red;font-size:.9em;font-style:italic}#buddypress #bp-docs-all-docs li{background:#eee}#buddypress div.doc-permissions{float:none;width:auto;margin-bottom:1em}#buddypress table.doctable td{vertical-align:top}#buddypress table.doctable tr:nth-child(even){background-color:#f3f3f3}#buddypress table.doctable tr th{background-color:#f3f3f3}.row-actions{visibility:hidden;padding:2px 0 0}body.mobile .row-actions{visibility:visible}.row-actions a{color:#999;font-size:11px}.row-actions a.delete{color:#f00}#docs-filter-submit{margin:10px 4px}.title-cell{width:30%}.author-cell,.created-date-cell,.edited-date-cell{text-align:center;width:100px}.current-orderby a{padding-left:20px}.asc a{background:url(../images/sort-col-asc.gif) no-repeat}.desc a{background:url(../images/sort-col-desc.gif) no-repeat}.doc-edit-link{margin:15px 0 20px 0}.doc-meta,#doc-meta,.docs #comments{padding-top:20px;border-top:1px solid #ddd}div.docs-info-header{background:#f3f3f3;padding:5px 10px;margin-bottom:10px}#associated_group_summary .item{padding-top:1em}#associated_group_summary .meta{font-size:11px;color:#888}#associated_group_summary img.avatar{margin-left:0}#doc-attachments-ul{margin-top:1em;list-style-type:none}#doc-attachments-ul li{margin:0px 5px 0px 0;padding:6px}#doc-attachments-ul li.even{background-color:#f3f3f3}#doc-attachments-ul .doc-attachment-delete{float:right;margin-top:.15em;margin-right:.3em}.bp-docs-attachment-clip{cursor:pointer;display:block;margin-top:10px}.doc-attachment-mime-icon{display:block;float:left;width:24px;height:24px;margin-right:5px;background:transparent url("../images/mime-type-sprites.png") no-repeat}.doc-attachment-mime-tar,.doc-attachment-mime-zip,.doc-attachment-mime-gz,.doc-attachment-mime-gzip,.doc-attachment-mime-rar,.doc-attachment-mime-7z{background-position:0 0px}.doc-attachment-mime-mp3,.doc-attachment-mime-m4a,.doc-attachment-mime-m4b,.doc-attachment-mime-ra,.doc-attachment-mime-ram,.doc-attachment-mime-wav,.doc-attachment-mime-ogg,.doc-attachment-mime-oga,.doc-attachment-mime-mid,.doc-attachment-mime-midi,.doc-attachment-mime-wma,.doc-attachment-mime-mka{background-position:0 -40px}.doc-attachment-mime-ics{background-position:0 -80px}.doc-attachment-mime-mdb,.doc-attachment-mime-odb{background-position:0 -120px}.doc-attachment-mime-odg{background-position:0 -160px}.doc-attachment-mime-jpg,.doc-attachment-mime-jpeg,.doc-attachment-mime-gif,.doc-attachment-mime-png,.doc-attachment-mime-bmp,.doc-attachment-mime-tif,.doc-attachment-mime-tiff,.doc-attachment-mime-ico{background-position:0 -200px}.doc-attachment-mime-pdf{background-position:0 -240px}.doc-attachment-mime-xla,.doc-attachment-mime-xls,.doc-attachment-mime-xlt,.doc-attachment-mime-xlw,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsb,.doc-attachment-mime-xlsx,.doc-attachment-mime-xlsm,.doc-attachment-mime-xlam,.doc-attachment-mime-ods,.doc-attachment-mime-odc{background-position:0 -280px}.doc-attachment-mime-txt,.doc-attachment-mime-asc,.doc-attachment-mime-c,.doc-attachment-mime-cc,.doc-attachment-mime-h,.doc-attachment-mime-csv,.doc-attachment-mime-tsv,.doc-attachment-mime-ics,.doc-attachment-mime-rtx,.doc-attachment-mime-css,.doc-attachment-mime-htm,.doc-attachment-mime-html{background-position:0 -320px}.doc-attachment-mime-asf,.doc-attachment-mime-asx,.doc-attachment-mime-wax,.doc-attachment-mime-wmv,.doc-attachment-mime-wmx,.doc-attachment-mime-avi,.doc-attachment-mime-divx,.doc-attachment-mime-flv,.doc-attachment-mime-mov,.doc-attachment-mime-qt,.doc-attachment-mime-mpeg,.doc-attachment-mime-mpg,.doc-attachment-mime-mpe,.doc-attachment-mime-mp4,.doc-attachment-mime-m4v,.doc-attachment-mime-ogv,.doc-attachment-mime-mkv{background-position:0 -360px}body.js .bp-docs-attachment-drawer{display:none}.bp-docs-attachment-drawer h4{margin:.5em 0}.bp-docs-attachment-drawer>ul{list-style-type:none}.bp-docs-attachment-drawer>ul>li{margin-left:0}.hide-pane,.show-pane,.paperclip-vertical,.paperclip-jaunty{background:url("../images/bp-docs-ui-sprites.png") no-repeat;display:block;float:left;margin-left:10px;margin-top:5px}.hide-pane{background-position:0 0;width:16px;height:16px}.show-pane{background-position:0 -28px;width:16px;height:16px}.paperclip-vertical{background-position:0 -55px;width:13px;height:36px}.paperclip-jaunty{background-position:0 -105px;width:17px;height:36px}.toggle-switch,.entry-content p.toggle-switch{display:block;font-size:1em;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border:1px solid #ccc;background-color:#f3f3f3;padding:3px 0;text-indent:16px;margin:16px 0 0}.toggle-switch.active-switch,.entry-content p.toggle-switch.active-switch{-moz-border-radius-bottomleft:10px;-webkit-border-bottom-left-radius:10px;-moz-border-radius-bottomright:10px;-webkit-border-bottom-right-radius:10px;border-radius:3px 3px 0px 0px}.toggle-switch a,.entry-content p.toggle-switch a{color:#757575;text-decoration:none;display:block;width:100%;height:100%}.toggle-switch a:hover,.entry-content p.toggle-switch a:hover{font-weight:bold}.standard-form label.toggle-switch{margin:16px 0 0}.toggle-content{-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border:1px solid #ccc;border-top:none;overflow:hidden}td.desc-column{width:300px;padding:0px 18px 12px}.docs-info-header .docs-filter{margin-bottom:0}#docs-filter-meta{font-size:.8em;color:#666;margin-bottom:0}a.docs-filter-title{margin:0 7px;text-decoration:none}a.docs-filter-title:visited{color:inherit}a.docs-filter-title.current{font-weight:bold}.docs-filter-section{border:1px solid #ccc;border-radius:2px;font-size:.8em;padding:6px 10px;margin-top:8px;transition:max-height 2s ease;overflow:hidden;position:relative}#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:inline;line-height:3em;text-decoration:none;background:#fff;background-opacity:.5;padding:5px 10px;border-radius:3px}body.js .docs-filter-section{display:none}body.js .docs-filter-section.docs-filter-section-open{display:block}p.currently-viewing{margin-bottom:5px;font-size:.8em;margin-top:8px}p#filter-by-tag{margin-bottom:0}.docs-info-header .toggle-switch{margin-top:8px}ul#tags-list{list-style-type:none;margin-bottom:0;padding:0;-moz-column-count:2;-moz-column-gap:10%;-webkit-column-count:2;-webkit-column-gap:10%;column-count:2;column-gap:10%}ul#tags-list li{margin-left:0}ul#tags-list li.hidden-tag{display:none}ul#tags-list li.tags-ellipses{font-style:italic}.groups-cell ul li img.avatar{float:none}.groups-cell ul li a{vertical-align:middle;font-size:.85em}.groups-cell ul{list-style-type:none;padding-left:0}.groups-cell ul li{margin-bottom:.5em}select#has-attachment{margin:8px 10px}div#bp-docs-pagination{position:relative;height:30px}div#bp-docs-pagination-count{position:absolute;left:0;top:5px;font-size:.9em;color:#999}div#bp-docs-paginate-links{position:absolute;right:0;top:5px}div#bp-docs-paginate-links a{padding:0 4px}div.doc-content{padding:20px;border:3px solid #f3f3f3}div.doc-content img{margin:10px}div.doc-content img.mceIcon{margin:0}#bp-docs-single-doc-header{overflow:hidden}body.trashed-doc #buddypress{border-left:4px solid red;padding-left:10px}div.doc-permissions{float:right;width:35%;background:#f0f0f0;border:1px solid #ddd;border-radius:3px;padding:4px}div.doc-permissions div:last-child{clear:both}#doc-permissions-summary,#doc-group-summary{font-size:1.0em;padding:3px 12px;border:1px solid}#doc-permissions-summary.doc-public{background:#b2ffb2;border-color:#00ff00}#doc-permissions-summary.doc-limited{background:#ffffe0;border-color:#e6db55}#doc-permissions-summary.doc-private{background:#ffebe8;border-color:#ff0000}a.doc-permissions-toggle{display:block;float:right;font-size:12px;cursor:hand}dl.doc-permissions-types dd,dl.doc-permissions-types dt{height:1.5em}dl.doc-permissions-types dt{width:50%;float:left;clear:left}#doc-group-summary{border-color:#f0f0f0}#doc-group-summary img.avatar{float:none}#doc-permissions-details ul{list-style-type:none;padding-left:0}#doc-permissions-details ul li{margin-bottom:.5em}span.bp-docs-level-icon{display:block;float:left;width:1.2em;height:1.2em;margin:3px 5px}.bp-docs-level-anyone span.bp-docs-level-icon{-moz-border-radius:.6em;-webkit-border-radius:.6em;border-radius:.6em;background:green}.bp-docs-level-friends span.bp-docs-level-icon,.bp-docs-level-loggedin span.bp-docs-level-icon,.bp-docs-level-group-members span.bp-docs-level-icon{width:0;height:0;border-left:.6em solid transparent;border-right:.6em solid transparent;border-bottom:1.2em solid yellow}.bp-docs-level-admins-mods span.bp-docs-level-icon,.bp-docs-level-no-one span.bp-docs-level-icon,.bp-docs-level-creator span.bp-docs-level-icon{background:red}div.doc-is-locked .toggle-switch{display:block;background:#bbb url(../images/padlock.gif) no-repeat;text-indent:25px;padding-top:3px}div.doc-is-locked .toggle-content{border:2px solid #f33;margin-top:5px;padding:7px 10px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}div.doc-meta p{margin-bottom:5px}a.nonexistent-doc{color:#f33}h2.doc-title{display:inline-block;width:50%}.comments-closed{padding:10px 20px;background:#f3f3f3;margin-top:10px}#respond{margin-top:20px}.doc-content ul{list-style:disc}.doc-content ol{list-style:decimal}.doc-content li{margin-left:20px}.doc-content blockquote{background:#f3f3f3;padding:5px;margin:10px 30px}div.hidden{display:none}table.group-docs-options td.label{width:200px}table.diff{width:100%}table.diff col.content{width:50%}table.diff tr{background-color:transparent}table.diff td,table.diff th{padding:.5em;font-family:Consolas, Monaco, Courier, monospace;border:none}table.diff .diff-deletedline del,table.diff .diff-addedline ins{text-decoration:none}table.diff .diff-deletedline{background-color:#fdd}table.diff .diff-deletedline del{background-color:#f99}table.diff .diff-addedline{background-color:#dfd}table.diff .diff-addedline ins{background-color:#9f9}#att-info{background-color:#E4F2FD}table#post-revisions{margin-top:20px}@media screen and (min-width: 4em){#docs-filter-section-tags a.tags-action-button,#docs-filter-section-tags a.tags-action-button:visited{display:block;margin-bottom:1em;padding:0;text-align:center}}@media screen and (min-width: 50em){.entry-content ul#tags-list{-moz-column-count:4;-moz-column-gap:5%;-webkit-column-count:4;-webkit-column-gap:5%;column-count:4;column-gap:5%}}@media screen and (min-width: 71em){.entry-content ul#tags-list{-moz-column-count:5;-moz-column-gap:5%;-webkit-column-count:5;-webkit-column-gap:5%;column-count:5;column-gap:5%}} diff --git a/includes/scss/screen.scss b/includes/scss/screen.scss index 395e597e..f7f6917a 100644 --- a/includes/scss/screen.scss +++ b/includes/scss/screen.scss @@ -167,6 +167,10 @@ body.bp-docs div.page ul { padding: 2px 0 0; } +body.mobile .row-actions { + visibility: visible; +} + .row-actions a { color: #999; font-size: 11px; From 5cc8e759fb060f5875d364c356357b8bab4118d6 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 28 Jan 2014 22:21:06 -0500 Subject: [PATCH 117/126] Readme update --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index bfe38bf3..bd2ec7df 100755 --- a/readme.txt +++ b/readme.txt @@ -34,6 +34,7 @@ This plugin is in active development. For feature requests and bug reports, visi == Changelog == = 1.5.7 = +* Improve appearance of row actions on mobile devices * Improve appearance of tags filter on IE < 9 = 1.5.6 = From 369c55ad09958f9772b245e5d2382ea0f20e1cd6 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 10 Feb 2014 08:59:08 -0500 Subject: [PATCH 118/126] Update ru_RU. Props Kritoeh --- languages/bp-docs-ru_RU.mo | Bin 22703 -> 26911 bytes languages/bp-docs-ru_RU.po | 469 ++++++++++++++++++++++--------------- 2 files changed, 279 insertions(+), 190 deletions(-) diff --git a/languages/bp-docs-ru_RU.mo b/languages/bp-docs-ru_RU.mo index 4969e7b10c5dce2bd593ea24c31501ca2d2767cb..82bd8a8048192642f54cba9dfbab892e737436eb 100644 GIT binary patch delta 7828 zcmchZ3v^Z0na58Oh#&%*@Q`OV1REa74G$3r@ApF{JOZs~K`yx`$t}sf;och_y6EMh z1t*aR2U@gKpu_6a>S~SLL?SPTj*fPmj`!M!UA8#Ws$-|lOh-pi$LX5+{m(f`C`#8F zyQZ$lZ|{A+y}!r)zHi?rp3FM_a#r%SylzJ<{(Fo6hw}fL>ol{hraoQFVfY~P;qV|F z4_n|M_)9nrehhDhMSU%6ESv-L;AYqpei>d5_e1_H$6HTYCmBfRcYU_OZp_caN8$Hj z5^lcHviiffVK10um+{aLn>6LF;1K}t*Cd;yB zz+8D&#p$DA9bC?bufhfJb<9-AMzhPnNpL<~0|W4=&*xz=^UMCc5N-Hit%gM~1Qm%U zsK^|Kia-lY8U}yMfa|l~f;Yg+P#bc%V9k3$d2};ug#{21>&H-$`!^_0FGK#U+`%3V zlw27c1uLMgb~}{5or8(L4rpRQcXR}ffX97-i;!SgX{e2FLdpLI%CP_RDYuBS)f?Ud z4U_|m;B&AX%D{ePxEvV;d&6- zAygH-0d*zsL&^OY)H%O{QkZ4D^Ljx!kPl_RV5skfaHJ}`gh34pE1?W{8cN|ssEsc{ zdG=E%g|9q#7WoCl>~9+doYsQs&;&f5SLX&d%Y{cmBwEm*tY9q<^G zr5`}@#x+w148>e290L{l=}?9)gHm*d|9!o`9`(5sO1=>)LXSYnAA^h0Z=GZyg>S=p z_#UJ;SazXT4LcxtV|^VK!FFiiKf#4CYn0c57sD~k<4|(nfTV@>91OrWU@^=mVN{lL zU~(ISbqo%|4D1doKj$$F4f7~eh#&HK6eDD6RkF(b8EQk^R!$F8G)}t^7{sUYJUxriQ(9t9iTmvPy-RChV1<%4V_#PY! zO9{((cqg0&8=)fd+!*3Nj=_5@%!CH%+u#OxH#`ET!}sBAI04}^a0`sXV&bV}JOSxN zRtv;Q>qV&Cc^6L0;{Hp#$Sgst^pwNZuqnv^-PS+CS+FPO%b+E24opCGz&5Cm{T-yu zTfc+_@FRad2={t2pWt&k%w@h1j=+HB@D=8f2{;EAP4o;*ev5$wFT&mM1=t5Jo8*Of z9n53C6RJucg4k+(4=R+G;37EiR`0+K@Jr0^fr`|dum?Ob*^AJ3Ai=Png*cG3-eqtD z3wgwS1T273I2USt4OFrPAqi~7p+bBVKAcTsf--m=)@*?_Fo*S5;b{08_t%g0>j>{s zI27)MRdAK+|2GV3SeU^DFNEKMx5Kxgl5ENxujk(d2QWVj(P=#nl^ef;%i-|3UU_YX za^xty5uSm{g%|z#TM(bE58(v#TY-6=g&Uy+8=!#)eV&3`pY{va%X z```%pZ75HF02S)|1zrT_LiLdfSP1K3QiH<`#=v%{1AhhOSr5XY&@F)9%p$~4Iq)$T zu8zBbT_hBKTXVs~X6?$iV>AxvL>*VMU>;=sU}azgpo% z7WlJX<)8kr=+C^Yo(XH2-v@QzJ5UDoDEH(>`7DDsu)Y$?@bypz-wS)dCMbiCKq}U{ z0ClDRo@CI6LBR^|Q3ycICqadD9@G`A_2*xL@?fq0Uc2U3KyRgOLncp*q+rkUX>Ag)(6BYR`ZrP@!E9<>~!UcX!f@P}zkiT#o>fkh#XP00;%v$UH66z1NUJ4~w;d3LD!aAss ze+2&rUjKQo9IyX^m&{Y342i>K@G+?Tv)*TLHw&|P{3Gxf#4@Y*IXES(~ zfdsp4@;s`5ELn#krEXn@lABp+S>&0u6XK-xLrA_^V?vZ7ya(P3UxEBt6*fO)VLK$K z)`}|6@JC@^BK5l}QtAvJde?Xncme7T{~7j!AHY0#LpU|I_sX1cwb5;+A#TUwCJ{Bk zP{;%miC|?-ogGQIONkmg95V}|mGOYH?ZywBzr1N>Dle}vD;bPb+lH?uUfWQuBSJc1 zQ$x5mX{@Mb$;Zny1v6ONc5mz9=QMw20Xdtj5isFxRkXso&vb#^2aj#QU)eJHJLh$o_T;d``P8{C8yC3S4T zfOttT5-Mqk)y7MUX4Mj=1{O_KxYnLg8k}XSu-T z@w0|8>0aX>AIHxc#+iRq98(kXPh<^`Hjt~znV4M{-D)d>UhLMyg7F&XrGC?A+wsa+ zxIPgkZFL{Y_h398tqhYFp^|XIt|N1|Mq?c;iU0&R###l$g#hh7@)Sq1dg)Vq+&NyJ`2hTPBQ(n_DK1idzf9F}pGmjqNZC zw^!P+`h;0-N2(Jwe251()!HGaNB^L6TmL?JokZrSV%24REV?xuvdtztfy<^c8d1>%%+e}VsvD#_ zDlKL@b2?^kY2c8!sg2S#V)}-P7`w}j?fJsdos~;0wgzh(sL%?V@{XDrmC=wrYy1rA z4r(RjxvWrA)g5O9ocRNaa_xv63)VU{19s&uR&R-?-WqT;dwA!)d0uS`C#ZI{4ma+p z1B1St)z?h}w+(qI&~wOT=kky{b7*m?@}cvx2AM=SQL7@gNgek3o`nLbreO!N@|8iX z(w~$m-Wg2=qn#NA|I*!?jWUI~k%XIH3r$h}T3WAJL+>jmB`nS2sm-P?XSkn|ZiDO0 z%dSJ$7aHehg(KGnYiUuT9VTQ~g(GUga>xyyjPT;Nt-gdistQ*J>TBx#7#5p&lQ2{GtJJH$@$$g%_e=u39ib|NuLX(;w96vvf7>R z2NpWjr5jS+$3K>R$IL=lRltls=_fGkZHXW*+qR zpV#O1^yy@m)6&qEJ|icv3Afrx(r1x*Qu^954`dFaPlkA2wz#4CO1cfDhrJLW$&NOT z#+(PzE$)Ge*?B&sbPO7OgdCQo_0OP*>=91$G}fMf}gE< zC$ISkW}3Nbt{?5PK;~!elU=yj;y#N0&0le4YEgktzif7%<{&p}-qoDZLC$NXJ)Fw2 z{5%{ahm<{NX;&CY=fTN8NfKN;2a3 zUN@c3y6u6!;!mAbQwI*nG`b~0Z{q7N5~Q8vZgehAKID9JO8!Rqtu%DAh7USzx9NI> z=_*v7Hc>i=HmYbj=PAx>cN6N2TZAnLDTCXTnqT8IXp=&5cC z`=r^_|q`IKmKfCCz9pYZ$bgl9fxVPa3?i2UX)%6Fl@HUjJ9@>v&IsN?+L-UQJgk_Zxs93ep@mi!>1t^AZ!{S1~OiI7XINJv8I57&?BbQeMQ ztTk-?$k?5BR;%Rrt*Jk@)>garUc1|!j;XSpTHPJWwzSI*`~KwInKiE0^PKaX=lMS0 z=X=gLaK-c9F^~URO!zLtpCG?Pe!uRjo-r9c|8E%0O!@*dQ7>^rq1pW&9<3&uz z>llNPy^QIO1Mw*whEbU9UiX_~8r`@sCFE=jr(cP0<0AB9Bu~ZRR*b|p)VO!C6x&g; z|9}JV32NQ}z1;u?qn^t|%`*;@HS;tY5nO1*4Y(FH(SNWHnrLHanmA-mlNRcaLG7>% zHSs*ub4xHASD?nXp)zv}`{5-_#=qlmzsDFav*^K$ST{x4XwiQbi?JF<;-QdNFoV8_ z=yZJ~GMA~uq1cGp`EFDu4xn~?4oRj7Vh_BIehs`Gx^N#Ah?midygTZQ<3nbnb}|K( z`X#6dm!mTH66&lsV+yw7AUuj1cLiC(+(145AddX&!AD$BMB#m1qcN5KKvWrwM;K|Qw{^YAUyMz4pi-$IT1p)cpJMi&l717a`}6HsScj%6It z{LuYFY+nl_eq)6(->ZoQwOBzvg@X(Q~nUwN(8UYJ3(du)@&wX`y~i$VSw-S20ZQ|27(m zcqf+OE>s3S$CY>!dE?9+qEIz2$D!DY7M?(TfIh_$n8;^xIF_TvHKD$od-+Faeg-q} z7QV>(CXTPc8`z4f>SW8EI2Dz;iKrb;MP+6oD!_VFDpw_WeU{62$|umXRI zO8r%Q7P|~{11P})`YTZ%pkt^^{C=3<{U(3T1+s7MBd@xNV-}@0GvruQaTekr0w~A7 z(fsQ}wh<2rC7euyfzi5xhaHnUORm32tDm~DO%T1Kd=Wr#A@uu`KgwcB1t#?bu`GP*^d+O0`BpW zIu5iK{R3HU%8uZ3^nZt&v1c}~EWUwt_$8L&kIGOi=cWZxQ2i1l+h!)}xlO1* z-a(D~1b5&ajADJWKHptzgcYa> zT5uum#jW@VsW-cLjP^dkmYVs{uL+DkEXO~ngv*mzrhCV!c7Izf}FB>57W?phsKX-#PQP7H1#;x z!~bls39n9eGct9mdw(&iCXQe_UO=V%E^24Jrnwo)Lh94Z#aZ|ZBo^~EDzNP7#=M~S z-=?8~w~;x_aK0*CaV@SvKd!_FI02VdxZ~c!0$s-%96Qr3-aV*s*O9f1#p?5MC9;J1 z1Q%e^Y-4H-=k^kfxm@@H6=@#nh+^lhc$WUYIqnYUGN?EGHP{DVN7c-mbDb@{ria-P zG2dl1w$xcIbv~@99=Xz?|)SWA}q>T8>=nkJvs*;$m&=KeeZVjBU0_TI9>6{I23U0L%$COqE4g@|3oD1%-0;d8;1CBcU+WDQe z0;jFuMq0-MCxROSC%NAdIIT&JcMdzLIjz94;8tea=1y?F^G-+Lgzk;BtH#uL1N-cI zyvdCzwXmxGvy6H{6=H||g<~#3?dDrViJlikKt}kr0*AyMJtBTvgQ%4VJw!f)M zaIO|dcwp-config.php, so it cannot be edited here." +msgstr "Вы уже определили это значение в wp-config.php, оно не может быть изменено здесь." + +#: includes/admin.php:162 +msgid "Excerpts are shown on Docs directories, to provide better context. If your theme or language requires longer or shorter excerpts, change this value. Set to 0 to disable these excerpts." +msgstr "Выдержки отображаются в каталоге документов, чтобы обеспечить лучший контекст. Если ваша тема или язык требуют большей или меньшей длинны выдержки измените это значение. Установите значение 0, чтобы отключить выдержки." + +#: includes/admin.php:75 +msgid "Directory Excerpt Length" +msgstr "Длина выдержки в каталоге" + +#: includes/admin.php:85 +msgid "Users" +msgstr "Пользователи" + +#: includes/admin.php:93 +msgid "User Tab Name" +msgstr "Вкладка в профиле пользователя" + +#: includes/admin.php:65 +msgid "Slug" +msgstr "Ярлык" + +#: includes/admin.php:172 +msgid "Change the word on the BuddyPress group tab from 'Docs' to whatever you'd like. Keep in mind that this will not change the text anywhere else on the page. For a more thorough text change, create a language file for BuddyPress Docs." +msgstr "Измените название вкладки в группе BuddyPress с 'Docs' на то, что вам нравится. Имейте ввиду, что это не изменит текст где-либо ещё на странице. Для более тщательного изменения текста создайте свой вариант языкового файла для BuddyPress Docs." + +#: includes/admin.php:182 +msgid "Change the word on users' Docs tabs from 'Docs' to whatever you'd like. Keep in mind that this will not change the text anywhere else on the page. For a more thorough text change, create a language file for BuddyPress Docs." +msgstr "Измените название вкладки документов в профиле пользователя с 'Docs' на то, что вам нравится. Имейте ввиду, что это не изменит текст где-либо ещё на странице. Для более тщательного изменения текста создайте свой вариант языкового файла для BuddyPress Docs." + +#: includes/admin.php:192 +msgid "Enabled" +msgstr "Разрешить" + +#: includes/admin.php:193 +msgid "Disabled" +msgstr "Запретить" + +#: includes/admin.php:195 +msgid "Allow users to add attachments to their Docs." +msgstr "Разрешть пользователям добавлять вложения к документам." + +#: includes/functions.php:160 +msgctxt "Description for the associated-item taxonomy term. Of the form \"Docs associated with the [item-type] [item-name]\" - item-type is group, user, etc" +msgid "Docs associated with the %1$s %2$s" +msgstr "Документы, связанные с %1$s %2$s" + +#: includes/integration-groups.php:1075 +msgid "Minimum role to associate Docs with this group:" +msgstr "Минимальная роль, позволяющая связать документ с группой:" + +#: includes/query-builder.php:451 +msgid "The title field is required." +msgstr "Поле заголовка не требуется." + +#: includes/component.php:1127 msgid "Upload File" msgstr "Загрузить файл" -#: includes/component.php:1101 +#: includes/component.php:1128 msgid "OK" msgstr "OK" -#: includes/integration-groups.php:822 +#: includes/admin.php:32 includes/admin.php:44 msgid "BuddyPress Docs Settings" msgstr "Настройки BuddyPress Docs" -#: includes/attachments.php:527 +#: includes/attachments.php:535 msgid "Doesn’t matter" msgstr "Не важно" -#: includes/component.php:505 +#: includes/component.php:506 msgid "Could not delete doc." msgstr "Удаление документа невозможно." @@ -34,158 +127,171 @@ msgstr "Удаление документа невозможно." msgid "Tag" msgstr "Метка" -#: includes/attachments.php:61 includes/attachments.php:68 +#: includes/attachments.php:65 includes/attachments.php:72 msgid "File not found." msgstr "Файл не найден." -#: includes/attachments.php:289 +#: includes/attachments.php:291 msgid "Attachment deleted" msgstr "Вложение удалено" -#: includes/attachments.php:291 +#: includes/attachments.php:293 msgid "Could not delete attachment" msgstr "Невозможно удалить вложение" -#: includes/attachments.php:507 includes/templates/docs/single/edit.php:62 -#: includes/templates/docs/single/index.php:28 includes/templatetags.php:1867 +#: includes/admin.php:123 includes/attachments.php:515 +#: includes/templates/docs/single/edit.php:68 +#: includes/templates/docs/single/index.php:35 includes/templatetags.php:2018 msgid "Attachments" msgstr "Вложения" -#: includes/attachments.php:523 +#: includes/attachments.php:531 msgid "Has attachment?" msgstr "Есть вложения?" -#: includes/integration-groups.php:825 +#: includes/admin.php:112 msgid "Group Tab Name" msgstr "Название вкладки группы" -#: includes/templatetags.php:210 +#: includes/templatetags.php:217 msgid "Filter by: %s" msgstr "Фильтровать по: %s" -#: includes/templatetags.php:1348 +#: includes/templatetags.php:1480 msgid "Group: " msgstr "Группа:" -#: includes/templatetags.php:1350 +#: includes/templatetags.php:1482 msgid " %s" msgstr " %s" -#: includes/templatetags.php:1742 +#: includes/templatetags.php:1890 msgid "Add Files" msgstr "Добавить файлы" -#: includes/theme-bridge.php:223 +#: includes/theme-bridge.php:239 msgid "Create a Doc" msgstr "Создать документ" -#: includes/templatetags.php:788 +#: includes/templatetags.php:822 msgid "Public Group" msgstr "Открытая группа" -#: includes/templatetags.php:796 +#: includes/templatetags.php:830 msgid "Hidden Group" msgstr "Скрытая группа" -#: includes/templatetags.php:792 +#: includes/templatetags.php:826 msgid "Private Group" msgstr "Частная группа" -#: includes/attachments.php:529 +#: includes/admin.php:57 +msgid "General" +msgstr "Основные" + +#: includes/attachments.php:537 msgid "Filter" msgstr "Фильтр" -#: includes/attachments.php:525 +#: includes/admin.php:104 +msgid "Groups" +msgstr "Группы" + +#: includes/attachments.php:533 msgid "Yes" msgstr "Да" -#: includes/attachments.php:526 +#: includes/attachments.php:534 msgid "No" msgstr "Нет" -#: includes/templates/docs/single/edit.php:150 includes/templatetags.php:1795 +#: includes/templatetags.php:1173 includes/templatetags.php:1946 msgid "Delete" msgstr "Удалить" -#: bp-docs.php:256 +#: includes/admin.php:33 +msgid "Settings" +msgstr "Настройки" + +#: bp-docs.php:260 msgctxt "post type general name" msgid "BuddyPress Docs" msgstr "Документы" -#: bp-docs.php:257 +#: bp-docs.php:261 msgctxt "post type singular name" msgid "Doc" msgstr "Документ" -#: bp-docs.php:258 +#: bp-docs.php:262 msgctxt "add new" msgid "Add New" msgstr "Добавить новый" -#: bp-docs.php:259 +#: bp-docs.php:263 msgid "Add New Doc" msgstr "Добавить новый документ" -#: bp-docs.php:260 +#: bp-docs.php:264 msgid "Edit Doc" msgstr "Изменить документ" -#: bp-docs.php:261 includes/integration-groups.php:746 -#: includes/integration-groups.php:1268 -#: includes/templates/docs/docs-header.php:36 +#: bp-docs.php:265 includes/integration-groups.php:800 +#: includes/integration-groups.php:1266 +#: includes/templates/docs/docs-header.php:40 msgid "New Doc" msgstr "Новый документ" -#: bp-docs.php:262 +#: bp-docs.php:266 msgid "View Doc" msgstr "Смотреть документ" -#: bp-docs.php:263 +#: bp-docs.php:267 msgid "Search Docs" msgstr "Искать документы" -#: bp-docs.php:264 +#: bp-docs.php:268 msgid "No Docs found" msgstr "Документы не найдены" -#: bp-docs.php:265 +#: bp-docs.php:269 msgid "No Docs found in Trash" msgstr "В корзине нет документов" -#: bp-docs.php:272 includes/component.php:39 -#: includes/integration-groups.php:1063 +#: bp-docs.php:276 includes/component.php:40 +#: includes/integration-groups.php:1061 msgid "BuddyPress Docs" msgstr "BuddyPress Docs" -#: bp-docs.php:291 +#: bp-docs.php:295 msgid "Associated Items" -msgstr "Связанные пункты" +msgstr "Связи" -#: bp-docs.php:292 +#: bp-docs.php:296 msgid "Associated Item" msgstr "Связанный пункт" -#: bp-docs.php:486 +#: bp-docs.php:552 msgid "You are not allowed to read that Doc." msgstr "Вы не можете читать этот документ." -#: bp-docs.php:490 +#: bp-docs.php:556 msgid "You are not allowed to create Docs." msgstr "Вы не можете создавать документы." -#: bp-docs.php:494 +#: bp-docs.php:560 msgid "You are not allowed to edit that Doc." msgstr "Вы не можете редактировать этот документ." -#: bp-docs.php:498 +#: bp-docs.php:564 msgid "You are not allowed to view that Doc's history." msgstr "Вы не можете просматривать историю этого документа." -#: includes/addon-hierarchy.php:110 +#: includes/addon-hierarchy.php:113 msgid "Parent: " msgstr "Родительский: " -#: includes/addon-hierarchy.php:161 +#: includes/addon-hierarchy.php:164 msgid "Children: " msgstr "Дочерний: " @@ -230,7 +336,7 @@ msgstr "Новые" msgid "Date Created" msgstr "Дата создания" -#: includes/addon-history.php:429 includes/templates/docs/docs-loop.php:23 +#: includes/addon-history.php:429 includes/templates/docs/docs-loop.php:25 msgid "Author" msgstr "Автор" @@ -238,8 +344,8 @@ msgstr "Автор" msgid "Actions" msgstr "Действия" -#: includes/addon-history.php:458 includes/integration-groups.php:755 -#: includes/templatetags.php:907 +#: includes/addon-history.php:458 includes/integration-groups.php:809 +#: includes/templatetags.php:941 msgid "History" msgstr "История" @@ -255,7 +361,7 @@ msgstr "Метка документа" msgid "Tags: %s" msgstr "Метки: %s" -#: includes/addon-taxonomy.php:357 includes/templates/docs/single/edit.php:97 +#: includes/addon-taxonomy.php:357 includes/templates/docs/single/edit.php:104 msgid "Tags" msgstr "Метки" @@ -279,274 +385,257 @@ msgstr "Популярное" msgid "+ %s" msgstr "+ %s" -#: includes/admin.php:63 +#: includes/admin.php:229 msgid "Recent Comments" msgstr "Свежие комментарии" -#: includes/admin.php:138 +#: includes/admin.php:304 msgid "No comments yet." msgstr "Комментарии отсутствуют." -#: includes/component.php:157 +#: includes/component.php:158 msgid "Search Docs..." msgstr "Поиск документов...." -#: includes/component.php:308 +#: includes/component.php:309 msgid "My Docs " msgstr "Мои документы" -#: includes/component.php:308 +#: includes/component.php:309 msgid "%s’s Docs" msgstr "%s’s Документы" -#: includes/component.php:203 includes/component.php:311 -#: includes/templatetags.php:1272 +#: includes/component.php:204 includes/component.php:312 +#: includes/templatetags.php:1394 msgid "Started By Me" msgstr "Начатое мной" -#: includes/component.php:311 +#: includes/component.php:312 msgid "Started By %s" msgstr "Начатое %s" -#: includes/component.php:210 includes/component.php:320 -#: includes/templatetags.php:1273 +#: includes/component.php:211 includes/component.php:321 +#: includes/templatetags.php:1395 msgid "Edited By Me" msgstr "Редактированное мной" -#: includes/component.php:320 +#: includes/component.php:321 msgid "Edited By %s" msgstr "Редактированное %s" -#: includes/component.php:409 +#: includes/component.php:410 msgid "This doc is currently being edited by %s. To prevent overwrites, you cannot edit until that user has finished. Please try again in a few minutes." msgstr "Этот документ в настоящее время редактируется %s. Чтобы предотвратить перезапись, вы не можете редактировать пока другой пользователь не закончит. Пожалуйста, попробуйте еще раз через несколько минут." -#: includes/component.php:422 +#: includes/component.php:423 msgid "You do not have permission to edit the doc." msgstr "У вас нет прав на редактирование этого документа." -#: includes/component.php:438 +#: includes/component.php:439 msgid "You do not have permission to create a Doc in this group." msgstr "У вас нет прав создавать документы в этой группе." -#: includes/component.php:454 +#: includes/component.php:455 msgid "You do not have permission to view this Doc's history." msgstr "У вас нет прав просматривать историю этого документа." -#: includes/component.php:478 +#: includes/component.php:479 msgid "Lock successfully removed" msgstr "Блокировка убрана" -#: includes/component.php:503 +#: includes/component.php:504 msgid "Doc successfully deleted!" msgstr "Документ удален!" -#: includes/component.php:508 +#: includes/component.php:509 msgid "You do not have permission to delete that doc." msgstr "У вас нет прав на удаление этого документа." -#: includes/component.php:640 +#: includes/component.php:659 msgid "%1$s commented on the doc %2$s" msgstr "%1$s прокомментирован документ %2$s" -#: includes/component.php:736 +#: includes/component.php:755 msgid "Show New Docs" msgstr "Показать новые документы" -#: includes/component.php:737 +#: includes/component.php:756 msgid "Show Doc Edits" msgstr "Показать измененные документы" -#: includes/component.php:738 +#: includes/component.php:757 msgid "Show Doc Comments" msgstr "Комментарии к документам" -#: includes/component.php:805 +#: includes/component.php:824 msgid "%1$s created the doc %2$s" msgstr "%1$s создан документ %2$s" -#: includes/component.php:807 +#: includes/component.php:826 msgid "%1$s edited the doc %2$s" msgstr "%1$s изменен документ %2$s" -#: includes/component.php:1102 +#: includes/component.php:1129 msgid "Still working?" msgstr "Все ещё работаете?" -#: includes/functions.php:160 -msgid "Docs associated with the %1$s %2$s" -msgstr "Документы, ассоциированные с %1$s %2$s" - -#: includes/functions.php:480 includes/templatetags.php:1363 +#: includes/functions.php:526 includes/templatetags.php:1495 msgid "Logged-in Users" msgstr "Авторизированые пользователи" -#: includes/functions.php:485 includes/templatetags.php:1365 +#: includes/functions.php:531 includes/templatetags.php:1497 msgid "The Doc author only" msgstr "Только автор документа" -#: includes/functions.php:493 includes/templatetags.php:1362 +#: includes/functions.php:539 includes/templatetags.php:1494 msgid "Anyone" msgstr "Все" -#: includes/integration-groups.php:424 +#: includes/integration-groups.php:433 msgid "Members of %s" msgstr "Участники %s" -#: includes/integration-groups.php:429 +#: includes/integration-groups.php:445 msgid "Admins and mods of %s" msgstr "Администраторы и модераторы %s" -#: includes/integration-groups.php:506 +#: includes/integration-groups.php:526 msgid "%1$s created the doc %2$s in the group %3$s" msgstr "%1$s создан документ %2$s в группе %3$s" -#: includes/integration-groups.php:508 +#: includes/integration-groups.php:528 msgid "%1$s edited the doc %2$s in the group %3$s" msgstr "%1$s изменен документ %2$s в группе %3$s" -#: includes/integration-groups.php:535 +#: includes/integration-groups.php:578 msgid "%1$s commented on the doc %2$s in the group %3$s" msgstr "%1$s прокомментирован документ %2$s в группе %3$s" -#: includes/integration-groups.php:609 +#: includes/integration-groups.php:652 msgid "Group" msgstr "Группа" -#: includes/integration-groups.php:718 +#: includes/integration-groups.php:772 msgid "%s %d" msgstr "%s %d" -#: includes/component.php:190 includes/component.php:296 -#: includes/integration-groups.php:740 includes/integration-groups.php:810 -#: includes/integration-groups.php:880 +#: includes/integration-groups.php:794 includes/integration-groups.php:878 +#: includes/integration-groups.php:1423 includes/integration-users.php:192 msgid "Docs" msgstr "Документы" -#: includes/integration-groups.php:753 -#: includes/templates/docs/docs-header.php:26 includes/templatetags.php:903 -#: includes/templatetags.php:1466 +#: includes/integration-groups.php:807 +#: includes/templates/docs/docs-header.php:30 includes/templatetags.php:937 +#: includes/templatetags.php:1598 msgid "Edit" msgstr "Редактировать" -#: includes/integration-groups.php:795 -msgid "BuddyPress Docs group tab name:" -msgstr "Название вкладки группы BuddyPress Docs:" - -#: includes/integration-groups.php:981 +#: includes/integration-groups.php:979 msgid "Save Changes" msgstr "Сохранить изменения" -#: includes/integration-groups.php:1006 +#: includes/integration-groups.php:1004 msgid "There was an error saving, please try again" msgstr "Возникла ошибка сохранения, пожалуйста, попробуйте ещё раз" -#: includes/integration-groups.php:1008 +#: includes/integration-groups.php:1006 msgid "Settings saved successfully" msgstr "Настройки успешно сохранены" -#: includes/integration-groups.php:1065 +#: includes/integration-groups.php:1063 msgid "BuddyPress Docs is a powerful tool for collaboration with members of your group. A cross between document editor and wiki, BuddyPress Docs allows you to co-author and co-edit documents with your fellow group members, which you can then sort and tag in a way that helps your group to get work done." msgstr "BuddyPress Docs представляет собой мощный инструмент для совместной работы между участниками вашей группы.Нечто среднее между редактором документов и вики, BuddyPress Docs реализует соавторство и совместное редактирование документов с другими участниками группы, которые затем можно сортировать и отмечать тем способом, который помогает вашей группе осуществлять работу." -#: includes/integration-groups.php:1068 +#: includes/integration-groups.php:1066 msgid "Enable BuddyPress Docs for this group" msgstr "Включить BuddyPress Docs в этой группе" -#: includes/integration-groups.php:1072 +#: includes/integration-groups.php:1070 msgid "Options" msgstr "Настройки" -#: includes/integration-groups.php:1077 -msgid "Minimum role to create new Docs:" -msgstr "Минимальный статус пользователя для создания новых документов:" - -#: includes/integration-groups.php:1082 +#: includes/integration-groups.php:1080 msgid "Group admin" msgstr "Администратор группы" -#: includes/integration-groups.php:1083 +#: includes/integration-groups.php:1081 msgid "Group moderator" msgstr "Модератор группы" -#: includes/integration-groups.php:1084 +#: includes/integration-groups.php:1082 msgid "Group member" msgstr "Участник группы" -#: includes/integration-groups.php:1265 +#: includes/integration-groups.php:1263 msgid "View Docs" msgstr "Смотреть документы" -#: includes/query-builder.php:402 +#: includes/query-builder.php:421 msgid "Unknown error. Please try again." msgstr "Неизвестная ошибка, попробуйте еще раз." -#: includes/query-builder.php:422 +#: includes/query-builder.php:441 msgid "You are not allowed to associate a Doc with that group." msgstr "У вас нет прав для ассоциирования документов с этой группой." -#: includes/query-builder.php:432 -msgid "Both the title and the content fields are required." -msgstr "Поля заголовок и содержание должны быть заполнены." - -#: includes/query-builder.php:462 +#: includes/query-builder.php:480 msgid "There was an error when creating the doc." msgstr "Ошибка при создании документа." -#: includes/query-builder.php:471 +#: includes/query-builder.php:489 msgid "Doc successfully created!" msgstr "Документ создан!" -#: includes/query-builder.php:491 +#: includes/query-builder.php:509 msgid "There was an error when saving the doc." msgstr "Ошибка при сохранении документа." -#: includes/query-builder.php:500 +#: includes/query-builder.php:518 msgid "You idled a bit too long while in Edit mode. In order to allow others to edit the doc you were working on, your changes have been autosaved. Click the Edit button to return to Edit mode." msgstr "Слишком большое время простоя в режиме редактирования. Ваши данные были сохранены автоматически. Нажмите кнопку редактирования чтобы продолжить." -#: includes/query-builder.php:503 +#: includes/query-builder.php:521 msgid "Doc successfully edited!" msgstr "Документ отредактирован!" -#: includes/query-builder.php:534 +#: includes/query-builder.php:552 msgid "Your Doc was successfully saved, but some of your access settings have been changed to match the Doc's permissions." msgstr "Документ сохранен, но некоторые настройки доступа были изменены чтобы соответствовать разрешениям." -#: includes/templates/docs/docs-header.php:21 includes/templatetags.php:900 +#: includes/templates/docs/docs-header.php:25 includes/templatetags.php:934 msgid "Read" msgstr "Читать" -#: includes/component.php:1037 includes/component.php:1049 +#: includes/component.php:1064 includes/component.php:1076 msgid "Search" msgstr "Поиск" -#: includes/templates/docs/docs-loop.php:19 +#: includes/templates/docs/docs-loop.php:21 #: includes/templates/docs/single/edit.php:34 msgid "Title" msgstr "Заголовок" -#: includes/templates/docs/docs-loop.php:27 +#: includes/templates/docs/docs-loop.php:29 msgid "Created" msgstr "Создано" -#: includes/templates/docs/docs-loop.php:31 +#: includes/templates/docs/docs-loop.php:33 msgid "Last Edited" msgstr "Последнее изменение" -#: includes/templates/docs/docs-loop.php:80 +#: includes/templates/docs/docs-loop.php:86 msgid "Viewing %1$s-%2$s of %3$s docs" msgstr "Показано %1$s-%2$s из %3$s документов" -#: includes/templates/docs/docs-loop.php:91 +#: includes/templates/docs/docs-loop.php:97 msgid "There are no docs for this view. Why not create one?" msgstr "Документов нет. Почему бы не создать один?" -#: includes/templates/docs/docs-loop.php:93 +#: includes/templates/docs/docs-loop.php:99 msgid "There are no docs for this view." msgstr "Отсутствую документы для отображения." -#: includes/templates/docs/index.php:23 includes/theme-bridge.php:165 +#: includes/templates/docs/index.php:25 includes/theme-bridge.php:181 msgid "Docs Directory" msgstr "Каталог документов" @@ -574,55 +663,55 @@ msgstr "Вы не проявляли активность orchestra, snare drum, piccolo, Brahms)" msgstr "Разделяйте метки запятыми (например: оркестр, барабан, пикколо, Брамс)" -#: includes/templates/docs/single/edit.php:118 +#: includes/templates/docs/single/edit.php:125 msgid "Parent" msgstr "Родитель" -#: includes/templates/docs/single/edit.php:124 +#: includes/templates/docs/single/edit.php:131 msgid "Select a parent for this Doc." msgstr "Выберите родительский элемент для этого документа." -#: includes/templates/docs/single/edit.php:126 +#: includes/templates/docs/single/edit.php:133 msgid "(Optional) Assigning a parent Doc means that a link to the parent will appear at the bottom of this Doc, and a link to this Doc will appear at the bottom of the parent." msgstr "(Необязательно) Выбор родительского документа означает что ссылка на него появится под этим документом и ссылка на этот документ появится под родительским." -#: includes/templates/docs/single/edit.php:147 +#: includes/templates/docs/single/edit.php:154 msgid "Save" msgstr "Сохранить" -#: includes/templates/docs/single/edit.php:147 +#: includes/templates/docs/single/edit.php:154 msgid "Cancel" msgstr "Отмена" -#: includes/templates/docs/single/edit.php:180 +#: includes/templates/docs/single/edit.php:189 msgid "Are you still there?" msgstr "Вы еще здесь?!" -#: includes/templates/docs/single/edit.php:182 +#: includes/templates/docs/single/edit.php:191 msgid "In order to prevent overwriting content, only one person can edit a given doc at a time. For that reason, you must periodically ensure the system that you're still actively editing. If you are idle for more than 30 minutes, your changes will be auto-saved, and you'll be sent out of Edit mode so that others can access the doc." msgstr "Чтобы предотвратить перезапись содержания, только один пользователь может редактировать документ одновременно. Если вы ничего не делаете в режиме редактирования больше 30-ти минут, ваши изменения сохраняются автоматически и режим редактирования закрывается чтобы другие могли получить доступ к изменениям этого документа." -#: includes/templates/docs/single/edit.php:184 +#: includes/templates/docs/single/edit.php:193 msgid "I'm still editing!" msgstr "Я все ещё редактирую!" @@ -646,27 +735,27 @@ msgstr "Новое: %s" msgid "You are currently viewing a revision titled \"%1$s\", saved on %2$s by %3$s" msgstr "Вы просматриваете редакцию с названием \"%1$s\", сохраненную %2$s в %3$s" -#: includes/templates/docs/single/history.php:52 +#: includes/templates/docs/single/history.php:54 msgid "These revisions are identical." msgstr "Редакции идентичны." -#: includes/templates/docs/single/index.php:7 +#: includes/templates/docs/single/index.php:10 msgid "Locked" msgstr "Заблокировано" -#: includes/templates/docs/single/index.php:7 +#: includes/templates/docs/single/index.php:10 msgid "(click for more info)" msgstr "(нажмите для получения дополнительной информации)" -#: includes/templates/docs/single/index.php:9 +#: includes/templates/docs/single/index.php:12 msgid "This doc is currently being edited by %1$s. In order to prevent edit conflicts, only one user can edit a doc at a time." msgstr "Этот документ сейчас редактирует %1$s. В целях предотвращения конфликтов редактирования, только один пользователь может редактировать документ одновременно." -#: includes/templates/docs/single/index.php:12 +#: includes/templates/docs/single/index.php:15 msgid "Please try again in a few minutes. Or, as an admin, you can force cancel the edit lock." msgstr "Попробуйте еще раз через несколько минут. Или, как администратор, вы можете принудительно отменить блокировку редактирования." -#: includes/templates/docs/single/index.php:14 +#: includes/templates/docs/single/index.php:17 msgid "Please try again in a few minutes." msgstr "Пожалуйста, попробуйте снова через несколько минут." @@ -674,143 +763,143 @@ msgstr "Пожалуйста, попробуйте снова через нес msgid "(no parent)" msgstr "(нет родителя)" -#: includes/templatetags.php:191 +#: includes/templatetags.php:198 msgid "You are viewing all docs." msgstr "Вы видите все документы." -#: includes/templatetags.php:200 +#: includes/templatetags.php:207 msgid "View All Docs" msgstr "Смотреть все документы" -#: includes/templatetags.php:287 +#: includes/templatetags.php:294 msgid "You are searching for docs containing the term %s" msgstr "Вы ищете документы, содержащие %s" -#: includes/templatetags.php:731 +#: includes/templatetags.php:765 msgid "Which group should this Doc be associated with?" msgstr "С какой группой будет ассоциирован документ?" -#: includes/templatetags.php:732 +#: includes/templatetags.php:766 msgid "(Optional) Note that the Access settings available for this Doc may be limited by the privacy settings of the group you choose." msgstr "(Необязательно) Настройки доступа этому документу могут быть ограничены настройками доступа выбранной вами группы." -#: includes/templatetags.php:737 +#: includes/templatetags.php:771 msgid "None" msgstr "Ничего" -#: includes/templatetags.php:784 +#: includes/templatetags.php:818 msgid "%s member" msgstr "%s участник" -#: includes/templatetags.php:784 +#: includes/templatetags.php:818 msgid "%s members" msgstr "%s участники" -#: includes/templatetags.php:835 +#: includes/templatetags.php:869 msgid "Who can read this doc?" msgstr "Кто может читать этот документ?" -#: includes/templatetags.php:839 +#: includes/templatetags.php:873 msgid "Who can edit this doc?" msgstr "Кто может редактировать этот документ?" -#: includes/templatetags.php:843 +#: includes/templatetags.php:877 msgid "Who can read comments on this doc?" msgstr "Кто может читать комментарии к этому документу?" -#: includes/templatetags.php:847 +#: includes/templatetags.php:881 msgid "Who can post comments on this doc?" msgstr "Кто может оставлять комментарии к этому документу?" -#: includes/templatetags.php:851 +#: includes/templatetags.php:885 msgid "Who can view the history of this doc?" msgstr "Кто может видеть историю этого документа?" -#: includes/templatetags.php:1102 +#: includes/templatetags.php:1200 msgid "«" msgstr "«" -#: includes/templatetags.php:1103 +#: includes/templatetags.php:1201 msgid "»" msgstr "»" -#: includes/templatetags.php:1266 +#: includes/templatetags.php:1388 msgid "All Docs" msgstr "Все документы" -#: includes/templatetags.php:1270 +#: includes/templatetags.php:1392 msgid "%s's Docs" msgstr "%s документы" -#: includes/templatetags.php:1276 +#: includes/templatetags.php:1398 msgid "My Groups" msgstr "Мои группы" -#: includes/component.php:217 includes/templatetags.php:1297 +#: includes/component.php:218 includes/templatetags.php:1419 msgid "Create New Doc" msgstr "Создать новый документ" -#: includes/templatetags.php:1364 +#: includes/templatetags.php:1496 msgid "My Friends" msgstr "Мои друзья" -#: includes/templatetags.php:1370 +#: includes/templatetags.php:1502 msgid "Members of: %s" msgstr "Участники: %s" -#: includes/templatetags.php:1371 +#: includes/templatetags.php:1503 msgid "Admins and mods of the group %s" msgstr "Администраторы и модераторы группы %s" -#: includes/templatetags.php:1366 +#: includes/templatetags.php:1498 msgid "Just Me" msgstr "Только я" -#: includes/templatetags.php:1375 +#: includes/templatetags.php:1507 msgid "The Doc author only (that's you!)" msgstr "Только автор документа (это вы!)" -#: includes/templatetags.php:1382 +#: includes/templatetags.php:1514 msgid "This Doc can be read by: %s" msgstr "Этот докумиент могут читать: %s" -#: includes/templatetags.php:1386 +#: includes/templatetags.php:1518 msgid "This Doc can be edited by: %s" msgstr "Этот документ могут редактировать: %s" -#: includes/templatetags.php:1390 +#: includes/templatetags.php:1522 msgid "Comments are visible to: %s" msgstr "Комментарии могут видеть: %s" -#: includes/templatetags.php:1394 +#: includes/templatetags.php:1526 msgid "Comments can be posted by: %s" msgstr "Комментарии могут оставлять: %s" -#: includes/templatetags.php:1398 +#: includes/templatetags.php:1530 msgid "History can be viewed by: %s" msgstr "Историю могут видеть: %s" -#: includes/templatetags.php:1440 +#: includes/templatetags.php:1572 msgid "Private" msgstr "Скрыто" -#: includes/templatetags.php:1443 +#: includes/templatetags.php:1575 msgid "Public" msgstr "Видно всем" -#: includes/templatetags.php:1446 +#: includes/templatetags.php:1578 msgid "Limited" msgstr "Ограничено" -#: includes/templatetags.php:1451 +#: includes/templatetags.php:1583 msgid "Access: %s" msgstr "Доступ: %s" -#: includes/templatetags.php:1452 +#: includes/templatetags.php:1584 msgid "Show Details" msgstr "Показать детали" -#: includes/templatetags.php:1468 +#: includes/templatetags.php:1600 msgid "Hide Details" msgstr "Скрыть детали" From 9b9ee37842330614aff8a28502c24321499bcb24 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Mon, 10 Feb 2014 09:00:37 -0500 Subject: [PATCH 119/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index bd2ec7df..a7359643 100755 --- a/readme.txt +++ b/readme.txt @@ -36,6 +36,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.5.7 = * Improve appearance of row actions on mobile devices * Improve appearance of tags filter on IE < 9 +* Update ru_RU = 1.5.6 = * Allow current filter to be toggled by reclicking filter name From 1ac05de4af531da774d244231338ca5fa8b36cec Mon Sep 17 00:00:00 2001 From: David Cavins Date: Thu, 20 Feb 2014 16:11:20 -0600 Subject: [PATCH 120/126] Add usermeta 'bp_docs_terms' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This piece of meta hasn’t been being added, due to an always-false conditional. Doc editing doesn’t take place in the ‘bp_is_user()’ context anymore, so the sanity check was failing. --- includes/integration-users.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/integration-users.php b/includes/integration-users.php index 5fb4d490..b3a03790 100644 --- a/includes/integration-users.php +++ b/includes/integration-users.php @@ -173,8 +173,10 @@ function get_user_terms( $terms = array() ) { * @param array $terms The terms to be saved to usermeta */ function save_user_terms( $terms ) { - if ( bp_is_user() ) { - update_user_meta( bp_displayed_user_id(), 'bp_docs_terms', $terms ); + + // bp_is_user isn't true at doc edit. (So neither is bp_displayed_user) + if ( bp_docs_is_docs_component() ) { + update_user_meta( bp_loggedin_user_id(), 'bp_docs_terms', $terms ); } } From a71e5942c4743e76ce54d994c2515a01011c1ed9 Mon Sep 17 00:00:00 2001 From: David Cavins Date: Thu, 20 Feb 2014 16:24:27 -0600 Subject: [PATCH 121/126] Add "no tags" message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Give users appropriate message when the “tag” filter control doesn’t work as expected. --- includes/addon-taxonomy.php | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/includes/addon-taxonomy.php b/includes/addon-taxonomy.php index f43fe06f..2a6929f7 100644 --- a/includes/addon-taxonomy.php +++ b/includes/addon-taxonomy.php @@ -430,37 +430,37 @@ public function filter_type( $types ) { function filter_markup() { $existing_terms = $this->get_item_terms(); - // No need to show the filter if there are no terms to show - if ( empty( $existing_terms ) ) - return; - $tag_filter = ! empty( $_GET['bpd_tag'] ); ?>
      - $posts ) : ?> - -
    • - + + $posts ) : ?> + +
    • + - - + current_filters ) || ( !empty( $this->current_filters['tags'] ) && in_array( $term, $this->current_filters['tags'] ) ) ? true : false; + $checked = empty( $this->current_filters ) || ( !empty( $this->current_filters['tags'] ) && in_array( $term, $this->current_filters['tags'] ) ) ? true : false; - ?> - - */ ?> -
    • + ?> + + */ ?> + - + + +
    • +
    From f3b778c9a2a5835acc31e26b5d38fd991535966a Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sat, 22 Feb 2014 15:01:21 -0500 Subject: [PATCH 122/126] Fix incorrect variable name. See #379 Props @dcavins --- includes/component.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/component.php b/includes/component.php index 73de252c..4b1586e4 100644 --- a/includes/component.php +++ b/includes/component.php @@ -1057,7 +1057,7 @@ public function get_item_terms( $terms ) { $terms_array[ $t->slug ] = $t->count; } - unset( $items, $terms ); + unset( $item_ids, $terms ); return $terms_array; } From 163b78cf65d006fbb5883139d76282fd5b70d242 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 2 Mar 2014 14:26:25 -0500 Subject: [PATCH 123/126] Don't let BP toggle off is_page during theme compatibility We need it to remain on, because we use comments_template() --- includes/theme-bridge.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/theme-bridge.php b/includes/theme-bridge.php index dff7c9ff..25718b94 100644 --- a/includes/theme-bridge.php +++ b/includes/theme-bridge.php @@ -131,6 +131,9 @@ public function is_docs() { } else { $this->single_content_template = 'docs/single/index'; add_filter( 'bp_docs_allow_comment_section', '__return_false' ); + + // Necessary as of BP 1.9.2 + remove_action( 'bp_replace_the_content', 'bp_theme_compat_toggle_is_page', 9999 ); } add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) ); From 30865de52d818996d4685548def91a19f061bed2 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 2 Mar 2014 14:27:34 -0500 Subject: [PATCH 124/126] Readme --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index a7359643..8c0dca3b 100755 --- a/readme.txt +++ b/readme.txt @@ -36,6 +36,7 @@ This plugin is in active development. For feature requests and bug reports, visi = 1.5.7 = * Improve appearance of row actions on mobile devices * Improve appearance of tags filter on IE < 9 +* Fix bug introduced in BP 1.9.2 related to the display of comments * Update ru_RU = 1.5.6 = From ae9b54ed430635fe51b13f83cbb572a2c69e70d6 Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 2 Mar 2014 14:29:15 -0500 Subject: [PATCH 125/126] Bump version numbers to 1.5.7 --- loader.php | 4 ++-- readme.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/loader.php b/loader.php index c119d786..420a8d0b 100644 --- a/loader.php +++ b/loader.php @@ -3,7 +3,7 @@ Plugin Name: BuddyPress Docs Plugin URI: http://github.com/boonebgorges/buddypress-docs Description: Adds collaborative Docs to BuddyPress -Version: 1.5.6 +Version: 1.5.7 Author: Boone B Gorges Author URI: http://boone.gorg.es Licence: GPLv3 @@ -13,7 +13,7 @@ It's on like Donkey Kong */ -define( 'BP_DOCS_VERSION', '1.5.6' ); +define( 'BP_DOCS_VERSION', '1.5.7' ); // BuddyPress Docs introduces a lot of overhead. Unless otherwise specified, // don't load the plugin on subsites of an MS install diff --git a/readme.txt b/readme.txt index 8c0dca3b..d92f392c 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: boonebgorges, cuny-academic-commons Donate link: http://teleogistic.net/donate Tags: buddypress, docs, wiki, documents, collaboration Requires at least: WordPress 3.3, BuddyPress 1.5 -Tested up to: WordPress 3.8, BuddyPress 1.9 -Stable tag: 1.5.6 +Tested up to: WordPress 3.8, BuddyPress 1.9.2 +Stable tag: 1.5.7 Adds collaborative Docs to BuddyPress. From 6382f90caed59c0ff9ea0f03dea7f0c146cae24e Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Sun, 2 Mar 2014 14:30:20 -0500 Subject: [PATCH 126/126] Update .pot --- languages/bp-docs.pot | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/languages/bp-docs.pot b/languages/bp-docs.pot index ccbe2c6d..33ec5952 100644 --- a/languages/bp-docs.pot +++ b/languages/bp-docs.pot @@ -1,14 +1,14 @@ -# Copyright (C) 2013 +# Copyright (C) 2014 # This file is distributed under the same license as the package. msgid "" msgstr "" "Project-Id-Version: \n" -"Report-Msgid-Bugs-To: http://wordpress.org/tag/buddypress-docs\n" -"POT-Creation-Date: 2013-12-16 02:11:43+00:00\n" +"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/buddypress-docs\n" +"POT-Creation-Date: 2014-03-02 19:29:57+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -176,10 +176,14 @@ msgstr "" msgid "Tag" msgstr "" -#: includes/addon-taxonomy.php:446 +#: includes/addon-taxonomy.php:443 msgid "(%d)" msgstr "" +#: includes/addon-taxonomy.php:462 +msgid "No tags to show." +msgstr "" + #: includes/addon-taxonomy.php:528 msgid "Docs tagged %s" msgstr "" @@ -430,19 +434,19 @@ msgstr "" msgid "%1$s edited the doc %2$s" msgstr "" -#: includes/component.php:1064 includes/component.php:1076 +#: includes/component.php:1068 includes/component.php:1080 msgid "Search" msgstr "" -#: includes/component.php:1127 +#: includes/component.php:1131 msgid "Upload File" msgstr "" -#: includes/component.php:1128 +#: includes/component.php:1132 msgid "OK" msgstr "" -#: includes/component.php:1129 +#: includes/component.php:1133 msgid "Still working?" msgstr "" @@ -494,7 +498,7 @@ msgid "%s %d" msgstr "" #: includes/integration-groups.php:794 includes/integration-groups.php:878 -#: includes/integration-groups.php:1423 includes/integration-users.php:192 +#: includes/integration-groups.php:1423 includes/integration-users.php:194 msgid "Docs" msgstr "" @@ -626,7 +630,7 @@ msgstr "" msgid "There are no docs for this view." msgstr "" -#: includes/templates/docs/index.php:25 includes/theme-bridge.php:181 +#: includes/templates/docs/index.php:25 includes/theme-bridge.php:184 msgid "Docs Directory" msgstr "" @@ -954,7 +958,7 @@ msgstr "" msgid "Trash" msgstr "" -#: includes/theme-bridge.php:239 +#: includes/theme-bridge.php:242 msgid "Create a Doc" msgstr ""