openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 0b625ca8cfaee94d5f07217b0db5474198ec5e56
parent c5056946db20c51906e3d094a67c7bbcbac57926
Author: Jan Dankert <devnull@localhost>
Date:   Fri,  1 Dec 2017 00:30:32 +0100

Komponenten "page","insert" und "part" umgestellt auf eine Klasse.

Diffstat:
themes/default/include/elements.ini.php | 12++++++------
themes/default/include/html/header/Header.class.php | 26++++++++++++++++++++++++++
themes/default/include/html/header/header-begin.inc.php | 11-----------
themes/default/include/html/insert/Insert.class.php | 35+++++++++++++++++++++++++++++++++++
themes/default/include/html/insert/insert-begin.inc.php | 36------------------------------------
themes/default/include/html/page/page-begin.inc.php | 86-------------------------------------------------------------------------------
themes/default/include/html/page/page-end.inc.php | 3---
themes/default/include/html/part/Part.class.php | 29+++++++++++++++++++++++++++++
themes/default/include/html/part/part-begin.inc.php | 15---------------
themes/default/include/html/part/part-end.inc.php | 3---
10 files changed, 96 insertions(+), 160 deletions(-)

diff --git a/themes/default/include/elements.ini.php b/themes/default/include/elements.ini.php @@ -10,25 +10,25 @@ focus = form = group = hidden = name:*,default -header = name:,views,back:false +header = editor = else = if = image = input = class:text,default:,type:text,index,name:*,prefix,value,size:,maxlength:256,onchange:,readonly:false,hint:,icon: inputarea= name,rows:10,cols:40,value,index,onchange,prefix,class:inputarea,default: -insert = file,script,inline:false,url,name,function +insert = label = for,value,key,text link = title:,config,type:,target,var,url,class:,action,subaction,id,var1,value1,var2,value2,var3,value3,var4,value4,var5,value5,accesskey,name,anchor,frame:_self,modal:false list = list:*,extract:false,key:list_key,value:list_value -logo = name:* +logo = newline = -page = class:main,title,menu -part = id,class +page = +part = password = name:*,default:,class:,size:40,maxlength:256 radio = readonly:false,name:*,value,default:false,prefix:,suffix:,class:,onchange:,children,checked raw = -row = class,classes,id +row = selectbox= list:*,name:*,default,onchange:,title:,class:,addempty:false,multiple:false,size:1,lang:false radiobox = list:*,name:*,default,onchange:,title:,class: selector = diff --git a/themes/default/include/html/header/Header.class.php b/themes/default/include/html/header/Header.class.php @@ -0,0 +1,25 @@ +<?php + +class HeaderComponent extends Component +{ + public function begin() + { + /* +<?php if(!empty($attr_views)) { ?> + <div class="headermenu"> + <?php foreach( explode(',',$attr_views) as $attr_tmp_view ) { ?> + <div class="toolbar-icon clickable"> + <a href="javascript:void(0);" data-type="dialog" data-name="<?php echo lang('MENU_'.$attr_tmp_view) ?>" data-method="<?php echo $attr_tmp_view ?>"> + <img src="<?php echo $image_dir ?>icon/<?php echo $attr_tmp_view ?>.png" title="<?php echo lang('MENU_'.$attr_tmp_view.'_DESC') ?>" /> <?php echo lang('MENU_'.$attr_tmp_view) ?> + </a> + </div> + <?php } ?> + </div> +<?php } ?> + */ + + } +} + + +?>+ \ No newline at end of file diff --git a/themes/default/include/html/header/header-begin.inc.php b/themes/default/include/html/header/header-begin.inc.php @@ -1,11 +0,0 @@ -<?php if(!empty($attr_views)) { ?> - <div class="headermenu"> - <?php foreach( explode(',',$attr_views) as $attr_tmp_view ) { ?> - <div class="toolbar-icon clickable"> - <a href="javascript:void(0);" data-type="dialog" data-name="<?php echo lang('MENU_'.$attr_tmp_view) ?>" data-method="<?php echo $attr_tmp_view ?>"> - <img src="<?php echo $image_dir ?>icon/<?php echo $attr_tmp_view ?>.png" title="<?php echo lang('MENU_'.$attr_tmp_view.'_DESC') ?>" /> <?php echo lang('MENU_'.$attr_tmp_view) ?> - </a> - </div> - <?php } ?> - </div> -<?php } ?> diff --git a/themes/default/include/html/insert/Insert.class.php b/themes/default/include/html/insert/Insert.class.php @@ -0,0 +1,34 @@ +<?php + +class InsertComponent extends Component +{ + public $name= ''; + public $url; + public $function; + + public function begin() + { + if ( !empty($this->function)) + { + // JS-Function einbinden + echo '<script type="text/javascript" name="JavaScript">'.$this->htmlvalue($this->function).'();</script>'; + } + elseif ( !empty($this->url)) + { + // IFrame + echo '<iframe'; + if ( !empty($this->name)) + echo ' name="'.$this->htmlvalue($this->name).'"'; + if ( !empty($this->url)) + echo ' src="'.$this->htmlvalue($this->url).'"'; + echo '></iframe>'; + } + } + + public function end() + { + } +} + + +?>+ \ No newline at end of file diff --git a/themes/default/include/html/insert/insert-begin.inc.php b/themes/default/include/html/insert/insert-begin.inc.php @@ -1,36 +0,0 @@ -<!-- This line will be ignored by the template compiler --><?php die() ?> - -/* #IF-ATTR file# */ -<?php include( $tpl_dir.basename($attr_file ).'.tpl.php'); ?> -/* #END-IF# */ - -/* #IF-ATTR script# */ -<?php -$attr_tmp_file = $tpl_dir.'../../js/'.basename($attr_script).'.js'; -if (!$attr_inline) -{ - ?><script src="<?php echo $attr_tmp_file ?>" type="text/javascript"></script><?php -} -else -{ - echo '<script type="text/javascript">'; - // Sehr einfaches Minifizieren des Java-Skriptes. - echo str_replace(' ',' ',str_replace('~','',strtr(implode('',file($attr_tmp_file)),"\t\n\b",'~~~'))); - echo '</script>'; -} -?> -/* #END-IF# */ - -<iframe -/* #IF-ATTR name# */ - name="<?php echo $attr_name ?>" -/* #END-IF# */ -/* #IF-ATTR url# */ - src="<?php echo $attr_url ?>" -/* #END-IF# */ -></iframe> - -/* #IF-ATTR function# */ -Hallo! -<script type="text/javascript" name="JavaScript"><?php echo $attr_function?>();</script> -/* #END-IF# */ diff --git a/themes/default/include/html/page/page-begin.inc.php b/themes/default/include/html/page/page-begin.inc.php @@ -1,86 +0,0 @@ -<?php - if (!defined('OR_VERSION')) die('Forbidden'); - if (!headers_sent()) header('Content-Type: text/html; charset=UTF-8') -?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> - <title><?php echo OR_TITLE.' '.OR_VERSION ?></title> - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" > -<?php if ( isset($refresh_url) ) { ?> - <meta http-equiv="refresh" content="<?php echo isset($refresh_timeout)?$refresh_timeout:0 ?>; URL=<?php echo $refresh_url; if (ini_get('session.use_trans_sid')) echo '&'.session_name().'='.session_id(); ?>"> -<?php } ?> - <meta name="MSSmartTagsPreventParsing" content="true" > - <meta name="robots" content="noindex,nofollow" > -<?php if (isset($windowMenu) && is_array($windowMenu)) foreach( $windowMenu as $menu ) - { - ?> - <link rel="section" href="<?php echo Html::url($actionName,@$menu['subaction'],$this->getRequestId() ) ?>" title="<?php echo lang($menu['text']) ?>" > -<?php - } -?><?php if (isset($metaList) && is_array($metaList)) foreach( $metaList as $meta ) - { - ?> - <link rel="<?php echo $meta['name'] ?>" href="<?php echo $meta['url'] ?>" title="<?php echo $meta['title'] ?>" ><?php - } ?> - <link id="userstyle" rel="stylesheet" type="text/css" href="<?php echo css_link($style) ?>" > - - <link rel="stylesheet" type="text/css" href="<?php echo OR_THEMES_EXT_DIR ?>../editor/markitup/markitup/skins/markitup/style.css" /> - <link rel="stylesheet" type="text/css" href="<?php echo OR_THEMES_EXT_DIR ?>../editor/markitup/markitup/sets/default/style.css" /> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery-1.12.4.min.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery-ui/js/jquery-ui-1.8.16.custom.min.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery.scrollTo.js" async></script> - <!-- - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery.mjs.nestedSortable.js"></script> - --> - - <!-- OpenRat internal JS --> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orHint.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orSearch.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orLinkify.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orTree.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orLoadView.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orAutoheight.js" async></script> - - <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/openrat.js" async></script> - <!-- - <script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/wymeditor/wymeditor/jquery.wymeditor.min.js"></script> - --> - <script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/editor/adapters/jquery.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/markitup/markitup/jquery.markitup.js" async></script> - <script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/editor/ckeditor.js" async></script> - <!-- - <script src="/~dankert/cms-test/cms09/themes/default/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script> - <script src="/~dankert/cms/themes/default/js/xxxxxxxxxxxjquery-plugin-orSearchBox.js"></script> - <link rel="stylesheet" type="text/css" href="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery-ui/css/pepper-grinder/jquery-ui-1.8.9.custom.css" > - --> -</head> - - - -<body> - -<script type="text/javascript"> -<!-- -// Konstanten -var OR_THEMES_EXT_DIR = '<?php echo OR_THEMES_EXT_DIR ?>'; -var OR_CONTROLLER_FILE = '<?php echo OR_CONTROLLER_FILE ?>'; -var REQ_PARAM_TOKEN = '<?php echo REQ_PARAM_TOKEN ?>'; -var REQ_PARAM_ACTION = '<?php echo REQ_PARAM_ACTION ?>'; -var REQ_PARAM_SUBACTION = '<?php echo REQ_PARAM_SUBACTION ?>'; -var REQ_PARAM_TARGETSUBACTION = '<?php echo REQ_PARAM_TARGETSUBACTION ?>'; -var REQ_PARAM_ID = '<?php echo REQ_PARAM_ID ?>'; -var REQ_PARAM_OBJECT_ID = '<?php echo REQ_PARAM_OBJECT_ID ?>'; -var REQ_PARAM_LANGUAGE_ID = '<?php echo REQ_PARAM_LANGUAGE_ID ?>'; -var REQ_PARAM_MODEL_ID = '<?php echo REQ_PARAM_MODEL_ID ?>'; -var REQ_PARAM_PROJECT_ID = '<?php echo REQ_PARAM_PROJECT_ID ?>'; -var REQ_PARAM_ELEMENT_ID = '<?php echo REQ_PARAM_ELEMENT_ID ?>'; -var REQ_PARAM_TEMPLATE_ID = '<?php echo REQ_PARAM_TEMPLATE_ID ?>'; -var REQ_PARAM_DATABASE_ID = '<?php echo REQ_PARAM_DATABASE_ID ?>'; -var REQ_PARAM_TARGET = '<?php echo REQ_PARAM_TARGET ?>'; -// --> -</script> - - -<?php global $viewCache; /* Debug-Information */ if (@$showDuration||true) { echo "<!-- Output Variables are:\n";echo str_replace('-->','-- >',print_r($viewCache,true));echo "\n-->";} ?> - diff --git a/themes/default/include/html/page/page-end.inc.php b/themes/default/include/html/page/page-end.inc.php @@ -1,2 +0,0 @@ -</body> -</html>- \ No newline at end of file diff --git a/themes/default/include/html/part/Part.class.php b/themes/default/include/html/part/Part.class.php @@ -0,0 +1,28 @@ +<?php + +class PartComponent extends Component +{ + public $class = ''; + public $id; + + public function begin() + { + echo '<div'; + + if ( !empty($this->class)) + echo ' class="'.$this->htmlvalue($this->class).'"'; + + if ( !empty($this->id)) + echo ' id="'.$this->htmlvalue($this->id).'"'; + + echo '>'; + } + + public function end() + { + echo '</div>'; + } +} + + +?>+ \ No newline at end of file diff --git a/themes/default/include/html/part/part-begin.inc.php b/themes/default/include/html/part/part-begin.inc.php @@ -1,14 +0,0 @@ -<!-- #SET-LINEBREAK-OFF# --> -<div -> <!-- Ignore this line --> - -<!-- #IF-ATTR id# --> - id="<?php echo $attr_id ?>" -<!-- #END-IF# --> - -<!-- #IF-ATTR class# --> - class="<?php echo $attr_class ?>" -<!-- #END-IF# --> - -<!-- Ignore this line --></div ->- \ No newline at end of file diff --git a/themes/default/include/html/part/part-end.inc.php b/themes/default/include/html/part/part-end.inc.php @@ -1,2 +0,0 @@ -<div><!-- Ignore this line --> -</div>- \ No newline at end of file