Page MenuHomeIn-Portal Phabricator

D294.diff
No OneTemporary

File Metadata

Created
Wed, May 7, 10:11 PM

D294.diff

Index: branches/5.2.x/core/admin_templates/config/config_search.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/config/config_search.tpl
+++ branches/5.2.x/core/admin_templates/config/config_search.tpl
@@ -129,14 +129,16 @@
<inp2:m_RenderElement name="config_updated_notice"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered"<inp2:m_if check="conf_ShowRelevance"> style="border-bottom-width: 0px;"</inp2:m_if>>
- <inp2:confs_PrintList render_as="confs_detail_row" />
-</table>
-
-<inp2:m_if check="conf_ShowRelevance">
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered">
- <inp2:conf_PrintConfList block="config_values" per_page="-1"/>
-</table>
-</inp2:m_if>
+<div id="scroll_container">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered"<inp2:m_if check="conf_ShowRelevance"> style="border-bottom-width: 0px;"</inp2:m_if>>
+ <inp2:confs_PrintList render_as="confs_detail_row" />
+ </table>
+
+ <inp2:m_if check="conf_ShowRelevance">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered">
+ <inp2:conf_PrintConfList block="config_values" per_page="-1"/>
+ </table>
+ </inp2:m_if>
+</div>
<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/core/admin_templates/config/config_universal.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/config/config_universal.tpl
+++ branches/5.2.x/core/admin_templates/config/config_universal.tpl
@@ -115,9 +115,11 @@
<inp2:m_RenderElement name="config_updated_notice"/>
<inp2:conf_SaveWarning name="grid_save_warning"/>
-<table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
- <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
-</table>
+<div id="scroll_container">
+ <table width="100%" border="0" cellspacing="0" cellpadding="4" class="bordered" id="config_table">
+ <inp2:conf_PrintList list_name="default" block="config_block" full_block="config_block" half_block1="config_block1" half_block2="config_block2" value_render_as="cf_default_value"/>
+ </table>
+</div>
<script type="text/javascript">
<inp2:m_if check="m_Get" name="refresh_tree">
Index: branches/5.2.x/core/admin_templates/incs/footer.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/incs/footer.tpl
+++ branches/5.2.x/core/admin_templates/incs/footer.tpl
@@ -1,37 +1,26 @@
<script type="text/javascript">
var _Simultaneous_Edit_Message = '<inp2:m_Get var="_simultaneous_edit_message" js_escape="1"/>';
- <inp2:m_if check="adm_UsePopups">
- var o = '';
- var el = document.getElementById('scroll_container');
- if (el) {
- document.body.style.height = '100%';
- document.body.style.overflow = 'hidden';
- document.body.scroll = 'no'
-
- addLoadEvent(
- function() {
- Form.Init('scroll_container');
- }
- );
- }
-
- <inp2:m_ifnot check="m_Get" name="m_wid" equals_to="">
- // for popups only; TODO: find a way, how to identify editing popups, not selectors
- var _DropTempUrl = '<inp2:m_t pass="m,adm" adm_event="OnDropTempTablesByWID" no_amp="1" js_escape="1"/>';
- </inp2:m_ifnot>
+ var o = '';
+ var el = document.getElementById('scroll_container');
+ if (el) {
+ document.body.style.height = '100%';
+ document.body.style.overflow = 'hidden';
+ document.body.scroll = 'no';
- Application.footerInit();
- <inp2:m_else/>
addLoadEvent(
function() {
- Form.displayFirstError();
- IterateUploaders('renderBrowseButton');
+ Form.Init('scroll_container');
}
);
+ }
- InitEditors();
- </inp2:m_if>
+ <inp2:m_ifnot check="m_Get" name="m_wid" equals_to="">
+ // for popups only; TODO: find a way, how to identify editing popups, not selectors
+ var _DropTempUrl = '<inp2:m_t pass="m,adm" adm_event="OnDropTempTablesByWID" no_amp="1" js_escape="1"/>';
+ </inp2:m_ifnot>
+
+ Application.footerInit();
<inp2:m_if check="m_Get" name="_temp_table_message">
addLoadEvent(
@@ -42,12 +31,6 @@
</inp2:m_if>
</script>
-<inp2:m_ifnot check="adm_UsePopups">
- <inp2:m_ifnot check="m_Get" name="t" equals_to="head|tree">
- <br /><br />
- </inp2:m_ifnot>
-</inp2:m_ifnot>
-
<inp2:adm_AfterScript/>
<inp2:m_ifnot check="m_Param" name="noform" equals_to="yes">
@@ -56,4 +39,4 @@
<div id="nlsMenuPlace"></div>
</body>
-</html>
\ No newline at end of file
+</html>
Index: branches/5.2.x/core/admin_templates/js/forms.js
===================================================================
--- branches/5.2.x/core/admin_templates/js/forms.js
+++ branches/5.2.x/core/admin_templates/js/forms.js
@@ -301,15 +301,17 @@
// alert('h after correction is '+h);
- /*
- // use this 2 lines, instead of next 3 lines, when scrolling without popups needed
- var w = $(window.document.body).outerWidth(false);
- w -= ($div.outerWidth() - $div.width());*/
+ if ( use_popups() && window.name.match(/[\d]+$/) ) {
+ window.document.body.style.width = '100%';
+ var w = (document.all ? window.document.body.offsetWidth : window.innerWidth);
- window.document.body.style.width = '100%';
- var w = (document.all ? window.document.body.offsetWidth : window.innerWidth);
+ w -= pos.left + ($div.outerWidth() - $div.width());
+ }
+ else {
+ var w = $(window.document.body).outerWidth(false);
- w -= pos.left + ($div.outerWidth() - $div.width());
+ w -= ($div.outerWidth() - $div.width());
+ }
scroller_height = this.MinWidth > w ? this.ScrollerH : 0; // width of 1st table in scroll_container is larger, then window width?
scroller_width = this.MinHeight > h - scroller_height ? this.ScrollerW : 0; // table height > total height - scroller_height -> vertical scroller is found
@@ -424,4 +426,4 @@
}
}
return used;
-};
\ No newline at end of file
+};

Event Timeline