Skip to:
Content

BuddyPress.org

Ticket #5821: 5821.patch

File 5821.patch, 18.6 KB (added by netweb, 12 years ago)
  • Gruntfile.js

     
    11/* jshint node:true */
    22/* global module */
    33module.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/',
    76
    8         BP_CSS = [
    9                 '**/*.css',
    10                 '!**/*-rtl.css'  // Exclude RTL files
    11         ],
     7                // CSS
     8                BP_CSS = [
     9                        '**/*.css'
     10                ],
    1211
    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                ],
    1516
    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                ],
    1921
    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                ];
    2229
    23                 // Exclude anything in any deprecated folders.
    24                 '!**/deprecated/**/*.js'
    25         ];
    26 
    2730        require( 'matchdep' ).filterDev( ['grunt-*', '!grunt-legacy-util'] ).forEach( grunt.loadNpmTasks );
    2831        grunt.util = require( 'grunt-legacy-util' );
    2932
    30 
    3133        grunt.initConfig( {
    3234                pkg: grunt.file.readJSON('package.json'),
    3335                jshint: {
     
    3840                        core: {
    3941                                expand: true,
    4042                                cwd: SOURCE_DIR,
    41                                 src: BP_JS,
     43                                src: BP_JS.concat( BP_EXCLUDED_JS ),
    4244
    4345                                /**
    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:
    4647                                 *
     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                                 *
    4754                                 * @param {String} filepath
    4855                                 * @returns {Bool}
    4956                                 */
     
    7380                                expand: true,
    7481                                cwd: SOURCE_DIR,
    7582                                dest: SOURCE_DIR,
     83                                extDot: 'last',
    7684                                ext: '-rtl.css',
    77                                 src: BP_CSS,
     85                                src: BP_CSS.concat( BP_EXCLUDED_CSS ),
    7886                                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 }
    8787                        }
    8888                },
    89 
    9089                checktextdomain: {
    9190                        options: {
    9291                                correct_domain: false,
     
    138137                                dest: SOURCE_DIR
    139138                        }
    140139                },
    141 
    142140                clean: {
    143                         all: [ BUILD_DIR ],
    144                         dynamic: {
    145                                 cwd: BUILD_DIR,
    146                                 dot: true,
    147                                 expand: true,
    148                                 src: []
    149                         }
     141                        all: [ BUILD_DIR ]
    150142                },
    151143                copy: {
    152144                        files: {
     
    159151                                                src: ['**', '!**/.{svn,git}/**']
    160152                                        }
    161153                                ]
    162                         },
    163                         dynamic: {
    164                                 cwd: SOURCE_DIR,
    165                                 dest: BUILD_DIR,
    166                                 dot: true,
    167                                 expand: true,
    168                                 src: []
    169154                        }
    170155                },
    171156                uglify: {
     
    172157                        core: {
    173158                                cwd: BUILD_DIR,
    174159                                dest: BUILD_DIR,
     160                                extDot: 'last',
    175161                                expand: true,
    176162                                ext: '.min.js',
    177163                                src: BP_JS
     
    183169                        }
    184170                },
    185171                cssmin: {
    186                         ltr: {
     172                        minify: {
    187173                                cwd: BUILD_DIR,
    188174                                dest: BUILD_DIR,
     175                                extDot: 'last',
    189176                                expand: true,
    190177                                ext: '.min.css',
    191178                                src: BP_CSS,
     
    194181                                        '<%= grunt.template.today("UTC:yyyy-mm-dd h:MM:ss TT Z") %> - ' +
    195182                                        'https://wordpress.org/plugins/buddypress/ */'
    196183                                }
    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                                 }
    211184                        }
    212185                },
    213 
    214186                phpunit: {
    215187                        'default': {
    216188                                cmd: 'phpunit',
     
    233205                                stdout: false
    234206                        }
    235207                },
    236 
    237208                jsvalidate:{
    238209                        options:{
    239210                                globals: {},
     
    242213                        },
    243214                        build: {
    244215                                files: {
    245                                         src: [BUILD_DIR + '/**/*.{min.js,js}' ]
     216                                        src: [BUILD_DIR + '/**/*.js' ]
    246217                                }
     218                        },
     219                        src: {
     220                                files: {
     221                                        src: [SOURCE_DIR + '/**/*.js' ]
     222                                }
    247223                        }
    248224                },
    249 
    250225                patch: {
    251226                        options: {
    252227                                tracUrl: 'buddypress.trac.wordpress.org'
     
    258233        /**
    259234         * Register tasks.
    260235         */
    261         grunt.registerTask( 'build',         ['jsvalidate:build', 'jshint', 'cssjanus:core'] );
     236        grunt.registerTask( 'build',         ['jsvalidate:src', 'jshint', 'cssjanus'] );
    262237        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'] );
    264239
    265240        // Testing tasks.
    266241        grunt.registerMultiTask( 'phpunit', 'Runs PHPUnit tests, including the ajax and multisite tests.', function() {
     
    273248
    274249        grunt.registerTask( 'test', 'Run all unit test tasks.', ['phpunit'] );
    275250
    276         grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate', 'jshint' ] );
     251        grunt.registerTask( 'jstest', 'Runs all javascript tasks.', [ 'jsvalidate:src', 'jshint' ] );
    277252
    278253        // Travis CI Task
    279254        grunt.registerTask( 'travis', ['jshint', 'test'] );
     
    283258
    284259        // Default task.
    285260        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

     
    1010    "grunt-contrib-clean": "~0.6.0",
    1111    "grunt-contrib-copy": "~0.5.0",
    1212    "grunt-contrib-cssmin": "~0.10.0",
    13     "grunt-contrib-imagemin": "~0.7.1",
     13    "grunt-contrib-imagemin": "~0.8.0",
    1414    "grunt-contrib-jshint": "~0.10.0",
    1515    "grunt-contrib-uglify": "~0.5.1",
    1616    "grunt-contrib-watch": "~0.6.1",
     
    1919    "grunt-jsvalidate": "~0.2.2",
    2020    "grunt-legacy-util": "^0.2.0",
    2121    "grunt-patch-wordpress": "~0.2.1",
    22     "grunt-phpunit": "~0.3.4",
    2322    "grunt-sass": "~0.14.0",
    24     "grunt-wp-i18n": "~0.4.6",
     23    "grunt-wp-i18n": "~0.4.7",
    2524    "matchdep": "~0.3.0"
    2625  },
    2726  "keywords": [
     
    4342    "url": "https://buddypress.svn.wordpress.org/trunk/"
    4443  },
    4544  "version": "2.1.0"
    46 }
    47  No newline at end of file
     45}
  • src/bp-activity/admin/css/admin-rtl.css

     
    7777}
    7878.column-action {
    7979        width: 12%;
    80 }
    81  No newline at end of file
     80}
  • src/bp-activity/admin/css/admin.css

     
    7777}
    7878.column-action {
    7979        width: 12%;
    80 }
    81  No newline at end of file
     80}
  • src/bp-activity/admin/js/admin.js

     
    170170        postboxes.add_postbox_toggles( bp_activity_admin_vars.page );
    171171});
    172172
    173 })(jQuery);
    174  No newline at end of file
     173})(jQuery);
  • src/bp-activity/css/mentions-rtl.css

     
    7373                margin-top: -5px;
    7474                width: 30px;
    7575        }
    76 }
    77  No newline at end of file
     76}
  • src/bp-activity/css/mentions.css

     
    7373                margin-top: -5px;
    7474                width: 30px;
    7575        }
    76 }
    77  No newline at end of file
     76}
  • src/bp-activity/js/mentions.js

     
    201201                // Activity/reply, post comments, dashboard post 'text' editor.
    202202                $( '.bp-suggestions, #comments form textarea, .wp-editor-area' ).bp_mentions( users );
    203203        });
    204 })( jQuery );
    205  No newline at end of file
     204})( jQuery );
  • src/bp-core/admin/css/common-rtl.css

     
    429429                background-image: url('../images/menu-2x.png') !important;
    430430                background-size: 209px 64px;
    431431        }
    432 }
    433  No newline at end of file
     432}
  • src/bp-core/admin/css/common.css

     
    429429                background-image: url('../images/menu-2x.png') !important;
    430430                background-size: 209px 64px;
    431431        }
    432 }
    433  No newline at end of file
     432}
  • src/bp-core/css/admin-bar-rtl.css

     
    5555#wp-admin-bar-user-info img.avatar {
    5656        height: 64px;
    5757        width: 64px;
    58 }
    59  No newline at end of file
     58}
  • src/bp-core/css/admin-bar.css

     
    5555#wp-admin-bar-user-info img.avatar {
    5656        height: 64px;
    5757        width: 64px;
    58 }
    59  No newline at end of file
     58}
  • src/bp-core/css/buddybar-rtl.css

     
    197197        -webkit-border-radius: 3px;
    198198        border-radius: 3px;
    199199}
    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

     
    197197        -webkit-border-radius: 3px;
    198198        border-radius: 3px;
    199199}
    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
     46ul.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
     80input#send-to-input { width: 275px; }
  • src/bp-core/deprecated/css/autocomplete/jquery.autocompletefb.css

     
    7878                }
    7979
    8080input#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
     
    1010                }
    1111        });
    1212});
    13 
  • src/bp-friends/js/widget-friends.js

     
    4646                        }
    4747                );
    4848        }
    49 }
    50  No newline at end of file
     49}
  • src/bp-members/admin/js/admin.js

     
    5252                        options[i].selected = false;
    5353                }
    5454        }
    55 }
    56  No newline at end of file
     55}
  • src/bp-templates/bp-legacy/js/buddypress.js

     
     1/* jshint undef: false, unused:false */
    12// AJAX Functions
    23var jq = jQuery;
    34
     
    421422                                'cookie': bp_get_cookies(),
    422423                                'page': oldest_page,
    423424                                'exclude_just_posted': just_posted.join(',')
    424                         }
     425                        };
    425426
    426427                        load_more_search = bp_get_querystring('s');
    427428
  • src/bp-templates/bp-legacy/js/password-verify.js

     
     1/* jshint undef: false */
    12/* Password Verify */
    23( function( $ ){
    34        function check_pass_strength() {
  • src/bp-xprofile/admin/css/admin-rtl.css

     
    156156                background-color: #fff;
    157157                visibility: visible !important;
    158158        }
    159        
     159
    160160        #field-group-tabs .ui-sortable-placeholder {
    161161                background: transparent;
    162162                border-bottom: none;
  • src/bp-xprofile/admin/css/admin.css

     
    156156                background-color: #fff;
    157157                visibility: visible !important;
    158158        }
    159        
     159
    160160        #field-group-tabs .ui-sortable-placeholder {
    161161                background: transparent;
    162162                border-bottom: none;