diff options
author | Girish Bablani <girishb@microsoft.com> | 2013-04-16 18:53:13 -0700 |
---|---|---|
committer | Girish Bablani <girishb@microsoft.com> | 2013-04-16 18:53:13 -0700 |
commit | 789f14adf18e65ab416b60341bfbecc6577a1c37 (patch) | |
tree | 3f140b5f1679cb2857cd65a7d14d2c0ec28f2fca /samples/TestAzureAD/Scripts/WebForms/DetailsView.js | |
parent | 9e33a9e89ba1973cb3bf923e1303105047094d9c (diff) | |
download | DotNetOpenAuth-789f14adf18e65ab416b60341bfbecc6577a1c37.zip DotNetOpenAuth-789f14adf18e65ab416b60341bfbecc6577a1c37.tar.gz DotNetOpenAuth-789f14adf18e65ab416b60341bfbecc6577a1c37.tar.bz2 |
Enabled AzureAD integration and added TestAzureAD sample app
Diffstat (limited to 'samples/TestAzureAD/Scripts/WebForms/DetailsView.js')
-rw-r--r-- | samples/TestAzureAD/Scripts/WebForms/DetailsView.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/samples/TestAzureAD/Scripts/WebForms/DetailsView.js b/samples/TestAzureAD/Scripts/WebForms/DetailsView.js new file mode 100644 index 0000000..a36a498 --- /dev/null +++ b/samples/TestAzureAD/Scripts/WebForms/DetailsView.js @@ -0,0 +1,34 @@ +//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5/6/DetailsView.js +function DetailsView() { + this.pageIndex = null; + this.dataKeys = null; + this.createPropertyString = DetailsView_createPropertyString; + this.setStateField = DetailsView_setStateValue; + this.getHiddenFieldContents = DetailsView_getHiddenFieldContents; + this.stateField = null; + this.panelElement = null; + this.callback = null; +} +function DetailsView_createPropertyString() { + return createPropertyStringFromValues_DetailsView(this.pageIndex, this.dataKeys); +} +function DetailsView_setStateValue() { + this.stateField.value = this.createPropertyString(); +} +function DetailsView_OnCallback (result, context) { + var value = new String(result); + var valsArray = value.split("|"); + var innerHtml = valsArray[2]; + for (var i = 3; i < valsArray.length; i++) { + innerHtml += "|" + valsArray[i]; + } + context.panelElement.innerHTML = innerHtml; + context.stateField.value = createPropertyStringFromValues_DetailsView(valsArray[0], valsArray[1]); +} +function DetailsView_getHiddenFieldContents(arg) { + return arg + "|" + this.stateField.value; +} +function createPropertyStringFromValues_DetailsView(pageIndex, dataKeys) { + var value = new Array(pageIndex, dataKeys); + return value.join("|"); +} |