Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F727052
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 5:34 AM
Size
12 KB
Mime Type
text/x-diff
Expires
Wed, Jan 8, 5:34 AM (1 d, 22 h ago)
Engine
blob
Format
Raw Data
Handle
537119
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/5.2.x/core/admin_templates/tree.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/tree.tpl (revision 16292)
+++ branches/5.2.x/core/admin_templates/tree.tpl (revision 16293)
@@ -1,196 +1,199 @@
<inp2:m_Set skip_last_template="1"/>
<inp2:m_include t="incs/header" nobody="yes" noform="yes"/>
<inp2:m_NoDebug/>
<body class="tree-body" onresize="onTreeFrameResize();">
<script type="text/javascript">
var $save_timer = null,
$last_width = parseInt('<inp2:m_GetConfig name="MenuFrameWidth"/>');
function credits(url) {
openwin(url, 'credits', 280, 520);
}
function onTreeFrameResize() {
- var $frameset = $('#sub_frameset', window.parent.document);
- if (!$frameset.length) {
- return ;
+ var $menu_frame = $('#menu_frame', window.parent.document),
+ $width;
+
+ if (!$menu_frame.length) {
+ return;
}
- var $width = $frameset.attr('cols').split(',')[0];
- if (($width <= 0) || ($width == $last_width)) {
+ $width = $menu_frame.width();
+
+ if (($width <= 0) || ($width == $last_width)) {
// don't save zero width
- return ;
+ return;
}
clearTimeout($save_timer);
$save_timer = setTimeout( function() {saveFrameWidth($width);}, 2000);
}
function saveFrameWidth($width) {
getFrame('head').$FrameResizer.OpenWidth = $width;
$.get(
'<inp2:m_Link template="index" adm_event="OnSaveMenuFrameWidth" pass="m,adm" js_escape="1" no_amp="1"/>',
{width: $width}
);
$last_width = $width;
}
</script>
<script type="text/javascript" src="<inp2:m_Compress files='js/tree.js'/>"></script>
<table style="height: 100%; width: 100%; border-right: 1px solid #777; border-bottom: 1px solid #777;">
<tr>
<td colspan="2" style="vertical-align: top; padding: 5px;">
<inp2:m_DefineElement name="xml_node" icon_module="">
<inp2:m_if check="m_ParamEquals" param="children_count" value="0">
<item href="<inp2:m_param name='section_url' html_escape='1'/>" priority="<inp2:m_param name='priority' html_escape='1'/>" onclick="<inp2:m_param name='onclick' html_escape='1'/>" icon="<inp2:$SectionPrefix_ModulePath module='$icon_module'/>img/icons/icon24_<inp2:m_param name='icon'/>.png"<inp2:m_if check="m_Param" name="debug_only"> debug_only="1"</inp2:m_if>><inp2:m_phrase name="$label" html_escape="1"/></item>
<inp2:m_else/>
<folder href="<inp2:m_param name='section_url' html_escape='1'/>" priority="<inp2:m_param name='priority' html_escape='1'/>" container="<inp2:m_param name='container' html_escape='1'/>" onclick="<inp2:m_param name='onclick' html_escape='1'/>" name="<inp2:m_phrase name='$label' html_escape='1'/>" icon="<inp2:$SectionPrefix_ModulePath module="$icon_module"/>img/icons/icon24_<inp2:m_param name='icon'/>.png" load_url="<inp2:m_param name='late_load' html_escape='1'/>"<inp2:m_if check="m_Param" name="debug_only"> debug_only="1"</inp2:m_if>><inp2:adm_PrintSections render_as="xml_node" section_name="$section_name"/></folder>
</inp2:m_if>
</inp2:m_DefineElement>
<table class="tree">
<tbody id="tree">
</tbody>
</table>
<script type="text/javascript">
var TREE_ICONS_PATH = 'img/tree';
var TREE_SHOW_PRIORITY = <inp2:m_if check="adm_ConstOn" name="DBG_SHOW_TREE_PRIORITY" debug_mode="1">1<inp2:m_else/>0</inp2:m_if>;
var TREE_LOADING_NODE = {
text: '<inp2:m_Phrase name="la_title_Loading" no_editing="1"/>',
icon: '<inp2:adm_ModulePath module="core"/>img/icons/icon24_loading.gif'
};
<inp2:m_DefineElement name="root_node">
var the_tree = new TreeFolder('tree', '<inp2:m_param name="label" js_escape="1"/>', '<inp2:m_param name="section_url" js_escape="1"/>', '<inp2:$SectionPrefix_ModulePath module="$icon_module"/>img/icons/icon24_<inp2:m_param name="icon"/>.png', null, null, '<inp2:m_param name="priority" js_escape='1'/>', '<inp2:m_param name="container" js_escape="1"/>');
</inp2:m_DefineElement>
<inp2:adm_PrintSection render_as="root_node" section_name="in-portal:root"/>
the_tree.AddFromXML('<tree><inp2:adm_PrintSections render_as="xml_node" section_name="in-portal:root" js_escape="1"/></tree>');
<inp2:m_if check="adm_MainFrameLink">
var fld = the_tree.locateItemByURL('<inp2:adm_MainFrameLink m_opener="r" no_amp="1"/>');
if (fld) {
fld.highLight();
}
else {
the_tree.highLight();
}
<inp2:m_else/>
the_tree.highLight();
</inp2:m_if>
</script>
</td>
</tr>
</table>
<script type="text/javascript">
function checkCatalog($cat_id) {
var $ret = checkEditMode(false);
var $right_frame = getFrame('main');
if ($ret && $right_frame.$is_catalog) {
$right_frame.$Catalog.go_to_cat($cat_id);
return 1; // this opens folder, but disables click
}
return $ret;
}
function setCatalogTab($prefix) {
var $ret = checkEditMode(false);
if ($ret) {
var $right_frame = getFrame('main');
var $catalog_type = (typeof $right_frame.$Catalog != 'undefined') ? $right_frame.$Catalog.type : '';
// highlight "Structure & Data" node, when one of it's shortcut nodes are clicked
<inp2:m_DefineElement name="section_url_element"><inp2:m_param name="section_url"/></inp2:m_DefineElement>
var $structure_node = the_tree.locateItemByURL('<inp2:adm_PrintSection render_as="section_url_element" section_name="in-portal:browse"/>');
if ($catalog_type == 'AdvancedView') {
$right_frame.$Catalog.switchTab($prefix);
return $structure_node; // this opens folder, but disables click
}
// this disabled click and causes other node to be highlighted
return $structure_node;
}
return $ret;
}
function checkEditMode($reset_toolbar)
{
if (!isset($reset_toolbar)) {
$reset_toolbar = true;
}
if ($reset_toolbar) {
getFrame('head').$('#extra_toolbar').html('');
}
var $phrase = '<inp2:m_Phrase label="la_EditingInProgress" js_escape="1"/>';
if (getFrame('main').$edit_mode) {
return confirm($phrase) ? true : false;
}
return true;
}
function ReloadFolder(url, with_late_load)
{
if (!with_late_load) with_late_load = false;
var fld = the_tree.locateItemByURL(url.replace(/&/g, '&'), with_late_load);
if (fld) {
fld.reload();
}
}
function ShowStructure($url, $visible)
{
var fld = the_tree.locateItemByURL($url, true);
if (fld) {
if ($visible) {
fld.expand();
}
else {
fld.collapse();
}
}
}
function SyncActive(url) {
var fld = the_tree.locateItemByURL(url);
if (fld) {
fld.highLight();
}
}
<inp2:m_DefineElement name="container_node">
var $container_node = the_tree.locateItemByURL('<inp2:m_param name="section_url" js_escape="1"/>');
$container_node.Container = true;
</inp2:m_DefineElement>
<inp2:m_DefineElement name="container_node_fix">
<inp2:m_if check="m_GetConfig" name="$config_var">
<inp2:m_ifnot check="m_IsDebugMode">
<inp2:adm_PrintSection render_as="container_node" section_name="$section"/>
</inp2:m_ifnot>
</inp2:m_if>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="container_node_fix" config_var="DebugOnlyFormConfigurator" section="in-portal:forms"/>
<inp2:m_RenderElement name="container_node_fix" config_var="DebugOnlyPromoBlockGroupConfigurator" section="in-portal:promo_block_groups"/>
</script>
<!--## when form is on top, then 100% height is broken ##-->
<inp2:m_RenderElement name="kernel_form"/>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/index.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/index.tpl (revision 16292)
+++ branches/5.2.x/core/admin_templates/index.tpl (revision 16293)
@@ -1,66 +1,66 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<inp2:m_Set skip_last_template="1"/>
<inp2:m_CheckSSL mode="required" condition="Require_AdminSSL" />
<inp2:m_CheckSSL/>
<inp2:m_RequireLogin login_template="login"/>
<inp2:m_NoDebug/>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>">
<title><inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/></title>
<inp2:m_base_ref/>
<link rel="icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
<script type="text/javascript">
window.name = 'main_frame';
var $top_height = 117; // 94;
if (navigator.appName == 'Netscape') {
$top_height = navigator.appVersion.substring(0, 1) != '5' ? $top_height + 2 : $top_height + 1;
}
<inp2:m_if check="m_GetConfig" name="ResizableFrames">
<inp2:m_if check="m_RecallEquals" name="ShowAdminMenu" value="0" persistent="1">
document.write('<frameset id="top_frameset" rows="' + $top_height + ',*" framespacing="0" scrolling="no" border="1">');
<inp2:m_else/>
document.write('<frameset id="top_frameset" rows="25,*" framespacing="0" scrolling="no" border="1">');
</inp2:m_if>
<inp2:m_else/>
<inp2:m_if check="m_RecallEquals" name="ShowAdminMenu" value="0" persistent="1">
document.write('<frameset id="top_frameset" rows="' + $top_height + ',*" framespacing="0" scrolling="no" frameborder="0">');
<inp2:m_else/>
document.write('<frameset id="top_frameset" rows="25,*" framespacing="0" scrolling="no" frameborder="0">');
</inp2:m_if>
</inp2:m_if>
</script>
</head>
<inp2:m_if check="m_GetConfig" name="ResizableFrames">
<frame src="<inp2:m_t t='head' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" name="head" id="head_frame" scrolling="no" noresize frameborder="0" border="0">
<frameset id="sub_frameset" cols="<inp2:m_if check='m_RecallEquals' name='ShowAdminMenu' value='0' persistent='1'><inp2:adm_MenuFrameWidth/><inp2:m_else/>0</inp2:m_if>,*" border="1">
- <frame src="<inp2:m_t t='tree' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" name="menu" target="main" scrolling="auto" marginwidth="0" marginheight="0" border="1" frameborder="1">
+ <frame src="<inp2:m_t t='tree' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" id="menu_frame" name="menu" target="main" scrolling="auto" marginwidth="0" marginheight="0" border="1" frameborder="1">
<inp2:m_DefineElement name="root_node">
<frame src="<inp2:m_if check='adm_MainFrameLink'><inp2:adm_MainFrameLink/><inp2:m_else/><inp2:m_param name='section_url'/></inp2:m_if>" name="main" marginwidth="0" marginheight="0" scrolling="auto" border="1" frameborder="1">
</inp2:m_DefineElement>
<inp2:adm_PrintSection render_as="root_node" section_name="in-portal:root" use_first_child="1"/>
</frameset>
</frameset>
<inp2:m_else/>
<frame src="<inp2:m_t t='head' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" name="head" scrolling="no" noresize="noresize">
<frameset id="sub_frameset" cols="<inp2:m_if check='m_RecallEquals' name='ShowAdminMenu' value='0' persistent='1'><inp2:adm_MenuFrameWidth/><inp2:m_else/>0</inp2:m_if>,*" border="0">
- <frame src="<inp2:m_t t='tree' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" name="menu" target="main" noresize scrolling="auto" marginwidth="0" marginheight="0">
+ <frame src="<inp2:m_t t='tree' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" id="menu_frame" name="menu" target="main" noresize scrolling="auto" marginwidth="0" marginheight="0">
<inp2:m_DefineElement name="root_node">
<frame src="<inp2:m_if check='adm_MainFrameLink'><inp2:adm_MainFrameLink/><inp2:m_else/><inp2:m_param name='section_url'/></inp2:m_if>" name="main" marginwidth="0" marginheight="0" frameborder="no" noresize scrolling="auto">
</inp2:m_DefineElement>
<inp2:adm_PrintSection render_as="root_node" section_name="in-portal:root" use_first_child="1"/>
</frameset>
</frameset>
</inp2:m_if>
<noframes>
<body bgcolor="#FFFFFF">
<p></p>
</body>
</noframes>
-</html>
\ No newline at end of file
+</html>
Event Timeline
Log In to Comment