From 2f268aba62768d43e72f2bd3a16bf12d43a4461c Mon Sep 17 00:00:00 2001 From: sebastian Date: Tue, 2 Aug 2005 12:22:26 +0000 Subject: [PATCH] some tweaks --- .../htmlUI/var/formmask/generic.inc.php | 4 +- .../htmlUI/var/templates/file/data.tpl | 2 +- .../htmlUI/var/templates/file/objects.tpl | 2 +- .../var/templates/library/actionhandler.tpl | 2 +- .../htmlUI/var/templates/library/results.tpl | 2 +- .../var/templates/playlist/actionhandler.tpl | 7 +- .../htmlUI/var/templates/playlist/editor.tpl | 2 +- .../templates/playlist/editor_dragitem.tpl | 2 +- .../templates/popup/PLAYLIST.arrangeItems.tpl | 192 +++++++++--------- .../popup/SUBJECTS.confirmRemoveSubj.tpl | 22 +- .../htmlUI/var/templates/scheduler/day.tpl | 2 +- .../htmlUI/var/templates/scheduler/week.tpl | 2 +- .../templates/scratchpad/actionhandler.tpl | 2 +- .../htmlUI/var/templates/scratchpad/main.tpl | 4 +- .../htmlUI/var/templates/script/basics.js.tpl | 2 +- .../sub/{mouseover.tpl => alttext.tpl} | 6 +- .../htmlUI/var/templates/sub/contextmenu.tpl | 25 ++- .../templates/subjects/manageGroupMember.tpl | 12 +- .../var/templates/subjects/overview.tpl | 5 +- .../modules/htmlUI/var/ui_browser.class.php | 2 +- .../htmlUI/var/ui_smartyExtensions.inc.php | 37 ---- 21 files changed, 158 insertions(+), 178 deletions(-) rename livesupport/modules/htmlUI/var/templates/sub/{mouseover.tpl => alttext.tpl} (75%) diff --git a/livesupport/modules/htmlUI/var/formmask/generic.inc.php b/livesupport/modules/htmlUI/var/formmask/generic.inc.php index 40a37c5ea..e78097fd8 100755 --- a/livesupport/modules/htmlUI/var/formmask/generic.inc.php +++ b/livesupport/modules/htmlUI/var/formmask/generic.inc.php @@ -79,8 +79,10 @@ $ui_fmask = array( 'options' => array( 5 => 5, 10 => 10, - 25 => 25 + 25 => 25, + 50 => 50 ), + 'default' => 10, 'required' => TRUE ), array( diff --git a/livesupport/modules/htmlUI/var/templates/file/data.tpl b/livesupport/modules/htmlUI/var/templates/file/data.tpl index fb65ee08f..424fa060c 100644 --- a/livesupport/modules/htmlUI/var/templates/file/data.tpl +++ b/livesupport/modules/htmlUI/var/templates/file/data.tpl @@ -2,7 +2,7 @@ {include file="sub/x.tpl"}
{if $fMetaData} - + {/if} {if $_analyzeFile} {$_analyzeFile} diff --git a/livesupport/modules/htmlUI/var/templates/file/objects.tpl b/livesupport/modules/htmlUI/var/templates/file/objects.tpl index 7a0b2b5db..126033c62 100755 --- a/livesupport/modules/htmlUI/var/templates/file/objects.tpl +++ b/livesupport/modules/htmlUI/var/templates/file/objects.tpl @@ -35,7 +35,7 @@ {/if} - {$i.type|lower|capitalize} + {$i.type|lower|capitalize} {*  [rename] *}  ##move## diff --git a/livesupport/modules/htmlUI/var/templates/library/actionhandler.tpl b/livesupport/modules/htmlUI/var/templates/library/actionhandler.tpl index 818143acd..559f41bd2 100755 --- a/livesupport/modules/htmlUI/var/templates/library/actionhandler.tpl +++ b/livesupport/modules/htmlUI/var/templates/library/actionhandler.tpl @@ -6,7 +6,7 @@ onClick="return contextmenu('{$i.id}' {if $_PL_activeId} , 'PL.addItem' {else} - , 'PL.create', '{$i.title|truncate:20}' + , 'PL.create', '{$i.title|truncate:20|escape:'html'}' {/if} , 'edit', '##audioclip##' , 'delete', '##audioclip##' diff --git a/livesupport/modules/htmlUI/var/templates/library/results.tpl b/livesupport/modules/htmlUI/var/templates/library/results.tpl index 3d63254a0..dc872e0d9 100755 --- a/livesupport/modules/htmlUI/var/templates/library/results.tpl +++ b/livesupport/modules/htmlUI/var/templates/library/results.tpl @@ -27,7 +27,7 @@ {$i.creator} {assign var="_duration" value=$i.duration}{niceTime in=$_duration} - {$i.type|lower|capitalize} + {$i.type|lower|capitalize} diff --git a/livesupport/modules/htmlUI/var/templates/playlist/actionhandler.tpl b/livesupport/modules/htmlUI/var/templates/playlist/actionhandler.tpl index 74904d8c4..38f695dcb 100755 --- a/livesupport/modules/htmlUI/var/templates/playlist/actionhandler.tpl +++ b/livesupport/modules/htmlUI/var/templates/playlist/actionhandler.tpl @@ -1,2 +1,7 @@ style="cursor: pointer" -onClick="return contextmenu('{$i.attrs.id}', {if $i.type|lower == "audioclip"}'listen', '{$i.gunid}', '{$i.type}', {/if} 'PL.removeItem')" +onClick="return contextmenu('{$i.attrs.id}', + {if $i.type|lower == 'audioclip'} + 'listen', '{$i.gunid}', '{$i.type}', + {/if} + 'PL.removeItem' + )" diff --git a/livesupport/modules/htmlUI/var/templates/playlist/editor.tpl b/livesupport/modules/htmlUI/var/templates/playlist/editor.tpl index 55db9d0ea..88ea01873 100755 --- a/livesupport/modules/htmlUI/var/templates/playlist/editor.tpl +++ b/livesupport/modules/htmlUI/var/templates/playlist/editor.tpl @@ -43,7 +43,7 @@ {$i.creator} - {$i.type|capitalize} + {$i.type|capitalize} ##move up## diff --git a/livesupport/modules/htmlUI/var/templates/playlist/editor_dragitem.tpl b/livesupport/modules/htmlUI/var/templates/playlist/editor_dragitem.tpl index 5d4a07563..41946d484 100755 --- a/livesupport/modules/htmlUI/var/templates/playlist/editor_dragitem.tpl +++ b/livesupport/modules/htmlUI/var/templates/playlist/editor_dragitem.tpl @@ -57,7 +57,7 @@ {$i.creator} - {$i.type|capitalize} + {$i.type|capitalize} ##move up## diff --git a/livesupport/modules/htmlUI/var/templates/popup/PLAYLIST.arrangeItems.tpl b/livesupport/modules/htmlUI/var/templates/popup/PLAYLIST.arrangeItems.tpl index 368a45083..95be8acd6 100755 --- a/livesupport/modules/htmlUI/var/templates/popup/PLAYLIST.arrangeItems.tpl +++ b/livesupport/modules/htmlUI/var/templates/popup/PLAYLIST.arrangeItems.tpl @@ -1,96 +1,96 @@ -{include file="popup/header.tpl"} -{include file="script/alttext.js.tpl"} - -
-
-

##Reorder Playlist##

-

{$PL->title}   {getHour time=$PL->duration}##h## {getMinute time=$PL->duration}##m## {getSecond time=$PL->duration}##s##

-
- -

- {$UI_PL_DRAG_INTRO} - -
- -
- - - - - - - -
##Title####Duration####Artist####Type##
- -
-
- - {foreach from=$PL->getFlat($PL->activeId) key='pos' item='i'} - -
- - - - - - - - - - - - -
{$i.title}{assign var="_duration" value=$i.duration}{niceTime in=$_duration}{$i.creator}{$i.type|capitalize}
- - -
- - {/foreach} - -
- -
- -
-
-
-
- -
-
-
- -{assign var="_duration" value=null} - - - - - - - - +{include file="popup/header.tpl"} +{include file="script/alttext.js.tpl"} + +
+
+

##Reorder Playlist##

+

{$PL->title}   {getHour time=$PL->duration}##h## {getMinute time=$PL->duration}##m## {getSecond time=$PL->duration}##s##

+
+ +

+ {$UI_PL_DRAG_INTRO} + +
+ +
+ + + + + + + +
##Title####Duration####Artist####Type##
+ +
+
+ + {foreach from=$PL->getFlat($PL->activeId) key='pos' item='i'} + +
+ + + + + + + + + + + + +
{$i.title}{assign var="_duration" value=$i.duration}{niceTime in=$_duration}{$i.creator}{$i.type|capitalize}
+ + +
+ + {/foreach} + +
+ +
+ +
+
+
+
+ +
+
+
+ +{assign var="_duration" value=null} + + + + + + + + diff --git a/livesupport/modules/htmlUI/var/templates/popup/SUBJECTS.confirmRemoveSubj.tpl b/livesupport/modules/htmlUI/var/templates/popup/SUBJECTS.confirmRemoveSubj.tpl index f698b1135..ba7d5e05e 100755 --- a/livesupport/modules/htmlUI/var/templates/popup/SUBJECTS.confirmRemoveSubj.tpl +++ b/livesupport/modules/htmlUI/var/templates/popup/SUBJECTS.confirmRemoveSubj.tpl @@ -1,11 +1,11 @@ -{include file="popup/header.tpl"} - -
-{tra 0='Are you sure to remove "$1"?' 1=$_REQUEST.login} -

- - -
- - - +{include file="popup/header.tpl"} + +
+{tra 0='Are you sure to remove "$1"?' 1=$_REQUEST.login} +

+ + +
+ + + diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl index 20b9dc8aa..fdc4c7210 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/day.tpl @@ -38,7 +38,7 @@ {foreach from=$_entrys[$_hour] item="i"} {* hier werden die Einträge welche in der jeweil. h beginnen durchlaufen *}
- +   {$i.title} {$i.start}-{$i.end} diff --git a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl index 0ed641184..1af4b99a5 100755 --- a/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl +++ b/livesupport/modules/htmlUI/var/templates/scheduler/week.tpl @@ -50,7 +50,7 @@ {foreach from=$_entrys[$_day.day][$_hour] item="i"}
- +  

{$i.title|truncate:12}

{$i.start|truncate:8:""} - {$i.end|truncate:8:""}

diff --git a/livesupport/modules/htmlUI/var/templates/scratchpad/actionhandler.tpl b/livesupport/modules/htmlUI/var/templates/scratchpad/actionhandler.tpl index 8bc46fc93..ec920b654 100755 --- a/livesupport/modules/htmlUI/var/templates/scratchpad/actionhandler.tpl +++ b/livesupport/modules/htmlUI/var/templates/scratchpad/actionhandler.tpl @@ -6,7 +6,7 @@ onClick="return contextmenu('{$i.id}' {if $_PL_activeId} , 'PL.addItem' {else} - , 'PL.create', '{$i.title|truncate:20}' + , 'PL.create', '{$i.title|truncate:20|escape:'html'}' {/if} , 'edit', '##audioclip##' , 'delete', '##audioclip##' diff --git a/livesupport/modules/htmlUI/var/templates/scratchpad/main.tpl b/livesupport/modules/htmlUI/var/templates/scratchpad/main.tpl index 9b32dd0c1..aa5eb996b 100755 --- a/livesupport/modules/htmlUI/var/templates/scratchpad/main.tpl +++ b/livesupport/modules/htmlUI/var/templates/scratchpad/main.tpl @@ -41,9 +41,9 @@ {if $PL->isAvailable($i.id) == false}
- {$i.type|capitalize}
+ {$i.type|capitalize}
{else} - {$i.type|capitalize} {/if} + {$i.type|capitalize} {/if} diff --git a/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl b/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl index 24c16f6f2..881af623e 100755 --- a/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl +++ b/livesupport/modules/htmlUI/var/templates/script/basics.js.tpl @@ -62,7 +62,7 @@ screenX = (Xpos + Pwidth/2 - width/2); screenY = (Ypos + Pheight/2 - height/2); url = url + '&is_popup=1'; - arg = 'width='+width+', height='+height+', scrollbars=yes, menubar=no, depend=yes, left='+screenX+', top='+screenY; + arg = 'width='+width+', height='+height+',resizable=yes, scrollbars=no, menubar=no, depend=yes, left='+screenX+', top='+screenY; popupwin = window.open(url, name, arg); window.popupwin.focus(); diff --git a/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl b/livesupport/modules/htmlUI/var/templates/sub/alttext.tpl similarity index 75% rename from livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl rename to livesupport/modules/htmlUI/var/templates/sub/alttext.tpl index 54a6b7edc..fe765c181 100755 --- a/livesupport/modules/htmlUI/var/templates/sub/mouseover.tpl +++ b/livesupport/modules/htmlUI/var/templates/sub/alttext.tpl @@ -1,14 +1,14 @@ {UIBROWSER->getMDataArr id=$i.id assign='_metaarr'} - + onMouseover = "showalttext('
##{$i.type|lower|capitalize}##: {$_metaarr.metadata.Title}
' + {if $i.type|lower == 'playlist'} {if $PL->isUSedBy($i.id) != false}'
##(used by {$PL->isUSedBy($i.id)})##
' + {/if} {foreach from=$PL->getFlat($i.id) item='_pli'} - '
{$_pli.title}  {$_pli.duration|truncate:8:''}
' + + '
{$_pli.title|escape:'html'}  {$_pli.duration|truncate:8:''}
' + {/foreach} {/if} - '{foreach from=$_metaarr.metadata key='_key' item='_item'}{if $_key != 'Title'}
{$_key}: {$_item}
{/if}{/foreach}')" + '{foreach from=$_metaarr.metadata key='_key' item='_item'}{if $_key != 'Title'}
{$_key}: {$_item|escape:'quotes'}
{/if}{/foreach}')" onMouseout = "hidealttext()" {assign var='_metaarr' value=null} diff --git a/livesupport/modules/htmlUI/var/templates/sub/contextmenu.tpl b/livesupport/modules/htmlUI/var/templates/sub/contextmenu.tpl index 907add95f..99cbaa721 100755 --- a/livesupport/modules/htmlUI/var/templates/sub/contextmenu.tpl +++ b/livesupport/modules/htmlUI/var/templates/sub/contextmenu.tpl @@ -2,23 +2,26 @@ onClick="return contextmenu('{$i.id}' {$moreContextBefore} + {if $i.type|lower == 'audioclip'} - , 'listen', '{$i.gunid}' + , 'listen', '{$i.gunid}', '##audioclip##' {if $_PL_activeId} , 'PL.addItem' {else} - , 'PL.create' + , 'PL.create', '{$i.title|truncate:20|escape:'html'}' {/if} - , 'edit', 'delete' + , 'edit', '##audioclip##' + , 'delete', '##audioclip##' {/if} {if $i.type|lower == 'webstream'} {if $_PL_activeId} , 'PL.addItem' {else} - , 'PL.create' + , 'PL.create', '{$i.title|truncate:20|escape:'html'}' {/if} - , 'edit', 'delete' + , 'edit', '##webstream##' + , 'delete', '##webstream##' {/if} {if $i.type|lower == 'playlist'} @@ -26,15 +29,21 @@ onClick="return contextmenu('{$i.id}' {if $_PL_activeId == $i.id} , 'PL.release' {else} - , 'SCHEDULER.addPL', 'PL.addItem', 'delete' + , 'SCHEDULER.addPL' + , 'PL.addItem' + , 'delete' {/if} {else} - , 'SCHEDULER.addPL', 'PL.activate', 'PL.create', 'delete' + , 'SCHEDULER.addPL' + , 'PL.activate' + , 'PL.create', '{$i.title|truncate:20|escape:'html'}' + , 'delete' {/if} {/if} {if ($i.type|lower == 'folder')} - , 'fileList', 'delete' + , 'fileList' + , 'delete', '##playlist##' {/if} {$moreContextAfter} )" diff --git a/livesupport/modules/htmlUI/var/templates/subjects/manageGroupMember.tpl b/livesupport/modules/htmlUI/var/templates/subjects/manageGroupMember.tpl index 7af5d9ada..fa9c9a113 100755 --- a/livesupport/modules/htmlUI/var/templates/subjects/manageGroupMember.tpl +++ b/livesupport/modules/htmlUI/var/templates/subjects/manageGroupMember.tpl @@ -23,9 +23,9 @@ {foreach from=$_member item="i"} - {$i.login} + {$i.login} + onClick="return contextmenu('login={$i.login|escape:'url'}&gname={$_gname|escape:'url'}', 'SUBJECTS.removeSubjFromGr')"> {if $i.type|lower == 'u'} User {else} @@ -41,7 +41,7 @@
@@ -70,9 +70,9 @@ - {$i.login} + {$i.login} + onClick="return contextmenu('login={$i.login|escape:'url'}&gname={$_gname|escape:'url'}', 'SUBJECTS.removeSubjFromGr')"> {if $i.type|lower == 'u'} User {else} @@ -91,7 +91,7 @@ diff --git a/livesupport/modules/htmlUI/var/templates/subjects/overview.tpl b/livesupport/modules/htmlUI/var/templates/subjects/overview.tpl index 18e91fb46..f9d9c72bc 100755 --- a/livesupport/modules/htmlUI/var/templates/subjects/overview.tpl +++ b/livesupport/modules/htmlUI/var/templates/subjects/overview.tpl @@ -13,7 +13,8 @@ {foreach from=$SUBJECTS->getSubjectsWCnt() item=i} {if $i.type|lower == 'g'}{assign var="_type" value="group"}{else}{assign var="_type" value="user"}{/if} {$i.login} @@ -39,4 +40,4 @@ -{assign var="_type" value=null} +{assign var="_type" value=null} \ No newline at end of file diff --git a/livesupport/modules/htmlUI/var/ui_browser.class.php b/livesupport/modules/htmlUI/var/ui_browser.class.php index 55bbc282e..ff4f50a9d 100644 --- a/livesupport/modules/htmlUI/var/ui_browser.class.php +++ b/livesupport/modules/htmlUI/var/ui_browser.class.php @@ -292,7 +292,7 @@ class uiBrowser extends uiBase { } ksort($arr); - + #print_r($arr); return array('metadata' => $arr); } diff --git a/livesupport/modules/htmlUI/var/ui_smartyExtensions.inc.php b/livesupport/modules/htmlUI/var/ui_smartyExtensions.inc.php index e794608a8..ef90d0f41 100644 --- a/livesupport/modules/htmlUI/var/ui_smartyExtensions.inc.php +++ b/livesupport/modules/htmlUI/var/ui_smartyExtensions.inc.php @@ -10,9 +10,6 @@ $Smarty->assign_by_ref ('JSCOM', $jscom); $Smarty->register_function('str_repeat', 'S_str_repeat'); -$Smarty->register_function('urlencode', 'S_urlencode'); -$Smarty->register_function('htmlspecialchars', 'S_htmlspecialchars'); -$Smarty->register_function('system', 'S_system'); $Smarty->register_function('tra', 'S_tra'); $Smarty->register_function('getHour', 'S_getHour'); $Smarty->register_function('getMinute', 'S_getMinute'); @@ -36,37 +33,6 @@ function S_str_repeat($param) } - - /** - * urlencode - * - * Encode given string to use in URL. - * - * @param str string, string to encode - * @return string, encoded string - */ -function S_urlencode($param) -{ - extract($param); - return urlencode($str); -} - - -/** - * htmlspecialchars - * - * convert special chars in given string to html-entitys. - * - * @param str string, string to convert - * @return string, converted string - */ -function S_htmlspecialchars($param) -{ - extract($param); - return htmlspecialchars($str); -} - - /** * tra * @@ -82,7 +48,6 @@ function S_tra($in) echo tra($param[0], $param[1], $param[2], $param[3], $param[4], $param[5], $param[6], $param[7], $param[8], $param[9]); } - function S_getHour($param) { ## input format is HH:MM:SS.dddddd @@ -116,8 +81,6 @@ function S_getSecond($param) return strftime("%S", $curr); } - - function S_niceTime($param) { extract($param);