Changeset 10049
- Timestamp:
- 08/14/2015 08:37:22 AM (9 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/css/avatar-rtl.css
r9826 r10049 50 50 } 51 51 52 #b p-uploader-warning, #bp-webcam-messagep.warning {52 #buddypress p.warning { 53 53 background-color: #ffd; 54 54 border: 1px solid #cb2; -
trunk/src/bp-core/css/avatar.css
r9826 r10049 50 50 } 51 51 52 #b p-uploader-warning, #bp-webcam-messagep.warning {52 #buddypress p.warning { 53 53 background-color: #ffd; 54 54 border: 1px solid #cb2; -
trunk/src/bp-core/js/bp-plupload.js
r10033 r10049 304 304 305 305 initialize: function() { 306 this.warning = null;307 this.model = new Backbone.Model( this.defaults );306 this.warnings = []; 307 this.model = new Backbone.Model( this.defaults ); 308 308 this.on( 'ready', this.initUploader ); 309 309 }, … … 320 320 } 321 321 322 this.warning = new bp.Views.uploaderWarning( {322 var warning = new bp.Views.uploaderWarning( { 323 323 value: message 324 324 } ).render(); 325 325 326 this.$el.after( this.warning.el ); 326 this.warnings.push( warning ); 327 328 this.$el.after( warning.el ); 327 329 }, 328 330 329 331 resetWarning: function() { 330 if ( _.isNull( this.warning )) {332 if ( 0 === this.warnings.length ) { 331 333 return; 332 334 } 333 335 334 this.warning.remove(); 335 this.warning = null; 336 // Remove all warning views 337 _.each( this.warnings, function( view ) { 338 view.remove(); 339 } ); 340 341 // Reset Warnings 342 this.warnings = []; 336 343 } 337 344 } ); … … 341 348 tagName: 'p', 342 349 className: 'warning', 343 id: 'bp-uploader-warning',344 350 345 351 initialize: function() {
Note: See TracChangeset
for help on using the changeset viewer.