Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1175021
D124.id377.diff
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
Fri, Oct 3, 9:17 AM
Size
2 KB
Mime Type
text/x-diff
Expires
Sat, Oct 4, 9:17 AM (17 h, 36 m)
Engine
blob
Format
Raw Data
Handle
761932
Attached To
D124: INP-1473 - Add "edit_field" parameter to "AdminEditButton" tag
D124.id377.diff
View Options
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 () {
+ $(getFrame('main').document).scrollTop($($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
Log In to Comment