repaced .return json property bye .rendered or other, because IE doesn't like return

This commit is contained in:
Bachir Soussi Chiadmi
2013-12-05 15:32:34 +01:00
parent 7230dafd5f
commit acb87f238a
4 changed files with 15 additions and 15 deletions

View File

@@ -1,8 +1,6 @@
// @codekit-prepend "gui.js"
// @koala-prepend "gui.js"
(function($) {
MaterioSearchApiAjax = function(){
@@ -49,7 +47,6 @@ MaterioSearchApiAjax = function(){
.bind('load-scroller-pager', onLoadScrollerPager)
.bind('view-mode-changed', onViewModeChanged)
.bind('history-state-change', onHistoryStateChange);
};
function onThemeReady(event){
@@ -136,9 +133,9 @@ MaterioSearchApiAjax = function(){
function changeContent(json){
trace('MaterioSearchApiAjax changeContent | json', json);
if(json.return){
if(json.returned){
$.event.trigger('loaded-content');
$('.inner-content',_$content).html(json.return).find('ul.pager').hide();
$('.inner-content',_$content).html(json.returned).find('ul.pager').hide();
triggerContentChanged();
}else{
//trace('no results');
@@ -148,7 +145,7 @@ MaterioSearchApiAjax = function(){
type : 'new-history-page',
path : Drupal.settings.basePath + Drupal.settings.pathPrefix + json.path,
title : json.title,
content : json.return
content : json.returned
});
for (language in Drupal.settings.materio_search_api_ajax.languages) {
@@ -166,11 +163,13 @@ MaterioSearchApiAjax = function(){
};
function onInitScrollerPager(event){
// trace("onInitScrollerPager");
if(isActuality() || isExplore())
event.pager.hide();
};
function onLoadScrollerPager(event){
// trace("onLoadScrollerPager");
if(!_isloadingresults){
if (isExplore())
loadNextResultsPage(event.href);
@@ -212,7 +211,7 @@ MaterioSearchApiAjax = function(){
function addNextpage(json, container_class){
// trace('json',json);
if(json){
var $newcontent = $(json.return),
var $newcontent = $(json.returned),
$newitems = $(container_class, $newcontent).children('article'), //.addClass('just-added'),
$newpager = $('ul.pager', $newcontent);