protected function onEditOutput() { global $CKPath; global $CKBasePath; include $CKPath; global $BaseURL; $oCKeditor = new CKEditor($CKBasePath); $oCKeditor->timestamp = time(); //$oCKeditor->config['ToolbarStartExpanded'] = true; $config['toolbar'] = 'TextFormat'; $config['height'] = '300'; $config['filebrowserUploadUrl'] = $BaseURL . "ckeditor/php/uploader.php"; $this_instance = "link-list-textarea"; $this->_editor = $oCKeditor->editor($this_instance, $this->_body, $config); $this->_linkText = $this->getLinkListText(); $this->_body .= $this->loadHtml(__DIR__ . '/views/LinkListEdit.php'); }
private function outputLocation() { global $IconPath; global $all_ctags; global $wysiwyg_desc; global $BaseURL; global $CKPath; global $CKBasePath; if ($this->_call_number) { $input_callnum_class = "call_num_box_vis"; } else { $input_callnum_class = "call_num_box"; } // do we want the checkurl image? $checkurl_icon = "<span class=\"checkurl_img_wrapper\"><img src=\"{$IconPath}/linkcheck.png\" alt=\"check url\" title=\"check url\" border=\"0\" class=\"checkurl_img\" /></span>"; // get appropriate text for format box title line $format_label_text = _("Location (Enter URL)"); // default for new record switch ($this->_format) { case 1: $format_label_text = _("Location (Enter URL)"); break; case 2: $format_label_text = _("Location (Enter Call Number)"); $checkurl_icon = ""; break; case 3: $format_label_text = _("Location (Enter Persistent Catalog URL--include http://)"); break; } echo "\n \t<div class=\"pluslet location_box\">\n <div class=\"titlebar\">\n <div class=\"titlebar_text\">" . _("Location") . "</div>\n <div class=\"titlebar_options\"></div>\n </div>\n <div class=\"pluslet_body\">\n \t<label for=\"location[]\">{$format_label_text}</label>\n \t<input type=\"hidden\" value=\"{$this->_location_id}\" name=\"location_id[]\" />\n\n <input type=\"text\" class=\"record_location check_url pure-input-2-3 required_field \" name=\"location[]\" value=\"{$this->_location}\" />\n {$checkurl_icon}\n \t<span class=\"smaller url_feedback\"></span>\n \t<div class=\"{$input_callnum_class}\"><span class=\"record_label\">" . _("Call Number") . "</span><br /><input type=\"text\" value=\"{$this->_call_number}\" name=\"call_number[]\" size=\"20\" /></div>\n \t<br class=\"clear-both\" />\n \t<div style=\"float: left; margin-right: 1em;\"><label for=\"format[]\">" . _("Format") . "</label>\n \t{$this->_formats}</div>\n \t<div style=\"float: left; margin-right: 1em;\"><label for=\"format[]\">" . _("Access Restrictions") . "</label>\n \t{$this->_restrictions}<br /></div>"; if (isset($_SESSION["eresource_mgr"]) && $_SESSION["eresource_mgr"] == "1") { echo "<div style=\"float: left;\"><br />"; // A-Z DB List $a_z_string = "<input type=\"hidden\" name=\"eres_display[]\" value=\"" . $this->_az_display . "\" />"; $az_text = _("A-Z DB List"); if ($this->_az_display == "Y") { $a_z_string .= "<span class=\"aztag-on\">{$az_text}</span>"; } else { $a_z_string .= "<span class=\"aztag-off\">{$az_text}</span>"; } echo "\n \t\t{$a_z_string}<br /></div>\n \t\t<label for=\"display_note[]\">" . _("Display Note") . "</label>"; if ($wysiwyg_desc == 1 && $this->_boxcount == 1) { include $CKPath; // Create and output object $oCKeditor = new CKEditor($CKBasePath); $oCKeditor->timestamp = time(); $config['toolbar'] = 'Basic'; // Default shows a much larger set of toolbar options $config['height'] = 75; $config['filebrowserUploadUrl'] = $BaseURL . "ckeditor/php/uploader.php"; echo $oCKeditor->editor('display_note[]', $this->_display_note, $config); echo "<br />"; } else { echo "<textarea name=\"display_note[]\" rows=\"2\" cols=\"50\">" . stripslashes($this->_display_note) . "</textarea>"; } echo "\n <label for=\"helpguide[]\">" . _("Help Guide Location") . "</label>\n <input type=\"text\" value=\"{$this->_helpguide}\" name=\"helpguide[]\" id=\"helpguide[]\" size=\"60\" />\n "; } else { echo "<br /><br /><input type=\"hidden\" name=\"eres_display[]\" value=\"{$this->_az_display}\">\n \t<input type=\"hidden\" name=\"display_note[]\" value=\"{$this->_note}\" />"; } echo "<input type=\"hidden\" name=\"ctags[]\" value=\"" . $this->_ctags . "\" />\n <label for=\"ctags[]\">ctags:</label> "; $current_ctags = explode("|", $this->_ctags); $tag_count = 0; // added because if you have a lot of ctags, it just stretches the div forever foreach ($all_ctags as $value) { if ($tag_count == 5) { echo "<br />"; $tag_count = 0; } if (in_array($value, $current_ctags)) { echo "<span class=\"ctag-on\">{$value}</span>"; } else { echo "<span class=\"ctag-off\">{$value}</span>"; } $tag_count++; } echo "<div class=\"delete_location\">" . _("X Delete this location") . "</div>\n </div></div>"; // end pluslet_body, end pluslet }