1 2var site = { 3 data: null, 4 ytd: 0.00, 5 get: function() { 6 service.call("site", { }, site.getReturned, "GET"); 7 }, 8 getPayPalConfig: function() { 9 service.call("paypal/config", { }, site.paypalConfigReturned, "GET"); 10 }, 11 paypalConfigReturned: function(e) { 12 if (e.error) growler.error(e.error); 13 else { 14 site.paypalConfig = e; 15 context.set("site", site.data); 16 } 17 }, 18 getReturned: function(e) { 19 if (e&&e.error) growler.error(e.error); 20 else { 21 site.data = e; 22 context.set("site", site.data); 23 } 24 }, 25 admin: function() { 26 service.call("admin/sites", {}, site.getReturned, "GET"); 27 }, 28 adminLoaded: function(e) { 29 if (e.error) growler.error(e.error); 30 else context.set("adminSites", e); 31 }, 32 getytd: function() { 33 service.call("ytd", { }, site.ytdLoaded); 34 }, 35 ytdLoaded: function(e) { 36 if (e.error) growler.error(e.error); 37 else { 38 site.ytd = e.ytd; 39 context.set("ytd", site.ytd); 40 } 41 }, 42 isInternational: function() { 43 service.call("isInternational", {}, site.isInternationalReturned); 44 }, 45 isInternationalReturned: function(e) { 46 context.set("isInternational", e.data); 47 }, 48 save: function(name, domain, url, slogan, email, primary, secondary, shipType, flatRate, threshold, currency, returnPolicy, hideByDefault, hideOutOfStock, international, instore, shipByOrder, isGiftCardEnabled, isColorSync, isCategorySync, defaultSort) { 49 var params = { 50 name: name, 51 domain: domain, 52 url: url, 53 slogan: slogan, 54 email: email, 55 primary: primary, 56 secondary: secondary, 57 shipType: shipType, 58 flatRate: flatRate.split("$").join(""), 59 threshold: threshold, 60 currency: currency, 61 returnPolicy: returnPolicy, 62 hideByDefault: hideByDefault, 63 hideOutOfStock: hideOutOfStock, 64 international: international, 65 instore: instore, 66 shipByOrder: shipByOrder, 67 isGiftCardEnabled: isGiftCardEnabled, 68 isColorSync: isColorSync, 69 isCategorySync: isCategorySync, 70 defaultSort: defaultSort 71 }; 72 service.call("site", params, site.saveReturned); 73 }, 74 saveReturned: function(e) { 75 $(".loader").removeClass("open"); 76 if (e.error) growler.error(e.error); 77 else { 78 growler.success("Site Setting have been Applied") 79 site.data = e; 80 context.set("site", site.data); 81 } 82 } 83}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.