Commit a5905fcf authored by Jerome Mariette's avatar Jerome Mariette
Browse files

use jquery in pi1 for img links

parent c52e30ff
......@@ -480,7 +480,48 @@ class tx_nG6_pi1 extends tslib_pibase {
* @return HTML of a single database entry
*/
function pi_analyze_single_view() {
$content = '<div'.$this->pi_classParam('singleView').'><h2>Analyse '.$this->internal['currentRow']['name'].' : <span>'.$this->getFieldContent('description').'</span></h2></div>';
// add the jquery libs + the tree plugins and its css
$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] = '
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.dialog.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.draggable.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.ui.resizable.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.bgiframe.min.js"></script>
<script type="text/javascript" src="'.t3lib_extMgm::siteRelPath($this->extKey).'res/js/jquery.url.packed.js"></script>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/jquery.ui.core.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/jquery.ui.theme.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="'.t3lib_extMgm::siteRelPath($this->extKey).'res/css/jquery.ui.dialog.css"/>';
// Sets the page content
$content = '<script type="text/javascript" class="source">
$(function () {
$("#img_dialog").dialog({
autoOpen: false,
width: 850,
bgiframe: true,
resizable: false,
position: "center",
modal: true,
overlay: {
backgroundColor: "#000",
opacity: 0.5
}
});
$(".tx-nG6-pi1-imglink").click(function() {
jQuery.url.setUrl($(this).attr("href"));
$("#img_dialog").dialog("option", "title", "nG6 - '.$this->internal['currentRow']['name'].'");
$("#img_dialog").html(\'<img src="\'+jQuery.url.param("file")+\'"/>\').dialog("open");
return false;
});
});
</script> ';
$content .= '<div id="img_dialog" title=""></div>';
$content .= '<div'.$this->pi_classParam('singleView').'><h2>Analyse '.$this->internal['currentRow']['name'].' : <span>'.$this->getFieldContent('description').'</span></h2></div>';
if (file_exists($this->conf['data'].$this->internal['currentRow']['directory'].'/index.html' )) {
$fp = fopen((string)$this->conf['data'].$this->internal['currentRow']['directory'].'/index.html',"r"); //lecture du fichier
while (!feof($fp)) { //on parcourt toutes les lignes
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment