diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 3e6434782..79ac853c1 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -29,8 +29,19 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common { $this->params = $params; $this->imgpath = '../views/'.$theme.'/images/'; $this->extraheader = ''; + $this->footerjs = array(); } + /** + * Add javascript to an internal array which is output at the + * end of the page within a document.ready() function. + * + * @param string $script javascript to be added + */ + function addFooterJS($script) { /* {{{ */ + $this->footerjs[] = $script; + } /* }}} */ + function htmlStartPage($title="", $bodyClass="") { /* {{{ */ echo "\n"; echo "\n\n"; @@ -100,6 +111,18 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo ''."\n"; echo ''."\n"; echo ''."\n"; + if($this->footerjs) { + echo ""; + } echo "\n\n"; } /* }}} */ @@ -1269,6 +1292,20 @@ $(function() { echo "\n"; } /* }}} */ + function printDeleteDocumentButton($document, $msg){ /* {{{ */ + $docid = $document->getID(); +?> + +addFooterJS(" +$('#delete-btn-".$docid."').popover({ + title: '".getMLText("rm_document")."', + placement: 'left', + html: true, + content: '
".getMLText("confirm_rm_document", array ("documentname" => htmlspecialchars($document->getName())))."
'}); +"); + } /* }}} */ + /** * Output HTML Code for jumploader *