MTrack = {
+
+ init : function()
+ {
+
+ $(document).ready(function () {
+ window.mtrack_footer_position();
+ if (authUser) {
+ setTimeout(MTrack.keepLoggedIn, 30000);
+
+ }
+
+
+
+ });
+
+ $(document).ready(function () {
+ var path = [ 'Tree' ];
+ //if (repoName) path.push( repoName );
+ // ??/ jump?
+
+ var href = (window.location.pathname + window.location.search).substring(baseURL.length);
+ try {
+ window.history.pushState( { url: href }, document.title , window.location.pathname + window.location.search );
+ } catch (e) {}
+ MTrack.currentURL = href;
+ jQuery.ajax( {
+
+ url : window.location.pathname + window.location.search,
+ data : { ajax_body : 1 } ,
+ success : function (data) {
+ $('#ajaxbody').html(data);
+ document.body.scrollTop = 0;
+ MTrack.addHandlers($('#ajaxbody'));
+ MTrack.missingHashes($('#ajaxbody'), href)
+ }
+ });
+ });
+
+ },
+
registry : [],
/**
* usage:
sortable: false
});
+ },
+
+ keepLoggedIn: function()
+ {
+ jQuery.ajax({
+ url : baseURL + '/Login.html',
+ type: 'POST',
+ data : { refresh : 1 },
+ success : function() {
+
+ setTimeout(MTrack.keepLoggedIn, 30000);
+ // what if it's false..currentURL = false;
+
+
+ }
+
+ })
+
+
+
}
}
$('#banner select').change( function(e) {
// ajax change project, and refresh body..
jQuery.ajax({
- url : baseURL + '/Project.html',
+ url : baseURL + '/core_project.html',
data : { active_project_id : this.value },
success : function() {
// what if it's false..currentURL = false;
// any date picers.. - on milestones?
MTrack.register('.dateinput', 'datepicker', {
// minDate: 0,
- dateFormat: 'yyyy-mm-dd' // nice and compatible..
+ dateFormat: 'yy-mm-dd' // nice and compatible..
});
var last_dh = 0;
var last_wh = 0;
function mtrack_footer_position(force) {
+ return;
var ele = $('#footer');
if (!force &&
(last_dh != $(document).height() || last_wh != $(window).height)) {
.scroll(mtrack_footer_position)
.resize(mtrack_footer_position);
function mtrack_footer_set_and_wait() {
+ return;
mtrack_footer_position();
setTimeout(function () {
mtrack_footer_set_and_wait();