This file contains hidden or 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
| that._getData = function (navTermID, listName, xmlQuery, contentType, onGetSuccess) { | |
| var objClientCtx = new SP.ClientContext.get_current(); //can be reused | |
| if (objClientCtx) { | |
| var oList = objClientCtx.get_web().get_lists().getByTitle(listName); | |
| var query = new SP.CamlQuery(); | |
| query.set_viewXml(xmlQuery); | |
| var objlistItems = oList.getItems(query); | |
| objClientCtx.load(objlistItems); | |
| objClientCtx.executeQueryAsync(function (sender, args) { | |
| that.DataSet = []; |
This file contains hidden or 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 oList = objClientCtx.get_web().get_lists().getByTitle(listName); | |
| var query = new SP.CamlQuery(); | |
| query.set_viewXml(xmlQuery); | |
| var objlistItems = oList.getItems(query); | |
| objClientCtx.load(objlistItems); |
This file contains hidden or 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
| objClientCtx.executeQueryAsync( | |
| function (sender, args) { | |
| that.DataSet = []; | |
| var objlistEnumerator = objlistItems.getEnumerator(); | |
| while (objlistEnumerator.moveNext()) { | |
| var objListItem = objlistEnumerator.get_current(); | |
| var firstName = objListItem.get_item('FirstName'); | |
| var lastName = objListItem.get_item('LastName'); | |
| var email = objListItem.get_item('Email'); | |
This file contains hidden or 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
| that.DataSet.push({ | |
| "FirstName": firstName, | |
| "LastName": lastName, | |
| "Email": email, | |
| }); |
This file contains hidden or 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
| [ | |
| { | |
| "FirstName": "abc", | |
| "LastName": "xyz", | |
| "Email": "abc@xyz.com" | |
| }, | |
| {"FirstName": "def", | |
| "LastName": "mnq", | |
| "Email": "def@mnq.com" |
This file contains hidden or 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
| <script id="customerTemplate" type="text/x-jquery-tmpl"> | |
| <li> | |
| <a href="mailto:${Email}">${FirstName} ${LastName}</a> | |
| </li> | |
| </script> |
This file contains hidden or 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
| <div id="divCustomer"> | |
| <ul id="ulCustomer"> | |
| </ul> | |
| </div> |
This file contains hidden or 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
| table.ms-rteTable-myCustomTable | |
| { | |
| -ms-name:"My Custom Table"; | |
| } | |
| .ms-rteTable-myCustomTable > tbody > tr > td, | |
| .ms-rteTable-myCustomTable > tbody > tr > th | |
| { | |
| border: 1px solid #C6C6C6; |
This file contains hidden or 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
| openInDialog = function (dlgTitle, dlgWidth, dlgHeight, dlgAllowMaximize, dlgShowClose, needCallBackFunction, pageUrl, dialogData) { | |
| var options = { title: dlgTitle, url: pageUrl, width: dlgWidth, height: dlgHeight, allowMaximize: dlgAllowMaximize, showClose: dlgShowClose, args: dialogData }; | |
| if (needCallBackFunction) { | |
| options.dialogReturnValueCallback = Function.createDelegate(null, closeDialogCallBack); | |
| } | |
| SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options); | |
| } |