repaced .return json property bye .rendered or other, because IE doesn't like return
This commit is contained in:
parent
7230dafd5f
commit
acb87f238a
@ -1,4 +1,6 @@
|
|||||||
// @codekit-prepend "gui.js"
|
// @codekit-prepend "gui.js"
|
||||||
|
// @koala-prepend "gui.js"
|
||||||
|
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
@ -226,9 +228,9 @@ MaterioFlag = function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
function changeContent(json){
|
function changeContent(json){
|
||||||
if(json.return){
|
if(json.rendered){
|
||||||
|
|
||||||
$('.inner-content','#content').html(json.return);
|
$('.inner-content','#content').html(json.rendered);
|
||||||
|
|
||||||
$.event.trigger('loaded-content');
|
$.event.trigger('loaded-content');
|
||||||
|
|
||||||
@ -241,7 +243,7 @@ MaterioFlag = function(){
|
|||||||
type : 'new-history-page',
|
type : 'new-history-page',
|
||||||
path : path,
|
path : path,
|
||||||
title : json.title,
|
title : json.title,
|
||||||
content : json.return
|
content : json.rendered
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: change language links for folders
|
// TODO: change language links for folders
|
||||||
@ -299,7 +301,7 @@ MaterioFlag = function(){
|
|||||||
marginLeft:'-150px', width:'300px',
|
marginLeft:'-150px', width:'300px',
|
||||||
zIndex:"99999"
|
zIndex:"99999"
|
||||||
})
|
})
|
||||||
.append(json.return)
|
.append(json.rendered_form)
|
||||||
.find('input[type="submit"]', '#materio-flag-create-list-form').bind('click', function(event) {
|
.find('input[type="submit"]', '#materio-flag-create-list-form').bind('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
switch($(this).attr('name')){
|
switch($(this).attr('name')){
|
||||||
@ -470,7 +472,7 @@ MaterioFlag = function(){
|
|||||||
marginLeft:'-150px', width:'300px',
|
marginLeft:'-150px', width:'300px',
|
||||||
zIndex:"99999"
|
zIndex:"99999"
|
||||||
})
|
})
|
||||||
.append(json.return)
|
.append(json.rendered_form)
|
||||||
.find('input[type="submit"]', '#materio-flag-edit-list-form').bind('click', function(event) {
|
.find('input[type="submit"]', '#materio-flag-edit-list-form').bind('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
@ -622,14 +624,13 @@ MaterioFlag = function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
function addNextpage(json, container_class){
|
function addNextpage(json, container_class){
|
||||||
var $newcontent = $(json.return),
|
var $newcontent = $(json.rendered),
|
||||||
$newitems = $(container_class, $newcontent).children('article').addClass('just-added'),
|
$newitems = $(container_class, $newcontent).children('article').addClass('just-added'),
|
||||||
$newpager = $('ul.pager', $newcontent);
|
$newpager = $('ul.pager', $newcontent);
|
||||||
|
|
||||||
$(container_class, '#content').append($newitems);
|
$(container_class, '#content').append($newitems);
|
||||||
$('ul.pager', '#content').replaceWith($newpager.hide());
|
$('ul.pager', '#content').replaceWith($newpager.hide());
|
||||||
|
|
||||||
|
|
||||||
// TODO: animation, this should be on theme side
|
// TODO: animation, this should be on theme side
|
||||||
$(container_class, '#content').children('.just-added').each(function(i){
|
$(container_class, '#content').children('.just-added').each(function(i){
|
||||||
// $(this).delay(5000*i).removeClass('just-added');
|
// $(this).delay(5000*i).removeClass('just-added');
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
// @codekit-prepend "gui.js"
|
// @codekit-prepend "gui.js"
|
||||||
|
// @koala-prepend "gui.js"
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
// @codekit-prepend "gui.js"
|
// @codekit-prepend "gui.js"
|
||||||
// @koala-prepend "gui.js"
|
// @koala-prepend "gui.js"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
MaterioSearchApiAjax = function(){
|
MaterioSearchApiAjax = function(){
|
||||||
@ -49,7 +47,6 @@ MaterioSearchApiAjax = function(){
|
|||||||
.bind('load-scroller-pager', onLoadScrollerPager)
|
.bind('load-scroller-pager', onLoadScrollerPager)
|
||||||
.bind('view-mode-changed', onViewModeChanged)
|
.bind('view-mode-changed', onViewModeChanged)
|
||||||
.bind('history-state-change', onHistoryStateChange);
|
.bind('history-state-change', onHistoryStateChange);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function onThemeReady(event){
|
function onThemeReady(event){
|
||||||
@ -136,9 +133,9 @@ MaterioSearchApiAjax = function(){
|
|||||||
function changeContent(json){
|
function changeContent(json){
|
||||||
trace('MaterioSearchApiAjax changeContent | json', json);
|
trace('MaterioSearchApiAjax changeContent | json', json);
|
||||||
|
|
||||||
if(json.return){
|
if(json.returned){
|
||||||
$.event.trigger('loaded-content');
|
$.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();
|
triggerContentChanged();
|
||||||
}else{
|
}else{
|
||||||
//trace('no results');
|
//trace('no results');
|
||||||
@ -148,7 +145,7 @@ MaterioSearchApiAjax = function(){
|
|||||||
type : 'new-history-page',
|
type : 'new-history-page',
|
||||||
path : Drupal.settings.basePath + Drupal.settings.pathPrefix + json.path,
|
path : Drupal.settings.basePath + Drupal.settings.pathPrefix + json.path,
|
||||||
title : json.title,
|
title : json.title,
|
||||||
content : json.return
|
content : json.returned
|
||||||
});
|
});
|
||||||
|
|
||||||
for (language in Drupal.settings.materio_search_api_ajax.languages) {
|
for (language in Drupal.settings.materio_search_api_ajax.languages) {
|
||||||
@ -166,11 +163,13 @@ MaterioSearchApiAjax = function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
function onInitScrollerPager(event){
|
function onInitScrollerPager(event){
|
||||||
|
// trace("onInitScrollerPager");
|
||||||
if(isActuality() || isExplore())
|
if(isActuality() || isExplore())
|
||||||
event.pager.hide();
|
event.pager.hide();
|
||||||
};
|
};
|
||||||
|
|
||||||
function onLoadScrollerPager(event){
|
function onLoadScrollerPager(event){
|
||||||
|
// trace("onLoadScrollerPager");
|
||||||
if(!_isloadingresults){
|
if(!_isloadingresults){
|
||||||
if (isExplore())
|
if (isExplore())
|
||||||
loadNextResultsPage(event.href);
|
loadNextResultsPage(event.href);
|
||||||
@ -212,7 +211,7 @@ MaterioSearchApiAjax = function(){
|
|||||||
function addNextpage(json, container_class){
|
function addNextpage(json, container_class){
|
||||||
// trace('json',json);
|
// trace('json',json);
|
||||||
if(json){
|
if(json){
|
||||||
var $newcontent = $(json.return),
|
var $newcontent = $(json.returned),
|
||||||
$newitems = $(container_class, $newcontent).children('article'), //.addClass('just-added'),
|
$newitems = $(container_class, $newcontent).children('article'), //.addClass('just-added'),
|
||||||
$newpager = $('ul.pager', $newcontent);
|
$newpager = $('ul.pager', $newcontent);
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// @codekit-prepend "gui.js"
|
// @codekit-prepend "gui.js"
|
||||||
// @koala-prepend "gui.js"
|
// @koala-prepend "gui.js"
|
||||||
|
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
MaterioUser = function(){
|
MaterioUser = function(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user