无限星辰工作室-客户无限互联网动力之源

标题: DISCUZ X3.2日历选择不出现选择器解决方案之一 [打印本页]

作者: crx349    时间: 2014-9-29 13:45
标题: DISCUZ X3.2日历选择不出现选择器解决方案之一
故障描述:Discuz!x3.2升级后鼠标点击事件不弹出时间选择。
适用版本:Discuz!x3.2
解决方案:

1.打开文件static/js/calendar.js

2.在尾部添加上以下代码即可:
  1. function showcalendar(event, controlid1, addtime1, startdate1, enddate1, halfhour1, recall) {
  2.         controlid = controlid1;
  3.         addtime = addtime1;
  4.         startdate = startdate1 ? parsedate(startdate1) : false;
  5.         enddate = enddate1 ? parsedate(enddate1) : false;
  6.         currday = controlid.value ? parsedate(controlid.value) : today;
  7.         hh = currday.getHours();
  8.         ii = currday.getMinutes();
  9.         halfhour = halfhour1 ? true : false;
  10.         calendarrecall = recall ? recall : null;
  11.         var p = fetchOffset(controlid);
  12.         $('calendar').style.display = 'block';
  13.         $('calendar').style.left = p['left']+'px';
  14.         $('calendar').style.top        = (p['top'] + 20)+'px';
  15.         doane(event);
  16.         refreshcalendar(currday.getFullYear(), currday.getMonth());
  17.         if(lastcheckedyear != false) {
  18.                 $('calendar_year_' + lastcheckedyear).className = 'calendar_default';
  19.                 $('calendar_year_' + today.getFullYear()).className = 'calendar_today';
  20.         }
  21.         if(lastcheckedmonth != false) {
  22.                 $('calendar_month_' + lastcheckedmonth).className = 'calendar_default';
  23.                 $('calendar_month_' + (today.getMonth() + 1)).className = 'calendar_today';
  24.         }
  25.         $('calendar_year_' + currday.getFullYear()).className = 'calendar_checked';
  26.         $('calendar_month_' + (currday.getMonth() + 1)).className = 'calendar_checked';
  27.         $('hourminute').style.display = addtime ? '' : 'none';
  28.         lastcheckedyear = currday.getFullYear();
  29.         lastcheckedmonth = currday.getMonth() + 1;
  30.         if(halfhour) {
  31.                 $('halfhourselector').style.display = '';
  32.                 $('fullhourselector').style.display = 'none';
  33.         } else {
  34.                 $('halfhourselector').style.display = 'none';
  35.                 $('fullhourselector').style.display = '';
  36.         }
  37.         if(BROWSER.ie && BROWSER.ie < 7) {
  38.                 $('calendariframe').style.top = $('calendar').style.top;
  39.                 $('calendariframe').style.left = $('calendar').style.left;
  40.                 $('calendariframe').style.width = $('calendar').offsetWidth;
  41.                 $('calendariframe').style.height = $('calendar').offsetHeight;
  42.                 $('calendariframe').style.display = 'block';
  43.         }
  44.         initclosecalendar();
  45. }
复制代码


3.覆盖同名文件,更新缓存,完成。




欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://www.xmspace.net/) Powered by Discuz! X3.4