fixed sai menus, analytics link, fixed statesystem not reloading substates
This commit is contained in:
parent
37080b1956
commit
c1be68fd9c
@ -91,7 +91,7 @@ SYSTEM.prototype.handle_call_pages_page = function (html,entry,id,forced,cached)
|
|||||||
SYSTEM.prototype.handle_call_pages_entry = function (entry,id,forced,cached) {
|
SYSTEM.prototype.handle_call_pages_entry = function (entry,id,forced,cached) {
|
||||||
var url = entry['url']+(window.location.search.substr(1) ? '&'+window.location.search.substr(1) : '' );
|
var url = entry['url']+(window.location.search.substr(1) ? '&'+window.location.search.substr(1) : '' );
|
||||||
//check loaded state of div - reload only if required
|
//check loaded state of div - reload only if required
|
||||||
if(forced || this.state[entry['div']] !== url){
|
if(forced || this.state[entry['div']] !== url || !$(entry['div']).length){
|
||||||
//load page
|
//load page
|
||||||
this.call_url(url,function(data){system.handle_call_pages_page(data,entry,id,forced,cached);},{},'html',true);
|
this.call_url(url,function(data){system.handle_call_pages_page(data,entry,id,forced,cached);},{},'html',true);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -5,13 +5,14 @@ function init_saimod_sys_log() {
|
|||||||
$(this).removeClass('active');});
|
$(this).removeClass('active');});
|
||||||
$(this).parent().addClass('active');
|
$(this).parent().addClass('active');
|
||||||
});
|
});
|
||||||
if(system.cur_state() === 'log(stats)'){
|
|
||||||
$('#tabs_log li').each(function(){
|
|
||||||
$(this).removeClass('active');});
|
|
||||||
$('#menu_stats').parent().addClass('active');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function init_saimod_sys_log_log() {
|
||||||
|
$('#tabs_log li').each(function(){
|
||||||
|
$(this).removeClass('active');});
|
||||||
|
$('#menu_loglist').parent().addClass('active');
|
||||||
|
}
|
||||||
|
|
||||||
function init_saimod_sys_log_stats() {
|
function init_saimod_sys_log_stats() {
|
||||||
load_visualisation();
|
load_visualisation();
|
||||||
$('#vis_filter_time').change(function(){
|
$('#vis_filter_time').change(function(){
|
||||||
@ -23,6 +24,9 @@ function init_saimod_sys_log_stats() {
|
|||||||
$(this).tab('show');
|
$(this).tab('show');
|
||||||
load_visualisation();
|
load_visualisation();
|
||||||
});
|
});
|
||||||
|
$('#tabs_log li').each(function(){
|
||||||
|
$(this).removeClass('active');});
|
||||||
|
$('#menu_stats').parent().addClass('active');
|
||||||
}
|
}
|
||||||
function load_visualisation(){
|
function load_visualisation(){
|
||||||
$('img#loader').show();
|
$('img#loader').show();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="tabbable">
|
<div class="tabbable">
|
||||||
<ul class="nav nav-tabs" id="tabs_log">
|
<ul class="nav nav-tabs" id="tabs_log">
|
||||||
<li class="active"><a href="#!log">Log</a></li>
|
<li class="active"><a href="#!log" id="menu_loglist">Log</a></li>
|
||||||
<li><a href="#!log(stats)" id="menu_stats">Statistics</a></li>
|
<li><a href="#!log(stats)" id="menu_stats">Statistics</a></li>
|
||||||
<img id="loader" src="${PICPATH}ajax-loader.gif" style="margin-left: 10px; margin-top: 10px; display: none; float: left"/>
|
<img id="loader" src="${PICPATH}ajax-loader.gif" style="margin-left: 10px; margin-top: 10px; display: none; float: left"/>
|
||||||
<button onClick="system.load('log',true);" class="btn-success" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;">Refresh</button>
|
<button onClick="system.load('log',true);" class="btn-success" style="margin-right: 15px; height: 32px; font-size: 13px; float: right;">Refresh</button>
|
||||||
|
|||||||
@ -4,16 +4,6 @@ function init_saimod_sys_todo() {
|
|||||||
$(this).removeClass('active');});
|
$(this).removeClass('active');});
|
||||||
$(this).parent().addClass('active');
|
$(this).parent().addClass('active');
|
||||||
});
|
});
|
||||||
if(system.cur_state() === 'todo(stats)'){
|
|
||||||
$('#tabs_todo li').each(function(){
|
|
||||||
$(this).removeClass('active');});
|
|
||||||
$('#menu_stats').parent().addClass('active');
|
|
||||||
}
|
|
||||||
if(system.cur_state() === 'todo(doto)'){
|
|
||||||
$('#tabs_todo li').each(function(){
|
|
||||||
$(this).removeClass('active');});
|
|
||||||
$('#menu_doto').parent().addClass('active');
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#btn_close_all').click(function(){
|
$('#btn_close_all').click(function(){
|
||||||
if (confirm('Are you sure you want to delete all open entries in the todolist?')) {
|
if (confirm('Are you sure you want to delete all open entries in the todolist?')) {
|
||||||
@ -30,6 +20,24 @@ function init_saimod_sys_todo() {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function init_saimod_sys_todo_todo() {
|
||||||
|
$('#tabs_todo li').each(function(){
|
||||||
|
$(this).removeClass('active');});
|
||||||
|
$('#menu_todolist').parent().addClass('active');
|
||||||
|
}
|
||||||
|
|
||||||
|
function init_saimod_sys_todo_doto() {
|
||||||
|
$('#tabs_todo li').each(function(){
|
||||||
|
$(this).removeClass('active');});
|
||||||
|
$('#menu_doto').parent().addClass('active');
|
||||||
|
}
|
||||||
|
|
||||||
|
function init_saimod_sys_todo_stats() {
|
||||||
|
$('#tabs_todo li').each(function(){
|
||||||
|
$(this).removeClass('active');});
|
||||||
|
$('#menu_stats').parent().addClass('active');
|
||||||
|
}
|
||||||
|
|
||||||
function init_saimod_sys_todo_todoopen(){
|
function init_saimod_sys_todo_todoopen(){
|
||||||
$('#btn_edit').click(function(){
|
$('#btn_edit').click(function(){
|
||||||
$.ajax({ type : 'GET',
|
$.ajax({ type : 'GET',
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="tabbable">
|
<div class="tabbable">
|
||||||
<ul class="nav nav-tabs" id="tabs_todo">
|
<ul class="nav nav-tabs" id="tabs_todo">
|
||||||
<li class="active"><a href="#!todo" action="todolist">ToDo</a></li>
|
<li class="active"><a href="#!todo" id="menu_todolist">ToDo</a></li>
|
||||||
<li><a href="#!todo(doto)" id="menu_doto">DoTo</a></li>
|
<li><a href="#!todo(doto)" id="menu_doto">DoTo</a></li>
|
||||||
<li><a href="#!todo(stats)" id="menu_stats">Statistics</a></li>
|
<li><a href="#!todo(stats)" id="menu_stats">Statistics</a></li>
|
||||||
<img id="img_loader" src="${PICPATH}ajax-loader.gif" style="margin-left: 10px; margin-top: 10px; display: none; float: left"/>
|
<img id="img_loader" src="${PICPATH}ajax-loader.gif" style="margin-left: 10px; margin-top: 10px; display: none; float: left"/>
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
<b>Progress:</b> ${project}%
|
<b>Progress:</b> ${project}%
|
||||||
</div>
|
</div>
|
||||||
<div class="well" id="analytics">
|
<div class="well" id="analytics">
|
||||||
<h2 class="muted"><a href="#!log">Analytics</a></h2>
|
<h2 class="muted"><a href="#!log(stats)">Analytics</a></h2>
|
||||||
${analytics}
|
${analytics}
|
||||||
</div>
|
</div>
|
||||||
<div class="well" id="git">
|
<div class="well" id="git">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user