diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-05 14:50:07 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-05 14:50:07 -0700 |
commit | a1839a927b8e396c71496e6ec18bd91f107a860b (patch) | |
tree | 7b868007ada35c5da3b25188c9c88bf028bd4bd6 /samples/TestAzureAD/Scripts/WebForms/GridView.js | |
parent | 7edb0a63ef796af300c670ce90df8e7670930a10 (diff) | |
parent | 789f14adf18e65ab416b60341bfbecc6577a1c37 (diff) | |
download | DotNetOpenAuth-a1839a927b8e396c71496e6ec18bd91f107a860b.zip DotNetOpenAuth-a1839a927b8e396c71496e6ec18bd91f107a860b.tar.gz DotNetOpenAuth-a1839a927b8e396c71496e6ec18bd91f107a860b.tar.bz2 |
Merge branch 'v4.3' of git://github.com/gbablani/DotNetOpenAuth into gbablani-v4.3
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("|"); +} |