Topic: Something missing in ui_view.inc
Some { or } missing from the functions below and I am not sure which functions belong to which functions (if they are nested functions)?
The code starts around line 830.
function get_js_date_picker()
{
global $go_debug;
$fpath = company_path().'/js_cache/'.'date_picker.js';
if (!file_exists($fpath) || $go_debug) {
global $dateseps, $date_system, $tmonths;
$how = user_date_format(); // 0 = us/ca, 1 = eu, au, nz, 2 = jp, sw
$sep = $dateseps[user_date_sep()]; // date separator
$wstart = (($date_system == 1 || $date_system == 2 || $date_system == 3) ? 6 : ($how == 0 || $how == 3 ? 0 : 1)); // weekstart (sun = 0, mon = 1)
$months = array(_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),_("July"),_("August"),_("September"),_("October"),_("November"),_("December"));
$wdays = array(_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa"));
$wno = _("W"); // week no
$back = _("Back");
if ($date_system == 1)
list($cyear, $cmon, $cday) = gregorian_to_jalali(date("Y"), date("n"), date("j"));
else if ($date_system == 2)
list($cyear, $cmon, $cday) = gregorian_to_islamic(date("Y"), date("n"), date("j"));
$js = "
function positionInfo(object) {
var p_elm = object;
this.getElementLeft = getElementLeft;
function getElementLeft() {
var x = 0;
var elm;
if(typeof(p_elm) == 'object'){
elm = p_elm;
} else {
elm = document.getElementById(p_elm);
}
while (elm != null) {
x+= elm.offsetLeft;
elm = elm.offsetParent;
}
return parseInt(x);
}
this.getElementWidth = getElementWidth;