commit e2ed89ae95f35f93fe4ac7b12f2d6e9d043bf51a
parent a806ab58720e66816cc5ce7a4bdc9ce424d84fc3
Author: Jan Dankert <devnull@localhost>
Date: Tue, 18 Sep 2012 00:41:28 +0200
Neue interne JQuery-Plugins: orSearch(options) und orHint()
Diffstat:
9 files changed, 150 insertions(+), 121 deletions(-)
diff --git a/themes/default/css/user/default.css b/themes/default/css/user/default.css
@@ -62,6 +62,31 @@ label div.description
}
+div.inputholder
+{
+ background-color:white;
+ border:1px solid grey;
+ margin:0px;
+ padding:4px;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ -khtml-border-radius:5px;
+ border-radius:5px;
+}
+
+
+input
+{
+ border:0px;
+ border-bottom:1px solid silver;
+ padding:2px;
+ margin:0px;
+}
+input.error,
+.error
+{
+ border-bottom:1px dotted red !important;
+}
/* Zwischen-Ueberschriften */
@@ -185,11 +210,6 @@ dl.notice > dd
border-bottom: 1px silver solid;
}
-input.error,
-.error
-{
- border:2px dotted red !important;
-}
/* R a h m e n */
div.windowx
diff --git a/themes/default/include/elements.ini.php b/themes/default/include/elements.ini.php
@@ -22,11 +22,11 @@ editor = name:*,type:*
else =
if = equals,value,not,empty,present,contains,greaterthan,lessthan,true,false
image = config,file,url,icon,align:left,type,elementtype,fileext,tree,notice,size,title
-input = class:text,default:,type:text,index,name:*,prefix,value,size:,maxlength:256,onchange:,readonly:false
+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
label = for,value,key
-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
+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:*
newline =
diff --git a/themes/default/include/html/input.inc.php b/themes/default/include/html/input.inc.php
@@ -6,7 +6,7 @@
?><?php if (!$attr_readonly || $attr_type=='hidden') {
/* Feld editieren */
-?><input<?php if ($attr_readonly) echo ' disabled="true"' ?> id="id_<?php echo $attr_name ?><?php if ($attr_readonly) echo '_disabled' ?>" name="<?php echo $attr_name ?><?php if ($attr_readonly) echo '_disabled' ?>" type="<?php echo $attr_type ?>" maxlength="<?php echo $attr_maxlength ?>" class="<?php echo str_replace(',',' ',$attr_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($attr_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php
+?><div class="inputholder"><input<?php if ($attr_readonly) echo ' disabled="true"' ?><?php if ($attr_hint) echo ' data-hint="'.$attr_hint.'"'; ?> id="id_<?php echo $attr_name ?><?php if ($attr_readonly) echo '_disabled' ?>" name="<?php echo $attr_name ?><?php if ($attr_readonly) echo '_disabled' ?>" type="<?php echo $attr_type ?>" maxlength="<?php echo $attr_maxlength ?>" class="<?php echo str_replace(',',' ',$attr_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($attr_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php if ($attr_icon) echo '<img class="icon" src="'.$image_dir.'icon_'.$attr_icon.IMG_ICON_EXT.'" width="16" height="16" />'; ?></div><?php
if ($attr_readonly) {
/* Nur anzeigen */
?><input type="hidden" id="id_<?php echo $attr_name ?>" name="<?php echo $attr_name ?>" value="<?php echo $tmp_value ?>" /><?php
diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js
@@ -342,35 +342,13 @@ function registerHeaderEvents()
$('div.search input').blur( function(){
$('div.search input div.dropdown').fadeOut();
});
-
-
- $('div.search input').keyup( function(){
- var val = $(this).val();
- if ( val.length > 3 )
- {
- $('div.search div.dropdown').html('');
- $.ajax( { 'type':'GET',url:'./dispatcher.php?action=search&subaction=quicksearch&search='+val, data:null, success:function(data, textStatus, jqXHR)
- {
- for( id in data.result )
- {
- var result = data.result[id];
-
- //$('div.search input div.dropdown').append('Hallo '+result);
- // Suchergebnis-Zeile in das Ergebnis schreiben.
- $('div.search div.dropdown').append('<div title="'+result.desc+'"><a href="javascript:loadViewByName(\'content\',\''+result.url+'\');"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+result.type+'.png" />'+result.name+'</a></div>');
- }
- } } );
- $('div.search div.dropdown').fadeIn();
-
-
- }
- else
- {
- $('div.search input div.dropdown').fadeOut();
- }
- });
+ // Hints...
+ $('div.search input').orHint();
+
+ $('div.search input').orSearch( { dropdown:'div.search div.dropdown' } );
+
// V e r l a u f
$('div#header div.history').hover( function(){
$('div#header div.history div.dropdown').html('');
diff --git a/themes/default/js/plugin/jquery-plugin-orHint.js b/themes/default/js/plugin/jquery-plugin-orHint.js
@@ -0,0 +1,21 @@
+/**
+ * Input-Hints
+ */
+jQuery.fn.orHint = function()
+{
+
+ $(this).each(function(i)
+ {
+ $(this).val($(this).attr('data-hint')).addClass('hint');
+ });
+
+ return $(this).focus(function()
+ {
+ if ($(this).val() == $(this).attr('data-hint'))
+ $(this).val('').removeClass('hint');
+ }).blur(function()
+ {
+ if ($(this).val() == '')
+ $(this).val($(this).attr('data-hint')).addClass('hint');
+ });
+};
+\ No newline at end of file
diff --git a/themes/default/js/plugin/jquery-plugin-orSearch.js b/themes/default/js/plugin/jquery-plugin-orSearch.js
@@ -0,0 +1,37 @@
+/**
+ * Suche mit Dropdown
+ */
+jQuery.fn.orSearch = function( options )
+{
+ // Create some defaults, extending them with any options that were provided
+ var settings = $.extend( {
+ 'dropdown': 'unknown'
+ }, options);
+
+
+ return $(this).keyup( function()
+ {
+ var val = $(this).val();
+ if ( val.length > 3 )
+ {
+ $(settings.dropdown).html('');
+ $.ajax( { 'type':'GET',url:'./dispatcher.php?action=search&subaction=quicksearch&search='+val, data:null, success:function(data, textStatus, jqXHR)
+ {
+ for( id in data.result )
+ {
+ var result = data.result[id];
+
+ // Suchergebnis-Zeile in das Ergebnis schreiben.
+ $(settings.dropdown).append('<div title="'+result.desc+'"><a href="javascript:openNewAction(\''+result.name+'\',\''+result.type+'\','+id+',0);"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+result.type+'.png" />'+result.name+'</a></div>');
+ }
+ } } );
+ $(settings.dropdown).fadeIn();
+
+
+ }
+ else
+ {
+ $(settings.dropdown).fadeOut();
+ }
+ });
+};
+\ No newline at end of file
diff --git a/themes/default/layout/index.php b/themes/default/layout/index.php
@@ -33,7 +33,11 @@
<script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery.simplemodal.1.4.2.min.js"></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/openrat.js"></script>
+ <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orHint.js"></script>
+ <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orSearch.js"></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/markitup/markitup/jquery.markitup.js"></script>
<script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/editor/ckeditor.js"></script>
diff --git a/themes/default/pages/html/title/show.tpl.php b/themes/default/pages/html/title/show.tpl.php
@@ -34,69 +34,24 @@
$tmp_text = nl2br($tmp_text);
echo $tmp_text;
unset($tmp_text);
-?></<?php echo $tmp_tag ?>><?php unset($a3_title,$a3_class,$a3_var,$a3_escape,$a3_cut) ?></div><?php $a2_class='search'; ?><div class="<?php echo $a2_class ?>"><?php unset($a2_class) ?><?php $a3_name='';$a3_target='_self';$a3_method='post';$a3_enctype='application/x-www-form-urlencoded';$a3_type=''; ?><?php
- $a3_action = $actionName;
- $a3_subaction = $targetSubActionName;
- $a3_id = $this->getRequestId();
- if ($this->isEditable())
- {
- if ($this->isEditMode())
- {
- $a3_method = 'POST';
- }
- else
- {
- $a3_method = 'GET';
- $a3_subaction = $subActionName;
- }
- }
- switch( $a3_type )
- {
- case 'upload':
- $a3_tmp_submitFunction = '';
- break;
- default:
- $a3_tmp_submitFunction = 'formSubmit( $(this) ); return false;';
- }
-?><form name="<?php echo $a3_name ?>"
- target="<?php echo $a3_target ?>"
- action="<?php echo Html::url( $a3_action,$a3_subaction,$a3_id ) ?>"
- method="<?php echo $a3_method ?>"
- enctype="<?php echo $a3_enctype ?>" style="margin:0px;padding:0px;"
- class="<?php echo $a3_action ?>"
- onSubmit="<?php echo $a3_tmp_submitFunction ?>"><input type="submit" class="invisible" />
-<?php if ($this->isEditable() && !$this->isEditMode()) { ?>
-<input type="hidden" name="mode" value="edit" />
-<?php } ?>
-<input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" />
-<input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo $this->actionName ?>" />
-<input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo $this->subActionName ?>" />
-<input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo $this->getRequestId() ?>" /><?php
- if ( $conf['interface']['url_sessionid'] )
- echo '<input type="hidden" name="'.session_name().'" value="'.session_id().'" />'."\n";
-?><?php unset($a3_name,$a3_target,$a3_method,$a3_enctype,$a3_type) ?><?php $a4_icon='search';$a4_align='left'; ?><?php
- $a4_tmp_image_file = $image_dir.'icon_'.$a4_icon.IMG_ICON_EXT;
- $a4_size = '16x16';
- $a4_tmp_title = basename($a4_tmp_image_file);
-?><img alt="<?php echo $a4_tmp_title; if (isset($a4_size)) { echo ' ('; list($a4_tmp_width,$a4_tmp_height)=explode('x',$a4_size);echo $a4_tmp_width.'x'.$a4_tmp_height; echo')';} ?>" src="<?php echo $a4_tmp_image_file ?>" border="0"<?php if(isset($a4_align)) echo ' align="'.$a4_align.'"' ?><?php if (isset($a4_size)) { list($a4_tmp_width,$a4_tmp_height)=explode('x',$a4_size);echo ' width="'.$a4_tmp_width.'" height="'.$a4_tmp_height.'"';} ?> /><?php unset($a4_icon,$a4_align) ?><?php $a4_class='text';$a4_default='';$a4_type='text';$a4_name='text';$a4_value=lang('search');$a4_size='';$a4_maxlength='256';$a4_onchange='';$a4_readonly=false; ?><?php if ($this->isEditable() && !$this->isEditMode()) $a4_readonly=true;
- if ($a4_readonly && empty($$a4_name)) $$a4_name = '- '.lang('EMPTY').' -';
- if(!isset($a4_default)) $a4_default='';
- $tmp_value = Text::encodeHtml(isset($$a4_name)?$$a4_name:$a4_default);
-?><?php if (!$a4_readonly || $a4_type=='hidden') {
-?><input<?php if ($a4_readonly) echo ' disabled="true"' ?> id="id_<?php echo $a4_name ?><?php if ($a4_readonly) echo '_disabled' ?>" name="<?php echo $a4_name ?><?php if ($a4_readonly) echo '_disabled' ?>" type="<?php echo $a4_type ?>" maxlength="<?php echo $a4_maxlength ?>" class="<?php echo str_replace(',',' ',$a4_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($a4_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php
-if ($a4_readonly) {
-?><input type="hidden" id="id_<?php echo $a4_name ?>" name="<?php echo $a4_name ?>" value="<?php echo $tmp_value ?>" /><?php
- } } else { ?><a title="<?php echo langHtml('EDIT') ?>" href="<?php echo Html::url($actionName,$subactionName,0,array('mode'=>'edit')) ?>"><span class="<?php echo $a4_class ?>"><?php echo $tmp_value ?></span></a><?php } ?><?php unset($a4_class,$a4_default,$a4_type,$a4_name,$a4_value,$a4_size,$a4_maxlength,$a4_onchange,$a4_readonly) ?><?php $a4_class='dropdown'; ?><div class="<?php echo $a4_class ?>"><?php unset($a4_class) ?><?php $a5_class='text';$a5_raw='';$a5_escape=true;$a5_cut='both'; ?><?php
- $a5_title = '';
+?></<?php echo $tmp_tag ?>><?php unset($a3_title,$a3_class,$a3_var,$a3_escape,$a3_cut) ?></div><?php $a2_class='search'; ?><div class="<?php echo $a2_class ?>"><?php unset($a2_class) ?><?php $a3_class='text';$a3_default='';$a3_type='text';$a3_name='text';$a3_size='';$a3_maxlength='256';$a3_onchange='';$a3_readonly=false;$a3_hint=lang('search');$a3_icon='search'; ?><?php if ($this->isEditable() && !$this->isEditMode()) $a3_readonly=true;
+ if ($a3_readonly && empty($$a3_name)) $$a3_name = '- '.lang('EMPTY').' -';
+ if(!isset($a3_default)) $a3_default='';
+ $tmp_value = Text::encodeHtml(isset($$a3_name)?$$a3_name:$a3_default);
+?><?php if (!$a3_readonly || $a3_type=='hidden') {
+?><div class="inputholder"><input<?php if ($a3_readonly) echo ' disabled="true"' ?><?php if ($a3_hint) echo ' data-hint="'.$a3_hint.'"'; ?> id="id_<?php echo $a3_name ?><?php if ($a3_readonly) echo '_disabled' ?>" name="<?php echo $a3_name ?><?php if ($a3_readonly) echo '_disabled' ?>" type="<?php echo $a3_type ?>" maxlength="<?php echo $a3_maxlength ?>" class="<?php echo str_replace(',',' ',$a3_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($a3_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php if ($a3_icon) echo '<img class="icon" src="'.$image_dir.'icon_'.$a3_icon.IMG_ICON_EXT.'" width="16" height="16" />'; ?></div><?php
+if ($a3_readonly) {
+?><input type="hidden" id="id_<?php echo $a3_name ?>" name="<?php echo $a3_name ?>" value="<?php echo $tmp_value ?>" /><?php
+ } } else { ?><a title="<?php echo langHtml('EDIT') ?>" href="<?php echo Html::url($actionName,$subactionName,0,array('mode'=>'edit')) ?>"><span class="<?php echo $a3_class ?>"><?php echo $tmp_value ?></span></a><?php } ?><?php unset($a3_class,$a3_default,$a3_type,$a3_name,$a3_size,$a3_maxlength,$a3_onchange,$a3_readonly,$a3_hint,$a3_icon) ?><?php $a3_class='dropdown'; ?><div class="<?php echo $a3_class ?>"><?php unset($a3_class) ?><?php $a4_class='text';$a4_raw='';$a4_escape=true;$a4_cut='both'; ?><?php
+ $a4_title = '';
$tmp_tag = 'span';
-?><<?php echo $tmp_tag ?> class="<?php echo $a5_class ?>" title="<?php echo $a5_title ?>"><?php
- $langF = $a5_escape?'langHtml':'lang';
- $tmp_text = str_replace('_',' ',$a5_raw);
+?><<?php echo $tmp_tag ?> class="<?php echo $a4_class ?>" title="<?php echo $a4_title ?>"><?php
+ $langF = $a4_escape?'langHtml':'lang';
+ $tmp_text = str_replace('_',' ',$a4_raw);
$tmp_text = nl2br($tmp_text);
echo $tmp_text;
unset($tmp_text);
-?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_raw,$a5_escape,$a5_cut) ?></div></form>
-</div><?php $a2_class='user'; ?><div class="<?php echo $a2_class ?>"><?php unset($a2_class) ?><?php $a3_icon='user';$a3_align='left'; ?><?php
+?></<?php echo $tmp_tag ?>><?php unset($a4_class,$a4_raw,$a4_escape,$a4_cut) ?></div></div><?php $a2_class='user'; ?><div class="<?php echo $a2_class ?>"><?php unset($a2_class) ?><?php $a3_icon='user';$a3_align='left'; ?><?php
$a3_tmp_image_file = $image_dir.'icon_'.$a3_icon.IMG_ICON_EXT;
$a3_size = '16x16';
$a3_tmp_title = basename($a3_tmp_image_file);
@@ -110,7 +65,7 @@ if ($a4_readonly) {
$tmp_text = nl2br($tmp_text);
echo $tmp_text;
unset($tmp_text);
-?></<?php echo $tmp_tag ?>><?php unset($a3_class,$a3_var,$a3_maxlength,$a3_escape,$a3_cut) ?><?php $a3_class='dropdown'; ?><div class="<?php echo $a3_class ?>"><?php unset($a3_class) ?><?php $a4_title=lang('USER_PROFILE_DESC');$a4_type='post';$a4_class='';$a4_action='start';$a4_subaction='profile';$a4_frame='_self'; ?><?php
+?></<?php echo $tmp_tag ?>><?php unset($a3_class,$a3_var,$a3_maxlength,$a3_escape,$a3_cut) ?><?php $a3_class='dropdown'; ?><div class="<?php echo $a3_class ?>"><?php unset($a3_class) ?><?php $a4_title=lang('USER_PROFILE_DESC');$a4_type='post';$a4_class='';$a4_action='start';$a4_subaction='profile';$a4_frame='_self';$a4_modal=false; ?><?php
$params = array();
$tmp_url = '';
$a4_target = $view;
@@ -126,7 +81,10 @@ if ($a4_readonly) {
case 'view':
$tmp_function_call = "startView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');";
break;
- case 'url':
+ case 'modal':
+ $tmp_function_call = "modalView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');";
+ break;
+ case 'url':
$tmp_function_call = "submitUrl(this,'".($a4_url)."');";
break;
case 'external':
@@ -136,9 +94,9 @@ if ($a4_readonly) {
$tmp_function_call = "window.open('".$a4_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');";
break;
default:
- $tmp_function_call = "alert('TODO');";
+ $tmp_function_call = "alert('Link-attribute type required');";
}
-?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame) ?><?php $a5_icon='user';$a5_align='left'; ?><?php
+?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame,$a4_modal) ?><?php $a5_icon='user';$a5_align='left'; ?><?php
$a5_tmp_image_file = $image_dir.'icon_'.$a5_icon.IMG_ICON_EXT;
$a5_size = '16x16';
$a5_tmp_title = basename($a5_tmp_image_file);
@@ -151,7 +109,7 @@ if ($a4_readonly) {
$tmp_text = nl2br($tmp_text);
echo $tmp_text;
unset($tmp_text);
-?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_key,$a5_escape,$a5_cut) ?></a><?php $a4_title=lang('start');$a4_type='post';$a4_class='';$a4_action='start';$a4_subaction='start';$a4_frame='_self'; ?><?php
+?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_key,$a5_escape,$a5_cut) ?></a><?php $a4_title=lang('start');$a4_type='post';$a4_class='';$a4_action='start';$a4_subaction='start';$a4_frame='_self';$a4_modal=false; ?><?php
$params = array();
$tmp_url = '';
$a4_target = $view;
@@ -167,7 +125,10 @@ if ($a4_readonly) {
case 'view':
$tmp_function_call = "startView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');";
break;
- case 'url':
+ case 'modal':
+ $tmp_function_call = "modalView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');";
+ break;
+ case 'url':
$tmp_function_call = "submitUrl(this,'".($a4_url)."');";
break;
case 'external':
@@ -177,9 +138,9 @@ if ($a4_readonly) {
$tmp_function_call = "window.open('".$a4_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');";
break;
default:
- $tmp_function_call = "alert('TODO');";
+ $tmp_function_call = "alert('Link-attribute type required');";
}
-?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame) ?><?php $a5_icon='start';$a5_align='left'; ?><?php
+?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame,$a4_modal) ?><?php $a5_icon='start';$a5_align='left'; ?><?php
$a5_tmp_image_file = $image_dir.'icon_'.$a5_icon.IMG_ICON_EXT;
$a5_size = '16x16';
$a5_tmp_title = basename($a5_tmp_image_file);
@@ -201,7 +162,7 @@ if ($a4_readonly) {
if ( $a4_tmp_exec )
{
?>
-<?php unset($a4_true) ?><?php $a5_title='';$a5_type='post';$a5_target='tree';$a5_class='entry';$a5_action='start';$a5_subaction='administration';$a5_id='-1';$a5_frame='_self'; ?><?php
+<?php unset($a4_true) ?><?php $a5_title='';$a5_type='post';$a5_target='tree';$a5_class='entry';$a5_action='start';$a5_subaction='administration';$a5_id='-1';$a5_frame='_self';$a5_modal=false; ?><?php
$params = array();
$tmp_url = '';
$params[REQ_PARAM_TARGET] = $a5_target;
@@ -217,7 +178,10 @@ if ($a4_readonly) {
case 'view':
$tmp_function_call = "startView(this,'".(!empty($a5_subaction)?$a5_subaction:$this->subActionName)."');";
break;
- case 'url':
+ case 'modal':
+ $tmp_function_call = "modalView(this,'".(!empty($a5_subaction)?$a5_subaction:$this->subActionName)."');";
+ break;
+ case 'url':
$tmp_function_call = "submitUrl(this,'".($a5_url)."');";
break;
case 'external':
@@ -227,9 +191,9 @@ if ($a4_readonly) {
$tmp_function_call = "window.open('".$a5_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');";
break;
default:
- $tmp_function_call = "alert('TODO');";
+ $tmp_function_call = "alert('Link-attribute type required');";
}
-?><a target="<?php echo $a5_frame ?>"<?php if (isset($a5_name)) { ?> name="<?php echo $a5_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a5_class ?>"<?php if (isset($a5_accesskey)) echo ' accesskey="'.$a5_accesskey.'"' ?> title="<?php echo encodeHtml($a5_title) ?>"><?php unset($a5_title,$a5_type,$a5_target,$a5_class,$a5_action,$a5_subaction,$a5_id,$a5_frame) ?><?php $a6_icon='administration';$a6_align='left'; ?><?php
+?><a target="<?php echo $a5_frame ?>"<?php if (isset($a5_name)) { ?> name="<?php echo $a5_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a5_class ?>"<?php if (isset($a5_accesskey)) echo ' accesskey="'.$a5_accesskey.'"' ?> title="<?php echo encodeHtml($a5_title) ?>"><?php unset($a5_title,$a5_type,$a5_target,$a5_class,$a5_action,$a5_subaction,$a5_id,$a5_frame,$a5_modal) ?><?php $a6_icon='administration';$a6_align='left'; ?><?php
$a6_tmp_image_file = $image_dir.'icon_'.$a6_icon.IMG_ICON_EXT;
$a6_size = '16x16';
$a6_tmp_title = basename($a6_tmp_image_file);
@@ -242,7 +206,7 @@ if ($a4_readonly) {
$tmp_text = nl2br($tmp_text);
echo $tmp_text;
unset($tmp_text);
-?></<?php echo $tmp_tag ?>><?php unset($a6_class,$a6_key,$a6_escape,$a6_cut) ?></a><?php } ?><?php $a4_title=lang('USER_LOGOUT_DESC');$a4_type='post';$a4_class='entry';$a4_action='login';$a4_subaction='logout';$a4_frame='_self'; ?><?php
+?></<?php echo $tmp_tag ?>><?php unset($a6_class,$a6_key,$a6_escape,$a6_cut) ?></a><?php } ?><?php $a4_title=lang('USER_LOGOUT_DESC');$a4_type='post';$a4_class='entry';$a4_action='login';$a4_subaction='logout';$a4_frame='_self';$a4_modal=false; ?><?php
$params = array();
$tmp_url = '';
$a4_target = $view;
@@ -258,7 +222,10 @@ if ($a4_readonly) {
case 'view':
$tmp_function_call = "startView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');";
break;
- case 'url':
+ case 'modal':
+ $tmp_function_call = "modalView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');";
+ break;
+ case 'url':
$tmp_function_call = "submitUrl(this,'".($a4_url)."');";
break;
case 'external':
@@ -268,9 +235,9 @@ if ($a4_readonly) {
$tmp_function_call = "window.open('".$a4_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');";
break;
default:
- $tmp_function_call = "alert('TODO');";
+ $tmp_function_call = "alert('Link-attribute type required');";
}
-?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame) ?><?php $a5_icon='close';$a5_align='left'; ?><?php
+?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame,$a4_modal) ?><?php $a5_icon='close';$a5_align='left'; ?><?php
$a5_tmp_image_file = $image_dir.'icon_'.$a5_icon.IMG_ICON_EXT;
$a5_size = '16x16';
$a5_tmp_title = basename($a5_tmp_image_file);
@@ -319,7 +286,7 @@ if ($a4_readonly) {
$a5_tmp_image_file = $image_dir.'icon_'.$a5_icon.IMG_ICON_EXT;
$a5_size = '16x16';
$a5_tmp_title = basename($a5_tmp_image_file);
-?><img alt="<?php echo $a5_tmp_title; if (isset($a5_size)) { echo ' ('; list($a5_tmp_width,$a5_tmp_height)=explode('x',$a5_size);echo $a5_tmp_width.'x'.$a5_tmp_height; echo')';} ?>" src="<?php echo $a5_tmp_image_file ?>" border="0"<?php if(isset($a5_align)) echo ' align="'.$a5_align.'"' ?><?php if (isset($a5_size)) { list($a5_tmp_width,$a5_tmp_height)=explode('x',$a5_size);echo ' width="'.$a5_tmp_width.'" height="'.$a5_tmp_height.'"';} ?> /><?php unset($a5_icon,$a5_align) ?><?php $a5_title='';$a5_type='post';$a5_class='entry';$a5_action='start';$a5_subaction='projectmenu';$a5_id=$id;$a5_frame='_self'; ?><?php
+?><img alt="<?php echo $a5_tmp_title; if (isset($a5_size)) { echo ' ('; list($a5_tmp_width,$a5_tmp_height)=explode('x',$a5_size);echo $a5_tmp_width.'x'.$a5_tmp_height; echo')';} ?>" src="<?php echo $a5_tmp_image_file ?>" border="0"<?php if(isset($a5_align)) echo ' align="'.$a5_align.'"' ?><?php if (isset($a5_size)) { list($a5_tmp_width,$a5_tmp_height)=explode('x',$a5_size);echo ' width="'.$a5_tmp_width.'" height="'.$a5_tmp_height.'"';} ?> /><?php unset($a5_icon,$a5_align) ?><?php $a5_title='';$a5_type='post';$a5_class='entry';$a5_action='start';$a5_subaction='projectmenu';$a5_id=$id;$a5_frame='_self';$a5_modal=false; ?><?php
$params = array();
$tmp_url = '';
$a5_target = $view;
@@ -335,7 +302,10 @@ if ($a4_readonly) {
case 'view':
$tmp_function_call = "startView(this,'".(!empty($a5_subaction)?$a5_subaction:$this->subActionName)."');";
break;
- case 'url':
+ case 'modal':
+ $tmp_function_call = "modalView(this,'".(!empty($a5_subaction)?$a5_subaction:$this->subActionName)."');";
+ break;
+ case 'url':
$tmp_function_call = "submitUrl(this,'".($a5_url)."');";
break;
case 'external':
@@ -345,9 +315,9 @@ if ($a4_readonly) {
$tmp_function_call = "window.open('".$a5_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');";
break;
default:
- $tmp_function_call = "alert('TODO');";
+ $tmp_function_call = "alert('Link-attribute type required');";
}
-?><a target="<?php echo $a5_frame ?>"<?php if (isset($a5_name)) { ?> name="<?php echo $a5_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a5_class ?>"<?php if (isset($a5_accesskey)) echo ' accesskey="'.$a5_accesskey.'"' ?> title="<?php echo encodeHtml($a5_title) ?>"><?php unset($a5_title,$a5_type,$a5_class,$a5_action,$a5_subaction,$a5_id,$a5_frame) ?><?php $a6_class='text';$a6_var='name';$a6_maxlength='45';$a6_escape=true;$a6_cut='both'; ?><?php
+?><a target="<?php echo $a5_frame ?>"<?php if (isset($a5_name)) { ?> name="<?php echo $a5_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a5_class ?>"<?php if (isset($a5_accesskey)) echo ' accesskey="'.$a5_accesskey.'"' ?> title="<?php echo encodeHtml($a5_title) ?>"><?php unset($a5_title,$a5_type,$a5_class,$a5_action,$a5_subaction,$a5_id,$a5_frame,$a5_modal) ?><?php $a6_class='text';$a6_var='name';$a6_maxlength='45';$a6_escape=true;$a6_cut='both'; ?><?php
$a6_title = '';
$tmp_tag = 'span';
?><<?php echo $tmp_tag ?> class="<?php echo $a6_class ?>" title="<?php echo $a6_title ?>"><?php
diff --git a/themes/default/templates/title/show.tpl.src.xml b/themes/default/templates/title/show.tpl.src.xml
@@ -11,13 +11,10 @@
</part>
<part class="search">
- <form>
- <image icon="search"></image>
- <input name="text" value="message:search"></input>
- <part class="dropdown">
- <text raw=""></text>
- </part>
- </form>
+ <input name="text" hint="message:search" icon="search"></input>
+ <part class="dropdown">
+ <text raw=""></text>
+ </part>
</part>
<part class="user">
<image icon="user" align="left"></image>