Page MenuHomeIn-Portal Phabricator

D124.id300.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 5:18 AM

D124.id300.diff

Index: core/admin_templates/incs/footer.tpl
===================================================================
--- core/admin_templates/incs/footer.tpl
+++ core/admin_templates/incs/footer.tpl
@@ -56,4 +56,22 @@
<div id="nlsMenuPlace"></div>
</body>
-</html>
\ No newline at end of file
+</html>
+
+<inp2:m_if check="m_Get" name="edit_field">
+ <script type="text/javascript">
+ var $row = get_control('<inp2:adm_PassedPrefixTag tag="InputName" name="#FIELD_NAME#" js_escape="1"/>', '<inp2:m_Get name="edit_field"/>', 'row');
+
+ if ( $row ) {
+ <inp2:m_if check="adm_UsePopups">
+ Application.setHook('m:OnAfterFormInit', function () {
+ $('#scroll_container_container').scrollTop($($row).offset().top - $('#scroll_container_container').offset().top);
+ });
+ <inp2:m_else/>
+ $(document).ready(function () {
+ parent.frames['main'].scrollBy(0, $($row).offset().top);
+ });
+ </inp2:m_if>
+ }
+ </script>
+</inp2:m_if>
Index: core/kernel/db/db_event_handler.php
===================================================================
--- core/kernel/db/db_event_handler.php
+++ core/kernel/db/db_event_handler.php
@@ -1811,10 +1811,14 @@
$event->SetRedirectParam($event->getPrefixSpecial() . '_id', array_shift($ids));
$event->SetRedirectParam('pass', 'all,' . $event->getPrefixSpecial());
- $simultaneous_edit_message = $this->Application->GetVar('_simultaneous_edit_message');
+ $pass_through = array('_simultaneous_edit_message', 'edit_field');
- if ( $simultaneous_edit_message ) {
- $event->SetRedirectParam('_simultaneous_edit_message', $simultaneous_edit_message);
+ foreach ( $pass_through as $name ) {
+ $value = $this->Application->GetVar($name);
+
+ if ( $value ) {
+ $event->SetRedirectParam($name, $value);
+ }
}
}
Index: core/units/admin/admin_tag_processor.php
===================================================================
--- core/units/admin/admin_tag_processor.php
+++ core/units/admin/admin_tag_processor.php
@@ -1219,4 +1219,20 @@
return $this->Application->ParseBlock($block_params);
}
+
+ /**
+ * Processes tag of passed prefix
+ *
+ * @param array $params Tag params.
+ *
+ * @return string
+ */
+ protected function PassedPrefixTag(array $params)
+ {
+ $prefix = explode(',', $this->Application->GetVar('passed'));
+ $prefix = array_pop($prefix);
+
+ return $this->Application->ProcessParsedTag($prefix, $params['tag'], $params);
+ }
+
}

Event Timeline