diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-05 15:36:55 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-05 15:36:55 -0700 |
commit | 49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c (patch) | |
tree | 9b836b0b9e94b8aa1e650c68e714bc214439d8da /samples/TestAzureAD/Scripts/WebForms/GridView.js | |
parent | 7edb0a63ef796af300c670ce90df8e7670930a10 (diff) | |
parent | 489bf70111fe4839e87fa591928d2845341f0059 (diff) | |
download | DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.zip DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.tar.gz DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.tar.bz2 |
Adds Azure Active Directory OAuth 2 client.
Closes #271
Diffstat (limited to 'samples/TestAzureAD/Scripts/WebForms/GridView.js')
-rw-r--r-- | samples/TestAzureAD/Scripts/WebForms/GridView.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/samples/TestAzureAD/Scripts/WebForms/GridView.js b/samples/TestAzureAD/Scripts/WebForms/GridView.js new file mode 100644 index 0000000..e24c2d7 --- /dev/null +++ b/samples/TestAzureAD/Scripts/WebForms/GridView.js @@ -0,0 +1,36 @@ +//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5/6/GridView.js +function GridView() { + this.pageIndex = null; + this.sortExpression = null; + this.sortDirection = null; + this.dataKeys = null; + this.createPropertyString = GridView_createPropertyString; + this.setStateField = GridView_setStateValue; + this.getHiddenFieldContents = GridView_getHiddenFieldContents; + this.stateField = null; + this.panelElement = null; + this.callback = null; +} +function GridView_createPropertyString() { + return createPropertyStringFromValues_GridView(this.pageIndex, this.sortDirection, this.sortExpression, this.dataKeys); +} +function GridView_setStateValue() { + this.stateField.value = this.createPropertyString(); +} +function GridView_OnCallback (result, context) { + var value = new String(result); + var valsArray = value.split("|"); + var innerHtml = valsArray[4]; + for (var i = 5; i < valsArray.length; i++) { + innerHtml += "|" + valsArray[i]; + } + context.panelElement.innerHTML = innerHtml; + context.stateField.value = createPropertyStringFromValues_GridView(valsArray[0], valsArray[1], valsArray[2], valsArray[3]); +} +function GridView_getHiddenFieldContents(arg) { + return arg + "|" + this.stateField.value; +} +function createPropertyStringFromValues_GridView(pageIndex, sortDirection, sortExpression, dataKeys) { + var value = new Array(pageIndex, sortDirection, sortExpression, dataKeys); + return value.join("|"); +} |