Sharepoint咨询只获得100个对象

时间:2016-06-21 21:36:04

标签: javascript c# arrays json sharepoint-2013

我有JSON,我需要取回100多个或更多项目,但json只捕获了100个对象:

代码:

function GalleryContentPopulate(url, listname, target) {

var eng = false;
var queryGallery = "$select=Title,Description,Enlace,EncodedAbsUrl,Categoria/Title&$expand=Categoria/Title";

if ((window.location.href.indexOf("lang=en") > 0)) {
    queryGallery = "$select=TitleEnglish,DescriptionEnglish,Enlace,EncodedAbsUrl,Categoria/English&$expand=Categoria/English";
    eng = true;
}


// Getting our list items
$.ajax({
    url: url + "/_api/web/lists/getbytitle('" + listname + "')/items?" + queryGallery,
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
        completeGalleryContent(data, target, eng);
    },
    error: function (data) {
        failureGalleryContent(data, target);
    }
});
}
function completeGalleryContent(data, target, eng) {
var items = data.d.results;
console.log(items);
 console.log(items);
var menu = "";
var cat = "";
for (var item in items) {
if(items[item].DescriptionEnglish==null)
    items[item].DescriptionEnglish="";
if(items[item].Description==null)
    items[item].Description="";
    if(items[item].Categoria.results!= null && items[item].Categoria.results!= undefined && items[item].Categoria.results.length > 0){
        cat =setCategories(eng,items[item].Categoria.results);
    }
    if (eng){

        menu += "<div class='mega-entry " + cat + " cat-all' id='mega-entry-1' data-src='" + items[item].EncodedAbsUrl + "' data-width='' data-height='' data-lowsize=''><div class='mega-covercaption mega-square-bottom mega-landscape-right mega-portrait-bottom mega-red'><div class='mega-title'>" + items[item].TitleEnglish + "</div><p>" + items[item].DescriptionEnglish + "</p></div><div class='mega-coverbuttons'><div class='mega-link mega-red'></div><a class='fancybox' rel='group' href='" + items[item].EncodedAbsUrl + "' title='" + items[item].TitleEnglish + "'><div class='mega-view mega-red'></div></a></div></div>";
    }else{
        menu += "<div class='mega-entry "+ cat + " cat-all' id='mega-entry-1' data-src='" + items[item].EncodedAbsUrl + "' data-width='' data-height='' data-lowsize=''><div class='mega-covercaption mega-square-bottom mega-landscape-right mega-portrait-bottom mega-red'><div class='mega-title'>" + items[item].Title + "</div><p>" + items[item].Description + "</p></div><div class='mega-coverbuttons'><div class='mega-link mega-red'></div><a class='fancybox' rel='group' href='" + items[item].EncodedAbsUrl + "' title='"+ items[item].Title +"'><div class='mega-view mega-red'></div></a></div></div>";
    }
   }
  $(target).html(menu);
  var api = $(target).megafoliopro(
                {
                    filterChangeAnimation: "pagebottom",            // fade, rotate, scale, rotatescale, pagetop, pagebottom,pagemiddle
                    filterChangeSpeed: 400,                 // Speed of Transition
                    filterChangeRotate: 99,                 // If you ue scalerotate or rotate you can set the rotation (99 = random !!)
                    filterChangeScale: 0.6,                 // Scale Animation Endparameter
                    delay: 20,
                    defaultWidth: 980,
                    paddingHorizontal: 10,
                    paddingVertical: 10,
                    layoutarray: [9, 11, 5, 3, 7, 12, 4, 6, 13]     // Defines the Layout Types which can be used in the Gallery. 2-9 or "random". You can define more than one, like {5,2,6,4} where the first items will be orderd in layout 5, the next comming items in layout 2, the next comming items in layout 6 etc... You can use also simple {9} then all item ordered in Layout 9 type.
                });

        //console.log("entra");
        // FANCY BOX ( LIVE BOX) WITH MEDIA SUPPORT
        jQuery(".fancybox").fancybox();
        //console.log("sale");

        // THE FILTER FUNCTION
        $('.filter').click(function () {
            $('.filter').each(function () { jQuery(this).removeClass("selected") });
            api.megafilter(jQuery(this).data('category'));
            $(this).addClass("selected");
        });
  var categorySelected = getParameterByName("Category");
  $("div[data-category='"+categorySelected +"']").click();

所以这些只返回100个对象,对象数量有一些限制吗?

有一张console.log(项目)的控制台谷歌浏览器检查员的照片; 100arrays

0 个答案:

没有答案