7 changed files with 89 additions and 92 deletions
-
10app/helpers/DateHelper.php
-
79app/helpers/TimezoneHelper.php
-
4app/widgets/AdminMain/AdminMain.php
-
64app/widgets/AdminMain/admin.js
-
2app/widgets/AdminMain/adminmain.tpl
-
5bootstrap.php
-
17config/db.example.inc.php
@ -1,42 +1,42 @@ |
|||
var tz_list; |
|||
var original = true; |
|||
|
|||
function update(elt){ |
|||
original = false; |
|||
function update(init, elt){ |
|||
original = false; |
|||
if (elt.selectedIndex == -1) |
|||
return null; |
|||
text = elt.options[elt.selectedIndex].text; |
|||
h_m = text.split("(")[1].split(")")[0].split("."); |
|||
var today = new Date(); |
|||
if(h_m[0]<0){ |
|||
h_m[0] = h_m[0].substr(1); |
|||
today.setHours(today.getHours() - parseInt(h_m[0])); |
|||
today.setMinutes(today.getMinutes() - parseInt(h_m[1])); |
|||
} |
|||
else{ |
|||
today.setHours(today.getHours() + parseInt(h_m[0])); |
|||
today.setMinutes(today.getMinutes() + parseInt(h_m[1])); |
|||
} |
|||
text = elt.options[elt.selectedIndex].text; |
|||
h_m = text.split("(")[1].split(")")[0].split("."); |
|||
var today = init; |
|||
if(h_m[0]<0){ |
|||
h_m[0] = h_m[0].substr(1); |
|||
today.setHours(today.getHours() - parseInt(h_m[0])); |
|||
today.setMinutes(today.getMinutes() - parseInt(h_m[1])); |
|||
} |
|||
else{ |
|||
today.setHours(today.getHours() + parseInt(h_m[0])); |
|||
today.setMinutes(today.getMinutes() + parseInt(h_m[1])); |
|||
} |
|||
return today; |
|||
} |
|||
movim_add_onload(function() |
|||
{ |
|||
tz_list = document.querySelector("#timezone"); |
|||
|
|||
tz_list.onchange = function(e){ |
|||
document.querySelector(".dTimezone").innerHTML = update(tz_list).toUTCString(); |
|||
} |
|||
setInterval( |
|||
function(){ |
|||
if(original){ |
|||
date = new Date(); |
|||
document.querySelector(".dTimezone").innerHTML = date.toUTCString(); |
|||
} |
|||
else{ |
|||
date = new Date(document.querySelector(".dTimezone").innerHTML); |
|||
date.setSeconds(date.getSeconds() + 1); |
|||
document.querySelector(".dTimezone").innerHTML = date.toUTCString(); |
|||
} |
|||
} |
|||
,1000); |
|||
tz_list = document.querySelector("#timezone"); |
|||
var d = new Date(document.querySelector(".dTimezone").innerHTML); |
|||
tz_list.onchange = function(e){ |
|||
//document.querySelector(".dTimezone").innerHTML = update(d, tz_list).toUTCString();
|
|||
} |
|||
/*setInterval( |
|||
function(){ |
|||
/*if(original){ |
|||
//date = new Date();
|
|||
document.querySelector(".dTimezone").innerHTML = date.toUTCString(); |
|||
} |
|||
else{/* |
|||
date = new Date(document.querySelector(".dTimezone").innerHTML); |
|||
date.setSeconds(date.getSeconds() + 1); |
|||
document.querySelector(".dTimezone").innerHTML = date.toUTCString(); |
|||
//}
|
|||
} |
|||
,1000);*/ |
|||
}); |
@ -1,17 +0,0 @@ |
|||
<?php |
|||
# This is the database configuration of Movim
|
|||
# You need to copy an rename this file to 'db.inc.php' and complete the values
|
|||
$conf = array( |
|||
# The type can be 'pgsql' or 'mysql'
|
|||
'type' => 'mysql', |
|||
# The database username
|
|||
'username' => 'username', |
|||
# The password
|
|||
'password' => 'password', |
|||
# Where can we find the database ?
|
|||
'host' => 'localhost', |
|||
# The port number, 3306 for MySQL and 5432 for PostGreSQL
|
|||
'port' => 3306, |
|||
# The database name
|
|||
'database' => 'movim' |
|||
); |
Write
Preview
Loading…
Cancel
Save
Reference in new issue