From 3ff03dc4f0a72432b34c00da620272cf011e4ddd Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 29 Jul 2021 14:17:20 +1000 Subject: Publishing h-node.org code. - this is the h-node.org code, except - removed a js file (3x copies at three different locations) without license / copyright headers - /Js/linkToForm.js - /Public/Js/linkToForm.js - /admin/Public/Js/linkToForm.js - removed config files containing credentials - /Application/Include/params.php - /Config/Config.php - /admin/Application/Include/params.php - /admin/Config/Config.php - added license and copyright header to one php file - /admin/Library/ErrorReporting.php (almost identical to /Library/ErrorReporting.php which has the headers) --- h-source/Library/Helper/Popup.php | 46 ++++++++++++++------------------------- 1 file changed, 16 insertions(+), 30 deletions(-) (limited to 'h-source/Library/Helper/Popup.php') diff --git a/h-source/Library/Helper/Popup.php b/h-source/Library/Helper/Popup.php index f3e6058..18bb00d 100755 --- a/h-source/Library/Helper/Popup.php +++ b/h-source/Library/Helper/Popup.php @@ -2,7 +2,7 @@ // EasyGiant is a PHP framework for creating and managing dynamic content // -// Copyright (C) 2009 - 2014 Antonio Gallo (info@laboratoriolibero.com) +// Copyright (C) 2009 - 2011 Antonio Gallo // See COPYRIGHT.txt and LICENSE.txt. // // This file is part of EasyGiant @@ -25,15 +25,6 @@ if (!defined('EG')) die('Direct access not allowed!'); //class to create the popup menu class Helper_Popup extends Helper_Html { - //the HTML of the popup - public static $popupHtml = array( - "before_loop" => "", - "top" => "
\n", - "bottom" => "
", - "after_loop" => "", - ); - public $popupArray = array(); //array of popup objects (see popup.php) public $url = null; //the url (controller/action) to link by means of the popup menĂ¹ // public $fieldArg = null; //the key of the viewArgs array to set to the field in the where clause @@ -94,17 +85,9 @@ class Helper_Popup extends Helper_Html { } } - public function replacePlaceholders($string, $field, $name) - { - $string = str_replace("[[field]]",$field,$string); - $string = str_replace("[[name]]",$name,$string); - - return $string; - } - //create the HTML of the popup public function render() { - $returnString = self::$popupHtml["before_loop"]; + $returnString = null; if ($this->checkViewArgs()) { if (isset($this->viewArgs[$this->pageArg])) @@ -121,12 +104,11 @@ class Helper_Popup extends Helper_Html { $tempArg = $this->viewArgs[$field]; $this->legend[$field] = $tempArg; - $returnString .= $this->replacePlaceholders(self::$popupHtml["top"],$field,$popup->name); - + $returnString .= "\n"; $this->viewArgs[$field] = $tempArg; - - if ($this->printLegend) + } + if ($this->printLegend) + { + $returnString .= "\n"; + } + if (count($this->popupArray)>0) { + $returnString .= "\n"; } } - $returnString .= self::$popupHtml["after_loop"]; return $returnString; } -- cgit v1.2.3