Simple Changes with Javascript and CSS in Sharepoint Part-2
CRUD operation using ECMA Script
Add item to SharePoint list
function AddListItem(){
var ListName = "MyList";
var context = new SP.ClientContext.get_current(); // the current context is taken by default here
//you can also create a particular site context as follows
//var context = new SP.ClientContext('/Sites/site1');
var lstObject = context.get_web().get_lists().getByTitle(ListName);
var listItemCreationInfo = new SP.ListItemCreationInformation();
var newItem = lstObject.addItem(listItemCreationInfo);
newItem.set_item('Title', 'This is new item');
// set values to other columns of the list here
newItem.update();
context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
Function.createDelegate(this, this.onFailure));
function onSuccess() {
alert('Item created: ' + newItem.get_id());
}
function onFailure(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
}
/*Update Item of SharePoint list*/
function UpdateListItem()
{
var ListName = "MyList";
var context = new SP.ClientContext.get_current(); // the current context is taken by default here
//you can also create a particular site context as follows
//var context = new SP.ClientContext('/Sites/site1');
var lstObject = context.get_web().get_lists().getByTitle(ListName);
this.lstObjectItem = lstObject.getItemById(1);
lstObjectItem.set_item('Title', 'This is updated item');
lstObjectItem.update();
lstObject.set_description("Updated description using ECMAScript");
lstObject.update();
context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
Function.createDelegate(this, this.onFailure));
}
function onSuccess() {
alert('Item udated');
}
function onFailure(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
/*Delete Item from SharePoint list*/
function DeleteListItem()
{
var ListName = "MyList";
var context = new SP.ClientContext.get_current(); // the current context is taken by default here
//you can also create a particular site context as follows
//var context = new SP.ClientContext('/Sites/site1');
var lstObject = context.get_web().get_lists().getByTitle(ListName);
this.lstObjectItem = lstObject.getItemById(1);
lstObjectItem.deleteObject();
context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
Function.createDelegate(this, this.onFailure));
}
function onSuccess() {
alert('Item Deleted');
}
function onFailure(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
ReferenceLink:http://adicodes.com/add-update-and-delete-list-items-using-ecmascript/
Design Control for Top navigation Action:
=TEXT(Today,"mm/dd/YYYY")&" "&TEXT(Now(),"h:mm:ss")
=DATE(YEAR(OrderEntryDate),MONTH(OrderEntryDate),DAY(OrderEntryDate))
=RIGHT(OrderEntryHour,LEN(OrderEntryHour)-11)
@text(@Time(OrderEntryHour))
<table><tr id="btnArchive">
<td class="ms-list-addnew ms-textXLarge ms-list-addnew-aligntop ms-soften">
<a title="Mark as Archive" class="ms-heroCommandLink" onclick="GetSelected();" style="cursor: pointer;">
<span class="ms-list-addnew-imgSpan20"><img class="ms-list-addnew-img20" id="Img9" src="/_layouts/15/images/spcommon.png?rev=28" alt="" style="left: -177px !important; top: -31px !important;"/> </span>
<span>Mark as Archive</span></a> </td>
</tr></table>
<table><tr id="btnActive">
<td class="ms-list-addnew ms-textXLarge ms-list-addnew-aligntop ms-soften">
<a title="Mark as Active" class="ms-heroCommandLink" onclick="GetSelected();" style="cursor: pointer;">
<span class="ms-list-addnew-imgSpan20"><img class="ms-list-addnew-img20" id="Img9" src="/_layouts/15/images/spcommon.png?rev=28" alt="" style="left: -177px !important; top: -31px !important;"/> </span>
<span>Mark as Active</span></a> </td>
</tr></table>
http://hcchspdev01:1122/sites/scpind/SiteAssets/comments.png
Get ID from display page
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script type="text/javascript" src="../SiteAssets/jquery1.10.2.js"></script>
<script type="text/javascript" src="../SiteAssets/jquery.SPServices-0.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#btn_response').click(function(){
var threadid=$("#threadval").text();
// alert(threadid);
//.aspx?IsDlg=1&mastd=1&ThreadId=threadid;
// var threadid= getParameterByName('ThreadId');
var GetID=getParameterByName('ID');
window.location = L_Menu_BaseUrl +"/Lists/Response/ResponseNew.aspx?masterid="+GetID+"&ThreadId="+threadid+"";
});
});
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
</script>
Get selcted item id from view page
<script type="text/javascript" src="../SiteAssets/jquery1.10.2.js"></script>
<script type="text/javascript" src="../SiteAssets/jquery.SPServices-0.7.2.min.js"></script>
<script type="text/javascript">
var oListItem="";
var clientContext = "";
var button="";
$(document).ready(function(){
// alert('inside doc');
$('#btn_Resonse').click(function(){
//alert('click');
//var threadid=$("#threadval").text();
//alert(threadid);
button="Response";
var ctx = SP.ClientContext.get_current();
// alert(ctx);
var items = SP.ListOperation.Selection.getSelectedItems(ctx);
//alert('items: '+items);
if (items.length == 0) {
alert('Please choose the one item.');
}
else if (items.length > 1) {
alert("Please choose the one item.")
}
else {
var k;
for (k in items) {
var id=items[k].id;
GetThreadId(id);
//debugger;
// alert('ID' + items[k].id);//ThreadId
//window.location = L_Menu_BaseUrl +"/Lists/Response/ResponseNew.aspx?masterid=" + items[k].id+"";
//window.location = L_Menu_BaseUrl + "/Lists/MainTopic/All%20Documents.aspx?masterid=" + items[k].id + "&source=" + window.location.href=/sites/scpind/Lists/MainTopic/All%20Documents.aspx;
}
}
});
$('#btn_Anonymous').click(function(){
//alert('click');
button="Anonymous";
var ctx = SP.ClientContext.get_current();
// alert(ctx);
var items = SP.ListOperation.Selection.getSelectedItems(ctx);
//alert('items: '+items);
if (items.length == 0) {
alert('Please choose the one item.');
}
else if (items.length > 1) {
alert("Please choose the one item.")
}
else {
var k;
for (k in items) {
var id=items[k].id;
GetThreadId(id);
//alert('ID' + items[k].id);
//window.location = L_Menu_BaseUrl + "/Lists/MainTopic/All%20Documents.aspx?masterid=" + items[k].id + "&source=" + window.location.href=/sites/scpind/Lists/MainTopic/All%20Documents.aspx;
}
}
});
$('#btn_RestoRes').click(function(){
//alert('click');
//var threadid=$("#threadval").text();
//alert(threadid);
button="Response to Response";
var ctx = SP.ClientContext.get_current();
// alert(ctx);
var items = SP.ListOperation.Selection.getSelectedItems(ctx);
//alert('items: '+items);
if (items.length == 0) {
alert('Please choose the one item.');
}
else if (items.length > 1) {
alert("Please choose the one item.")
}
else {
var k;
for (k in items) {
var id=items[k].id;
GetThreadId(id);
//debugger;
// alert('ID' + items[k].id);//ThreadId
//window.location = L_Menu_BaseUrl +"/Lists/Response/ResponseNew.aspx?masterid=" + items[k].id+"";
//window.location = L_Menu_BaseUrl + "/Lists/MainTopic/All%20Documents.aspx?masterid=" + items[k].id + "&source=" + window.location.href=/sites/scpind/Lists/MainTopic/All%20Documents.aspx;
}
}
$('#btn_AnonyRestoRes').click(function(){
//alert('click');
button="Anonymous Response to Response";
var ctx = SP.ClientContext.get_current();
// alert(ctx);
var items = SP.ListOperation.Selection.getSelectedItems(ctx);
//alert('items: '+items);
if (items.length == 0) {
alert('Please choose the one item.');
}
else if (items.length > 1) {
alert("Please choose the one item.")
}
else {
var k;
for (k in items) {
var id=items[k].id;
GetThreadId(id);
//alert('ID' + items[k].id);
//window.location = L_Menu_BaseUrl + "/Lists/MainTopic/All%20Documents.aspx?masterid=" + items[k].id + "&source=" + window.location.href=/sites/scpind/Lists/MainTopic/All%20Documents.aspx;
}
}
});
});
});
function GetThreadId(id){
clientContext = new SP.ClientContext(L_Menu_BaseUrl);
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle('New Topic');
oListItem = oList.getItemById(id);
clientContext.load(oListItem);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}
function onQuerySucceeded() {
var threadid = oListItem.get_item('ThreadId');
var ItemId=oListItem.get_item('ID');
if(button=="Response"){
window.location = L_Menu_BaseUrl +"/Lists/Response/ResponseNew.aspx?masterid="+ItemId+"&ThreadId="+threadid;
}
else if(button=="Anonymous"){
window.location = L_Menu_BaseUrl +"/Lists/Anonymous%20Response/Anonymousform.aspx?masterid="+ItemId+"&ThreadId="+threadid;
}
else if(button=="Response to Response"){
window.location = L_Menu_BaseUrl +"/Lists/Response%20to%20Reasponse/RestoResNew.aspx?masterid="+ItemId+"&ThreadId="+threadid;
}
else if(button=="Anonymous Response to Response"){
window.location = L_Menu_BaseUrl +"/Lists/Anonymous%20Response%20to%20Response/AanonyrestoresNew.aspx?masterid="+ItemId+"&ThreadId="+threadid;
}
}
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
function Callscpindmainform()
{
window.location="/sites/scpind/Lists/MainTopic/scpindmainform.aspx";
}
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
</script>
get_item to multi allow people picker
var temp_clientcontact = new Array();
//to assign value to client contact
if ((targetListItem.get_item("ClientContacts") != null) || (targetListItem.get_item("ClientContacts") != undefined)) {
var itemArray = new Array();
var lookupObject = new Array();
itemArray = targetListItem.get_item("ClientContacts");
//alert(itemArray.length);
for (var i = 0; i < itemArray.length; i++) {
lookupObject = itemArray[i];
//alert(" client contact val :"+lookupObject.get_lookupValue());
if (temp_clientcontact.length == 0) {
temp_clientcontact = lookupObject.get_lookupValue() + ";";
}
else {
temp_clientcontact = temp_clientcontact + lookupObject.get_lookupValue() + ";";
}
}
}
join vie code to make as link
<%-- _lcid="1033" _version="15.0.4420" _dal="1" --%>
<%-- _LocalBinding --%>
<%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
<SharePoint:ListItemProperty Property="BaseName" maxlength="40" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<meta name="GENERATOR" content="Microsoft SharePoint" />
<meta name="ProgId" content="SharePoint.WebPartPage.Document" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="CollaborationServer" content="SharePoint Team Web Site" />
<SharePoint:ScriptBlock runat="server">
var navBarHelpOverrideKey = "WSSEndUser"; </SharePoint:ScriptBlock>
<SharePoint:StyleBlock runat="server">
body #s4-leftpanel {
display:none;
}
.s4-ca {
margin-left:0px;
}</SharePoint:StyleBlock>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderSearchArea" runat="server">
<asp:ScriptManagerProxy runat="server" id="ScriptManagerProxy">
</asp:ScriptManagerProxy>
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
<SharePoint:ProjectProperty Property="Description" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<script type="text/javascript" src="../SiteAssets/jquery1.10.2.js"></script>
<script type="text/javascript" src="../SiteAssets/jquery.SPServices-0.7.2.min.js"></script>
<script type="text/javascript">
var button="";
var append;
var split2;
var value;
var DynmListName;
var temp_currentlogin;
var getlistitemid;
var GETMarkTitle;
var getlistActivity;
$(document).ready(function(){
$('#btn_Resonse').click(function(){
button="Response";
GetThreadId();
});
$('#btn_Anonymous').click(function(){
button="Anonymous";
GetThreadId();
});
$('#btn_RestoRes').click(function(){
button="Response to Response";
GetThreadId();
});
$('#btn_AnonyRestoRes').click(function(){
button="Anonymous Response to Response";
GetThreadId();
});
$('#btn_markunmark').click(function(){
d = new Date();
value=d.yyyymmdd();
button="Mark";
GetThreadId();
});
$('#btn_interest').click(function(){
temp_currentlogin=$().SPServices.SPGetCurrentUser({fieldName: "Title",debug: false});
button="Interest";
GetThreadId();
});
});
Date.prototype.yyyymmdd = function() {
var yyyy = this.getFullYear().toString();
var mm = (this.getMonth()+1).toString(); // getMonth() is zero-based
var dd = this.getDate().toString();
return (mm[1]?mm:"0"+mm[0]) + '/' + (dd[1]?dd:"0"+dd[0])+ '/' + yyyy ;
}
function GetThreadId(){
var selectedItemCount = $("tr[class*='ms-itmHoverEnabled ms-itmhover s4-itm-selected']").length;
if (selectedItemCount == 0) {
alert("please select the item.");
return true;
}
if (selectedItemCount > 1) {
alert("please select one item.");
return true;
}
var selectedItemId = $("tr[class*='ms-itmHoverEnabled ms-itmhover s4-itm-selected']").attr("title");
DynmListName= $("tr[class*='ms-itmHoverEnabled ms-itmhover s4-itm-selected']").find('a:first').attr("title");
alert("DynmListName : "+ DynmListName)
if(DynmListName==undefined)
{
alert("Condintin undefiene");
alert($('.respClass').val());
}
if (selectedItemCount == 1) {
if(button=="Response")
{
window.location = L_Menu_BaseUrl +"/Lists/Response/ResponseNew.aspx?" + selectedItemId;
}
else if(button=="Anonymous"){
window.location = L_Menu_BaseUrl +"/Lists/Anonymous%20Response/Anonymousform.aspx?" + selectedItemId;
}
else if(button=="Response to Response"){
window.location = L_Menu_BaseUrl +"/Lists/Response%20to%20Reasponse/RestoResNew.aspx?" + selectedItemId;
}
else if(button=="Anonymous Response to Response"){
window.location = L_Menu_BaseUrl +"/Lists/Anonymous%20Response%20to%20Response/AanonyrestoresNew.aspx?" + selectedItemId;
}
else if(button=="Mark")
{
var split1=selectedItemId.split('&')[0];
split2= split1.split('=')[1];
NewtopicMaster();
}
else if(button=="Interest")
{
var split1=selectedItemId.split('&')[0];
split2= split1.split('=')[1];
alert('spservices');
//
$().SPServices({
operation: 'GetListItems',
async: false,
debug: true,
listName: 'InterestProfile',
CAMLRowLimit: "<RowLimit>1</RowLimit>",
CAMLQuery: '<Query><Where><Eq><FieldRef Name="Interest_x0020_Profile_x0020_For" /><Value Type="Text">'+temp_currentlogin+'</Value></Eq></Where></Query>',
completefunc: function(xData, Status) {
//alert(xData.responseText);
numChildOptions = parseFloat($(xData.responseXML).SPFilterNode("rs:data").attr("ItemCount"));
alert(numChildOptions);
$(xData.responseXML).SPFilterNode("z:row").each(function() {
getlistitemid=$(this).attr("ows_ID");
getlistActivity=$(this).attr("ows_ThreadsActivity");
alert('getlistitemid' + getlistitemid);
alert('getlistActivity'+ getlistActivity)
});//XData Ends
if(numChildOptions==0){
InterestMaster();
AddListItem();
}
else{
alert('call update');
InterestMaster();
UpdateListItem();
}
// $(xData.responseXML).SPFilterNode("z:row").each(function() {
// getlistitemid=$(this).attr("ows_ID");
// });//XData Ends
}//FilterNode ends ends
});//SPServices() end
//
}
}
}
//Insert function
function AddListItem()
{
alert('addlistiem');
var ListName = "InterestProfile";
var context = new SP.ClientContext.get_current(); // the current context is taken by default here
//you can also create a particular site context as follows
//var context = new SP.ClientContext('/Sites/site1');
var lstObject = context.get_web().get_lists().getByTitle(ListName);
var listItemCreationInfo = new SP.ListItemCreationInformation();
var newItem = lstObject.addItem(listItemCreationInfo);
newItem.set_item('Interest_x0020_Profile_x0020_For',temp_currentlogin);
newItem.set_item('ThreadsActivity',GETMarkTitle);
// set values to other columns of the list here
newItem.update();
context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
Function.createDelegate(this, this.onFailure));
}
function onSuccess() {
alert('Item created: ');
}
function onFailure(sender, args) {
alert('Request failed. ');
}
//
//update function
function UpdateListItem()
{
alert('its updata function :' + GETMarkTitle);
var ListName = "InterestProfile";
var context = new SP.ClientContext.get_current(); // the current context is taken by default here
//you can also create a particular site context as follows
//var context = new SP.ClientContext('/Sites/site1');
var append=getlistActivity+";"+GETMarkTitle;
var lstObject = context.get_web().get_lists().getByTitle(ListName);
this.lstObjectItem = lstObject.getItemById(getlistitemid);
lstObjectItem.set_item('Interest_x0020_Profile_x0020_For', temp_currentlogin);
lstObjectItem.set_item('ThreadsActivity',append);
lstObjectItem.update();
lstObject.set_description("Updated description using ECMAScript");
lstObject.update();
context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
Function.createDelegate(this, this.onFailure));
}
function onSuccess() {
alert('Item udated');
}
function onFailure(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
//
function ItemRowSelect(val)
{
var itemTitle = $(val).attr("title");
//alert(itemTitle):
var selectedTrClass = $("tr[title='"+ itemTitle + "']").attr("class");
switch(selectedTrClass)
{
case "ms-alternating":
$("tr[title='"+ itemTitle + "']").attr("class","ms-alternating ms-itmHoverEnabled ms-itmhover s4-itm-selected");
break;
case "ms-alternating ms-itmHoverEnabled ms-itmhover s4-itm-selected":
$("tr[title='"+ itemTitle + "']").attr("class","ms-alternating");
break;
case "ms-itmHoverEnabled ms-itmhover s4-itm-selected":
$("tr[title='"+ itemTitle + "']").attr("class","");
break;
default:
$("tr[title='"+ itemTitle + "']").attr("class","ms-itmHoverEnabled ms-itmhover s4-itm-selected");
}
}
function ExpColTimeTable(val)
{
var eventId = $(val).attr("id");
$("table[id='" + eventId+ "']").toggle();
var groupImg = $("img[id='" + eventId+ "']");
if ( $(groupImg).attr("src") == "/_layouts/15/images/collapse.png")
{
$(groupImg).attr("src","/_layouts/15/images/expand.png");
}
else
{
$(groupImg).attr("src","/_layouts/15/images/collapse.png");
}
}
function Callscpindmainform()
{
window.location=L_Menu_BaseUrl +"/Lists/MainTopic/scpindmainform.aspx?";
}
function NewtopicMaster() {
try
{
alert("NewtopicMaster calls split2 id - " + split2);
var clientContext = SP.ClientContext.get_current();
var targetList = clientContext.get_web().get_lists().getByTitle(DynmListName); // list title
targetListItem = targetList.getItemById(split2);
clientContext.load(targetListItem);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQueryNewTopicSucceeded), Function.createDelegate(this, this.onQueryNewTopicFailed));
}
catch (ex)
{
alert(ex);
}
}
function onQueryNewTopicSucceeded() {
try
{
alert("onQueryNewTopicSucceeded DynmListName "+ DynmListName);
var context = new SP.ClientContext.get_current();
var lstObject = context.get_web().get_lists().getByTitle(DynmListName);
this.lstObjectItem = lstObject.getItemById(split2);
var ValtoAppend="";
var MarkTitle= targetListItem.get_item('Title'); //field inter id
var expiredVal = targetListItem.get_item('ExpiredOn');
if(MarkTitle.indexOf('Expired')>-1)
{
MarkTitle= MarkTitle.replace('Expired','');
ValtoAppend=MarkTitle;
}
else
{
ValtoAppend="Expired"+MarkTitle;
}
lstObjectItem.set_item('Title',ValtoAppend );
lstObjectItem.set_item('ExpiredOn', value);
lstObjectItem.update();
lstObject.update();
context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),Function.createDelegate(this, this.onFailure));
//UpdateNewTopicItem();
}
catch(ex)
{
alert("onQueryNewTopicSucceeded error " + ex);
}
}
function onSuccess() {
alert('Item udated');
}
function onFailure(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
function onQueryNewTopicFailed(sender, args)
{
alert("onQueryFailed");
//WriteExceptionLog(args.get_stackTrace(), args.get_message())
}
function InterestMaster() {
try
{
alert("InterestMaster calls split2 id - " + split2);
var clientContext = SP.ClientContext.get_current();
var targetList = clientContext.get_web().get_lists().getByTitle(DynmListName); // list title
targetListItem = targetList.getItemById(split2);
clientContext.load(targetListItem);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQueryInterestSucceeded), Function.createDelegate(this, this.onQueryInterestFailed));
}
catch (ex)
{
alert(ex);
}
}
function onQueryInterestSucceeded() {
try
{
alert("onQueryInterestSucceeded DynmListName "+ DynmListName);
var context = new SP.ClientContext.get_current();
var lstObject = context.get_web().get_lists().getByTitle(DynmListName);
this.lstObjectItem = lstObject.getItemById(split2);
GETMarkTitle= targetListItem.get_item('Title');
alert(GETMarkTitle); //field inter id
context.executeQueryAsync(Function.createDelegate(this, this.onInterestSuccess),Function.createDelegate(this, this.onInterestFailure));
//UpdateNewTopicItem();
}
catch(ex)
{
alert("onQueryNewTopicSucceeded error " + ex);
}
}
function onInterestSuccess() {
alert('Item udated');
}
function onInterestFailure(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
function onQueryInterestFailed(sender, args)
{
alert("onQueryFailed");
//WriteExceptionLog(args.get_stackTrace(), args.get_message())
}
</script>
<input id="btn_main" onclick="Callscpindmainform()" type="button" value="New MainTopic"/>
<input id="btn_Resonse" type="button" value="Response" />
<input id="btn_RestoRes" type="button" value="Response to Response" />
<input id="btn_Anonymous" type="button" value="Anonymous Response" />
<input id="btn_AnonyRestoRes" type="button" value="Anonymous Response to Response"/>
<input id="btn_markunmark" type="button" value="Mark/Unmark Document as Expired"/>
<input id="btn_interest" type="button" value="Add Selected Topic to Interest Profile"/>
<div class="ms-hide">
<WebPartPages:WebPartZone runat="server" title="loc:TitleBar" id="TitleBar" AllowLayoutChange="false" AllowPersonalization="false" Style="display:none;"><ZoneTemplate>
<WebPartPages:TitleBarWebPart runat="server" HeaderTitle="SCPINDHome" Title="Web Part Page Title Bar" FrameType="None" SuppressWebPartChrome="False" Description="" IsIncluded="True" ZoneID="TitleBar" PartOrder="2" FrameState="Normal" AllowRemove="False" AllowZoneChange="True" AllowMinimize="False" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" DetailLink="" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="" IsIncludedFilter="" ExportControlledProperties="True" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_5ac95fe2_21de_4016_85ee_e22696ad6ec4" AllowClose="False" ChromeType="None" ExportMode="All" __MarkupType="vsattributemarkup" __WebPartId="{5AC95FE2-21DE-4016-85EE-E22696AD6EC4}" WebPart="true" Height="" Width=""></WebPartPages:TitleBarWebPart>
</ZoneTemplate></WebPartPages:WebPartZone>
</div>
<br>
</br>
<table class="ms-core-tableNoSpace" width="100%">
<tr>
<td id="_invisibleIfEmpty" name="_invisibleIfEmpty" colspan="3" valign="top" width="100%">
<WebPartPages:WebPartZone runat="server" Title="loc:Header" ID="Header" FrameType="TitleBarOnly"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> </td>
</tr>
<tr>
<td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" height="100%">
<WebPartPages:WebPartZone runat="server" Title="loc:LeftColumn" ID="LeftColumn" FrameType="TitleBarOnly"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> </td>
<td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" height="100%">
<WebPartPages:WebPartZone runat="server" Title="loc:MiddleColumn" ID="MiddleColumn" FrameType="TitleBarOnly"><ZoneTemplate>
<WebPartPages:DataFormWebPart runat="server" EnableOriginalValue="False" ViewFlag="8" ViewContentTypeId="" ListUrl="" ListDisplayName="" ListName="{D5F4D7E6-A2CF-4579-B5BF-33C12930C70D}" ListId="d5f4d7e6-a2cf-4579-b5bf-33c12930c70d" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="True" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" NoDefaultStyle="TRUE" InitialAsyncDataFetch="False" Title="Common View" FrameType="None" SuppressWebPartChrome="False" Description="" IsIncluded="True" PartOrder="2" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" DetailLink="" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="" IsIncludedFilter="" ExportControlledProperties="True" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_f5f8dfcc_c0f4_4055_815b_9a99a4d7b29a" ChromeType="None" ExportMode="All" __MarkupType="vsattributemarkup" __WebPartId="{F5F8DFCC-C0F4-4055-815B-9A99A4D7B29A}" __AllowXSLTEditing="true" WebPart="true" Height="" Width=""><DataSources>
<SharePoint:AggregateDataSource runat="server" IsSynchronous="" SeparateRoot="true" RootName="" RowsName="" ID="Common_x0020_View1"><Sources><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="<View><ViewFields><FieldRef Name="ContentTypeId"/><FieldRef Name="Title"/><FieldRef Name="File_x0020_Type"/><FieldRef Name="Body"/><FieldRef Name="Categories"/><FieldRef Name="Created"/><FieldRef Name="Dates"/><FieldRef Name="Author0"/><FieldRef Name="Datetime"/><FieldRef Name="dateKeyword"/><FieldRef Name="From"/><FieldRef Name="NewsLetterSubject"/><FieldRef Name="offset"/><FieldRef Name="NoteId"/><FieldRef Name="ThreadId"/><FieldRef Name="ID"/><FieldRef Name="Modified"/><FieldRef Name="Author"/><FieldRef Name="Editor"/><FieldRef Name="_HasCopyDestinations"/><FieldRef Name="_CopySource"/><FieldRef Name="_UIVersion"/><FieldRef Name="_UIVersionString"/><FieldRef Name="Attachments"/><FieldRef Name="_ModerationStatus"/><FieldRef Name="FileRef"/><FieldRef Name="FileDirRef"/><FieldRef Name="Created_x0020_Date"/><FieldRef Name="FSObjType"/><FieldRef Name="FileLeafRef"/><FieldRef Name="ItemChildCount"/><FieldRef Name="FolderChildCount"/><FieldRef Name="AppAuthor"/><FieldRef Name="AppEditor"/><FieldRef Name="PermMask"/></ViewFields></View>" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{606283B9-01B6-476A-96F8-54644E4CE514}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{606283B9-01B6-476A-96F8-54644E4CE514}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{606283B9-01B6-476A-96F8-54644E4CE514}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{606283B9-01B6-476A-96F8-54644E4CE514}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="<View></View>" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{982B92C9-90E4-48BD-8083-A728ABB8D69A}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{982B92C9-90E4-48BD-8083-A728ABB8D69A}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{982B92C9-90E4-48BD-8083-A728ABB8D69A}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{982B92C9-90E4-48BD-8083-A728ABB8D69A}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="<View></View>" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{FEFCBC52-91DA-443C-A118-CF7237133E56}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{FEFCBC52-91DA-443C-A118-CF7237133E56}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{FEFCBC52-91DA-443C-A118-CF7237133E56}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{FEFCBC52-91DA-443C-A118-CF7237133E56}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="<View></View>" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{BE369451-6AB3-4AD4-B04F-7F3749B377EF}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{BE369451-6AB3-4AD4-B04F-7F3749B377EF}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{BE369451-6AB3-4AD4-B04F-7F3749B377EF}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{BE369451-6AB3-4AD4-B04F-7F3749B377EF}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="<View></View>" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{4D689C60-7948-474C-9E86-BCF1B18A2433}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{4D689C60-7948-474C-9E86-BCF1B18A2433}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{4D689C60-7948-474C-9E86-BCF1B18A2433}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{4D689C60-7948-474C-9E86-BCF1B18A2433}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource>
</Sources><Aggregate><concat name="data source"><datasource name="New_Topic" id="0" Type="SPList"/><datasource name="Response" id="1" Type="SPList"/><datasource name="Response_to_Response" id="2" Type="SPList"/><datasource name="Anonymous_Response" id="3" Type="SPList"/><datasource name="Anonymous_Response_to_Response" id="4" Type="SPList"/></concat></Aggregate>
</SharePoint:AggregateDataSource>
</DataSources>
<Xsl>
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/>
<xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:param name="ManualRefresh"></xsl:param>
<xsl:variable name="dvt_1_automode">0</xsl:variable>
<xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
<xsl:choose>
<xsl:when test="($ManualRefresh = 'True')">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<xsl:call-template name="dvt_1"/>
</td>
<td width="1%" class="ms-vb" valign="top">
<img src="/_layouts/15/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
</td>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="dvt_1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/New_Topic/Rows/Row"/>
<xsl:variable name="dvt_RowCount" select="count($Rows)"/>
<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
<xsl:choose>
<xsl:when test="$dvt_IsEmpty">
<xsl:call-template name="dvt_1.empty"/>
</xsl:when>
<xsl:otherwise>
<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr valign="top">
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if><th class="ms-headerCellStyleIcon ms-vh-icon ms-vh-selectAllIcon" scope="col">
</th>
<th class="ms-vh" nowrap="nowrap">Date</th><th class="ms-vh" nowrap="nowrap">Topic</th></tr>
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows"/>
</xsl:call-template>
</table>
</xsl:otherwise>
</xsl:choose></xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_1.rowview" />
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview">
<xsl:variable name="paramid" select="concat('masterid=',@ID,'&ThreadId=',@ThreadId)"/>
<tr title="{$paramid}">
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<td class="ms-cellStyleNonEditable ms-vb-itmcbx ms-vb-imgFirstCell" onclick="ItemRowSelect(this);" title="{$paramid}">
<div title="{@Title}" class="s4-itm-cbx s4-itm-imgCbx" role="checkbox" aria-checked="false">
<span class="s4-itm-imgCbx-inner">
<span class="ms-selectitem-span">
<img class="ms-selectitem-icon" alt="" src="/_layouts/15/images/spcommon.png?rev=23"/>
</span></span></div>
</td>
<td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@Dates), 1033, 1)" /></td>
<td class="ms-vb">
<a title="New Topic" id="event-{@ID}" onclick="ExpColTimeTable(this)" >
<img title="collexpimg" id="event-{@ID}" src="/_layouts/15/images/collapse.png"/>
</a>
<a href="javascript:NewItem2(event,'{concat(@FileDirRef,'/scpdispform.aspx?ID=',@ID)}');">
<xsl:value-of select="concat(@Title,' ',ddwrt:FormatDate(string(@Dates), 1033, 1),'(',@Author.title,')')" />
</a>
<xsl:call-template name="dvt_2" />
<xsl:call-template name="dvt_4" />
</td>
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
</td>
</xsl:if>
</tr>
</xsl:template>
<xsl:template name="dvt_1.empty">
<xsl:variable name="dvt_ViewEmptyText"></xsl:variable>
<table border="0" width="100%">
<tr>
<td class="ms-vb">
<xsl:value-of select="$dvt_ViewEmptyText"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:variable name="dvt_2_automode">0</xsl:variable>
<xsl:template name="dvt_2">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="dvt_ParentRow" select="current()" />
<xsl:variable name="Rows" select="../../../Response/Rows/Row[@ThreadId=$dvt_ParentRow/@ThreadId]" />
<xsl:variable name="dvt_RowCount" select="count($Rows)" />
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" />
<xsl:choose>
<xsl:when test="$dvt_IsEmpty">
<xsl:call-template name="dvt_2.empty" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="responseId" select="$dvt_ParentRow/@ID" />
<table border="0" width="100%" cellpadding="2" cellspacing="0" id="event-{$responseId}">
<tr valign="top" style="display:none">
<xsl:if test="$dvt_2_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if>
<th class="ms-vh" nowrap="nowrap">Topic</th>
</tr>
<xsl:call-template name="dvt_2.body">
<xsl:with-param name="Rows" select="$Rows" />
<xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" />
</xsl:call-template>
</table>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_2.body">
<xsl:param name="Rows" />
<xsl:param name="dvt_ParentRow" />
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_2.rowview" />
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_2.rowview">
<xsl:variable name="paramid" select="concat('masterid=',@ID,'&ThreadId=',@ThreadId)"/>
<tr title="{$paramid}">
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<td class="ms-cellStyleNonEditable ms-vb-itmcbx ms-vb-imgFirstCell" onclick="ItemRowSelect(this);" title="{$paramid}">
<div title="{@Title}" class="s4-itm-cbx s4-itm-imgCbx" role="checkbox" aria-checked="false">
<span class="s4-itm-imgCbx-inner">
<span class="ms-selectitem-span">
<img class="ms-selectitem-icon" alt="" src="/_layouts/15/images/spcommon.png?rev=23"/>
</span></span></div>
</td>
<td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@Dates), 1033, 1)" /></td>
<td class="ms-vb">
<a id="event-{@ID}" onclick="ExpColTimeTable(this)" title="Response">
<img title="collexpimg" id="event-{@ID}" src="/_layouts/15/images/collapse.png"/>
</a>
<a href="javascript:NewItem2(event,'{concat(@FileDirRef,'/Responsedisp1.aspx?ID=',@ID)}');">
<xsl:value-of select="concat(@Title,' ',ddwrt:FormatDate(string(@Dates), 1033, 1),'(',@Author.title,')')" />
</a>
<xsl:call-template name="dvt_3" />
</td>
<xsl:if test="$dvt_2_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
</td>
</xsl:if>
</tr></xsl:template>
<xsl:template name="dvt_2.empty">
<xsl:variable name="dvt_ViewEmptyText"></xsl:variable>
<table border="0" width="100%" style="display:none">
<tr>
<td class="ms-vb">
<xsl:value-of select="$dvt_ViewEmptyText" />
</td>
</tr>
</table>
</xsl:template>
<xsl:variable name="dvt_3_automode">0</xsl:variable>
<xsl:template name="dvt_3">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="dvt_ParentRow" select="current()" />
<xsl:variable name="Rows" select="../../../Response_to_Response/Rows/Row[@ThreadId=$dvt_ParentRow/@ThreadId]" />
<xsl:variable name="dvt_RowCount" select="count($Rows)" />
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" />
<xsl:choose>
<xsl:when test="$dvt_IsEmpty">
<xsl:call-template name="dvt_3.empty" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="ResponsetoResponseId" select="$dvt_ParentRow/@ID" />
<table border="0" width="100%" cellpadding="2" cellspacing="0" id="event-{$ResponsetoResponseId}" >
<tr valign="top" style="display:none">
<xsl:if test="$dvt_3_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if>
<th class="ms-vh" nowrap="nowrap">Topic</th>
</tr>
<xsl:call-template name="dvt_3.body">
<xsl:with-param name="Rows" select="$Rows" />
<xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" />
</xsl:call-template>
</table>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_3.body">
<xsl:param name="Rows" />
<xsl:param name="dvt_ParentRow" />
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_3.rowview" />
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_3.rowview">
<xsl:variable name="paramid" select="concat('masterid=',@ID,'&ThreadId=',@ThreadId)"/>
<tr title="{$paramid}">
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<td class="ms-cellStyleNonEditable ms-vb-itmcbx ms-vb-imgFirstCell" onclick="ItemRowSelect(this);" title="{$paramid}">
<div title="{@Title}" class="s4-itm-cbx s4-itm-imgCbx" role="checkbox" aria-checked="false">
<span class="s4-itm-imgCbx-inner">
<span class="ms-selectitem-span">
<img class="ms-selectitem-icon" alt="" src="/_layouts/15/images/spcommon.png?rev=23"/>
</span></span></div>
</td>
<td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@Dates), 1033, 1)" />
</td>
<td class="ms-vb respClass">
<a title="Response to Response" href="javascript:NewItem2(event,'{concat(@FileDirRef,'/Response%20to%20response%20Final%20Disp.aspx?ID=',@ID)}');">
<xsl:value-of select="concat(@Title,' ',ddwrt:FormatDate(string(@Dates), 1033, 1),'(',@Author.title,')')" />
</a>
</td>
<xsl:if test="$dvt_3_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
</td>
</xsl:if>
</tr></xsl:template>
<xsl:template name="dvt_3.empty">
<xsl:variable name="dvt_ViewEmptyText"></xsl:variable>
<table border="0" width="100%" style="display:none">
<tr>
<td class="ms-vb">
<xsl:value-of select="$dvt_ViewEmptyText" />
</td>
</tr>
</table>
</xsl:template>
<xsl:variable name="dvt_4_automode">0</xsl:variable>
<xsl:template name="dvt_4">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="dvt_ParentRow" select="current()" />
<xsl:variable name="Rows" select="../../../Anonymous_Response/Rows/Row[@ThreadId=$dvt_ParentRow/@ThreadId]" />
<xsl:variable name="dvt_RowCount" select="count($Rows)" />
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" />
<xsl:choose>
<xsl:when test="$dvt_IsEmpty">
<xsl:call-template name="dvt_4.empty" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="AnonymousResponseId" select="$dvt_ParentRow/@ID" />
<table border="0" width="100%" cellpadding="2" cellspacing="0" id="event-{$AnonymousResponseId}">
<tr valign="top" style="display:none">
<xsl:if test="$dvt_4_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if>
<th class="ms-vh" nowrap="nowrap">Topic</th>
</tr>
<xsl:call-template name="dvt_4.body">
<xsl:with-param name="Rows" select="$Rows" />
<xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" />
</xsl:call-template>
</table>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_4.body">
<xsl:param name="Rows" />
<xsl:param name="dvt_ParentRow" />
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_4.rowview" />
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_4.rowview">
<xsl:variable name="paramid" select="concat('masterid=',@ID,'&ThreadId=',@ThreadId)"/>
<tr title="{$paramid}">
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<td class="ms-cellStyleNonEditable ms-vb-itmcbx ms-vb-imgFirstCell" onclick="ItemRowSelect(this);" title="{$paramid}">
<div title="{@Title}" class="s4-itm-cbx s4-itm-imgCbx" role="checkbox" aria-checked="false">
<span class="s4-itm-imgCbx-inner">
<span class="ms-selectitem-span">
<img class="ms-selectitem-icon" alt="" src="/_layouts/15/images/spcommon.png?rev=23"/>
</span></span></div>
</td>
<td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@Dates), 1033, 1)" />
</td>
<td class="ms-vb">
<a id="event-{@ID}" onclick="ExpColTimeTable(this)" title="Anonymous Response">
<img title="collexpimg" id="event-{@ID}" src="/_layouts/15/images/collapse.png"/>
</a>
<a href="javascript:NewItem2(event,'{concat(@FileDirRef,'/Anonymousdisp.aspx?ID=',@ID)}');">
<xsl:value-of select="concat(@Title,' ',ddwrt:FormatDate(string(@Dates), 1033, 1),'(',@Author.title,')')" />
</a>
<xsl:call-template name="dvt_5" />
</td>
<xsl:if test="$dvt_4_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
</td>
</xsl:if>
</tr></xsl:template>
<xsl:template name="dvt_4.empty">
<xsl:variable name="dvt_ViewEmptyText"></xsl:variable>
<table border="0" width="100%" style="display:none">
<tr>
<td class="ms-vb">
<xsl:value-of select="$dvt_ViewEmptyText" />
</td>
</tr>
</table>
</xsl:template>
<xsl:variable name="dvt_5_automode">0</xsl:variable>
<xsl:template name="dvt_5">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="dvt_ParentRow" select="current()" />
<xsl:variable name="Rows" select="../../../Anonymous_Response_to_Response/Rows/Row[@ThreadId=$dvt_ParentRow/@ThreadId]" />
<xsl:variable name="dvt_RowCount" select="count($Rows)" />
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0" />
<xsl:choose>
<xsl:when test="$dvt_IsEmpty">
<xsl:call-template name="dvt_5.empty" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="AnonyResponseId" select="$dvt_ParentRow/@ID" />
<table border="0" width="100%" cellpadding="2" id="event-{$AnonyResponseId}" cellspacing="0">
<tr valign="top" style="display:none">
<xsl:if test="$dvt_5_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if>
<th class="ms-vh" nowrap="nowrap">Topic</th>
</tr>
<xsl:call-template name="dvt_5.body">
<xsl:with-param name="Rows" select="$Rows" />
<xsl:with-param name="dvt_ParentRow" select="$dvt_ParentRow" />
</xsl:call-template>
</table>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_5.body">
<xsl:param name="Rows" />
<xsl:param name="dvt_ParentRow" />
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_5.rowview" />
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_5.rowview">
<xsl:variable name="paramid" select="concat('masterid=',@ID,'&ThreadId=',@ThreadId)"/>
<tr title="{$paramid}">
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<td class="ms-cellStyleNonEditable ms-vb-itmcbx ms-vb-imgFirstCell" onclick="ItemRowSelect(this);" title="{$paramid}">
<div title="{@Title}" class="s4-itm-cbx s4-itm-imgCbx" role="checkbox" aria-checked="false">
<span class="s4-itm-imgCbx-inner">
<span class="ms-selectitem-span">
<img class="ms-selectitem-icon" alt="" src="/_layouts/15/images/spcommon.png?rev=23"/>
</span></span></div>
</td>
<td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@Dates), 1033, 1)" />
</td>
<td class="ms-vb">
<a title="Anonymous Response to Response" href="javascript:NewItem2(event,'{concat(@FileDirRef,'/new disp.aspx?ID=',@ID)}');">
<xsl:value-of select="concat(@Title,' ',ddwrt:FormatDate(string(@Dates), 1033, 1),'(',@Author.title,')')" />
</a>
</td>
<xsl:if test="$dvt_5_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
</td>
</xsl:if>
</tr></xsl:template>
<xsl:template name="dvt_5.empty">
<xsl:variable name="dvt_ViewEmptyText"></xsl:variable>
<table border="0" width="100%" style="display:none">
<tr>
<td class="ms-vb">
<xsl:value-of select="$dvt_ViewEmptyText" />
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet> </Xsl>
<DataFields>@Title,Topic;@Body,Body;@Categories,Categories;@Created,Created;@Dates,Date;@Author0,Author;@Datetime,Datetime;@dateKeyword,dateKeyword;@From,From;@NewsLetterSubject,NewsLetterSubject;@offset,offset;@NoteId,NoteId;@ThreadId,ThreadId;@This_x0020_document_x0020_was_x0,This document was expired on;@ExpiredOn,ExpiredOn;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;@ItemChildCount,Item Child Count;@FolderChildCount,Folder Child Count;@AppAuthor,App Created By;@AppEditor,App Modified By;@ImmediateParentSubject,ImmediateParentSubject;@OriginalSubject,OriginalSubject;@ParentForm,ParentForm;@The_x0020_response_x0020_was_x00,The response was expired on;@DateTime,Datetime;@This_x0020_response_x0020_was_x0,This response was expired on;</DataFields>
<ParameterBindings>
<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
<ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/>
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
</ParameterBindings>
</WebPartPages:DataFormWebPart>
</ZoneTemplate></WebPartPages:WebPartZone> </td>
<td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" height="100%">
<WebPartPages:WebPartZone runat="server" Title="loc:RightColumn" ID="RightColumn" FrameType="TitleBarOnly"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone> </td>
</tr>
<tr>
<td id="_invisibleIfEmpty" name="_invisibleIfEmpty" colspan="3" valign="top" width="100%">
<WebPartPages:WebPartZone runat="server" Title="loc:Footer" ID="Footer" FrameType="TitleBarOnly"><ZoneTemplate>
<WebPartPages:WikiContentWebpart runat="server" Directive="<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.Sharepoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>" Title="" FrameType="None" SuppressWebPartChrome="False" Description="" IsIncluded="True" PartOrder="1" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" DetailLink="" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="" IsIncludedFilter="" ExportControlledProperties="True" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_b510a205_a47b_43ca_b4fd_ce7c4fbdc814" ChromeType="None" ExportMode="All" __MarkupType="vsattributemarkup" __WebPartId="{B510A205-A47B-43CA-B4FD-CE7C4FBDC814}" WebPart="true" Height="" Width=""><Content>
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top"><div id="WebPart" width="100%"><div id="WebPartContent">
<div style="border: 1px solid #add1ff; height: 50px; background-color: #ebeef2">
</div>
</div></div></td></tr></table>
</Content>
</WebPartPages:WikiContentWebpart>
</ZoneTemplate></WebPartPages:WebPartZone> </td>
</tr>
<SharePoint:ScriptBlock runat="server">
if(typeof(MSOLayout_MakeInvisibleIfEmpty) == "function")
{MSOLayout_MakeInvisibleIfEmpty();}</SharePoint:ScriptBlock>
</table>
</asp:Content>
Mergeview
<%@ Assembly Name="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" Inherits="Microsoft.SharePoint.WebPartPages.WikiEditPage" MasterPageFile="~masterurl/default.master" MainContentID="PlaceHolderMain" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>
<%@ Import Namespace="Microsoft.SharePoint.WebPartPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
<SharePoint:ProjectProperty Property="Title" runat="server"/> -
<SharePoint:ListItemProperty runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<meta name="CollaborationServer" content="SharePoint Team Web Site" />
<SharePoint:ScriptBlock runat="server">
var navBarHelpOverrideKey = "WSSEndUser";
</SharePoint:ScriptBlock>
<SharePoint:RssLink runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMiniConsole" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
<SharePoint:RecentChangesMenu runat="server" id="RecentChanges"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<span id="wikiPageNameDisplay" style="display: none;" runat="server">
<SharePoint:ListItemProperty runat="server"/>
</span>
<span style="display:none;" id="wikiPageNameEdit" runat="server">
<asp:TextBox id="wikiPageNameEditTextBox" runat="server"/>
</span>
<SharePoint:VersionedPlaceHolder UIVersion="4" runat="server">
<SharePoint:SPRibbonButton
id="btnWikiEdit"
RibbonCommand="Ribbon.WikiPageTab.EditAndCheckout.SaveEdit.Menu.SaveEdit.Edit"
runat="server"
Text="edit"/>
<SharePoint:SPRibbonButton
id="btnWikiSave"
RibbonCommand="Ribbon.WikiPageTab.EditAndCheckout.SaveEdit.Menu.SaveEdit.SaveAndStop"
runat="server"
Text="edit"/>
<SharePoint:SPRibbonButton
id="btnWikiRevert"
RibbonCommand="Ribbon.WikiPageTab.EditAndCheckout.SaveEdit.Menu.SaveEdit.Revert"
runat="server"
Text="Revert"/>
</SharePoint:VersionedPlaceHolder>
<SharePoint:EmbeddedFormField id="WikiField" FieldName="WikiField" ControlMode="Display" runat="server"><div class="ExternalClassF0C376524E064D5491C5F12E442D9B0C"><table id="layoutsTable" style="width:100%;"><tbody><tr style="vertical-align:top;"><td style="width:100%;"><div class="ms-rte-layoutszone-outer" style="width:100%;"><div class="ms-rte-layoutszone-inner" role="textbox" aria-haspopup="true" aria-autocomplete="both" aria-multiline="true"><p> </p><p> </p></div></div></td></tr></tbody></table><span id="layoutsData" style="display:none;">false,false,1</span></div></SharePoint:EmbeddedFormField>
<WebPartPages:WebPartZone runat="server" ID="Bottom" CssClass="ms-hide" Title="loc:Bottom"><ZoneTemplate>
<WebPartPages:DataFormWebPart runat="server" EnableOriginalValue="False" ViewFlag="8" ViewContentTypeId="" ListName="{C1B8528B-1EB0-4C54-BDC8-021DEE2A5674}" ListId="c1b8528b-1eb0-4c54-bdc8-021dee2a5674" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="True" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" NoDefaultStyle="TRUE" InitialAsyncDataFetch="False" Title="Destructed(Cases&Subcases)" FrameType="Default" SuppressWebPartChrome="False" Description="" IsIncluded="True" PartOrder="2" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" DetailLink="" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="" IsIncludedFilter="" ExportControlledProperties="True" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_68ce2287_2d86_46a2_aa69_365a8ca8656d" ExportMode="All" __MarkupType="vsattributemarkup" __WebPartId="{68CE2287-2D86-46A2-AA69-365A8CA8656D}" __AllowXSLTEditing="true" WebPart="true" Height="" Width=""><DataSources>
<SharePoint:AggregateDataSource runat="server" IsSynchronous="" SeparateRoot="" RootName="" RowsName="" ID="Destructed_x0028_Cases_x0026_Subcases_x0029_1"><Sources><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="<View></View>" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{B27B36A7-91A7-4114-860B-D91C76FA2E22}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{B27B36A7-91A7-4114-860B-D91C76FA2E22}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{B27B36A7-91A7-4114-860B-D91C76FA2E22}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{B27B36A7-91A7-4114-860B-D91C76FA2E22}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource><SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="<View></View>" UseInternalName="True" UseServerDataFormat="True"><SelectParameters>
<asp:Parameter DefaultValue="{67B6CD50-544F-42C3-94A3-37E6792AACAB}" Name="ListID"></asp:Parameter>
</SelectParameters>
<UpdateParameters>
<asp:Parameter DefaultValue="{67B6CD50-544F-42C3-94A3-37E6792AACAB}" Name="ListID"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter DefaultValue="{67B6CD50-544F-42C3-94A3-37E6792AACAB}" Name="ListID"></asp:Parameter>
</InsertParameters>
<DeleteParameters>
<asp:Parameter DefaultValue="{67B6CD50-544F-42C3-94A3-37E6792AACAB}" Name="ListID"></asp:Parameter>
</DeleteParameters>
</SharePoint:SPDataSource>
</Sources><Aggregate><concat name="data source"><datasource name="LegalCase" id="0" Type="SPList"/><datasource name="LegalSubCase" id="1" Type="SPList"/></concat></Aggregate>
</SharePoint:AggregateDataSource>
</DataSources>
<Xsl>
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:agg="http://schemas.microsoft.com/sharepoint/aggregatesource" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/>
<xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:param name="ManualRefresh"></xsl:param>
<xsl:variable name="dvt_1_automode">0</xsl:variable>
<xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:agg="http://schemas.microsoft.com/sharepoint/aggregatesource" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
<xsl:choose>
<xsl:when test="($ManualRefresh = 'True')">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<xsl:call-template name="dvt_1"/>
</td>
<td width="1%" class="ms-vb" valign="top">
<img src="/_layouts/15/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
</td>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="dvt_1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">Table</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
<xsl:variable name="dvt_RowCount" select="count($Rows)"/>
<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />
<xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/>
<xsl:choose>
<xsl:when test="$dvt_IsEmpty">
<xsl:call-template name="dvt_1.empty"/>
</xsl:when>
<xsl:otherwise>
<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr valign="top">
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<th class="ms-vh" width="1%" nowrap="nowrap"></th>
</xsl:if><th class="ms-vh" nowrap="nowrap">Case No</th><th class="ms-vh" nowrap="nowrap">Case Name</th><th class="ms-vh" nowrap="nowrap">LegalOffice</th><th class="ms-vh" nowrap="nowrap">RRC</th><th class="ms-vh" nowrap="nowrap">Responsible</th><th class="ms-vh" nowrap="nowrap">SBU</th><th class="ms-vh" nowrap="nowrap">DPEntity</th><th class="ms-vh" nowrap="nowrap">Contacts</th><th class="ms-vh" nowrap="nowrap">Legal Area</th><th class="ms-vh" nowrap="nowrap">Contract</th><th class="ms-vh" nowrap="nowrap">Litigation</th><th class="ms-vh" nowrap="nowrap">A/P</th><th class="ms-vh" nowrap="nowrap">SmartCounsel</th><th class="ms-vh" nowrap="nowrap">Rec Acc</th><th class="ms-vh" nowrap="nowrap">Entry Date</th><th class="ms-vh" nowrap="nowrap">AssignedTo</th><th class="ms-vh" nowrap="nowrap">Archiving Date</th><th class="ms-vh" nowrap="nowrap">Vital Records</th><th class="ms-vh" nowrap="nowrap">Permanent Records</th><th class="ms-vh" nowrap="nowrap">Subcase Number</th><th class="ms-vh" nowrap="nowrap">Subcase Name</th></tr>
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows"/>
</xsl:call-template>
</table>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_1.rowview" /></xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview">
<xsl:if test="string-length(@DestructedDate) > 0">
<xsl:choose>
<xsl:when test="string-length(@SubCaseNoText) > 0">
<tr>
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<td class="ms-vb"><a href="javascript:NewItem2(event,'{concat(@FileDirRef,'/legalsubdisp.aspx?ID=',@ID)}');">
<xsl:value-of select="@CaseNo" /></a></td><td class="ms-vb">
<xsl:value-of select="@CaseName" /></td><td class="ms-vb">
<xsl:value-of select="@LegalOffice" /></td><td class="ms-vb">
<xsl:value-of select="@RecordRetentionCode" /></td><td class="ms-vb">
<xsl:value-of select="@Responsible" disable-output-escaping="yes" /></td><td class="ms-vb">
<xsl:value-of select="substring-after(substring-before(substring-after(@SBU, 'ID='), '<'), '>')" disable-output-escaping="yes" /></td><td class="ms-vb">
<xsl:value-of select="substring-after(substring-before(substring-after(@DPEntity, 'ID='), '<'), '>')" disable-output-escaping="yes" /></td><td class="ms-vb">
<xsl:value-of select="@ClientContacts" /></td><td class="ms-vb">
<xsl:value-of select="substring-after(substring-before(substring-after(@LegalArea, 'ID='), '<'), '>')" disable-output-escaping="yes"/></td><td class="ms-vb">
<xsl:value-of select="@CopyOfContract" /></td><td class="ms-vb">
<xsl:value-of select="@Litigation" /></td><td class="ms-vb">
<xsl:value-of select="@LitigationActive" /></td><td class="ms-vb">
<xsl:value-of select="@SmartCounsel" /></td><td class="ms-vb">
<xsl:value-of select="format-number(@RecAccrual, '#,##0.00;-#,##0.00')" /></td><td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@EntryDate), 1033, 5)" /></td><td class="ms-vb">
<xsl:value-of select="@AssignedTo" /></td><td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@ArchivedDate), 1033, 5)" /></td><td class="ms-vb">
<xsl:value-of select="@VitalRecords" /></td><td class="ms-vb">
<xsl:value-of select="@PermanentRecords" /></td><td class="ms-vb">
<xsl:value-of select="@SubCaseNoText" /></td><td class="ms-vb">
<xsl:value-of select="@SubCaseName" /></td><!--<td class="ms-vb">
<xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')" /></td>-->
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
</td>
</xsl:if>
</tr>
</xsl:when>
<xsl:otherwise>
<tr>
<xsl:if test="position() mod 2 = 1">
<xsl:attribute name="class">ms-alternating</xsl:attribute>
</xsl:if>
<td class="ms-vb"> <a href="javascript:NewItem2(event,'{concat(@FileDirRef,'/legalcasedisp.aspx?ID=',@ID)}');">
<xsl:value-of select="@CaseNo" /></a></td><td class="ms-vb">
<xsl:value-of select="@CaseName" /></td><td class="ms-vb">
<xsl:value-of select="@LegalOffice" /></td><td class="ms-vb">
<xsl:value-of select="@RecordRetentionCode" /></td><td class="ms-vb">
<xsl:value-of select="@Responsible" disable-output-escaping="yes" /></td><td class="ms-vb">
<xsl:value-of select="substring-after(substring-before(substring-after(@SBU, 'ID='), '<'), '>')" disable-output-escaping="yes" /></td><td class="ms-vb">
<xsl:value-of select="substring-after(substring-before(substring-after(@DPEntity, 'ID='), '<'), '>')" disable-output-escaping="yes" /></td><td class="ms-vb">
<xsl:value-of select="@ClientContacts" /></td><td class="ms-vb">
<xsl:value-of select="substring-after(substring-before(substring-after(@LegalArea, 'ID='), '<'), '>')" disable-output-escaping="yes"/></td><td class="ms-vb">
<xsl:value-of select="@CopyOfContract" /></td><td class="ms-vb">
<xsl:value-of select="@Litigation" /></td><td class="ms-vb">
<xsl:value-of select="@LitigationActive" /></td><td class="ms-vb">
<xsl:value-of select="@SmartCounsel" /></td><td class="ms-vb">
<xsl:value-of select="format-number(@RecAccrual, '#,##0.00;-#,##0.00')" /></td><td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@EntryDate), 1033, 5)" /></td><td class="ms-vb">
<xsl:value-of select="@AssignedTo" /></td><td class="ms-vb">
<xsl:value-of select="ddwrt:FormatDate(string(@ArchivedDate), 1033, 5)" /></td><td class="ms-vb">
<xsl:value-of select="@VitalRecords" /></td><td class="ms-vb">
<xsl:value-of select="@PermanentRecords" /></td><td class="ms-vb">
<xsl:value-of select="@SubCaseNoText" />
</td><td class="ms-vb">
<xsl:value-of select="@SubCaseName" /></td><!--<td class="ms-vb">
<xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')" /></td>-->
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<td class="ms-vb" width="1%" nowrap="nowrap">
<span ddwrt:amkeyfield="" ddwrt:amkeyvalue="string($XPath)" ddwrt:ammode="view"></span>
</td>
</xsl:if>
</tr>
</xsl:otherwise>
</xsl:choose> </xsl:if>
</xsl:template>
<xsl:template name="dvt_1.empty">
<xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable>
<table border="0" width="100%">
<tr>
<td class="ms-vb">
<xsl:value-of select="$dvt_ViewEmptyText"/>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet> </Xsl>
<DataFields>@ID,ID;@ContentType,Content Type;@Title,Title;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;@ItemChildCount,Item Child Count;@FolderChildCount,Folder Child Count;@AppAuthor,App Created By;@AppEditor,App Modified By;@CaseName,CaseName;@CompCaseName,CompCaseName;@LegalOffice,LegalOffice;@CaseNo,CaseNo_BIND;@CaseNoFirst2Chars,CaseNo;@CaseNo6Chars,Case No;@CompCaseNo,CompCaseNo;@RecordRetentionCode,RecordRetentionCode;@Responsible,Responsible;@CompResponsible,CompResponsible;@SBU,SBU;@DPEntity,DPEntity;@ClientContacts,ClientContacts;@CompClientContacts,CompClientContacts;@Phone,Phone;@CostCenter,CostCenter;@LegalArea,LegalArea;@CopyOfContract,CopyOfContract;@Comments,Comments;@SubDescription,SubDescription;@Litigation,Litigation;@LitigationActive,LitigationActive;@AmountClaimed,AmountClaimed;@Currency,Currency;@SmartCounsel,SmartCounsel;@SmartCounselCaseNo,SmartCounselCaseNo;@YearEndReporting,YearEndReporting;@ReserveNeeded,ReserveNeeded;@RecAccrual,RecAccrual;@EntryDate,EntryDate;@TicklerDate,TicklerDate;@LastTickler,LastTickler;@AssignedTo,AssignedTo;@ArchivedDate,ArchivedDate;@DestructedDate,DestructedDate;@VitalRecords,VitalRecords;@PermanentRecords,PermanentRecords;@EnhRevision,EnhRevision;@EnhEditor,EnhEditor;@EnhDate,EnhDate;@Attachment,Attachment;@ArchivedFlag,ArchivedFlag;@SubCaseNo,SubCaseNo;@SubCaseNoText,SubCaseNoText;@SubCaseName,SubCaseName;@CompSubCaseName,CompSubCaseName;@DocID,DocID;@DocIDText,DocIDText;@CaseDocumentID,CaseDocumentID;@Test,Test;@Test_x003a_CaseName,Test:CaseName;</DataFields>
<ParameterBindings>
<ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
<ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/>
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
</ParameterBindings>
</WebPartPages:DataFormWebPart>
<WebPartPages:WikiContentWebpart runat="server" Directive="<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.Sharepoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>" Title="" FrameType="None" SuppressWebPartChrome="False" Description="" IsIncluded="True" PartOrder="3" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" DetailLink="" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="" IsIncludedFilter="" ExportControlledProperties="True" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_88105c2b_5c25_4e3b_9272_a80f87a89541" ChromeType="None" ExportMode="All" __MarkupType="vsattributemarkup" __WebPartId="{88105C2B-5C25-4E3B-9272-A80F87A89541}" WebPart="true" Height="" Width=""><Content><table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td valign="top"><div id="WebPart" width="100%"><div id="WebPartContent"><div></div></div></div></td></tr></table></Content></WebPartPages:WikiContentWebpart>
</ZoneTemplate></WebPartPages:WebPartZone>
</asp:Content>
PopUp Code
<button title="Customer" class="ms-heroCommandLink" id="btn_customer" style="cursor: pointer;">
#############################################
$('#btn_customer').click(function(){
OpenPopUpPageWithTitle(L_Menu_BaseUrl+"/SitePages/CustomerSelection.aspx?IsDlg=1", onModifyCompanyPopupCallBack,"600","400", "Customer Selection");
return false;
});
//returnvalue have the return value from customerselection page(popup page)
function onModifyCompanyPopupCallBack(result, returnValue) {
if (result == SP.UI.DialogResult.OK){
values = returnValue; //alert(returnValue);
}
if (result == SP.UI.DialogResult.CANCEL){
values = returnValue; //alert(returnValue);
}
$('input[title="DSAPCustomerName"]').attr("Value",values);
}
#################### code in customerselection.aspx page (which is the popup page) ############################
<script type="text/javascript" src="../SiteAssets/jquery1.10.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
JSRequest.EnsureSetup();
var IsDlg = JSRequest.QueryString["IsDlg"];
if (IsDlg == 1)
{
$("#s4-ribbonrow").hide();
$("#s4-ribboncont").hide();
$("#globalNavBox").hide();
}
});
function ok()
{
var ctx = SP.ClientContext.get_current();
var items=SP.ListOperation.Selection.getSelectedItems(ctx);
if (items.length == 0) {
alert('Please select the item');
return false;
}
if (items.length > 1) {
alert('Please select One item');
return false;
}
if (items.length == 1) {
var updatecolumn = items[0].id;
}
SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, updatecolumn); //updatecolumn will return value from this page to main page.
}
function cancel()
{
var updatecolumn="";
SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.CANCEL,updatecolumn)
}
</script>
<input type="button" id="btnok" value="Ok" onclick="ok()"/>
<input type="button" id="btncancel" value="Cancel" onclick="cancel()"/>
To assign value to "assigned to" multi people picker
if((targetListItem.get_item("AssignedTo")!=undefined)||(targetListItem.get_item("AssignedTo")!=null))
{
var itemArray = new Array();
var lookupObject = new Array() ;
itemArray = targetListItem.get_item("AssignedTo");
//alert(itemArray.length);
for (var i = 0; i < itemArray.length; i++)
{
lookupObject = itemArray[i];
// alert(" assigned to val :"+lookupObject.get_lookupValue());
if(temp_assignedto.length==0)
{
temp_assignedto=lookupObject.get_lookupValue()+";";
}
else
{
temp_assignedto=temp_assignedto+lookupObject.get_lookupValue()+";";
}
}
}
//alert("assign"+temp_assignedto);
$().SPFindPeoplePicker({
peoplePickerDisplayName: "Assigned to",
valueToSet:temp_assignedto,
checkNames: true
});
####################----------To assign value to single People Picker value----------####################
var temp="currentuserlogin";
$().SPFindPeoplePicker({
peoplePickerDisplayName: "Login",
valueToSet:temp,
checkNames: true
});
To bind dropdown depend on another list value
<select id="DDLSections" style="width:150px"></select>
$.ajax({
url: L_Menu_BaseUrl + "/_vti_bin/Lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
async:false,
complete: function (xData, status) {
var exeresult="";
exeresult = xData.responseText;
try {
if (status == "success" && exeresult) {
result=exeresult;
var options="<option value=0>(None)</option>";
var options1="<option value=0>(None)</option>";
var sectionArray=[];
var uniquesubsectionValues=[];
var unique;
var uniqueSubSectn;
$(result).find("z\\:row").each(function() {
var section=$(this).attr("ows_Content_Section");
var subsection=$(this).attr("ows_Content_SubSections");
sectionArray.push(section);//for storing section values in sectionArray element.
uniquesubsectionValues.push(subsection); //storing sub-section values in uniquesubsectionValues element.
unique=sectionArray.filter(function(itm,i,a){
return i==sectionArray.indexOf(itm);
});
//processing the 'java' corresponding values like section and subsection in 'ContentAuthorsGroup' List
if(typeof(section)!="undefined"){
//options=options+"<option value="+section+">"+section+"</option>";
}
to bind value to designer dropdown
var gettech=$('input[title="Technology"]').val();
<select id="ddl_Technology"></select>
####################################################
var app="<option>"+gettech+"</option>";
//alert(gettech);
$().SPServices({
operation: 'GetListItems',
async: false,
debug: true,
listName: 'technology',
CAMLRowLimit: "<RowLimit></RowLimit>",
CAMLQuery: '<Query><Where><Eq><FieldRef Name="DocType" /><Value Type="Text">'+getdocumentype+'</Value></Eq></Where></Query>',
completefunc: function(xData, Status) {
// alert(xData.responseText);
var ddlfirstval="<option value=0>(None)</option>";
var options;
$('#ddl_Technology option').remove();
$(xData.responseXML).SPFilterNode("z:row").each(function() {
gettechval= $(this).attr("ows_Tech");
options=options+ "<option value="+gettechval+">"+gettechval+"</option>";
});//XData Ends
$('#ddl_Technology').append(app+ddlfirstval+options);
}//FilterNode ends ends
});//SPServices() end
$('#ddl_Technology').change(function(){
if($(this).val()=="0")
$('input[title="Technology"]').attr('value','');
else
$('input[title="Technology"]').attr('value',$(this).val());
});
########################################################
$('#title').attr('readonly', true);
/Lists/TestRequisition/TestRequisitionNewForm.aspx
---------------------------
Message from webpage
---------------------------
http://hcchspdev01:45957/Lists/TestRequisition/TestRequisitionNewForm.aspx
---------------------------
OK
---------------------------
<td style="width: 100%; padding-top: 10px; padding-bottom: 10px" colspan="2">
<span class="lblHeaderColor">Identification :</span>
</td>
jquery code to dotoggle
---------------------------
$("#hiddenaudit").toggle();
$('#audit').click(function()
{
var img = $("#urlaudit"); //add an Id to your img tag so you can refine this selector.
if(img.attr("src") == L_Menu_BaseUrl + "/SiteAssets/upb.png")
{
img.attr("src",L_Menu_BaseUrl + "/SiteAssets/downb.png");
}
else{
img.attr("src",L_Menu_BaseUrl + "/SiteAssets/upb.png");
}
$("#hiddenaudit").toggle();
xslt code to give id's
---------------------------------------
<tr class="table table-bordered">
<td>
<a id="audit"><img id="urlaudit" src="../../SiteAssets/upb.png"/>Audit trial</a>
</td>
</tr>
<tr>
<td>
<table class="table table-bordered" id="hiddenaudit">
<tr><td><iframe id="iframeVersion" height="800px" width="800px"></iframe></td></tr>
</table>
</td>
</tr>
to hide button by user group
<script type="text/javascript">
$(document).ready(function()
{
$().SPServices({
operation: "GetGroupCollectionFromUser",
userLoginName: $().SPServices.SPGetCurrentUser(),
async: false,
completefunc: function(xData, Status)
{
if($(xData.responseXML).find("Group[Name='Admin']").length==1)
$("#btnArchive").css('display','block');
else
$("#btnArchive").css('display','none');
}
});
});
</script>
<button name="btnArchive" onclick="GetSelected()" id="btnArchive">Mark as Archive</button>
to rename view level column name
$(document).ready(function()
{
$("div[name='CaseName'] a").text('Case Name');
$("div[name='CaseNo6Chars'] a").text('Case No.');
var elements = document.getElementsByClassName("ms-gb");
var elem;
for (var i = 0; i < elements.length; i++) {
elem = elements[i];
elem.childNodes[0].childNodes[1].nodeValue = "";
elem.childNodes[1].nodeValue = elem.childNodes[1].nodeValue.replace(":","");
}
});
url popup code
<button title="Customer" class="ms-heroCommandLink" id="btn_customer" style="cursor: pointer;">
#############################################
$('#btn_customer').click(function(){
OpenPopUpPageWithTitle(L_Menu_BaseUrl+"/SitePages/CustomerSelection.aspx?IsDlg=1", onModifyCompanyPopupCallBack,"600","400", "Customer Selection");
return false;
});
//returnvalue have the return value from customerselection page(popup page)
function onModifyCompanyPopupCallBack(result, returnValue) {
if (result == SP.UI.DialogResult.OK){
values = returnValue; //alert(returnValue);
}
if (result == SP.UI.DialogResult.CANCEL){
values = returnValue; //alert(returnValue);
}
$('input[title="DSAPCustomerName"]').attr("Value",values);
}
#################### code in customerselection.aspx page (which is the popup page) ############################
<script type="text/javascript" src="../SiteAssets/jquery1.10.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
JSRequest.EnsureSetup();
var IsDlg = JSRequest.QueryString["IsDlg"];
if (IsDlg == 1)
{
$("#s4-ribbonrow").hide();
$("#s4-ribboncont").hide();
$("#globalNavBox").hide();
}
});
function ok()
{
var ctx = SP.ClientContext.get_current();
var items=SP.ListOperation.Selection.getSelectedItems(ctx);
if (items.length == 0) {
alert('Please select the item');
return false;
}
if (items.length > 1) {
alert('Please select One item');
return false;
}
if (items.length == 1) {
var updatecolumn = items[0].id;
}
SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, updatecolumn); //updatecolumn will return value from this page to main page.
}
function cancel()
{
var updatecolumn="";
SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.CANCEL,updatecolumn)
}
</script>
<input type="button" id="btnok" value="Ok" onclick="ok()"/>
<input type="button" id="btncancel" value="Cancel" onclick="cancel()"/>
No comments:
Post a Comment