示例#1
0
 private function highLight()
 {
     if (Ibos::app()->request->isAjaxRequest) {
         $docids = trim(EnvUtil::getRequest("docids"), ",");
         $highLight = array();
         $highLight["endTime"] = EnvUtil::getRequest("highlightEndTime");
         $highLight["bold"] = EnvUtil::getRequest("bold");
         $highLight["color"] = EnvUtil::getRequest("color");
         $highLight["italic"] = EnvUtil::getRequest("italic");
         $highLight["underline"] = EnvUtil::getRequest("underline");
         $data = OfficialdocUtil::processHighLightRequestData($highLight);
         if (empty($data["highlightendtime"])) {
             Officialdoc::model()->updateHighlightStatus($docids, 0, "", "");
             $this->ajaxReturn(array("isSuccess" => true, "info" => Ibos::lang("Unhighlighting success")));
         } else {
             Officialdoc::model()->updateHighlightStatus($docids, 1, $data["highlightstyle"], $data["highlightendtime"]);
             $this->ajaxReturn(array("isSuccess" => true, "info" => Ibos::lang("Highlight succeed")));
         }
     }
 }