2014-06-01 Miguel de Dios <miguel.dedios@artica.es>

* general/news_dialog.php: fixed the empty list of news in the first
	login.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10071 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-06-02 10:47:00 +00:00
parent bfef80126e
commit dba745e2fa
2 changed files with 40 additions and 32 deletions

View File

@ -1,3 +1,8 @@
2014-06-01 Miguel de Dios <miguel.dedios@artica.es>
* general/news_dialog.php: fixed the empty list of news in the first
login.
2014-06-01 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb_data.sql: fixed the insertion data of tnews, the lost

View File

@ -63,41 +63,44 @@ ui_require_javascript_file ('encode_decode_base64');
/* <![CDATA[ */
$(document).ready (function () {
var news_raw = Base64.decode($('#news_json').html());
var news = JSON.parse(news_raw);
var inew = 0;
function show_new () {
if (news[inew] != undefined) {
$('#new_text').html(news[inew].text);
$('#new_timestamp').html(news[inew].timestamp);
$('#new_author').html(news[inew].author);
$("#news_dialog").dialog({
resizable: true,
draggable: true,
modal: true,
closeOnEscape: false,
height: 450,
width: 630,
title: news[inew].subject,
overlay: {
opacity: 0.5,
background: "black"
}
});
if (typeof($('#news_json').html()) != "undefined") {
var news_raw = Base64.decode($('#news_json').html());
var news = JSON.parse(news_raw);
var inew = 0;
function show_new () {
if (news[inew] != undefined) {
$('#new_text').html(news[inew].text);
$('#new_timestamp').html(news[inew].timestamp);
$('#new_author').html(news[inew].author);
$('.ui-dialog-titlebar-close').hide();
$("#news_dialog").dialog({
resizable: true,
draggable: true,
modal: true,
closeOnEscape: false,
height: 450,
width: 630,
title: news[inew].subject,
overlay: {
opacity: 0.5,
background: "black"
}
});
$('.ui-dialog-titlebar-close').hide();
}
}
}
$("#submit-hide-login-help").click (function () {
$("#news_dialog" ).dialog('close');
inew++;
$("#submit-hide-login-help").click (function () {
$("#news_dialog" ).dialog('close');
inew++;
show_new ();
});
show_new ();
});
show_new ();
}
});
/* ]]> */