Ticket #5821: 5821.patch
| File 5821.patch, 18.6 KB (added by , 12 years ago) |
|---|
-
Gruntfile.js
1 1 /* jshint node:true */ 2 2 /* global module */ 3 3 module.exports = function( grunt ) { 4 var path = require( 'path' ), 5 SOURCE_DIR = 'src/', 6 BUILD_DIR = 'build/', 4 var SOURCE_DIR = 'src/', 5 BUILD_DIR = 'build/', 7 6 8 BP_CSS = [9 '**/*.css',10 '!**/*-rtl.css' // Exclude RTL files11 ],7 // CSS 8 BP_CSS = [ 9 '**/*.css' 10 ], 12 11 13 BP_JS = [ 14 '**/*.js', 12 // CSS exclusions, for excluding files from certain tasks, e.g. cssjanus 13 BP_EXCLUDED_CSS = [ 14 '!**/*-rtl.css' 15 ], 15 16 16 // Exclude third-party libraries. 17 '!bp-core/js/jquery.atwho.js', 18 '!bp-core/js/jquery.caret.js', 17 // JavaScript - Core 18 BP_JS = [ 19 '**/*.js' 20 ], 19 21 20 // Exclude legacy templates. 21 '!bp-templates/**/*.js', 22 // JavaScript exclusions, for excluding from certain tasks e.g jshint 23 BP_EXCLUDED_JS = [ 24 '!bp-core/deprecated/js/**/*.js', // Depracted 25 '!bp-core/js/jquery.atwho.js', // External 3rd party library 26 '!bp-core/js/jquery.caret.js', // External 3rd party library 27 '!bp-core/js/jquery-cookie.js' // External 3rd party library 28 ]; 22 29 23 // Exclude anything in any deprecated folders.24 '!**/deprecated/**/*.js'25 ];26 27 30 require( 'matchdep' ).filterDev( ['grunt-*', '!grunt-legacy-util'] ).forEach( grunt.loadNpmTasks ); 28 31 grunt.util = require( 'grunt-legacy-util' ); 29 32 30 31 33 grunt.initConfig( { 32 34 pkg: grunt.file.readJSON('package.json'), 33 35 jshint: { … … 38 40 core: { 39 41 expand: true, 40 42 cwd: SOURCE_DIR, 41 src: BP_JS ,43 src: BP_JS.concat( BP_EXCLUDED_JS ), 42 44 43 45 /** 44 * Limit JSHint's run to a single specified file: grunt jshint:core --file=filename.js 45 * Optionally, include the file path: grunt jshint:core --file=path/to/filename.js 46 * Limit JSHint's run to a single specified file: 46 47 * 48 * grunt jshint:core --file=filename.js 49 * 50 * Optionally, include the file path: 51 * 52 * grunt jshint:core --file=path/to/filename.js 53 * 47 54 * @param {String} filepath 48 55 * @returns {Bool} 49 56 */ … … 73 80 expand: true, 74 81 cwd: SOURCE_DIR, 75 82 dest: SOURCE_DIR, 83 extDot: 'last', 76 84 ext: '-rtl.css', 77 src: BP_CSS ,85 src: BP_CSS.concat( BP_EXCLUDED_CSS ), 78 86 options: { generateExactDuplicates: true } 79 },80 dynamic: {81 expand: true,82 cwd: SOURCE_DIR,83 dest: SOURCE_DIR,84 ext: '-rtl.css',85 src: [],86 options: { generateExactDuplicates: true }87 87 } 88 88 }, 89 90 89 checktextdomain: { 91 90 options: { 92 91 correct_domain: false, … … 138 137 dest: SOURCE_DIR 139 138 } 140 139 }, 141 142 140 clean: { 143 all: [ BUILD_DIR ], 144 dynamic: { 145 cwd: BUILD_DIR, 146 dot: true, 147 expand: true, 148 src: [] 149 } 141 all: [ BUILD_DIR ] 150 142 }, 151 143 copy: { 152 144 files: { … … 159 151 src: ['**', '!**/.{svn,git}/**'] 160 152 } 161 153 ] 162 },163 dynamic: {164 cwd: SOURCE_DIR,165 dest: BUILD_DIR,166 dot: true,167 expand: true,168 src: []169 154 } 170 155 }, 171 156 uglify: { … … 172 157 core: { 173 158 cwd: BUILD_DIR, 174 159 dest: BUILD_DIR, 160 extDot: 'last', 175 161 expand: true, 176 162 ext: '.min.js', 177 163 src: BP_JS … … 183 169 } 184 170 }, 185 171 cssmin: { 186 ltr: {172 minify: { 187 173 cwd: BUILD_DIR, 188 174 dest: BUILD_DIR, 175 extDot: 'last', 189 176 expand: true, 190 177 ext: '.min.css', 191 178 src: BP_CSS, … … 194 181 '<%= grunt.template.today("UTC:yyyy-mm-dd h:MM:ss TT Z") %> - ' + 195 182 'https://wordpress.org/plugins/buddypress/ */' 196 183 } 197 },198 rtl: {199 cwd: BUILD_DIR,200 dest: BUILD_DIR,201 expand: true,202 ext: '.min.css',203 src: BP_CSS.map( function( filename ) {204 return filename.replace( '.css', '-rtl.css' );205 }),206 options: {207 banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +208 '<%= grunt.template.today("UTC:yyyy-mm-dd h:MM:ss TT Z") %> - ' +209 'https://wordpress.org/plugins/buddypress/ */'210 }211 184 } 212 185 }, 213 214 186 phpunit: { 215 187 'default': { 216 188 cmd: 'phpunit', … … 233 205 stdout: false 234 206 } 235 207 }, 236 237 208 jsvalidate:{ 238 209 options:{ 239 210 globals: {}, … … 242 213 }, 243 214 build: { 244 215 files: { 245 src: [BUILD_DIR + '/**/*. {min.js,js}' ]216 src: [BUILD_DIR + '/**/*.js' ] 246 217 } 218 }, 219 src: { 220 files: { 221 src: [SOURCE_DIR + '/**/*.js' ] 222 } 247 223 } 248 224 }, 249 250 225 patch: { 251 226 options: { 252 227 tracUrl: 'buddypress.trac.wordpress.org' … … 258 233 /** 259 234 * Register tasks. 260 235 */ 261 grunt.registerTask( 'build', ['jsvalidate: build', 'jshint', 'cssjanus:core'] );236 grunt.registerTask( 'build', ['jsvalidate:src', 'jshint', 'cssjanus'] ); 262 237 grunt.registerTask( 'build-commit', ['build', 'checktextdomain', 'imagemin'] ); 263 grunt.registerTask( 'build-release', ['build-commit', 'clean:all', 'copy:files', 'uglify :core', 'cssmin:ltr', 'cssmin:rtl', 'makepot', 'exec:bbpress', 'exec:bpdefault', 'test'] );238 grunt.registerTask( 'build-release', ['build-commit', 'clean:all', 'copy:files', 'uglify', 'jsvalidate:build', 'cssmin', 'makepot', 'exec:bbpress', 'exec:bpdefault', 'test'] ); 264 239 265 240 // Testing tasks. 266 241 grunt.registerMultiTask( 'phpunit', 'Runs PHPUnit tests, including the ajax and multisite tests.', function() { … … 273 248 274 249 grunt.registerTask( 'test', 'Run all unit test tasks.', ['phpunit'] ); 275 250 276 grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate ', 'jshint' ] );251 grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate:src', 'jshint' ] ); 277 252 278 253 // Travis CI Task 279 254 grunt.registerTask( 'travis', ['jshint', 'test'] ); … … 283 258 284 259 // Default task. 285 260 grunt.registerTask( 'default', ['build'] ); 286 287 /** 288 * Add a listener to the watch task. 289 * 290 * On `watch:all`, automatically updates the `copy:dynamic` and `clean:dynamic` configurations so that only the changed files are updated. 291 * On `watch:rtl`, automatically updates the `cssjanus:dynamic` configuration. 292 */ 293 grunt.event.on( 'watch', function( action, filepath, target ) { 294 if ( target !== 'all' && target !== 'rtl' ) { 295 return; 296 } 297 298 var relativePath = path.relative( SOURCE_DIR, filepath ), 299 cleanSrc = ( action === 'deleted' ) ? [ relativePath ] : [], 300 copySrc = ( action === 'deleted' ) ? [] : [ relativePath ]; 301 302 grunt.config( ['clean', 'dynamic', 'src'], cleanSrc ); 303 grunt.config( ['copy', 'dynamic', 'src'], copySrc ); 304 grunt.config( ['cssjanus', 'dynamic', 'src'], copySrc ); 305 }); 306 }; 307 No newline at end of file 261 }; -
package.json
10 10 "grunt-contrib-clean": "~0.6.0", 11 11 "grunt-contrib-copy": "~0.5.0", 12 12 "grunt-contrib-cssmin": "~0.10.0", 13 "grunt-contrib-imagemin": "~0. 7.1",13 "grunt-contrib-imagemin": "~0.8.0", 14 14 "grunt-contrib-jshint": "~0.10.0", 15 15 "grunt-contrib-uglify": "~0.5.1", 16 16 "grunt-contrib-watch": "~0.6.1", … … 19 19 "grunt-jsvalidate": "~0.2.2", 20 20 "grunt-legacy-util": "^0.2.0", 21 21 "grunt-patch-wordpress": "~0.2.1", 22 "grunt-phpunit": "~0.3.4",23 22 "grunt-sass": "~0.14.0", 24 "grunt-wp-i18n": "~0.4. 6",23 "grunt-wp-i18n": "~0.4.7", 25 24 "matchdep": "~0.3.0" 26 25 }, 27 26 "keywords": [ … … 43 42 "url": "https://buddypress.svn.wordpress.org/trunk/" 44 43 }, 45 44 "version": "2.1.0" 46 } 47 No newline at end of file 45 } -
src/bp-activity/admin/css/admin-rtl.css
77 77 } 78 78 .column-action { 79 79 width: 12%; 80 } 81 No newline at end of file 80 } -
src/bp-activity/admin/css/admin.css
77 77 } 78 78 .column-action { 79 79 width: 12%; 80 } 81 No newline at end of file 80 } -
src/bp-activity/admin/js/admin.js
170 170 postboxes.add_postbox_toggles( bp_activity_admin_vars.page ); 171 171 }); 172 172 173 })(jQuery); 174 No newline at end of file 173 })(jQuery); -
src/bp-activity/css/mentions-rtl.css
73 73 margin-top: -5px; 74 74 width: 30px; 75 75 } 76 } 77 No newline at end of file 76 } -
src/bp-activity/css/mentions.css
73 73 margin-top: -5px; 74 74 width: 30px; 75 75 } 76 } 77 No newline at end of file 76 } -
src/bp-activity/js/mentions.js
201 201 // Activity/reply, post comments, dashboard post 'text' editor. 202 202 $( '.bp-suggestions, #comments form textarea, .wp-editor-area' ).bp_mentions( users ); 203 203 }); 204 })( jQuery ); 205 No newline at end of file 204 })( jQuery ); -
src/bp-core/admin/css/common-rtl.css
429 429 background-image: url('../images/menu-2x.png') !important; 430 430 background-size: 209px 64px; 431 431 } 432 } 433 No newline at end of file 432 } -
src/bp-core/admin/css/common.css
429 429 background-image: url('../images/menu-2x.png') !important; 430 430 background-size: 209px 64px; 431 431 } 432 } 433 No newline at end of file 432 } -
src/bp-core/css/admin-bar-rtl.css
55 55 #wp-admin-bar-user-info img.avatar { 56 56 height: 64px; 57 57 width: 64px; 58 } 59 No newline at end of file 58 } -
src/bp-core/css/admin-bar.css
55 55 #wp-admin-bar-user-info img.avatar { 56 56 height: 64px; 57 57 width: 64px; 58 } 59 No newline at end of file 58 } -
src/bp-core/css/buddybar-rtl.css
197 197 -webkit-border-radius: 3px; 198 198 border-radius: 3px; 199 199 } 200 #wp-admin-bar-user-info img.avatar { 201 height: 64px; 202 width: 64px; 203 } 204 No newline at end of file 200 #wp-admin-bar-user-info img.avatar { 201 height: 64px; 202 width: 64px; 203 } -
src/bp-core/css/buddybar.css
197 197 -webkit-border-radius: 3px; 198 198 border-radius: 3px; 199 199 } 200 #wp-admin-bar-user-info img.avatar { 201 height: 64px; 202 width: 64px; 203 } 204 No newline at end of file 200 #wp-admin-bar-user-info img.avatar { 201 height: 64px; 202 width: 64px; 203 } -
src/bp-core/deprecated/css/autocomplete/jquery-rtl.css
1 .ac_results {2 padding: 0px;3 overflow: hidden;4 z-index: 99999;5 background: #fff;6 border: 1px solid #ccc;7 -moz-border-radius-bottomleft: 3px;8 -khtml-border-bottom-right-radius: 3px;9 -webkit-border-bottom-right-radius: 3px;10 border-bottom-right-radius: 3px;11 -moz-border-radius-bottomright: 3px;12 -khtml-border-bottom-left-radius: 3px;13 -webkit-border-bottom-left-radius: 3px;14 border-bottom-left-radius: 3px;15 }16 .ac_results ul {17 width: 100%;18 list-style-position: outside;19 list-style: none;20 padding: 0;21 margin: 0;22 }23 24 .ac_results li {25 margin: 0px;26 padding: 5px 10px;27 cursor: pointer;28 display: block;29 font-size: 1em;30 line-height: 16px;31 overflow: hidden;32 }33 .ac_results li img {34 margin-left: 5px;35 }36 37 .ac_odd {38 background-color: #f0f0f0;39 }40 41 .ac_over {42 background-color: #888;43 color: #fff;44 }45 46 ul.acfb-holder {47 margin : 0;48 height : auto !important;49 height : 1%;50 overflow: hidden;51 padding: 0;52 list-style: none;53 }54 ul.acfb-holder li {55 float : right;56 margin : 0 0 4px 5px;57 list-style-type: none;58 }59 60 ul.acfb-holder li.friend-tab {61 border-radius : 3px;62 -moz-border-radius : 3px;63 -webkit-border-radius : 3px;64 border : 1px solid #ffe7c7;65 padding : 2px 7px 2px;66 background : #FFF9DF;67 font-size: 1em;68 }69 li.friend-tab img.avatar {70 border-width: 2px !important;71 vertical-align: middle;72 }73 74 li.friend-tab span.p {75 padding-right: 5px;76 font-size: 0.8em;77 cursor: pointer;78 }79 80 input#send-to-input { width: 275px; }81 -
src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb-rtl.css
1 .ac_results { 2 padding: 0px; 3 overflow: hidden; 4 z-index: 99999; 5 background: #fff; 6 border: 1px solid #ccc; 7 -moz-border-radius-bottomleft: 3px; 8 -khtml-border-bottom-right-radius: 3px; 9 -webkit-border-bottom-right-radius: 3px; 10 border-bottom-right-radius: 3px; 11 -moz-border-radius-bottomright: 3px; 12 -khtml-border-bottom-left-radius: 3px; 13 -webkit-border-bottom-left-radius: 3px; 14 border-bottom-left-radius: 3px; 15 } 16 .ac_results ul { 17 width: 100%; 18 list-style-position: outside; 19 list-style: none; 20 padding: 0; 21 margin: 0; 22 } 23 24 .ac_results li { 25 margin: 0px; 26 padding: 5px 10px; 27 cursor: pointer; 28 display: block; 29 font-size: 1em; 30 line-height: 16px; 31 overflow: hidden; 32 } 33 .ac_results li img { 34 margin-left: 5px; 35 } 36 37 .ac_odd { 38 background-color: #f0f0f0; 39 } 40 41 .ac_over { 42 background-color: #888; 43 color: #fff; 44 } 45 46 ul.acfb-holder { 47 margin : 0; 48 height : auto !important; 49 height : 1%; 50 overflow: hidden; 51 padding: 0; 52 list-style: none; 53 } 54 ul.acfb-holder li { 55 float : right; 56 margin : 0 0 4px 5px; 57 list-style-type: none; 58 } 59 60 ul.acfb-holder li.friend-tab { 61 border-radius : 3px; 62 -moz-border-radius : 3px; 63 -webkit-border-radius : 3px; 64 border : 1px solid #ffe7c7; 65 padding : 2px 7px 2px; 66 background : #FFF9DF; 67 font-size: 1em; 68 } 69 li.friend-tab img.avatar { 70 border-width: 2px !important; 71 vertical-align: middle; 72 } 73 74 li.friend-tab span.p { 75 padding-right: 5px; 76 font-size: 0.8em; 77 cursor: pointer; 78 } 79 80 input#send-to-input { width: 275px; } -
src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb.css
78 78 } 79 79 80 80 input#send-to-input { width: 275px; } 81 -
src/bp-core/js/confirm.js
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
10 10 } 11 11 }); 12 12 }); 13 -
src/bp-friends/js/widget-friends.js
46 46 } 47 47 ); 48 48 } 49 } 50 No newline at end of file 49 } -
src/bp-members/admin/js/admin.js
52 52 options[i].selected = false; 53 53 } 54 54 } 55 } 56 No newline at end of file 55 } -
src/bp-templates/bp-legacy/js/buddypress.js
1 /* jshint undef: false, unused:false */ 1 2 // AJAX Functions 2 3 var jq = jQuery; 3 4 … … 421 422 'cookie': bp_get_cookies(), 422 423 'page': oldest_page, 423 424 'exclude_just_posted': just_posted.join(',') 424 } 425 }; 425 426 426 427 load_more_search = bp_get_querystring('s'); 427 428 -
src/bp-templates/bp-legacy/js/password-verify.js
1 /* jshint undef: false */ 1 2 /* Password Verify */ 2 3 ( function( $ ){ 3 4 function check_pass_strength() { -
src/bp-xprofile/admin/css/admin-rtl.css
156 156 background-color: #fff; 157 157 visibility: visible !important; 158 158 } 159 159 160 160 #field-group-tabs .ui-sortable-placeholder { 161 161 background: transparent; 162 162 border-bottom: none; -
src/bp-xprofile/admin/css/admin.css
156 156 background-color: #fff; 157 157 visibility: visible !important; 158 158 } 159 159 160 160 #field-group-tabs .ui-sortable-placeholder { 161 161 background: transparent; 162 162 border-bottom: none;