1 /** 2 * The following comment prevents JSLint errors concerning undefined global variables. 3 * It tells JSLint that these identifiers are defined elsewhere. 4 */ 5 /*jslint bitwise:true, browser:true, nomen:true, regexp:true, sloppy:true, white:true */ 6 7 /** The following comment is to prevent jslint errors about 8 * using variables before they are defined. 9 */ 10 /*global $, jQuery, Handlebars, dojox, dojo, console, finesse */ 11 12 var finesse = finesse || {}; 13 finesse.restservices = finesse.restservices || {}; 14 15 /** 16 * @class 17 * Overrides the the finesse.restservices.SignOutReasonCodes getCollection to remove 18 * SignOutReasonCode objects that have their "forAll" (global) set to "true" 19 */ 20 finesse.restservices.AssignableSignOutReasonCodes = finesse.restservices.SignOutReasonCodes.extend(/** @lends finesse.restservices.AssignableSignOutReasonCodes.prototype */{ 21 22 /** 23 * Overrides the the finesse.restservices.SignOutReasonCodes getCollection to remove 24 * SignOutReasonCode objects that have their "forAll" (global) set to "true" 25 * @return {[type]} [description] 26 */ 27 getCollection: function () { 28 var id, reasonCode; 29 30 // Remove items with GLOBAL type 31 for (id in this._collection) 32 { 33 if (this._collection.hasOwnProperty(id)) 34 { 35 reasonCode = this._collection[id]; 36 if (reasonCode.getForAll() === "true") 37 { 38 delete this._collection[id]; 39 } 40 } 41 } 42 43 return this._collection; 44 } 45 46 });