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,4 +1,6 @@
// @codekit-prepend "gui.js"
// @koala-prepend "gui.js"
(function($) {
@@ -226,9 +228,9 @@ MaterioFlag = function(){
};
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');
@@ -241,7 +243,7 @@ MaterioFlag = function(){
type : 'new-history-page',
path : path,
title : json.title,
content : json.return
content : json.rendered
});
// TODO: change language links for folders
@@ -299,7 +301,7 @@ MaterioFlag = function(){
marginLeft:'-150px', width:'300px',
zIndex:"99999"
})
.append(json.return)
.append(json.rendered_form)
.find('input[type="submit"]', '#materio-flag-create-list-form').bind('click', function(event) {
event.preventDefault();
switch($(this).attr('name')){
@@ -470,7 +472,7 @@ MaterioFlag = function(){
marginLeft:'-150px', width:'300px',
zIndex:"99999"
})
.append(json.return)
.append(json.rendered_form)
.find('input[type="submit"]', '#materio-flag-edit-list-form').bind('click', function(event) {
event.preventDefault();
@@ -622,14 +624,13 @@ MaterioFlag = function(){
};
function addNextpage(json, container_class){
var $newcontent = $(json.return),
var $newcontent = $(json.rendered),
$newitems = $(container_class, $newcontent).children('article').addClass('just-added'),
$newpager = $('ul.pager', $newcontent);
$(container_class, '#content').append($newitems);
$('ul.pager', '#content').replaceWith($newpager.hide());
// TODO: animation, this should be on theme side
$(container_class, '#content').children('.just-added').each(function(i){
// $(this).delay(5000*i).removeClass('just-added');