Tuesday, February 17, 2015

Sunday, February 8, 2015

Using HandleBars.js in SharePoint

Recently got the chance to work on client side template.
The below images,region,terminal ,desc and url are rendering by Handlebars















   if (result == true) {
            $.ajax({
                type: "POST",
                async: false,
                contentType: "application/json; charset=utf-8",
                url: L_Menu_BaseUrl + "/_layouts/DPW.GSE.Assessment/Service/AssessmentService.aspx/LoadImageReferences",
                dataType: "json",
                data: JSON.stringify({ question: question, category: category }),

                success: function (data) {
                    data = eval(data.d);
                   // alert(data);
                    if (data.length > 0) {
                        ImageData = data;
                        if (ImageData != null && ImageData != "") {
                            var ResultAssesementImageData = new Object;
                            ResultAssesementImageData.ImageData = ImageData;
                            var source = $("#AssesementReferenceImageData-template").html();
                            var template = Handlebars.compile(source);
                            var ResultHtml = template(ResultAssesementImageData);
                          //  alert(ResultHtml);
                            $("#ppu342").html(ResultHtml);

                        }
                    }
                }
            });
















Handlebars.registerHelper("FILEURL", function (context, options) {

        if (context) {
            var queryString = window.location.href.split("/sites/")[0];
            if (context.indexOf('.jpg') > 1 || context.indexOf('.png') > 1 || context.indexOf('.JPG') > 1 || context.indexOf('.PNG') > 1) {

                return queryString + "/" + context;
            }
            else {        
                return queryString + "/" + "//_LAYOUTS//1033//IMAGES//cilayout_picker.gif";
            }
        }
    });
https://rmanimaran.wordpress.com/2014/12/12/sharepoint-2013-using-handlebars-js-in-sharepoint-part-3/

Thursday, January 22, 2015

Wednesday, January 14, 2015

Browse svc file over https

For developing mobile app for one of the existing SharePoint application.
We developed WCF services to consume the application features.
In IIS we have created applicatoin for the service with should access over HTTPS.














The url is https://apps.xxx.com/xxx.svc?wsdl








In web.config level had the below change.

   

Monday, January 12, 2015

Generate Row Serial Numbers in SQL Query

SELECT row_number() over (order by AAL.Record_ID) as "No"

Monday, January 5, 2015

Backup/Restore of SharePoint 2010 site Collection using Power Shell

The below is the good link to perform the back up(Backup-SPSite) and restore(Restore-SPSite) the site collection using POWER SHELL

http://www.c-sharpcorner.com/uploadfile/Roji.Joy/backuprestore-of-sharepoint-2010-site-collection-using-power-shell/