Created
July 23, 2014 08:18
-
-
Save lohithgn/6d895ae5b90b94791bad to your computer and use it in GitHub Desktop.
Updated Partners Data Source
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var partnersDataSource = new kendo.data.DataSource({ | |
type:'odata', | |
transport:{ | |
read:{ | |
url:function(){ | |
return appSettings.dataSettings.partnersReadUrl; | |
}, | |
dataType:"json", | |
beforeSend: function(xhr) { | |
xhr.setRequestHeader("X-CSRF-Token", "fetch"); | |
}, | |
complete: function(xhr) { | |
appSettings.authSettings.token = xhr.getResponseHeader("X-CSRF-Token"); | |
} | |
}, | |
create:{ | |
url : function() | |
{ | |
return appSettings.dataSettings.partnersReadUrl; | |
}, | |
dataType:"json", | |
beforeSend: function(xhr) { | |
xhr.setRequestHeader("X-CSRF-Token", appSettings.authSettings.token); | |
}, | |
} | |
}, | |
sort: { | |
field: "CompanyName", | |
dir: "asc" | |
}, | |
schema: { | |
model: partnerModel | |
}, | |
pageSize:50, | |
serverPaging:true, | |
serverSorting: true, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment