Changeset 6023 for trunk/prototype/modules
- Timestamp:
- 04/25/12 10:33:45 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/mail/js/label.js
r6013 r6023 262 262 $(".add-label-button").removeClass("ui-icon ui-icon-plus") 263 263 .html('<img alt="Carregando" title="Carregando" style="margin-left:10px;" src="../prototype/modules/mail/img/loader.gif" />'); 264 264 var hasLabel = true; 265 var labelId; 265 266 DataLayer.commit(false, false, function(data){ 266 var hasLabel = true;267 267 $.each(data, function(index, value) { 268 268 if(typeof value == 'object'){ 269 269 hasLabel = false; 270 labelId = value.id; 270 271 }else{ 271 272 hasLabel = value; 272 273 } 273 274 }); 275 274 276 if(!hasLabel){ 275 labels = DataLayer.get('label',{criteria:{order: 'id'}}, true);276 277 newLabel = { 277 id: label s[labels.length - 1].id,278 name : labels[labels.length- 1].name,278 id: labelId, 279 name : nameLabel.trim(), 279 280 uid: User.me.id, 280 281 bgColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(), 281 282 fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(), 282 283 borderColor : !!isNew ? '#000000' : winElement.find("input[name='borderColor']").val() 283 284 284 }; 285 285
Note: See TracChangeset
for help on using the changeset viewer.