* @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ /** * Include parent class */ require_once("class.Bootstrap.php"); /** * Class which outputs the html page for KeywordChooser view * * @category DMS * @package SeedDMS * @author Markus Westphal, Malcolm Cowe, Uwe Steinmann * @copyright Copyright (C) 2002-2005 Markus Westphal, * 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli, * 2010-2012 Uwe Steinmann * @version Release: @package_version@ */ class SeedDMS_View_KeywordChooser extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ $form = $this->params['form']; header('Content-Type: application/javascript'); ?> var targetObj = document..keywords; var myTA; function insertKeywords(keywords) { if (navigator.appName == "Microsoft Internet Explorer") { myTA.value += " " + keywords; } //assuming Mozilla else { selStart = myTA.selectionStart; myTA.value = myTA.value.substring(0,myTA.selectionStart) + " " + keywords + myTA.value.substring(myTA.selectionStart,myTA.value.length); myTA.selectionStart = selStart + keywords.length+1; myTA.selectionEnd = selStart + keywords.length+1; } myTA.focus(); } function cancel() { // window.close(); return true; } function acceptKeywords() { targetObj.value = myTA.value; // window.close(); return true; } obj = new Array(); obj[0] = -1; obj[1] = -1; function showKeywords(which) { if (obj[which] != -1) obj[which].style.display = "none"; list = document.getElementById("categories" + which); id = list.options[list.selectedIndex].value; if (id == -1) return; obj[which] = document.getElementById("keywords" + id); obj[which].style.display = ""; } $('#categories0').change(function(ev) { showKeywords(0); }); $('#categories1').change(function(ev) { showKeywords(1); }); $('.insertkeyword').click(function(ev) { attr_keyword = $(ev.currentTarget).attr('keyword'); insertKeywords(attr_keyword); }); myTA = document.getElementById("keywordta"); myTA.value = targetObj.value; myTA.focus(); params['dms']; $user = $this->params['user']; $categories = $this->params['categories']; // $this->htmlStartPage(getMLText("use_default_keywords")); ?>
contentContainerStart(); ?> getOwner(); if (!$owner->isAdmin()) continue; ?> getOwner(); if ($owner->isAdmin()) continue; ?>
:
:
:
contentContainerEnd(); echo ''."\n"; // $this->htmlEndPage(); // echo "\n\n"; } /* }}} */ } ?>